diff --git a/.gitignore b/.gitignore
index ec46862766997f516f0978510a4d8d14708c5469..138a636d60995796f8ab7f7090bcb8e754d5e6ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,8 +58,8 @@ doc/Doxygen/DTAGS
 # Untracked configuration files
 /etc/prefs.csh
 /etc/prefs.sh
-/etc/config/prefs.csh
-/etc/config/prefs.sh
+/etc/config.csh/prefs.csh
+/etc/config.sh/prefs.sh
 
 # Source packages - anywhere
 *.tar.bz2
@@ -83,5 +83,3 @@ doc/Doxygen/DTAGS
 
 # Ignore the test directory
 /tutorialsTest
-
-# end-of-file
diff --git a/Allwmake b/Allwmake
index e0dded16f0578d2cd5be38911719ce5496ad7b23..cf49e407b7dbc9b23d18cb6e785be4b13d7bda55 100755
--- a/Allwmake
+++ b/Allwmake
@@ -43,4 +43,4 @@ then
 fi
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/Guides-a4/ProgrammersGuide.pdf b/Guides-a4/ProgrammersGuide.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ebd495d608b7234950bf6d1323bc4357be6f0731
Binary files /dev/null and b/Guides-a4/ProgrammersGuide.pdf differ
diff --git a/Guides-a4/UserGuide.pdf b/Guides-a4/UserGuide.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7524e9d8006e4921e1bacd33cac54a1fe8489e75
Binary files /dev/null and b/Guides-a4/UserGuide.pdf differ
diff --git a/Guides-usletter/ProgrammersGuide.pdf b/Guides-usletter/ProgrammersGuide.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a97bc6d99d4e5c294e752e696ae9400856c54234
Binary files /dev/null and b/Guides-usletter/ProgrammersGuide.pdf differ
diff --git a/Guides-usletter/UserGuide.pdf b/Guides-usletter/UserGuide.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..8960561f15d7ef68ca0a0e288705a2b111df3a84
Binary files /dev/null and b/Guides-usletter/UserGuide.pdf differ
diff --git a/applications/Allwmake b/applications/Allwmake
index f23a233b64eede87833f5f9e6a6149e30428e6e8..2a922d6ae5ff1466f44a89181b49c295bc525561 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -24,4 +24,4 @@ wmake -all utilities $*
 wmake -all solvers $*
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C
index 444874c82f963a41e26173ecc7fa6c83444f39ea..ddbbd20aa07196e87c574adecd758da1811ac7c5 100644
--- a/applications/solvers/DNS/dnsFoam/dnsFoam.C
+++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,16 +91,17 @@ int main(int argc, char *argv[])
         {
             volScalarField rAU(1.0/UEqn.A());
             surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-            volVectorField HbyA("HbyA", U);
-            HbyA = rAU*UEqn.H();
-
+            volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
             surfaceScalarField phiHbyA
             (
                 "phiHbyA",
-                (fvc::interpolate(HbyA) & mesh.Sf())
+                fvc::flux(HbyA)
               + rAUf*fvc::ddtCorr(U, phi)
             );
 
+            // Update the pressure BCs to ensure flux consistency
+            constrainPressure(p, U, phiHbyA, rAUf);
+
             fvScalarMatrix pEqn
             (
                 fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H
index 36c4dcc08afe5a408899504a0e3168ca0842d8ed..faad23831295bde396f81282e8f7efb89534cb54 100644
--- a/applications/solvers/basic/potentialFoam/createFields.H
+++ b/applications/solvers/basic/potentialFoam/createFields.H
@@ -13,7 +13,7 @@ volVectorField U
 );
 
 // Initialise the velocity internal field to zero
-U = dimensionedVector("0", U.dimensions(), vector::zero);
+U = dimensionedVector("0", U.dimensions(), Zero);
 
 surfaceScalarField phi
 (
@@ -25,13 +25,13 @@ surfaceScalarField phi
         IOobject::NO_READ,
         IOobject::AUTO_WRITE
     ),
-    fvc::interpolate(U) & mesh.Sf()
+    fvc::flux(U)
 );
 
 if (args.optionFound("initialiseUBCs"))
 {
     U.correctBoundaryConditions();
-    phi = fvc::interpolate(U) & mesh.Sf();
+    phi = fvc::flux(U);
 }
 
 
diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C
index a13d288a2192fa78e5eafd5a505f9600fd0eb36d..356d7e5fad95311b243394451309fa889088cdf4 100644
--- a/applications/solvers/basic/potentialFoam/potentialFoam.C
+++ b/applications/solvers/basic/potentialFoam/potentialFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -172,8 +172,7 @@ int main(int argc, char *argv[])
     U.correctBoundaryConditions();
 
     Info<< "Interpolated velocity error = "
-        << (sqrt(sum(sqr((fvc::interpolate(U) & mesh.Sf()) - phi)))
-          /sum(mesh.magSf())).value()
+        << (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value()
         << endl;
 
     // Write U and phi
diff --git a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C
index 958de584c3ea9a122e21c34cb0a5eac43a1d8923..12dbaa9e2eec3fcbcedcb988aaf592010f219c00 100644
--- a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C
+++ b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C
@@ -91,10 +91,10 @@ int main(int argc, char *argv[])
                 fvOptions(T)
             );
 
+            TEqn.relax();
             fvOptions.constrain(TEqn);
-
             TEqn.solve();
-
+            fvOptions.correct(T);
         }
 
         runTime.write();
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C
index 9e507b5f92688d316faea45ea9113c03f75b0d95..e85e41b432c6a109979a1a8689f5007d6587fffe 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "basicXiSubXiEq.H"
-#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -93,59 +92,43 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
 
     const scalarField Cw = pow(mesh.V(), 2.0/3.0);
 
-    tmp<volScalarField> tN
+    volScalarField N
     (
-        new volScalarField
+        IOobject
         (
-            IOobject
-            (
-                "tN",
-                mesh.time().constant(),
-                mesh,
-                IOobject::NO_READ,
-                IOobject::NO_WRITE
-            ),
+            "N",
+            mesh.time().constant(),
             mesh,
-            dimensionedScalar("zero", Nv.dimensions(), 0.0),
-            zeroGradientFvPatchVectorField::typeName
-        )
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        mesh,
+        dimensionedScalar("zero", Nv.dimensions(), 0.0)
     );
-
-    volScalarField& N = tN();
-
     N.internalField() = Nv.internalField()*Cw;
 
-    tmp<volSymmTensorField> tns
+    volSymmTensorField ns
     (
-        new volSymmTensorField
+        IOobject
         (
-            IOobject
-            (
-                "tns",
-                U.mesh().time().timeName(),
-                U.mesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE
-            ),
+            "ns",
+            U.mesh().time().timeName(),
             U.mesh(),
-            dimensionedSymmTensor
-            (
-                "zero",
-                nsv.dimensions(),
-                pTraits<symmTensor>::zero
-            ),
-             zeroGradientFvPatchSymmTensorField::typeName
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        U.mesh(),
+        dimensionedSymmTensor
+        (
+            "zero",
+            nsv.dimensions(),
+            Zero
         )
     );
-
-    volSymmTensorField& ns = tns();
-
     ns.internalField() = nsv.internalField()*Cw;
 
     volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
-
     volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
-
     volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
 
     volScalarField XiSubEq
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C
index 928c424191bab7eb064d3cd417df0707c86ce412..45050a171b67130246a28f074ba591103392087e 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "basicXiSubG.H"
-#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -71,32 +70,10 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
     const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
 
     tmp<volScalarField> tGtot = XiGModel_->G();
-    volScalarField& Gtot = tGtot();
+    volScalarField& Gtot = tGtot.ref();
 
     const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
-
-    tmp<volScalarField> tN
-    (
-        new volScalarField
-        (
-            IOobject
-            (
-                "tN",
-                Su_.mesh().time().timeName(),
-                Su_.mesh(),
-                IOobject::NO_READ,
-                IOobject::NO_WRITE,
-                false
-            ),
-            Su_.mesh(),
-            dimensionedScalar("zero", Nv.dimensions(), 0.0),
-            zeroGradientFvPatchVectorField::typeName
-        )
-    );
-
-    volScalarField& N = tN();
-
-    N.internalField() = Nv.internalField()*Cw;
+    scalarField N(Nv.internalField()*Cw);
 
     forAll(N, celli)
     {
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C
index 9fd96b203300a26cfe976f827355f205b9067d5a..7e3d2bb7aab9ff9732a89fe131f65fa062ede8c4 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "basic.H"
-#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -109,13 +108,12 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
             (
                 "zero",
                 dimMass/dimTime/pow(dimLength, 3),
-                pTraits<symmTensor>::zero
-            ),
-            zeroGradientFvPatchSymmTensorField::typeName
+                Zero
+            )
         )
     );
 
-    volSymmTensorField& DragDcu = tDragDcu();
+    volSymmTensorField& DragDcu = tDragDcu.ref();
 
     if (on_)
     {
@@ -145,12 +143,11 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
                 IOobject::NO_WRITE
             ),
             U_.mesh(),
-            dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0),
-            zeroGradientFvPatchVectorField::typeName
+            dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0)
         )
     );
 
-    volScalarField& Gk = tGk();
+    volScalarField& Gk = tGk.ref();
 
     if (on_)
     {
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
index e09c1bbd14080664322c3840bccf33bbcb2039d5..afe97f7f7f38c406a67fd0d66c9c42e38735e783 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ PDRkEpsilon::PDRkEpsilon
     const word& modelName
 )
 :
-    Foam::RASModels::kEpsilon<EddyDiffusivity<compressible::turbulenceModel> >
+    Foam::RASModels::kEpsilon<EddyDiffusivity<compressible::turbulenceModel>>
     (
         geometricOneField(),
         rho,
@@ -161,9 +161,9 @@ void PDRkEpsilon::correct()
       - fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_)
     );
 
-    epsEqn().relax();
+    epsEqn.ref().relax();
 
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
 
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
@@ -182,7 +182,7 @@ void PDRkEpsilon::correct()
       - fvm::Sp(betav*rho_*epsilon_/k_, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
     solve(kEqn);
     bound(k_, kMin_);
 
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C
index ad8452f5a43795be9bb00501fa71de0165207b62..0208818ee0034cb202e0a4e1a5d213c8c2a17972 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
             dimensionedScalar("XiEq", dimless, 0.0)
         )
     );
-    volScalarField& xieq = tXiEq();
+    volScalarField& xieq = tXiEq.ref();
 
     forAll(xieq, celli)
     {
diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C
index 4d1c8c11fd62023c6020aea4cf04270a125d4206..966dae717538dc088b1e947e672e0458f8c70ea3 100644
--- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C
+++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "XiEqModel.H"
-#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -111,39 +110,30 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
                 false
             ),
             mesh,
-            dimensionedScalar("zero", Nv.dimensions(), 0.0),
-            zeroGradientFvPatchVectorField::typeName
+            dimensionedScalar("zero", Nv.dimensions(), 0.0)
         )
     );
-
-    volScalarField& N = tN();
-
+    volScalarField& N = tN.ref();
     N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
 
-    tmp<volSymmTensorField> tns
+    volSymmTensorField ns
     (
-        new volSymmTensorField
+        IOobject
         (
-            IOobject
-            (
-                "tns",
-                mesh.time().timeName(),
-                mesh,
-                IOobject::NO_READ,
-                IOobject::NO_WRITE
-            ),
+            "tns",
+            mesh.time().timeName(),
             mesh,
-            dimensionedSymmTensor
-            (
-                "zero",
-                nsv.dimensions(),
-                pTraits<symmTensor>::zero
-            )
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        mesh,
+        dimensionedSymmTensor
+        (
+            "zero",
+            nsv.dimensions(),
+            Zero
         )
     );
-
-    volSymmTensorField& ns = tns();
-
     ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
 
     const volVectorField Uhat
diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H
index 8ad1161871305276d7a68e40a04fdc9d44e12ada..e9f1a732799171edcd1a9b1b5e42afd46620a833 100644
--- a/applications/solvers/combustion/PDRFoam/bEqn.H
+++ b/applications/solvers/combustion/PDRFoam/bEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
index d4d77822878c37ba04401c25b552cb9da77af6eb..fd07b0b3cbfcada4c87eda806251c708cdaf73b8 100644
--- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
+++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -259,7 +259,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
@@ -306,7 +306,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
@@ -358,7 +358,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
         )
     );
 
-    volScalarField& ma = tMa();
+    volScalarField& ma = tMa.ref();
 
     forAll(ma, celli)
     {
diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H
index 499885875bd859e5c4cd1ff12099c29f11832cf1..c7308f8b122d90a98222f20ea6b7c9403c9cac0a 100644
--- a/applications/solvers/combustion/PDRFoam/pEqn.H
+++ b/applications/solvers/combustion/PDRFoam/pEqn.H
@@ -1,9 +1,7 @@
 rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
-
-volVectorField HbyA("HbyA", U);
-HbyA = invA & UEqn.H();
+volVectorField HbyA(constrainHbyA(invA & UEqn.H(), U, p));
 
 if (pimple.transonic())
 {
@@ -12,7 +10,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
            /fvc::interpolate(rho)
         )
@@ -43,7 +41,7 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
         )
     );
diff --git a/applications/solvers/combustion/XiFoam/XiDyMFoam/pEqn.H b/applications/solvers/combustion/XiFoam/XiDyMFoam/pEqn.H
index 438396ae90b25028218576e50ef7ddea39e8b23b..34a822a0a282e540fbd908758d50b8bafc8fddfb 100644
--- a/applications/solvers/combustion/XiFoam/XiDyMFoam/pEqn.H
+++ b/applications/solvers/combustion/XiFoam/XiDyMFoam/pEqn.H
@@ -2,9 +2,7 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.transonic())
 {
@@ -54,6 +52,9 @@ else
     fvc::makeRelative(phiHbyA, rho, U);
     MRF.makeRelative(phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H
index 87bfaa97909a1c4fcfeed52c655c972fbbf9c139..c0f7dcad9c796f13158ee72b901d5a645144d507 100644
--- a/applications/solvers/combustion/XiFoam/ftEqn.H
+++ b/applications/solvers/combustion/XiFoam/ftEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H
index 2b11dc73f84e895d47941593f8125a9b0317765b..afba129157eabffbd7a24e257dda287d533721a3 100644
--- a/applications/solvers/combustion/XiFoam/pEqn.H
+++ b/applications/solvers/combustion/XiFoam/pEqn.H
@@ -2,9 +2,7 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.transonic())
 {
@@ -13,7 +11,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
         )
     );
@@ -45,13 +43,16 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
     );
 
     MRF.makeRelative(phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H
index ae5d54fc58e09a1ceb43fd60897b007294d3d412..2d2e9d1ebd704232f755af27f1b096029912abeb 100644
--- a/applications/solvers/combustion/chemFoam/createFields.H
+++ b/applications/solvers/combustion/chemFoam/createFields.H
@@ -80,8 +80,7 @@
             IOobject::NO_WRITE
         ),
         mesh,
-        dimensionedVector("zero", dimVelocity, vector::zero),
-        p.boundaryField().types()
+        dimensionedVector("zero", dimVelocity, Zero)
     );
 
     #include "createPhi.H"
diff --git a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H
index e5e7de6496f97f675f3d71a0b55fa9fbeb5a2ff1..9b9d0f376b00b9ac809de1dbdec3bd19c95486e7 100644
--- a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H
+++ b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H
@@ -25,7 +25,7 @@ fvMesh mesh
         runTime,
         IOobject::READ_IF_PRESENT
     ),
-    xferMove<Field<vector> >(points),
+    xferMove<Field<vector>>(points),
     faces.xfer(),
     owner.xfer(),
     neighbour.xfer()
diff --git a/applications/solvers/combustion/engineFoam/pEqn.H b/applications/solvers/combustion/engineFoam/pEqn.H
index c962353e3f2abe27f0bc7327dc26c12973686d3f..aca8c2c11a3660eca549c64d4cafbf7eba14f878 100644
--- a/applications/solvers/combustion/engineFoam/pEqn.H
+++ b/applications/solvers/combustion/engineFoam/pEqn.H
@@ -2,9 +2,7 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.transonic())
 {
@@ -14,7 +12,7 @@ if (pimple.transonic())
         fvc::interpolate(psi)
        *(
             (
-                (fvc::interpolate(HbyA) & mesh.Sf())
+                fvc::flux(HbyA)
               + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
             )
         )
@@ -29,7 +27,7 @@ if (pimple.transonic())
         (
             fvm::ddt(psi, p)
           + fvm::div(phid, p)
-          - fvm::laplacian(rho*rAU, p)
+          - fvm::laplacian(rhorAUf, p)
          ==
             fvOptions(psi, p, rho.name())
         );
@@ -48,7 +46,7 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
         )
     );
@@ -56,13 +54,16 @@ else
     fvc::makeRelative(phiHbyA, rho, U);
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
         (
             fvm::ddt(psi, p)
           + fvc::div(phiHbyA)
-          - fvm::laplacian(rho*rAU, p)
+          - fvm::laplacian(rhorAUf, p)
          ==
             fvOptions(psi, p, rho.name())
         );
diff --git a/applications/solvers/combustion/fireFoam/YEEqn.H b/applications/solvers/combustion/fireFoam/YEEqn.H
index da485e730506a4aa64eeae7a314741d2d3f110d4..cee98e242919aa728d105d4b4efbff673c08ffde 100644
--- a/applications/solvers/combustion/fireFoam/YEEqn.H
+++ b/applications/solvers/combustion/fireFoam/YEEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C
index 4d8c59a297e6b31a185afe78d16f85fd38fdf3b7..b337a29bc7ef2f0c960f627744a61a669916e31a 100644
--- a/applications/solvers/combustion/fireFoam/fireFoam.C
+++ b/applications/solvers/combustion/fireFoam/fireFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,6 @@ Description
 #include "psiCombustionModel.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H
index 6f8b03458152faa2fc67d297f3d3efa28b70444a..7b5249d57e7bd2ce99db1f702aa863eb56a1adf2 100644
--- a/applications/solvers/combustion/fireFoam/pEqn.H
+++ b/applications/solvers/combustion/fireFoam/pEqn.H
@@ -2,9 +2,7 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
@@ -12,7 +10,7 @@ surfaceScalarField phiHbyA
 (
     "phiHbyA",
     (
-        (fvc::interpolate(rho*HbyA) & mesh.Sf())
+        fvc::flux(rho*HbyA)
       + rhorAUf*fvc::ddtCorr(rho, U, phi)
     )
   + phig
@@ -20,16 +18,8 @@ surfaceScalarField phiHbyA
 
 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
-// Update the fixedFluxPressure BCs to ensure flux consistency
-setSnGrad<fixedFluxPressureFvPatchScalarField>
-(
-    p_rgh.boundaryField(),
-    (
-        phiHbyA.boundaryField()
-      - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-       *rho.boundaryField()
-    )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
-);
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
 while (pimple.correctNonOrthogonal())
 {
diff --git a/applications/solvers/combustion/reactingFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/UEqn.H
index 907c9934e2b27ff86d3b862fbaa1d3fc804ff5c4..e4caa1cea4acd908e2a31004bfe1cf67278bbff7 100644
--- a/applications/solvers/combustion/reactingFoam/UEqn.H
+++ b/applications/solvers/combustion/reactingFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(rho, U) + fvm::div(phi, U)
   + MRF.DDt(rho, U)
@@ -10,14 +10,15 @@ tmp<fvVectorMatrix> UEqn
  ==
     fvOptions(rho, U)
 );
+fvVectorMatrix& UEqn = tUEqn.ref();
 
-UEqn().relax();
+UEqn.relax();
 
-fvOptions.constrain(UEqn());
+fvOptions.constrain(UEqn);
 
 if (pimple.momentumPredictor())
 {
-    solve(UEqn() == -fvc::grad(p));
+    solve(UEqn == -fvc::grad(p));
 
     fvOptions.correct(U);
     K = 0.5*magSqr(U);
diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H
index c8d34cf1d591f446c29b3f5b5e49d41e13514ccf..8cb5664d5a96c4763fa14ee1cb133e06bce81158 100644
--- a/applications/solvers/combustion/reactingFoam/YEqn.H
+++ b/applications/solvers/combustion/reactingFoam/YEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H
index 2f352db5da2523e04eedc4e48ff555c8a665dba6..ac7107acf066722b286275569b0a8b2b39af3e05 100644
--- a/applications/solvers/combustion/reactingFoam/pEqn.H
+++ b/applications/solvers/combustion/reactingFoam/pEqn.H
@@ -3,15 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
+volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -21,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
         )
     );
@@ -53,13 +51,16 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/combustion/reactingFoam/pcEqn.H b/applications/solvers/combustion/reactingFoam/pcEqn.H
index 3d7fffc459bdafe18405cf490478ec33578461fc..713f443fc5dbed1e31266ae52d845518954f36e9 100644
--- a/applications/solvers/combustion/reactingFoam/pcEqn.H
+++ b/applications/solvers/combustion/reactingFoam/pcEqn.H
@@ -3,14 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
-volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volScalarField rAU(1.0/UEqn.A());
+volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1()));
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -20,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
            /fvc::interpolate(rho)
         )
@@ -64,7 +63,7 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
         )
     );
@@ -76,6 +75,9 @@ else
 
     volScalarField rhorAtU("rhorAtU", rho*rAtU);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H
index 965ff5bad25636d9ed71d0d15862610cd80b852f..926e69f7c1f7933c402e0289b2e7b0f22cc25bb7 100644
--- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H
+++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H
@@ -7,9 +7,7 @@
 
     volScalarField rAU(1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
     surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
@@ -17,7 +15,7 @@
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
       + phig
@@ -25,16 +23,8 @@
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-           *rho.boundaryField()
-        )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
     fvScalarMatrix p_rghDDtEqn
     (
diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C
index 63b7b8a61ff0c8a5b7ec9ba42045f0e9a1499263..d5caeb13dd92a88c393b9e3c8e5cbf44f64d1947 100644
--- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C
+++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,6 @@ Description
 #include "multivariateScheme.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "localEulerDdtScheme.H"
 #include "fvcSmooth.H"
 
diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
index c3b18e6bd72e543ce15e4ae8aad04f226be8f53b..eff014cf43d847917101add0d0be78cf34b64628 100644
--- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
+++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
@@ -5,11 +5,9 @@
     // pressure solution - done in 2 parts. Part 1:
     thermo.rho() -= psi*p;
 
-    volScalarField rAU(1.0/UEqn().A());
+    volScalarField rAU(1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
     if (pimple.transonic())
     {
@@ -17,7 +15,7 @@
         (
             "phiHbyA",
             (
-                (fvc::interpolate(HbyA) & mesh.Sf())
+                fvc::flux(HbyA)
               + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
             )
         );
@@ -58,13 +56,16 @@
         (
             "phiHbyA",
             (
-                (fvc::interpolate(rho*HbyA) & mesh.Sf())
+                fvc::flux(rho*HbyA)
               + rhorAUf*fvc::ddtCorr(rho, U, phi)
             )
         );
 
         MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+        // Update the pressure BCs to ensure flux consistency
+        constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
         fvScalarMatrix pDDtEqn
         (
             fvc::ddt(rho) + psi*correction(fvm::ddt(p))
diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H
index b84be5a66d9356296b446d99dd902e1b73b04cce..12bdceb7e521e0cd809f708697cfb3d2a86e8091 100644
--- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H
+++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     const dictionary& pimpleDict = pimple.dict();
 
diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwclean b/applications/solvers/compressible/rhoCentralFoam/Allwclean
index 1a0374d96d669b4b6357847f18f447460ecf2e42..34bab5c4498a8525b4ae9551bdffa8b793cb34fc 100755
--- a/applications/solvers/compressible/rhoCentralFoam/Allwclean
+++ b/applications/solvers/compressible/rhoCentralFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso BCs
 wclean
 wclean rhoCentralDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwmake b/applications/solvers/compressible/rhoCentralFoam/Allwmake
index 5c4ed20c2487389cb3cdac233b10d22a428d3c48..c85e4594578f6e5bcb79dd8cb7999670daa16a3c 100755
--- a/applications/solvers/compressible/rhoCentralFoam/Allwmake
+++ b/applications/solvers/compressible/rhoCentralFoam/Allwmake
@@ -1,7 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-(wmake libso BCs && wmake && wmake rhoCentralDyMFoam)
+(wmake $targetType BCs && wmake && wmake rhoCentralDyMFoam)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C
index 5c1459381f04bd48f6b415e5e67a7d477664c225..d65d3943f9b546e9e895d8d2574ace549c11205c 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "mixedFixedValueSlipFvPatchField.H"
 #include "symmTransformField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
+Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -47,36 +42,36 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 
 
 template<class Type>
-mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
+Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 (
-    const mixedFixedValueSlipFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    transformFvPatchField<Type>(ptf, p, iF, mapper),
-    refValue_(ptf.refValue_, mapper),
-    valueFraction_(ptf.valueFraction_, mapper)
+    transformFvPatchField<Type>(p, iF),
+    refValue_("refValue", dict, p.size()),
+    valueFraction_("valueFraction", dict, p.size())
 {}
 
 
 template<class Type>
-mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
+Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 (
+    const mixedFixedValueSlipFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    transformFvPatchField<Type>(p, iF),
-    refValue_("refValue", dict, p.size()),
-    valueFraction_("valueFraction", dict, p.size())
+    transformFvPatchField<Type>(ptf, p, iF, mapper),
+    refValue_(ptf.refValue_, mapper),
+    valueFraction_(ptf.valueFraction_, mapper)
 {}
 
 
 template<class Type>
-mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
+Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 (
     const mixedFixedValueSlipFvPatchField<Type>& ptf
 )
@@ -86,8 +81,9 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
     valueFraction_(ptf.valueFraction_)
 {}
 
+
 template<class Type>
-mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
+Foam::mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 (
     const mixedFixedValueSlipFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -101,9 +97,8 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Map from self
 template<class Type>
-void mixedFixedValueSlipFvPatchField<Type>::autoMap
+void Foam::mixedFixedValueSlipFvPatchField<Type>::autoMap
 (
     const fvPatchFieldMapper& m
 )
@@ -114,9 +109,8 @@ void mixedFixedValueSlipFvPatchField<Type>::autoMap
 }
 
 
-// Reverse-map the given fvPatchField onto this fvPatchField
 template<class Type>
-void mixedFixedValueSlipFvPatchField<Type>::rmap
+void Foam::mixedFixedValueSlipFvPatchField<Type>::rmap
 (
     const fvPatchField<Type>& ptf,
     const labelList& addr
@@ -125,16 +119,16 @@ void mixedFixedValueSlipFvPatchField<Type>::rmap
     transformFvPatchField<Type>::rmap(ptf, addr);
 
     const mixedFixedValueSlipFvPatchField<Type>& dmptf =
-        refCast<const mixedFixedValueSlipFvPatchField<Type> >(ptf);
+        refCast<const mixedFixedValueSlipFvPatchField<Type>>(ptf);
 
     refValue_.rmap(dmptf.refValue_, addr);
     valueFraction_.rmap(dmptf.valueFraction_, addr);
 }
 
 
-// Return gradient at boundary
 template<class Type>
-tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGrad() const
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFixedValueSlipFvPatchField<Type>::snGrad() const
 {
     tmp<vectorField> nHat = this->patch().nf();
     Field<Type> pif(this->patchInternalField());
@@ -147,9 +141,11 @@ tmp<Field<Type> > mixedFixedValueSlipFvPatchField<Type>::snGrad() const
 }
 
 
-// Evaluate the field on the patch
 template<class Type>
-void mixedFixedValueSlipFvPatchField<Type>::evaluate(const Pstream::commsTypes)
+void Foam::mixedFixedValueSlipFvPatchField<Type>::evaluate
+(
+    const Pstream::commsTypes
+)
 {
     if (!this->updated())
     {
@@ -170,10 +166,9 @@ void mixedFixedValueSlipFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 }
 
 
-// Return defining fields
 template<class Type>
-tmp<Field<Type> >
-mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
 {
     vectorField nHat(this->patch().nf());
     vectorField diag(nHat.size());
@@ -189,9 +184,8 @@ mixedFixedValueSlipFvPatchField<Type>::snGradTransformDiag() const
 }
 
 
-// Write
 template<class Type>
-void mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
+void Foam::mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
 {
     transformFvPatchField<Type>::write(os);
     refValue_.writeEntry("refValue", os);
@@ -199,8 +193,4 @@ void mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H
index d27b722a93613131885ebc588dd9f6e22a78f023..5ab7d3835fb236c039163d2926a2cfc57e69ee31 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,9 +101,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mixedFixedValueSlipFvPatchField<Type>(*this)
             );
@@ -117,12 +117,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mixedFixedValueSlipFvPatchField<Type>(*this, iF)
             );
@@ -130,6 +130,15 @@ public:
 
     // Member functions
 
+        // Access
+
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
+
         // Mapping functions
 
             //- Map (and resize as needed) from self given a mapping object
@@ -170,7 +179,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -179,7 +188,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 
 
         //- Write
diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H
index 6efbb4947d0f55f2cf6b92d53f0605a746ea0d97..cc5cd933b6f33ac532c473453493d2945b1ce64d 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ Description
     This boundary condition provides a fixed density inlet condition for
     compressible solvers, where the density of calculated using:
 
-    \f{
+    \f[
         \rho = \psi p
     \f]
 
diff --git a/applications/solvers/compressible/rhoCentralFoam/createFields.H b/applications/solvers/compressible/rhoCentralFoam/createFields.H
index 632efaf9d15bbae97bde1c02683936a11da7521d..538e936e39f11844ea732f489e41a08fbd188d8d 100644
--- a/applications/solvers/compressible/rhoCentralFoam/createFields.H
+++ b/applications/solvers/compressible/rhoCentralFoam/createFields.H
@@ -95,7 +95,7 @@ surfaceScalarField neg
     dimensionedScalar("neg", dimless, -1.0)
 );
 
-surfaceScalarField phi("phi", mesh.Sf() & fvc::interpolate(rhoU));
+surfaceScalarField phi("phi", fvc::flux(rhoU));
 
 Info<< "Creating turbulence model\n" << endl;
 autoPtr<compressible::turbulenceModel> turbulence
diff --git a/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H b/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H
index 7f4b6cd7b8e5d61b9b8686e880f2637c95d6a1eb..bc94840d1f357782b70046ac3cec0bf74f5b7324 100644
--- a/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H
+++ b/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H
@@ -3,14 +3,14 @@ namespace Foam
 
 //- Interpolate field vf according to direction dir
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const surfaceScalarField& dir,
     const word& reconFieldName = word::null
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
     (
         fvc::interpolate
         (
@@ -22,7 +22,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
         )
     );
 
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf.ref();
 
     sf.rename(vf.name() + '_' + dir.name());
 
diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C
index dea76502f1bf5f1a6ce539c84b97a2bb32314238..92fe4857c9c08112cb9df02207549c50c02de29a 100644
--- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C
+++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,6 @@ Description
 #include "dynamicFvMesh.H"
 #include "psiThermo.H"
 #include "turbulentFluidThermoModel.H"
-#include "zeroGradientFvPatchFields.H"
 #include "fixedRhoFvPatchScalarField.H"
 #include "directionInterpolate.H"
 #include "motionSolver.H"
@@ -212,7 +211,7 @@ int main(int argc, char *argv[])
             "sigmaDotU",
             (
                 fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
-              + (mesh.Sf() & fvc::interpolate(tauMC))
+              + fvc::dotInterpolate(mesh.Sf(), tauMC)
             )
             & (a_pos*U_pos + a_neg*U_neg)
         );
diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C
index 1b71f42b94493a121f92f4c8447530e20811b52e..48a5d9176940a51c7bcb4dbcfe3621ef30a4f9bc 100644
--- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C
+++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,6 @@ Description
 #include "fvCFD.H"
 #include "psiThermo.H"
 #include "turbulentFluidThermoModel.H"
-#include "zeroGradientFvPatchFields.H"
 #include "fixedRhoFvPatchScalarField.H"
 #include "directionInterpolate.H"
 #include "localEulerDdtScheme.H"
@@ -205,9 +204,9 @@ int main(int argc, char *argv[])
             "sigmaDotU",
             (
                 fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
-              + (mesh.Sf() & fvc::interpolate(tauMC))
+              + fvc::dotInterpolate(mesh.Sf(), tauMC)
             )
-            & (a_pos*U_pos + a_neg*U_neg)
+          & (a_pos*U_pos + a_neg*U_neg)
         );
 
         solve
diff --git a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H
index e469bafa346c78f4a94aadcba842626841204650..806ddd3832433c1a0eaca7995bee31f630a6b2d2 100644
--- a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H
+++ b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H
@@ -1,5 +1,5 @@
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     scalar rDeltaTSmoothingCoeff
     (
diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H
index 907c9934e2b27ff86d3b862fbaa1d3fc804ff5c4..e4caa1cea4acd908e2a31004bfe1cf67278bbff7 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(rho, U) + fvm::div(phi, U)
   + MRF.DDt(rho, U)
@@ -10,14 +10,15 @@ tmp<fvVectorMatrix> UEqn
  ==
     fvOptions(rho, U)
 );
+fvVectorMatrix& UEqn = tUEqn.ref();
 
-UEqn().relax();
+UEqn.relax();
 
-fvOptions.constrain(UEqn());
+fvOptions.constrain(UEqn);
 
 if (pimple.momentumPredictor())
 {
-    solve(UEqn() == -fvc::grad(p));
+    solve(UEqn == -fvc::grad(p));
 
     fvOptions.correct(U);
     K = 0.5*magSqr(U);
diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H
index 2f352db5da2523e04eedc4e48ff555c8a665dba6..ac7107acf066722b286275569b0a8b2b39af3e05 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H
@@ -3,15 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
+volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -21,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
         )
     );
@@ -53,13 +51,16 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
index 3d7fffc459bdafe18405cf490478ec33578461fc..713f443fc5dbed1e31266ae52d845518954f36e9 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
@@ -3,14 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
-volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volScalarField rAU(1.0/UEqn.A());
+volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1()));
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -20,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
            /fvc::interpolate(rho)
         )
@@ -64,7 +63,7 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
         )
     );
@@ -76,6 +75,9 @@ else
 
     volScalarField rhorAtU("rhorAtU", rho*rAtU);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
index 33039b3dc99951a483479f471fd70cdf795cee22..7bd540df40d7e4a832824ddf21e4e6c29f312a50 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
@@ -3,15 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
+volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -21,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
         )
     );
@@ -53,13 +51,16 @@ else
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(rho*HbyA) & mesh.Sf())
+        fvc::flux(rho*HbyA)
       + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
     );
 
     fvc::makeRelative(phiHbyA, rho, U);
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         // Pressure corrector
diff --git a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H
index 30a3908b05c3c77b809ddc8341393b0d5de901c8..0a38e05ee9fe6972c1b89aaadfea37e24fc25fd7 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H
@@ -1,5 +1,5 @@
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     const dictionary& pimpleDict = pimple.dict();
 
@@ -38,7 +38,7 @@
         surfaceScalarField phid
         (
             "phid",
-            fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
+            fvc::interpolate(psi)*fvc::flux(U)
         );
 
         rDeltaT.dimensionedInternalField() = max
diff --git a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H
index 396b923494ceec1c3d112ca925ad55343ee9e503..a6f410250bd53abff192ee5aef7a0db525486d92 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(rho, U)
@@ -10,11 +10,12 @@
      ==
         fvOptions(rho, U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
-    solve(UEqn() == -fvc::grad(p));
+    solve(UEqn == -fvc::grad(p));
 
     fvOptions.correct(U);
diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H
index 80f317cd855641711eae395a84020177dd58266c..61cea5c2e51fc4269ca40a742fc26b0ccf71dc89 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H
@@ -69,9 +69,9 @@ dimensionedScalar rhoMin
 );
 
 Info<< "Creating turbulence model\n" << endl;
-autoPtr<compressible::RASModel> turbulence
+autoPtr<compressible::turbulenceModel> turbulence
 (
-    compressible::New<compressible::RASModel>
+    compressible::turbulenceModel::New
     (
         rho,
         U,
diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
index 38c9806ee945492b57cff26756fbf44cd7fb2341..e46f2a6691322c46462cb42961fcbd19ab1c8cc7 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
@@ -1,9 +1,8 @@
 {
-    volScalarField rAU(1.0/UEqn().A());
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
-
-    UEqn.clear();
+    volScalarField rAU(1.0/UEqn.A());
+    surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
+    tUEqn.clear();
 
     bool closedVolume = false;
 
@@ -13,7 +12,7 @@
         (
             "phid",
             fvc::interpolate(psi)
-           *(fvc::interpolate(HbyA) & mesh.Sf())
+           *fvc::flux(HbyA)
         );
 
         MRF.makeRelative(fvc::interpolate(psi), phid);
@@ -23,7 +22,7 @@
             fvScalarMatrix pEqn
             (
                 fvm::div(phid, p)
-              - fvm::laplacian(rho*rAU, p)
+              - fvm::laplacian(rhorAUf, p)
               ==
                 fvOptions(psi, p, rho.name())
             );
@@ -43,22 +42,20 @@
     }
     else
     {
-        surfaceScalarField phiHbyA
-        (
-            "phiHbyA",
-            fvc::interpolate(rho*HbyA) & mesh.Sf()
-        );
-
+        surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
         MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
         closedVolume = adjustPhi(phiHbyA, U, p);
 
+        // Update the pressure BCs to ensure flux consistency
+        constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
         while (simple.correctNonOrthogonal())
         {
             fvScalarMatrix pEqn
             (
                 fvc::div(phiHbyA)
-              - fvm::laplacian(rho*rAU, p)
+              - fvm::laplacian(rhorAUf, p)
               ==
                 fvOptions(psi, p, rho.name())
             );
diff --git a/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H
index 82161f230cd9e4b6e5b7e91cfa2009f4ea7dd137..67b962f80509f800763f0676e21f7fecfcf0e15c 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H
@@ -1,10 +1,7 @@
-volScalarField rAU(1.0/UEqn().A());
-volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
-
-UEqn.clear();
+volScalarField rAU(1.0/UEqn.A());
+volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1()));
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
+tUEqn.clear();
 
 bool closedVolume = false;
 
@@ -14,7 +11,7 @@ if (simple.transonic())
     (
         "phid",
         fvc::interpolate(psi)
-       *(fvc::interpolate(HbyA) & mesh.Sf())
+       *fvc::flux(HbyA)
     );
 
     MRF.makeRelative(fvc::interpolate(psi), phid);
@@ -55,12 +52,7 @@ if (simple.transonic())
 }
 else
 {
-    surfaceScalarField phiHbyA
-    (
-        "phiHbyA",
-        fvc::interpolate(rho*HbyA) & mesh.Sf()
-    );
-
+    surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
     closedVolume = adjustPhi(phiHbyA, U, p);
@@ -70,6 +62,9 @@ else
 
     volScalarField rhorAtU("rhorAtU", rho*rAtU);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
+
     while (simple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H
index fcb8f713d6aade67647af6085455e4b30e4cc702..3ec153c5679eb92661ea038284a0231edba525c8 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(rho, U)
@@ -10,8 +10,9 @@
      ==
         fvOptions(rho, U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
     // Include the porous media resistance and solve the momentum equation
     // either implicit in the tensorial resistance or transport using by
@@ -22,18 +23,18 @@
 
     if (pressureImplicitPorosity)
     {
-        tmp<volTensorField> tTU = tensor(I)*UEqn().A();
-        pZones.addResistance(UEqn(), tTU());
+        tmp<volTensorField> tTU = tensor(I)*UEqn.A();
+        pZones.addResistance(UEqn, tTU.ref());
         trTU = inv(tTU());
-        trTU().rename("rAU");
+        trTU.ref().rename("rAU");
 
-        fvOptions.constrain(UEqn());
+        fvOptions.constrain(UEqn);
 
         volVectorField gradp(fvc::grad(p));
 
         for (int UCorr=0; UCorr<nUCorr; UCorr++)
         {
-            U = trTU() & (UEqn().H() - gradp);
+            U = trTU() & (UEqn.H() - gradp);
         }
         U.correctBoundaryConditions();
 
@@ -41,14 +42,14 @@
     }
     else
     {
-        pZones.addResistance(UEqn());
+        pZones.addResistance(UEqn);
 
-        fvOptions.constrain(UEqn());
+        fvOptions.constrain(UEqn);
 
-        solve(UEqn() == -fvc::grad(p));
+        solve(UEqn == -fvc::grad(p));
 
         fvOptions.correct(U);
 
-        trAU = 1.0/UEqn().A();
-        trAU().rename("rAU");
+        trAU = 1.0/UEqn.A();
+        trAU.ref().rename("rAU");
     }
diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H
index 537eea2ea3754cbaf5fe61a4a1b5f1ac5bd772e8..2fe0e53dbc267f07da3b0c1334c3457aa8eddd1c 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/createFields.H
@@ -68,9 +68,9 @@ dimensionedScalar rhoMin
 );
 
 Info<< "Creating turbulence model\n" << endl;
-autoPtr<compressible::RASModel> turbulence
+autoPtr<compressible::turbulenceModel> turbulence
 (
-    compressible::New<compressible::RASModel>
+    compressible::turbulenceModel::New
     (
         rho,
         U,
diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
index b0af0e3f8b2a20bc7ad4b00e22d6fae2d68b06d9..7b559831614b64ecec5b82ca1fb40b85a1d4e309 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
@@ -1,27 +1,22 @@
 {
     const volScalarField& psi = thermo.psi();
 
-    volVectorField HbyA("HbyA", U);
-
+    tmp<volVectorField> tHbyA;
     if (pressureImplicitPorosity)
     {
-        HbyA = trTU() & UEqn().H();
+        tHbyA = constrainHbyA(trTU()&UEqn.H(), U, p);
     }
     else
     {
-        HbyA = trAU()*UEqn().H();
+        tHbyA = constrainHbyA(trAU()*UEqn.H(), U, p);
     }
+    volVectorField& HbyA = tHbyA.ref();
 
-    UEqn.clear();
+    tUEqn.clear();
 
     bool closedVolume = false;
 
-    surfaceScalarField phiHbyA
-    (
-        "phiHbyA",
-        fvc::interpolate(rho*HbyA) & mesh.Sf()
-    );
-
+    surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
     closedVolume = adjustPhi(phiHbyA, U, p);
@@ -51,13 +46,15 @@
             );
         }
 
-        tpEqn().setReference(pRefCell, pRefValue);
+        fvScalarMatrix& pEqn = tpEqn.ref();
+
+        pEqn.setReference(pRefCell, pRefValue);
 
-        tpEqn().solve();
+        pEqn.solve();
 
         if (simple.finalNonOrthogonalIter())
         {
-            phi = phiHbyA - tpEqn().flux();
+            phi = phiHbyA - pEqn.flux();
         }
     }
 
diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H
index d61808b23cd5a0fd219ea6a079de0317aec06f79..bd553928b16db9d153091432a2ec9f8c046e0443 100644
--- a/applications/solvers/compressible/sonicFoam/pEqn.H
+++ b/applications/solvers/compressible/sonicFoam/pEqn.H
@@ -2,16 +2,13 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
-
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 surfaceScalarField phid
 (
     "phid",
     fvc::interpolate(psi)
    *(
-        (mesh.Sf() & fvc::interpolate(HbyA))
+        fvc::flux(HbyA)
       + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
     )
 );
diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H
index 439709ed077a7b21a2f126463f0e87a995e8a890..92e0bb3673d63f5b379d2b00f07f7f2aef768b5b 100644
--- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H
+++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H
@@ -2,16 +2,13 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
-
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 surfaceScalarField phid
 (
     "phid",
     fvc::interpolate(psi)
    *(
-       (mesh.Sf() & fvc::interpolate(HbyA))
+       fvc::flux(HbyA)
      + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
     )
 );
diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C
index 9fda46121184c6ce8e700a8cf5ea17c7e8a38f45..1b2e272df905a79e1901d4086ed553a1fca3e660 100644
--- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C
+++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
                     "phid",
                     psi
                    *(
-                       (fvc::interpolate(U) & mesh.Sf())
+                       fvc::flux(U)
                      + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
                     )
                 );
diff --git a/applications/solvers/electromagnetics/magneticFoam/magnet.H b/applications/solvers/electromagnetics/magneticFoam/magnet.H
index 031f64ca095a03bb597fdccfd5de42ef5db3d0b8..7e9b04a4c5167922f15f7cbd4852c5921cb0942c 100644
--- a/applications/solvers/electromagnetics/magneticFoam/magnet.H
+++ b/applications/solvers/electromagnetics/magneticFoam/magnet.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ public:
         inline magnet()
         :
             remanence_("Mr", dimensionSet(0, -1, 0, 0, 0, 1, 0), 0),
-            orientation_(vector::zero)
+            orientation_(Zero)
         {}
 
         //- Construct from components
@@ -94,7 +94,7 @@ public:
         inline magnet(Istream& is)
         :
             remanence_("Mr", dimensionSet(0, -1, 0, 0, 0, 1, 0), 0),
-            orientation_(vector::zero)
+            orientation_(Zero)
         {
             is >> *this;
         }
diff --git a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H
index be0fbfaf83daaa53a2d47d107d2b76d010f59f97..268413afec8bb68de68031fb02d1f3a4ccde4f84 100644
--- a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H
+++ b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H
@@ -40,7 +40,7 @@
                 IOobject::NO_READ,
                 IOobject::AUTO_WRITE
             ),
-            (fvc::interpolate(B) & mesh.Sf())
+            fvc::flux(B)
         );
     }
 
diff --git a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C
index 497e977e85a1bd60f1bd5ccd5cc16d5a58616c01..88fd8d36dde18aed59b11cdb0a3134aa34167f83 100644
--- a/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C
+++ b/applications/solvers/electromagnetics/mhdFoam/mhdFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,17 +100,17 @@ int main(int argc, char *argv[])
             {
                 volScalarField rAU(1.0/UEqn.A());
                 surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-                volVectorField HbyA("HbyA", U);
-                HbyA = rAU*UEqn.H();
-
+                volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
                 surfaceScalarField phiHbyA
                 (
                     "phiHbyA",
-                    (fvc::interpolate(HbyA) & mesh.Sf())
+                    fvc::flux(HbyA)
                   + rAUf*fvc::ddtCorr(U, phi)
                 );
 
+                // Update the pressure BCs to ensure flux consistency
+                constrainPressure(p, U, phiHbyA, rAUf);
+
                 while (piso.correctNonOrthogonal())
                 {
                     fvScalarMatrix pEqn
@@ -150,8 +150,7 @@ int main(int argc, char *argv[])
             volScalarField rAB(1.0/BEqn.A());
             surfaceScalarField rABf("rABf", fvc::interpolate(rAB));
 
-            phiB = (fvc::interpolate(B) & mesh.Sf())
-                + rABf*fvc::ddtCorr(B, phiB);
+            phiB = fvc::flux(B) + rABf*fvc::ddtCorr(B, phiB);
 
             while (bpiso.correctNonOrthogonal())
             {
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
index bc348b840e704f619ab162832a1c5af02983d35c..334c0b6db2f4d4e798c886cbd893281b35a6aaee 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,6 @@ Description
 #include "radiationModel.H"
 #include "fvOptions.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H
index b8d07b1f1af76d663fec38173d843392a8cc699a..0916e2788d9412b35e6df9c2b8e4e9eb06fc48c9 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H
@@ -47,9 +47,9 @@ volVectorField U
 #include "readTransportProperties.H"
 
 Info<< "Creating turbulence model\n" << endl;
-autoPtr<incompressible::RASModel> turbulence
+autoPtr<incompressible::turbulenceModel> turbulence
 (
-    incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
+    incompressible::turbulenceModel::New(U, phi, laminarTransport)
 );
 
 // Kinematic density for buoyancy force
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H
index 9ec089ee4c85e38df8afcb7d1dcf1467c493c519..51d9461c87c7c76797c51198594a4b787de8d3d5 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H
@@ -1,31 +1,22 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
 
     surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + rAUf*fvc::ddtCorr(U, phi)
       + phig
     );
 
     MRF.makeRelative(phiHbyA);
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
 
     while (pimple.correctNonOrthogonal())
     {
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H
index 72bf78c7fb113ed244743a5faf7d01813a21dd66..d8a347f87d73f3524052bc597bdb416fb0b50cf9 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(U)
@@ -10,16 +10,17 @@
      ==
         fvOptions(U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
     if (simple.momentumPredictor())
     {
         solve
         (
-            UEqn()
+            UEqn
           ==
             fvc::reconstruct
             (
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C
index 8547f274fa52cb1786f66adf43e3b1e6265f689a..38af1c5cdc9835c1272bad7ed8cae7f135792618 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,6 @@ Description
 #include "radiationModel.H"
 #include "fvOptions.H"
 #include "simpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
index 014bf8045cce74156f39073ed08ae39f2c216c83..e78daa67b3044a3e314d50f851ade362508d7838 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
@@ -47,9 +47,9 @@ volVectorField U
 #include "readTransportProperties.H"
 
 Info<< "Creating turbulence model\n" << endl;
-autoPtr<incompressible::RASModel> turbulence
+autoPtr<incompressible::turbulenceModel> turbulence
 (
-    incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
+    incompressible::turbulenceModel::New(U, phi, laminarTransport)
 );
 
 // Kinematic density for buoyancy force
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H
index b6d80673584008c5f794e451cc79e8d5020770ed..f29075b14913a955fa84a47f912d072e9d079c05 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H
@@ -1,17 +1,16 @@
 {
-    volScalarField rAU("rAU", 1.0/UEqn().A());
+    volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
 
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
-    UEqn.clear();
+    tUEqn.clear();
 
     surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
     );
 
     MRF.makeRelative(phiHbyA);
@@ -20,15 +19,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
 
     while (simple.correctNonOrthogonal())
     {
diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C
index 5437e7f6259775b787fcc4ebeb8955a9aaaeea29..ef952f00c414ca8d18a3c5084c8774fc6bd28134 100644
--- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C
+++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,6 @@ Description
 #include "radiationModel.H"
 #include "fvOptions.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
index 76b4925917a3b5d61f1fb98403aa6a29b1161f32..cda60d98b2c1428cbe24552cdea5a1f11eeaee73 100644
--- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
+++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
@@ -11,35 +11,25 @@
     thermo.rho() -= psi*p_rgh;
 
     volScalarField rAU(1.0/UEqn.A());
-    surfaceScalarField rAUf("rAUf", fvc::interpolate(rho*rAU));
+    surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
 
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
-    surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
+    surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
-          + rAUf*fvc::ddtCorr(rho, U, phi)
+            fvc::flux(rho*HbyA)
+          + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
       + phig
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-           *rho.boundaryField()
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
     tmp<fvScalarMatrix> p_rghDDtEqn
     (
@@ -51,6 +41,7 @@
         p_rghDDtEqn =
         (
             fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+          + fvc::div(phiHbyA)
         ==
             fvOptions(psi, p_rgh, rho.name())
         );
@@ -61,8 +52,7 @@
         fvScalarMatrix p_rghEqn
         (
             p_rghDDtEqn()
-          + fvc::div(phiHbyA)
-          - fvm::laplacian(rAUf, p_rgh)
+          - fvm::laplacian(rhorAUf, p_rgh)
         );
 
         p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
@@ -77,7 +67,7 @@
 
             // Correct the momentum source with the pressure gradient flux
             // calculated from the relaxed pressure
-            U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf);
+            U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
             U.correctBoundaryConditions();
             fvOptions.correct(U);
             K = 0.5*magSqr(U);
diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H
index 04796b475430a3ed53bbb72a47de0a01e66af4d6..1a47d06a8e8255150a6fc9d6887a1a7fbc833900 100644
--- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H
+++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(rho, U)
@@ -10,16 +10,17 @@
      ==
         fvOptions(rho, U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
     if (simple.momentumPredictor())
     {
         solve
         (
-            UEqn()
+            UEqn
          ==
             fvc::reconstruct
             (
diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
index 6aa339f56eab22a5588d386b15313a6636c24adc..d4e44bd888ec707bb725799147befb3ae8f94efc 100644
--- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
+++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,6 @@ Description
 #include "radiationModel.H"
 #include "simpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
index 2d08a681ed412330e1ea3003ed19d1719e4d534f..647cf954bb2d5168adc098f00764a368c5af1608 100644
--- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
+++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
@@ -2,19 +2,17 @@
     rho = thermo.rho();
     rho.relax();
 
-    volScalarField rAU("rAU", 1.0/UEqn().A());
+    volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
-    UEqn.clear();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
+    tUEqn.clear();
 
     surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(rho*HbyA) & mesh.Sf())
+        fvc::flux(rho*HbyA)
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
@@ -23,16 +21,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-           *rho.boundaryField()
-        )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
 
     while (simple.correctNonOrthogonal())
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
index 34fcad63b7e98e95b0e1ecd79ab4ee4e3c9a6ee9..05191cd12aa40a26ba2b91040143097826e68f24 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,6 @@ Description
 #include "radiationModel.H"
 #include "fvOptions.H"
 #include "coordinateSystem.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
index 263dae535e2bdb96defd7314cce5569449cbb2de..0c1604505a4c7730ad3695e9b093271a1a4d9bbf 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,6 @@ Description
 #include "radiationModel.H"
 #include "fvOptions.H"
 #include "coordinateSystem.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H
index b65ef6bfdb2831ec71b687021dc754a20b77107b..ed0402c2d0287d24fa0395ac801038899b43cc3c 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(rho, U)
@@ -10,14 +10,15 @@
      ==
         fvOptions(rho, U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
     solve
     (
-        UEqn()
+        UEqn
      ==
         fvc::reconstruct
         (
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H
index ccae3cc079c74d0e40298ffd489a93263a144044..7fe544d6a57afe68850f81d39483f79c02f10660 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H
@@ -4,19 +4,17 @@
     rho = min(rho, rhoMax[i]);
     rho.relax();
 
-    volScalarField rAU("rAU", 1.0/UEqn().A());
+    volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
-    UEqn.clear();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
+    tUEqn.clear();
 
     surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(rho*HbyA) & mesh.Sf())
+        fvc::flux(rho*HbyA)
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
@@ -25,16 +23,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-           *rho.boundaryField()
-        )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
     dimensionedScalar compressibility = fvc::domainIntegrate(psi);
     bool compressible = (compressibility.value() > SMALL);
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H
index 563ad65eba2e0d9c0083de8d4cf79831d3804c5e..a12d0e8146703889de6ac56ff3963b44b32d3d21 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::ddt(rho, U) + fvm::div(phi, U)
       + MRF.DDt(rho, U)
@@ -10,16 +10,17 @@
      ==
         fvOptions(rho, U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
     if (momentumPredictor)
     {
         solve
         (
-            UEqn()
+            UEqn
           ==
             fvc::reconstruct
             (
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H
index fa5feefbb4beba6e440298d46723e06734d8f0c0..82dc8758475a26bb6907f3ba54448e40ca95f012 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H
@@ -15,7 +15,7 @@
         );
     }
 /*
-    forAll (porousFluidRegions, porousI)
+    forAll(porousFluidRegions, porousI)
     {
         CoNum = max
         (
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
index cd42cc00fdfd49722907ed4d585f06dfbf130e3e..d5ba5ca24080711f9df100c767cfbc10470dcb2a 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
@@ -5,11 +5,9 @@
 
     rho = thermo.rho();
 
-    volScalarField rAU("rAU", 1.0/UEqn().A());
+    volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
 
     surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
@@ -17,7 +15,7 @@
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
       + phig
@@ -25,16 +23,8 @@
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-           *rho.boundaryField()
-        )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
     tmp<fvScalarMatrix> p_rghDDtEqn
     (
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
index 10e9aa08abbbb03c732ad7df0aee0d67810f3c1b..3c38dc19ae58d456ea6df99e9626287129274fe5 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
@@ -55,7 +55,7 @@
                     (
                         "zero",
                         tkappaByCp().dimensions(),
-                        symmTensor::zero
+                        Zero
                     ),
                     zeroGradientFvPatchSymmTensorField::typeName
                 )
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H
index 49fd39e45b78e2a7ad389897076677352afdc1ee..30a670768fff800ad521fc9e03c4d990584691d3 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H
@@ -6,7 +6,7 @@ if (finalIter)
 {
     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
-        tmp<fvScalarMatrix> hEqn
+        fvScalarMatrix hEqn
         (
             fvm::ddt(betav*rho, h)
           - (
@@ -18,11 +18,11 @@ if (finalIter)
             fvOptions(rho, h)
         );
 
-        hEqn().relax();
+        hEqn.relax();
 
-        fvOptions.constrain(hEqn());
+        fvOptions.constrain(hEqn);
 
-        hEqn().solve(mesh.solver(h.select(finalIter)));
+        hEqn.solve(mesh.solver(h.select(finalIter)));
 
         fvOptions.correct(h);
     }
diff --git a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
index cfc392325686d29e8f6dd75b54d9294b77f54c93..9edefc0c2c05966047cdae1dae1d258a885997e8 100644
--- a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
+++ b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
@@ -1,12 +1,14 @@
     Info<< "Creating turbulence model\n" << endl;
     tmp<volScalarField> talphaEff;
 
-    IOobject turbulenceHeader
+    IOobject turbulencePropertiesHeader
     (
         "turbulenceProperties",
         runTime.constant(),
         mesh,
-        IOobject::MUST_READ
+        IOobject::MUST_READ_IF_MODIFIED,
+        IOobject::NO_WRITE,
+        false
     );
 
     IOobject RASHeader
@@ -25,7 +27,7 @@
         IOobject::MUST_READ
     );
 
-    if (turbulenceHeader.typeHeaderOk<IOdictionary>(true))
+    if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(true))
     {
         autoPtr<compressible::turbulenceModel> turbulence
         (
diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C
index 74fcec0eb3950a48c53229a59aa6ce07878dcaee..eb59824dc306d2865d84ba14fc9e7a4dfb1c6e89 100644
--- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C
+++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ void zeroCells
 {
     forAll(cells, i)
     {
-        vf[cells[i]] = pTraits<Type>::zero;
+        vf[cells[i]] = Zero;
     }
 }
 
@@ -110,7 +110,7 @@ int main(int argc, char *argv[])
         {
             // Momentum predictor
 
-            tmp<fvVectorMatrix> UEqn
+            tmp<fvVectorMatrix> tUEqn
             (
                 fvm::div(phi, U)
               + turbulence->divDevReff(U)
@@ -118,26 +118,25 @@ int main(int argc, char *argv[])
              ==
                 fvOptions(U)
             );
+            fvVectorMatrix& UEqn = tUEqn.ref();
 
-            UEqn().relax();
+            UEqn.relax();
 
-            fvOptions.constrain(UEqn());
+            fvOptions.constrain(UEqn);
 
-            solve(UEqn() == -fvc::grad(p));
+            solve(UEqn == -fvc::grad(p));
 
             fvOptions.correct(U);
 
-            volScalarField rAU(1.0/UEqn().A());
-            volVectorField HbyA("HbyA", U);
-            HbyA = rAU*UEqn().H();
-            UEqn.clear();
-            surfaceScalarField phiHbyA
-            (
-                "phiHbyA",
-                fvc::interpolate(HbyA) & mesh.Sf()
-            );
+            volScalarField rAU(1.0/UEqn.A());
+            volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
+            tUEqn.clear();
+            surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
             adjustPhi(phiHbyA, U, p);
 
+            // Update the pressure BCs to ensure flux consistency
+            constrainPressure(p, U, phiHbyA, rAU);
+
             // Non-orthogonal pressure corrector loop
             while (simple.correctNonOrthogonal())
             {
@@ -175,13 +174,13 @@ int main(int argc, char *argv[])
             //(
             //    fvc::reconstruct
             //    (
-            //        mesh.magSf()*(fvc::snGrad(Ua) & fvc::interpolate(U))
+            //        mesh.magSf()*fvc::dotInterpolate(fvc::snGrad(Ua), U)
             //    )
             //);
 
             zeroCells(adjointTransposeConvection, inletCells);
 
-            tmp<fvVectorMatrix> UaEqn
+            tmp<fvVectorMatrix> tUaEqn
             (
                 fvm::div(-phi, Ua)
               - adjointTransposeConvection
@@ -190,24 +189,21 @@ int main(int argc, char *argv[])
              ==
                 fvOptions(Ua)
             );
+            fvVectorMatrix& UaEqn = tUaEqn.ref();
 
-            UaEqn().relax();
+            UaEqn.relax();
 
-            fvOptions.constrain(UaEqn());
+            fvOptions.constrain(UaEqn);
 
-            solve(UaEqn() == -fvc::grad(pa));
+            solve(UaEqn == -fvc::grad(pa));
 
             fvOptions.correct(Ua);
 
-            volScalarField rAUa(1.0/UaEqn().A());
+            volScalarField rAUa(1.0/UaEqn.A());
             volVectorField HbyAa("HbyAa", Ua);
-            HbyAa = rAUa*UaEqn().H();
-            UaEqn.clear();
-            surfaceScalarField phiHbyAa
-            (
-                "phiHbyAa",
-                fvc::interpolate(HbyAa) & mesh.Sf()
-            );
+            HbyAa = rAUa*UaEqn.H();
+            tUaEqn.clear();
+            surfaceScalarField phiHbyAa("phiHbyAa", fvc::flux(HbyAa));
             adjustPhi(phiHbyAa, Ua, pa);
 
             // Non-orthogonal pressure corrector loop
diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H
index cb7da73687187509e5fad7d48801c4acc5c6fb68..93da72123d65d759c4b0b5f94652471b1d6b4925 100644
--- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H
+++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H
@@ -80,9 +80,9 @@ mesh.setFluxRequired(pa.name());
 
 singlePhaseTransportModel laminarTransport(U, phi);
 
-autoPtr<incompressible::RASModel> turbulence
+autoPtr<incompressible::turbulenceModel> turbulence
 (
-    incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
+    incompressible::turbulenceModel::New(U, phi, laminarTransport)
 );
 
 
diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H
index 5ecfebfcb4023a49a58c535e41d609d63853da04..dff4b701f589ab06eea23d34826baeebe03c2e5f 100644
--- a/applications/solvers/incompressible/boundaryFoam/createFields.H
+++ b/applications/solvers/incompressible/boundaryFoam/createFields.H
@@ -31,9 +31,9 @@ surfaceScalarField phi
 
 singlePhaseTransportModel laminarTransport(U, phi);
 
-autoPtr<incompressible::RASModel> turbulence
+autoPtr<incompressible::turbulenceModel> turbulence
 (
-    incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
+    incompressible::turbulenceModel::New(U, phi, laminarTransport)
 );
 
 dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport);
@@ -45,5 +45,5 @@ dimensionedVector gradP
 (
     "gradP",
     dimensionSet(0, 1, -2, 0, 0),
-    vector::zero
+    Zero
 );
diff --git a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
index 513ca54a42f3a69f1c4ade53188dfe6600315e9a..ca337512dc4c4159c569377398df918de2b124ab 100644
--- a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
+++ b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
@@ -3,7 +3,7 @@
 label faceId(-1);
 label patchId(-1);
 label nWallFaces(0);
-vector wallNormal(vector::zero);
+vector wallNormal(Zero);
 
 const fvPatchList& patches = mesh.boundary();
 
diff --git a/applications/solvers/incompressible/icoFoam/icoFoam.C b/applications/solvers/incompressible/icoFoam/icoFoam.C
index a7d0da4a8a2f5ba4731a2ac8cf2cae05e144efca..dc3644fb9f1000df67ff698dd7ccab2b8f9dd575 100644
--- a/applications/solvers/incompressible/icoFoam/icoFoam.C
+++ b/applications/solvers/incompressible/icoFoam/icoFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,18 +104,19 @@ int main(int argc, char *argv[])
         while (piso.correct())
         {
             volScalarField rAU(1.0/UEqn.A());
-
-            volVectorField HbyA("HbyA", U);
-            HbyA = rAU*UEqn.H();
+            volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
             surfaceScalarField phiHbyA
             (
                 "phiHbyA",
-                (fvc::interpolate(HbyA) & mesh.Sf())
+                fvc::flux(HbyA)
               + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
             );
 
             adjustPhi(phiHbyA, U, p);
 
+            // Update the pressure BCs to ensure flux consistency
+            constrainPressure(p, U, phiHbyA, rAU);
+
             // Non-orthogonal pressure corrector loop
             while (piso.correctNonOrthogonal())
             {
diff --git a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C
index e1153a2772a855fa572340e5cd23f56e3af03161..b505329aa31e48e6327946d2cb2fc7d6ad563130 100644
--- a/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C
+++ b/applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,18 +80,19 @@ int main(int argc, char *argv[])
         while (piso.correct())
         {
             volScalarField rAU(1.0/UEqn.A());
-
-            volVectorField HbyA("HbyA", U);
-            HbyA = rAU*UEqn.H();
+            volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
             surfaceScalarField phiHbyA
             (
                 "phiHbyA",
-                (fvc::interpolate(HbyA) & mesh.Sf())
+                fvc::flux(HbyA)
               + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
             );
 
             adjustPhi(phiHbyA, U, p);
 
+            // Update the pressure BCs to ensure flux consistency
+            constrainPressure(p, U, phiHbyA, rAU);
+
             // Non-orthogonal pressure corrector loop
             while (piso.correctNonOrthogonal())
             {
diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H
index 5aa6cef0b147a6126a32a94c420f4bceb88d9ccd..0d55edd5a0892235ac482e9cfc360968d92d6873 100644
--- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H
@@ -1,5 +1,5 @@
     // Relative momentum predictor
-    tmp<fvVectorMatrix> UrelEqn
+    tmp<fvVectorMatrix> tUrelEqn
     (
         fvm::ddt(Urel)
       + fvm::div(phi, Urel)
@@ -8,11 +8,12 @@
      ==
         fvOptions(Urel)
     );
+    fvVectorMatrix& UrelEqn = tUrelEqn.ref();
 
-    UrelEqn().relax();
+    UrelEqn.relax();
 
-    fvOptions.constrain(UrelEqn());
+    fvOptions.constrain(UrelEqn);
 
-    solve(UrelEqn() == -fvc::grad(p));
+    solve(UrelEqn == -fvc::grad(p));
 
     fvOptions.correct(Urel);
diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
index d305d1a2614b9b8cb740c6ab146ddfd707410918..3cb0580ba465828c513bfb1fb07a4b6af7e9335b 100644
--- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
@@ -1,11 +1,11 @@
-volScalarField rAUrel(1.0/UrelEqn().A());
+volScalarField rAUrel(1.0/UrelEqn.A());
 volVectorField HbyA("HbyA", Urel);
-HbyA = rAUrel*UrelEqn().H();
+HbyA = rAUrel*UrelEqn.H();
 
 surfaceScalarField phiHbyA
 (
     "phiHbyA",
-    (fvc::interpolate(HbyA) & mesh.Sf())
+    fvc::flux(HbyA)
   + fvc::interpolate(rAUrel)*fvc::ddtCorr(Urel, phi)
 );
 
@@ -15,7 +15,7 @@ tmp<volScalarField> rAtUrel(rAUrel);
 
 if (pimple.consistent())
 {
-    rAtUrel = 1.0/max(1.0/rAUrel - UrelEqn().H1(), 0.1/rAUrel);
+    rAtUrel = 1.0/max(1.0/rAUrel - UrelEqn.H1(), 0.1/rAUrel);
     phiHbyA +=
         fvc::interpolate(rAtUrel() - rAUrel)*fvc::snGrad(p)*mesh.magSf();
     HbyA -= (rAUrel - rAtUrel())*fvc::grad(p);
@@ -23,9 +23,12 @@ if (pimple.consistent())
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UrelEqn.clear();
+    tUrelEqn.clear();
 }
 
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p, Urel, phiHbyA, rAtUrel());
+
 // Non-orthogonal pressure corrector loop
 while (pimple.correctNonOrthogonal())
 {
diff --git a/applications/solvers/incompressible/pimpleFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/UEqn.H
index 880c0066e363ad1dee9c52b4b86cf1d844fad65a..1a6b404885a6f8648ae02cae50e3f57f7b4d6c99 100644
--- a/applications/solvers/incompressible/pimpleFoam/UEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(U) + fvm::div(phi, U)
   + MRF.DDt(U)
@@ -10,14 +10,15 @@ tmp<fvVectorMatrix> UEqn
  ==
     fvOptions(U)
 );
+fvVectorMatrix& UEqn = tUEqn.ref();
 
-UEqn().relax();
+UEqn.relax();
 
-fvOptions.constrain(UEqn());
+fvOptions.constrain(UEqn);
 
 if (pimple.momentumPredictor())
 {
-    solve(UEqn() == -fvc::grad(p));
+    solve(UEqn == -fvc::grad(p));
 
     fvOptions.correct(U);
 }
diff --git a/applications/solvers/incompressible/pimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pEqn.H
index 18083aa810f548cb01e58108103e8a3ec46d9816..c8d02ed281ce706383df8fd39cb914da288daf12 100644
--- a/applications/solvers/incompressible/pimpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/pEqn.H
@@ -1,11 +1,9 @@
-volScalarField rAU(1.0/UEqn().A());
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
-
+volScalarField rAU(1.0/UEqn.A());
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 surfaceScalarField phiHbyA
 (
     "phiHbyA",
-    (fvc::interpolate(HbyA) & mesh.Sf())
+    fvc::flux(HbyA)
   + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
 );
 
@@ -17,7 +15,7 @@ tmp<volScalarField> rAtU(rAU);
 
 if (pimple.consistent())
 {
-    rAtU = 1.0/max(1.0/rAU - UEqn().H1(), 0.1/rAU);
+    rAtU = 1.0/max(1.0/rAU - UEqn.H1(), 0.1/rAU);
     phiHbyA +=
         fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
     HbyA -= (rAU - rAtU())*fvc::grad(p);
@@ -25,20 +23,11 @@ if (pimple.consistent())
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
-surfaceScalarField rAUf("rAUf", fvc::interpolate(rAtU()));
-
-// Update the fixedFluxPressure BCs to ensure flux consistency
-setSnGrad<fixedFluxPressureFvPatchScalarField>
-(
-    p.boundaryField(),
-    (
-        phiHbyA.boundaryField()
-      - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-    )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-);
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p, U, phiHbyA, rAtU(), MRF);
 
 // Non-orthogonal pressure corrector loop
 while (pimple.correctNonOrthogonal())
@@ -46,7 +35,7 @@ while (pimple.correctNonOrthogonal())
     // Pressure corrector
     fvScalarMatrix pEqn
     (
-        fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
+        fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA)
     );
 
     pEqn.setReference(pRefCell, pRefValue);
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
index 5b5fe720ad8fc9834d304f24a5c63928a6b1424c..a53391a90bbdf070db5e42dd5cc6a381dd02cc1e 100644
--- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
@@ -1,11 +1,9 @@
-volScalarField rAU(1.0/UEqn().A());
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
-
+volScalarField rAU(1.0/UEqn.A());
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 surfaceScalarField phiHbyA
 (
     "phiHbyA",
-    (fvc::interpolate(HbyA) & mesh.Sf())
+    fvc::flux(HbyA)
   + fvc::interpolate(rAU)*fvc::ddtCorr(U, Uf)
 );
 
@@ -22,7 +20,7 @@ tmp<volScalarField> rAtU(rAU);
 
 if (pimple.consistent())
 {
-    rAtU = 1.0/max(1.0/rAU - UEqn().H1(), 0.1/rAU);
+    rAtU = 1.0/max(1.0/rAU - UEqn.H1(), 0.1/rAU);
     phiHbyA +=
         fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
     HbyA -= (rAU - rAtU())*fvc::grad(p);
@@ -30,27 +28,18 @@ if (pimple.consistent())
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
-surfaceScalarField rAUf("rAUf", fvc::interpolate(rAtU()));
-
-// Update the fixedFluxPressure BCs to ensure flux consistency
-setSnGrad<fixedFluxPressureFvPatchScalarField>
-(
-    p.boundaryField(),
-    (
-        phiHbyA.boundaryField()
-      - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-    )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-);
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p, U, phiHbyA, rAtU(), MRF);
 
 // Non-orthogonal pressure corrector loop
 while (pimple.correctNonOrthogonal())
 {
     fvScalarMatrix pEqn
     (
-        fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
+        fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA)
     );
 
     pEqn.setReference(pRefCell, pRefValue);
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C
index deb266dd3d0553a71eadb731b5b8c20dd4b28ef7..dda9335d45a880e5f3069b6181d55b824550270c 100644
--- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,6 @@ Description
 #include "pimpleControl.H"
 #include "CorrectPhi.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C
index 5a56b2b0ef0b04b58bc2edf59edcfcac47c1ea72..6b982114303024c9264289834ba20a663da8fec8 100644
--- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,6 @@ Description
 #include "turbulentTransportModel.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/incompressible/pisoFoam/pEqn.H b/applications/solvers/incompressible/pisoFoam/pEqn.H
index f8c5a4597805a6990d1280ce396b11e2d08be92a..05c34376ece0c21e97e8558f46daaa64b17c7ff0 100644
--- a/applications/solvers/incompressible/pisoFoam/pEqn.H
+++ b/applications/solvers/incompressible/pisoFoam/pEqn.H
@@ -1,10 +1,9 @@
 volScalarField rAU(1.0/UEqn.A());
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 surfaceScalarField phiHbyA
 (
     "phiHbyA",
-    (fvc::interpolate(HbyA) & mesh.Sf())
+    fvc::flux(HbyA)
   + fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
 );
 
@@ -12,6 +11,9 @@ MRF.makeRelative(phiHbyA);
 
 adjustPhi(phiHbyA, U, p);
 
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p, U, phiHbyA, rAU, MRF);
+
 // Non-orthogonal pressure corrector loop
 while (piso.correctNonOrthogonal())
 {
diff --git a/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C b/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C
index e7693a073edd0f184f3c347e653f7b40a295fd6b..6dd8defc26eb487ff63e14582129985b95b4a2a3 100644
--- a/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C
+++ b/applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
                 surfaceScalarField phiHbyA
                 (
                     "phiHbyA",
-                    (fvc::interpolate(HbyA) & mesh.Sf())
+                    fvc::flux(HbyA)
                   + fvc::interpolate(rAU)*fvc::ddtCorr(h, hU, phi)
                   - phih0
                 );
diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H
index 75df41d00b62a2a023c2972e014dfba5b78e355f..5e1b141030b3d09f19a189167dd3bf1c65e0d039 100644
--- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H
@@ -1,6 +1,6 @@
     // Relative momentum predictor
 
-    tmp<fvVectorMatrix> UrelEqn
+    tmp<fvVectorMatrix> tUrelEqn
     (
         fvm::div(phi, Urel)
       + turbulence->divDevReff(Urel)
@@ -8,11 +8,15 @@
      ==
         fvOptions(Urel)
     );
+    fvVectorMatrix& UrelEqn = tUrelEqn.ref();
 
-    UrelEqn().relax();
+    UrelEqn.relax();
 
-    fvOptions.constrain(UrelEqn());
+    fvOptions.constrain(UrelEqn);
 
-    solve(UrelEqn() == -fvc::grad(p));
+    if (simple.momentumPredictor())
+    {
+        solve(UrelEqn == -fvc::grad(p));
 
-    fvOptions.correct(Urel);
+        fvOptions.correct(Urel);
+    }
diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H
index 5658b68ec67661b8a416374f47829fb0a2a9cd2d..ea565f09496f4c8e8f7bf654d7829d037089401b 100644
--- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H
+++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/createFields.H
@@ -64,7 +64,7 @@ volVectorField U
 
 singlePhaseTransportModel laminarTransport(U, phi);
 
-autoPtr<incompressible::RASModel> turbulence
+autoPtr<incompressible::turbulenceModel> turbulence
 (
-    incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
+    incompressible::turbulenceModel::New(U, phi, laminarTransport)
 );
diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H
index 50691c015497b9519fd0392ea860fb13b2c47cc4..e92838716c32a974284f571527ab4a04b324932d 100644
--- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H
@@ -1,22 +1,25 @@
 {
-    volScalarField rAUrel(1.0/UrelEqn().A());
+    volScalarField rAUrel(1.0/UrelEqn.A());
     volVectorField HbyA("HbyA", Urel);
-    HbyA = rAUrel*UrelEqn().H();
+    HbyA = rAUrel*UrelEqn.H();
 
-    surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
+    surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
     adjustPhi(phiHbyA, Urel, p);
 
     tmp<volScalarField> rAtUrel(rAUrel);
 
     if (simple.consistent())
     {
-        rAtUrel = 1.0/(1.0/rAUrel - UrelEqn().H1());
+        rAtUrel = 1.0/(1.0/rAUrel - UrelEqn.H1());
         phiHbyA +=
             fvc::interpolate(rAtUrel() - rAUrel)*fvc::snGrad(p)*mesh.magSf();
         HbyA -= (rAUrel - rAtUrel())*fvc::grad(p);
     }
 
-    UrelEqn.clear();
+    tUrelEqn.clear();
+
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, Urel, phiHbyA, rAtUrel());
 
     // Non-orthogonal pressure corrector loop
     while (simple.correctNonOrthogonal())
diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H
index 12b5621636669765be3e4919fdaab45771e94b11..81e83b55d7a34882c3748f744e7255805f424dee 100644
--- a/applications/solvers/incompressible/simpleFoam/UEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(U)
@@ -10,11 +10,15 @@
      ==
         fvOptions(U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
-    solve(UEqn() == -fvc::grad(p));
+    if (simple.momentumPredictor())
+    {
+        solve(UEqn == -fvc::grad(p));
 
-    fvOptions.correct(U);
+        fvOptions.correct(U);
+    }
diff --git a/applications/solvers/incompressible/simpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/pEqn.H
index 4438a3bff52228a9e402e04fc515642ea69aceee..7e394e9c10b0633262cbaee38e949c747e785116 100644
--- a/applications/solvers/incompressible/simpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/pEqn.H
@@ -1,9 +1,7 @@
 {
-    volScalarField rAU(1.0/UEqn().A());
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
-
-    surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
+    volScalarField rAU(1.0/UEqn.A());
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
+    surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
     MRF.makeRelative(phiHbyA);
     adjustPhi(phiHbyA, U, p);
 
@@ -11,13 +9,16 @@
 
     if (simple.consistent())
     {
-        rAtU = 1.0/(1.0/rAU - UEqn().H1());
+        rAtU = 1.0/(1.0/rAU - UEqn.H1());
         phiHbyA +=
             fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
         HbyA -= (rAU - rAtU())*fvc::grad(p);
     }
 
-    UEqn.clear();
+    tUEqn.clear();
+
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, U, phiHbyA, rAtU(), MRF);
 
     // Non-orthogonal pressure corrector loop
     while (simple.correctNonOrthogonal())
diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H
index 035b83ebd1bb2d416c82c1287db90b1a669f0f5b..e2c9917d5ae19cbd85ed692c3620b65b643e72fe 100644
--- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(U)
@@ -10,8 +10,9 @@
       ==
         fvOptions(U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
     // Include the porous media resistance and solve the momentum equation
     // either implicit in the tensorial resistance or transport using by
@@ -22,18 +23,18 @@
 
     if (pressureImplicitPorosity)
     {
-        tmp<volTensorField> tTU = tensor(I)*UEqn().A();
-        pZones.addResistance(UEqn(), tTU());
+        tmp<volTensorField> tTU = tensor(I)*UEqn.A();
+        pZones.addResistance(UEqn, tTU.ref());
         trTU = inv(tTU());
-        trTU().rename("rAU");
+        trTU.ref().rename("rAU");
 
-        fvOptions.constrain(UEqn());
+        fvOptions.constrain(UEqn);
 
         volVectorField gradp(fvc::grad(p));
 
         for (int UCorr=0; UCorr<nUCorr; UCorr++)
         {
-            U = trTU() & (UEqn().H() - gradp);
+            U = trTU() & (UEqn.H() - gradp);
         }
         U.correctBoundaryConditions();
 
@@ -41,14 +42,14 @@
     }
     else
     {
-        pZones.addResistance(UEqn());
+        pZones.addResistance(UEqn);
 
-        fvOptions.constrain(UEqn());
+        fvOptions.constrain(UEqn);
 
-        solve(UEqn() == -fvc::grad(p));
+        solve(UEqn == -fvc::grad(p));
 
         fvOptions.correct(U);
 
-        trAU = 1.0/UEqn().A();
-        trAU().rename("rAU");
+        trAU = 1.0/UEqn.A();
+        trAU.ref().rename("rAU");
     }
diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
index b4a0f2e668ec7a66c45c539e1d86df6c5894f9b7..c76143714ec228016218207ed8be81e186904c67 100644
--- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
@@ -1,15 +1,16 @@
-volVectorField HbyA("HbyA", U);
+tmp<volVectorField> tHbyA;
 if (pressureImplicitPorosity)
 {
-    HbyA = trTU()&UEqn().H();
+    tHbyA = constrainHbyA(trTU()&UEqn.H(), U, p);
 }
 else
 {
-    HbyA = trAU()*UEqn().H();
+    tHbyA = constrainHbyA(trAU()*UEqn.H(), U, p);
 }
+volVectorField& HbyA = tHbyA.ref();
 
-UEqn.clear();
-surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
+tUEqn.clear();
+surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
 
 MRF.makeRelative(phiHbyA);
 
@@ -28,13 +29,15 @@ while (simple.correctNonOrthogonal())
         tpEqn = (fvm::laplacian(trAU(), p) == fvc::div(phiHbyA));
     }
 
-    tpEqn().setReference(pRefCell, pRefValue);
+    fvScalarMatrix pEqn = tpEqn.ref();
 
-    tpEqn().solve();
+    pEqn.setReference(pRefCell, pRefValue);
+
+    pEqn.solve();
 
     if (simple.finalNonOrthogonalIter())
     {
-        phi = phiHbyA - tpEqn().flux();
+        phi = phiHbyA - pEqn.flux();
     }
 }
 
diff --git a/applications/solvers/lagrangian/DPMFoam/Allwmake b/applications/solvers/lagrangian/DPMFoam/Allwmake
index 8a47fb1b346d1827ebbc9f268957895ed5738590..f3f30648d50628f8f6f54ff200cc6639f9c90140 100755
--- a/applications/solvers/lagrangian/DPMFoam/Allwmake
+++ b/applications/solvers/lagrangian/DPMFoam/Allwmake
@@ -1,8 +1,11 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso DPMTurbulenceModels
+wmake $targetType DPMTurbulenceModels
 wmake
 wmake MPPICFoam
diff --git a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C
index 22c16b4c80e4c88ed8aa0abc21b2b5c346fc5c30..d539b1bbdbece2a653f10f386c774bfdeaba3533 100644
--- a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C
+++ b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,6 @@ Description
 #include "singlePhaseTransportModel.H"
 #include "PhaseIncompressibleTurbulenceModel.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 #ifdef MPPIC
     #include "basicKinematicMPPICCloud.H"
@@ -106,14 +105,14 @@ int main(int argc, char *argv[])
             (
                 "0",
                 cloudSU.dimensions()/dimVolume,
-                vector::zero
+                Zero
             ),
             zeroGradientFvPatchVectorField::typeName
         );
 
         cloudVolSUSu.internalField() = -cloudSU.source()/mesh.V();
         cloudVolSUSu.correctBoundaryConditions();
-        cloudSU.source() = vector::zero;
+        cloudSU.source() = Zero;
 
         // --- Pressure-velocity PIMPLE corrector loop
         while (pimple.loop())
diff --git a/applications/solvers/lagrangian/DPMFoam/UcEqn.H b/applications/solvers/lagrangian/DPMFoam/UcEqn.H
index 0bd4a7146d491806f94ddab676670bf331d835ba..d31bead5e10e16ea095e99a2b747bcd7e27c7c9c 100644
--- a/applications/solvers/lagrangian/DPMFoam/UcEqn.H
+++ b/applications/solvers/lagrangian/DPMFoam/UcEqn.H
@@ -14,8 +14,7 @@ surfaceScalarField rAUcf("Dp", fvc::interpolate(rAUc));
 
 surfaceScalarField phicForces
 (
-   (fvc::interpolate(rAUc*cloudVolSUSu/rhoc) & mesh.Sf())
- + rAUcf*(g & mesh.Sf())
+   fvc::flux(rAUc*cloudVolSUSu/rhoc) + rAUcf*(g & mesh.Sf())
 );
 
 if (pimple.momentumPredictor())
diff --git a/applications/solvers/lagrangian/DPMFoam/createFields.H b/applications/solvers/lagrangian/DPMFoam/createFields.H
index 9e34895a73fda17317aabfce78293ab62b6ffc3b..6c08de4b8ed9fce5e3e640e09b0b9a99a97ae912 100644
--- a/applications/solvers/lagrangian/DPMFoam/createFields.H
+++ b/applications/solvers/lagrangian/DPMFoam/createFields.H
@@ -151,7 +151,7 @@ alphac.correctBoundaryConditions();
 surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
 surfaceScalarField alphaPhic("alphaPhic", alphacf*phic);
 
-autoPtr<PhaseIncompressibleTurbulenceModel<singlePhaseTransportModel> >
+autoPtr<PhaseIncompressibleTurbulenceModel<singlePhaseTransportModel>>
 continuousPhaseTurbulence
 (
     PhaseIncompressibleTurbulenceModel<singlePhaseTransportModel>::New
diff --git a/applications/solvers/lagrangian/DPMFoam/pEqn.H b/applications/solvers/lagrangian/DPMFoam/pEqn.H
index 34cce4f1668425107a0404c66f6c85a4a671791c..9e465511221baf25438c93e5b2828c3aba915fd0 100644
--- a/applications/solvers/lagrangian/DPMFoam/pEqn.H
+++ b/applications/solvers/lagrangian/DPMFoam/pEqn.H
@@ -6,21 +6,14 @@
     (
         "phiHbyA",
         (
-           (fvc::interpolate(HbyA) & mesh.Sf())
+           fvc::flux(HbyA)
          + alphacf*rAUcf*fvc::ddtCorr(Uc, phic)
          + phicForces
         )
     );
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-            - (mesh.Sf().boundaryField() & Uc.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUcf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, Uc, phiHbyA, rAUcf);
 
     // Non-orthogonal pressure corrector loop
     while (pimple.correctNonOrthogonal())
diff --git a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H
index a719c83cd70b3ba49dabd81e9335024f9015dffb..671e316c5425ad9c7346eb8fb7aff8f432ff684b 100644
--- a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H
+++ b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H
index 480ce25f7c82cf950982a7897d84236f063a09d2..4f6eaf3550cc92ec09f807e6b067b37819b7b6e9 100644
--- a/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H
+++ b/applications/solvers/lagrangian/coalChemistryFoam/pEqn.H
@@ -2,9 +2,7 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.transonic())
 {
@@ -13,7 +11,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
         )
     );
@@ -46,13 +44,16 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H
index 1c7d7cb5e293faa2a4171a694a2d6f27eeda9289..65b0388e12dcba4447824a85f2dbf740fd1086f8 100644
--- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H
+++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     const dictionary& pimpleDict = pimple.dict();
 
diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H
index b23f00dbf1e391d8aa7f16870e47596e2e9962f8..93dacc3ba66859c2cf49990f1ecf1dc41cb41161 100644
--- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H
index 6f8b03458152faa2fc67d297f3d3efa28b70444a..7b5249d57e7bd2ce99db1f702aa863eb56a1adf2 100644
--- a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H
@@ -2,9 +2,7 @@ rho = thermo.rho();
 
 volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn.H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
 
@@ -12,7 +10,7 @@ surfaceScalarField phiHbyA
 (
     "phiHbyA",
     (
-        (fvc::interpolate(rho*HbyA) & mesh.Sf())
+        fvc::flux(rho*HbyA)
       + rhorAUf*fvc::ddtCorr(rho, U, phi)
     )
   + phig
@@ -20,16 +18,8 @@ surfaceScalarField phiHbyA
 
 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
-// Update the fixedFluxPressure BCs to ensure flux consistency
-setSnGrad<fixedFluxPressureFvPatchScalarField>
-(
-    p_rgh.boundaryField(),
-    (
-        phiHbyA.boundaryField()
-      - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-       *rho.boundaryField()
-    )/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
-);
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
 
 while (pimple.correctNonOrthogonal())
 {
diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C
index 8014596ae6d796e5712977d5129be9ada9e8c883..37c0f4235d0161fec162ad00d814b6217684c91e 100644
--- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C
+++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,6 @@ Description
 #include "SLGThermo.H"
 #include "fvOptions.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H
index fbcc0a0f65786df1b03adcd87af5c84802de3dcf..25bdc12cdf8f2f8dc6657aba1f4bebf8df53c866 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H
index f266fded0a6eeb56aed7211f78a762ae12763c7e..f6c8ceec21d28dc6064fee4c129d1d875d724b02 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H
@@ -7,21 +7,21 @@
 
     volScalarField rAU(1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     fvScalarMatrix pDDtEqn
     (
         fvc::ddt(rho) + psi*correction(fvm::ddt(p))
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H
index d599d491f83d784219429597018e59a96ffef74d..f51eeb49bf3ba7f3fa78028e895226faec408b8c 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H
+++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     const dictionary& pimpleDict = pimple.dict();
 
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H
index 2f5a74d45b017c572361d9e6cfac8801802e4934..86cf5362f81ac1ee4c31eec659ff2a7481affe43 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H
@@ -1,6 +1,6 @@
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> tUEqn
     (
         fvm::div(phi, U)
       + MRF.DDt(rho, U)
@@ -10,11 +10,12 @@
       + parcels.SU(U)
       + fvOptions(rho, U)
     );
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
-    UEqn().relax();
+    UEqn.relax();
 
-    fvOptions.constrain(UEqn());
+    fvOptions.constrain(UEqn);
 
-    solve(UEqn() == -fvc::grad(p));
+    solve(UEqn == -fvc::grad(p));
 
     fvOptions.correct(U);
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H
index cd0a45f0f020295bb6341f345e109b2999465471..20d55a8d52efc44e57f604c3b26bc1f18d8b0f92 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H
@@ -1,4 +1,4 @@
-tmp<fv::convectionScheme<scalar> > mvConvection
+tmp<fv::convectionScheme<scalar>> mvConvection
 (
     fv::convectionScheme<scalar>::New
     (
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
index b5d3e1471afa6e53e520f22e711ba412f5e6a1ff..055eff6f0b34ec7e30fb3da5d8ac9f6f96386d25 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
+++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
@@ -3,26 +3,27 @@
     // pressure solution - done in 2 parts. Part 1:
     thermo.rho() -= psi*p;
 
-    volScalarField rAU(1.0/UEqn().A());
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
-
-    UEqn.clear();
-
+    volScalarField rAU(1.0/UEqn.A());
+    surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
+    tUEqn.clear();
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::interpolate(rho)*fvc::flux(HbyA)
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (simple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
         (
             fvc::div(phiHbyA)
-          - fvm::laplacian(rho*rAU, p)
+          - fvm::laplacian(rhorAUf, p)
          ==
             parcels.Srho()
           + fvOptions(psi, p, rho.name())
diff --git a/applications/solvers/lagrangian/sprayFoam/UEqn.H b/applications/solvers/lagrangian/sprayFoam/UEqn.H
index c26bf1cf65e887ed40b326784b9c29da05a45893..97a83f7d5b6fc5309e8e0bb9e71a72fdf31622ae 100644
--- a/applications/solvers/lagrangian/sprayFoam/UEqn.H
+++ b/applications/solvers/lagrangian/sprayFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(rho, U) + fvm::div(phi, U)
   + MRF.DDt(rho, U)
@@ -12,14 +12,15 @@ tmp<fvVectorMatrix> UEqn
   + parcels.SU(U)
   + fvOptions(rho, U)
 );
+fvVectorMatrix& UEqn = tUEqn.ref();
 
-UEqn().relax();
+UEqn.relax();
 
-fvOptions.constrain(UEqn());
+fvOptions.constrain(UEqn);
 
 if (pimple.momentumPredictor())
 {
-    solve(UEqn() == -fvc::grad(p));
+    solve(UEqn == -fvc::grad(p));
 
     fvOptions.correct(U);
     K = 0.5*magSqr(U);
diff --git a/applications/solvers/lagrangian/sprayFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/pEqn.H
index ee450daab937a8b38e2a02af71e972e5b5a0de66..b15fb81e13b3a26efa12c6b113109134f0f65af2 100644
--- a/applications/solvers/lagrangian/sprayFoam/pEqn.H
+++ b/applications/solvers/lagrangian/sprayFoam/pEqn.H
@@ -3,15 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
+volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -21,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
         )
     );
@@ -54,13 +52,16 @@ else
     (
         "phiHbyA",
         (
-            (fvc::interpolate(rho*HbyA) & mesh.Sf())
+            fvc::flux(rho*HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, phi)
         )
     );
 
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
index c620a892d11ab092de2886d64a36dc147acd0d4b..90033814d33112aa720d016d1f901077ebd095a2 100644
--- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
+++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
@@ -3,15 +3,13 @@ rho = max(rho, rhoMin);
 rho = min(rho, rhoMax);
 rho.relax();
 
-volScalarField rAU(1.0/UEqn().A());
+volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 if (pimple.transonic())
@@ -21,7 +19,7 @@ if (pimple.transonic())
         "phid",
         fvc::interpolate(psi)
        *(
-            (fvc::interpolate(HbyA) & mesh.Sf())
+            fvc::flux(HbyA)
           + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
         )
     );
@@ -54,13 +52,16 @@ else
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(rho*HbyA) & mesh.Sf())
+        fvc::flux(rho*HbyA)
       + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
     );
 
     fvc::makeRelative(phiHbyA, rho, U);
     MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
+
     while (pimple.correctNonOrthogonal())
     {
         fvScalarMatrix pEqn
diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options
index 69fd826ce61986fc4caac97209834e9fdb5ce88b..5cc555e27fe84635a835ce080e3f2eaef744a222 100644
--- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options
+++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/Make/options
@@ -1,6 +1,6 @@
 EXE_INC = \
-    -I.. \
     -I../sprayDyMFoam \
+    -I.. \
     -I../../reactingParcelFoam \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
     -I${LIB_SRC}/meshTools/lnInclude \
diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
index b07846b6def076721a3b5b615771013eadf86e9e..51a2da33bdd8918dba99277e42b820c194cfa584 100644
--- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
@@ -13,11 +13,9 @@
 
     volScalarField rAU(1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
-    phi = (fvc::interpolate(HbyA) & mesh.Sf())
+    phi = fvc::flux(HbyA)
          + rhorAUf*fvc::ddtCorr(U, Uf);
     fvc::makeRelative(phi, U);
 
diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H
index da8047914c0d5d62c0eb33060da4f98216c68dc2..4c337c4269a26bb625500529bf5d000cf210c6f0 100644
--- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H
+++ b/applications/solvers/multiphase/cavitatingFoam/pEqn.H
@@ -13,11 +13,9 @@
 
     volScalarField rAU(1.0/UEqn.A());
     surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
 
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
-    phi = (fvc::interpolate(HbyA) & mesh.Sf())
+    phi = fvc::flux(HbyA)
          + rhorAUf*fvc::ddtCorr(U, phi);
 
     surfaceScalarField phiGradp(rhorAUf*mesh.magSf()*fvc::snGrad(p));
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/multiphase/compressibleInterFoam/Allwclean
index 9339e372a3773ee6be7dfd6dbdeb6cd08857e38b..0e26512420818bed32fa20e58fcc7ed85a3775a4 100755
--- a/applications/solvers/multiphase/compressibleInterFoam/Allwclean
+++ b/applications/solvers/multiphase/compressibleInterFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso twoPhaseMixtureThermo
 wclean
 wclean compressibleInterDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
index 835bf8346bbe94cf54383e8d7780ae80202b6287..b658bde4575565fcf75161a9adf5651b5f343446 100755
--- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake
+++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso twoPhaseMixtureThermo
+wmake $targetType twoPhaseMixtureThermo
 wmake
 wmake compressibleInterDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C
index 0f6bf83172799d819c9aea2816ca8f995e4aadd7..7cbbd26b141ce1df7f8ddc552ce3d80a5d900999 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,6 @@ Description
 #include "turbulentFluidThermoModel.H"
 #include "pimpleControl.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
index 89089fe616f3a513449e661da797e19df58218ba..859fc9cc4e8aa240f7d280467dfa42017c67449a 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
     );
 
@@ -22,15 +19,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
     // Make the fluxes relative to the mesh motion
     fvc::makeRelative(phiHbyA, U);
@@ -50,8 +40,8 @@
                 psi1*fvm::ddt(p_rgh)
               + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
             );
-        deleteDemandDrivenData(p_rghEqnComp1().faceFluxCorrectionPtr());
-        p_rghEqnComp1().relax();
+        deleteDemandDrivenData(p_rghEqnComp1.ref().faceFluxCorrectionPtr());
+        p_rghEqnComp1.ref().relax();
 
         p_rghEqnComp2 =
             fvc::ddt(rho2) + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2)
@@ -60,8 +50,8 @@
                 psi2*fvm::ddt(p_rgh)
               + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
             );
-        deleteDemandDrivenData(p_rghEqnComp2().faceFluxCorrectionPtr());
-        p_rghEqnComp2().relax();
+        deleteDemandDrivenData(p_rghEqnComp2.ref().faceFluxCorrectionPtr());
+        p_rghEqnComp2.ref().relax();
     }
     else
     {
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
index bb7548164b02a44383426f4b67e133d0cda68178..2a113880dee0d5f7b783e8cdc0446075b7c03e2e 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,6 @@ Description
 #include "twoPhaseMixtureThermo.H"
 #include "turbulentFluidThermoModel.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
index 673f1c827101b537b0d72433d8f1a3afbc59d4c3..a4a3fb2e2914150398b4ea3f6da31ee5e58e8b4e 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
 
@@ -22,15 +19,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
     tmp<fvScalarMatrix> p_rghEqnComp1;
     tmp<fvScalarMatrix> p_rghEqnComp2;
@@ -47,8 +37,8 @@
                 psi1*fvm::ddt(p_rgh)
               + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
             );
-        deleteDemandDrivenData(p_rghEqnComp1().faceFluxCorrectionPtr());
-        p_rghEqnComp1().relax();
+        deleteDemandDrivenData(p_rghEqnComp1.ref().faceFluxCorrectionPtr());
+        p_rghEqnComp1.ref().relax();
 
         p_rghEqnComp2 =
             fvc::ddt(rho2) + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2)
@@ -57,8 +47,8 @@
                 psi2*fvm::ddt(p_rgh)
               + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
             );
-        deleteDemandDrivenData(p_rghEqnComp2().faceFluxCorrectionPtr());
-        p_rghEqnComp2().relax();
+        deleteDemandDrivenData(p_rghEqnComp2.ref().faceFluxCorrectionPtr());
+        p_rghEqnComp2.ref().relax();
     }
     else
     {
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean
index 7ccfc0d68fdaf3119d957c2ce13039ab96bc1ee0..628a70b516616c245038aaf08537be8e178d901e 100755
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean
@@ -5,4 +5,4 @@ set -x
 wclean libso multiphaseMixtureThermo
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
index 04e1ddbb1ff4bc84f3163133fc08bd8fb1d417a7..025a2399e86b4fe7f583bde3332796381e8ca150 100755
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake
@@ -1,8 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso multiphaseMixtureThermo
+wmake $targetType multiphaseMixtureThermo
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C
index 667941ecc59b12acb030573407ee9d932b481f69..bff854c6eabe3e9c07e8c12eff72cd4c323a88de 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,6 @@ Description
 #include "multiphaseMixtureThermo.H"
 #include "turbulentFluidThermoModel.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
index 55af5942836f247c3c067c417668bf274a09508f..14bbbe8708650e3aaab85a355e759832387ce386 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,8 +59,6 @@ void Foam::multiphaseMixtureThermo::calcAlphas()
         alphas_ += level*phase();
         level += 1.0;
     }
-
-    alphas_.correctBoundaryConditions();
 }
 
 
@@ -104,8 +102,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo
             IOobject::AUTO_WRITE
         ),
         mesh_,
-        dimensionedScalar("alphas", dimless, 0.0),
-        zeroGradientFvPatchScalarField::typeName
+        dimensionedScalar("alphas", dimless, 0.0)
     ),
 
     sigmas_(lookup("sigmas")),
@@ -193,7 +190,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::he
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        the() += phasei()*phasei().thermo().he(p, T);
+        the.ref() += phasei()*phasei().thermo().he(p, T);
     }
 
     return the;
@@ -216,7 +213,8 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        the() += scalarField(phasei(), cells)*phasei().thermo().he(p, T, cells);
+        the.ref() +=
+            scalarField(phasei(), cells)*phasei().thermo().he(p, T, cells);
     }
 
     return the;
@@ -239,7 +237,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        the() +=
+        the.ref() +=
             phasei().boundaryField()[patchi]*phasei().thermo().he(p, T, patchi);
     }
 
@@ -255,7 +253,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::hc() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        thc() += phasei()*phasei().thermo().hc();
+        thc.ref() += phasei()*phasei().thermo().hc();
     }
 
     return thc;
@@ -296,7 +294,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::rho() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        trho() += phasei()*phasei().thermo().rho();
+        trho.ref() += phasei()*phasei().thermo().rho();
     }
 
     return trho;
@@ -317,7 +315,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::rho
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        trho() +=
+        trho.ref() +=
             phasei().boundaryField()[patchi]*phasei().thermo().rho(patchi);
     }
 
@@ -333,7 +331,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cp() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCp() += phasei()*phasei().thermo().Cp();
+        tCp.ref() += phasei()*phasei().thermo().Cp();
     }
 
     return tCp;
@@ -356,7 +354,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cp
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCp() +=
+        tCp.ref() +=
             phasei().boundaryField()[patchi]*phasei().thermo().Cp(p, T, patchi);
     }
 
@@ -372,7 +370,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cv() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCv() += phasei()*phasei().thermo().Cv();
+        tCv.ref() += phasei()*phasei().thermo().Cv();
     }
 
     return tCv;
@@ -395,7 +393,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cv
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCv() +=
+        tCv.ref() +=
             phasei().boundaryField()[patchi]*phasei().thermo().Cv(p, T, patchi);
     }
 
@@ -411,7 +409,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::gamma() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tgamma() += phasei()*phasei().thermo().gamma();
+        tgamma.ref() += phasei()*phasei().thermo().gamma();
     }
 
     return tgamma;
@@ -434,7 +432,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::gamma
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tgamma() +=
+        tgamma.ref() +=
             phasei().boundaryField()[patchi]
            *phasei().thermo().gamma(p, T, patchi);
     }
@@ -451,7 +449,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cpv() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCpv() += phasei()*phasei().thermo().Cpv();
+        tCpv.ref() += phasei()*phasei().thermo().Cpv();
     }
 
     return tCpv;
@@ -474,7 +472,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cpv
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCpv() +=
+        tCpv.ref() +=
             phasei().boundaryField()[patchi]
            *phasei().thermo().Cpv(p, T, patchi);
     }
@@ -491,7 +489,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::CpByCpv() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCpByCpv() += phasei()*phasei().thermo().CpByCpv();
+        tCpByCpv.ref() += phasei()*phasei().thermo().CpByCpv();
     }
 
     return tCpByCpv;
@@ -514,7 +512,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::CpByCpv
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tCpByCpv() +=
+        tCpByCpv.ref() +=
             phasei().boundaryField()[patchi]
            *phasei().thermo().CpByCpv(p, T, patchi);
     }
@@ -546,7 +544,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::kappa() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tkappa() += phasei()*phasei().thermo().kappa();
+        tkappa.ref() += phasei()*phasei().thermo().kappa();
     }
 
     return tkappa;
@@ -567,7 +565,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::kappa
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tkappa() +=
+        tkappa.ref() +=
             phasei().boundaryField()[patchi]*phasei().thermo().kappa(patchi);
     }
 
@@ -586,7 +584,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::kappaEff
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tkappaEff() += phasei()*phasei().thermo().kappaEff(alphat);
+        tkappaEff.ref() += phasei()*phasei().thermo().kappaEff(alphat);
     }
 
     return tkappaEff;
@@ -609,7 +607,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::kappaEff
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        tkappaEff() +=
+        tkappaEff.ref() +=
             phasei().boundaryField()[patchi]
            *phasei().thermo().kappaEff(alphat, patchi);
     }
@@ -629,7 +627,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::alphaEff
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        talphaEff() += phasei()*phasei().thermo().alphaEff(alphat);
+        talphaEff.ref() += phasei()*phasei().thermo().alphaEff(alphat);
     }
 
     return talphaEff;
@@ -652,7 +650,7 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::alphaEff
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        talphaEff() +=
+        talphaEff.ref() +=
             phasei().boundaryField()[patchi]
            *phasei().thermo().alphaEff(alphat, patchi);
     }
@@ -669,7 +667,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::rCv() const
 
     for (++phasei; phasei != phases_.end(); ++phasei)
     {
-        trCv() += phasei()/phasei().thermo().Cv();
+        trCv.ref() += phasei()/phasei().thermo().Cv();
     }
 
     return trCv;
@@ -699,7 +697,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const
         )
     );
 
-    surfaceScalarField& stf = tstf();
+    surfaceScalarField& stf = tstf.ref();
 
     forAllConstIter(PtrDictionary<phaseModel>, phases_, phase1)
     {
@@ -925,7 +923,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::K
 {
     tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
 
-    correctContactAngle(alpha1, alpha2, tnHatfv().boundaryField());
+    correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryField());
 
     // Simple expression for curvature
     return -fvc::div(tnHatfv & mesh_.Sf());
@@ -952,7 +950,8 @@ Foam::multiphaseMixtureThermo::nearInterface() const
 
     forAllConstIter(PtrDictionary<phaseModel>, phases_, phase)
     {
-        tnearInt() = max(tnearInt(), pos(phase() - 0.01)*pos(0.99 - phase()));
+        tnearInt.ref() =
+            max(tnearInt(), pos(phase() - 0.01)*pos(0.99 - phase()));
     }
 
     return tnearInt;
diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H
index a8f4bcb9f2b8f9ba369c350b14ec8ee1d171fcdb..70ac37c1b80e29174dfa5c7447107873a05df60e 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
 
@@ -22,15 +19,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
     PtrList<fvScalarMatrix> p_rghEqnComps(mixture.phases().size());
 
@@ -90,7 +80,7 @@
             }
             else
             {
-                p_rghEqnComp() += hmm;
+                p_rghEqnComp.ref() += hmm;
             }
 
             phasei++;
diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwclean b/applications/solvers/multiphase/driftFluxFoam/Allwclean
index 4bb3b9406d28b81c9f6aaa3670abad95200e94bf..dcdca8527ffc62ff535b632f4c8077d01bf527bd 100755
--- a/applications/solvers/multiphase/driftFluxFoam/Allwclean
+++ b/applications/solvers/multiphase/driftFluxFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso mixtureViscosityModels
 wclean libso relativeVelocityModels
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwmake b/applications/solvers/multiphase/driftFluxFoam/Allwmake
index ac51afd1d11041ed4e0b55aee90388aa4801fd01..0c8b6bb8f9d4d90e7ef6512fb7ca6b5bcbe0d194 100755
--- a/applications/solvers/multiphase/driftFluxFoam/Allwmake
+++ b/applications/solvers/multiphase/driftFluxFoam/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso mixtureViscosityModels
-wmake libso relativeVelocityModels
+wmake $targetType mixtureViscosityModels
+wmake $targetType relativeVelocityModels
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H
index 68f027cd2463e750c63e09b01966799816634b27..3938fde30f0e5121081ddad3154f7414686461c2 100644
--- a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H
@@ -34,7 +34,7 @@
             (
                 alpha1,
                 alphaPhi,
-                talphaPhiCorr0(),
+                talphaPhiCorr0.ref(),
                 mixture.alphaMax(),
                 0
             );
@@ -73,7 +73,7 @@
             (
                 alpha1,
                 talphaPhiUn(),
-                talphaPhiCorr(),
+                talphaPhiCorr.ref(),
                 mixture.alphaMax(),
                 0
             );
diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H
index b586e77fad5a2928a4aac611f5dae8076c7e2b97..e77f66b880ec5c93cf48dc8027888544e4b45d7b 100644
--- a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H
+++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H
@@ -11,10 +11,7 @@
         dimensionedScalar("0", phi.dimensions(), 0)
     );
 
-    surfaceScalarField phir
-    (
-        mesh.Sf() & fvc::interpolate(UdmModel.Udm())
-    );
+    surfaceScalarField phir(fvc::flux(UdmModel.Udm()));
 
     if (nAlphaSubCycles > 1)
     {
diff --git a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C
index d35c3a262b5eef292cdcbfd2d696fc9f1b8d96ca..4b3e21265eda8e6aaee4d71de741d23ee6d3268b 100644
--- a/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C
+++ b/applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,6 @@ Description
 #include "CompressibleTurbulenceModel.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "gaussLaplacianScheme.H"
 #include "uncorrectedSnGrad.H"
 
diff --git a/applications/solvers/multiphase/driftFluxFoam/pEqn.H b/applications/solvers/multiphase/driftFluxFoam/pEqn.H
index 73c6ea9877da443c98fac82cf6bcdc4f2c6c15e3..6797c44ccb6d6200e7be67f0197cf032d803379e 100644
--- a/applications/solvers/multiphase/driftFluxFoam/pEqn.H
+++ b/applications/solvers/multiphase/driftFluxFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
     MRF.makeRelative(phiHbyA);
@@ -23,15 +20,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
 
     while (pimple.correctNonOrthogonal())
     {
diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/general/general.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/general/general.C
index f8a133b63e33c72283abeef09961ea7539f9e40c..6a7d86eed9b1eb45aa05c4af89747823a8ea48b8 100644
--- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/general/general.C
+++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/general/general.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ Foam::relativeVelocityModels::general::general
     a_("a", dimless, dict),
     a1_("a1", dimless, dict),
     V0_("V0", dimVelocity, dict),
-    residualAlpha_(dict.lookup("residualAlpha"))
+    residualAlpha_("residualAlpha", dimless, dict)
 {}
 
 
diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C
index be4de6b2c05c63b2aedd788071d15e179fe04f24..c8e3bb3721ff7a2142bbef76108e9169a860f5ca 100644
--- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C
+++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,8 +59,7 @@ Foam::relativeVelocityModel::relativeVelocityModel
             IOobject::AUTO_WRITE
         ),
         alphac_.mesh(),
-        dimensionedVector("Udm", dimVelocity, vector::zero),
-        mixture.U().boundaryField().types()
+        dimensionedVector("Udm", dimVelocity, Zero)
     )
 {}
 
diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H
index 6a24830137688a3ed5589fba4c61dc515c09da14..9d6dd2dc18b68f8e2adbd1b422ad2a54c997d915 100644
--- a/applications/solvers/multiphase/interFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/interFoam/alphaEqn.H
@@ -2,7 +2,7 @@
     word alphaScheme("div(phi,alpha)");
     word alpharScheme("div(phirb,alpha)");
 
-    tmp<fv::ddtScheme<scalar> > ddtAlpha
+    tmp<fv::ddtScheme<scalar>> ddtAlpha
     (
         fv::ddtScheme<scalar>::New
         (
@@ -15,13 +15,13 @@
     scalar ocCoeff = 0;
     if
     (
-        isType<fv::EulerDdtScheme<scalar> >(ddtAlpha())
-     || isType<fv::localEulerDdtScheme<scalar> >(ddtAlpha())
+        isType<fv::EulerDdtScheme<scalar>>(ddtAlpha())
+     || isType<fv::localEulerDdtScheme<scalar>>(ddtAlpha())
     )
     {
         ocCoeff = 0;
     }
-    else if (isType<fv::CrankNicolsonDdtScheme<scalar> >(ddtAlpha()))
+    else if (isType<fv::CrankNicolsonDdtScheme<scalar>>(ddtAlpha()))
     {
         if (nAlphaSubCycles > 1)
         {
@@ -32,7 +32,8 @@
         }
 
         ocCoeff =
-            refCast<fv::CrankNicolsonDdtScheme<scalar> >(ddtAlpha()).ocCoeff();
+            refCast<const fv::CrankNicolsonDdtScheme<scalar>>(ddtAlpha())
+           .ocCoeff();
     }
     else
     {
@@ -104,7 +105,7 @@
         if (alphaApplyPrevCorr && talphaPhiCorr0.valid())
         {
             Info<< "Applying the previous iteration compression flux" << endl;
-            MULES::correct(alpha1, alphaPhi, talphaPhiCorr0(), 1, 0);
+            MULES::correct(alpha1, alphaPhi, talphaPhiCorr0.ref(), 1, 0);
 
             alphaPhi += talphaPhiCorr0();
         }
@@ -150,7 +151,7 @@
             tmp<surfaceScalarField> talphaPhiCorr(talphaPhiUn() - alphaPhi);
             volScalarField alpha10("alpha10", alpha1);
 
-            MULES::correct(alpha1, talphaPhiUn(), talphaPhiCorr(), 1, 0);
+            MULES::correct(alpha1, talphaPhiUn(), talphaPhiCorr.ref(), 1, 0);
 
             // Under-relax the correction for all but the 1st corrector
             if (aCorr == 0)
diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H
index c3e65f24e36c8db20ac9281f966e0883b1fe8f4f..e4891edba5555c9ed7b3a1667fd90985b6d65bb8 100644
--- a/applications/solvers/multiphase/interFoam/createFields.H
+++ b/applications/solvers/multiphase/interFoam/createFields.H
@@ -49,8 +49,7 @@ volScalarField rho
         mesh,
         IOobject::READ_IF_PRESENT
     ),
-    alpha1*rho1 + alpha2*rho2,
-    alpha1.boundaryField().types()
+    alpha1*rho1 + alpha2*rho2
 );
 rho.oldTime();
 
diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C
index 7f3f677349e03e887f680b2df49d8c63d4c1d2cb..340f2c948edaf07f481c05e3203dd58b65b85389 100644
--- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C
+++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "localEulerDdtScheme.H"
 #include "fvcSmooth.H"
 
diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H
index 8400d2468725a90f2f858f1b110abe928dabb9e2..2c7df14ae7864b32f598331db27d1b3cacefaef9 100644
--- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     rAU = 1.0/UEqn.A();
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
     );
     MRF.makeRelative(phiHbyA);
@@ -30,15 +27,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
     while (pimple.correctNonOrthogonal())
     {
diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C
index c6dc2f47e455151eacee11cff25f94b479f10667..1d37044e9d1ccb5a1c21ef386b06abb87525ba95 100644
--- a/applications/solvers/multiphase/interFoam/interFoam.C
+++ b/applications/solvers/multiphase/interFoam/interFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "localEulerDdtScheme.H"
 #include "fvcSmooth.H"
 
diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H
index 59180b87239d1b06187600e76671605131546eba..4d9f0e7f0159c7c61d766db4f60da09ab2c52101 100644
--- a/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H
+++ b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H
@@ -50,8 +50,7 @@ volScalarField rho
         mesh,
         IOobject::READ_IF_PRESENT
     ),
-    alpha1*rho1 + alpha2*rho2 + alpha3*rho3,
-    alpha1.boundaryField().types()
+    alpha1*rho1 + alpha2*rho2 + alpha3*rho3
 );
 rho.oldTime();
 
diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C
index f6c00e12a48eae323123bec3961ea5b501451757..b5eae6b98c7f316b4551c1469d70136636022e3c 100644
--- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C
+++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
 
-//- Calculate and return the laminar viscosity
 void Foam::incompressibleThreePhaseMixture::calcNu()
 {
     nuModel1_->correct();
diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C
index 201b6bb926b8c84c383f272f36f101c32d8d7a73..d0bb094699dc8ba884977ac25f3fa7598312ed6f 100644
--- a/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C
+++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "localEulerDdtScheme.H"
 #include "fvcSmooth.H"
 
diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H
index 31982f4c1d359bc6d28af81ae109d3b9cf7979e0..43edce0c5d655d44a31d934370be5062bfe34ff4 100644
--- a/applications/solvers/multiphase/interFoam/pEqn.H
+++ b/applications/solvers/multiphase/interFoam/pEqn.H
@@ -2,13 +2,12 @@
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
 
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
     MRF.makeRelative(phiHbyA);
@@ -24,15 +23,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
 
     while (pimple.correctNonOrthogonal())
     {
diff --git a/applications/solvers/multiphase/interFoam/setRDeltaT.H b/applications/solvers/multiphase/interFoam/setRDeltaT.H
index 01bb8aa411ce23424216641173a206e932ade3e1..dd0e6a4da45a946c9fbd7512b7c972da58d7043b 100644
--- a/applications/solvers/multiphase/interFoam/setRDeltaT.H
+++ b/applications/solvers/multiphase/interFoam/setRDeltaT.H
@@ -1,5 +1,5 @@
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     const dictionary& pimpleDict = pimple.dict();
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean
index 0e33252d5cee25b16a72edc6244f1e22cb51e0df..bc351e27d8076a8f66a16f82230c06fed45fbf78 100755
--- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso phaseChangeTwoPhaseMixtures
 wclean
 wclean interPhaseChangeDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
index 9a2a5c2bab852bdaaa1f02388363356636c00991..c25175e5e6ec3c345f2943d26c3ca690a2fe1d00 100755
--- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso phaseChangeTwoPhaseMixtures
+wmake $targetType phaseChangeTwoPhaseMixtures
 wmake
 wmake interPhaseChangeDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H
index 172676b97fd4502b1e13ec686755934a643a9a8d..150ccd1f787e98885e24a3c0a9fbec536737b776 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H
@@ -4,7 +4,7 @@
 
     surfaceScalarField phir("phir", phic*interface.nHatf());
 
-    Pair<tmp<volScalarField> > vDotAlphal =
+    Pair<tmp<volScalarField>> vDotAlphal =
         mixture->vDotAlphal();
     const volScalarField& vDotcAlphal = vDotAlphal[0]();
     const volScalarField& vDotvAlphal = vDotAlphal[1]();
@@ -62,7 +62,7 @@
 
         if (MULESCorr)
         {
-            talphaPhiCorr() -= talphaPhi();
+            talphaPhiCorr.ref() -= talphaPhi();
 
             volScalarField alpha100("alpha100", alpha10);
             alpha10 = alpha1;
@@ -72,7 +72,7 @@
                 geometricOneField(),
                 alpha1,
                 talphaPhi(),
-                talphaPhiCorr(),
+                talphaPhiCorr.ref(),
                 vDotvmcAlphal,
                 (
                     divU*(alpha10 - alpha100)
@@ -85,12 +85,12 @@
             // Under-relax the correction for all but the 1st corrector
             if (aCorr == 0)
             {
-                talphaPhi() += talphaPhiCorr();
+                talphaPhi.ref() += talphaPhiCorr();
             }
             else
             {
                 alpha1 = 0.5*alpha1 + 0.5*alpha10;
-                talphaPhi() += 0.5*talphaPhiCorr();
+                talphaPhi.ref() += 0.5*talphaPhiCorr();
             }
         }
         else
@@ -100,7 +100,7 @@
                 geometricOneField(),
                 alpha1,
                 phi,
-                talphaPhiCorr(),
+                talphaPhiCorr.ref(),
                 vDotvmcAlphal,
                 (divU*alpha1 + vDotcAlphal)(),
                 1,
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H
index dc0491bd03c8fe2b7dafc9471358a56ae3676f0c..bb336f16c01ecd4226ecd30535359c2f90b6265b 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H
@@ -51,8 +51,7 @@ volScalarField rho
         mesh,
         IOobject::READ_IF_PRESENT
     ),
-    alpha1*rho1 + alpha2*rho2,
-    alpha1.boundaryField().types()
+    alpha1*rho1 + alpha2*rho2
 );
 rho.oldTime();
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C
index a3b3e64cbc53f854d26042f2458812a4e31fcde4..1fcffeb2aae9de9a7c8346f090c6054e5f443602 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H
index b759081eeae02721ab6ce6a3d4e36263273af693..7501f5806283e70ca3e0dc70203e64796e7ba0be 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     rAU = 1.0/UEqn.A();
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
     );
 
@@ -29,17 +26,10 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
-    Pair<tmp<volScalarField> > vDotP = mixture->vDotP();
+    Pair<tmp<volScalarField>> vDotP = mixture->vDotP();
     const volScalarField& vDotcP = vDotP[0]();
     const volScalarField& vDotvP = vDotP[1]();
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C
index 525efbc3aba8eaa9525c758a2e8ad7d82d4446fa..088d9890f4437f2987f1d2d0f37d2f8401955c39 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,6 @@ Description
 #include "turbulentTransportModel.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
index 4a174eb980fe3243fb6ea039e5bd2a63f313c165..0b0a31c669c880fd6b8ab7484c7f8196cadc9471 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
     adjustPhi(phiHbyA, U, p_rgh);
@@ -23,17 +20,10 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
-    Pair<tmp<volScalarField> > vDotP = mixture->vDotP();
+    Pair<tmp<volScalarField>> vDotP = mixture->vDotP();
     const volScalarField& vDotcP = vDotP[0]();
     const volScalarField& vDotvP = vDotP[1]();
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C
index f7cc2eae2114348ce56b1064ca900711b36ff24a..a4663ba488753b848fe1e089ae5fb0d38ce838e4 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,13 +63,13 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const
 {
     const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
     volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         mcCoeff_*sqr(limitedAlpha1)
        *max(p - pSat(), p0_)/max(p - pSat(), 0.01*pSat()),
@@ -78,13 +78,13 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const
     );
 }
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const
 {
     const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
     volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         mcCoeff_*sqr(limitedAlpha1)*(1.0 - limitedAlpha1)
        *pos(p - pSat())/max(p - pSat(), 0.01*pSat()),
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H
index 393357a7ffcaaaa5e17f80ee3c1aad52abba9701..0b1c155f456062371d15fe4b67edb82de8f81930 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,11 +105,11 @@ public:
         //- Return the mass condensation and vaporisation rates as a
         //  coefficient to multiply (1 - alphal) for the condensation rate
         //  and a coefficient to multiply  alphal for the vaporisation rate
-        virtual Pair<tmp<volScalarField> > mDotAlphal() const;
+        virtual Pair<tmp<volScalarField>> mDotAlphal() const;
 
         //- Return the mass condensation and vaporisation rates as coefficients
         //  to multiply (p - pSat)
-        virtual Pair<tmp<volScalarField> > mDotP() const;
+        virtual Pair<tmp<volScalarField>> mDotP() const;
 
         //- Correct the Kunz phaseChange model
         virtual void correct();
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C
index 72fdb7245eb2917dbf747f122c7954c71acaf9e1..cfe6b1b0083a4cffbb9bcb674918c3d99275b3dd 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,25 +63,25 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotAlphal() const
 {
     const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         mcCoeff_*max(p - pSat(), p0_),
         mvCoeff_*min(p - pSat(), p0_)
     );
 }
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const
 {
     const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
     volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         mcCoeff_*(1.0 - limitedAlpha1)*pos(p - pSat()),
         (-mvCoeff_)*limitedAlpha1*neg(p - pSat())
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H
index 0152b2d18ab96b28e21931cf8342cb58371cd65c..1de1263e5c118ff492a9279789de736567019b73 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,11 +99,11 @@ public:
         //- Return the mass condensation and vaporisation rates as a
         //  coefficient to multiply (1 - alphal) for the condensation rate
         //  and a coefficient to multiply  alphal for the vaporisation rate
-        virtual Pair<tmp<volScalarField> > mDotAlphal() const;
+        virtual Pair<tmp<volScalarField>> mDotAlphal() const;
 
         //- Return the mass condensation and vaporisation rates as coefficients
         //  to multiply (p - pSat)
-        virtual Pair<tmp<volScalarField> > mDotP() const;
+        virtual Pair<tmp<volScalarField>> mDotP() const;
 
         //- Correct the Merkle phaseChange model
         virtual void correct();
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C
index 189c7bae06bf3b0bcbac565e821ba5397665233b..3be86e0f518b15cc6754fb3e5046c30be946a3b6 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::pCoeff
 }
 
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const
 {
     const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
@@ -116,7 +116,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const
 
     volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         Cc_*limitedAlpha1*pCoeff*max(p - pSat(), p0_),
 
@@ -125,7 +125,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const
 }
 
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const
 {
     const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
@@ -134,7 +134,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const
     volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
     volScalarField apCoeff(limitedAlpha1*pCoeff);
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         Cc_*(1.0 - limitedAlpha1)*pos(p - pSat())*apCoeff,
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H
index 67eb0dd5ba986285d50c210336cb52aca9c6fda2..c3b8f86a4647d5939c355bb401f6ffce2c3171b5 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,11 +112,11 @@ public:
         //- Return the mass condensation and vaporisation rates as a
         //  coefficient to multiply (1 - alphal) for the condensation rate
         //  and a coefficient to multiply  alphal for the vaporisation rate
-        virtual Pair<tmp<volScalarField> > mDotAlphal() const;
+        virtual Pair<tmp<volScalarField>> mDotAlphal() const;
 
         //- Return the mass condensation and vaporisation rates as coefficients
         //  to multiply (p - pSat)
-        virtual Pair<tmp<volScalarField> > mDotP() const;
+        virtual Pair<tmp<volScalarField>> mDotP() const;
 
         //- Correct the SchnerrSauer phaseChange model
         virtual void correct();
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C
index 5575253888798e8453f2be77799434dfd4872af0..b9a5e69bf8cfe13ad3e2664d2edebf52af285ca2 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,26 +50,26 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixture::vDotAlphal() const
 {
     volScalarField alphalCoeff(1.0/rho1() - alpha1_*(1.0/rho1() - 1.0/rho2()));
-    Pair<tmp<volScalarField> > mDotAlphal = this->mDotAlphal();
+    Pair<tmp<volScalarField>> mDotAlphal = this->mDotAlphal();
 
-    return Pair<tmp<volScalarField> >
+    return Pair<tmp<volScalarField>>
     (
         alphalCoeff*mDotAlphal[0],
         alphalCoeff*mDotAlphal[1]
     );
 }
 
-Foam::Pair<Foam::tmp<Foam::volScalarField> >
+Foam::Pair<Foam::tmp<Foam::volScalarField>>
 Foam::phaseChangeTwoPhaseMixture::vDotP() const
 {
     dimensionedScalar pCoeff(1.0/rho1() - 1.0/rho2());
-    Pair<tmp<volScalarField> > mDotP = this->mDotP();
+    Pair<tmp<volScalarField>> mDotP = this->mDotP();
 
-    return Pair<tmp<volScalarField> >(pCoeff*mDotP[0], pCoeff*mDotP[1]);
+    return Pair<tmp<volScalarField>>(pCoeff*mDotP[0], pCoeff*mDotP[1]);
 }
 
 
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H
index 227768ac8d3f4dc34d505a2fbab34947ce8eced3..dedc97a9e9c3a3041de7398b3335b3e5bd65ccc2 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -134,20 +134,20 @@ public:
         //- Return the mass condensation and vaporisation rates as a
         //  coefficient to multiply (1 - alphal) for the condensation rate
         //  and a coefficient to multiply  alphal for the vaporisation rate
-        virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
+        virtual Pair<tmp<volScalarField>> mDotAlphal() const = 0;
 
         //- Return the mass condensation and vaporisation rates as coefficients
         //  to multiply (p - pSat)
-        virtual Pair<tmp<volScalarField> > mDotP() const = 0;
+        virtual Pair<tmp<volScalarField>> mDotP() const = 0;
 
         //- Return the volumetric condensation and vaporisation rates as a
         //  coefficient to multiply (1 - alphal) for the condensation rate
         //  and a coefficient to multiply  alphal for the vaporisation rate
-        Pair<tmp<volScalarField> > vDotAlphal() const;
+        Pair<tmp<volScalarField>> vDotAlphal() const;
 
         //- Return the volumetric condensation and vaporisation rates as
         //  coefficients to multiply (p - pSat)
-        Pair<tmp<volScalarField> > vDotP() const;
+        Pair<tmp<volScalarField>> vDotP() const;
 
         //- Correct the phaseChange model
         virtual void correct() = 0;
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
index a75382c13cbb676ff6a7af69e72b4139b0a4be47..6d174c19d92041d44b720d8bd05fb080cdccaf8d 100755
--- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso multiphaseSystem
 wclean libso interfacialModels
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
index 84a99b720011d6cf834da8d62873b38848dcfbb3..6f95f807ac078486ce6cc85ff07cf62ad4ccdf44 100755
--- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake
@@ -1,10 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 wmakeLnInclude interfacialModels
-wmake libso multiphaseSystem
-wmake libso interfacialModels
+wmake $targetType multiphaseSystem
+wmake $targetType interfacialModels
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H
index 07475835998be4fbf75785bd599e8bdfc1629ee3..212160b83e6fea4e1f3d7e94e362cf5d50c9caf7 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H
@@ -23,7 +23,7 @@ volVectorField U
         IOobject::AUTO_WRITE
     ),
     mesh,
-    dimensionedVector("U", dimVelocity, vector::zero)
+    dimensionedVector("U", dimVelocity, Zero)
 );
 
 surfaceScalarField phi
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C
index 2ec41b40f87fa200f329a2860935a943d523c336..84f2e159f990da43f4f8ef72e0516a40cd46731d 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,6 @@ Description
 #include "pimpleControl.H"
 #include "IOMRFZoneList.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
index d0cd5c9b1841c4dcccca090297fbc7bf279aae4b..3f514904eca92299229768cf0e69cba88a90fa1a 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,8 +54,6 @@ void Foam::multiphaseSystem::calcAlphas()
         alphas_ += level*iter();
         level += 1.0;
     }
-
-    alphas_.correctBoundaryConditions();
 }
 
 
@@ -374,7 +372,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::K
 {
     tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2);
 
-    correctContactAngle(phase1, phase2, tnHatfv().boundaryField());
+    correctContactAngle(phase1, phase2, tnHatfv.ref().boundaryField());
 
     // Simple expression for curvature
     return -fvc::div(tnHatfv & mesh_.Sf());
@@ -417,8 +415,7 @@ Foam::multiphaseSystem::multiphaseSystem
             IOobject::AUTO_WRITE
         ),
         mesh_,
-        dimensionedScalar("alphas", dimless, 0.0),
-        zeroGradientFvPatchScalarField::typeName
+        dimensionedScalar("alphas", dimless, 0.0)
     ),
 
     sigmas_(lookup("sigmas")),
@@ -496,10 +493,11 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::rho() const
     PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> trho = iter()*iter().rho();
+    volScalarField& rho = trho.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        trho() += iter()*iter().rho();
+        rho += iter()*iter().rho();
     }
 
     return trho;
@@ -512,10 +510,11 @@ Foam::multiphaseSystem::rho(const label patchi) const
     PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
 
     tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
+    scalarField& rho = trho.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        trho() += iter().boundaryField()[patchi]*iter().rho().value();
+        rho += iter().boundaryField()[patchi]*iter().rho().value();
     }
 
     return trho;
@@ -527,10 +526,11 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::nu() const
     PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> tmu = iter()*(iter().rho()*iter().nu());
+    volScalarField& mu = tmu.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        tmu() += iter()*(iter().rho()*iter().nu());
+        mu += iter()*(iter().rho()*iter().nu());
     }
 
     return tmu/rho();
@@ -545,10 +545,11 @@ Foam::multiphaseSystem::nu(const label patchi) const
     tmp<scalarField> tmu =
         iter().boundaryField()[patchi]
        *(iter().rho().value()*iter().nu().value());
+    scalarField& mu = tmu.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        tmu() +=
+        mu +=
             iter().boundaryField()[patchi]
            *(iter().rho().value()*iter().nu().value());
     }
@@ -595,7 +596,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::Cvm
 
             if (Cvm != Cvms_.end())
             {
-                tCvm() += Cvm()*phase2.rho()*phase2;
+                tCvm.ref() += Cvm()*phase2.rho()*phase2;
             }
             else
             {
@@ -603,7 +604,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::Cvm
 
                 if (Cvm != Cvms_.end())
                 {
-                    tCvm() += Cvm()*phase.rho()*phase2;
+                    tCvm.ref() += Cvm()*phase.rho()*phase2;
                 }
             }
         }
@@ -633,7 +634,7 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
             (
                 "Svm",
                 dimensionSet(1, -2, -2, 0, 0),
-                vector::zero
+                Zero
             )
         )
     );
@@ -651,7 +652,7 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
 
             if (Cvm != Cvms_.end())
             {
-                tSvm() += Cvm()*phase2.rho()*phase2*phase2.DDtU();
+                tSvm.ref() += Cvm()*phase2.rho()*phase2*phase2.DDtU();
             }
             else
             {
@@ -659,7 +660,7 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
 
                 if (Cvm != Cvms_.end())
                 {
-                    tSvm() += Cvm()*phase.rho()*phase2*phase2.DDtU();
+                    tSvm.ref() += Cvm()*phase.rho()*phase2*phase2.DDtU();
                 }
             }
         }
@@ -676,7 +677,7 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
             )
         )
         {
-            tSvm().boundaryField()[patchi] = vector::zero;
+            tSvm.ref().boundaryField()[patchi] = Zero;
         }
     }
 
@@ -775,7 +776,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::dragCoeff
          || &phase == &dmIter()->phase2()
         )
         {
-            tdragCoeff() += *dcIter();
+            tdragCoeff.ref() += *dcIter();
         }
     }
 
@@ -821,7 +822,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
 
             if (sigma != sigmas_.end())
             {
-                tSurfaceTension() +=
+                tSurfaceTension.ref() +=
                     dimensionedScalar("sigma", dimSigma_, sigma())
                    *fvc::interpolate(K(phase1, phase2))*
                     (
@@ -856,7 +857,7 @@ Foam::multiphaseSystem::nearInterface() const
 
     forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
     {
-        tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
+        tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
     }
 
     return tnearInt;
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C
index 10dd3e0a5645b3686ff67040fc2a8a5ed24853ac..40269012f61e51f17c0b7d81e3249b87ada554a6 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,6 +29,7 @@ License
 #include "slipFvPatchFields.H"
 #include "partialSlipFvPatchFields.H"
 #include "surfaceInterpolate.H"
+#include "fvcFlux.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -98,7 +99,7 @@ Foam::phaseModel::phaseModel
             mesh
         ),
         mesh,
-        dimensionedVector("0", dimVelocity/dimTime, vector::zero)
+        dimensionedVector("0", dimVelocity/dimTime, Zero)
     ),
     alphaPhi_
     (
@@ -177,7 +178,7 @@ Foam::phaseModel::phaseModel
                     IOobject::NO_READ,
                     IOobject::AUTO_WRITE
                 ),
-                fvc::interpolate(U_) & mesh.Sf(),
+                fvc::flux(U_),
                 phiTypes
             )
         );
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
index d2616fc556788e72e4329ba9fef87a34fb483784..bbcc36f4e772114c866bd51cd5210956e51bf5b7 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
@@ -97,7 +97,7 @@
 
         phiHbyAs[phasei] =
         (
-            (fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
+            fvc::flux(HbyAs[phasei])
           + rAlphaAUfs[phasei]*fvc::ddtCorr(phase.U(), phase.phi())
         );
         MRF.makeRelative(phiHbyAs[phasei]);
@@ -264,7 +264,7 @@
 
             mSfGradp = pEqnIncomp.flux()/rAUf;
 
-            U = dimensionedVector("U", dimVelocity, vector::zero);
+            U = dimensionedVector("U", dimVelocity, Zero);
 
             phasei = 0;
             forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean
index 02819df96f27c11b11af04a8154881689988489a..75d8939d310ec324e1d12d3f439918e4afff891c 100755
--- a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean
+++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso multiphaseMixture
 wclean
 wclean multiphaseInterDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
index 745347676b85b132c3e8436818e4c0fa4d9d99fa..4d2775a8b89edffdebd41aa3ad054abeef40a0d5 100755
--- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
+++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso multiphaseMixture
+wmake $targetType multiphaseMixture
 wmake
 wmake multiphaseInterDyMFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C
index a4413f6295726a3edd3a1f61dac7199d806abaf2..73d3672c126cc9cc7c1af6715c500bb4a0a7ab0f 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C
index 130c9f1cb6dece886888a7f21ca3045bd15b293d..f2f229ec9d41db2797e4ac0370010aed23aebc9e 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
index 1bbd3177af944371975d84086092b38c6f1945e5..ea08ba29865801976b32ffb25801466fad2b786c 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,8 +52,6 @@ void Foam::multiphaseMixture::calcAlphas()
         alphas_ += level*iter();
         level += 1.0;
     }
-
-    alphas_.correctBoundaryConditions();
 }
 
 
@@ -108,8 +106,7 @@ Foam::multiphaseMixture::multiphaseMixture
             IOobject::AUTO_WRITE
         ),
         mesh_,
-        dimensionedScalar("alphas", dimless, 0.0),
-        zeroGradientFvPatchScalarField::typeName
+        dimensionedScalar("alphas", dimless, 0.0)
     ),
 
     nu_
@@ -144,10 +141,11 @@ Foam::multiphaseMixture::rho() const
     PtrDictionary<phase>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> trho = iter()*iter().rho();
+    volScalarField& rho = trho.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        trho() += iter()*iter().rho();
+        rho += iter()*iter().rho();
     }
 
     return trho;
@@ -160,10 +158,11 @@ Foam::multiphaseMixture::rho(const label patchi) const
     PtrDictionary<phase>::const_iterator iter = phases_.begin();
 
     tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
+    scalarField& rho = trho.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        trho() += iter().boundaryField()[patchi]*iter().rho().value();
+        rho += iter().boundaryField()[patchi]*iter().rho().value();
     }
 
     return trho;
@@ -176,10 +175,11 @@ Foam::multiphaseMixture::mu() const
     PtrDictionary<phase>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
+    volScalarField& mu = tmu.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        tmu() += iter()*iter().rho()*iter().nu();
+        mu += iter()*iter().rho()*iter().nu();
     }
 
     return tmu;
@@ -195,10 +195,11 @@ Foam::multiphaseMixture::mu(const label patchi) const
         iter().boundaryField()[patchi]
        *iter().rho().value()
        *iter().nu(patchi);
+    scalarField& mu = tmu.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        tmu() +=
+        mu +=
             iter().boundaryField()[patchi]
            *iter().rho().value()
            *iter().nu(patchi);
@@ -215,10 +216,11 @@ Foam::multiphaseMixture::muf() const
 
     tmp<surfaceScalarField> tmuf =
         fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
+    surfaceScalarField& muf = tmuf.ref();
 
     for (++iter; iter != phases_.end(); ++iter)
     {
-        tmuf() +=
+        muf +=
             fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
     }
 
@@ -270,7 +272,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
         )
     );
 
-    surfaceScalarField& stf = tstf();
+    surfaceScalarField& stf = tstf.ref();
 
     forAllConstIter(PtrDictionary<phase>, phases_, iter1)
     {
@@ -521,7 +523,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
 {
     tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
 
-    correctContactAngle(alpha1, alpha2, tnHatfv().boundaryField());
+    correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryField());
 
     // Simple expression for curvature
     return -fvc::div(tnHatfv & mesh_.Sf());
@@ -548,7 +550,7 @@ Foam::multiphaseMixture::nearInterface() const
 
     forAllConstIter(PtrDictionary<phase>, phases_, iter)
     {
-        tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
+        tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
     }
 
     return tnearInt;
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H
index 794c0aca520f1df2e0c7a871125be70687bbbdae..421e45ae7da2d560c7e16341a78ed2b922fb21b5 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H
@@ -1,6 +1,6 @@
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(U) + fvm::div(phi, U)
   + MRF.DDt(U)
@@ -8,14 +8,15 @@ tmp<fvVectorMatrix> UEqn
  ==
     fvOptions(U)
 );
+fvVectorMatrix& UEqn = tUEqn.ref();
 
-UEqn().relax();
+UEqn.relax();
 
-fvOptions.constrain(UEqn());
+fvOptions.constrain(UEqn);
 
 if (pimple.momentumPredictor())
 {
-    solve(UEqn() == -fvc::grad(p_gh));
+    solve(UEqn == -fvc::grad(p_gh));
 
     fvOptions.correct(U);
 }
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H
index 40ba336dade1b08a83c2bd2c84d12a3e6c35e016..23845a4f7562ed9719e0a84fd96c3f51bdf5b696 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H
@@ -49,7 +49,7 @@ volVectorField zeta
         IOobject::AUTO_WRITE
     ),
     mesh,
-    dimensionedVector("zero", dimLength, vector::zero)
+    dimensionedVector("zero", dimLength, Zero)
 );
 
 Info<< "Creating field p_gh\n" << endl;
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
index 6a65b215b2b547d5c0ee824052e27ba4ceb0ad00..76a44bd13489c348aa5720e00f7c2ea67eddc180 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
@@ -1,33 +1,24 @@
-volScalarField rAU(1.0/UEqn().A());
+volScalarField rAU(1.0/UEqn.A());
 surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-volVectorField HbyA("HbyA", U);
-HbyA = rAU*UEqn().H();
+volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh));
 
 if (pimple.nCorrPISO() <= 1)
 {
-    UEqn.clear();
+    tUEqn.clear();
 }
 
 surfaceScalarField phiHbyA
 (
     "phiHbyA",
-    (fvc::interpolate(HbyA) & mesh.Sf())
+    fvc::flux(HbyA)
   + rAUf*fvc::ddtCorr(U, phi)
 );
 
 MRF.makeRelative(phiHbyA);
 adjustPhi(phiHbyA, U, p_gh);
 
-// Update the fixedFluxPressure BCs to ensure flux consistency
-setSnGrad<fixedFluxPressureFvPatchScalarField>
-(
-    p_gh.boundaryField(),
-    (
-        phiHbyA.boundaryField()
-      - (mesh.Sf().boundaryField() & U.boundaryField())
-    )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-);
+// Update the pressure BCs to ensure flux consistency
+constrainPressure(p_gh, U, phiHbyA, rAUf);
 
 // Non-orthogonal pressure corrector loop
 while (pimple.correctNonOrthogonal())
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H
index 01f548ad1687ec034c87b0f0a85343c4c4bad077..dac95a197465195446a47e6148ad796c5a969f14 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H
@@ -1,19 +1,17 @@
 {
-    rAU = 1.0/UEqn().A();
+    rAU = 1.0/UEqn.A();
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn().H();
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh));
 
     if (pimple.nCorrPISO() <= 1)
     {
-        UEqn.clear();
+        tUEqn.clear();
     }
 
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + rAUf*fvc::ddtCorr(U, Uf)
     );
 
@@ -26,15 +24,8 @@
         fvc::makeAbsolute(phiHbyA, U);
     }
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_gh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_gh, U, phiHbyA, rAUf);
 
     // Non-orthogonal pressure corrector loop
     while (pimple.correctNonOrthogonal())
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C
index 7687ba6aab21ffa0b3afd6ad8e619ba1f2365f09..9191bb5bf18b474d8da9fb6b36c5696ceff0a4c2 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,6 @@ Description
 #include "pimpleControl.H"
 #include "fvOptions.H"
 #include "CorrectPhi.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C
index 0bbb2c18071c9a6eaf6436b778a36426469da0e1..90113fe526e6ea9022d9c58df7ad48c4f76cc868 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,6 @@ Description
 #include "turbulentTransportModel.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/Allwclean
index 618570ccbb216ece90b34917fb8af9962bf6016e..5474c3349ab8cc606d3930dbc620b852c6ece9f5 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/reactingEulerFoam/Allwclean
@@ -8,4 +8,4 @@ wclean libso interfacialCompositionModels
 reactingTwoPhaseEulerFoam/Allwclean
 reactingMultiphaseEulerFoam/Allwclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/Allwmake
index 91c6cd94917756b6b2dc8d0fa72f6545aa3ef3b8..0757f76b3fd7a4473c441b5aee95fe5a43681179 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/reactingEulerFoam/Allwmake
@@ -1,13 +1,17 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 wmakeLnInclude interfacialModels
 wmakeLnInclude interfacialCompositionModels
-wmake libso phaseSystems
-wmake libso interfacialModels
-wmake libso interfacialCompositionModels
-reactingTwoPhaseEulerFoam/Allwmake
-reactingMultiphaseEulerFoam/Allwmake
+wmake $targetType phaseSystems
+wmake $targetType interfacialModels
+wmake $targetType interfacialCompositionModels
+reactingTwoPhaseEulerFoam/Allwmake $*
+reactingMultiphaseEulerFoam/Allwmake $*
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.H
index 8d9c6a73faf00a407a3eea5bf23131a9cc8e9cd8..60303766fc6e41d77df1231f92ca5965b1d5ca91 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,7 +119,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Henry.C"
+    #include "Henry.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C
index 5fd646c5ceeda5899f4107a19ae9d98538dc1329..ff5d3e5a6ed8e9b9fa762ed84dec9f7b7ab717e8 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,7 +153,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::D
         )
     );
 
-    volScalarField& D(tmpD());
+    volScalarField& D(tmpD.ref());
 
     forAll(p, cellI)
     {
@@ -207,7 +207,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L
         )
     );
 
-    volScalarField& L(tmpL());
+    volScalarField& L(tmpL.ref());
 
     forAll(p, cellI)
     {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H
index 4c2c4ad3de92c1cc5b0b7c1ea5a017825c0f974f..6aeea6e097d584a801ad427155ea6d4d2a4546c9 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,8 +45,8 @@ namespace Foam
 
 class phaseModel;
 class phasePair;
-template <class ThermoType> class pureMixture;
-template <class ThermoType> class multiComponentMixture;
+template<class ThermoType> class pureMixture;
+template<class ThermoType> class multiComponentMixture;
 
 /*---------------------------------------------------------------------------*\
                          Class InterfaceCompositionModel Declaration
@@ -150,10 +150,10 @@ public:
 // Instantiation for multi-component-multi-component pairs
 #define makeInterfaceCompositionType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
                                                                                \
-    typedef Thermo<Comp, SpecieMixture<Mix<Phys> > >                           \
+    typedef Thermo<Comp, SpecieMixture<Mix<Phys>>>                             \
         Type##Thermo##Comp##Mix##Phys;                                         \
                                                                                \
-    typedef OtherThermo<OtherComp, OtherMix<OtherPhys> >                       \
+    typedef OtherThermo<OtherComp, OtherMix<OtherPhys>>                        \
         Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys;              \
                                                                                \
     addInterfaceCompositionToRunTimeSelectionTable                             \
@@ -166,10 +166,10 @@ public:
 // Instantiation for multi-component-single-component pairs
 #define makeSpecieInterfaceCompositionType(Type, Thermo, Comp, Mix, Phys, OtherThermo, OtherComp, OtherMix, OtherPhys)\
                                                                                \
-    typedef Thermo<Comp, SpecieMixture<Mix<Phys> > >                           \
+    typedef Thermo<Comp, SpecieMixture<Mix<Phys>>>                             \
         Type##Thermo##Comp##Mix##Phys;                                         \
                                                                                \
-    typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys> > >       \
+    typedef OtherThermo<OtherComp, SpecieMixture<OtherMix<OtherPhys>>>         \
         Type##Other##OtherThermo##OtherComp##OtherMix##OtherPhys;              \
                                                                                \
     addInterfaceCompositionToRunTimeSelectionTable                             \
@@ -206,7 +206,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InterfaceCompositionModel.C"
+    #include "InterfaceCompositionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H
index f0197e77f7c394132f84fbb71767d5ee25495f37..601806164a32ae4251e6e4671f18cc52e57c0e26 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/NonRandomTwoLiquid/NonRandomTwoLiquid.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NonRandomTwoLiquid.C"
+    #include "NonRandomTwoLiquid.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C
index e8f16ee9aefc9b3d52ef1ded167dd6a54cf15442..0cc976c042e4b356bddf2b3563992f5871561566 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ void Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::update
 
     forAllIter
     (
-        HashTable<autoPtr<interfaceCompositionModel> >,
+        HashTable<autoPtr<interfaceCompositionModel>>,
         speciesModels_,
         iter
     )
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.H
index 103c8d048c3860f4440f2d2d87aef527e245fa9d..2844539222defbd1674e9a6a675c568ff1d48390 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ private:
         volScalarField YNonVapourPrime_;
 
         //- Species' individual composition models
-        HashTable<autoPtr<interfaceCompositionModel> > speciesModels_;
+        HashTable<autoPtr<interfaceCompositionModel>> speciesModels_;
 
 
 public:
@@ -120,7 +120,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Raoult.C"
+    #include "Raoult.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H
index 758bd3a0ad73488f0ba4485bfa57e105d6fe34d7..a585447a1e03c213b4164a96e59a533f28005331 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Saturated/Saturated.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Saturated.C"
+    #include "Saturated.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C
index 90f1c989c525ed1451283232f8011b66fe593cd2..b5b0629df184730bc52d31099c218b62df59c699 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine/Antoine.C
@@ -95,7 +95,9 @@ Foam::saturationModels::Antoine::Tsat
     const volScalarField& p
 ) const
 {
-    return B_/(log(p) - A_) - C_;
+    return
+        B_/(log(p*dimensionedScalar("one", dimless/dimPressure, 1)) - A_)
+      - C_;
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C
index 886fefe8e89925d539a5030846f12f8f9b89fb0a..a2fbcd0bbcc61d9068ccfbd42e33fbd5c59e82af 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ Foam::saturationModels::polynomial::Tsat
         )
     );
 
-    volScalarField& Tsat = tTsat();
+    volScalarField& Tsat = tTsat.ref();
 
     forAll(Tsat,celli)
     {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files
index 1293886cdef25f604eda869e4e0afaa3b29f1c40..aff39a6ded1610ebcd9ef4117e7bb92b46dce4dc 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files
@@ -10,6 +10,7 @@ dragModels/SchillerNaumann/SchillerNaumann.C
 dragModels/SyamlalOBrien/SyamlalOBrien.C
 dragModels/TomiyamaCorrelated/TomiyamaCorrelated.C
 dragModels/TomiyamaAnalytic/TomiyamaAnalytic.C
+dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.C
 dragModels/WenYu/WenYu.C
 dragModels/IshiiZuber/IshiiZuber.C
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.C
new file mode 100644
index 0000000000000000000000000000000000000000..6e3db4231f24ccba66935d79b3c01758aadf39ef
--- /dev/null
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.C
@@ -0,0 +1,86 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "TomiyamaKataokaZunSakaguchi.H"
+#include "phasePair.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace dragModels
+{
+    defineTypeNameAndDebug(TomiyamaKataokaZunSakaguchi, 0);
+    addToRunTimeSelectionTable
+    (
+        dragModel,
+        TomiyamaKataokaZunSakaguchi,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::dragModels::TomiyamaKataokaZunSakaguchi::TomiyamaKataokaZunSakaguchi
+(
+    const dictionary& dict,
+    const phasePair& pair,
+    const bool registerObject
+)
+:
+    dragModel(dict, pair, registerObject),
+    residualRe_("residualRe", dimless, dict),
+    residualEo_("residualEo", dimless, dict)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::dragModels::TomiyamaKataokaZunSakaguchi::~TomiyamaKataokaZunSakaguchi()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::tmp<Foam::volScalarField>
+Foam::dragModels::TomiyamaKataokaZunSakaguchi::CdRe() const
+{
+    volScalarField Re(pair_.Re());
+    volScalarField Eo(max(pair_.Eo(), residualEo_));
+
+    return
+        max
+        (
+            24.0*(1.0 + 0.15*pow(Re, 0.687))/max(Re, residualRe_),
+            8.0*Eo/(3.0*(Eo + 4.0))
+        )
+       *max(pair_.Re(), residualRe_);
+}
+
+
+// ************************************************************************* //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.H
new file mode 100644
index 0000000000000000000000000000000000000000..fb0ba6768fbb77c87be5ffcbeca57131ee3bc396
--- /dev/null
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi/TomiyamaKataokaZunSakaguchi.H
@@ -0,0 +1,113 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::dragModels::TomiyamaKataokaZunSakaguchi
+
+Description
+    Drag model for gas-liquid system of Tomiyama et al.
+
+    Reference:
+    \verbatim
+        "Drag coefficients of single bubbles under normal and microgravity
+         conditions"
+        Tomiyama, A., Kataoka, I., Zun, I., Sakaguchi, T.
+        JSME International Series B, Fluids and Thermal Engineering,
+        Vol. 41, 1998, pp. 472-479
+    \endverbatim
+
+SourceFiles
+    TomiyamaKataokaZunSakaguchi.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef TomiyamaKataokaZunSakaguchi_H
+#define TomiyamaKataokaZunSakaguchi_H
+
+#include "dragModel.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+class phasePair;
+
+namespace dragModels
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class TomiyamaKataokaZunSakaguchi Declaration
+\*---------------------------------------------------------------------------*/
+
+class TomiyamaKataokaZunSakaguchi
+:
+    public dragModel
+{
+    // Private data
+
+        //- Residual Reynolds Number
+        const dimensionedScalar residualRe_;
+
+        //- Residual Eotvos number
+        const dimensionedScalar residualEo_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("TomiyamaKataokaZunSakaguchi");
+
+
+    // Constructors
+
+        //- Construct from a dictionary and a phase pair
+        TomiyamaKataokaZunSakaguchi
+        (
+            const dictionary& dict,
+            const phasePair& pair,
+            const bool registerObject
+        );
+
+
+    //- Destructor
+    virtual ~TomiyamaKataokaZunSakaguchi();
+
+
+    // Member Functions
+
+        //- Drag coefficient
+        virtual tmp<volScalarField> CdRe() const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace dragModels
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C
index 00ca3d49ee1986980c8c2335c72381acaed41b54..ed45643189b03bd570163ff4cd2c0e7c5ad26024 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,6 +27,7 @@ License
 #include "phasePair.H"
 #include "fvcGrad.H"
 #include "surfaceInterpolate.H"
+#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C
index 79e52a2856a73b68857a05cd65e69f26a55190cd..7c0bf86c94f61c7461686703c207d6a89a583312 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "liftModel.H"
 #include "phasePair.H"
 #include "fvcCurl.H"
+#include "fvcFlux.H"
 #include "surfaceInterpolate.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -78,11 +79,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModel::F() const
 
 Foam::tmp<Foam::surfaceScalarField> Foam::liftModel::Ff() const
 {
-    const fvMesh& mesh(this->pair_.phase1().mesh());
-
-    return
-        fvc::interpolate(pair_.dispersed())
-       *(fvc::interpolate(Fi()) & mesh.Sf());
+    return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C
index d4e13d5c7f644bde99ea653bd899ef7055868bae..f8480dc69b79199bb96b6bf5184c01cf33bec6b8 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F() const
                 false
             ),
             mesh,
-            dimensionedVector("zero", dimF, vector::zero)
+            dimensionedVector("zero", dimF, Zero)
         )
     );
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
index 5845e3569a6e4e947247a870c6d4afb4e74115cd..2a65c1e1c6acab6f98869b33587874fba0355a12 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const
                     mesh
                 ),
                 mesh,
-                dimensionedVector("zero", dimF, vector::zero)
+                dimensionedVector("zero", dimF, Zero)
             )
         );
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C
index 0b2c7b501297aac7928846a492bca32024fb86b1..80cdae42c736e9b8705d745867f9fe571971fad1 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,8 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Antal::Fi() const
 
     const volVectorField& n(nWall());
 
-    return
+    return zeroGradWalls
+    (
         max
         (
             dimensionedScalar("zero", dimless/dimLength, 0),
@@ -80,7 +81,8 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Antal::Fi() const
         )
        *pair_.continuous().rho()
        *magSqr(Ur - (Ur & n)*n)
-       *n;
+       *n
+    );
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C
index 0b9065a1a9dc49c6f2d2371e8769a86169cc9539..6fc194016583438ccf980da3613478f6ac28dc15 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,8 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Frank::Fi() const
     volScalarField Eo(pair_.Eo());
     volScalarField yTilde(y/(Cwc_*pair_.dispersed().d()));
 
-    return
+    return zeroGradWalls
+    (
         (
             pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179)
           + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187)
@@ -90,7 +91,8 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Frank::Fi() const
         )
        *pair_.continuous().rho()
        *magSqr(Ur - (Ur & n)*n)
-       *n;
+       *n
+    );
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C
index 9209c5108cd3d71a0275bef4e2900ffe05509d47..f6a14929003e938a8321e5fb794c6c19f4d044e7 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,8 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::Fi() const
 
     volScalarField Eo(pair_.Eo());
 
-    return
+    return zeroGradWalls
+    (
         (
             pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179)
           + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187)
@@ -89,7 +90,8 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::Fi() const
         )
        *pair_.continuous().rho()
        *magSqr(Ur - (Ur & n)*n)
-       *n;
+       *n
+    );
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C
index 8de7e302608272b3db1b4faa769d54125acfb188..b35bd0ef8fd4451464db3c7b7109e2dec7fb53fd 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ Foam::wallLubricationModels::noWallLubrication::Fi() const
                 false
             ),
             mesh,
-            dimensionedVector("zero", dimF, vector::zero)
+            dimensionedVector("zero", dimF, Zero)
         )
     );
 }
@@ -108,7 +108,7 @@ Foam::wallLubricationModels::noWallLubrication::F() const
                 false
             ),
             mesh,
-            dimensionedVector("zero", dimF, vector::zero)
+            dimensionedVector("zero", dimF, Zero)
         )
     );
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C
index 2f3cb1aaa032019aba8a4278fe2e973e7f7b8c85..a2a95cce05733d902c263dac63511a67309d99d5 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,9 @@ License
 
 #include "wallLubricationModel.H"
 #include "phasePair.H"
+#include "fvcFlux.H"
 #include "surfaceInterpolate.H"
+#include "wallFvPatch.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -38,6 +40,29 @@ namespace Foam
 const Foam::dimensionSet Foam::wallLubricationModel::dimF(1, -2, -2, 0, 0);
 
 
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+Foam::tmp<Foam::volVectorField> Foam::wallLubricationModel::zeroGradWalls
+(
+    tmp<volVectorField> tFi
+) const
+{
+    volVectorField& Fi = tFi.ref();
+    const fvPatchList& patches =  Fi.mesh().boundary();
+
+    forAll(patches, patchi)
+    {
+        if (isA<wallFvPatch>(patches[patchi]))
+        {
+            fvPatchVectorField& Fiw = Fi.boundaryField()[patchi];
+            Fiw = Fiw.patchInternalField();
+        }
+    }
+
+    return tFi;
+}
+
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::wallLubricationModel::wallLubricationModel
@@ -67,11 +92,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModel::F() const
 
 Foam::tmp<Foam::surfaceScalarField> Foam::wallLubricationModel::Ff() const
 {
-    const fvMesh& mesh(this->pair_.phase1().mesh());
-
-    return
-        fvc::interpolate(pair_.dispersed())
-       *(fvc::interpolate(Fi()) & mesh.Sf());
+    return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H
index b55415aeb62e6f930ee95d31ce87b7f75d85427a..53e8a916b6096e702448e289f4962f7e5edc58c7 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,6 +63,12 @@ protected:
         const phasePair& pair_;
 
 
+    // Protected member functions
+
+        //- Zero-gradient wall-lubrication force at walls
+        tmp<volVectorField> zeroGradWalls(tmp<volVectorField>) const;
+
+
 public:
 
     //- Runtime type information
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C
index 36e31630a49daedc405f2057caba294528aa0a63..abff13475e1b4159174791dfbf93c96542deafa4 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,18 +36,18 @@ void Foam::BlendedInterfacialModel<ModelType>::correctFixedFluxBCs
     GeometricField& field
 ) const
 {
-    forAll(phase1_.phi()->boundaryField(), patchI)
+    forAll(phase1_.phi()().boundaryField(), patchI)
     {
         if
         (
             isA<fixedValueFvsPatchScalarField>
             (
-                phase1_.phi()->boundaryField()[patchI]
+                phase1_.phi()().boundaryField()[patchI]
             )
         )
         {
             field.boundaryField()[patchI]
-              = pTraits<typename GeometricField::value_type>::zero;
+              = Zero;
         }
     }
 }
@@ -199,15 +199,15 @@ Foam::BlendedInterfacialModel<ModelType>::K() const
 
     if (model_.valid())
     {
-        x() += model_->K()*(scalar(1) - f1() - f2());
+        x.ref() += model_->K()*(scalar(1) - f1() - f2());
     }
     if (model1In2_.valid())
     {
-        x() += model1In2_->K()*f1;
+        x.ref() += model1In2_->K()*f1;
     }
     if (model2In1_.valid())
     {
-        x() += model2In1_->K()*f2;
+        x.ref() += model2In1_->K()*f2;
     }
 
     if
@@ -216,7 +216,7 @@ Foam::BlendedInterfacialModel<ModelType>::K() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -259,15 +259,15 @@ Foam::BlendedInterfacialModel<ModelType>::K(const scalar residualAlpha) const
 
     if (model_.valid())
     {
-        x() += model_->K(residualAlpha)*(scalar(1) - f1() - f2());
+        x.ref() += model_->K(residualAlpha)*(scalar(1) - f1() - f2());
     }
     if (model1In2_.valid())
     {
-        x() += model1In2_->K(residualAlpha)*f1;
+        x.ref() += model1In2_->K(residualAlpha)*f1;
     }
     if (model2In1_.valid())
     {
-        x() += model2In1_->K(residualAlpha)*f2;
+        x.ref() += model2In1_->K(residualAlpha)*f2;
     }
 
     if
@@ -276,7 +276,7 @@ Foam::BlendedInterfacialModel<ModelType>::K(const scalar residualAlpha) const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -325,17 +325,17 @@ Foam::BlendedInterfacialModel<ModelType>::Kf() const
 
     if (model_.valid())
     {
-        x() += model_->Kf()*(scalar(1) - f1() - f2());
+        x.ref() += model_->Kf()*(scalar(1) - f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->Kf()*f1;
+        x.ref() += model1In2_->Kf()*f1;
     }
 
     if (model2In1_.valid())
     {
-        x() += model2In1_->Kf()*f2;
+        x.ref() += model2In1_->Kf()*f2;
     }
 
     if
@@ -344,7 +344,7 @@ Foam::BlendedInterfacialModel<ModelType>::Kf() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -353,7 +353,7 @@ Foam::BlendedInterfacialModel<ModelType>::Kf() const
 
 template<class ModelType>
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::BlendedInterfacialModel<ModelType>::F() const
 {
     tmp<volScalarField> f1, f2;
@@ -368,7 +368,7 @@ Foam::BlendedInterfacialModel<ModelType>::F() const
         f2 = blending_.f2(phase1_, phase2_);
     }
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > x
+    tmp<GeometricField<Type, fvPatchField, volMesh>> x
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -382,23 +382,23 @@ Foam::BlendedInterfacialModel<ModelType>::F() const
                 false
             ),
             phase1_.mesh(),
-            dimensioned<Type>("zero", ModelType::dimF, pTraits<Type>::zero)
+            dimensioned<Type>("zero", ModelType::dimF, Zero)
         )
     );
 
     if (model_.valid())
     {
-        x() += model_->F()*(scalar(1) - f1() - f2());
+        x.ref() += model_->F()*(scalar(1) - f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->F()*f1;
+        x.ref() += model1In2_->F()*f1;
     }
 
     if (model2In1_.valid())
     {
-        x() -= model2In1_->F()*f2; // note : subtraction
+        x.ref() -= model2In1_->F()*f2; // note : subtraction
     }
 
     if
@@ -407,7 +407,7 @@ Foam::BlendedInterfacialModel<ModelType>::F() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -456,17 +456,17 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const
 
     if (model_.valid())
     {
-        x() += model_->Ff()*(scalar(1) - f1() - f2());
+        x.ref() += model_->Ff()*(scalar(1) - f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->Ff()*f1;
+        x.ref() += model1In2_->Ff()*f1;
     }
 
     if (model2In1_.valid())
     {
-        x() -= model2In1_->Ff()*f2; // note : subtraction
+        x.ref() -= model2In1_->Ff()*f2; // note : subtraction
     }
 
     if
@@ -475,7 +475,7 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -518,15 +518,15 @@ Foam::BlendedInterfacialModel<ModelType>::D() const
 
     if (model_.valid())
     {
-        x() += model_->D()*(scalar(1) - f1() - f2());
+        x.ref() += model_->D()*(scalar(1) - f1() - f2());
     }
     if (model1In2_.valid())
     {
-        x() += model1In2_->D()*f1;
+        x.ref() += model1In2_->D()*f1;
     }
     if (model2In1_.valid())
     {
-        x() += model2In1_->D()*f2;
+        x.ref() += model2In1_->D()*f2;
     }
 
     if
@@ -535,7 +535,7 @@ Foam::BlendedInterfacialModel<ModelType>::D() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H
index 4be8f0b347ea5178e9317f44ce55616893052e59..c51599d58ccd29c285fb5798ab726479194fe0bd 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -144,7 +144,7 @@ public:
 
         //- Return the blended force
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > F() const;
+        tmp<GeometricField<Type, fvPatchField, volMesh>> F() const;
 
         //- Return the face blended force
         tmp<surfaceScalarField> Ff() const;
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C
index 3db07ef8044bd6357e5e2cebc13732914ec2a2b9..c63f6bfd447ba2b4d91e4d33cfb019ff9dc5438a 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,6 +34,7 @@ License
 #include "fvcDiv.H"
 #include "fvmSup.H"
 #include "fvMatrix.H"
+#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -217,7 +218,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::dmdt
         {
             if (phase1 == &phase)
             {
-                tdmdt() += this->dmdt(pair);
+                tdmdt.ref() += this->dmdt(pair);
             }
 
             Swap(phase1, phase2);
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H
index 3a0cbd4ba23dd7c3e2eafe8e17c519f3798cbba6..550c0d104397d3f31437d9b7ef393c4083eb6c9c 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ SourceFiles
 namespace Foam
 {
 
-template <class modelType>
+template<class modelType>
 class BlendedInterfacialModel;
 
 class blendingMethod;
@@ -67,7 +67,7 @@ protected:
         <
             HashTable
             <
-                autoPtr<BlendedInterfacialModel<heatTransferModel> >
+                autoPtr<BlendedInterfacialModel<heatTransferModel>>
             >,
             phasePairKey,
             phasePairKey::hash
@@ -77,7 +77,7 @@ protected:
         <
             HashTable
             <
-                autoPtr<BlendedInterfacialModel<massTransferModel> >
+                autoPtr<BlendedInterfacialModel<massTransferModel>>
             >,
             phasePairKey,
             phasePairKey::hash
@@ -156,7 +156,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "HeatAndMassTransferPhaseSystem.C"
+    #include "HeatAndMassTransferPhaseSystem.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H
index 0c908239fdb9a18f451a305c35d8f6f47584aa03..d313aa7e657bcd6db1c5161755a8ca1ae91e40da 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ namespace Foam
 {
 
 class blendingMethod;
-template <class modelType> class BlendedInterfacialModel;
+template<class modelType> class BlendedInterfacialModel;
 class heatTransferModel;
 
 /*---------------------------------------------------------------------------*\
@@ -61,7 +61,7 @@ protected:
 
         typedef HashTable
         <
-            autoPtr<BlendedInterfacialModel<heatTransferModel> >,
+            autoPtr<BlendedInterfacialModel<heatTransferModel>>,
             phasePairKey,
             phasePairKey::hash
         > heatTransferModelTable;
@@ -121,7 +121,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "HeatTransferPhaseSystem.C"
+    #include "HeatTransferPhaseSystem.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H
index b87c5a709da68677ed6c29e919831a93f04e59c6..0052008abc84aca98b7828880e72302b91196476 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InterfaceCompositionPhaseChangePhaseSystem.C"
+    #include "InterfaceCompositionPhaseChangePhaseSystem.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C
index f50bd61f9ea540d88f3b4822eb5dbc5395f98128..b9859eb41d07956825a509ce71274b1b8249dade 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -201,7 +201,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Kd
         {
             if (phase1 == &phase)
             {
-                tKd() += K;
+                tKd.ref() += K;
             }
 
             Swap(phase1, phase2);
@@ -317,7 +317,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::F
                     false
                 ),
                 this->mesh_,
-                dimensionedVector("zero", liftModel::dimF, vector::zero)
+                dimensionedVector("zero", liftModel::dimF, Zero)
             )
         );
     }
@@ -533,7 +533,7 @@ Foam::volVectorField& Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setF
                     false
                 ),
                 this->mesh_,
-                dimensionedVector("zero", liftModel::dimF, vector::zero)
+                dimensionedVector("zero", liftModel::dimF, Zero)
             )
         );
     }
@@ -543,10 +543,10 @@ Foam::volVectorField& Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setF
 
 
 template<class BasePhaseSystem>
-Foam::autoPtr<Foam::PtrList<Foam::volVectorField> >
+Foam::autoPtr<Foam::PtrList<Foam::volVectorField>>
 Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const
 {
-    autoPtr<PtrList<volVectorField> > tFs
+    autoPtr<PtrList<volVectorField>> tFs
     (
         new PtrList<volVectorField>(this->phases().size())
     );
@@ -628,13 +628,13 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setPhiD
 
 
 template<class BasePhaseSystem>
-Foam::autoPtr<Foam::PtrList<Foam::surfaceScalarField> >
+Foam::autoPtr<Foam::PtrList<Foam::surfaceScalarField>>
 Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::phiDs
 (
     const PtrList<volScalarField>& rAUs
 ) const
 {
-    autoPtr<PtrList<surfaceScalarField> > tphiDs
+    autoPtr<PtrList<surfaceScalarField>> tphiDs
     (
         new PtrList<surfaceScalarField>(this->phases().size())
     );
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H
index 2f787ed004a96329fc1cd8b11fd81d517286ac85..e6a3209f1c5f11a055d2230924793df2fd5997fc 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ SourceFiles
 namespace Foam
 {
 
-template <class modelType>
+template<class modelType>
 class BlendedInterfacialModel;
 
 class blendingMethod;
@@ -72,35 +72,35 @@ protected:
 
         typedef HashTable
         <
-            autoPtr<BlendedInterfacialModel<dragModel> >,
+            autoPtr<BlendedInterfacialModel<dragModel>>,
             phasePairKey,
             phasePairKey::hash
         > dragModelTable;
 
         typedef HashTable
         <
-            autoPtr<BlendedInterfacialModel<virtualMassModel> >,
+            autoPtr<BlendedInterfacialModel<virtualMassModel>>,
             phasePairKey,
             phasePairKey::hash
         > virtualMassModelTable;
 
         typedef HashTable
         <
-            autoPtr<BlendedInterfacialModel<liftModel> >,
+            autoPtr<BlendedInterfacialModel<liftModel>>,
             phasePairKey,
             phasePairKey::hash
         > liftModelTable;
 
         typedef HashTable
         <
-            autoPtr<BlendedInterfacialModel<wallLubricationModel> >,
+            autoPtr<BlendedInterfacialModel<wallLubricationModel>>,
             phasePairKey,
             phasePairKey::hash
         > wallLubricationModelTable;
 
         typedef HashTable
         <
-            autoPtr<BlendedInterfacialModel<turbulentDispersionModel> >,
+            autoPtr<BlendedInterfacialModel<turbulentDispersionModel>>,
             phasePairKey,
             phasePairKey::hash
         > turbulentDispersionModelTable;
@@ -187,10 +187,10 @@ public:
         virtual tmp<volVectorField> F(const phasePairKey& key) const;
 
         //- Return the combined force (lift + wall-lubrication)
-        virtual autoPtr<PtrList<volVectorField> > Fs() const;
+        virtual autoPtr<PtrList<volVectorField>> Fs() const;
 
         //- Return the turbulent dispersion force on faces for phase pair
-        virtual autoPtr<PtrList<surfaceScalarField> > phiDs
+        virtual autoPtr<PtrList<surfaceScalarField>> phiDs
         (
             const PtrList<volScalarField>& rAUs
         ) const;
@@ -218,7 +218,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MomentumTransferPhaseSystem.C"
+    #include "MomentumTransferPhaseSystem.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H
index b54c183150a83323167d461c58e260b4469e7317..c1ab9e7c9c089846cffc51e4d1b9280ef1c4ff38 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ThermalPhaseChangePhaseSystem.C"
+    #include "ThermalPhaseChangePhaseSystem.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C
index b737cd0322276dfe26acc9e9f026085cd38c0272..6ca75c6ed49838560e37e30cdb4daa8ff72e3688 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,13 +112,13 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
     // Add the appropriate pressure-work term
     if (he.name() == this->thermo_->phasePropertyName("e"))
     {
-        tEEqn() +=
+        tEEqn.ref() +=
             fvc::ddt(alpha)*this->thermo().p()
           + fvc::div(alphaPhi, this->thermo().p());
     }
     else if (this->thermo_->dpdt())
     {
-        tEEqn() -= alpha*this->fluid().dpdt();
+        tEEqn.ref() -= alpha*this->fluid().dpdt();
     }
 
     return tEEqn;
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H
index 1b7ec2f615a5ccc1a9a29777c58865abcff9a301..7a9cbd51bfb1a0b3f1a887a6eb6c1215afe284e4 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AnisothermalPhaseModel.C"
+    #include "AnisothermalPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C
index ba5e90459bf7da610f725cfa9173c607d8e28887..bd4dda226faab597b5a2b62baec640eb626d031b 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,8 +78,7 @@ Foam::InertPhaseModel<BasePhaseModel>::Sh() const
                 this->mesh()
             ),
             this->mesh(),
-            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0)
         )
     );
 }
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H
index 77823d44913610eebdabda9bbabac558445b7685..26c9661ab7e7e015ca798b46da567b6c3ab294ea 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,7 +90,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InertPhaseModel.C"
+    #include "InertPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H
index bdf1a14aed60fd762c52d544f122b24c1c55dab7..85a31f8807aafa5ecb90dc7ed3bb1c7c2329c4bb 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IsothermalPhaseModel.C"
+    #include "IsothermalPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C
index 0b87f228ff33bfdc5edb5df27ef6695de1571ebd..2f7bfcc108d0e9456cf53515b9f408382f1d6b2c 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,6 +35,7 @@ License
 #include "fvmSup.H"
 #include "fvcDdt.H"
 #include "fvcDiv.H"
+#include "fvcFlux.H"
 #include "surfaceInterpolate.H"
 #include "fvMatrix.H"
 
@@ -109,7 +110,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::phi(const volVectorField& U) const
                     IOobject::NO_READ,
                     IOobject::AUTO_WRITE
                 ),
-                fvc::interpolate(U) & U.mesh().Sf(),
+                fvc::flux(U),
                 phiTypes
             )
         );
@@ -172,7 +173,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
             fluid.mesh()
         ),
         fluid.mesh(),
-        dimensionedVector("0", dimAcceleration, vector::zero)
+        dimensionedVector("0", dimAcceleration, Zero)
     ),
     divU_(NULL),
     turbulence_
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H
index 6c5da0bde9b29687a37008852ba2eb4a815303d2..864a6b4259abe237100f48a92af5967fc66e4ac1 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -196,7 +196,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MovingPhaseModel.C"
+    #include "MovingPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H
index 862f75646eed8fc6ed53863880e802e96cb75f6f..d869907a33c4d9c48e1994dd8918862d070e3017 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ Description
 
 namespace Foam
 {
-      typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel> >
+      typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel>>
           phaseCompressibleTurbulenceModel;
 }
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H
index 9600f6ef9b3c2394d3e7615d8648464ea36646cc..417c6cea6d25824a3a2af33da779ab8f57501525 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/phaseCompressibleTurbulenceModelFwd.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ namespace Foam
     template<class BasicTurbulenceModel>
     class ThermalDiffusivity;
 
-      typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel> >
+      typedef ThermalDiffusivity<PhaseCompressibleTurbulenceModel<phaseModel>>
           phaseCompressibleTurbulenceModel;
 }
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H
index 94ca80582c4c056d10ead927d564e1ba06511d06..6bbab1cf5631432d5270557f1ef16e329305897c 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MultiComponentPhaseModel.C"
+    #include "MultiComponentPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H
index 2aa8034ede7ca95a15e643afe54fc5274ffcd418..ff42fbe714c8c5654240677ed07bccd6467f9cbe 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PurePhaseModel.C"
+    #include "PurePhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H
index 305b62590a891248d759e1f1304909a9e88437d3..e05c71b44a5b143fd8724ec0c0c223aa50440f98 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReactingPhaseModel.C"
+    #include "ReactingPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H
index 960d2c1ba68c1b01cce98ffa1a0ac72f578579cd..56289cbf78c2c554ae367b62b5841785492797a2 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ThermoPhaseModel.C"
+    #include "ThermoPhaseModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C
index 4efd86189bcde934878f596d2e26e0c6552aa082..b9abe549a0bf1e7068d462f77fc8dce79df18f00 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::phaseSystem::calcPhi
 
     for (label phasei=1; phasei<phaseModels.size(); phasei++)
     {
-        tmpPhi() +=
+        tmpPhi.ref() +=
             fvc::interpolate(phaseModels[phasei])*phaseModels[phasei].phi();
     }
 
@@ -154,8 +154,7 @@ Foam::phaseSystem::phaseSystem
         dimensionedScalar("dpdt", dimPressure/dimTime, 0)
     ),
 
-    MRF_(mesh_),
-    fvOptions_(mesh_)
+    MRF_(mesh_)
 {
     phi_.writeOpt() = IOobject::AUTO_WRITE;
 
@@ -198,7 +197,7 @@ Foam::tmp<Foam::volScalarField> Foam::phaseSystem::rho() const
 
     for (label phasei=1; phasei<phaseModels_.size(); phasei++)
     {
-        tmpRho() += phaseModels_[phasei]*phaseModels_[phasei].rho();
+        tmpRho.ref() += phaseModels_[phasei]*phaseModels_[phasei].rho();
     }
 
     return tmpRho;
@@ -214,7 +213,7 @@ Foam::tmp<Foam::volVectorField> Foam::phaseSystem::U() const
 
     for (label phasei=1; phasei<phaseModels_.size(); phasei++)
     {
-        tmpU() += phaseModels_[phasei]*phaseModels_[phasei].U();
+        tmpU.ref() += phaseModels_[phasei]*phaseModels_[phasei].U();
     }
 
     return tmpU;
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H
index c5ec2aa501b3dbff36807f9873e0a0ec3ef5ca76..9bfaebd9f7ac29b013c5c8d64c677f1ddb0e2b7c 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ namespace Foam
 {
 
 class blendingMethod;
-template <class modelType> class BlendedInterfacialModel;
+template<class modelType> class BlendedInterfacialModel;
 class surfaceTensionModel;
 class aspectRatioModel;
 
@@ -176,9 +176,6 @@ protected:
         //- Optional MRF zones
         IOMRFZoneList MRF_;
 
-        //- Optional FV-options
-        mutable fv::options fvOptions_;
-
         //- Blending methods
         blendingMethodTable blendingMethods_;
 
@@ -239,7 +236,7 @@ protected:
             const word& modelName,
             HashTable
             <
-                autoPtr<BlendedInterfacialModel<modelType> >,
+                autoPtr<BlendedInterfacialModel<modelType>>,
                 phasePairKey,
                 phasePairKey::hash
             >& models
@@ -252,7 +249,7 @@ protected:
             const word& modelName,
             HashTable
             <
-                HashTable<autoPtr<modelType> >,
+                HashTable<autoPtr<modelType>>,
                 phasePairKey,
                 phasePairKey::hash
             >& models
@@ -323,11 +320,11 @@ public:
         inline fv::options& fvOptions() const;
 
         //- Access a sub model between a phase pair
-        template <class modelType>
+        template<class modelType>
         const modelType& lookupSubModel(const phasePair& key) const;
 
         //- Access a sub model between two phases
-        template <class modelType>
+        template<class modelType>
         const modelType& lookupSubModel
         (
             const phaseModel& dispersed,
@@ -368,7 +365,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "phaseSystemTemplates.C"
+    #include "phaseSystemTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H
index 125d286d9d4e35d6f7aa1d3c39f2e1bd10da62ec..7f0e73be5612fb4ff6de2be62df5c99680a56289 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemI.H
@@ -84,7 +84,7 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const
 
 inline Foam::fv::options& Foam::phaseSystem::fvOptions() const
 {
-    return fvOptions_;
+    return fv::options::New(mesh_);
 }
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C
index eee3fcd3b3f948310157a878b0b4e0027d682d05..3ab4a91ec5b2533ad258904f8aab0733ce2e16a3 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ void Foam::phaseSystem::generatePairsAndSubModels
     const word& modelName,
     HashTable
     <
-        autoPtr<BlendedInterfacialModel<modelType> >,
+        autoPtr<BlendedInterfacialModel<modelType>>,
         phasePairKey,
         phasePairKey::hash
     >& models
@@ -118,7 +118,7 @@ void Foam::phaseSystem::generatePairsAndSubModels
         models.insert
         (
             key,
-            autoPtr<BlendedInterfacialModel<modelType> >
+            autoPtr<BlendedInterfacialModel<modelType>>
             (
                 new BlendedInterfacialModel<modelType>
                 (
@@ -141,7 +141,7 @@ void Foam::phaseSystem::generatePairsAndSubModels
     const word& modelName,
     HashTable
     <
-        HashTable<autoPtr<modelType> >,
+        HashTable<autoPtr<modelType>>,
         phasePairKey,
         phasePairKey::hash
     >& models
@@ -169,7 +169,7 @@ void Foam::phaseSystem::generatePairsAndSubModels
                 models.insert
                 (
                     key,
-                    HashTable<autoPtr<modelType> >()
+                    HashTable<autoPtr<modelType>>()
                 );
             }
 
@@ -182,7 +182,7 @@ void Foam::phaseSystem::generatePairsAndSubModels
     }
 }
 
-template <class modelType>
+template<class modelType>
 const modelType& Foam::phaseSystem::lookupSubModel(const phasePair& key) const
 {
     return
@@ -193,7 +193,7 @@ const modelType& Foam::phaseSystem::lookupSubModel(const phasePair& key) const
 }
 
 
-template <class modelType>
+template<class modelType>
 const modelType& Foam::phaseSystem::lookupSubModel
 (
     const phaseModel& dispersed,
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean
index 93ee94face2158640ba291e93b2489cd0e9917c2..983c20bdc16eb3af101b8d91242d7f8c6b90f31c 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso multiphaseSystem
 wclean libso multiphaseCompressibleTurbulenceModels
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake
index c60b665df4f0c0cf68d749bddb9aa3d7cb8186f4..42f430bf17f475d0301a930da2c5591edebcd74a 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso multiphaseSystem
-wmake libso multiphaseCompressibleTurbulenceModels
+wmake $targetType multiphaseSystem
+wmake $targetType multiphaseCompressibleTurbulenceModels
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H
index 422f6324b1db3a15caeca4b1d7e8af961310751e..0130a872c905f8c2eef12af71d4b8e83aeb8081d 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H
@@ -29,13 +29,14 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
             );
 
             EEqn->relax();
-            fvOptions.constrain(EEqn());
+            fvOptions.constrain(EEqn.ref());
             EEqn->solve();
         }
     }
+
+    fluid.correctThermo();
 }
 
-fluid.correctThermo();
 
 forAll(phases, phasei)
 {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
index 2b06f1a7f452f17f9bf6801e1d6deabb66f384ef..b81e174db878bfe6fbd061764179cc07e0c7ed19 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,13 +64,13 @@ void Foam::multiphaseSystem::calcAlphas()
         alphas_ += level*phases()[i];
         level += 1.0;
     }
-
-    alphas_.correctBoundaryConditions();
 }
 
 
 void Foam::multiphaseSystem::solveAlphas()
 {
+    bool LTS = fv::localEulerDdt::enabled(mesh_);
+
     PtrList<surfaceScalarField> alphaPhiCorrs(phases().size());
     forAll(phases(), phasei)
     {
@@ -155,14 +155,11 @@ void Foam::multiphaseSystem::solveAlphas()
             }
         }
 
-        if (fv::localEulerDdt::enabled(mesh_))
+        if (LTS)
         {
-            const volScalarField& rDeltaT =
-                fv::localEulerDdt::localRDeltaT(mesh_);
-
             MULES::limit
             (
-                rDeltaT,
+                fv::localEulerDdt::localRDeltaT(mesh_),
                 geometricOneField(),
                 phase,
                 phi_,
@@ -480,7 +477,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::K
 {
     tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2);
 
-    correctContactAngle(phase1, phase2, tnHatfv().boundaryField());
+    correctContactAngle(phase1, phase2, tnHatfv.ref().boundaryField());
 
     // Simple expression for curvature
     return -fvc::div(tnHatfv & mesh_.Sf());
@@ -507,8 +504,7 @@ Foam::multiphaseSystem::multiphaseSystem
             IOobject::AUTO_WRITE
         ),
         mesh,
-        dimensionedScalar("alphas", dimless, 0.0),
-        zeroGradientFvPatchScalarField::typeName
+        dimensionedScalar("alphas", dimless, 0.0)
     ),
 
     cAlphas_(lookup("interfaceCompression")),
@@ -572,7 +568,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
 
             if (cAlpha != cAlphas_.end())
             {
-                tSurfaceTension() +=
+                tSurfaceTension.ref() +=
                     fvc::interpolate(sigma(key12)*K(phase1, phase2))
                    *(
                         fvc::interpolate(phase2)*fvc::snGrad(phase1)
@@ -606,7 +602,7 @@ Foam::multiphaseSystem::nearInterface() const
 
     forAll(phases(), phasei)
     {
-        tnearInt() = max
+        tnearInt.ref() = max
         (
             tnearInt(),
             pos(phases()[phasei] - 0.01)*pos(0.99 - phases()[phasei])
@@ -636,8 +632,6 @@ void Foam::multiphaseSystem::solve()
                 fv::localEulerDdt::localRSubDeltaT(mesh_, nAlphaSubCycles);
         }
 
-        dimensionedScalar totalDeltaT = runTime.deltaT();
-
         PtrList<volScalarField> alpha0s(phases().size());
         PtrList<surfaceScalarField> alphaPhiSums(phases().size());
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H
index e33bf8c4878053847d4cae31fa2f0e79d551eb82..bf6d3e0d2eed60e1393cc8682403bd0aa5877814 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,10 +167,10 @@ public:
         virtual tmp<volScalarField> Kd(const phaseModel& phase) const = 0;
 
         //- Return the combined force (lift + wall-lubrication) for phase pair
-        virtual autoPtr<PtrList<Foam::volVectorField> > Fs() const = 0;
+        virtual autoPtr<PtrList<Foam::volVectorField>> Fs() const = 0;
 
         //- Return the turbulent dispersion force on faces for phase pair
-        virtual autoPtr<PtrList<Foam::surfaceScalarField> > phiDs
+        virtual autoPtr<PtrList<Foam::surfaceScalarField>> phiDs
         (
             const PtrList<volScalarField>& rAUs
         ) const = 0;
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H
index 2703d75ef1f6b2da04bb0d86ca4cb24368730ad1..05a049b4c6e2aa4b4e3993ce812c108f2aad68f0 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H
@@ -37,7 +37,7 @@ forAll(phases, phasei)
 // Lift, wall-lubrication and turbulent diffusion fluxes
 PtrList<surfaceScalarField> phiFs(phases.size());
 {
-    autoPtr<PtrList<volVectorField> > Fs = fluid.Fs();
+    autoPtr<PtrList<volVectorField>> Fs = fluid.Fs();
 
     forAll(phases, phasei)
     {
@@ -51,14 +51,14 @@ PtrList<surfaceScalarField> phiFs(phases.size());
                 new surfaceScalarField
                 (
                     IOobject::groupName("phiF", phase.name()),
-                    (fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf())
+                    fvc::flux(rAUs[phasei]*Fs()[phasei])
                 )
             );
         }
     }
 }
 {
-    autoPtr<PtrList<surfaceScalarField> > phiDs = fluid.phiDs(rAUs);
+    autoPtr<PtrList<surfaceScalarField>> phiDs = fluid.phiDs(rAUs);
 
     forAll(phases, phasei)
     {
@@ -201,7 +201,7 @@ while (pimple.correct())
             new surfaceScalarField
             (
                 IOobject::groupName("phiHbyA", phase.name()),
-                (fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
+                fvc::flux(HbyAs[phasei])
               + phiCorrCoeff
                *fvc::interpolate
                 (
@@ -209,7 +209,7 @@ while (pimple.correct())
                 )
                *(
                    MRF.absolute(phase.phi().oldTime())
-                 - (fvc::interpolate(phase.U().oldTime()) & mesh.Sf())
+                 - fvc::flux(phase.U().oldTime())
                 )/runTime.deltaT()
               - phigFs[phasei]
             )
@@ -318,11 +318,14 @@ while (pimple.correct())
                                 rho
                             )
                         )/rho
-                      + (alpha/rho)*correction
+                      + correction
                         (
-                            phase.thermo().psi()*fvm::ddt(p_rgh)
-                          + fvm::div(phid, p_rgh)
-                          - fvm::Sp(fvc::div(phid), p_rgh)
+                            (alpha/rho)*
+                            (
+                                phase.thermo().psi()*fvm::ddt(p_rgh)
+                              + fvm::div(phid, p_rgh)
+                              - fvm::Sp(fvc::div(phid), p_rgh)
+                            )
                         )
                     ).ptr()
                 );
@@ -454,7 +457,7 @@ while (pimple.correct())
     forAll(phases, phasei)
     {
         phaseModel& phase = phases[phasei];
-        phase.rho()() += phase.thermo().psi()*(p_rgh - p_rgh_0);
+        phase.thermo().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
     }
 
     // Correct p_rgh for consistency with p and the updated densities
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C
index f23b5649fcedb2c4830a786d1017602705bbb4c4..dfcfee9de97517529b5370b42a1a41633c92ad1a 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,6 @@ Description
 
 #include "fvCFD.H"
 #include "multiphaseSystem.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "pimpleControl.H"
 #include "localEulerDdtScheme.H"
 #include "fvcSmooth.H"
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H
index 9e9ca5423090d416c988e44e5663849fad33119f..fec017ea30462cb759075c6691600626fea1575d 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H
@@ -1,13 +1,21 @@
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
+
+    const dictionary& pimpleDict = pimple.dict();
+
+    scalar maxCo
+    (
+        pimpleDict.lookupOrDefault<scalar>("maxCo", 0.2)
+    );
+
+    scalar maxDeltaT
+    (
+        pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)
+    );
 
     scalar rDeltaTSmoothingCoeff
     (
-        runTime.controlDict().lookupOrDefault<scalar>
-        (
-            "rDeltaTSmoothingCoeff",
-            0.02
-        )
+        pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
     );
 
     surfaceScalarField maxPhi("maxPhi", phi);
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean
index 87e030a14ad58109b78b60b1c22233e77228ba5f..59ec72ff10e339df685c8166026c1fcc35690343 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean
@@ -6,4 +6,4 @@ wclean libso twoPhaseSystem
 wclean libso twoPhaseCompressibleTurbulenceModels
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake
index d0e2fc63c7aae159a7bac304aceb2f23f236a89b..a0ff46153ae889ac4b4cc08ad05503da33be4663 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso twoPhaseSystem
-wmake libso twoPhaseCompressibleTurbulenceModels
+wmake $targetType twoPhaseSystem
+wmake $targetType twoPhaseCompressibleTurbulenceModels
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H
index 3060c444de311c1ca2c9ee9023e436ef897bd26f..0cdbfba8b92e6caffadc20309eb4de9967071571 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H
@@ -23,7 +23,7 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
             );
 
             E1Eqn->relax();
-            fvOptions.constrain(E1Eqn());
+            fvOptions.constrain(E1Eqn.ref());
             E1Eqn->solve();
         }
     }
@@ -43,13 +43,13 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
             );
 
             E2eqn->relax();
-            fvOptions.constrain(E2eqn());
+            fvOptions.constrain(E2eqn.ref());
             E2eqn->solve();
         }
     }
-}
 
-fluid.correctThermo();
+    fluid.correctThermo();
+}
 
 Info<< phase1.name() << " min/max T "
     << min(phase1.thermo().T()).value()
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H
index f269a79760a7e217d4b77d9d5016f0e2a5a74e3a..ba312ab248e5c8401ba3311a10caa303a3e74758 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H
@@ -65,18 +65,10 @@ tmp<surfaceScalarField> phiF2;
     surfaceScalarField snGradAlpha1(fvc::snGrad(alpha1)*mesh.magSf());
 
     // Phase-1 dispersion, lift and wall-lubrication flux
-    phiF1 =
-    (
-        DbyA1()*snGradAlpha1
-      + (fvc::interpolate(rAU1*F) & mesh.Sf())
-    );
+    phiF1 = DbyA1()*snGradAlpha1 + fvc::flux(rAU1*F);
 
     // Phase-2 dispersion, lift and wall-lubrication flux
-    phiF2 =
-    (
-      - DbyA2()*snGradAlpha1
-      - (fvc::interpolate(rAU2*F) & mesh.Sf())
-    );
+    phiF2 = - DbyA2()*snGradAlpha1 - fvc::flux(rAU2*F);
 
     // Cache the phase diffusivities for implicit treatment in the
     // phase-fraction equation
@@ -175,11 +167,11 @@ while (pimple.correct())
     surfaceScalarField phiHbyA1
     (
         IOobject::groupName("phiHbyA", phase1.name()),
-        (fvc::interpolate(HbyA1) & mesh.Sf())
+        fvc::flux(HbyA1)
       + phiCorrCoeff1*fvc::interpolate(alpha1.oldTime()*rho1.oldTime()*rAU1)
        *(
             MRF.absolute(phi1.oldTime())
-          - (fvc::interpolate(U1.oldTime()) & mesh.Sf())
+          - fvc::flux(U1.oldTime())
         )/runTime.deltaT()
       - phiF1()
       - phig1
@@ -189,11 +181,11 @@ while (pimple.correct())
     surfaceScalarField phiHbyA2
     (
         IOobject::groupName("phiHbyA", phase2.name()),
-        (fvc::interpolate(HbyA2) & mesh.Sf())
+        fvc::flux(HbyA2)
       + phiCorrCoeff2*fvc::interpolate(alpha2.oldTime()*rho2.oldTime()*rAU2)
        *(
             MRF.absolute(phi2.oldTime())
-          - (fvc::interpolate(U2.oldTime()) & mesh.Sf())
+          - fvc::flux(U2.oldTime())
         )/runTime.deltaT()
       - phiF2()
       - phig2
@@ -252,14 +244,17 @@ while (pimple.correct())
                     phase1.continuityError()
                   - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
                 )/rho1
-              + (alpha1/rho1)*correction
+              + correction
                 (
-                    psi1*fvm::ddt(p_rgh)
-                  + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                    (alpha1/rho1)*
+                    (
+                        psi1*fvm::ddt(p_rgh)
+                      + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                    )
                 );
 
-            deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
-            pEqnComp1().relax();
+            deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr());
+            pEqnComp1.ref().relax();
         }
 
         if (phase2.compressible())
@@ -275,13 +270,16 @@ while (pimple.correct())
                     phase2.continuityError()
                   - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
                 )/rho2
-               + (alpha2/rho2)*correction
+              + correction
                 (
-                    psi2*fvm::ddt(p_rgh)
-                  + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                    (alpha2/rho2)*
+                    (
+                        psi2*fvm::ddt(p_rgh)
+                      + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                    )
                 );
-            deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
-            pEqnComp2().relax();
+            deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr());
+            pEqnComp2.ref().relax();
         }
     }
     else
@@ -311,7 +309,7 @@ while (pimple.correct())
     {
         if (pEqnComp1.valid())
         {
-            pEqnComp1() -= fluid.dmdt()/rho1;
+            pEqnComp1.ref() -= fluid.dmdt()/rho1;
         }
         else
         {
@@ -320,7 +318,7 @@ while (pimple.correct())
 
         if (pEqnComp2.valid())
         {
-            pEqnComp2() += fluid.dmdt()/rho2;
+            pEqnComp2.ref() += fluid.dmdt()/rho2;
         }
         else
         {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H
index 83c3a9ce7f736029755385c297c4834c9dc205a0..00a0fb8cfe8814a4d727b00e4ff89d3386dd20ca 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H
@@ -25,7 +25,7 @@ fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime);
         U1Eqn =
         (
             fvm::div(alphaRhoPhi1, U1) - fvm::Sp(fvc::div(alphaRhoPhi1), U1)
-          + fvm::Sp(dmdt12, U1) + dmdt21*U2
+          + fvm::Sp(dmdt12, U1) - dmdt12*U2
           + MRF.DDt(alpha1*rho1, U1)
           + phase1.turbulence().divDevRhoReff(U1)
           + Vm*(UgradU1 - (UgradU2 & U2))
@@ -40,7 +40,7 @@ fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime);
         U2Eqn =
         (
             fvm::div(alphaRhoPhi2, U2) - fvm::Sp(fvc::div(alphaRhoPhi2), U2)
-          - fvm::Sp(dmdt21, U2) - dmdt12*U1
+          - fvm::Sp(dmdt21, U2) + dmdt21*U1
           + MRF.DDt(alpha2*rho2, U2)
           + phase2.turbulence().divDevRhoReff(U2)
           + Vm*(UgradU2 - (UgradU1 & U1))
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H
index e2edf14bed061f0bbc3e530839bb961ef4065163..444f2de81f81692ceda80ebb1a0b30f8244c0a17 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H
@@ -157,7 +157,7 @@ while (pimple.correct())
        *(
             (alphaRhof10 + Vmf)
            *MRF.absolute(phi1.oldTime())/runTime.deltaT()
-          + (fvc::interpolate(U1Eqn.H()) & mesh.Sf())
+          + fvc::flux(U1Eqn.H())
           + Vmf*ddtPhi2
           + Kdf*MRF.absolute(phi2)
           - Ff1()
@@ -175,7 +175,7 @@ while (pimple.correct())
        *(
             (alphaRhof20 + Vmf)
            *MRF.absolute(phi2.oldTime())/runTime.deltaT()
-          + (fvc::interpolate(U2Eqn.H()) & mesh.Sf())
+          + fvc::flux(U2Eqn.H())
           + Vmf*ddtPhi1
           + Kdf*MRF.absolute(phi1)
           - Ff2()
@@ -234,13 +234,16 @@ while (pimple.correct())
                 phase1.continuityError()
               - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
             )/rho1
-          + (alpha1/rho1)*correction
+          + correction
             (
-                psi1*fvm::ddt(p_rgh)
-              + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                (alpha1/rho1)*
+                (
+                    psi1*fvm::ddt(p_rgh)
+                  + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                )
             );
-            deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
-            pEqnComp1().relax();
+            deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr());
+            pEqnComp1.ref().relax();
         }
 
         if (phase2.compressible())
@@ -250,13 +253,16 @@ while (pimple.correct())
                 phase2.continuityError()
               - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
             )/rho2
-          + (alpha2/rho2)*correction
+          + correction
             (
-                psi2*fvm::ddt(p_rgh)
-              + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                (alpha2/rho2)*
+                (
+                    psi2*fvm::ddt(p_rgh)
+                  + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                )
             );
-            deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
-            pEqnComp2().relax();
+            deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr());
+            pEqnComp2.ref().relax();
         }
     }
     else
@@ -286,7 +292,7 @@ while (pimple.correct())
     {
         if (pEqnComp1.valid())
         {
-            pEqnComp1() -= fluid.dmdt()/rho1;
+            pEqnComp1.ref() -= fluid.dmdt()/rho1;
         }
         else
         {
@@ -295,7 +301,7 @@ while (pimple.correct())
 
         if (pEqnComp2.valid())
         {
-            pEqnComp2() += fluid.dmdt()/rho2;
+            pEqnComp2.ref() += fluid.dmdt()/rho2;
         }
         else
         {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C
index 04c3d2e20635732f833302e2112034867d97715d..5111ae79d624b08c2e2a73eb540ee407397addb4 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,6 @@ Description
 #include "fvCFD.H"
 #include "twoPhaseSystem.H"
 #include "phaseCompressibleTurbulenceModel.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "pimpleControl.H"
 #include "localEulerDdtScheme.H"
 #include "fvcSmooth.H"
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H
index f9f736f788d8816494ddd07728401eb84ee3b312..4bef17a6bb4a851edbea09e23e8794ad3ff6cbd1 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H
@@ -1,13 +1,21 @@
 {
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
+
+    const dictionary& pimpleDict = pimple.dict();
+
+    scalar maxCo
+    (
+        pimpleDict.lookupOrDefault<scalar>("maxCo", 0.2)
+    );
+
+    scalar maxDeltaT
+    (
+        pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)
+    );
 
     scalar rDeltaTSmoothingCoeff
     (
-        runTime.controlDict().lookupOrDefault<scalar>
-        (
-            "rDeltaTSmoothingCoeff",
-            0.02
-        )
+        pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
     );
 
     // Set the reciprocal time-step from the local Courant number
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
index 0d4a1128c056051e28ebc6cbee84fbbc6a708b26..996f96cecfa8d1be6a5f8801b0ac7f069a827d4d 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
 ) const
 {
     tmp<scalarField> typsf(new scalarField(this->size()));
-    scalarField& ypsf = typsf();
+    scalarField& ypsf = typsf.ref();
 
     forAll(ypsf, faceI)
     {
@@ -197,7 +197,7 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat
     scalarField yPlusTherm(this->yPlusTherm(P, Prat));
 
     tmp<scalarField> talphatConv(new scalarField(this->size()));
-    scalarField& alphatConv = talphatConv();
+    scalarField& alphatConv = talphatConv.ref();
 
     // Populate boundary values
     forAll(alphatConv, faceI)
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
index 924f8209a4c5c1affcc47ef04d81fb445c407068..4aac384117822f4242c75cb44306d621dcad60e7 100755
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -299,7 +299,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
     const scalarField liquidw(liquid.boundaryField()[patchi]);
 
     // Damp boiling at high void fractions.
-    const scalarField W(min(liquidw/0.2, scalar(0.1)));
+    const scalarField W(min(liquidw/0.2, scalar(1)));
 
     const scalarField A2(W*min(M_PI*sqr(Ddep)*N*Al/4, scalar(1)));
     const scalarField A1(max(1 - A2, scalar(1e-4)));
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
index c3d306738d025081de1dfae54be8301ccad9ebfd..4aa484cb5f93d1adc416c780f976f12b706b8f9f 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ JohnsonJacksonParticleSlipFvPatchVectorField
 )
 :
     partialSlipFvPatchVectorField(p, iF),
-    specularityCoefficient_(p.size())
+    specularityCoefficient_("specularityCoefficient", dimless, 0)
 {}
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
index f4d7dd4ee9edf1743679d38ce96823c6003b1202..220c4c05ebfabc52d53c6c964fd8de3490d7fab9 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,8 +48,8 @@ JohnsonJacksonParticleThetaFvPatchScalarField
 )
 :
     mixedFvPatchScalarField(p, iF),
-    restitutionCoefficient_(p.size()),
-    specularityCoefficient_(p.size())
+    restitutionCoefficient_("restitutionCoefficient", dimless, 0),
+    specularityCoefficient_("specularityCoefficient", dimless, 0)
 {}
 
 
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
index 4a0d2290d13c91fa9b755a82119190e730241f56..b88ec0923abf187218bce9d510032cb9673c2961 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -132,7 +132,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
         )
     );
 
-    volScalarField& nuf = tnu();
+    volScalarField& nuf = tnu.ref();
 
     forAll(D, celli)
     {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
index 83017e1557313fce526eee0363b7a73caeffe8b3..f3b7d5da14091749b9961211d1b2820386a45dae 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "kineticTheoryModel.H"
 #include "mathematicalConstants.H"
 #include "twoPhaseSystem.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -43,7 +44,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
 :
     eddyViscosity
     <
-        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
+        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
     >
     (
         type,
@@ -186,7 +187,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
     (
         eddyViscosity
         <
-            RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
+            RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
         >::read()
     )
     {
@@ -272,7 +273,8 @@ Foam::RASModels::kineticTheoryModel::pPrime() const
         )
     );
 
-    volScalarField::GeometricBoundaryField& bpPrime = tpPrime().boundaryField();
+    volScalarField::GeometricBoundaryField& bpPrime =
+        tpPrime.ref().boundaryField();
 
     forAll(bpPrime, patchi)
     {
@@ -417,6 +419,8 @@ void Foam::RASModels::kineticTheoryModel::correct()
         // 'thermal' conductivity (Table 3.3, p. 49)
         kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
 
+        fv::options& fvOptions(fv::options::New(mesh_));
+
         // Construct the granular temperature equation (Eq. 3.20, p. 44)
         // NB. note that there are two typos in Eq. 3.20:
         //     Ps should be without grad
@@ -431,15 +435,18 @@ void Foam::RASModels::kineticTheoryModel::correct()
             )
           - fvm::laplacian(kappa_, Theta_, "laplacian(kappa,Theta)")
          ==
-            fvm::SuSp(-((PsCoeff*I) && gradU), Theta_)
+          - fvm::SuSp((PsCoeff*I) && gradU, Theta_)
           + (tau && gradU)
           + fvm::Sp(-gammaCoeff, Theta_)
           + fvm::Sp(-J1, Theta_)
           + fvm::Sp(J2/(Theta_ + ThetaSmall), Theta_)
+          + fvOptions(alpha, rho, Theta_)
         );
 
         ThetaEqn.relax();
+        fvOptions.constrain(ThetaEqn);
         ThetaEqn.solve();
+        fvOptions.correct(Theta_);
     }
     else
     {
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
index e18d41fb40ba2b1224f57af39b2485654c438672..d648de7bc1104f1b216018dc855d84dade1a433a 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ class kineticTheoryModel
 :
     public eddyViscosity
     <
-        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
+        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
     >
 {
     // Private data
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C
index 79df9e49225a1614db57a9253bf6121698ed316c..9d3b53c782713b7657e257683c24b14570e7f09b 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel
 :
     eddyViscosity
     <
-        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
+        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
     >
     (
         type,
@@ -90,7 +90,7 @@ bool Foam::RASModels::phasePressureModel::read()
     (
         eddyViscosity
         <
-            RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
+            RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
         >::read()
     )
     {
@@ -144,7 +144,7 @@ Foam::RASModels::phasePressureModel::R() const
             (
                 "R",
                 dimensionSet(0, 2, -2, 0, 0),
-                symmTensor::zero
+                Zero
             )
         )
     );
@@ -164,7 +164,8 @@ Foam::RASModels::phasePressureModel::pPrime() const
         )
     );
 
-    volScalarField::GeometricBoundaryField& bpPrime = tpPrime().boundaryField();
+    volScalarField::GeometricBoundaryField& bpPrime =
+        tpPrime.ref().boundaryField();
 
     forAll(bpPrime, patchi)
     {
@@ -192,7 +193,7 @@ Foam::RASModels::phasePressureModel::pPrimef() const
     );
 
    surfaceScalarField::GeometricBoundaryField& bpPrime =
-       tpPrime().boundaryField();
+       tpPrime.ref().boundaryField();
 
     forAll(bpPrime, patchi)
     {
@@ -226,7 +227,7 @@ Foam::RASModels::phasePressureModel::devRhoReff() const
             (
                 "R",
                 rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0),
-                symmTensor::zero
+                Zero
             )
         )
     );
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H
index c7e9842f37fbd15904aaa16963c13af4d27d9e99..ab5e38effee2310749b1a57b23d27ae8458a89cd 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ class phasePressureModel
 :
     public eddyViscosity
     <
-        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel> >
+        RASModel<EddyDiffusivity<phaseCompressibleTurbulenceModel>>
     >
 {
     // Private data
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C
index 7b7ddee6f49d622ff4068791a0bc7b3d3ec6b2fa..597d15e7ff04f702098af467fc8830cfde9eff43 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -186,18 +186,17 @@ Foam::twoPhaseSystem::dmdt() const
 
 void Foam::twoPhaseSystem::solve()
 {
-    const fvMesh& mesh = this->mesh();
-    const Time& runTime = mesh.time();
+    const Time& runTime = mesh_.time();
 
     volScalarField& alpha1 = phase1_;
     volScalarField& alpha2 = phase2_;
 
-    const dictionary& alphaControls = mesh.solverDict(alpha1.name());
+    const dictionary& alphaControls = mesh_.solverDict(alpha1.name());
 
     label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
     label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
 
-    bool LTS = fv::localEulerDdt::enabled(mesh);
+    bool LTS = fv::localEulerDdt::enabled(mesh_);
 
     word alphaScheme("div(phi," + alpha1.name() + ')');
     word alpharScheme("div(phir," + alpha1.name() + ')');
@@ -264,9 +263,9 @@ void Foam::twoPhaseSystem::solve()
             (
                 "Sp",
                 runTime.timeName(),
-                mesh
+                mesh_
             ),
-            mesh,
+            mesh_,
             dimensionedScalar("Sp", dimless/dimTime, 0.0)
         );
 
@@ -276,7 +275,7 @@ void Foam::twoPhaseSystem::solve()
             (
                 "Su",
                 runTime.timeName(),
-                mesh
+                mesh_
             ),
             // Divergence term is handled explicitly to be
             // consistent with the explicit transport solution
@@ -285,7 +284,7 @@ void Foam::twoPhaseSystem::solve()
 
         if (tdgdt.valid())
         {
-            scalarField& dgdt = tdgdt();
+            scalarField& dgdt = tdgdt.ref();
 
             forAll(dgdt, celli)
             {
@@ -345,7 +344,7 @@ void Foam::twoPhaseSystem::solve()
             if (LTS)
             {
                 trSubDeltaT =
-                    fv::localEulerDdt::localRSubDeltaT(mesh, nAlphaSubCycles);
+                    fv::localEulerDdt::localRSubDeltaT(mesh_, nAlphaSubCycles);
             }
 
             for
@@ -420,7 +419,7 @@ void Foam::twoPhaseSystem::solve()
             fvc::interpolate(phase2_.rho())*phase2_.alphaPhi();
 
         Info<< alpha1.name() << " volume fraction = "
-            << alpha1.weightedAverage(mesh.V()).value()
+            << alpha1.weightedAverage(mesh_.V()).value()
             << "  Min(alpha1) = " << min(alpha1).value()
             << "  Max(alpha1) = " << max(alpha1).value()
             << endl;
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
index 4a89f67d8fde38188622defe6cdb80f9f31f08cf..d801fb8fa5b066b33f9748e2b5521a5dbd4cb076 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
@@ -1,14 +1,11 @@
 {
     volScalarField rAU("rAU", 1.0/UEqn.A());
     surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
-
-    volVectorField HbyA("HbyA", U);
-    HbyA = rAU*UEqn.H();
-
+    volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
     surfaceScalarField phiHbyA
     (
         "phiHbyA",
-        (fvc::interpolate(HbyA) & mesh.Sf())
+        fvc::flux(HbyA)
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
     adjustPhi(phiHbyA, U, p_rgh);
@@ -20,15 +17,8 @@
 
     phiHbyA += phig;
 
-    // Update the fixedFluxPressure BCs to ensure flux consistency
-    setSnGrad<fixedFluxPressureFvPatchScalarField>
-    (
-        p_rgh.boundaryField(),
-        (
-            phiHbyA.boundaryField()
-          - (mesh.Sf().boundaryField() & U.boundaryField())
-        )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
-    );
+    // Update the pressure BCs to ensure flux consistency
+    constrainPressure(p_rgh, U, phiHbyA, rAUf);
 
     while (pimple.correctNonOrthogonal())
     {
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C
index 02b05c03d6a190ebb6f9f1ed483c57d8f218d285..eee5c2a4cba81a983b6cd31ba2cb9eddbd097cf1 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,6 @@ Description
 #include "incompressibleTwoPhaseMixture.H"
 #include "turbulentTransportModel.H"
 #include "pimpleControl.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean
index 8103dc7201bc49c2cdb50d36f247de284fea3713..aec98738818d2b95a622ca04fe17923087c5e896 100755
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean
@@ -7,4 +7,4 @@ wclean libso interfacialModels
 wclean libso phaseCompressibleTurbulenceModels
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
index a4a7a60bd4ba1883b68d7ae76e4863ef00ae5e3e..16e2ad39ab089817fb6f1f0070271ca963d5e254 100755
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
@@ -1,11 +1,15 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 wmakeLnInclude interfacialModels
-wmake libso twoPhaseSystem
-wmake libso interfacialModels
-wmake libso phaseCompressibleTurbulenceModels
+wmake $targetType twoPhaseSystem
+wmake $targetType interfacialModels
+wmake $targetType phaseCompressibleTurbulenceModels
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C
index ca0a145f5bf4e954ae4b4856980df0aad5ff4458..079b5d187b61968c246b672d1c8ceb263b8358d9 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,6 +27,7 @@ License
 #include "phasePair.H"
 #include "fvcGrad.H"
 #include "surfaceInterpolate.H"
+#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C
index 79e52a2856a73b68857a05cd65e69f26a55190cd..7c0bf86c94f61c7461686703c207d6a89a583312 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "liftModel.H"
 #include "phasePair.H"
 #include "fvcCurl.H"
+#include "fvcFlux.H"
 #include "surfaceInterpolate.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -78,11 +79,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModel::F() const
 
 Foam::tmp<Foam::surfaceScalarField> Foam::liftModel::Ff() const
 {
-    const fvMesh& mesh(this->pair_.phase1().mesh());
-
-    return
-        fvc::interpolate(pair_.dispersed())
-       *(fvc::interpolate(Fi()) & mesh.Sf());
+    return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
 }
 
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C
index d4e13d5c7f644bde99ea653bd899ef7055868bae..f8480dc69b79199bb96b6bf5184c01cf33bec6b8 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F() const
                 false
             ),
             mesh,
-            dimensionedVector("zero", dimF, vector::zero)
+            dimensionedVector("zero", dimF, Zero)
         )
     );
 }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
index 5845e3569a6e4e947247a870c6d4afb4e74115cd..2a65c1e1c6acab6f98869b33587874fba0355a12 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const
                     mesh
                 ),
                 mesh,
-                dimensionedVector("zero", dimF, vector::zero)
+                dimensionedVector("zero", dimF, Zero)
             )
         );
 }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C
index 8de7e302608272b3db1b4faa769d54125acfb188..b35bd0ef8fd4451464db3c7b7109e2dec7fb53fd 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ Foam::wallLubricationModels::noWallLubrication::Fi() const
                 false
             ),
             mesh,
-            dimensionedVector("zero", dimF, vector::zero)
+            dimensionedVector("zero", dimF, Zero)
         )
     );
 }
@@ -108,7 +108,7 @@ Foam::wallLubricationModels::noWallLubrication::F() const
                 false
             ),
             mesh,
-            dimensionedVector("zero", dimF, vector::zero)
+            dimensionedVector("zero", dimF, Zero)
         )
     );
 }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C
index 2f3cb1aaa032019aba8a4278fe2e973e7f7b8c85..d148d2cefd786c30d19b192d9dde8d819711d9bd 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,6 +25,7 @@ License
 
 #include "wallLubricationModel.H"
 #include "phasePair.H"
+#include "fvcFlux.H"
 #include "surfaceInterpolate.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -67,11 +68,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModel::F() const
 
 Foam::tmp<Foam::surfaceScalarField> Foam::wallLubricationModel::Ff() const
 {
-    const fvMesh& mesh(this->pair_.phase1().mesh());
-
-    return
-        fvc::interpolate(pair_.dispersed())
-       *(fvc::interpolate(Fi()) & mesh.Sf());
+    return fvc::interpolate(pair_.dispersed())*fvc::flux(Fi());
 }
 
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H
index 994f07d672a4f5d6f4420efe9d42a6a24d650140..b4188777437f2b2243d6ab8786c44adad822d8e4 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H
@@ -70,18 +70,10 @@ tmp<surfaceScalarField> phiF2;
     surfaceScalarField snGradAlpha1(fvc::snGrad(alpha1)*mesh.magSf());
 
     // Phase-1 dispersion, lift and wall-lubrication flux
-    phiF1 =
-    (
-        Df1*snGradAlpha1
-      + (fvc::interpolate(rAU1*F) & mesh.Sf())
-    );
+    phiF1 = Df1*snGradAlpha1 + fvc::flux(rAU1*F);
 
     // Phase-1 dispersion, lift and wall-lubrication flux
-    phiF2 =
-    (
-      - Df2*snGradAlpha1
-      - (fvc::interpolate(rAU2*F) & mesh.Sf())
-    );
+    phiF2 = - Df2*snGradAlpha1 - fvc::flux(rAU2*F);
 }
 
 
@@ -172,11 +164,11 @@ while (pimple.correct())
     surfaceScalarField phiHbyA1
     (
         IOobject::groupName("phiHbyA", phase1.name()),
-        (fvc::interpolate(HbyA1) & mesh.Sf())
+        fvc::flux(HbyA1)
       + phiCorrCoeff1*fvc::interpolate(alpha1.oldTime()*rho1.oldTime()*rAU1)
        *(
             MRF.absolute(phi1.oldTime())
-          - (fvc::interpolate(U1.oldTime()) & mesh.Sf())
+          - fvc::flux(U1.oldTime())
         )/runTime.deltaT()
       - phiF1()
       - phig1
@@ -186,11 +178,11 @@ while (pimple.correct())
     surfaceScalarField phiHbyA2
     (
         IOobject::groupName("phiHbyA", phase2.name()),
-        (fvc::interpolate(HbyA2) & mesh.Sf())
+        fvc::flux(HbyA2)
       + phiCorrCoeff2*fvc::interpolate(alpha2.oldTime()*rho2.oldTime()*rAU2)
        *(
             MRF.absolute(phi2.oldTime())
-          - (fvc::interpolate(U2.oldTime()) & mesh.Sf())
+          - fvc::flux(U2.oldTime())
         )/runTime.deltaT()
       - phiF2()
       - phig2
@@ -252,26 +244,32 @@ while (pimple.correct())
                 contErr1
               - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
             )/rho1
-          + (alpha1/rho1)*correction
+          + correction
             (
-                psi1*fvm::ddt(p_rgh)
-              + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                (alpha1/rho1)*
+                (
+                    psi1*fvm::ddt(p_rgh)
+                  + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                )
             );
-        deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
-        pEqnComp1().relax();
+        deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr());
+        pEqnComp1.ref().relax();
 
         pEqnComp2 =
             (
                 contErr2
               - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
             )/rho2
-          + (alpha2/rho2)*correction
+          + correction
             (
-                psi2*fvm::ddt(p_rgh)
-              + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                (alpha2/rho2)*
+                (
+                    psi2*fvm::ddt(p_rgh)
+                  + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                )
             );
-        deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
-        pEqnComp2().relax();
+        deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr());
+        pEqnComp2.ref().relax();
     }
     else
     {
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H
index ab9a23197cd0b4268845e1ee11de5942231c94f6..6855b6fb962539e7c9a22c6565fe13f28a81e2e0 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H
@@ -156,7 +156,7 @@ while (pimple.correct())
        *(
             (alphaRhof10 + Vmf)
            *MRF.absolute(phi1.oldTime())/runTime.deltaT()
-          + (fvc::interpolate(U1Eqn.H()) & mesh.Sf())
+          + fvc::flux(U1Eqn.H())
           + Vmf*ddtPhi2
           + Kdf*MRF.absolute(phi2)
           - Ff1()
@@ -174,7 +174,7 @@ while (pimple.correct())
        *(
             (alphaRhof20 + Vmf)
            *MRF.absolute(phi2.oldTime())/runTime.deltaT()
-          + (fvc::interpolate(U2Eqn.H()) & mesh.Sf())
+          + fvc::flux(U2Eqn.H())
           + Vmf*ddtPhi1
           + Kdf*MRF.absolute(phi1)
           - Ff2()
@@ -231,26 +231,32 @@ while (pimple.correct())
                 contErr1
               - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
             )/rho1
-          + (alpha1/rho1)*correction
+          + correction
             (
-                psi1*fvm::ddt(p_rgh)
-              + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                (alpha1/rho1)*
+                (
+                    psi1*fvm::ddt(p_rgh)
+                  + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+                )
             );
-        deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
-        pEqnComp1().relax();
+        deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr());
+        pEqnComp1.ref().relax();
 
         pEqnComp2 =
             (
                 contErr2
               - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2)
             )/rho2
-          + (alpha2/rho2)*correction
+          + correction
             (
-                psi2*fvm::ddt(p_rgh)
-              + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                (alpha2/rho2)*
+                (
+                    psi2*fvm::ddt(p_rgh)
+                  + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+                )
             );
-        deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
-        pEqnComp2().relax();
+        deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr());
+        pEqnComp2.ref().relax();
     }
     else
     {
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
index c3d306738d025081de1dfae54be8301ccad9ebfd..4aa484cb5f93d1adc416c780f976f12b706b8f9f 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ JohnsonJacksonParticleSlipFvPatchVectorField
 )
 :
     partialSlipFvPatchVectorField(p, iF),
-    specularityCoefficient_(p.size())
+    specularityCoefficient_("specularityCoefficient", dimless, 0)
 {}
 
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
index f4d7dd4ee9edf1743679d38ce96823c6003b1202..95fc5b41bf37e3f776558feaf287231923cf360b 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,8 +48,8 @@ JohnsonJacksonParticleThetaFvPatchScalarField
 )
 :
     mixedFvPatchScalarField(p, iF),
-    restitutionCoefficient_(p.size()),
-    specularityCoefficient_(p.size())
+    restitutionCoefficient_("restitutionCoefficient", dimless, 0),
+    specularityCoefficient_("specularityCoefficient", dimless, 0)
 {}
 
 
@@ -65,8 +65,7 @@ JohnsonJacksonParticleThetaFvPatchScalarField
     mixedFvPatchScalarField(ptf, p, iF, mapper),
     restitutionCoefficient_(ptf.restitutionCoefficient_),
     specularityCoefficient_(ptf.specularityCoefficient_)
-{
-}
+{}
 
 
 Foam::JohnsonJacksonParticleThetaFvPatchScalarField::
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
index 4a0d2290d13c91fa9b755a82119190e730241f56..b88ec0923abf187218bce9d510032cb9673c2961 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -132,7 +132,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
         )
     );
 
-    volScalarField& nuf = tnu();
+    volScalarField& nuf = tnu.ref();
 
     forAll(D, celli)
     {
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
index 99879c41d5c578dca49f29ae17f178dd8bc2dc19..6a5a474b3462459b792d79f07a004b0790417767 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
         RASModel<EddyDiffusivity<ThermalDiffusivity
         <
             PhaseCompressibleTurbulenceModel<phaseModel>
-        > > >
+        >>>
     >
     (
         type,
@@ -192,7 +192,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
             RASModel<EddyDiffusivity<ThermalDiffusivity
             <
                 PhaseCompressibleTurbulenceModel<phaseModel>
-            > > >
+            >>>
         >::read()
     )
     {
@@ -278,7 +278,8 @@ Foam::RASModels::kineticTheoryModel::pPrime() const
         )
     );
 
-    volScalarField::GeometricBoundaryField& bpPrime = tpPrime().boundaryField();
+    volScalarField::GeometricBoundaryField& bpPrime =
+        tpPrime.ref().boundaryField();
 
     forAll(bpPrime, patchi)
     {
@@ -437,7 +438,7 @@ void Foam::RASModels::kineticTheoryModel::correct()
             )
           - fvm::laplacian(kappa_, Theta_, "laplacian(kappa,Theta)")
          ==
-            fvm::SuSp(-((PsCoeff*I) && gradU), Theta_)
+          - fvm::SuSp((PsCoeff*I) && gradU, Theta_)
           + (tau && gradU)
           + fvm::Sp(-gammaCoeff, Theta_)
           + fvm::Sp(-J1, Theta_)
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
index 9aadb83d12738a7f3fb91b54cff381d5772ab15a..91f58d34498d959d513fade27e3603c6cdc463bb 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ class kineticTheoryModel
         RASModel<EddyDiffusivity<ThermalDiffusivity
         <
             PhaseCompressibleTurbulenceModel<phaseModel>
-        > > >
+        >>>
     >
 {
     // Private data
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C
index 2eba4bdab7e020c1d757d0ee64e540c2cc201a2f..0c5906d905315af28178027aef65ed8a35bab062 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel
         RASModel<EddyDiffusivity<ThermalDiffusivity
         <
             PhaseCompressibleTurbulenceModel<phaseModel>
-        > > >
+        >>>
     >
     (
         type,
@@ -96,7 +96,7 @@ bool Foam::RASModels::phasePressureModel::read()
             RASModel<EddyDiffusivity<ThermalDiffusivity
             <
                 PhaseCompressibleTurbulenceModel<phaseModel>
-            > > >
+            >>>
         >::read()
     )
     {
@@ -150,7 +150,7 @@ Foam::RASModels::phasePressureModel::R() const
             (
                 "R",
                 dimensionSet(0, 2, -2, 0, 0),
-                symmTensor::zero
+                Zero
             )
         )
     );
@@ -170,7 +170,8 @@ Foam::RASModels::phasePressureModel::pPrime() const
         )
     );
 
-    volScalarField::GeometricBoundaryField& bpPrime = tpPrime().boundaryField();
+    volScalarField::GeometricBoundaryField& bpPrime =
+        tpPrime.ref().boundaryField();
 
     forAll(bpPrime, patchi)
     {
@@ -198,7 +199,7 @@ Foam::RASModels::phasePressureModel::pPrimef() const
     );
 
    surfaceScalarField::GeometricBoundaryField& bpPrime =
-       tpPrime().boundaryField();
+       tpPrime.ref().boundaryField();
 
     forAll(bpPrime, patchi)
     {
@@ -232,7 +233,7 @@ Foam::RASModels::phasePressureModel::devRhoReff() const
             (
                 "R",
                 rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0),
-                symmTensor::zero
+                Zero
             )
         )
     );
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H
index 68734e5b4f792e2f80ff503a6fc2b2d819e05a6e..c148e3c40a640da761c6a937bb542b4c03d4ddf1 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ class phasePressureModel
         RASModel<EddyDiffusivity<ThermalDiffusivity
         <
             PhaseCompressibleTurbulenceModel<phaseModel>
-        > > >
+        >>>
     >
 {
     // Private data
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
index b367381a8429f35bf3f74bedd06e7de9d01e5603..6dae772c48e9d734730ca7ddbebd1bbb42276f91 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,6 @@ Description
 #include "PhaseCompressibleTurbulenceModel.H"
 #include "pimpleControl.H"
 #include "fvOptions.H"
-#include "fixedFluxPressureFvPatchScalarField.H"
 #include "fixedValueFvsPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C
index 090ffd1bcc20a754a6d11e1fc9f3e2beb55a4cfc..0d78e02ac88060cf386cfda4991b9ffacb744f87 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ void Foam::BlendedInterfacialModel<modelType>::correctFixedFluxBCs
         )
         {
             field.boundaryField()[patchI]
-              = pTraits<typename GeometricField::value_type>::zero;
+              = Zero;
         }
     }
 }
@@ -155,17 +155,17 @@ Foam::BlendedInterfacialModel<modelType>::K() const
 
     if (model_.valid())
     {
-        x() += model_->K()*(f1() - f2());
+        x.ref() += model_->K()*(f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->K()*(1 - f1);
+        x.ref() += model1In2_->K()*(1 - f1);
     }
 
     if (model2In1_.valid())
     {
-        x() += model2In1_->K()*f2;
+        x.ref() += model2In1_->K()*f2;
     }
 
     if
@@ -174,7 +174,7 @@ Foam::BlendedInterfacialModel<modelType>::K() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -223,17 +223,17 @@ Foam::BlendedInterfacialModel<modelType>::Kf() const
 
     if (model_.valid())
     {
-        x() += model_->Kf()*(f1() - f2());
+        x.ref() += model_->Kf()*(f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->Kf()*(1 - f1);
+        x.ref() += model1In2_->Kf()*(1 - f1);
     }
 
     if (model2In1_.valid())
     {
-        x() += model2In1_->Kf()*f2;
+        x.ref() += model2In1_->Kf()*f2;
     }
 
     if
@@ -242,7 +242,7 @@ Foam::BlendedInterfacialModel<modelType>::Kf() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -251,7 +251,7 @@ Foam::BlendedInterfacialModel<modelType>::Kf() const
 
 template<class modelType>
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::BlendedInterfacialModel<modelType>::F() const
 {
     tmp<volScalarField> f1, f2;
@@ -266,7 +266,7 @@ Foam::BlendedInterfacialModel<modelType>::F() const
         f2 = blending_.f2(pair1In2_.dispersed(), pair2In1_.dispersed());
     }
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > x
+    tmp<GeometricField<Type, fvPatchField, volMesh>> x
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -280,23 +280,23 @@ Foam::BlendedInterfacialModel<modelType>::F() const
                 false
             ),
             pair_.phase1().mesh(),
-            dimensioned<Type>("zero", modelType::dimF, pTraits<Type>::zero)
+            dimensioned<Type>("zero", modelType::dimF, Zero)
         )
     );
 
     if (model_.valid())
     {
-        x() += model_->F()*(f1() - f2());
+        x.ref() += model_->F()*(f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->F()*(1 - f1);
+        x.ref() += model1In2_->F()*(1 - f1);
     }
 
     if (model2In1_.valid())
     {
-        x() -= model2In1_->F()*f2; // note : subtraction
+        x.ref() -= model2In1_->F()*f2; // note : subtraction
     }
 
     if
@@ -305,7 +305,7 @@ Foam::BlendedInterfacialModel<modelType>::F() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -354,17 +354,17 @@ Foam::BlendedInterfacialModel<modelType>::Ff() const
 
     if (model_.valid())
     {
-        x() += model_->Ff()*(f1() - f2());
+        x.ref() += model_->Ff()*(f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->Ff()*(1 - f1);
+        x.ref() += model1In2_->Ff()*(1 - f1);
     }
 
     if (model2In1_.valid())
     {
-        x() -= model2In1_->Ff()*f2; // note : subtraction
+        x.ref() -= model2In1_->Ff()*f2; // note : subtraction
     }
 
     if
@@ -373,7 +373,7 @@ Foam::BlendedInterfacialModel<modelType>::Ff() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -416,17 +416,17 @@ Foam::BlendedInterfacialModel<modelType>::D() const
 
     if (model_.valid())
     {
-        x() += model_->D()*(f1() - f2());
+        x.ref() += model_->D()*(f1() - f2());
     }
 
     if (model1In2_.valid())
     {
-        x() += model1In2_->D()*(1 - f1);
+        x.ref() += model1In2_->D()*(1 - f1);
     }
 
     if (model2In1_.valid())
     {
-        x() += model2In1_->D()*f2;
+        x.ref() += model2In1_->D()*f2;
     }
 
     if
@@ -435,7 +435,7 @@ Foam::BlendedInterfacialModel<modelType>::D() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.H
index e6493fa1cf26d741a1218da4c7d5ab73291f72c0..c53894f45cca8621d8ea1a3839c56982175708a3 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ public:
 
         //- Return the blended force
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > F() const;
+        tmp<GeometricField<Type, fvPatchField, volMesh>> F() const;
 
         //- Return the face blended force
         tmp<surfaceScalarField> Ff() const;
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C
index a9fa972e114da67d04255da67ccd089afe9f1273..eedb89cc551e7555689f8f209f3c26d6e6405d65 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,6 +34,7 @@ License
 #include "fixedValueFvPatchFields.H"
 #include "slipFvPatchFields.H"
 #include "partialSlipFvPatchFields.H"
+#include "fvcFlux.H"
 #include "surfaceInterpolate.H"
 
 
@@ -175,7 +176,7 @@ Foam::phaseModel::phaseModel
                     IOobject::NO_READ,
                     IOobject::AUTO_WRITE
                 ),
-                fvc::interpolate(U_) & fluid_.mesh().Sf(),
+                fvc::flux(U_),
                 phiTypes
             )
         );
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H
index 3f91a8bd255057f0b7596f450e4b0bb4da82aca4..5fb0245513d3978d28622399612f2de3ba0cbddc 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ class phaseModel
         autoPtr<diameterModel> dPtr_;
 
         //- Turbulence model
-        autoPtr<PhaseCompressibleTurbulenceModel<phaseModel> > turbulence_;
+        autoPtr<PhaseCompressibleTurbulenceModel<phaseModel>> turbulence_;
 
 
 public:
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.H
index 18928c7cc7fe0fa143562b7fba1ccd97407630d1..225bf34f620c4fa8e8bd1a62588789ef524ca230 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ class wallLubricationModel;
 class turbulentDispersionModel;
 
 class blendingMethod;
-template <class modelType> class BlendedInterfacialModel;
+template<class modelType> class BlendedInterfacialModel;
 
 /*---------------------------------------------------------------------------*\
                       Class twoPhaseSystem Declaration
@@ -97,23 +97,23 @@ class twoPhaseSystem
         HashTable<autoPtr<blendingMethod>, word, word::hash> blendingMethods_;
 
         //- Drag model
-        autoPtr<BlendedInterfacialModel<dragModel> > drag_;
+        autoPtr<BlendedInterfacialModel<dragModel>> drag_;
 
         //- Virtual mass model
-        autoPtr<BlendedInterfacialModel<virtualMassModel> > virtualMass_;
+        autoPtr<BlendedInterfacialModel<virtualMassModel>> virtualMass_;
 
         //- Heat transfer model
-        autoPtr<BlendedInterfacialModel<heatTransferModel> > heatTransfer_;
+        autoPtr<BlendedInterfacialModel<heatTransferModel>> heatTransfer_;
 
         //- Lift model
-        autoPtr<BlendedInterfacialModel<liftModel> > lift_;
+        autoPtr<BlendedInterfacialModel<liftModel>> lift_;
 
         //- Wall lubrication model
-        autoPtr<BlendedInterfacialModel<wallLubricationModel> >
+        autoPtr<BlendedInterfacialModel<wallLubricationModel>>
             wallLubrication_;
 
         //- Wall lubrication model
-        autoPtr<BlendedInterfacialModel<turbulentDispersionModel> >
+        autoPtr<BlendedInterfacialModel<turbulentDispersionModel>>
             turbulentDispersion_;
 
 
diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H
index eca43adbf7a868a8ed4624fef3c8c8cfb44a4943..a912d80e0716d2735d3cb73ce864618f058d82aa 100644
--- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H
+++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H
@@ -41,8 +41,7 @@
                     "rho",
                     dimMass/dimVolume,
                     rhoValue
-                ),
-                zeroGradientFvPatchField<scalar>::typeName
+                )
             )
         );
     }
@@ -97,8 +96,7 @@
                     "Erho",
                     dimMass/dimLength/sqr(dimTime),
                     rhoEValue
-                ),
-                zeroGradientFvPatchField<scalar>::typeName
+                )
             )
         );
     }
@@ -152,8 +150,7 @@
                     "nu",
                     dimless,
                     nuValue
-                ),
-                zeroGradientFvPatchField<scalar>::typeName
+                )
             )
         );
     }
diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H
index 45327c2b4bed2bae77a979caf2f28207dc013f44..0c90a8853263d7992d599fc5238e888a02b22891 100644
--- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H
+++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H
@@ -75,8 +75,7 @@ if (thermalStress)
                     "C",
                     dimensionSet(0, 2, -2 , -1, 0),
                     CValue
-                ),
-                zeroGradientFvPatchField<scalar>::typeName
+                )
             )
         );
 
@@ -131,8 +130,7 @@ if (thermalStress)
                     "rhoK",
                     dimensionSet(1, 1, -3 , -1, 0),
                     rhoKValue
-                ),
-                zeroGradientFvPatchField<scalar>::typeName
+                )
             )
         );
 
@@ -188,8 +186,7 @@ if (thermalStress)
                     "alpha",
                     inv(dimTemperature),
                     alphaValue
-                ),
-                zeroGradientFvPatchField<scalar>::typeName
+                )
             )
         );
     }
diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C
index 57f4e6858947f4ad9b49f667085c75726db6c577..49d62b804e1118af581be860e9dbfdc777f4536d 100644
--- a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C
+++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,11 +42,11 @@ tractionDisplacementFvPatchVectorField
 )
 :
     fixedGradientFvPatchVectorField(p, iF),
-    traction_(p.size(), vector::zero),
+    traction_(p.size(), Zero),
     pressure_(p.size(), 0.0)
 {
     fvPatchVectorField::operator=(patchInternalField());
-    gradient() = vector::zero;
+    gradient() = Zero;
 }
 
 
@@ -78,7 +78,7 @@ tractionDisplacementFvPatchVectorField
     pressure_("pressure", dict, p.size())
 {
     fvPatchVectorField::operator=(patchInternalField());
-    gradient() = vector::zero;
+    gradient() = Zero;
 }
 
 
diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H
index 169c7f229f2ca2911aad4188e35391a3a97c2ecf..589566e3a122387e7843f328ad12842c460eb62f 100644
--- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H
+++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H
@@ -14,6 +14,6 @@ if (!(runTime.timeIndex() % 5))
     if (smi < -SMALL)
     {
         Info<< "Resetting Dcorr to 0" << endl;
-        Dcorr == dimensionedVector("0", Dcorr.dimensions(), vector::zero);
+        Dcorr == dimensionedVector("0", Dcorr.dimensions(), Zero);
     }
 }
diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C
index debf1ee9a384fe057be41302a7b134b005373f77..33c1e8a8c692dabd694b723d350212b503f1b5cd 100644
--- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C
+++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,11 +42,11 @@ tractionDisplacementCorrectionFvPatchVectorField
 )
 :
     fixedGradientFvPatchVectorField(p, iF),
-    traction_(p.size(), vector::zero),
+    traction_(p.size(), Zero),
     pressure_(p.size(), 0.0)
 {
     fvPatchVectorField::operator=(patchInternalField());
-    gradient() = vector::zero;
+    gradient() = Zero;
 }
 
 
@@ -78,7 +78,7 @@ tractionDisplacementCorrectionFvPatchVectorField
     pressure_("pressure", dict, p.size())
 {
     fvPatchVectorField::operator=(patchInternalField());
-    gradient() = vector::zero;
+    gradient() = Zero;
 }
 
 
diff --git a/applications/test/CompactListList/Test-CompactListList.C b/applications/test/CompactListList/Test-CompactListList.C
index 13a73cde7be9e2c9155b9be6990ad01ce69c694f..9baf498faf2d50cbe3a37e1436651620c6b9d792 100644
--- a/applications/test/CompactListList/Test-CompactListList.C
+++ b/applications/test/CompactListList/Test-CompactListList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,8 +56,8 @@ int main(int argc, char *argv[])
         rowSizes[1] = row1.size();
         cll1.resize(rowSizes);
 
-        cll1[0].assign(row0);   //note: operator= will not work since UList
-        cll1[1].assign(row1);
+        cll1[0].deepCopy(row0);
+        cll1[1].deepCopy(row1);
         Info<< "cll1:" << cll1 << endl;
 
         forAll(cll1.m(), i)
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    List<List<label> > lll(5);
+    List<List<label>> lll(5);
     lll[0].setSize(3, 0);
     lll[1].setSize(2, 1);
     lll[2].setSize(6, 2);
@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
     cll2(2, 3) = 999;
     Info<< "cll2(2, 3) = " << cll2(2, 3) << nl << endl;
 
-    Info<< "cll2 as List<List<label > > " << cll2()
+    Info<< "cll2 as List<List<label >> " << cll2()
         << endl;
 
     cll2.setSize(3);
diff --git a/applications/test/Distribution/Test-Distribution.C b/applications/test/Distribution/Test-Distribution.C
index 209f46a36ca3f5debfc092ba9837be0238b72d5c..f893e1e4bc44603bd2cd788e9ca9d02b3965c657 100644
--- a/applications/test/Distribution/Test-Distribution.C
+++ b/applications/test/Distribution/Test-Distribution.C
@@ -2,7 +2,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2011-2015 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2011-2016 OpenFOAM Foundation
     \\/      M anipulation   |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
             << "Median " << dS.median()
             << endl;
 
-        reduce(dS, sumOp< Distribution<scalar> >());
+        reduce(dS, sumOp<Distribution<scalar>>());
 
         if (Pstream::master())
         {
diff --git a/applications/test/DynamicList/Test-DynamicList.C b/applications/test/DynamicList/Test-DynamicList.C
index 63f995d9a000a8ea647cd34f833d6acfde59acc4..7b73a214c93f337aa10f5810af01ea1239dd90a1 100644
--- a/applications/test/DynamicList/Test-DynamicList.C
+++ b/applications/test/DynamicList/Test-DynamicList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ void printInfo
 
 int main(int argc, char *argv[])
 {
-    List<DynamicList<label, 1, 0> > ldl(2);
+    List<DynamicList<label, 1, 0>> ldl(2);
 
     ldl[0](0) = 0;
     ldl[0](2) = 2;
@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
     }
     Info<< endl;
 
-    List<List<label> > ll(2);
+    List<List<label>> ll(2);
     ll[0].transfer(ldl[0]);
     ll[1].transfer(ldl[1].shrink());
 
diff --git a/applications/test/Function1/Make/files b/applications/test/Function1/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..6647a7cbbe8ec4641027fafc8480c731a3ffd1b8
--- /dev/null
+++ b/applications/test/Function1/Make/files
@@ -0,0 +1,3 @@
+Test-Function1.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-Function1
diff --git a/applications/test/dataEntry/Make/options b/applications/test/Function1/Make/options
similarity index 100%
rename from applications/test/dataEntry/Make/options
rename to applications/test/Function1/Make/options
diff --git a/applications/test/dataEntry/Test-DataEntry.C b/applications/test/Function1/Test-Function1.C
similarity index 80%
rename from applications/test/dataEntry/Test-DataEntry.C
rename to applications/test/Function1/Test-Function1.C
index 6223b2c6a7c1fc9a55392c51f0d0067a01a139d2..ab4baee1509f8dd10ac285939a2fb97e029f89f6 100644
--- a/applications/test/dataEntry/Test-DataEntry.C
+++ b/applications/test/Function1/Test-Function1.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,15 +22,15 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Application
-    testDataEntry
+    Test-Function1
 
 Description
-    Tests DataEntry
+    Tests Function1
 
 \*---------------------------------------------------------------------------*/
 
 #include "fvCFD.H"
-#include "DataEntry.H"
+#include "Function1.H"
 #include "IOdictionary.H"
 #include "linearInterpolationWeights.H"
 #include "splineInterpolationWeights.H"
@@ -54,8 +54,8 @@ int main(int argc, char *argv[])
     //values[0] = 0.0;
     //values[1] = 1.0;
 
-    //linearInterpolationWeights interpolator
-    splineInterpolationWeights interpolator
+    linearInterpolationWeights interpolator
+    //splineInterpolationWeights interpolator
     (
         samples
     );
@@ -98,11 +98,11 @@ int main(int argc, char *argv[])
     return 1;
 }
 
-    IOdictionary dataEntryProperties
+    IOdictionary function1Properties
     (
         IOobject
         (
-            "dataEntryProperties",
+            "function1Properties",
             runTime.constant(),
             mesh,
             IOobject::MUST_READ_IF_MODIFIED,
@@ -110,19 +110,19 @@ int main(int argc, char *argv[])
         )
     );
 
-    autoPtr<DataEntry<scalar> > dataEntry
+    autoPtr<Function1<scalar>> function1
     (
-        DataEntry<scalar>::New
+        Function1<scalar>::New
         (
-            "dataEntry",
-            dataEntryProperties
+            "function1",
+            function1Properties
         )
     );
 
-    scalar x0 = readScalar(dataEntryProperties.lookup("x0"));
-    scalar x1 = readScalar(dataEntryProperties.lookup("x1"));
+    scalar x0 = readScalar(function1Properties.lookup("x0"));
+    scalar x1 = readScalar(function1Properties.lookup("x1"));
 
-    Info<< "Data entry type: " << dataEntry().type() << nl << endl;
+    Info<< "Data entry type: " << function1().type() << nl << endl;
 
     Info<< "Inputs" << nl
         << "    x0 = " << x0 << nl
@@ -130,12 +130,12 @@ int main(int argc, char *argv[])
         << endl;
 
     Info<< "Interpolation" << nl
-        << "    f(x0) = " << dataEntry().value(x0) << nl
-        << "    f(x1) = " << dataEntry().value(x1) << nl
+        << "    f(x0) = " << function1().value(x0) << nl
+        << "    f(x1) = " << function1().value(x1) << nl
         << endl;
 
     Info<< "Integration" << nl
-        << "    int(f(x)) lim(x0->x1) = " << dataEntry().integrate(x0, x1) << nl
+        << "    int(f(x)) lim(x0->x1) = " << function1().integrate(x0, x1) << nl
         << endl;
 
     return 0;
diff --git a/applications/test/dataEntry/dataEntryProperties b/applications/test/Function1/function1Properties
similarity index 92%
rename from applications/test/dataEntry/dataEntryProperties
rename to applications/test/Function1/function1Properties
index faf14cc8940d7dfe7e67a2c7793d2de9b240eef3..6023015c9c48748b24263a429815ff1bec2fbcfe 100644
--- a/applications/test/dataEntry/dataEntryProperties
+++ b/applications/test/Function1/function1Properties
@@ -11,7 +11,7 @@ FoamFile
     format      ascii;
     class       dictionary;
     location    "constant";
-    object      dataEntryProperties;
+    object      function1Properties;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -19,7 +19,7 @@ x0  0.5;
 x1  1;
 
 
-dataEntry table ((0 0)(10 1));
+function1 table ((0 0)(10 1));
 
 
 // ************************************************************************* //
diff --git a/applications/test/HashTable2/Test-HashTable2.C b/applications/test/HashTable2/Test-HashTable2.C
index 79ff10de4c4b596c35c40e2ffd03bc58a0c92519..0fb7b3a94252952c060f7ba2ded6c58c9b836454 100644
--- a/applications/test/HashTable2/Test-HashTable2.C
+++ b/applications/test/HashTable2/Test-HashTable2.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ int main(int argc, char *argv[])
     Info<< "table1: " << table1 << nl
         << "toc: " << table1.toc() << endl;
 
-    HashTable<label, label, Hash<label> > table2(10);
+    HashTable<label, label, Hash<label>> table2(10);
 
     table2.insert(3, 10);
     table2.insert(5, 12);
diff --git a/applications/test/HashTable3/Test-HashTable3.C b/applications/test/HashTable3/Test-HashTable3.C
index 82e6ce3b9f29900c94670230a8e4f5e98604a5a3..7184d305743303f66ef177cf40de1534b0676c1d 100644
--- a/applications/test/HashTable3/Test-HashTable3.C
+++ b/applications/test/HashTable3/Test-HashTable3.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,9 +48,9 @@ int main(int argc, char *argv[])
 
     // ie, a
     // Map<label> map(2 * nSize);
-    // HashTable<label, label, Hash<label> > map(2 * nSize);
-    // StaticHashTable<label, label, Hash<label> > map(2 * nSize);
-    HashTable<label, label, Hash<label> > map(2 * nSize);
+    // HashTable<label, label, Hash<label>> map(2 * nSize);
+    // StaticHashTable<label, label, Hash<label>> map(2 * nSize);
+    HashTable<label, label, Hash<label>> map(2 * nSize);
 
     Info<< "Constructed map of size: " << nSize
         << " (size " << map.size() << " capacity " << map.capacity() << ") "
diff --git a/applications/test/Hashing/Test-Hashing.C b/applications/test/Hashing/Test-Hashing.C
index 63da9431f183f3a428e1f127cb3f484fe69293af..0ab7e9a7cb633dff3170aef30ca6b0c095225fe1 100644
--- a/applications/test/Hashing/Test-Hashing.C
+++ b/applications/test/Hashing/Test-Hashing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
         }
         else if (listType == "labelListList")
         {
-            List< List<label> > lst(is);
+            List<List<label>> lst(is);
 
             forAll(lst, i)
             {
diff --git a/applications/test/HashingSpeed/Test-HashingSpeed.C b/applications/test/HashingSpeed/Test-HashingSpeed.C
index 7e89d44f8b83622302a6cc485853c1e2360bb6d3..5937ad741e4dfd30ee416c77209b1234aef2fc82 100644
--- a/applications/test/HashingSpeed/Test-HashingSpeed.C
+++ b/applications/test/HashingSpeed/Test-HashingSpeed.C
@@ -7,9 +7,9 @@
 #include <time.h>
 
 #ifndef CLOCKS_PER_SEC
-# ifdef CLK_TCK
-#  define CLOCKS_PER_SEC (CLK_TCK)
-# endif
+    #ifdef CLK_TCK
+        #define CLOCKS_PER_SEC (CLK_TCK)
+    #endif
 #endif
 
 #undef mix
@@ -66,16 +66,16 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy.
      __BYTE_ORDER == __LITTLE_ENDIAN) || \
     (defined(i386) || defined(__i386__) || defined(__i486__) || \
      defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL))
-# define HASH_LITTLE_ENDIAN 1
-# define HASH_BIG_ENDIAN 0
+    #define HASH_LITTLE_ENDIAN 1
+    #define HASH_BIG_ENDIAN 0
 #elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
        __BYTE_ORDER == __BIG_ENDIAN) || \
       (defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))
-# define HASH_LITTLE_ENDIAN 0
-# define HASH_BIG_ENDIAN 1
+    #define HASH_LITTLE_ENDIAN 0
+    #define HASH_BIG_ENDIAN 1
 #else
-# define HASH_LITTLE_ENDIAN 0
-# define HASH_BIG_ENDIAN 0
+    #define HASH_LITTLE_ENDIAN 0
+    #define HASH_BIG_ENDIAN 0
 #endif
 
 #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
diff --git a/applications/test/ListOps/Make/options b/applications/test/ListOps/Make/options
index 9e79e9d733a612692478392bb79fff154d2ff181..51903c0ce4fdd9fb77e67d8ae80beba4ea282cd3 100644
--- a/applications/test/ListOps/Make/options
+++ b/applications/test/ListOps/Make/options
@@ -1,3 +1,3 @@
 EXE_INC = /*-DFULLDEBUG -O0 -g*/ \
 
-EXE_LIBS = \
+EXE_LIBS =
diff --git a/applications/test/Matrix/Test-Matrix.C b/applications/test/Matrix/Test-Matrix.C
index 380576d695a1c19ea68362ce2576f8589e7e846d..523fd7971088c8db5b356f1f62c1e963b49407d1 100644
--- a/applications/test/Matrix/Test-Matrix.C
+++ b/applications/test/Matrix/Test-Matrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,11 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "scalarMatrices.H"
+#include "LUscalarMatrix.H"
+#include "LLTMatrix.H"
+#include "QRMatrix.H"
 #include "vector.H"
+#include "tensor.H"
 #include "IFstream.H"
 
 using namespace Foam;
@@ -36,21 +40,21 @@ int main(int argc, char *argv[])
 {
     SquareMatrix<scalar> hmm(3);
 
-    hmm[0][0] = -3.0;
-    hmm[0][1] = 10.0;
-    hmm[0][2] = -4.0;
-    hmm[1][0] = 2.0;
-    hmm[1][1] = 3.0;
-    hmm[1][2] = 10.0;
-    hmm[2][0] = 2.0;
-    hmm[2][1] = 6.0;
-    hmm[2][2] = 1.0;
+    hmm(0, 0) = -3.0;
+    hmm(0, 1) = 10.0;
+    hmm(0, 2) = -4.0;
+    hmm(1, 0) = 2.0;
+    hmm(1, 1) = 3.0;
+    hmm(1, 2) = 10.0;
+    hmm(2, 0) = 2.0;
+    hmm(2, 1) = 6.0;
+    hmm(2, 2) = 1.0;
 
     //Info<< hmm << endl << hmm - 2.0*(-hmm) << endl;
     Info<< max(hmm) << endl;
     Info<< min(hmm) << endl;
 
-    SquareMatrix<scalar> hmm2(3, 3, 1.0);
+    SquareMatrix<scalar> hmm2(3, I);
 
     hmm = hmm2;
 
@@ -72,7 +76,14 @@ int main(int argc, char *argv[])
     Info<< hmm5 << endl;
 
     {
-        scalarSymmetricSquareMatrix symmMatrix(3, 3, 0);
+        RectangularMatrix<scalar> rm1(5, 6, 3.1);
+        rm1(0, 1) = 4.5;
+        RectangularMatrix<scalar> rm1b(rm1.block(2, 2, 0, 0));
+        Info<< "rm1b = " << rm1b << endl;
+    }
+
+    {
+        scalarSymmetricSquareMatrix symmMatrix(3, Zero);
 
         symmMatrix(0, 0) = 4;
         symmMatrix(1, 0) = 12;
@@ -103,32 +114,61 @@ int main(int argc, char *argv[])
         Info<< "Solution = " << rhs << endl;
     }
 
-    {
-        scalarSquareMatrix squareMatrix(3, 3, 0);
 
-        squareMatrix[0][0] = 4;
-        squareMatrix[0][1] = 12;
-        squareMatrix[0][2] = -16;
-        squareMatrix[1][0] = 12;
-        squareMatrix[1][1] = 37;
-        squareMatrix[1][2] = -43;
-        squareMatrix[2][0] = -16;
-        squareMatrix[2][1] = -43;
-        squareMatrix[2][2] = 98;
+    scalarSquareMatrix squareMatrix(3, Zero);
+
+    squareMatrix(0, 0) = 4;
+    squareMatrix(0, 1) = 12;
+    squareMatrix(0, 2) = -16;
+    squareMatrix(1, 0) = 12;
+    squareMatrix(1, 1) = 37;
+    squareMatrix(1, 2) = -43;
+    squareMatrix(2, 0) = -16;
+    squareMatrix(2, 1) = -43;
+    squareMatrix(2, 2) = 98;
 
-        const scalarSquareMatrix squareMatrixCopy = squareMatrix;
-        Info<< nl << "Square Matrix = " << squareMatrix << endl;
+    Info<< nl << "Square Matrix = " << squareMatrix << endl;
 
-        Info<< "det = " << det(squareMatrixCopy) << endl;
+    const scalarField source(3, 1);
 
+    {
+        {
+            scalarSquareMatrix sm(squareMatrix);
+            Info<< "det = " << det(sm) << endl;
+        }
+
+        scalarSquareMatrix sm(squareMatrix);
         labelList rhs(3, 0);
         label sign;
-        LUDecompose(squareMatrix, rhs, sign);
+        LUDecompose(sm, rhs, sign);
 
-        Info<< "Decomposition = " << squareMatrix << endl;
+        Info<< "Decomposition = " << sm << endl;
         Info<< "Pivots = " << rhs << endl;
         Info<< "Sign = " << sign << endl;
-        Info<< "det = " << detDecomposed(squareMatrix, sign) << endl;
+        Info<< "det = " << detDecomposed(sm, sign) << endl;
+    }
+
+    {
+        LUscalarMatrix LU(squareMatrix);
+        scalarField x(LU.solve(source));
+        Info<< "LU solve residual " << (squareMatrix*x - source) << endl;
+    }
+
+    {
+        LLTMatrix<scalar> LLT(squareMatrix);
+        scalarField x(LLT.solve(source));
+        Info<< "LLT solve residual " << (squareMatrix*x - source) << endl;
+    }
+
+    {
+        QRMatrix<scalarSquareMatrix> QR(squareMatrix);
+        scalarField x(QR.solve(source));
+
+        Info<< "QR solve residual "
+            << (squareMatrix*x - source) << endl;
+
+        Info<< "QR inverse solve residual "
+            << (x - QR.inv()*source) << endl;
     }
 
     Info<< "\nEnd\n" << endl;
diff --git a/applications/test/ODE/Test-ODE.C b/applications/test/ODE/Test-ODE.C
index ae203742591af2e1f7693e484582b4c25b71454c..689c634fdb23f558bfbc12ec779bd19a089e7afc 100644
--- a/applications/test/ODE/Test-ODE.C
+++ b/applications/test/ODE/Test-ODE.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,25 +75,25 @@ public:
         dfdx[2] = (2.0/sqr(x))*y[2];
         dfdx[3] = (3.0/sqr(x))*y[3];
 
-        dfdy[0][0] = 0.0;
-        dfdy[0][1] = -1.0;
-        dfdy[0][2] = 0.0;
-        dfdy[0][3] = 0.0;
-
-        dfdy[1][0] = 1.0;
-        dfdy[1][1] = -1.0/x;
-        dfdy[1][2] = 0.0;
-        dfdy[1][3] = 0.0;
-
-        dfdy[2][0] = 0.0;
-        dfdy[2][1] = 1.0;
-        dfdy[2][2] = -2.0/x;
-        dfdy[2][3] = 0.0;
-
-        dfdy[3][0] = 0.0;
-        dfdy[3][1] = 0.0;
-        dfdy[3][2] = 1.0;
-        dfdy[3][3] = -3.0/x;
+        dfdy(0, 0) = 0.0;
+        dfdy(0, 1) = -1.0;
+        dfdy(0, 2) = 0.0;
+        dfdy(0, 3) = 0.0;
+
+        dfdy(1, 0) = 1.0;
+        dfdy(1, 1) = -1.0/x;
+        dfdy(1, 2) = 0.0;
+        dfdy(1, 3) = 0.0;
+
+        dfdy(2, 0) = 0.0;
+        dfdy(2, 1) = 1.0;
+        dfdy(2, 2) = -2.0/x;
+        dfdy(2, 3) = 0.0;
+
+        dfdy(3, 0) = 0.0;
+        dfdy(3, 1) = 0.0;
+        dfdy(3, 2) = 1.0;
+        dfdy(3, 3) = -3.0/x;
     }
 };
 
diff --git a/applications/test/PackedList1/Test-PackedList1.C b/applications/test/PackedList1/Test-PackedList1.C
index b8ef31a2f2be46ac519f4803b6d70e0064a43801..f39599fa6ce79f99b6bb586b65b0f5238698daff 100644
--- a/applications/test/PackedList1/Test-PackedList1.C
+++ b/applications/test/PackedList1/Test-PackedList1.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,11 +72,15 @@ int main(int argc, char *argv[])
     list1.printInfo(Info, true);
 
     Info<< "\ntest assign between references, with chaining\n";
-    list1[0] = list1[4] = 1;
+    list1[0] = 1;
+    list1[4] = 1;
     list1.printInfo(Info, true);
 
     Info<< "\ntest assign between references, with chaining and auto-vivify\n";
-    list1[1] = list1[8] = list1[10] = list1[14] = 2;
+    list1[1] = 2;
+    list1[8] = 2;
+    list1[10] = 2;
+    list1[14] = 2;
     list1.printInfo(Info, true);
 
 
diff --git a/applications/test/PackedList2/Test-PackedList2.C b/applications/test/PackedList2/Test-PackedList2.C
index 578a6103ade2f21fde59b40364b874de8648f260..2926118ff930357a82df0a95f8a8caa87fc60d83 100644
--- a/applications/test/PackedList2/Test-PackedList2.C
+++ b/applications/test/PackedList2/Test-PackedList2.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,8 +62,8 @@ int main(int argc, char *argv[])
 
     // fullStaticHash is really slow
     // give it lots of slots to help
-    StaticHashTable<nil, label, Hash<label> > emptyStaticHash;
-    StaticHashTable<nil, label, Hash<label> > fullStaticHash(100000);
+    StaticHashTable<nil, label, Hash<label>> emptyStaticHash;
+    StaticHashTable<nil, label, Hash<label>> fullStaticHash(100000);
     for (label i = 0; i < n; i++)
     {
         fullStaticHash.insert(i, nil());
diff --git a/applications/test/PatchTools/Test-PatchTools.C b/applications/test/PatchTools/Test-PatchTools.C
index 21d5e2761796435eef403cc7283637b8e3a380ae..094ea00f108f86bd7259a68ac2e5a94a4d5c6aa8 100644
--- a/applications/test/PatchTools/Test-PatchTools.C
+++ b/applications/test/PatchTools/Test-PatchTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,7 @@ using namespace Foam;
 //    //    (note:without calculating pointNormals
 //    //     to avoid them being stored)
 //
-//    tmp<pointField> textrudeN(new pointField(p.nPoints(), vector::zero));
+//    tmp<pointField> textrudeN(new pointField(p.nPoints(), Zero));
 //    pointField& extrudeN = textrudeN();
 //    {
 //        const faceList& localFaces = p.localFaces();
@@ -85,7 +85,7 @@ using namespace Foam;
 //
 //
 //    // Collect local pointFaces
-//    List<List<point> > pointFaceNormals(map.constructSize());
+//    List<List<point>> pointFaceNormals(map.constructSize());
 //    {
 //        const vectorField& faceAreas = mesh.faceAreas();
 //
@@ -123,7 +123,7 @@ using namespace Foam;
 //        globalData.globalPointTransformedSlaves();
 //
 //
-//    pointField coupledPointNormals(map.constructSize(), vector::zero);
+//    pointField coupledPointNormals(map.constructSize(), Zero);
 //
 //    forAll(meshPoints, patchPointI)
 //    {
diff --git a/applications/test/dataEntry/Make/files b/applications/test/dataEntry/Make/files
deleted file mode 100644
index c514002f99e31cf9c1bad83a287c8b4e75ec16a1..0000000000000000000000000000000000000000
--- a/applications/test/dataEntry/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-Test-DataEntry.C
-
-EXE = $(FOAM_USER_APPBIN)/Test-DataEntry
diff --git a/applications/test/extendedStencil/Test-ExtendedStencil.C b/applications/test/extendedStencil/Test-ExtendedStencil.C
index 8c01410feca8b74781e3d0968690e0675d2b3714..e0e343eed4d479e4de2baccb7b55ab7ff2624a31 100644
--- a/applications/test/extendedStencil/Test-ExtendedStencil.C
+++ b/applications/test/extendedStencil/Test-ExtendedStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
 //        writeStencilStats(addressing.stencil());
 //
 //        // Collect stencil cell centres
-//        List<List<point> > stencilPoints(mesh.nFaces());
+//        List<List<point>> stencilPoints(mesh.nFaces());
 //        addressing.collectData
 //        (
 //            mesh.C(),
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
 //        //// Do some interpolation.
 //        //{
 //        //    const labelListList& stencil = addressing.stencil();
-//        //    List<List<scalar> > stencilWeights(stencil.size());
+//        //    List<List<scalar>> stencilWeights(stencil.size());
 //        //    forAll(stencil, faceI)
 //        //    {
 //        //        const labelList& fStencil = stencil[faceI];
@@ -223,7 +223,7 @@ int main(int argc, char *argv[])
 //
 //
 //        // Collect stencil cell centres
-//        List<List<point> > stencilPoints(mesh.nFaces());
+//        List<List<point>> stencilPoints(mesh.nFaces());
 //        addressing.collectData
 //        (
 //            mesh.C(),
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
 //        //
 //        //
 //        //// Collect stencil cell centres
-//        //List<List<point> > stencilPoints(mesh.nFaces());
+//        //List<List<point>> stencilPoints(mesh.nFaces());
 //        //addressing.collectData
 //        //(
 //        //    mesh.C(),
@@ -295,7 +295,7 @@ int main(int argc, char *argv[])
 //        //
 //        //
 //        //// Collect stencil cell centres
-//        //List<List<point> > stencilPoints(mesh.nFaces());
+//        //List<List<point>> stencilPoints(mesh.nFaces());
 //        //addressing.collectData
 //        //(
 //        //    mesh.C(),
@@ -331,7 +331,7 @@ int main(int argc, char *argv[])
     //
     //    {
     //        // Collect stencil cell centres
-    //        List<List<point> > ownPoints(mesh.nFaces());
+    //        List<List<point>> ownPoints(mesh.nFaces());
     //        addressing.collectData
     //        (
     //            addressing.ownMap(),
@@ -352,7 +352,7 @@ int main(int argc, char *argv[])
     //    }
     //    {
     //        // Collect stencil cell centres
-    //        List<List<point> > neiPoints(mesh.nFaces());
+    //        List<List<point>> neiPoints(mesh.nFaces());
     //        addressing.collectData
     //        (
     //            addressing.neiMap(),
@@ -391,7 +391,7 @@ int main(int argc, char *argv[])
     //
     //    {
     //        // Collect stencil cell centres
-    //        List<List<point> > ownPoints(mesh.nFaces());
+    //        List<List<point>> ownPoints(mesh.nFaces());
     //        addressing.collectData
     //        (
     //            addressing.ownMap(),
@@ -412,7 +412,7 @@ int main(int argc, char *argv[])
     //    }
     //    {
     //        // Collect stencil cell centres
-    //        List<List<point> > neiPoints(mesh.nFaces());
+    //        List<List<point>> neiPoints(mesh.nFaces());
     //        addressing.collectData
     //        (
     //            addressing.neiMap(),
@@ -451,7 +451,7 @@ int main(int argc, char *argv[])
         writeStencilStats(addressing.stencil());
 
         // Collect stencil cell centres
-        List<List<point> > stencilPoints(mesh.nCells());
+        List<List<point>> stencilPoints(mesh.nCells());
         addressing.collectData
         (
             mesh.C(),
@@ -479,7 +479,7 @@ int main(int argc, char *argv[])
         writeStencilStats(addressing.stencil());
 
         // Collect stencil cell centres
-        List<List<point> > stencilPoints(mesh.nCells());
+        List<List<point>> stencilPoints(mesh.nCells());
         addressing.collectData
         (
             mesh.C(),
@@ -507,7 +507,7 @@ int main(int argc, char *argv[])
         writeStencilStats(addressing.stencil());
 
         // Collect stencil cell centres
-        List<List<point> > stencilPoints(mesh.nCells());
+        List<List<point>> stencilPoints(mesh.nCells());
         addressing.collectData
         (
             mesh.C(),
@@ -528,7 +528,7 @@ int main(int argc, char *argv[])
 
 //XXXXXX
 //    // Evaluate
-//    List<List<scalar> > stencilData(faceStencils.size());
+//    List<List<scalar>> stencilData(faceStencils.size());
 //    collectStencilData
 //    (
 //        distMap,
diff --git a/applications/test/extendedStencil/Test-ExtendedStencil2.C b/applications/test/extendedStencil/Test-ExtendedStencil2.C
index df23d302833e57a2cd6a4b6d01ef16d1082b2ca8..03d5283233c36b1d34cd8be8c95ddb01328ab73a 100644
--- a/applications/test/extendedStencil/Test-ExtendedStencil2.C
+++ b/applications/test/extendedStencil/Test-ExtendedStencil2.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
         CFCCellToCellStencil stencil(mesh);
 
         // Construct exchange map and renumber stencil
-        List<Map<label> > compactMap(Pstream::nProcs());
+        List<Map<label>> compactMap(Pstream::nProcs());
         mapDistribute map
         (
             stencil.globalNumbering(),
@@ -142,12 +142,12 @@ int main(int argc, char *argv[])
 
 
         // Collect the data in stencil form
-        List<List<vector> > stencilPoints;
+        List<List<vector>> stencilPoints;
         {
             const volVectorField& fld = mesh.C();
 
             // 1. Construct cell data in compact addressing
-            List<point> compactFld(map.constructSize(), pTraits<point>::zero);
+            List<point> compactFld(map.constructSize(), Zero);
 
             // Insert my internal values
             forAll(fld, cellI)
diff --git a/applications/test/fieldMapping/Test-fieldMapping.C b/applications/test/fieldMapping/Test-fieldMapping.C
index 38a4b110f96446249cc9d041aeb9b088bcfb4f33..41af9c79231cafcf614d708e0a547182ebe61105 100644
--- a/applications/test/fieldMapping/Test-fieldMapping.C
+++ b/applications/test/fieldMapping/Test-fieldMapping.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,6 +39,7 @@ Description
 #include "mapPolyMesh.H"
 #include "polyTopoChange.H"
 #include "fvcDiv.H"
+#include "zeroGradientFvPatchFields.H"
 #include "Random.H"
 
 using namespace Foam;
diff --git a/applications/test/fieldMapping/pipe1D/Allrun b/applications/test/fieldMapping/pipe1D/Allrun
index eb6e441abb1345143e6d4053d83f39fe69e0967e..130ff26742c4767cf2b8d889cb0383ea76b72721 100755
--- a/applications/test/fieldMapping/pipe1D/Allrun
+++ b/applications/test/fieldMapping/pipe1D/Allrun
@@ -20,4 +20,4 @@ mv "log.$application" "log.$application-inflate"
 runApplication $application false
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/test/globalMeshData/Test-globalMeshData.C b/applications/test/globalMeshData/Test-globalMeshData.C
index c6b2d142e7a3f9e21f3e55e4dc0ca9867a7079e3..eab4500ebe82f275da0ae58c880eb06c887108c5 100644
--- a/applications/test/globalMeshData/Test-globalMeshData.C
+++ b/applications/test/globalMeshData/Test-globalMeshData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,10 +64,8 @@ int main(int argc, char *argv[])
 
         // Create field with my local data
         pointField coords(globalPointSlavesMap.constructSize());
-        SubList<point>(coords, coupledPatch.nPoints()).assign
-        (
-            coupledPatch.localPoints()
-        );
+        SubList<point>(coords, coupledPatch.nPoints()) =
+            coupledPatch.localPoints();
 
         // Exchange data. Apply positional transforms.
         globalPointSlavesMap.distribute
@@ -185,8 +183,7 @@ int main(int argc, char *argv[])
         label nBnd = mesh.nFaces()-mesh.nInternalFaces();
 
         pointField fc(globalPointBoundaryFacesMap.constructSize());
-        SubList<point>(fc, nBnd).assign
-        (
+        SubList<point>(fc, nBnd) =
             primitivePatch
             (
                 SubList<face>
@@ -196,8 +193,7 @@ int main(int argc, char *argv[])
                     mesh.nInternalFaces()
                 ),
                 mesh.points()
-            ).faceCentres()
-        );
+            ).faceCentres();
 
         // Exchange data
         globalPointBoundaryFacesMap.distribute
diff --git a/applications/test/hexRef8/block/Allrun b/applications/test/hexRef8/block/Allrun
index 541ce85b6d4918ddf5e90b4763a9078a54f073e5..59757f310a2a8bfb769ad4ce94da527304fd42f4 100755
--- a/applications/test/hexRef8/block/Allrun
+++ b/applications/test/hexRef8/block/Allrun
@@ -20,4 +20,4 @@ mv "log.$application" "log.$application-inflate"
 runApplication $application false
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/test/mappedPatch/Test-MappedPatch.C b/applications/test/mappedPatch/Test-MappedPatch.C
index 9f0258dfec8800ab69461095f8695733ef786b4b..d1a28a823a09cb354066a3bdc62925307ba59f0c 100644
--- a/applications/test/mappedPatch/Test-MappedPatch.C
+++ b/applications/test/mappedPatch/Test-MappedPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
             IOobject::AUTO_WRITE
         ),
         mesh,
-        dimensionedVector("zero", dimLength, vector::zero),
+        dimensionedVector("zero", dimLength, Zero),
         patchFieldTypes
     );
 
diff --git a/applications/test/momentOfInertia/Test-momentOfInertia.C b/applications/test/momentOfInertia/Test-momentOfInertia.C
index a1d9c7c13352f225b1a079c93fff0746c5c273cb..726454e3a14447a130ec3de6f0b3b73bd2331f99 100644
--- a/applications/test/momentOfInertia/Test-momentOfInertia.C
+++ b/applications/test/momentOfInertia/Test-momentOfInertia.C
@@ -2,7 +2,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2011-2013 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2011-2016 OpenFOAM Foundation
     \\/      M anipulation   |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 
         point Cf = f.centre(pts);
 
-        tensor J = tensor::zero;
+        tensor J = Zero;
 
         J = f.inertia(pts, Cf, density);
 
@@ -141,8 +141,8 @@ int main(int argc, char *argv[])
         tetFaces[3] = triFace(0, 1, 3);
 
         scalar m = 0.0;
-        vector cM = vector::zero;
-        tensor J = tensor::zero;
+        vector cM = Zero;
+        tensor J = Zero;
 
         momentOfInertia::massPropertiesSolid(pts, tetFaces, density, m, cM, J);
 
diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C
index 5aeb0140bdc845a1aef21f678a4c8f68c9c9b559..62d6150ce4fdcfa57bb172bedcc7d51eeae1961f 100644
--- a/applications/test/parallel/Test-parallel.C
+++ b/applications/test/parallel/Test-parallel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,12 +54,12 @@ int main(int argc, char *argv[])
     // Test mapDistribute
     // ~~~~~~~~~~~~~~~~~~
 
-    if (false)
+    if (true)
     {
         Random rndGen(43544*Pstream::myProcNo());
 
         // Generate random data.
-        List<Tuple2<label, List<scalar> > > complexData(100);
+        List<Tuple2<label, List<scalar>>> complexData(100);
         forAll(complexData, i)
         {
             complexData[i].first() = rndGen.integer(0, Pstream::nProcs()-1);
@@ -80,11 +80,6 @@ int main(int argc, char *argv[])
             nSend[procI]++;
         }
 
-        // Sync how many to send
-        labelListList allNTrans(Pstream::nProcs());
-        allNTrans[Pstream::myProcNo()] = nSend;
-        combineReduce(allNTrans, UPstream::listEq());
-
         // Collect items to be sent
         labelListList sendMap(Pstream::nProcs());
         forAll(sendMap, procI)
@@ -98,11 +93,15 @@ int main(int argc, char *argv[])
             sendMap[procI][nSend[procI]++] = i;
         }
 
+        // Sync how many to send
+        labelList nRecv;
+        Pstream::exchangeSizes(sendMap, nRecv);
+
         // Collect items to be received
         labelListList recvMap(Pstream::nProcs());
         forAll(recvMap, procI)
         {
-            recvMap[procI].setSize(allNTrans[procI][Pstream::myProcNo()]);
+            recvMap[procI].setSize(nRecv[procI]);
         }
 
         label constructSize = 0;
diff --git a/applications/test/passiveParticle/Test-passiveParticle.C b/applications/test/passiveParticle/Test-passiveParticle.C
index 05c28602d216d6d4238de920f2d657e2d7c9d487..68bea7b8efa18ec762d7e1e9a214ba105fa70f5e 100644
--- a/applications/test/passiveParticle/Test-passiveParticle.C
+++ b/applications/test/passiveParticle/Test-passiveParticle.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
         Pout<< "Starting particles:" << particles.size() << endl;
 
         Pout<< "Adding a particle." << endl;
-        particles.addParticle(new passiveParticle(mesh, vector::zero, -1));
+        particles.addParticle(new passiveParticle(mesh, Zero, -1));
 
         forAllConstIter(passiveParticleCloud, particles, iter)
         {
diff --git a/applications/test/pointField/Test-PointField.C b/applications/test/pointField/Test-PointField.C
index b2524a2044da7317d8510b4746d288e9c415643e..020fdb0e60c1a49f8b36a77fe2a79d7b31271374 100644
--- a/applications/test/pointField/Test-PointField.C
+++ b/applications/test/pointField/Test-PointField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
             IOobject::AUTO_WRITE
         ),
         pMesh,
-        dimensionedVector("fvmU", dimLength, vector::zero),
+        dimensionedVector("fvmU", dimLength, Zero),
         pointPatchVectorField::calculatedType()
     );
 
diff --git a/applications/test/primitivePatch/Test-PrimitivePatch.C b/applications/test/primitivePatch/Test-PrimitivePatch.C
index 3f5e9161e3c18fd3688977ffad491a0115bba4c9..c575782f4cf25c06f727bbd8a2e40e2dadae4ae0 100644
--- a/applications/test/primitivePatch/Test-PrimitivePatch.C
+++ b/applications/test/primitivePatch/Test-PrimitivePatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,7 +156,7 @@ void writeEdgeFaces
 
     OFstream efStream("edgeFaces.obj");
 
-    pointField ctrs(localFaces.size(), vector::zero);
+    pointField ctrs(localFaces.size(), Zero);
 
     forAll(localFaces, faceI)
     {
@@ -188,7 +188,7 @@ void writeFaceFaces
 
     OFstream ffStream("faceFaces.obj");
 
-    pointField ctrs(localFaces.size(), vector::zero);
+    pointField ctrs(localFaces.size(), Zero);
 
     forAll(localFaces, faceI)
     {
diff --git a/applications/test/quaternion/Test-quaternion.C b/applications/test/quaternion/Test-quaternion.C
index df616dfa33315fdd3ca2eeaaf1daccf29bf5d87b..c3acadf7cf4100d1922fd5356565a934e061ac24 100644
--- a/applications/test/quaternion/Test-quaternion.C
+++ b/applications/test/quaternion/Test-quaternion.C
@@ -1,15 +1,48 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Application
+    Test-quaternion
+
+Description
+    Test application for quaternions.
+
+\*---------------------------------------------------------------------------*/
+
 #include "quaternion.H"
 #include "septernion.H"
 #include "IOstreams.H"
 
 using namespace Foam;
 
-int main()
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
 {
-    quaternion q(vector(1, 0, 0), 0.7853981);
+    quaternion q(vector(1, 2, 3), 0.7853981);
     Info<< "q " << q << endl;
 
-    vector v(0, 1, 0);
+    vector v(0.1, 0.4, 2.1);
     Info<< "v " << v << endl;
 
     Info<< "inv(q)*q " << inv(q)*q << endl;
@@ -17,8 +50,11 @@ int main()
     Info<< "q*quaternion(0, v)*conjugate(q) "
         << q*quaternion(0, v)*conjugate(q) << endl;
 
+    Info<< "q.R() " << q.R() << endl;
     Info<< "q.transform(v) " << q.transform(v) << endl;
     Info<< "q.R() & v " << (q.R() & v) << endl;
+    Info<< "quaternion(q.R()).transform(v) "
+        << (quaternion(q.R()).transform(v)) << endl;
 
     Info<< "q.invTransform(v) " << q.invTransform(v) << endl;
 
@@ -27,14 +63,56 @@ int main()
 
     Info<< "inv(tr)*tr " << inv(tr)*tr << endl;
 
-    Info<< "tr.transform(v) " << tr.transform(v) << endl;
+    Info<< "tr.transform(v) " << tr.transformPoint(v) << endl;
 
-    Info<< "(septernion(vector(0, -1, 0))*q*septernion(vector(0, 1, 0)))"
+    vector origin(1, 2, 4);
+
+    Info<< "(septernion(-origin)*q*septernion(origin))"
         << ".transform(v) "
-        <<  (septernion(vector(0, -1, 0))
-           *q
-           *septernion(vector(0, 1, 0))).transform(v)
+        << (septernion(-origin)*q*septernion(origin)).transformPoint(v)
+        <<  " "
+        << septernion(-origin)
+          .transformPoint(q.transform(septernion(origin).transformPoint(v)))
         << endl;
 
+    Info<< "Test conversion from and to Euler-angles" << endl;
+    vector angles(0.1, 0.2, 0.3);
+    for (int rs=quaternion::ZYX; rs<quaternion::XZX; ++rs)
+    {
+        if
+        (
+            mag
+            (
+                angles
+              - quaternion(quaternion::rotationSequence(rs), angles)
+               .eulerAngles(quaternion::rotationSequence(rs))
+            )
+          > SMALL
+        )
+        {
+            FatalErrorInFunction
+                << "Inconsistent conversion for rotation sequence "
+                << rs << exit(FatalError)
+                << endl;
+        }
+    }
+
+    List<septernion> ss(3);
+    List<scalar> w(3);
+
+    ss[0] = septernion(vector(0, 0.1, 0), quaternion(0.7, vector(1, 2, 3)));
+    w[0] = 0.1;
+    ss[1] = septernion(vector(0, 0.2, 0), quaternion(-0.6, vector(-2, -1, -3)));
+    w[1] = 0.5;
+    ss[2] = septernion(vector(0, 0.3, 0), quaternion(0.3, vector(3, 2, 1)));
+    w[2] = 0.4;
+
+    Info<< "average(ss, w) " << average(ss, w) << endl;
+
+    Info<< "End\n" << endl;
+
     return 0;
 }
+
+
+// ************************************************************************* //
diff --git a/applications/test/regex/Test-regex.C b/applications/test/regex/Test-regex.C
index 9e74c36f2489d207a589e95b311bb2f6a6c8f12c..35fa73a2cc80defc6f115bbecd6945c7726d4ebe 100644
--- a/applications/test/regex/Test-regex.C
+++ b/applications/test/regex/Test-regex.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ using namespace Foam;
 
 int main(int argc, char *argv[])
 {
-    List<Tuple2<string, string> > rawList(IFstream("testRegexps")());
+    List<Tuple2<string, string>> rawList(IFstream("testRegexps")());
     Info<< "Test expressions:" << rawList << endl;
     IOobject::writeDivider(Info) << endl;
 
diff --git a/applications/test/rigidBodyDynamics/pendulum/Make/files b/applications/test/rigidBodyDynamics/pendulum/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..471ba2b584fe4fa8c8ab39f785dd6ba314a7a255
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulum/Make/files
@@ -0,0 +1,3 @@
+pendulum.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-pendulum
diff --git a/applications/test/rigidBodyDynamics/pendulum/Make/options b/applications/test/rigidBodyDynamics/pendulum/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..4a9d828b67c8d2e6090ad4601496f7cd38dbe731
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulum/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(LIB_SRC)/rigidBodyDynamics/lnInclude
+
+EXE_LIBS = \
+    -lrigidBodyDynamics
diff --git a/applications/test/rigidBodyDynamics/pendulum/pendulum b/applications/test/rigidBodyDynamics/pendulum/pendulum
new file mode 100644
index 0000000000000000000000000000000000000000..d179af4438547ee888802d8074f94b04aeedbad3
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulum/pendulum
@@ -0,0 +1,38 @@
+bodies0
+{
+    pendulum
+    {
+        type            rigidBody;
+        mass            1;
+        centreOfMass    (0 -1 0);
+        inertia         (0.001 0 0 0.001 0 0.001);
+        parent          root;
+        transform       (1 0 0 0 1 0 0 0 1) (0 0 0);
+        joint
+        {
+            type            Rz;
+        }
+    }
+}
+
+bodies
+{
+    hinge
+    {
+        type            masslessBody;
+        parent          root;
+        transform       (1 0 0 0 1 0 0 0 1) (0 0 0);
+        joint
+        {
+            type            Rz;
+        }
+    }
+    weight
+    {
+        type            sphere;
+        mass            1;
+        radius          0.05;
+        transform       (1 0 0 0 1 0 0 0 1) (0 -1 0);
+        mergeWith       hinge;
+    }
+}
diff --git a/applications/test/rigidBodyDynamics/pendulum/pendulum.C b/applications/test/rigidBodyDynamics/pendulum/pendulum.C
new file mode 100644
index 0000000000000000000000000000000000000000..cc9fc374e5afb965ade02c0d7b265ce384516b62
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulum/pendulum.C
@@ -0,0 +1,124 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Application
+    pendulum
+
+Description
+    Simple swinging pendulum simulation with 1-DoF.  The motion is integrated
+    using a symplectic method for just over 2-periods.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyModel.H"
+#include "masslessBody.H"
+#include "rigidBodyModelState.H"
+#include "sphere.H"
+#include "joints.H"
+#include "IFstream.H"
+
+using namespace Foam;
+using namespace RBD;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+    /*
+    bool testMerge = true;
+
+    // Create a model for the pendulum
+    rigidBodyModel pendulum;
+
+    // Join a weight to the origin with a centre of mass -1m below the origin
+    // by a hinge which rotates about the z-axis
+    if (testMerge)
+    {
+        pendulum.join
+        (
+            pendulum.bodyID("root"),
+            Xt(Zero),
+            joint::New(new joints::Rz()),
+            autoPtr<rigidBody>(new masslessBody("hinge"))
+        );
+
+        pendulum.merge
+        (
+            pendulum.bodyID("hinge"),
+            Xt(vector(0, -1, 0)),
+            autoPtr<rigidBody>(new sphere("weight", 1, 0.05))
+        );
+    }
+    else
+    {
+        pendulum.join
+        (
+            pendulum.bodyID("root"),
+            Xt(Zero),
+            joint::New(new joints::Rz()),
+            rigidBody::New("pendulum", 1, vector(0, -1, 0), 1e-3*I)
+        );
+    }
+    */
+
+    // Create the pendulum model from dictionary
+    rigidBodyModel pendulum(dictionary(IFstream("pendulum")()));
+
+    Info<< pendulum << endl;
+
+    // Create the joint-space state fields
+    rigidBodyModelState pendulumState(pendulum);
+    scalarField& q = pendulumState.q();
+    scalarField& qDot = pendulumState.qDot();
+    scalarField& qDdot = pendulumState.qDdot();
+
+    scalarField tau(pendulum.nDoF(), Zero);
+
+    // Set the angle of the pendulum to 0.3rad
+    q[0] = 0.3;
+
+    // Set the gravitational acceleration
+    pendulum.g() = vector(0, -9.81, 0);
+
+    // Integrate the motion of the pendulum for 4.1s (~2-periods) using a
+    // symplectic method
+    scalar deltaT = 0.01;
+    for (scalar t=0; t<4.1; t+=deltaT)
+    {
+        qDot += 0.5*deltaT*qDdot;
+        q += deltaT*qDot;
+
+        pendulum.forwardDynamics(pendulumState, tau, Field<spatialVector>());
+
+        qDot += 0.5*deltaT*qDdot;
+
+        Info<< "Time " << t << "s, angle = " << q[0] << "rad" << endl;
+    }
+
+    Info<< "\nEnd\n" << endl;
+
+    return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/Make/files b/applications/test/rigidBodyDynamics/pendulumAndSpring/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..aef882dc34115be95ab639e6a959221a68594e96
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/Make/files
@@ -0,0 +1,3 @@
+pendulumAndSpring.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-pendulumAndSpring
diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/Make/options b/applications/test/rigidBodyDynamics/pendulumAndSpring/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..4a9d828b67c8d2e6090ad4601496f7cd38dbe731
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(LIB_SRC)/rigidBodyDynamics/lnInclude
+
+EXE_LIBS = \
+    -lrigidBodyDynamics
diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring
new file mode 100644
index 0000000000000000000000000000000000000000..ec9c3517b7dd78e5e2f715591fb9e531003e74a9
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring
@@ -0,0 +1,64 @@
+solver
+{
+    type Newmark;
+}
+
+// It is necessary to iterate for the Newmark solver
+nIter 2;
+
+bodies
+{
+    M
+    {
+        type            sphere;
+        parent          root;
+        mass            6e4;
+        radius          0.01;
+        transform       (1 0 0 0 1 0 0 0 1) (0 0 0);
+        joint
+        {
+            type composite;
+
+            joints
+            (
+                {
+                    type            Px;
+                }
+                {
+                    type            Rz;
+                }
+            );
+        }
+    }
+
+    m
+    {
+        type            sphere;
+        parent          M;
+        mass            6e3;
+        radius          0.01;
+        transform       (1 0 0 0 1 0 0 0 1) (0 -5 0);
+        mergeWith       M;
+    }
+}
+
+restraints
+{
+    spring
+    {
+        type            linearSpring;
+        body            M;
+        anchor          (0 0 0);
+        refAttachmentPt (0 0 0);
+        stiffness       1e5;
+        damping         0;
+        restLength      0;
+    }
+}
+
+// Set the gravitational acceleration
+g (0 -9.81 0);
+
+// Set the initial offset of the pendulum to 1.5m
+// and the angle of the pendulum to 30deg
+q (1.5 0.5235987);
diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C
new file mode 100644
index 0000000000000000000000000000000000000000..94e151f69c079b6c263bece2d514a80783a37381
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C
@@ -0,0 +1,92 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Application
+    pendulumAndSpring
+
+Description
+    Simple 2-DoF pendulum and spring simulation.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyMotion.H"
+#include "masslessBody.H"
+#include "sphere.H"
+#include "joints.H"
+#include "rigidBodyRestraint.H"
+#include "rigidBodyModelState.H"
+#include "IFstream.H"
+#include "OFstream.H"
+#include "constants.H"
+
+using namespace Foam;
+using namespace RBD;
+using namespace Foam::constant::mathematical;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+    dictionary pendulumAndSpringDict(IFstream("pendulumAndSpring")());
+
+    // Create the pendulumAndSpring model from dictionary
+    rigidBodyMotion pendulumAndSpring(pendulumAndSpringDict);
+
+    label nIter(readLabel(pendulumAndSpringDict.lookup("nIter")));
+
+    Info<< pendulumAndSpring << endl;
+    Info<< "// Joint state " << endl;
+    pendulumAndSpring.state().write(Info);
+
+    // Create the joint-space force field
+    scalarField tau(pendulumAndSpring.nDoF(), Zero);
+
+    // Create the external body force field
+    Field<spatialVector> fx(pendulumAndSpring.nBodies(), Zero);
+
+    OFstream xFile("xVsTime");
+    OFstream omegaFile("omegaVsTime");
+
+    // Integrate the motion of the pendulumAndSpring for 100s
+    scalar deltaT = 0.01;
+    for (scalar t=0; t<20; t+=deltaT)
+    {
+        pendulumAndSpring.newTime();
+
+        for (label i=0; i<nIter; i++)
+        {
+            pendulumAndSpring.solve(deltaT, tau, fx);
+        }
+
+        // Write the results for graph generation
+        xFile << t << " " << pendulumAndSpring.state().q()[0] << endl;
+        omegaFile << t << " " << pendulumAndSpring.state().q()[1] << endl;
+    }
+
+    Info<< "\nEnd\n" << endl;
+
+    return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.gnuplot b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.gnuplot
new file mode 100644
index 0000000000000000000000000000000000000000..90e5c9b4ce6c6b6bcde02a4a1735124cc033a48e
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.gnuplot
@@ -0,0 +1,53 @@
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Script
+#     pendulumAndSpring.gnuplot
+#
+# Description
+#     Creates an PostScript graph file of Test-pendulumAndSpring results
+#
+#------------------------------------------------------------------------------
+
+reset
+
+set xlabel "Time/[s]"
+set ylabel "x"
+set y2label "omega"
+
+set ytics nomirror
+set y2tics
+
+set yrange [-1.5:1.5]
+set y2range [-35:35]
+
+set xzeroaxis
+
+set terminal postscript eps color enhanced solid
+set output "pendulumAndSpring.eps"
+
+plot \
+    "xVsTime" u 1:2 w l t "x", \
+    "omegaVsTime" u 1:(57.29578*$2) w l axes x1y2 t "omega"
+
+#------------------------------------------------------------------------------
diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/Make/files b/applications/test/rigidBodyDynamics/sphericalJoint/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..db7bc27a9bafe0d8d3254e7f67231cf7a26c0101
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/sphericalJoint/Make/files
@@ -0,0 +1,3 @@
+sphericalJoint.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-sphericalJoint
diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/Make/options b/applications/test/rigidBodyDynamics/sphericalJoint/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..4a9d828b67c8d2e6090ad4601496f7cd38dbe731
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/sphericalJoint/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(LIB_SRC)/rigidBodyDynamics/lnInclude
+
+EXE_LIBS = \
+    -lrigidBodyDynamics
diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint
new file mode 100644
index 0000000000000000000000000000000000000000..c040a35e2e14caec528ea698a59abe6058a0446b
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint
@@ -0,0 +1,24 @@
+solver
+{
+    type Newmark;
+}
+
+// It is necessary to iterate for the Newmark solver
+nIter 2;
+
+bodies
+{
+    pendulum
+    {
+        type            rigidBody;
+        mass            1;
+        centreOfMass    (0 -1 0);
+        inertia         (0.001 0 0 0.001 0 0.001);
+        parent          root;
+        transform       (1 0 0 0 1 0 0 0 1) (0 0 0);
+        joint
+        {
+            type            Rs;
+        }
+    }
+}
diff --git a/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C
new file mode 100644
index 0000000000000000000000000000000000000000..91a59104ed471933c459d48b687bd3e9737be8be
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C
@@ -0,0 +1,103 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Application
+    sphericalJoint
+
+Description
+    Simple spherical-joint pendulum.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyMotion.H"
+#include "masslessBody.H"
+#include "sphere.H"
+#include "joints.H"
+#include "rigidBodyRestraint.H"
+#include "rigidBodyModelState.H"
+#include "IFstream.H"
+#include "OFstream.H"
+
+using namespace Foam;
+using namespace RBD;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+    dictionary sphericalJointDict(IFstream("sphericalJoint")());
+
+    // Create the sphericalJoint model from dictionary
+    rigidBodyMotion sphericalJoint(sphericalJointDict);
+
+    label nIter(readLabel(sphericalJointDict.lookup("nIter")));
+
+    Info<< sphericalJoint << endl;
+
+    // Create the joint-space force field
+    scalarField tau(sphericalJoint.nDoF(), Zero);
+
+    // Create the external body force field
+    Field<spatialVector> fx(sphericalJoint.nBodies(), Zero);
+
+    // Set the angle of the pendulum to 0.3rad
+    sphericalJoint.joints()[1].unitQuaternion
+    (
+        quaternion(quaternion::ZYX, vector(0.3, 0, 0)),
+        sphericalJoint.state().q()
+    );
+
+    // Set the gravitational acceleration
+    sphericalJoint.g() = vector(0, -9.81, 0);
+
+    OFstream omegaFile("omegaVsTime");
+
+    // Integrate the motion of the sphericalJoint for 4.1s
+    scalar deltaT = 0.01;
+    for (scalar t=0; t<4.1; t+=deltaT)
+    {
+        sphericalJoint.newTime();
+
+        for (label i=0; i<nIter; i++)
+        {
+            sphericalJoint.solve(deltaT, tau, fx);
+        }
+
+        // Write the results for graph generation
+        // using 'gnuplot sphericalJoint.gnuplot'
+        omegaFile
+            << t << " "
+            << sphericalJoint.joints()[1].unitQuaternion
+               (
+                   sphericalJoint.state().q()
+               ).eulerAngles(quaternion::ZYX).x()
+            << endl;
+    }
+
+    Info<< "\nEnd\n" << endl;
+
+    return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/test/rigidBodyDynamics/spring/Make/files b/applications/test/rigidBodyDynamics/spring/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..397706b3ac9f99d312b44de7802400c655226388
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/spring/Make/files
@@ -0,0 +1,3 @@
+spring.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-spring
diff --git a/applications/test/rigidBodyDynamics/spring/Make/options b/applications/test/rigidBodyDynamics/spring/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..4a9d828b67c8d2e6090ad4601496f7cd38dbe731
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/spring/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(LIB_SRC)/rigidBodyDynamics/lnInclude
+
+EXE_LIBS = \
+    -lrigidBodyDynamics
diff --git a/applications/test/rigidBodyDynamics/spring/spring b/applications/test/rigidBodyDynamics/spring/spring
new file mode 100644
index 0000000000000000000000000000000000000000..bae00a11ac5c3dc7422d5227e3d9cfcd4f7136b2
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/spring/spring
@@ -0,0 +1,38 @@
+solver
+{
+    type Newmark;
+}
+
+// It is necessary to iterate for the Newmark solver
+nIter 2;
+
+bodies
+{
+    weight
+    {
+        type            rigidBody;
+        mass            9.6;
+        centreOfMass    (0 0 0);
+        inertia         (0.1052 0 0 0.1052 0 0.1778);
+        parent          root;
+        transform       (1 0 0 0 1 0 0 0 1) (0 0 0);
+        joint
+        {
+            type            Pz;
+        }
+    }
+}
+
+restraints
+{
+    spring
+    {
+        type            linearSpring;
+        body            weight;
+        anchor          (0 0 0.5);
+        refAttachmentPt (0 0 0);
+        stiffness       5000;
+        damping         50;
+        restLength      0.4;
+    }
+}
diff --git a/applications/test/rigidBodyDynamics/spring/spring.C b/applications/test/rigidBodyDynamics/spring/spring.C
new file mode 100644
index 0000000000000000000000000000000000000000..15e9034b30949594016a20f19ece54ada509726a
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/spring/spring.C
@@ -0,0 +1,89 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Application
+    spring
+
+Description
+    Simple weight and damped-spring simulation with 1-DoF.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyMotion.H"
+#include "masslessBody.H"
+#include "sphere.H"
+#include "joints.H"
+#include "rigidBodyRestraint.H"
+#include "rigidBodyModelState.H"
+#include "IFstream.H"
+#include "OFstream.H"
+
+using namespace Foam;
+using namespace RBD;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+    dictionary springDict(IFstream("spring")());
+
+    // Create the spring model from dictionary
+    rigidBodyMotion spring(springDict);
+
+    label nIter(readLabel(springDict.lookup("nIter")));
+
+    Info<< spring << endl;
+
+    // Create the joint-space force field
+    scalarField tau(spring.nDoF(), Zero);
+
+    // Create the external body force field
+    Field<spatialVector> fx(spring.nBodies(), Zero);
+
+    OFstream qFile("qVsTime");
+    OFstream qDotFile("qDotVsTime");
+
+    // Integrate the motion of the spring for 4s
+    scalar deltaT = 0.002;
+    for (scalar t=0; t<4; t+=deltaT)
+    {
+        spring.newTime();
+
+        for (label i=0; i<nIter; i++)
+        {
+            spring.solve(deltaT, tau, fx);
+        }
+
+        // Write the results for graph generation
+        // using 'gnuplot spring.gnuplot'
+        qFile << t << " " << spring.state().q()[0] << endl;
+        qDotFile << t << " " << spring.state().qDot()[0] << endl;
+    }
+
+    Info<< "\nEnd\n" << endl;
+
+    return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/test/rigidBodyDynamics/spring/spring.gnuplot b/applications/test/rigidBodyDynamics/spring/spring.gnuplot
new file mode 100644
index 0000000000000000000000000000000000000000..28813508f43c6d8ac405e9a7c3007f7468226546
--- /dev/null
+++ b/applications/test/rigidBodyDynamics/spring/spring.gnuplot
@@ -0,0 +1,76 @@
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Script
+#     spring.gnuplot
+#
+# Description
+#     Creates an PostScript graph file of Test-spring results vs
+#     the analytical solution.
+#
+#------------------------------------------------------------------------------
+
+reset
+
+set samples 2000
+
+k = 5000.0
+m = 9.6
+c = 50.0
+a = -0.1
+
+omega = sqrt(k/m)
+zeta = c/(2.0*m*omega)
+
+phi = atan((sqrt(1.0 - zeta**2))/zeta)
+A = a/sin(phi)
+
+pos(A, t, omega, phi, zeta) = A*exp(-zeta*omega*t)*sin(sqrt(1-zeta**2)*omega*t + phi)
+vel(A, t, omega, phi, zeta) = \
+A*exp(-zeta*omega*t)*\
+( \
+  sqrt(1-zeta**2)*omega*cos(sqrt(1-zeta**2)*omega*t + phi) \
+- zeta*omega*sin(sqrt(1-zeta**2)*omega*t + phi) \
+)
+
+set xlabel "Time/[s]"
+set ylabel "Position"
+
+set ytics nomirror
+set y2tics
+
+set yrange [-0.1:0.1]
+set y2range [-2:2]
+
+set xzeroaxis
+
+set terminal postscript eps color enhanced solid
+set output "spring.eps"
+
+plot \
+    "qVsTime" u 1:($2 - 0.1) w l t "Simulation, centre of mass relative to start", \
+    pos(A, x, omega, phi, zeta) w l t "Analytical solution, centre of mass", \
+    "qDotVsTime" u 1:2 w l axes x1y2 t "Simulation, vertical velocity", \
+    vel(A, x, omega, phi, zeta) w l axes x1y2 t "Analytical solution, vertical velocity"
+
+#------------------------------------------------------------------------------
diff --git a/applications/test/simpleMatrix/Test-simpleMatrix.C b/applications/test/simpleMatrix/Test-simpleMatrix.C
index e5010212e78fa3c3b2c57f951c8b01c1972fb534..d67b9d3bde78f9c8d11e77ca81697ba4d58a8dee 100644
--- a/applications/test/simpleMatrix/Test-simpleMatrix.C
+++ b/applications/test/simpleMatrix/Test-simpleMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,15 +35,15 @@ int main(int argc, char *argv[])
 {
     simpleMatrix<vector> hmm(3);
 
-    hmm[0][0] = -3.0;
-    hmm[0][1] = 10.0;
-    hmm[0][2] = -4.0;
-    hmm[1][0] = 2.0;
-    hmm[1][1] = 3.0;
-    hmm[1][2] = 10.0;
-    hmm[2][0] = 2.0;
-    hmm[2][1] = 6.0;
-    hmm[2][2] = 1.0;
+    hmm(0, 0) = -3.0;
+    hmm(0, 1) = 10.0;
+    hmm(0, 2) = -4.0;
+    hmm(1, 0) = 2.0;
+    hmm(1, 1) = 3.0;
+    hmm(1, 2) = 10.0;
+    hmm(2, 0) = 2.0;
+    hmm(2, 1) = 6.0;
+    hmm(2, 2) = 1.0;
 
     hmm.source()[0] = vector(2.0, 1.0, 3.0);
     hmm.source()[1] = vector(1.0, 4.0, 3.0);
diff --git a/applications/test/tensor/Test-tensor.C b/applications/test/tensor/Test-tensor.C
index 6449adb8a29a8020c177d79229ff87adb38542d3..5d576c0f1682e0367376f02671900153f11722f4 100644
--- a/applications/test/tensor/Test-tensor.C
+++ b/applications/test/tensor/Test-tensor.C
@@ -91,11 +91,11 @@ int main()
         0.9745196104049683, 0.0369445420801640, 0.0846728682518005,
         0.6474838852882385, 0.1617118716239929, 0.2041363865137100
     );
-    Debug(T_rand_real);
+    DebugVar(T_rand_real);
     vector L_rand_real(eigenValues(T_rand_real));
-    Debug(L_rand_real);
+    DebugVar(L_rand_real);
     tensor U_rand_real(eigenVectors(T_rand_real));
-    Debug(U_rand_real);
+    DebugVar(U_rand_real);
 
     Info << endl << endl;
 
@@ -105,11 +105,11 @@ int main()
         0.9126510620117188, 0.7408077120780945, 0.1499115079641342,
         0.0936608463525772, 0.7615650296211243, 0.8953040242195129
     );
-    Debug(T_rand_imag);
+    DebugVar(T_rand_imag);
     vector L_rand_imag(eigenValues(T_rand_imag));
-    Debug(L_rand_imag);
+    DebugVar(L_rand_imag);
     tensor U_rand_imag(eigenVectors(T_rand_imag));
-    Debug(U_rand_imag);
+    DebugVar(U_rand_imag);
 
     Info << endl << endl;
 
@@ -119,11 +119,11 @@ int main()
         1.3076051771640778, 0.0738890841603279, 0.2463847398757935,
         1.3121289014816284, 0.2463847398757935, 0.4082727730274200
     );
-    Debug(T_rand_symm);
+    DebugVar(T_rand_symm);
     vector L_rand_symm(eigenValues(T_rand_symm));
-    Debug(L_rand_symm);
+    DebugVar(L_rand_symm);
     tensor U_rand_symm(eigenVectors(T_rand_symm));
-    Debug(U_rand_symm);
+    DebugVar(U_rand_symm);
 
     Info << endl << endl;
 
@@ -133,11 +133,11 @@ int main()
                             0.0738890841603279, 0.2463847398757935,
                                                 0.4082727730274200
     );
-    Debug(T_rand_Symm);
+    DebugVar(T_rand_Symm);
     vector L_rand_Symm(eigenValues(T_rand_Symm));
-    Debug(L_rand_Symm);
+    DebugVar(L_rand_Symm);
     tensor U_rand_Symm(eigenVectors(T_rand_Symm));
-    Debug(U_rand_Symm);
+    DebugVar(U_rand_Symm);
 
     Info << endl << endl;
 
@@ -147,11 +147,11 @@ int main()
         0, 0.7408077120780945, 0,
         0, 0, 0.8953040242195129
     );
-    Debug(T_rand_diag);
+    DebugVar(T_rand_diag);
     vector L_rand_diag(eigenValues(T_rand_diag));
-    Debug(L_rand_diag);
+    DebugVar(L_rand_diag);
     tensor U_rand_diag(eigenVectors(T_rand_diag));
-    Debug(U_rand_diag);
+    DebugVar(U_rand_diag);
 
     Info << endl << endl;
 
@@ -161,11 +161,11 @@ int main()
         1, 0, 1,
         1, 1, 0
     );
-    Debug(T_repeated);
+    DebugVar(T_repeated);
     vector L_repeated(eigenValues(T_repeated));
-    Debug(L_repeated);
+    DebugVar(L_repeated);
     tensor U_repeated(eigenVectors(T_repeated));
-    Debug(U_repeated);
+    DebugVar(U_repeated);
 
     Info << endl << endl;
 
@@ -175,11 +175,11 @@ int main()
         1, 1, 1,
         1, 1, 1
     );
-    Debug(T_repeated_zero);
+    DebugVar(T_repeated_zero);
     vector L_repeated_zero(eigenValues(T_repeated_zero));
-    Debug(L_repeated_zero);
+    DebugVar(L_repeated_zero);
     tensor U_repeated_zero(eigenVectors(T_repeated_zero));
-    Debug(U_repeated_zero);
+    DebugVar(U_repeated_zero);
 
     Info << endl << endl;
 
@@ -189,11 +189,11 @@ int main()
         0, 2, 0,
         0, 0, 2
     );
-    Debug(T_triple);
+    DebugVar(T_triple);
     vector L_triple(eigenValues(T_triple));
-    Debug(L_triple);
+    DebugVar(L_triple);
     tensor U_triple(eigenVectors(T_triple));
-    Debug(U_triple);
+    DebugVar(U_triple);
     */
 
     return 0;
diff --git a/applications/test/thermoMixture/Test-thermoMixture.C b/applications/test/thermoMixture/Test-thermoMixture.C
index 1a2883cb0acfa6ad58145d54c1cda2b2d4b61202..2a3ab1a0c8ad497d87740e34d52d0cfe4b04273f 100644
--- a/applications/test/thermoMixture/Test-thermoMixture.C
+++ b/applications/test/thermoMixture/Test-thermoMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
     <
         species::thermo
         <
-            hConstThermo<perfectGas<specie> >,
+            hConstThermo<perfectGas<specie>>,
             sensibleEnthalpy
         >
     > ThermoType;
diff --git a/applications/test/volField/cavity/Allrun b/applications/test/volField/cavity/Allrun
index 602fbc4f19a768e39eef79faee91c554c52cee77..03255c4d13cff085433ef08d7b84be1cc3ca98ec 100755
--- a/applications/test/volField/cavity/Allrun
+++ b/applications/test/volField/cavity/Allrun
@@ -14,4 +14,4 @@ runApplication blockMesh
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/test/wordRe/Test-wordRe.C b/applications/test/wordRe/Test-wordRe.C
index 3c49affaae7c6a124ffe307e714295a53509a1c6..e3fae58cc579f48e6614bcad8d5fd67a244c7810 100644
--- a/applications/test/wordRe/Test-wordRe.C
+++ b/applications/test/wordRe/Test-wordRe.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
 
     IOobject::writeDivider(Info);
 
-    List<Tuple2<wordRe, string> > rawList(IFstream("testRegexps")());
+    List<Tuple2<wordRe, string>> rawList(IFstream("testRegexps")());
     Info<< "input list:" << rawList << endl;
     IOobject::writeDivider(Info) << endl;
 
diff --git a/applications/test/xfer/Test-xferList.C b/applications/test/xfer/Test-xferList.C
index ceddf0575df7b99e1cfeb1b11cbf269b547ca219..77231e2118dff2e8d5c1ed7d9f154cd76dc79aa2 100644
--- a/applications/test/xfer/Test-xferList.C
+++ b/applications/test/xfer/Test-xferList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,8 +55,8 @@ int main(int argc, char *argv[])
     Info<< "lstA: " << lstA << endl;
     Info<< "lstC: " << lstC << endl;
 
-    Xfer<List<label> > xA = xferMove(lstA);
-    Xfer<List<label> > xB;
+    Xfer<List<label>> xA = xferMove(lstA);
+    Xfer<List<label>> xB;
 
     List<label> lstB( xA );
 
diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C
index 085e658729c737a69484e2d830066da060b40a57..e38319f481a6b75d904b01ee3b28398c16d8c68c 100644
--- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C
+++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,7 +130,7 @@ void subsetVolFields
     const label patchI,
     const Type& exposedValue,
     const word GeomVolType,
-    PtrList<GeometricField<Type, fvPatchField, volMesh> >& subFields
+    PtrList<GeometricField<Type, fvPatchField, volMesh>>& subFields
 )
 {
     const fvMesh& baseMesh = subsetter.baseMesh();
@@ -202,7 +202,7 @@ void subsetSurfaceFields
     const label patchI,
     const Type& exposedValue,
     const word GeomSurfType,
-    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& subFields
+    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& subFields
 )
 {
     const fvMesh& baseMesh = subsetter.baseMesh();
@@ -581,10 +581,10 @@ int main(int argc, char *argv[])
     );
 
     // Per faceSet the patch to put the baffles into
-    const List<Pair<word> > setsAndPatches(dict.lookup("blockedFaces"));
+    const List<Pair<word>> setsAndPatches(dict.lookup("blockedFaces"));
 
     // Per faceSet the patch to put the coupled baffles into
-    DynamicList<FixedList<word, 3> > coupledAndPatches(10);
+    DynamicList<FixedList<word, 3>> coupledAndPatches(10);
     const dictionary& functionDicts = dict.subDict("coupledFaces");
     forAllConstIter(dictionary, functionDicts, iter)
     {
@@ -782,7 +782,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<scalar>::zero,
+        scalar(Zero),
         volScalarField::typeName,
         scalarFlds
     );
@@ -794,7 +794,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<vector>::zero,
+        vector(Zero),
         volVectorField::typeName,
         vectorFlds
     );
@@ -812,7 +812,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<sphericalTensor>::zero,
+        sphericalTensor(Zero),
         volSphericalTensorField::typeName,
         sphericalTensorFlds
     );
@@ -824,7 +824,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<symmTensor>::zero,
+        symmTensor(Zero),
         volSymmTensorField::typeName,
         symmTensorFlds
     );
@@ -836,7 +836,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<tensor>::zero,
+        tensor(Zero),
         volTensorField::typeName,
         tensorFlds
     );
@@ -850,7 +850,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<scalar>::zero,
+        scalar(Zero),
         surfaceScalarField::typeName,
         surfScalarFlds
     );
@@ -862,7 +862,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<vector>::zero,
+        vector(Zero),
         surfaceVectorField::typeName,
         surfVectorFlds
     );
@@ -880,7 +880,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<sphericalTensor>::zero,
+        sphericalTensor(Zero),
         surfaceSphericalTensorField::typeName,
         surfSphericalTensorFlds
     );
@@ -900,7 +900,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<symmTensor>::zero,
+        symmTensor(Zero),
         surfaceSymmTensorField::typeName,
         surfSymmTensorFlds
     );
@@ -912,7 +912,7 @@ int main(int argc, char *argv[])
         subsetter,
         objects,
         defaultPatchI,
-        pTraits<tensor>::zero,
+        tensor(Zero),
         surfaceTensorField::typeName,
         surfTensorFlds
     );
@@ -1076,25 +1076,25 @@ int main(int argc, char *argv[])
     (
         subsetter.subMesh(),
         map,
-        vector::zero
+        Zero
     );
     initCreatedPatches<volSphericalTensorField>
     (
         subsetter.subMesh(),
         map,
-        sphericalTensor::zero
+        Zero
     );
     initCreatedPatches<volSymmTensorField>
     (
         subsetter.subMesh(),
         map,
-        symmTensor::zero
+        Zero
     );
     initCreatedPatches<volTensorField>
     (
         subsetter.subMesh(),
         map,
-        tensor::zero
+        Zero
     );
 
     initCreatedPatches<surfaceScalarField>
@@ -1107,25 +1107,25 @@ int main(int argc, char *argv[])
     (
         subsetter.subMesh(),
         map,
-        vector::zero
+        Zero
     );
     initCreatedPatches<surfaceSphericalTensorField>
     (
         subsetter.subMesh(),
         map,
-        sphericalTensor::zero
+        Zero
     );
     initCreatedPatches<surfaceSymmTensorField>
     (
         subsetter.subMesh(),
         map,
-        symmTensor::zero
+        Zero
     );
     initCreatedPatches<surfaceTensorField>
     (
         subsetter.subMesh(),
         map,
-        tensor::zero
+        Zero
     );
 
 
diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/Make/files b/applications/utilities/mesh/advanced/autoRefineMesh/Make/files
index 666a1c6b10edcb94187055998306bd790f49bffd..2d0b43d34296d33cd5347f0d022779a5e9eb4664 100644
--- a/applications/utilities/mesh/advanced/autoRefineMesh/Make/files
+++ b/applications/utilities/mesh/advanced/autoRefineMesh/Make/files
@@ -1,4 +1,4 @@
-autoRefineMesh.C
+snappyRefineMesh.C
 
-EXE = $(FOAM_APPBIN)/autoRefineMesh
+EXE = $(FOAM_APPBIN)/snappyRefineMesh
 
diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
similarity index 99%
rename from applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C
rename to applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
index 26e716eb3f51cdff227a4f063e750dab5c7ed47a..abb29b1dea922e42c2d530eb323a0ff821632afa 100644
--- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C
+++ b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Application
-    autoRefineMesh
+    snappyRefineMesh
 
 Description
     Utility to refine cells near to a surface.
@@ -670,7 +670,7 @@ int main(int argc, char *argv[])
     (
         IOobject
         (
-            "autoRefineMeshDict",
+            "snappyRefineMeshDict",
             runTime.system(),
             mesh,
             IOobject::MUST_READ_IF_MODIFIED,
diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMeshDict
similarity index 98%
rename from applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict
rename to applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMeshDict
index 6ebd9d3ba4acf32387d6a9ea7fd11da9bac9101a..f2d5e1a245c81609a5941a0e6525654195e49be4 100644
--- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMeshDict
+++ b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMeshDict
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       dictionary;
-    object      autoRefineMeshDict;
+    object      snappyRefineMeshDict;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C
index 9df985f42efec02a979344cb3bc958fe79053b07..b3099f4f28a7282f0b6aabbbbca7dca0801b6d07 100644
--- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C
+++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,6 +80,7 @@ int main(int argc, char *argv[])
         "Collapse faces that are in the supplied face set"
     );
 
+    #include "addDictOption.H"
     #include "addOverwriteOption.H"
     #include "setRootCase.H"
     #include "createTime.H"
@@ -91,6 +92,13 @@ int main(int argc, char *argv[])
 
     const word oldInstance = mesh.pointsInstance();
 
+    const word dictName("collapseDict");
+    #include "setSystemMeshDictionaryIO.H"
+
+    Info<< "Reading " << dictName << nl << endl;
+
+    IOdictionary collapseDict(dictIO);
+
     const bool overwrite = args.optionFound("overwrite");
 
     const bool collapseFaces = args.optionFound("collapseFaces");
@@ -155,7 +163,10 @@ int main(int argc, char *argv[])
 
 
         {
-            meshFilterPtr.set(new polyMeshFilter(mesh, pointPriority));
+            meshFilterPtr.set
+            (
+                new polyMeshFilter(mesh, pointPriority, collapseDict)
+            );
             polyMeshFilter& meshFilter = meshFilterPtr();
 
             // newMesh will be empty until it is filtered
@@ -177,7 +188,10 @@ int main(int argc, char *argv[])
 
         if (collapseFaceSet)
         {
-            meshFilterPtr.reset(new polyMeshFilter(mesh, pointPriority));
+            meshFilterPtr.reset
+            (
+                new polyMeshFilter(mesh, pointPriority, collapseDict)
+            );
             polyMeshFilter& meshFilter = meshFilterPtr();
 
             const autoPtr<fvMesh>& newMesh = meshFilter.filteredMesh();
@@ -198,7 +212,10 @@ int main(int argc, char *argv[])
 
         if (collapseFaces)
         {
-            meshFilterPtr.reset(new polyMeshFilter(mesh, pointPriority));
+            meshFilterPtr.reset
+            (
+                new polyMeshFilter(mesh, pointPriority, collapseDict)
+            );
             polyMeshFilter& meshFilter = meshFilterPtr();
 
             const autoPtr<fvMesh>& newMesh = meshFilter.filteredMesh();
diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
index abd5eb45adcb8b022d45df971ab02df269196fbd..766cd6a6e5ec5d20b4fa6e0f710cb1671dd01c24 100644
--- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
+++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -355,9 +355,9 @@ int main(int argc, char *argv[])
     );
 
     // Read all from the dictionary.
-    List<Pair<point> > pointsToMove(dict.lookup("pointsToMove"));
-    List<Pair<point> > edgesToSplit(dict.lookup("edgesToSplit"));
-    List<Pair<point> > facesToTriangulate
+    List<Pair<point>> pointsToMove(dict.lookup("pointsToMove"));
+    List<Pair<point>> edgesToSplit(dict.lookup("edgesToSplit"));
+    List<Pair<point>> facesToTriangulate
     (
         dict.lookup("facesToTriangulate")
     );
@@ -369,15 +369,15 @@ int main(int argc, char *argv[])
      || facesToTriangulate.size()
     );
 
-    List<Pair<point> > edgesToCollapse(dict.lookup("edgesToCollapse"));
+    List<Pair<point>> edgesToCollapse(dict.lookup("edgesToCollapse"));
 
     bool collapseEdge = edgesToCollapse.size();
 
-    List<Pair<point> > cellsToPyramidise(dict.lookup("cellsToSplit"));
+    List<Pair<point>> cellsToPyramidise(dict.lookup("cellsToSplit"));
 
     bool cellsToSplit = cellsToPyramidise.size();
 
-    // List<Tuple2<pointField,point> >
+    // List<Tuple2<pointField,point>>
     //     cellsToCreate(dict.lookup("cellsToCreate"));
 
     Info<< "Read from " << dict.name() << nl
@@ -442,7 +442,7 @@ int main(int argc, char *argv[])
 
 
     Info<< nl << "Looking up edges to split ..." << nl << endl;
-    Map<List<point> > edgeToCuts(edgesToSplit.size());
+    Map<List<point>> edgeToCuts(edgesToSplit.size());
     forAll(edgesToSplit, i)
     {
         const Pair<point>& pts = edgesToSplit[i];
diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
index 26e65a8ae582a81e904bbcc6d0cfc5954cd9ba55..a12adf8413db3a73d3014c23d154b77c6c7f6bd0 100644
--- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
+++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
     SortableList<scalar> sortedVols(vols);
 
     // All cell labels, sorted per bin.
-    DynamicList<DynamicList<label> > bins;
+    DynamicList<DynamicList<label>> bins;
 
     // Lower/upper limits
     DynamicList<scalar> lowerLimits;
diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake
index bd253bbe9a19e6371402b45a4b9ab0810acf7b38..cb0064789a0bb64c41045c5ca3c24981e89d5ee2 100755
--- a/applications/utilities/mesh/conversion/Optional/Allwmake
+++ b/applications/utilities/mesh/conversion/Optional/Allwmake
@@ -1,8 +1,11 @@
 #!/bin/sh
 #
 # Build optional components (eg, may depend on third-party libraries)
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for compilation (at least for error catching)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 # build libccmio and create lnInclude directory
@@ -14,4 +17,4 @@ then
     wmake ccm26ToFoam
 fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C
index deda5581f8b43a5aa8b2470d2b5f5f90dfd163d9..b95acd79786a3c5cf386cf6ba6a9f148a5414b24 100644
--- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C
+++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,7 @@ void storeCellInZone
     const label cellI,
     const label cellType,
     Map<label>& typeToZone,
-    List<DynamicList<label> >& zoneCells
+    List<DynamicList<label>>& zoneCells
 )
 {
     if (cellType >= 0)
@@ -213,7 +213,7 @@ void ReadVertices
 
     // Convert to foamPoints
     foamPoints.setSize(nVertices);
-    foamPoints = vector::zero;
+    foamPoints = Zero;
     foamPointMap.setSize(nVertices);
 
     forAll(foamPointMap, i)
@@ -1022,7 +1022,7 @@ int main(int argc, char *argv[])
         // From foamCellType physical region to Foam cellZone
         Map<label> typeToZone;
         // Storage for cell zones.
-        List<DynamicList<label> > zoneCells(0);
+        List<DynamicList<label>> zoneCells(0);
 
         forAll(foamCellType, cellI)
         {
diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
index 8e2a1749a9364b39a4b2ec809757bc65b51cbe9b..9a2129912795542ee273cf7519d988e293edc059 100644
--- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
+++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,8 +66,8 @@ SLList<label> slCellMap;
 SLList<label> slCellType;
 label maxCelli = 0;
 
-PtrList<SLList<label> > slPatchCells;
-PtrList<SLList<label> > slPatchCellFaces;
+PtrList<SLList<label>> slPatchCells;
+PtrList<SLList<label>> slPatchCellFaces;
 
 // Cell types
 Map<word> cellTypes;
@@ -77,7 +77,7 @@ label currentTypei = -1;
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git a/applications/utilities/mesh/conversion/datToFoam/datToFoam.C b/applications/utilities/mesh/conversion/datToFoam/datToFoam.C
index c10b7c761d9c3434ece7882334a8129c44d6771b..4ee10d1f1592905e845dde5708441640d1b46460 100644
--- a/applications/utilities/mesh/conversion/datToFoam/datToFoam.C
+++ b/applications/utilities/mesh/conversion/datToFoam/datToFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
     // We ignore the first layer of points in i and j the biconic meshes
     label nPointsij = (iPoints - 1)*(jPoints - 1);
 
-    pointField points(nPointsij, vector::zero);
+    pointField points(nPointsij, Zero);
 
     for (direction comp = 0; comp < 2; comp++)
     {
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    pointField pointsWedge(nPointsij*2, vector::zero);
+    pointField pointsWedge(nPointsij*2, Zero);
 
     fileName pointsFile(runTime.constantPath()/"points.tmp");
     OFstream pFile(pointsFile);
diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
index 75a1cfcbc780614a64db7ab0091e64f06057242c..1d28f046dc4e4e56a27c95983d98d9d9a7a9e804 100644
--- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -123,7 +123,7 @@ void uniquify(word& name, HashSet<word>& patchNames)
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
@@ -1089,9 +1089,9 @@ int main(int argc, char *argv[])
                     mesh.boundaryMesh(),
                     neighbPatchName,
                     cyclicPolyPatch::NOORDERING,
-                    vector::zero,
-                    vector::zero,
-                    vector::zero
+                    Zero,
+                    Zero,
+                    Zero
                 );
             }
             else
diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
index a040ca4195c39b3eb4064380b9ed08f417765712..3300ba9778666021b4665d0c34706eb648bb6cc7 100644
--- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ wordList patchNameIDs(maxZoneID);
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
@@ -1578,7 +1578,7 @@ int main(int argc, char *argv[])
 
         // List of patch names and the cellZone(s) they border
         // this is just an info file to make MRF easier to setup
-        List<DynamicList<word> > boundaryZones
+        List<DynamicList<word>> boundaryZones
         (
             pShapeMesh.boundaryMesh().size()
         );
diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
index 2de3fa2932e1d94131102f1a22c87fb727477bf1..6821af8fba136ccaedb679828d9df4adfa033fe5 100644
--- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
+++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,7 +80,7 @@ label nValuesForPatchFaces = 0;
 // Dummy yywrap to keep yylex happy at compile time.
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
index 5ed5279c9c18cfa4b710201779fc3f49ff157ab6..5de646c441850202b1b541dbacaa2545cf594ba3 100644
--- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
+++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -211,7 +211,7 @@ void storeCellInZone
     Map<label>& physToZone,
 
     labelList& zoneToPhys,
-    List<DynamicList<label> >& zoneCells
+    List<DynamicList<label>>& zoneCells
 )
 {
     Map<label>::const_iterator zoneFnd = physToZone.find(regPhys);
@@ -415,10 +415,10 @@ void readCells
     cellShapeList& cells,
 
     labelList& patchToPhys,
-    List<DynamicList<face> >& patchFaces,
+    List<DynamicList<face>>& patchFaces,
 
     labelList& zoneToPhys,
-    List<DynamicList<label> >& zoneCells
+    List<DynamicList<label>>& zoneCells
 )
 {
     Info<< "Starting to read cells at line " << inFile.lineNumber() << endl;
@@ -791,12 +791,12 @@ int main(int argc, char *argv[])
     // Map from patch to gmsh physical region
     labelList patchToPhys;
     // Storage for patch faces.
-    List<DynamicList<face> > patchFaces(0);
+    List<DynamicList<face>> patchFaces(0);
 
     // Map from cellZone to gmsh physical region
     labelList zoneToPhys;
     // Storage for cell zones.
-    List<DynamicList<label> > zoneCells(0);
+    List<DynamicList<label>> zoneCells(0);
 
     // Name per physical region
     Map<word> physicalNames;
@@ -934,7 +934,7 @@ int main(int argc, char *argv[])
     const polyPatch& pp = mesh.boundaryMesh().last();
 
     // Storage for faceZones.
-    List<DynamicList<label> > zoneFaces(patchFaces.size());
+    List<DynamicList<label>> zoneFaces(patchFaces.size());
 
 
     // Go through all the patchFaces and find corresponding face in pp.
diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
index 874f787119e31445666ef2d5a9e85854beb8492e..7a94b27299716fe1a781ecdc7f32a13940d78785 100644
--- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
+++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -849,7 +849,7 @@ int main(int argc, char *argv[])
     HashTable<label, label> faceToCell[2];
 
     {
-        HashTable<label, face, Hash<face> > faceToFaceID(boundaryFaces.size());
+        HashTable<label, face, Hash<face>> faceToFaceID(boundaryFaces.size());
         forAll(boundaryFaces, faceI)
         {
             SortableList<label> sortedVerts(boundaryFaces[faceI]);
@@ -862,7 +862,7 @@ int main(int argc, char *argv[])
             forAll(faces, i)
             {
                 SortableList<label> sortedVerts(faces[i]);
-                HashTable<label, face, Hash<face> >::const_iterator fnd =
+                HashTable<label, face, Hash<face>>::const_iterator fnd =
                     faceToFaceID.find(face(sortedVerts));
 
                 if (fnd != faceToFaceID.end())
@@ -956,7 +956,7 @@ int main(int argc, char *argv[])
             }
         }
 
-        List<DynamicList<face> > dynPatchFaces(dofVertIndices.size());
+        List<DynamicList<face>> dynPatchFaces(dofVertIndices.size());
 
         forAll(cellVerts, cellI)
         {
@@ -1124,7 +1124,7 @@ int main(int argc, char *argv[])
         meshedSurface rawSurface
         (
             xferCopy(polyPoints),
-            xferCopyTo< faceList >(boundaryFaces)
+            xferCopyTo<faceList>(boundaryFaces)
         );
 
         // Write locally numbered surface
diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
index a8ffe7b6b6b401f63dcceb45a6b63619d7fde74f..adbd36b6577e716f94e83813d59447c7595c8c90 100644
--- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
+++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
@@ -232,7 +232,7 @@ const char* kivaPatchNames[nBCs] =
 };
 
 
-List<SLList<face> > pFaces[nBCs];
+List<SLList<face>> pFaces[nBCs];
 
 face quadFace(4);
 face triFace(3);
diff --git a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
index 065e36119b428bd3212554c17a526a5982fef8e1..e00422072380f925fc0cba1c8fb2f23366e58d4f 100644
--- a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
+++ b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
     label maxPatch = 0;
 
     // Boundary faces as three vertices
-    HashTable<label, triFace, Hash<triFace> > vertsToBoundary(nFaces);
+    HashTable<label, triFace, Hash<triFace>> vertsToBoundary(nFaces);
 
     forAll(boundaryFaces, faceI)
     {
@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
 
             // Is there any boundary face with same vertices?
             // (uses commutative hash)
-            HashTable<label, triFace, Hash<triFace> >::iterator iter =
+            HashTable<label, triFace, Hash<triFace>>::iterator iter =
                 vertsToBoundary.find(triFace(f[0], f[1], f[2]));
 
             if (iter != vertsToBoundary.end())
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
 
     {
         // Sort boundaryFaces by patch.
-        List<DynamicList<face> > allPatchFaces(nPatches);
+        List<DynamicList<face>> allPatchFaces(nPatches);
 
         forAll(boundaryPatch, faceI)
         {
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C b/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C
index 9f35fcb89b03e02eeaf49f2b012045066903f062..70ca236c7c297fe40d311a84a14b666ef5891e21 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,9 +51,9 @@ void Foam::starMesh::createCoupleMatches()
     );
 
     // Store newly created faces for each cell
-    Map<SLList<face> > cellAddedFaces(cellMapSize);
+    Map<SLList<face>> cellAddedFaces(cellMapSize);
 
-    Map<SLList<label> > cellRemovedFaces(cellMapSize);
+    Map<SLList<label>> cellRemovedFaces(cellMapSize);
 
     // In order to remove often allocation, remember the number of live points.
     // If you run out of space in point creation, increase it by the number of
@@ -75,14 +75,14 @@ void Foam::starMesh::createCoupleMatches()
         const face& masterFace = cellFaces_[fp.masterCell()][fp.masterFace()];
         const face& slaveFace = cellFaces_[fp.slaveCell()][fp.slaveFace()];
 
-#       ifdef DEBUG_COUPLE
+        #ifdef DEBUG_COUPLE
         Info<< "coupleI: " << coupleI << endl
             << "masterFace: " << masterFace << endl
             << "master points: " << masterFace.points(points_) << endl
             << "slaveFace: " << slaveFace << endl
             << "slave points: " << slaveFace.points(points_)
             << endl << endl;
-#       endif
+        #endif
 
         // check the angle of face area vectors
          scalar faceAreaAngle =
@@ -115,7 +115,7 @@ void Foam::starMesh::createCoupleMatches()
         {
             // Master face is replaced by a set of slave faces
 
-            Map<SLList<label> >::iterator crfIter =
+            Map<SLList<label>>::iterator crfIter =
                 cellRemovedFaces.find(fp.masterCell());
 
             if (crfIter == cellRemovedFaces.end())
@@ -131,7 +131,7 @@ void Foam::starMesh::createCoupleMatches()
                 crfIter().append(fp.masterFace());
             }
 
-            Map<SLList<face> >::iterator cafIter =
+            Map<SLList<face>>::iterator cafIter =
                 cellAddedFaces.find(fp.masterCell());
             if (cafIter == cellAddedFaces.end())
             {
@@ -155,11 +155,11 @@ void Foam::starMesh::createCoupleMatches()
 
             // Master data
             edgeList masterEdges = masterFace.edges();
-            List<SLList<label> > masterEdgePoints(masterEdges.size());
+            List<SLList<label>> masterEdgePoints(masterEdges.size());
 
             // Slave data
             edgeList slaveEdges = slaveFace.edges();
-            List<SLList<label> > slaveEdgePoints(slaveEdges.size());
+            List<SLList<label>> slaveEdgePoints(slaveEdges.size());
 
             // Find common plane
             vector n = masterFace.normal(points_);
@@ -177,10 +177,10 @@ void Foam::starMesh::createCoupleMatches()
                 vector d = curMasterEdge.vec(points_);
                 d -= n*(n & d);
 
-#               ifdef DEBUG_COUPLE_INTERSECTION
+                #ifdef DEBUG_COUPLE_INTERSECTION
                 Info<< "curMasterEdge: " << curMasterEdge << endl
                     << "P: " << P << endl << "d: " << d << endl;
-#               endif
+                #endif
 
                 // go through all slave edges and try to get an intersection.
                 // The point is created along the original master edge rather
@@ -196,20 +196,20 @@ void Foam::starMesh::createCoupleMatches()
                     e -= n*(n & e);
                     scalar det = -(e & (n ^ d));
 
-#                   ifdef DEBUG_COUPLE_INTERSECTION
+                    #ifdef DEBUG_COUPLE_INTERSECTION
                     Info<< "curSlaveEdge: " << curSlaveEdge << endl
                         << "S: " << S << endl
                         << "e: " << e << endl;
-#                   endif
+                    #endif
 
                     if (mag(det) > SMALL)
                     {
                         // non-singular matrix. Look for intersection
                         scalar beta = ((S - P) & (n ^ d))/det;
 
-#                       ifdef DEBUG_COUPLE_INTERSECTION
+                        #ifdef DEBUG_COUPLE_INTERSECTION
                         Info<< " beta: " << beta << endl;
-#                       endif
+                        #endif
 
                         if (beta > -smallMergeTol_ && beta < 1 + smallMergeTol_)
                         {
@@ -217,9 +217,9 @@ void Foam::starMesh::createCoupleMatches()
                             scalar alpha =
                                 (((S - P) & d) + beta*(d & e))/magSqr(d);
 
-#                           ifdef DEBUG_COUPLE_INTERSECTION
+                            #ifdef DEBUG_COUPLE_INTERSECTION
                             Info<< " alpha: " << alpha << endl;
-#                           endif
+                            #endif
 
                             if
                             (
@@ -228,10 +228,10 @@ void Foam::starMesh::createCoupleMatches()
                             )
                             {
                                 // intersection of non-parallel edges
-#                               ifdef DEBUG_COUPLE_INTERSECTION
+                                #ifdef DEBUG_COUPLE_INTERSECTION
                                 Info<< "intersection of non-parallel edges"
                                     << endl;
-#                               endif
+                                #endif
 
 
                                 // check for insertion of start-end
@@ -309,14 +309,14 @@ void Foam::starMesh::createCoupleMatches()
                                         nLivePoints + coupleFacePoints.size()
                                     );
 
-#                                   ifdef DEBUG_COUPLE_INTERSECTION
+                                    #ifdef DEBUG_COUPLE_INTERSECTION
                                     Info<< "regular intersection. "
                                         << "Adding point: "
                                         << coupleFacePoints.size()
                                         << " which is "
                                         << P + alpha*curMasterEdge.vec(points_)
                                         << endl;
-#                                   endif
+                                    #endif
 
                                     // A new point is created. Warning:
                                     // using original edge for accuracy.
@@ -369,12 +369,12 @@ void Foam::starMesh::createCoupleMatches()
                              && alpha1 < 1 + smallMergeTol_
                             )
                             {
-#                               ifdef DEBUG_COUPLE_INTERSECTION
+                                #ifdef DEBUG_COUPLE_INTERSECTION
                                 Info<< "adding irregular master "
                                     << "intersection1: "
                                     << points_[slaveEdges[slaveEdgeI].start()]
                                     << endl;
-#                               endif
+                                #endif
 
                                 masterEdgePoints[masterEdgeI].append
                                 (
@@ -390,12 +390,12 @@ void Foam::starMesh::createCoupleMatches()
                              && alpha2 < 1 + smallMergeTol_
                             )
                             {
-#                               ifdef DEBUG_COUPLE_INTERSECTION
+                                #ifdef DEBUG_COUPLE_INTERSECTION
                                 Info<< "adding irregular master "
                                     << "intersection2: "
                                     << points_[slaveEdges[slaveEdgeI].end()]
                                     << endl;
-#                               endif
+                                #endif
 
                                 masterEdgePoints[masterEdgeI].append
                                 (
@@ -411,11 +411,11 @@ void Foam::starMesh::createCoupleMatches()
 
                             scalar beta1 = (sp & e)/magSqr(e);
 
-#                           ifdef DEBUG_COUPLE_INTERSECTION
+                            #ifdef DEBUG_COUPLE_INTERSECTION
                             Info<< "P: " << P << " S: " << S << " d: " << d
                                 << " e: " << e << " sp: " << sp
                                 << " beta1: " << beta1 << endl;
-#                           endif
+                            #endif
 
                             if
                             (
@@ -423,12 +423,12 @@ void Foam::starMesh::createCoupleMatches()
                              && beta1 < 1 + smallMergeTol_
                             )
                             {
-#                               ifdef DEBUG_COUPLE_INTERSECTION
+                                #ifdef DEBUG_COUPLE_INTERSECTION
                                 Info<< "adding irregular slave "
                                     << "intersection1: "
                                     << points_[masterEdges[masterEdgeI].start()]
                                     << endl;
-#                               endif
+                                #endif
 
                                 slaveEdgePoints[slaveEdgeI].append
                                 (
@@ -444,12 +444,12 @@ void Foam::starMesh::createCoupleMatches()
                              && beta2 < 1 + smallMergeTol_
                             )
                             {
-#                               ifdef DEBUG_COUPLE_INTERSECTION
+                                #ifdef DEBUG_COUPLE_INTERSECTION
                                 Info<< "adding irregular slave "
                                     << "intersection2: "
                                     << points_[masterEdges[masterEdgeI].end()]
                                     << endl;
-#                               endif
+                                #endif
 
                                 slaveEdgePoints[slaveEdgeI].append
                                 (
@@ -461,14 +461,14 @@ void Foam::starMesh::createCoupleMatches()
                 } // end of slave edges
             } // end of master edges
 
-#           ifdef DEBUG_COUPLE_INTERSECTION
+            #ifdef DEBUG_COUPLE_INTERSECTION
             Info<< "additional slave edge points: " << endl;
             forAll(slaveEdgePoints, edgeI)
             {
                 Info<< "edge: " << edgeI << ": " << slaveEdgePoints[edgeI]
                     << endl;
             }
-#           endif
+            #endif
 
             // Add new points
             if (nLivePoints + coupleFacePoints.size() >= points_.size())
@@ -509,11 +509,11 @@ void Foam::starMesh::createCoupleMatches()
             );
             label nTmpMasterLabels = 0;
 
-#           ifdef DEBUG_COUPLE_INTERSECTION
+            #ifdef DEBUG_COUPLE_INTERSECTION
             Info<< "masterFace: " << masterFace << endl
                 << "nAdditionalMasterPoints: " << nAdditionalMasterPoints
                 << endl;
-#           endif
+            #endif
 
             forAll(masterEdges, masterEdgeI)
             {
@@ -531,11 +531,11 @@ void Foam::starMesh::createCoupleMatches()
 
                 vector edgeVector = masterEdges[masterEdgeI].vec(points_);
 
-#               ifdef DEBUG_FACE_ORDERING
+                #ifdef DEBUG_FACE_ORDERING
                 Info<< "edgeVector: " << edgeVector << endl
                     << "curMEdgePoints.size(): " << curMEdgePoints.size()
                     << endl;
-#               endif
+                #endif
 
                 // renormalise
                 edgeVector /= magSqr(edgeVector);
@@ -569,14 +569,14 @@ void Foam::starMesh::createCoupleMatches()
                                   - edgeStartPoint
                                 );
 
-#                           ifdef DEBUG_FACE_ORDERING
+                            #ifdef DEBUG_FACE_ORDERING
                             Info<< " edgeStartPoint: " << edgeStartPoint
                                 << " edgeEndPoint: "
                                 << points_[masterEdges[masterEdgeI].end()]
                                 << " other point: "
                                 << points_[curMEdgePointsIter()]
                                 << " alpha: " << alpha << endl;
-#                           endif
+                            #endif
 
                             if (alpha < minAlpha)
                             {
@@ -586,20 +586,20 @@ void Foam::starMesh::createCoupleMatches()
                             }
                         }
 
-#                       ifdef DEBUG_FACE_ORDERING
+                        #ifdef DEBUG_FACE_ORDERING
                         Info<< "nextPointLabel: " << nextPointLabel << endl;
-#                       endif
+                        #endif
 
                         i++;
                     }
 
                     if (nextPointLabel > -1)
                     {
-#                       ifdef DEBUG_FACE_ORDERING
+                        #ifdef DEBUG_FACE_ORDERING
                         Info<< "added nextPointLabel: " << nextPointLabel
                             << " nTmpMasterLabels: " << nTmpMasterLabels
                             << " to place " << nTmpMasterLabels << endl;
-#                       endif
+                        #endif
 
                         usedMasterPoint[usedI] = true;
                         // add the next point
@@ -617,9 +617,9 @@ void Foam::starMesh::createCoupleMatches()
             // reset the size of master
             tmpMasterFace.setSize(nTmpMasterLabels);
 
-#           ifdef DEBUG_FACE_ORDERING
+            #ifdef DEBUG_FACE_ORDERING
             Info<< "tmpMasterFace: " << tmpMasterFace << endl;
-#           endif
+            #endif
 
             // Eliminate all zero-length edges
             face newMasterFace(labelList(tmpMasterFace.size(), labelMax));
@@ -638,12 +638,12 @@ void Foam::starMesh::createCoupleMatches()
 
             forAll(mstEdgesToCollapse, edgeI)
             {
-#               ifdef DEBUG_FACE_ORDERING
+                #ifdef DEBUG_FACE_ORDERING
                 Info<< "edgeI: " << edgeI << " curEdge: "
                     << mstEdgesToCollapse[edgeI] << endl
                     << "master edge " << edgeI << ", "
                     << mstEdgesToCollapse[edgeI].mag(points_) << endl;
-#               endif
+                #endif
 
                 // Edge merge tolerance = masterTol
                 if (mstEdgesToCollapse[edgeI].mag(points_) < masterTol)
@@ -655,10 +655,10 @@ void Foam::starMesh::createCoupleMatches()
                             mstEdgesToCollapse[edgeI].end()
                         );
 
-#                   ifdef DEBUG_FACE_ORDERING
+                    #ifdef DEBUG_FACE_ORDERING
                     Info<< "Collapsed: nMaster: " << nMaster
                         << " label: " << newMasterFace[nMaster] << endl;
-#                   endif
+                    #endif
 
                 }
                 else
@@ -668,11 +668,11 @@ void Foam::starMesh::createCoupleMatches()
                     if (edgeI < mstEdgesToCollapse.size() - 1)
                     {
                         // last edge does not add the point
-#                   ifdef DEBUG_FACE_ORDERING
+                    #ifdef DEBUG_FACE_ORDERING
                         Info<< "Added: nMaster: " << nMaster
                             << " label: " << mstEdgesToCollapse[edgeI].end()
                             << endl;
-#                   endif
+                    #endif
 
                         newMasterFace[nMaster] =
                             mstEdgesToCollapse[edgeI].end();
@@ -682,10 +682,10 @@ void Foam::starMesh::createCoupleMatches()
 
             newMasterFace.setSize(nMaster);
 
-#           ifdef DEBUG_COUPLE
+            #ifdef DEBUG_COUPLE
             Info<< "newMasterFace: " << newMasterFace << endl
                 << "points: " << newMasterFace.points(points_) << endl;
-#           endif
+            #endif
 
             // Creating new slave side
 
@@ -704,10 +704,10 @@ void Foam::starMesh::createCoupleMatches()
             );
             label nTmpSlaveLabels = 0;
 
-#           ifdef DEBUG_COUPLE_INTERSECTION
+            #ifdef DEBUG_COUPLE_INTERSECTION
             Info<< "slaveFace: " << slaveFace << endl
                 << "nAdditionalSlavePoints: " << nAdditionalSlavePoints << endl;
-#           endif
+            #endif
 
             forAll(slaveEdges, slaveEdgeI)
             {
@@ -725,11 +725,11 @@ void Foam::starMesh::createCoupleMatches()
 
                 vector edgeVector = slaveEdges[slaveEdgeI].vec(points_);
 
-#               ifdef DEBUG_FACE_ORDERING
+                #ifdef DEBUG_FACE_ORDERING
                 Info<< "curSEdgePoints.size(): "
                     << curSEdgePoints.size() << endl
                     << "edgeVector: " << edgeVector << endl;
-#               endif
+                #endif
 
                 // renormalise
                 edgeVector /= magSqr(edgeVector);
@@ -763,14 +763,14 @@ void Foam::starMesh::createCoupleMatches()
                                   - edgeStartPoint
                                 );
 
-#                           ifdef DEBUG_FACE_ORDERING
+                            #ifdef DEBUG_FACE_ORDERING
                             Info<< " edgeStartPoint: " << edgeStartPoint
                                 << " edgeEndPoint: "
                                 << points_[slaveEdges[slaveEdgeI].end()]
                                 << " other point: "
                                 << points_[curSEdgePointsIter()]
                                 << " alpha: " << alpha << endl;
-#                           endif
+                            #endif
 
                             if (alpha < minAlpha)
                             {
@@ -780,20 +780,20 @@ void Foam::starMesh::createCoupleMatches()
                             }
                         }
 
-#                       ifdef DEBUG_FACE_ORDERING
+                        #ifdef DEBUG_FACE_ORDERING
                         Info<< "nextPointLabel: " << nextPointLabel << endl;
-#                       endif
+                        #endif
 
                         i++;
                     }
 
                     if (nextPointLabel > -1)
                     {
-#                       ifdef DEBUG_FACE_ORDERING
+                        #ifdef DEBUG_FACE_ORDERING
                         Info<< "added nextPointLabel: " << nextPointLabel
                             << " nTmpSlaveLabels: " << nTmpSlaveLabels
                             << " to place " << nTmpSlaveLabels << endl;
-#                       endif
+                        #endif
 
                         usedSlavePoint[usedI] = true;
                         // add the next point
@@ -811,9 +811,9 @@ void Foam::starMesh::createCoupleMatches()
             // reset the size of slave
             tmpSlaveFace.setSize(nTmpSlaveLabels);
 
-#           ifdef DEBUG_FACE_ORDERING
+            #ifdef DEBUG_FACE_ORDERING
             Info<< "tmpSlaveFace: " << tmpSlaveFace << endl;
-#           endif
+            #endif
 
             // Eliminate all zero-length edges
             face newSlaveFace(labelList(tmpSlaveFace.size(), labelMax));
@@ -832,10 +832,10 @@ void Foam::starMesh::createCoupleMatches()
 
             forAll(slvEdgesToCollapse, edgeI)
             {
-#               ifdef DEBUG_FACE_ORDERING
+                #ifdef DEBUG_FACE_ORDERING
                 Info<< "slave edge length: " << edgeI << ", "
                     << slvEdgesToCollapse[edgeI].mag(points_)<< endl;
-#               endif
+                #endif
 
                  // edge merge tolerance = slaveTol
                 if (slvEdgesToCollapse[edgeI].mag(points_) < slaveTol)
@@ -860,10 +860,10 @@ void Foam::starMesh::createCoupleMatches()
 
             newSlaveFace.setSize(nSlave);
 
-#           ifdef DEBUG_COUPLE
+            #ifdef DEBUG_COUPLE
             Info<< "newSlaveFace: " << newSlaveFace << endl
                 << "points: " << newSlaveFace.points(points_) << endl << endl;
-#           endif
+            #endif
 
             // Create the intersection face
 
@@ -878,10 +878,10 @@ void Foam::starMesh::createCoupleMatches()
             edgeList newMasterEdges = newMasterFace.edges();
             edgeList newSlaveEdges = newSlaveFace.edges();
 
-#           ifdef DEBUG_RIGHT_HAND_WALK
+            #ifdef DEBUG_RIGHT_HAND_WALK
             Info<< "newMasterEdges: " << newMasterEdges << endl
                 << "newSlaveEdges: " << newSlaveEdges << endl;
-#           endif
+            #endif
 
             edge startEdge(-1, -1);
 
@@ -924,9 +924,9 @@ void Foam::starMesh::createCoupleMatches()
                     startEdge = newSlaveEdges[edgeI];
                     startEdgeFound = 2;
 
-#                   ifdef DEBUG_RIGHT_HAND_WALK
+                    #ifdef DEBUG_RIGHT_HAND_WALK
                     Info<< "slave edge found" << endl;
-#                   endif
+                    #endif
 
                     break;
                 }
@@ -967,9 +967,9 @@ void Foam::starMesh::createCoupleMatches()
                         startEdge = newMasterEdges[edgeI];
                         startEdgeFound = 1;
 
-#                       ifdef DEBUG_RIGHT_HAND_WALK
+                        #ifdef DEBUG_RIGHT_HAND_WALK
                         Info<< "master edge found" << endl;
-#                       endif
+                        #endif
 
                         break;
                     }
@@ -984,9 +984,9 @@ void Foam::starMesh::createCoupleMatches()
 
             if (startEdgeFound > 0)
             {
-#               ifdef DEBUG_RIGHT_HAND_WALK
+                #ifdef DEBUG_RIGHT_HAND_WALK
                 Info<< "start edge: " << startEdge << endl;
-#               endif
+                #endif
 
                 // Loop through both faces and add all edges
                 // containing the current point and add them to the
@@ -1002,9 +1002,9 @@ void Foam::starMesh::createCoupleMatches()
                 vector planeNormal = newMasterFace.normal(points_);
                 planeNormal /= mag(planeNormal) + VSMALL;
 
-#               ifdef DEBUG_RIGHT_HAND_WALK
+                #ifdef DEBUG_RIGHT_HAND_WALK
                 Info<< "planeNormal: " << planeNormal << endl;
-#               endif
+                #endif
 
                 // Do a check to control the right-hand turn.  This is
                 // based on the triple product of the edge start
@@ -1032,9 +1032,9 @@ void Foam::starMesh::createCoupleMatches()
 
                 if (tripleProduct < 0)
                 {
-#                   ifdef DEBUG_RIGHT_HAND_WALK
+                    #ifdef DEBUG_RIGHT_HAND_WALK
                     Info<< "Turning edge for right-hand turn rule" << endl;
-#                   endif
+                    #endif
                     startEdge.flip();
                 }
 
@@ -1089,11 +1089,11 @@ void Foam::starMesh::createCoupleMatches()
                         }
                     }
 
-#                   ifdef DEBUG_RIGHT_HAND_WALK
+                    #ifdef DEBUG_RIGHT_HAND_WALK
                     Info<< "number of edges to consider: "
                         << edgesToConsider.size() << endl
                         << "edges to consider: " << edgesToConsider << endl;
-#                   endif
+                    #endif
 
                     if (edgesToConsider.empty())
                     {
@@ -1132,10 +1132,10 @@ void Foam::starMesh::createCoupleMatches()
                     scalar rightTurn = nextEdgeVec & right;
                     scalar goStraight = nextEdgeVec & ahead;
 
-#                   ifdef DEBUG_RIGHT_HAND_WALK
+                    #ifdef DEBUG_RIGHT_HAND_WALK
                     Info<< "rightTurn: " << rightTurn
                         << " goStraight: " << goStraight << endl;
-#                   endif
+                    #endif
 
                     for
                     (
@@ -1153,10 +1153,10 @@ void Foam::starMesh::createCoupleMatches()
                         scalar curRightTurn = newDir & right;
                         scalar curGoStraight = newDir & ahead;
 
-#                       ifdef DEBUG_RIGHT_HAND_WALK
+                        #ifdef DEBUG_RIGHT_HAND_WALK
                         Info<< "curRightTurn: " << curRightTurn
                             << " curGoStraight: " << curGoStraight << endl;
-#                       endif
+                        #endif
 
                         if (rightTurn < 0) // old edge turning left
                         {
@@ -1165,9 +1165,9 @@ void Foam::starMesh::createCoupleMatches()
                                 // both go left. Grab one with greater ahead
                                 if (curGoStraight > goStraight)
                                 {
-#                                   ifdef DEBUG_RIGHT_HAND_WALK
+                                    #ifdef DEBUG_RIGHT_HAND_WALK
                                     Info<< "a" << endl;
-#                                   endif
+                                    #endif
 
                                     // Good edge, turning left less than before
                                     nextEdge = etcIter();
@@ -1177,9 +1177,9 @@ void Foam::starMesh::createCoupleMatches()
                             }
                             else // new edge turning right
                             {
-#                               ifdef DEBUG_RIGHT_HAND_WALK
+                                #ifdef DEBUG_RIGHT_HAND_WALK
                                 Info<< "b" << endl;
-#                               endif
+                                #endif
 
                                 // good edge, turning right
                                 nextEdge = etcIter();
@@ -1195,9 +1195,9 @@ void Foam::starMesh::createCoupleMatches()
                                 // grab one with smaller ahead
                                 if (curGoStraight < goStraight)
                                 {
-#                                   ifdef DEBUG_RIGHT_HAND_WALK
+                                    #ifdef DEBUG_RIGHT_HAND_WALK
                                     Info<< "c" << endl;
-#                                   endif
+                                    #endif
 
                                     // good edge, turning right more than before
                                     nextEdge = etcIter();
@@ -1243,10 +1243,10 @@ void Foam::starMesh::createCoupleMatches()
                         // grab the current point and the current edge
                         curEdge = nextEdge;
 
-#                       ifdef DEBUG_RIGHT_HAND_WALK
+                        #ifdef DEBUG_RIGHT_HAND_WALK
                         Info<< "inserted point " << nextEdge.end() << endl
                             << "curEdge: " << curEdge << endl;
-#                       endif
+                        #endif
                     }
                 }
                 while (!completedFace);
@@ -1254,9 +1254,9 @@ void Foam::starMesh::createCoupleMatches()
                 // resize the face
                 intersectedFace.setSize(nIntFacePoints);
 
-#               ifdef DEBUG_COUPLE
+                #ifdef DEBUG_COUPLE
                 Info<< "intersectedFace: " << intersectedFace << endl;
-#               endif
+                #endif
 
                 // check the intersection face for duplicate points
                 forAll(intersectedFace, checkI)
@@ -1313,10 +1313,10 @@ void Foam::starMesh::createCoupleMatches()
 
             forAll(intersectedFace, intPointI)
             {
-#               ifdef DEBUG_COUPLE_PROJECTION
+                #ifdef DEBUG_COUPLE_PROJECTION
                 Info<< "Proj: old point: "
                     << points_[intersectedFace[intPointI]] << endl;
-#               endif
+                #endif
 
                 pointHit projHit =
                     masterFace.ray
@@ -1332,10 +1332,10 @@ void Foam::starMesh::createCoupleMatches()
                     points_[intersectedFace[intPointI]] =
                         projHit.hitPoint();
 
-#                   ifdef DEBUG_COUPLE_PROJECTION
+                    #ifdef DEBUG_COUPLE_PROJECTION
                     Info<< "      new point: "
                         << points_[intersectedFace[intPointI]] << endl;
-#                   endif
+                    #endif
                 }
             }
 
@@ -1354,7 +1354,7 @@ void Foam::starMesh::createCoupleMatches()
             // Add the new face to both master and slave
 
             // Master face is replaced by a set of slave faces
-            Map<SLList<label> >::iterator crfMasterIter =
+            Map<SLList<label>>::iterator crfMasterIter =
                 cellRemovedFaces.find(fp.masterCell());
 
             if (crfMasterIter == cellRemovedFaces.end())
@@ -1370,7 +1370,7 @@ void Foam::starMesh::createCoupleMatches()
                 crfMasterIter().append(fp.masterFace());
             }
 
-            Map<SLList<label> >::iterator crfSlaveIter =
+            Map<SLList<label>>::iterator crfSlaveIter =
                 cellRemovedFaces.find(fp.slaveCell());
 
             if (crfSlaveIter == cellRemovedFaces.end())
@@ -1386,7 +1386,7 @@ void Foam::starMesh::createCoupleMatches()
                 crfSlaveIter().append(fp.slaveFace());
             }
 
-            Map<SLList<face> >::iterator cafMasterIter =
+            Map<SLList<face>>::iterator cafMasterIter =
                 cellAddedFaces.find(fp.masterCell());
             if (cafMasterIter == cellAddedFaces.end())
             {
@@ -1401,7 +1401,7 @@ void Foam::starMesh::createCoupleMatches()
                 cafMasterIter().append(intersectedFace);
             }
 
-            Map<SLList<face> >::iterator cafSlaveIter =
+            Map<SLList<face>>::iterator cafSlaveIter =
                 cellAddedFaces.find(fp.slaveCell());
             if (cafSlaveIter == cellAddedFaces.end())
             {
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C
index 25b7bd9e4e5101954a2a06be84b5d516e01b6ca8..b6847359398fe3dab4d22e58cbf2eb0c7e2243a9 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,9 +89,8 @@ void Foam::starMesh::createPolyBoundary()
                                   > nInternalFaces_
                                 )
                                 {
-                                    Info
-                                        << "void starMesh::createPolyBoundary()"
-                                        << ": Problem with face: " << curFace
+                                    InfoInFunction
+                                        << "Problem with face: " << curFace
                                         << "\nProbably multiple definitions "
                                         << "of a single boundary face. " << endl
                                         << "Other boundary face: "
@@ -110,8 +109,7 @@ void Foam::starMesh::createPolyBoundary()
                                                 < starPointID_.size()
                                         )
                                         {
-                                            Info
-                                                << ","
+                                            Info<< ","
                                                 << starPointID_
                                                  [curCellFaces[cellFaceI][spI]];
                                         }
@@ -124,9 +122,8 @@ void Foam::starMesh::createPolyBoundary()
                                 }
                                 else
                                 {
-                                    Info
-                                        << "void starMesh::createPolyBoundary()"
-                                        << ": Problem with face: " << curFace
+                                    InfoInFunction
+                                        << "Problem with face: " << curFace
                                         << "\nProbably trying to define a "
                                         << "boundary face on a previously "
                                         << "matched internal face. " << endl
@@ -146,8 +143,7 @@ void Foam::starMesh::createPolyBoundary()
                                                 < starPointID_.size()
                                         )
                                         {
-                                            Info
-                                                << ","
+                                            Info<< ","
                                                 << starPointID_
                                                  [curCellFaces[cellFaceI][spI]];
                                         }
@@ -190,8 +186,8 @@ void Foam::starMesh::createPolyBoundary()
             {
                 const face& missingFace = cellFaces_[cellI][faceI];
 
-                Info<< "starMesh::createPolyBoundary() : "
-                    << "missing face found in cell " << cellI
+                InfoInFunction
+                    << "Missing face found in cell " << cellI
                     << ".\nType: " << cellShapes_[cellI].model().name()
                     << ". STAR cell number: " << starCellID_[cellI]
                     << ". Face: " << missingFace << endl;
@@ -255,8 +251,8 @@ void Foam::starMesh::createPolyBoundary()
         {
             const face& problemFace = meshFaces_[faceI];
 
-            Info<< "starMesh::createPolyBoundary() : "
-                << "problem with face " << faceI << ": addressed "
+            InfoInFunction
+                << "Problem with face " << faceI << ": addressed "
                 << markupFaces[faceI] << " times (should be 2!). Face: "
                 << problemFace << endl;
 
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C b/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C
index f71573c11206ccdd9ec7e70779dec794227bdf93..39e7a27b5d1ce4e2472c0457807bfc90e574af36 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,9 +126,9 @@ void Foam::starMesh::mergeCoupleFacePoints()
                     if (edge (a, b).mag(points_) < pointMergeTol)
                     {
                         // found a pair of points to merge
-#                       ifdef DEBUG_MERGE
+                        #ifdef DEBUG_MERGE
                         Info<< "Merging points " << a << " and " << b << endl;
-#                       endif
+                        #endif
 
                         // are the two points in a merge group?
                         label mergeSetA = -1;
@@ -147,10 +147,10 @@ void Foam::starMesh::mergeCoupleFacePoints()
                         if (mergeSetA == -1 && mergeSetB == -1)
                         {
                             // add new merge group
-#                           ifdef DEBUG_MERGE
+                            #ifdef DEBUG_MERGE
                             Info<< "adding new merge group " << nMergeSets
                                 << endl;
-#                           endif
+                            #endif
 
                             // mark points as belonging to a new merge set
                             renumberPoints[a] = nMergeSets;
@@ -169,10 +169,10 @@ void Foam::starMesh::mergeCoupleFacePoints()
                         }
                         else if (mergeSetA == -1 && mergeSetB != -1)
                         {
-#                           ifdef DEBUG_MERGE
+                            #ifdef DEBUG_MERGE
                             Info<< "adding point a into the merge set of b. "
                                 << "a: " << a << endl;
-#                           endif
+                            #endif
 
                             // add point a into the merge set of b
                             renumberPoints[a] = mergeSetB;
@@ -183,10 +183,10 @@ void Foam::starMesh::mergeCoupleFacePoints()
                         }
                         else if  (mergeSetA != -1 && mergeSetB == -1)
                         {
-#                           ifdef DEBUG_MERGE
+                            #ifdef DEBUG_MERGE
                             Info<< "adding point b into the merge set of a. "
                                 << "b: " << b << endl;
-#                           endif
+                            #endif
 
                             // add point b into the merge set of a
                             renumberPoints[b] = mergeSetA;
@@ -202,12 +202,12 @@ void Foam::starMesh::mergeCoupleFacePoints()
                             label minMerge = min(mergeSetA, mergeSetB);
                             label maxMerge = max(mergeSetA, mergeSetB);
 
-#                           ifdef DEBUG_MERGE
+                            #ifdef DEBUG_MERGE
                             Info<< "Points already belong to two "
                                 << "different merge sets. "
                                 << "Eliminate the higher merge set. Sets: "
                                 << minMerge << " and " << maxMerge << endl;
-#                           endif
+                            #endif
 
                             forAll(renumberPoints, elimI)
                             {
diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C
index c3baad345848ee1a6d36a85326c9a708511d5551..46ea78e5993d65821aadd2a0e56446ca664fc01f 100644
--- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C
+++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -498,7 +498,7 @@ int main(int argc, char *argv[])
 
 
         // Sort boundaryFaces by patch using boundaryPatch.
-        List<DynamicList<face> > allPatchFaces(nPatches);
+        List<DynamicList<face>> allPatchFaces(nPatches);
 
         forAll(boundaryPatch, faceI)
         {
diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake
index 686b1542e6eb82f81c52f7916157d6cb99368914..2211a8c0b90a7548db68dd7dcc44a61c3e76b9a4 100755
--- a/applications/utilities/mesh/generation/Allwmake
+++ b/applications/utilities/mesh/generation/Allwmake
@@ -1,5 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for compilation (at least for error catching)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+
+# Get CGAL and boost versions
+. $WM_PROJECT_DIR/etc/config.sh/functions
+_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \
+          $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
+
 set -x
 
 wmake -all blockMesh
@@ -7,10 +16,10 @@ wmake -all extrude
 wmake -all extrude2DMesh
 wmake -all snappyHexMesh
 
-if [ -n "$CGAL_ARCH_PATH" ]
+if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ]
 then
-    foamyMesh/Allwmake
+    foamyMesh/Allwmake $*
 fi
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
index 9ca43fab5f66214187e808add366aeb49f589c8d..0c92180830829a17c9e89f23d00bf13550c9ecca 100644
--- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
+++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -228,7 +228,7 @@ int main(int argc, char *argv[])
     // Read in a list of dictionaries for the merge patch pairs
     if (meshDict.found("mergePatchPairs"))
     {
-        List<Pair<word> > mergePatchPairs
+        List<Pair<word>> mergePatchPairs
         (
             meshDict.lookup("mergePatchPairs")
         );
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
         HashTable<label> zoneMap(nZones);
 
         // Cells per zone.
-        List<DynamicList<label> > zoneCells(nZones);
+        List<DynamicList<label>> zoneCells(nZones);
 
         // Running cell counter
         label cellI = 0;
diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C
index 66272620be099925cea293ac883c4fc4019be2d3..00ced168eb0968ceab62cc4b8c706cbfa2505b10 100644
--- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C
+++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -549,24 +549,15 @@ int main(int argc, char *argv[])
             {
                 label nbrProcI = patchToNbrProc[patchI];
 
-                word name =
-                        "procBoundary"
-                      + Foam::name(Pstream::myProcNo())
-                      + "to"
-                      + Foam::name(nbrProcI);
-
                 Pout<< "Adding patch " << patchI
-                    << " name:" << name
                     << " between " << Pstream::myProcNo()
                     << " and " << nbrProcI
                     << endl;
 
-
                 newPatches.append
                 (
                     new processorPolyPatch
                     (
-                        name,
                         0,                  // size
                         mesh.nFaces(),      // start
                         patchI,             // index
diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
index 2e58aad62700e1415644fb20c2b3521055c38cea..91aab57a1b879badf0dab293cee5da90cbcfb2d4 100644
--- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
+++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -955,13 +955,11 @@ void addCoupledPatches
             }
             else
             {
-                // Rrocessor patch
-
-                word name =
-                    "procBoundary"
-                  + Foam::name(Pstream::myProcNo())
-                  + "to"
-                  + Foam::name(nbrProcI);
+                // Processor patch
+                word name
+                (
+                    processorPolyPatch::newName(Pstream::myProcNo(), nbrProcI)
+                );
 
                 sidePatchID[edgeI] = findPatchID(newPatches, name);
 
@@ -1152,7 +1150,7 @@ tmp<pointField> calcOffset
     vectorField::subField fc = pp.faceCentres();
 
     tmp<pointField> toffsets(new pointField(fc.size()));
-    pointField& offsets = toffsets();
+    pointField& offsets = toffsets.ref();
 
     forAll(fc, i)
     {
@@ -1927,7 +1925,7 @@ int main(int argc, char *argv[])
             extrudeMeshEdges
         )
     );
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
     const mapDistribute extrudeEdgeFacesMap
     (
         globalExtrudeFaces,
@@ -2298,7 +2296,7 @@ int main(int argc, char *argv[])
     // Calculate region normals by reducing local region normals
     pointField localRegionNormals(localToGlobalRegion.size());
     {
-        pointField localSum(localToGlobalRegion.size(), vector::zero);
+        pointField localSum(localToGlobalRegion.size(), Zero);
 
         forAll(pointLocalRegions, faceI)
         {
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/Allwclean b/applications/utilities/mesh/generation/extrude2DMesh/Allwclean
index 1f7114a1114796bf83f0271e5bcf53f7cdf349ec..48a8fb0d129e6177cb7c86595e6d4b99425baeba 100755
--- a/applications/utilities/mesh/generation/extrude2DMesh/Allwclean
+++ b/applications/utilities/mesh/generation/extrude2DMesh/Allwclean
@@ -5,4 +5,4 @@ set -x
 wclean libso extrude2DMesh
 wclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/Allwmake b/applications/utilities/mesh/generation/extrude2DMesh/Allwmake
index a56b144e293d36f67f6f5f85dbdd746fa9239d66..72ed5c7d1eb6242ee2532059be8bc211521f5c33 100755
--- a/applications/utilities/mesh/generation/extrude2DMesh/Allwmake
+++ b/applications/utilities/mesh/generation/extrude2DMesh/Allwmake
@@ -1,8 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso extrude2DMesh
+wmake $targetType extrude2DMesh
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
index 363a60653ebb2d27a1cc7a94447bdac16ffacea8..a6916b70763a7625dc76bc9798796973baba3da2 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
     // Point generator
     autoPtr<extrudeModel> model(extrudeModel::New(extrude2DMeshDict));
 
-    autoPtr<MeshedSurface<face> > fMesh;
+    autoPtr<MeshedSurface<face>> fMesh;
 
     autoPtr<polyMesh> mesh;
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/Allwclean b/applications/utilities/mesh/generation/foamyMesh/Allwclean
index b30667b8589ee59a9656edae4462848b58e91916..8fbad7478485039d9fc92137125bd1504e6ea484 100755
--- a/applications/utilities/mesh/generation/foamyMesh/Allwclean
+++ b/applications/utilities/mesh/generation/foamyMesh/Allwclean
@@ -10,4 +10,4 @@ wclean foamyHexMeshSurfaceSimplify
 wclean foamyHexMeshBackgroundMesh
 wclean cellSizeAndAlignmentGrid
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/generation/foamyMesh/Allwmake b/applications/utilities/mesh/generation/foamyMesh/Allwmake
index 189c5d1ed95040898eb10c705a0854a7f3505014..17241fde089720f1a8e2f71068ad90fa37c879c5 100755
--- a/applications/utilities/mesh/generation/foamyMesh/Allwmake
+++ b/applications/utilities/mesh/generation/foamyMesh/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso conformalVoronoiMesh
-wmake libso conformalVoronoi2DMesh
+wmake $targetType conformalVoronoiMesh
+wmake $targetType conformalVoronoi2DMesh
 wmake foamyQuadMesh
 wmake foamyHexMesh
 #wmake foamyHexMeshBackgroundMesh
@@ -11,4 +15,4 @@ wmake foamyHexMesh
 #wmake cellSizeAndAlignmentGrid
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options
index 8fe8686f668d61cb15760be0b739f8ee1c17a298..f9a4d17aafc15baa3ea4fe88a56e203124adb1af 100644
--- a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options
@@ -20,7 +20,7 @@ EXE_INC =  \
     -I$(LIB_SRC)/meshTools/lnInclude \
     -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
     -I$(LIB_SRC)/edgeMesh/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -I../conformalVoronoiMesh/lnInclude
 
 EXE_LIBS =  \
diff --git a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C
index cde380cdd5ba9f05ced8781fb0c1bcbc3cd9344b..779b68264922094e523f8b9efc85b767cf36fd66 100644
--- a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C
+++ b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,13 +55,13 @@ using namespace Foam;
 // Main program:
 
 template<class Triangulation, class Type>
-Foam::tmp<Foam::Field<Type> > filterFarPoints
+Foam::tmp<Foam::Field<Type>> filterFarPoints
 (
     const Triangulation& mesh,
     const Field<Type>& field
 )
 {
-    tmp<Field<Type> > tNewField(new Field<Type>(field.size()));
+    tmp<Field<Type>> tNewField(new Field<Type>(field.size()));
     Field<Type>& newField = tNewField();
 
     label added = 0;
@@ -139,7 +139,7 @@ autoPtr<mapDistribute> buildMap
         pointPoints[vit->index()].transfer(indices);
     }
 
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
 
     return autoPtr<mapDistribute>
     (
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H
index 92af158c19c17b83de8d18fdbb65baa5c91754c8..865b3108fe173cfd6e1764010c98d2c52027f232 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -154,8 +154,8 @@ private:
             faceList& faces,
             labelList& owner,
             PtrList<dictionary>& patchDicts,
-            const List<DynamicList<face> >& patchFaces,
-            const List<DynamicList<label> >& patchOwners
+            const List<DynamicList<face>>& patchFaces,
+            const List<DynamicList<label>>& patchOwners
         ) const;
 
         //- Disallow default bitwise copy construct
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C
index a2865609aca35562d5c99869ff30661b80f76666..3f916f9ba526ca41275a232005b212fd5da7c775 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,8 +84,8 @@ void Foam::DelaunayMesh<Triangulation>::addPatches
     faceList& faces,
     labelList& owner,
     PtrList<dictionary>& patchDicts,
-    const List<DynamicList<face> >& patchFaces,
-    const List<DynamicList<label> >& patchOwners
+    const List<DynamicList<face>>& patchFaces,
+    const List<DynamicList<label>>& patchOwners
 ) const
 {
     label nPatches = patchFaces.size();
@@ -353,8 +353,8 @@ Foam::DelaunayMesh<Triangulation>::createMesh
     PtrList<dictionary> patchDicts(1);
     patchDicts.set(0, new dictionary());
 
-    List<DynamicList<face> > patchFaces(1, DynamicList<face>());
-    List<DynamicList<label> > patchOwners(1, DynamicList<label>());
+    List<DynamicList<face>> patchFaces(1, DynamicList<face>());
+    List<DynamicList<label>> patchOwners(1, DynamicList<label>());
 
     vertexMap.resize(vertexCount());
     cellMap.setSize(Triangulation::number_of_finite_cells(), -1);
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
index 7a672354ecd7d0ec3c6cabc90cbc5e4f7a68c94e..a698561822aca0958d3b75166cb0820ad1bc2249 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,14 +56,6 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap
         nSend[procI]++;
     }
 
-    // Send over how many I need to receive
-    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    labelListList sendSizes(Pstream::nProcs());
-
-    sendSizes[Pstream::myProcNo()] = nSend;
-
-    combineReduce(sendSizes, UPstream::listEq());
 
     // 2. Size sendMap
     labelListList sendMap(Pstream::nProcs());
@@ -83,6 +75,11 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap
         sendMap[procI][nSend[procI]++] = i;
     }
 
+    // 4. Send over how many I need to receive
+    labelList recvSizes;
+    Pstream::exchangeSizes(sendMap, recvSizes);
+
+
     // Determine receive map
     // ~~~~~~~~~~~~~~~~~~~~~
 
@@ -100,7 +97,7 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap
     {
         if (procI != Pstream::myProcNo())
         {
-            label nRecv = sendSizes[procI][Pstream::myProcNo()];
+            label nRecv = recvSizes[procI];
 
             constructMap[procI].setSize(nRecv);
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H
index c040300dd3af409b7aee080d8a0512efa8d0860d..2c59cf6fde171f7d67bebb0de364e08deab52072 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ public:
 
 private:
 
-        autoPtr<List<boundBox> > allBackgroundMeshBounds_;
+        autoPtr<List<boundBox>> allBackgroundMeshBounds_;
 
 
     // Private Member Functions
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshTools.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshTools.H
index 17a50f699908ba6be3c10c27af1a49c24a17b302..dc4cadfaf16580fabed019a166a0af94f00f8c42 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshTools.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ namespace DelaunayMeshTools
 
     //- Write Delaunay points in the range between (and including)
     //  type startPointType and endPointType to an OBJ file
-    template<typename Triangulation>
+    template<class Triangulation>
     void writeOBJ
     (
         const fileName& fName,
@@ -85,7 +85,7 @@ namespace DelaunayMeshTools
     );
 
     //- Write Delaunay points of type pointType to .obj file
-    template<typename Triangulation>
+    template<class Triangulation>
     void writeOBJ
     (
         const fileName& fName,
@@ -94,15 +94,15 @@ namespace DelaunayMeshTools
     );
 
     //- Write the fixed Delaunay points to an OBJ file
-    template<typename Triangulation>
+    template<class Triangulation>
     void writeFixedPoints(const fileName& fName, const Triangulation& t);
 
     //- Write the boundary Delaunay points to an OBJ file
-    template<typename Triangulation>
+    template<class Triangulation>
     void writeBoundaryPoints(const fileName& fName, const Triangulation& t);
 
     //- Write the processor interface to an OBJ file
-    template<typename Triangulation>
+    template<class Triangulation>
     void writeProcessorInterface
     (
         const fileName& fName,
@@ -112,7 +112,7 @@ namespace DelaunayMeshTools
 
     //- Write the internal Delaunay vertices of the tessellation as a
     //  pointField that may be used to restart the meshing process
-    template<typename Triangulation>
+    template<class Triangulation>
     void writeInternalDelaunayVertices
     (
         const fileName& instance,
@@ -121,14 +121,14 @@ namespace DelaunayMeshTools
 
     //- Draws a tet cell to an output stream. The offset is supplied as the tet
     //  number to be drawn.
-    template<typename CellHandle>
+    template<class CellHandle>
     void drawDelaunayCell(Ostream& os, const CellHandle& c, label offset = 0);
 
 
 // Field extraction
 
     //- Extract all points in vertex-index order
-    template<typename Triangulation>
+    template<class Triangulation>
     tmp<pointField> allPoints(const Triangulation& t);
 
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C
index 04abf8a943d862bf5946a267e91081f1c378417a..ed6818dd39bff6e1984ee7a509fe56f7da9a614b 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ License
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-template<typename Triangulation>
+template<class Triangulation>
 void Foam::DelaunayMeshTools::writeOBJ
 (
     const fileName& fName,
@@ -77,7 +77,7 @@ void Foam::DelaunayMeshTools::writeOBJ
 }
 
 
-template<typename Triangulation>
+template<class Triangulation>
 void Foam::DelaunayMeshTools::writeOBJ
 (
     const fileName& fName,
@@ -89,7 +89,7 @@ void Foam::DelaunayMeshTools::writeOBJ
 }
 
 
-template<typename Triangulation>
+template<class Triangulation>
 void Foam::DelaunayMeshTools::writeFixedPoints
 (
     const fileName& fName,
@@ -117,7 +117,7 @@ void Foam::DelaunayMeshTools::writeFixedPoints
 }
 
 
-template<typename Triangulation>
+template<class Triangulation>
 void Foam::DelaunayMeshTools::writeBoundaryPoints
 (
     const fileName& fName,
@@ -145,7 +145,7 @@ void Foam::DelaunayMeshTools::writeBoundaryPoints
 }
 
 
-template<typename Triangulation>
+template<class Triangulation>
 void Foam::DelaunayMeshTools::writeProcessorInterface
 (
     const fileName& fName,
@@ -175,7 +175,7 @@ void Foam::DelaunayMeshTools::writeProcessorInterface
 }
 
 
-template<typename Triangulation>
+template<class Triangulation>
 void Foam::DelaunayMeshTools::writeInternalDelaunayVertices
 (
     const fileName& instance,
@@ -224,7 +224,7 @@ void Foam::DelaunayMeshTools::writeInternalDelaunayVertices
 }
 
 
-template<typename CellHandle>
+template<class CellHandle>
 void Foam::DelaunayMeshTools::drawDelaunayCell
 (
     Ostream& os,
@@ -273,14 +273,14 @@ void Foam::DelaunayMeshTools::drawDelaunayCell
 }
 
 
-template<typename Triangulation>
+template<class Triangulation>
 Foam::tmp<Foam::pointField> Foam::DelaunayMeshTools::allPoints
 (
     const Triangulation& t
 )
 {
     tmp<pointField> tpts(new pointField(t.vertexCount(), point::max));
-    pointField& pts = tpts();
+    pointField& pts = tpts.ref();
 
     for
     (
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options
index bad58b9d588786375ccdde15117e3b5a64052c54..1de2eafd8a80b33b5cda51d993173da751d9c87b 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/Make/options
@@ -23,7 +23,7 @@ EXE_INC = \
     -I$(LIB_SRC)/surfMesh/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude \
     -I$(LIB_SRC)/sampling/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -IPrintTable \
     -I/usr/include
 
@@ -37,4 +37,4 @@ LIB_LIBS = \
     -ldynamicMesh \
     -lsurfMesh \
     -lsampling \
-    -lautoMesh
+    -lsnappyHexMesh
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C
index 3396cc73a27d4dc6040b3d723be00ae2eb7c73df..6c1cee2f6908cfe204477171b0c3031c2c9768b4 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,14 +62,6 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap
         nSend[procI]++;
     }
 
-    // Send over how many I need to receive
-    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    labelListList sendSizes(Pstream::nProcs());
-
-    sendSizes[Pstream::myProcNo()] = nSend;
-
-    combineReduce(sendSizes, UPstream::listEq());
 
     // 2. Size sendMap
     labelListList sendMap(Pstream::nProcs());
@@ -89,6 +81,11 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap
         sendMap[procI][nSend[procI]++] = i;
     }
 
+    // 4. Send over how many I need to receive
+    labelList recvSizes;
+    Pstream::exchangeSizes(sendMap, recvSizes);
+
+
     // Determine receive map
     // ~~~~~~~~~~~~~~~~~~~~~
 
@@ -106,7 +103,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap
     {
         if (procI != Pstream::myProcNo())
         {
-            label nRecv = sendSizes[procI][Pstream::myProcNo()];
+            label nRecv = recvSizes[procI];
 
             constructMap[procI].setSize(nRecv);
 
@@ -538,7 +535,7 @@ bool Foam::backgroundMeshDecomposition::refineCell
 //        pointField samplePoints
 //        (
 //            volRes_*volRes_*volRes_,
-//            vector::zero
+//            Zero
 //        );
 //
 //        // scalar sampleVol = cellBb.volume()/samplePoints.size();
@@ -1216,7 +1213,7 @@ Foam::labelList Foam::backgroundMeshDecomposition::processorNearestPosition
 
 
 
-Foam::List<Foam::List<Foam::pointIndexHit> >
+Foam::List<Foam::List<Foam::pointIndexHit>>
 Foam::backgroundMeshDecomposition::intersectsProcessors
 (
     const List<point>& starts,
@@ -1238,7 +1235,7 @@ Foam::backgroundMeshDecomposition::intersectsProcessors
         const point& e = ends[sI];
 
         // Dummy point for treeBoundBox::intersects
-        point p(vector::zero);
+        point p(Zero);
 
         label nCandidates = 0;
 
@@ -1292,7 +1289,7 @@ Foam::backgroundMeshDecomposition::intersectsProcessors
         segmentIntersectsCandidate
     );
 
-    List<List<pointIndexHit> > segmentHitProcs(starts.size());
+    List<List<pointIndexHit>> segmentHitProcs(starts.size());
 
     // Working storage for assessing processors
     DynamicList<pointIndexHit> tmpProcHits;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H
index 0fe330f3fd90fe337557a1013ff6965ab956b361..33e68222d708620fa6591ae5cce46f116587aa6f 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,7 +118,7 @@ class backgroundMeshDecomposition
         autoPtr<bPatch> boundaryFacesPtr_;
 
         //- Search tree for the boundaryFaces_ patch
-        autoPtr<indexedOctree<treeDataBPatch> > bFTreePtr_;
+        autoPtr<indexedOctree<treeDataBPatch>> bFTreePtr_;
 
         //- The bounds of all background meshes on all processors
         treeBoundBoxList allBackgroundMeshBounds_;
@@ -220,7 +220,7 @@ public:
         );
 
         //- Distribute supplied the points to the appropriate processor
-        template<typename PointType>
+        template<class PointType>
         autoPtr<mapDistribute> distributePoints(List<PointType>& points) const;
 
         //- Is the given position inside the domain of this decomposition
@@ -258,7 +258,7 @@ public:
         ) const;
 
         //- What processor is the given position on?
-        template<typename PointType>
+        template<class PointType>
         labelList processorPosition(const List<PointType>& pts) const;
 
         //- What is the nearest processor to the given position?
@@ -270,7 +270,7 @@ public:
         //  launched from, it is assumed that the point is on that processor.
         //  The index data member of the pointIndexHit is replaced with the
         //  processor index.
-        List<List<pointIndexHit> > intersectsProcessors
+        List<List<pointIndexHit>> intersectsProcessors
         (
             const List<point>& starts,
             const List<point>& ends,
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C
index b63321076203d941eedca71b5f37f2a04583ff44..5851c7e807d87f380beebd10fcdd68dc183caf77 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-template<typename PointType>
+template<class PointType>
 Foam::autoPtr<Foam::mapDistribute>
 Foam::backgroundMeshDecomposition::distributePoints
 (
@@ -45,7 +45,7 @@ Foam::backgroundMeshDecomposition::distributePoints
 }
 
 
-template<typename PointType>
+template<class PointType>
 Foam::labelList Foam::backgroundMeshDecomposition::processorPosition
 (
     const List<PointType>& pts
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C
index bbd52ecfe7e20f840e7159ab2affff616b8852fd..191ddf53a93d8086dcf95cdf90f9b0a2db07e239 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellAspectRatioControl/cellAspectRatioControl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ Foam::cellAspectRatioControl::cellAspectRatioControl
         aspectRatioDict_.lookupOrDefault<vector>
         (
             "aspectRatioDirection",
-            vector::zero
+            Zero
         )
     )
 {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C
index ca65462488ba94af2bf290b86d8408a03d598109..4283fb7c355c6daef998cecc10f4daf1b602afaf 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControl/cellShapeControl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,13 +36,10 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(cellShapeControl, 0);
+    defineTypeNameAndDebug(cellShapeControl, 0);
 }
 
 
-// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
-
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::cellShapeControl::cellShapeControl
@@ -173,7 +170,6 @@ Foam::scalar Foam::cellShapeControl::cellSize(const point& pt) const
 }
 
 
-//- Return the cell alignment at the given location
 Foam::tensor Foam::cellShapeControl::cellAlignment(const point& pt) const
 {
     scalarList bary;
@@ -181,7 +177,7 @@ Foam::tensor Foam::cellShapeControl::cellAlignment(const point& pt) const
 
     shapeControlMesh_.barycentricCoords(pt, bary, ch);
 
-    tensor alignment = tensor::zero;
+    tensor alignment = Zero;
 
     if (shapeControlMesh_.dimension() < 3 || shapeControlMesh_.is_infinite(ch))
     {
@@ -253,7 +249,7 @@ void Foam::cellShapeControl::cellSizeAndAlignment
 
     shapeControlMesh_.barycentricCoords(pt, bary, ch);
 
-    alignment = tensor::zero;
+    alignment = Zero;
     size = 0;
 
     if (shapeControlMesh_.dimension() < 3 || shapeControlMesh_.is_infinite(ch))
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C
index 75c028fe8ecfbb32df497da31462f4225db033af..f91157e7a909689e0a02b421981f6f66c56a8682 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -262,7 +262,7 @@ Foam::label Foam::cellShapeControlMesh::removePoints()
 Foam::tmp<Foam::pointField> Foam::cellShapeControlMesh::cellCentres() const
 {
     tmp<pointField> tcellCentres(new pointField(number_of_finite_cells()));
-    pointField& cellCentres = tcellCentres();
+    pointField& cellCentres = tcellCentres.ref();
 
     label count = 0;
     for
@@ -599,7 +599,7 @@ void Foam::cellShapeControlMesh::distribute
 
 Foam::tensorField Foam::cellShapeControlMesh::dumpAlignments() const
 {
-    tensorField alignmentsTmp(number_of_vertices(), tensor::zero);
+    tensorField alignmentsTmp(number_of_vertices(), Zero);
 
     label count = 0;
     for
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C
index 921298660d8cd5ebeb72c113cd911cf1633d863f..b2ed90169fae7fb943f64ade2e582321f41a5eee 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/fileControl/fileControl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,7 +119,7 @@ Foam::fileControl::~fileControl()
 //
 //    label nearest = 0;
 //
-//    tensor alignment = Foam::tensor::zero;
+//    tensor alignment = Zero;
 //    forAll(bary, pI)
 //    {
 //        //alignment += bary[pI]*ch->vertex(pI)->alignment();
@@ -155,7 +155,7 @@ Foam::fileControl::~fileControl()
 //        size += bary[pI]*ch->vertex(pI)->size();
 //    }
 //
-////    alignment = Foam::tensor::zero;
+////    alignment = Zero;
 ////    forAll(bary, pI)
 ////    {
 ////        alignment += bary[pI]*ch->vertex(pI)->alignment();
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C
index 851a773b06575bbdf55490812478715ef32879db..ef565a405f0b33a422d0b3b7acf384114e5d43f7 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellSizeAndAlignmentControl/searchableSurfaceControl/searchableSurfaceControl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ addToRunTimeSelectionTable
 //
 //    const tensor Rp = rotationTensor(vector(0,0,1), np);
 //
-//    vector na = vector::zero;
+//    vector na = Zero;
 //
 //    scalar smallestAngle = GREAT;
 //
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C
index 97fb37191acb72080fef35f452e9cdd97be29f75..af208c587b7bf98eb4b6e4d586ed2c8762b3a24e 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,13 +28,13 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Triangulation, class Type>
-Foam::tmp<Foam::Field<Type> > Foam::smoothAlignmentSolver::filterFarPoints
+Foam::tmp<Foam::Field<Type>> Foam::smoothAlignmentSolver::filterFarPoints
 (
     const Triangulation& mesh,
     const Field<Type>& field
 )
 {
-    tmp<Field<Type> > tNewField(new Field<Type>(field.size()));
+    tmp<Field<Type>> tNewField(new Field<Type>(field.size()));
     Field<Type>& newField = tNewField();
 
     label added = 0;
@@ -92,7 +92,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::smoothAlignmentSolver::buildReferredMap
 
     indices.transfer(dynIndices);
 
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
     return autoPtr<mapDistribute>
     (
         new mapDistribute
@@ -156,7 +156,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::smoothAlignmentSolver::buildMap
         pointPoints[vit->index()].transfer(indices);
     }
 
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
     return autoPtr<mapDistribute>
     (
         new mapDistribute
@@ -179,7 +179,7 @@ Foam::tmp<Foam::triadField> Foam::smoothAlignmentSolver::buildAlignmentField
     (
         new triadField(mesh.vertexCount(), triad::unset)
     );
-    triadField& alignments = tAlignments();
+    triadField& alignments = tAlignments.ref();
 
     for
     (
@@ -211,7 +211,7 @@ Foam::tmp<Foam::pointField> Foam::smoothAlignmentSolver::buildPointField
     (
         new pointField(mesh.vertexCount(), point(GREAT, GREAT, GREAT))
     );
-    pointField& points = tPoints();
+    pointField& points = tPoints.ref();
 
     for
     (
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.H
index c3b0341a4ba1ed623a48ccecee0d13c9b0333312..19cc6ea665c6282ee8754d1ad6b3959a32567499 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ class smoothAlignmentSolver
     // Private Member Functions
 
         template<class Triangulation, class Type>
-        tmp<Field<Type> > filterFarPoints
+        tmp<Field<Type>> filterFarPoints
         (
             const Triangulation& mesh,
             const Field<Type>& field
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C
index 5a016d88fb77779de298bece76b4684fa443f5e7..025ba5885d9cc0cc051b650996ee57b2ddc3b6ad 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -152,7 +152,7 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
         )
     );
 
-    triSurfacePointScalarField& pointCellSize = tPointCellSize();
+    triSurfacePointScalarField& pointCellSize = tPointCellSize.ref();
 
     if (readCurvature_)
     {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C
index 805ad1196aeb311705a857312de6ac3c0ee44797..6d6b56e7b6c43de620cbeebba30c18e1002ef245 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::fieldFromFile::load()
         )
     );
 
-    pointCellSize() *= cellSizeMultipleCoeff_;
+    pointCellSize.ref() *= cellSizeMultipleCoeff_;
 
     return pointCellSize;
 }
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C
index 939ab07babc03cbc3da59728c3d3ff9d91fc4120..8049d009610bfaaf781ede3944e9e94e7e1de593 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -1082,7 +1082,7 @@ void Foam::conformalVoronoiMesh::move()
     vectorField displacementAccumulator
     (
         number_of_vertices(),
-        vector::zero
+        Zero
     );
 
     PackedBoolList pointToBeRetained
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H
index 59fbba90a960e731eedff8c88ac2c225f65410b9..b22803c56b51b01a45112e5fb018f451ab57bdd2 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
     typedef Delaunay::Facet            Facet;
     typedef Delaunay::Point            Point;
 
-    typedef List<DynamicList<Pair<labelPair> > > labelPairPairDynListList;
+    typedef List<DynamicList<Pair<labelPair>>> labelPairPairDynListList;
 
     typedef Tuple2<pointIndexHit, label>         pointIndexHitAndFeature;
     typedef List<pointIndexHitAndFeature>        pointIndexHitAndFeatureList;
@@ -168,13 +168,13 @@ private:
         featurePointConformer ftPtConformer_;
 
         //- Search tree for edge point locations
-        mutable autoPtr<dynamicIndexedOctree<dynamicTreeDataPoint> >
+        mutable autoPtr<dynamicIndexedOctree<dynamicTreeDataPoint>>
             edgeLocationTreePtr_;
 
         mutable DynamicList<Foam::point> existingEdgeLocations_;
 
         //- Search tree for surface point locations
-        mutable autoPtr<dynamicIndexedOctree<dynamicTreeDataPoint> >
+        mutable autoPtr<dynamicIndexedOctree<dynamicTreeDataPoint>>
             surfacePtLocationTreePtr_;
 
         mutable DynamicList<Foam::point> existingSurfacePtLocations_;
@@ -708,7 +708,7 @@ private:
         (
             labelList& owner,
             labelList& neighbour,
-            const HashSet<labelPair, labelPair::Hash<> >& deferredCollapseFaces
+            const HashSet<labelPair, labelPair::Hash<>>& deferredCollapseFaces
         ) const;
 
         //- Check whether the cell sizes are fine enough. Creates a polyMesh.
@@ -780,9 +780,9 @@ private:
         //  on both processors
         void sortProcPatches
         (
-            List<DynamicList<face> >& patchFaces,
-            List<DynamicList<label> >& patchOwners,
-            List<DynamicList<label> >& patchPointPairSlaves,
+            List<DynamicList<face>>& patchFaces,
+            List<DynamicList<label>>& patchOwners,
+            List<DynamicList<label>>& patchPointPairSlaves,
             labelPairPairDynListList& patchSortingIndices
         ) const;
 
@@ -794,9 +794,9 @@ private:
             labelList& owner,
             PtrList<dictionary>& patchDicts,
             PackedBoolList& boundaryFacesToRemove,
-            const List<DynamicList<face> >& patchFaces,
-            const List<DynamicList<label> >& patchOwners,
-            const List<DynamicList<bool> >& indirectPatchFace
+            const List<DynamicList<face>>& patchFaces,
+            const List<DynamicList<label>>& patchOwners,
+            const List<DynamicList<bool>>& indirectPatchFace
         ) const;
 
         //- Remove points that are no longer used by any faces
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
index 920a380fb9260736c4f3d3b58023ec007dd901b4..4443ded738846b9a3af14ffdf13a4d58beb8f201 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -160,9 +160,9 @@ void Foam::conformalVoronoiMesh::calcTetMesh
 
     label nPatches = patchNames.size();
 
-    List<DynamicList<face> > patchFaces(nPatches, DynamicList<face>(0));
+    List<DynamicList<face>> patchFaces(nPatches, DynamicList<face>(0));
 
-    List<DynamicList<label> > patchOwners(nPatches, DynamicList<label>(0));
+    List<DynamicList<label>> patchOwners(nPatches, DynamicList<label>(0));
 
     faces.setSize(number_of_finite_facets());
 
@@ -278,7 +278,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh
     sortFaces(faces, owner, neighbour);
 
 //    PackedBoolList boundaryFacesToRemove;
-//    List<DynamicList<bool> > indirectPatchFace;
+//    List<DynamicList<bool>> indirectPatchFace;
 //
 //    addPatches
 //    (
@@ -673,7 +673,7 @@ void Foam::conformalVoronoiMesh::deferredCollapseFaceSet
 (
     labelList& owner,
     labelList& neighbour,
-    const HashSet<labelPair, labelPair::Hash<> >& deferredCollapseFaces
+    const HashSet<labelPair, labelPair::Hash<>>& deferredCollapseFaces
 ) const
 {
     DynamicList<label> faceLabels;
@@ -1631,10 +1631,7 @@ Foam::label Foam::conformalVoronoiMesh::createPatchInfo
             if (procUsed[pUI])
             {
                 patchNames[nNonProcPatches + procAddI] =
-                    "procBoundary"
-                   + name(Pstream::myProcNo())
-                   + "to"
-                   + name(pUI);
+                    processorPolyPatch::newName(Pstream::myProcNo(), pUI);
 
                 patchDicts[nNonProcPatches + procAddI].set
                 (
@@ -1750,12 +1747,12 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
         }
     }
 
-    List<DynamicList<face> > patchFaces(nPatches, DynamicList<face>(0));
-    List<DynamicList<label> > patchOwners(nPatches, DynamicList<label>(0));
+    List<DynamicList<face>> patchFaces(nPatches, DynamicList<face>(0));
+    List<DynamicList<label>> patchOwners(nPatches, DynamicList<label>(0));
     // Per patch face the index of the slave node of the point pair
-    List<DynamicList<label> > patchPPSlaves(nPatches, DynamicList<label>(0));
+    List<DynamicList<label>> patchPPSlaves(nPatches, DynamicList<label>(0));
 
-    List<DynamicList<bool> > indirectPatchFace(nPatches, DynamicList<bool>(0));
+    List<DynamicList<bool>> indirectPatchFace(nPatches, DynamicList<bool>(0));
 
 
     faces.setSize(number_of_finite_edges());
@@ -2134,7 +2131,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
                             // Use this processor's vertex index as the master
                             // for sorting
 
-                            DynamicList<Pair<labelPair> >& sortingIndex =
+                            DynamicList<Pair<labelPair>>& sortingIndex =
                                 procPatchSortingIndex[patchIndex];
 
                             if (vB->internalOrBoundaryPoint() && vB->referred())
@@ -2165,7 +2162,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
                             // Use the other processor's vertex index as the
                             // master for sorting
 
-                            DynamicList<Pair<labelPair> >& sortingIndex =
+                            DynamicList<Pair<labelPair>>& sortingIndex =
                                 procPatchSortingIndex[patchIndex];
 
                             if (vA->internalOrBoundaryPoint() && vA->referred())
@@ -2450,9 +2447,9 @@ void Foam::conformalVoronoiMesh::sortFaces
 
 void Foam::conformalVoronoiMesh::sortProcPatches
 (
-    List<DynamicList<face> >& patchFaces,
-    List<DynamicList<label> >& patchOwners,
-    List<DynamicList<label> >& patchPointPairSlaves,
+    List<DynamicList<face>>& patchFaces,
+    List<DynamicList<label>>& patchOwners,
+    List<DynamicList<label>>& patchPointPairSlaves,
     labelPairPairDynListList& patchSortingIndices
 ) const
 {
@@ -2466,7 +2463,7 @@ void Foam::conformalVoronoiMesh::sortProcPatches
         faceList& faces = patchFaces[patchI];
         labelList& owner = patchOwners[patchI];
         DynamicList<label>& slaves = patchPointPairSlaves[patchI];
-        DynamicList<Pair<labelPair> >& sortingIndices
+        DynamicList<Pair<labelPair>>& sortingIndices
             = patchSortingIndices[patchI];
 
         if (!sortingIndices.empty())
@@ -2511,9 +2508,9 @@ void Foam::conformalVoronoiMesh::addPatches
     labelList& owner,
     PtrList<dictionary>& patchDicts,
     PackedBoolList& boundaryFacesToRemove,
-    const List<DynamicList<face> >& patchFaces,
-    const List<DynamicList<label> >& patchOwners,
-    const List<DynamicList<bool> >& indirectPatchFace
+    const List<DynamicList<face>>& patchFaces,
+    const List<DynamicList<label>>& patchOwners,
+    const List<DynamicList<bool>>& indirectPatchFace
 ) const
 {
     label nBoundaryFaces = 0;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C
index fdc4ef4354878bc5f726da6851fe1b26081ec709..e8013eb1c488d318eea5184977c2873cd17566cc 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -1581,7 +1581,7 @@ void Foam::conformalVoronoiMesh::limitDisplacement
     // Do not allow infinite recursion
     if (callCount > 7)
     {
-        displacement = vector::zero;
+        displacement = Zero;
         return;
     }
 
@@ -1630,7 +1630,7 @@ void Foam::conformalVoronoiMesh::limitDisplacement
             if (magSqr(pt - surfHit.hitPoint()) <= searchDistanceSqr)
             {
                 // Cannot limit displacement, point closer than tolerance
-                displacement = vector::zero;
+                displacement = Zero;
                 return;
             }
         }
@@ -2066,7 +2066,7 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits
             keepSurfacePoint = false;
         }
 
-        List<List<pointIndexHit> > edHitsByFeature;
+        List<List<pointIndexHit>> edHitsByFeature;
 
         labelList featuresHit;
 
@@ -2295,7 +2295,7 @@ void Foam::conformalVoronoiMesh::reinsertSurfaceConformation()
         }
     }
 
-    inplaceSubset<PackedBoolList, List<Vb> >
+    inplaceSubset<PackedBoolList, List<Vb>>
     (
         selectedElems,
         surfaceConformationVertices_
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
index e10bf7bfa1c88c198cbddc9ecf9080e5f94d8762..f9673c40f07e24c533f253704e83dde5f3844e12 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -432,7 +432,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::conformalVoronoiMesh::createDummyMesh
         {
             patches[patchI] = new processorPolyPatch
             (
-                patchNames[patchI],
                 0,          //patchSizes[p],
                 0,          //patchStarts[p],
                 patchI,
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C
index 99a35e1957a58046ab6802bb4f6151453db85ec2..0e07acfebd18f258500ebefe2fb5476659a8e9c5 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,12 +118,12 @@ void Foam::featurePointConformer::addMasterAndSlavePoints
 (
     const DynamicList<Foam::point>& masterPoints,
     const DynamicList<Foam::indexedVertexEnum::vertexType>& masterPointsTypes,
-    const Map<DynamicList<autoPtr<plane> > >& masterPointReflections,
+    const Map<DynamicList<autoPtr<plane>>>& masterPointReflections,
     DynamicList<Vb>& pts,
     const label ptI
 ) const
 {
-    typedef DynamicList<autoPtr<plane> >        planeDynList;
+    typedef DynamicList<autoPtr<plane>>        planeDynList;
     typedef Foam::indexedVertexEnum::vertexType vertexType;
 
     forAll(masterPoints, pI)
@@ -199,7 +199,7 @@ void Foam::featurePointConformer::createMasterAndSlavePoints
     DynamicList<Vb>& pts
 ) const
 {
-    typedef DynamicList<autoPtr<plane> >          planeDynList;
+    typedef DynamicList<autoPtr<plane>>          planeDynList;
     typedef indexedVertexEnum::vertexType         vertexType;
     typedef extendedFeatureEdgeMesh::edgeStatus   edgeStatus;
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.H
index 5c5a69afea8098d8b47f716a64ba8159acf30412..21cdc53e312ecea6cfc1c5e8ee93060ee885f641 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ class featurePointConformer
         (
             const DynamicList<point>& masterPoints,
             const DynamicList<indexedVertexEnum::vertexType>& masterPointsTypes,
-            const Map<DynamicList<autoPtr<plane> > >& masterPointReflections,
+            const Map<DynamicList<autoPtr<plane>>>& masterPointReflections,
             DynamicList<Vb>& pts,
             const label ptI
         ) const;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformerSpecialisations.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformerSpecialisations.C
index 56c5929343bb38ab86c6ba28d5d5f724e0e9e2cf..826372dab3c9dfa98eb3ce1edad379671d85e7f9 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformerSpecialisations.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/featurePointConformer/featurePointConformerSpecialisations.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -200,8 +200,8 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
         Foam::point externalPtD;
         Foam::point externalPtE;
 
-        vector convexEdgePlaneCNormal(vector::zero);
-        vector convexEdgePlaneDNormal(vector::zero);
+        vector convexEdgePlaneCNormal(Zero);
+        vector convexEdgePlaneDNormal(Zero);
 
         const labelList& concaveEdgeNormals = edgeNormals[concaveEdgeI];
         const labelList& convexEdgeANormals = edgeNormals[convexEdgesI[0]];
@@ -632,8 +632,8 @@ bool Foam::featurePointConformer::createSpecialisedFeaturePoint
         Foam::point externalPtD;
         Foam::point externalPtE;
 
-        vector concaveEdgePlaneCNormal(vector::zero);
-        vector concaveEdgePlaneDNormal(vector::zero);
+        vector concaveEdgePlaneCNormal(Zero);
+        vector concaveEdgePlaneDNormal(Zero);
 
         const labelList& convexEdgeNormals = edgeNormals[convexEdgeI];
         const labelList& concaveEdgeANormals = edgeNormals[concaveEdgesI[0]];
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.C
index 8274132e5c5dd33c021ca28399d4cd9d3b43d084..601bba3f8e8cc91dd9c05732220bd7f89542d1ab 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ template<class Gt, class Cb>
 Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
-    const InfoProxy<CGAL::indexedCell<Gt, Cb> >& p
+    const InfoProxy<CGAL::indexedCell<Gt, Cb>>& p
 )
 {
     const CGAL::indexedCell<Gt, Cb>& iv = p.t_;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H
index 7a19a25ba212a8e65d205c3d02289381864925d8..2d466fc011f828e18585391cac98d173647e9583 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCell.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ class Ostream;
 template<class Gt, class Cb> Ostream& operator<<
 (
     Ostream&,
-    const Foam::InfoProxy<CGAL::indexedCell<Gt, Cb> >&
+    const Foam::InfoProxy<CGAL::indexedCell<Gt, Cb>>&
 );
 }
 
@@ -117,7 +117,7 @@ public:
     typedef typename Cb::Vertex_handle                   Vertex_handle;
     typedef typename Cb::Cell_handle                     Cell_handle;
 
-    template<typename TDS2>
+    template<class TDS2>
     struct Rebind_TDS
     {
         typedef typename Cb::template Rebind_TDS<TDS2>::Other Cb2;
@@ -241,7 +241,7 @@ public:
 
         //- Return info proxy.
         //  Used to print indexedCell information to a stream
-        Foam::InfoProxy<indexedCell<Gt, Cb> > info() const
+        Foam::InfoProxy<indexedCell<Gt, Cb>> info() const
         {
             return *this;
         }
@@ -249,7 +249,7 @@ public:
         friend Foam::Ostream& Foam::operator<< <Gt, Cb>
         (
             Foam::Ostream&,
-            const Foam::InfoProxy<indexedCell<Gt, Cb> >&
+            const Foam::InfoProxy<indexedCell<Gt, Cb>>&
         );
 
 };
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C
index 86512ac92e530a62af1672171040459a2ff23d87..49f6796781d235b8690a6a41819850e32a65cf06 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 #include "CGALTriangulation3DKernel.H"
 
 
-template<typename Cell>
+template<class Cell>
 Foam::scalar Foam::foamyHexMeshChecks::coplanarTet
 (
     Cell& c,
@@ -74,7 +74,7 @@ Foam::scalar Foam::foamyHexMeshChecks::coplanarTet
 }
 
 
-template<typename Cell>
+template<class Cell>
 bool Foam::foamyHexMeshChecks::closePoints
 (
     Cell& c,
@@ -104,7 +104,7 @@ bool Foam::foamyHexMeshChecks::closePoints
 }
 
 
-template<typename Cell>
+template<class Cell>
 bool Foam::foamyHexMeshChecks::smallVolume
 (
     Cell& c,
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.H
index 1aa31c3dbeac0780c7c18bf693a88ea9732b80f1..39385f4561b4d31051b9dad257cd4e5d78d5c0a7 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellChecks.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,21 +34,21 @@ namespace Foam
 namespace foamyHexMeshChecks
 {
 
-    template<typename Cell>
+    template<class Cell>
     scalar coplanarTet
     (
         Cell& c,
         const scalar tol = 1e-12
     );
 
-    template<typename Cell>
+    template<class Cell>
     bool closePoints
     (
         Cell& c,
         const scalar tol = 1e-12
     );
 
-    template<typename Cell>
+    template<class Cell>
     bool smallVolume
     (
         Cell& c,
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H
index 14695671d91500465382b453451fec4e9529a305..2b1d991a6980fe1d03c1f8b3fb92f88fc55f6059 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,6 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-//#include "indexedCellChecks.H"
-
 template<class Gt, class Cb>
 Foam::tetCell CGAL::indexedCell<Gt, Cb>::unsortedVertexGlobalIndices
 (
@@ -578,8 +576,8 @@ inline bool CGAL::indexedCell<Gt, Cb>::potentialCoplanarCell() const
 
     if (nMasters == 2 && nSlaves == 2)
     {
-        Foam::vector vp0(Foam::vector::zero);
-        Foam::vector vp1(Foam::vector::zero);
+        Foam::vector vp0(Foam::Zero);
+        Foam::vector vp1(Foam::Zero);
 
         if
         (
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOps.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOps.H
index 6620b8de574251140db588fb7fd7d89d8d3f26b7..8efb99a44d3383f5eef86df33720d78ff0a82abb 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOps.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,10 +50,10 @@ namespace indexedCellOps
 {
 
 //- Does the Dual vertex form part of a processor patch
-template<typename CellType>
+template<class CellType>
 Foam::label dualVertexMasterProc(const CellType& c);
 
-template<typename CellType>
+template<class CellType>
 Foam::FixedList<Foam::label, 4> processorsAttached(const CellType& c);
 
 } // End namespace indexedCellOps
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOpsTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOpsTemplates.C
index 9222339396610961b622fb9e793189bcd1d9af7a..e5841b65b8caa159cbb3cc5b432229f6e6b30cb1 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOpsTemplates.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell/indexedCellOpsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
-template<typename CellType>
+template<class CellType>
 Foam::label CGAL::indexedCellOps::dualVertexMasterProc(const CellType& c)
 {
     if (!c->parallelDualVertex())
@@ -56,7 +56,7 @@ Foam::label CGAL::indexedCellOps::dualVertexMasterProc(const CellType& c)
 }
 
 
-template<typename CellType>
+template<class CellType>
 Foam::FixedList<Foam::label, 4>
 CGAL::indexedCellOps::processorsAttached(const CellType& c)
 {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C
index ad130e538149ca4845634e03c04c3d26cfe79681..13a137f694db1cc2c4dd281e370cd58c7223aaae 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -155,7 +155,7 @@ template<class Gt, class Vb>
 Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
-    const InfoProxy<CGAL::indexedVertex<Gt, Vb> >& p
+    const InfoProxy<CGAL::indexedVertex<Gt, Vb>>& p
 )
 {
     const CGAL::indexedVertex<Gt, Vb>& iv = p.t_;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
index e4b012e66817ce296877e4f09fd8c0d295e57b06..d6d8dd9601699b3c4558070f4d8e0b067038de50 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ class Istream;
 template<class Gt, class Vb> Ostream& operator<<
 (
     Ostream&,
-    const Foam::InfoProxy<CGAL::indexedVertex<Gt, Vb> >&
+    const Foam::InfoProxy<CGAL::indexedVertex<Gt, Vb>>&
 );
 
 template<class Gt, class Vb> Ostream& operator<<
@@ -98,7 +98,7 @@ namespace CGAL
                        Class indexedVertex Declaration
 \*---------------------------------------------------------------------------*/
 
-template<class Gt, class Vb = CGAL::Triangulation_vertex_base_3<Gt> >
+template<class Gt, class Vb = CGAL::Triangulation_vertex_base_3<Gt>>
 class indexedVertex
 :
     public Foam::indexedVertexEnum,
@@ -134,7 +134,7 @@ public:
     typedef typename Tds::Vertex_handle                 Vertex_handle;
     typedef typename Tds::Cell_handle                   Cell_handle;
 
-    template<typename TDS2>
+    template<class TDS2>
     struct Rebind_TDS
     {
         typedef typename Vb::template Rebind_TDS<TDS2>::Other   Vb2;
@@ -258,7 +258,7 @@ public:
         //- Fix the vertex so that it can't be moved
         inline bool& fixed();
 
-        inline indexedVertex& operator=(const indexedVertex& rhs)
+        inline void operator=(const indexedVertex& rhs)
         {
             Vb::operator=(rhs);
 
@@ -268,8 +268,6 @@ public:
             this->alignment_ = rhs.alignment();
             this->targetCellSize_ = rhs.targetCellSize();
             this->vertexFixed_ = rhs.fixed();
-
-            return *this;
         }
 
         inline bool operator==(const indexedVertex& rhs) const
@@ -294,7 +292,7 @@ public:
 
         //- Return info proxy.
         //  Used to print indexedVertex information to a stream
-        Foam::InfoProxy<indexedVertex<Gt, Vb> > info() const
+        Foam::InfoProxy<indexedVertex<Gt, Vb>> info() const
         {
             return *this;
         }
@@ -302,7 +300,7 @@ public:
         friend Foam::Ostream& Foam::operator<< <Gt, Vb>
         (
             Foam::Ostream&,
-            const Foam::InfoProxy<indexedVertex<Gt, Vb> >&
+            const Foam::InfoProxy<indexedVertex<Gt, Vb>>&
         );
 
         friend Foam::Ostream& Foam::operator<< <Gt, Vb>
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOps.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOps.H
index 657275c618bae72732a85cdd84ad9d1525bec813..99fdea0e9ca8d4e7142ab7f665c328c81ac20e37 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOps.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,11 +50,11 @@ namespace indexedVertexOps
 
 //- Return the target cell size from that stored on a pair of Delaunay vertices,
 //  using a mean function.
-template<typename VertexType>
+template<class VertexType>
 Foam::scalar averageCellSize(const VertexType& vA, const VertexType& vB);
 
 
-template<typename VertexType>
+template<class VertexType>
 inline bool uninitialised(const VertexType& v);
 
 } // End namespace indexedVertexOps
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOpsTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOpsTemplates.C
index 1b28a88c5e6b295cd942131a2b08d6b9ae95beed..5cb2fd96cad6db02ae3646012fd1c6b05ab126e0 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOpsTemplates.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertexOpsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,7 +27,7 @@ License
 
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
-template<typename VertexType>
+template<class VertexType>
 Foam::scalar CGAL::indexedVertexOps::averageCellSize
 (
     const VertexType& vA,
@@ -47,7 +47,7 @@ Foam::scalar CGAL::indexedVertexOps::averageCellSize
 }
 
 
-template<typename VertexType>
+template<class VertexType>
 inline bool CGAL::indexedVertexOps::uninitialised(const VertexType& v)
 {
     return v->type() == Foam::indexedVertexEnum::vtUnassigned;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/pointConversion.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/pointConversion.H
index fe799a31a31afab52d85b4a5d9f114aa1903d27c..570f32aee03bf0822e7946f61feedc1cc5059aa2 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/pointConversion.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/pointConversion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ namespace Foam
 
 #ifdef CGAL_INEXACT
 
-    template<typename Point>
+    template<class Point>
     inline pointFromPoint topoint(const Point& P)
     {
         return reinterpret_cast<pointFromPoint>(P);
@@ -67,7 +67,7 @@ namespace Foam
 
 #else
 
-    template<typename Point>
+    template<class Point>
     inline pointFromPoint topoint(const Point& P)
     {
         return Foam::point
@@ -87,7 +87,7 @@ namespace Foam
 
     //- Specialisation for indexedVertex.
     template<>
-    inline pointFromPoint topoint<CGAL::indexedVertex<K> >
+    inline pointFromPoint topoint<CGAL::indexedVertex<K>>
     (
         const CGAL::indexedVertex<K>& P
     )
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C
index 464dd646ba330ca5109555d175a1dfc09ff79650..47efc0e8faca423205fece1ddd8f24ac5b9613e9 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ void Foam::conformationSurfaces::hasBoundedVolume
     List<volumeType>& referenceVolumeTypes
 ) const
 {
-    vector sum(vector::zero);
+    vector sum(Zero);
     label totalTriangles = 0;
 
     forAll(surfaces_, s)
@@ -327,9 +327,9 @@ Foam::conformationSurfaces::conformationSurfaces
     regionOffset_.setSize(surfI, 0);
 
     PtrList<dictionary> globalPatchInfo(surfI);
-    List<Map<autoPtr<dictionary> > > regionPatchInfo(surfI);
+    List<Map<autoPtr<dictionary>>> regionPatchInfo(surfI);
     List<sideVolumeType> globalVolumeTypes(surfI);
-    List<Map<sideVolumeType> > regionVolumeTypes(surfI);
+    List<Map<sideVolumeType>> regionVolumeTypes(surfI);
 
     HashSet<word> unmatchedKeys(surfacesDict.toc());
 
@@ -514,8 +514,8 @@ Foam::conformationSurfaces::conformationSurfaces
                 regionVolumeTypes[surfI][iter.key()];
         }
 
-        const Map<autoPtr<dictionary> >& localInfo = regionPatchInfo[surfI];
-        forAllConstIter(Map<autoPtr<dictionary> >, localInfo, iter)
+        const Map<autoPtr<dictionary>>& localInfo = regionPatchInfo[surfI];
+        forAllConstIter(Map<autoPtr<dictionary>>, localInfo, iter)
         {
             label globalRegionI = regionOffset_[surfI] + iter.key();
 
@@ -659,7 +659,7 @@ Foam::Field<bool> Foam::conformationSurfaces::wellInOutSide
     const bool testForInside
 ) const
 {
-    List<List<volumeType> > surfaceVolumeTests
+    List<List<volumeType>> surfaceVolumeTests
     (
         surfaces_.size(),
         List<volumeType>
@@ -896,7 +896,7 @@ void Foam::conformationSurfaces::findSurfaceAllIntersections
 ) const
 {
     labelListList hitSurfaces;
-    List<List<pointIndexHit> > hitInfo;
+    List<List<pointIndexHit>> hitInfo;
 
     searchableSurfacesQueries::findAllIntersections
     (
@@ -1173,7 +1173,7 @@ void Foam::conformationSurfaces::findAllNearestEdges
 (
     const point& sample,
     const scalar searchRadiusSqr,
-    List<List<pointIndexHit> >& edgeHitsByFeature,
+    List<List<pointIndexHit>>& edgeHitsByFeature,
     List<label>& featuresHit
 ) const
 {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H
index 1d41a40d1d5914843b97ca08530303302e81fdad..09c351bd0aef1d89fa4e010c39070b3f7e5b4503 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -335,7 +335,7 @@ public:
             (
                 const point& sample,
                 const scalar searchRadiusSqr,
-                List<List<pointIndexHit> >& edgeHitsByFeature,
+                List<List<pointIndexHit>>& edgeHitsByFeature,
                 List<label>& featuresHit
             ) const;
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C
index 5ce01e23b5763b36efa829f88efe013dcf7e3007..e2d1001504510890699b511ac04e6fc186057893 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -416,7 +416,7 @@ bool Foam::autoDensity::fillBox
 
             label nLine = 6*(surfRes_ - 2);
 
-            pointField linePoints(nLine, vector::zero);
+            pointField linePoints(nLine, Zero);
 
             scalarField lineSizes(nLine, 0.0);
 
@@ -532,7 +532,7 @@ bool Foam::autoDensity::fillBox
         pointField samplePoints
         (
             volRes_*volRes_*volRes_,
-            vector::zero
+            Zero
         );
 
         vector delta = span/volRes_;
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C
index 5c3bb699e2dfa221f835a36be8bda27751eb0fff..16a18de191d0cb19f1d91eedabc4ee715a97ad07 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ Foam::searchableBoxFeatures::features() const
     edgeNormals[11][0] = 3; edgeNormals[11][1] = 0;
 
     tmp<pointField> surfacePointsTmp(surface().points());
-    pointField& surfacePoints = surfacePointsTmp();
+    pointField& surfacePoints = surfacePointsTmp.ref();
 
     forAll(edgeDirections, eI)
     {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools/vectorTools.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools/vectorTools.H
index 71449770403acb6ac6d2fd6ce232ce56b53217ce..a4593e2eb6f7dad482f78638d41a2a15d47bf032 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools/vectorTools.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools/vectorTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ namespace vectorTools
     //- Test if a and b are parallel: a^b = 0
     //  Uses the cross product, so the tolerance is proportional to
     //  the sine of the angle between a and b in radians
-    template<typename T>
+    template<class T>
     bool areParallel
     (
         const Vector<T>& a,
@@ -67,7 +67,7 @@ namespace vectorTools
     //- Test if a and b are orthogonal: a.b = 0
     //  Uses the dot product, so the tolerance is proportional to
     //  the cosine of the angle between a and b in radians
-    template<typename T>
+    template<class T>
     bool areOrthogonal
     (
         const Vector<T>& a,
@@ -79,7 +79,7 @@ namespace vectorTools
     }
 
     //- Test if angle between a and b is acute: a.b > 0
-    template<typename T>
+    template<class T>
     bool areAcute
     (
         const Vector<T>& a,
@@ -90,7 +90,7 @@ namespace vectorTools
     }
 
     //- Test if angle between a and b is obtuse: a.b < 0
-    template<typename T>
+    template<class T>
     bool areObtuse
     (
         const Vector<T>& a,
@@ -101,7 +101,7 @@ namespace vectorTools
     }
 
     //- Calculate angle between a and b in radians
-    template<typename T>
+    template<class T>
     T cosPhi
     (
         const Vector<T>& a,
@@ -116,7 +116,7 @@ namespace vectorTools
     }
 
     //- Calculate angle between a and b in radians
-    template<typename T>
+    template<class T>
     T radAngleBetween
     (
         const Vector<T>& a,
@@ -131,7 +131,7 @@ namespace vectorTools
     }
 
     //- Calculate angle between a and b in degrees
-    template<typename T>
+    template<class T>
     T degAngleBetween
     (
         const Vector<T>& a,
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options
index 7aa621f26e126d3e3f8c07c0c6bd700821eea678..560ee3a7b834095eecf9b2a0e83d8d1e4d265474 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/Make/options
@@ -22,7 +22,7 @@ EXE_INC = \
     -I$(LIB_SRC)/dynamicMesh/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude \
     -I$(LIB_SRC)/sampling/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -IvectorTools
 
 EXE_LIBS = \
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C
index c83800e03133c255e590dcfbe90484e24a248b4b..fd8d6f1224a14d4e996bf2fab8b3bb20ec8ced7c 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMesh/foamyHexMesh.C
@@ -2,7 +2,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2011-2015 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2011-2016 OpenFOAM Foundation
     \\/      M anipulation   |
 -------------------------------------------------------------------------------
 License
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
         (
             100.0,      // max size ratio
             1e-9,       // intersection tolerance
-            autoPtr<writer<scalar> >(new vtkSetWriter<scalar>()),
+            autoPtr<writer<scalar>>(new vtkSetWriter<scalar>()),
             0.01,       // min triangle quality
             true
         );
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/Make/options
index 00d889c6c603f24a4dc4e96309926138039f0502..c7c5ebdb075974c98f3d4077c2718ad76d3cfab5 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/Make/options
@@ -11,7 +11,7 @@ EXE_INC = \
     -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
     -I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
     -I$(LIB_SRC)/edgeMesh/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
     -I$(LIB_SRC)/meshTools/lnInclude \
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
index bb8213fd46f6ccad65f52d59a4cdda445f2757ed..7861ce486184bdb79528375d0dcba2e3db6adf45 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
@@ -2,7 +2,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2012-2015 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2012-2016 OpenFOAM Foundation
     \\/      M anipulation   |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake
index 8d3e3840ef959988eb63f600cdf425f56e57e4f0..5a714fca98ceca95fa943f08f3a77de2da84e5b3 100755
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake
@@ -1,5 +1,8 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for compilation (at least for error catching)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 if [ -d "${FASTDUALOCTREE_SRC_PATH}" ]
@@ -7,4 +10,4 @@ then
     wmake
 fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options
index 18ce8326c785c59becb6ecae26b10d299abc3711..5cb1f8676ddc626dcede0ee8e65034f443e9a68a 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Make/options
@@ -9,7 +9,7 @@ EXE_INC = \
     -I$(FASTDUALOCTREE_SRC_PATH) \
     -I../conformalVoronoiMesh/lnInclude \
     -I$(LIB_SRC)/edgeMesh/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -I$(LIB_SRC)/fileFormats/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude \
     -I$(LIB_SRC)/meshTools/lnInclude
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C
index 515dc5e032a17838ac83a5bc8ae7e8ffd9192573..bffad658bbc7aa5868c430cb7563b6dc80fdab90 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/foamyHexMeshSurfaceSimplify.C
@@ -2,7 +2,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2012-2015 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2012-2016 OpenFOAM Foundation
     \\/      M anipulation   |
 -------------------------------------------------------------------------------
 License
@@ -229,7 +229,7 @@ public:
             //    start[i] = points[edges[i][0]];
             //    end[i] = points[edges[i][1]];
             //}
-            //Foam::List<Foam::List<pointIndexHit> > hitInfo;
+            //Foam::List<Foam::List<pointIndexHit>> hitInfo;
             //labelListList hitSurfaces;
             //searchableSurfacesQueries::findAllIntersections
             //(
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C
index f8cdecfd6fabc54fd46d2fd1995077b5a01e3049..9a56358064e86b8c482ab52f308366ac94ef7be1 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -749,212 +749,211 @@ void Foam::CV2D::newPoints()
     boundaryConform();
 
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Old Method
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-// for
-// (
-//     Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
-//     vit != finite_vertices_end();
-//     ++vit
-// )
-// {
-//     if (vit->internalPoint())
-//     {
-//         // Current dual-cell defining vertex ("centre")
-//         point2DFromPoint defVert0 = toPoint2D(vit->point());
-
-//         Triangulation::Edge_circulator ec = incident_edges(vit);
-//         Triangulation::Edge_circulator ecStart = ec;
-
-//         // Circulate around the edges to find the first which is not
-//         // infinite
-//         do
-//         {
-//             if (!is_infinite(ec)) break;
-//         } while (++ec != ecStart);
-
-//         // Store the start-end of the first non-infinte edge
-//         point2D de0 = toPoint2D(circumcenter(ec->first));
-
-//         // Keep track of the maximum edge length^2
-//         scalar maxEdgeLen2 = 0.0;
-
-//         // Keep track of the index of the longest edge
-//         label edgecd0i = -1;
-
-//         // Edge counter
-//         label edgei = 0;
-
-//         do
-//         {
-//             if (!is_infinite(ec))
-//             {
-//                 // Get the end of the current edge
-//                 point2D de1 = toPoint2D
-//                 (
-//                     circumcenter(ec->first->neighbor(ec->second))
-//                 );
-
-//                 // Store the current edge vector
-//                 edges[edgei] = de1 - de0;
-
-//                 // Store the edge mid-point in the vertices array
-//                 vertices[edgei] = 0.5*(de1 + de0);
-
-//                 // Move the current edge end into the edge start for the
-//                 // next iteration
-//                 de0 = de1;
-
-//                 // Keep track of the longest edge
-
-//                 scalar edgeLen2 = magSqr(edges[edgei]);
-
-//                 if (edgeLen2 > maxEdgeLen2)
-//                 {
-//                     maxEdgeLen2 = edgeLen2;
-//                     edgecd0i = edgei;
-//                 }
-
-//                 edgei++;
-//             }
-//         } while (++ec != ecStart);
-
-//         // Initialise cd0 such that the mesh will align
-//         // in in the x-y directions
-//         vector2D cd0(1, 0);
-
-//         if (meshControls().relaxOrientation())
-//         {
-//             // Get the longest edge from the array and use as the primary
-//             // direction of the coordinate system of the "square" cell
-//             cd0 = edges[edgecd0i];
-//         }
-
-//         if (meshControls().nearWallAlignedDist() > 0)
-//         {
-//             pointIndexHit pHit = qSurf_.tree().findNearest
-//             (
-//                 toPoint3D(defVert0),
-//                 meshControls().nearWallAlignedDist2()
-//             );
-
-//             if (pHit.hit())
-//             {
-//                 cd0 = toPoint2D(faceNormals[pHit.index()]);
-//             }
-//         }
-
-//         // Rotate by 45deg needed to create an averaging procedure which
-//         // encourages the cells to be square
-//         cd0 = vector2D(cd0.x() + cd0.y(), cd0.y() - cd0.x());
-
-//         // Normalise the primary coordinate direction
-//         cd0 /= mag(cd0);
-
-//         // Calculate the orthogonal coordinate direction
-//         vector2D cd1(-cd0.y(), cd0.x());
-
-
-//         // Restart the circulator
-//         ec = ecStart;
-
-//         // ... and the counter
-//         edgei = 0;
-
-//         // Initialise the displacement for the centre and sum-weights
-//         vector2D disp = vector2D::zero;
-//         scalar sumw = 0;
-
-//         do
-//         {
-//             if (!is_infinite(ec))
-//             {
-//                 // Pick up the current edge
-//                 const vector2D& ei = edges[edgei];
-
-//                 // Calculate the centre to edge-centre vector
-//                 vector2D deltai = vertices[edgei] - defVert0;
-
-//                 // Set the weight for this edge contribution
-//                 scalar w = 1;
-
-//                 if (meshControls().squares())
-//                 {
-//                     w = magSqr(deltai.x()*ei.y() - deltai.y()*ei.x());
-//                     // alternative weights
-//                     //w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
-//                     //w = magSqr(ei)*mag(deltai);
-
-//                     // Use the following for an ~square mesh
-//                     // Find the coordinate contributions for this edge delta
-//                     scalar cd0deltai = cd0 & deltai;
-//                     scalar cd1deltai = cd1 & deltai;
-
-//                     // Create a "square" displacement
-//                     if (mag(cd0deltai) > mag(cd1deltai))
-//                     {
-//                         disp += (w*cd0deltai)*cd0;
-//                     }
-//                     else
-//                     {
-//                         disp += (w*cd1deltai)*cd1;
-//                     }
-//                 }
-//                 else
-//                 {
-//                     // Use this for a hexagon/pentagon mesh
-//                     disp += w*deltai;
-//                 }
-
-//                 // Sum the weights
-//                 sumw += w;
-//             }
-//             else
-//             {
-//                 FatalErrorInFunction
-//                     << "Infinite triangle found in internal mesh"
-//                     << exit(FatalError);
-//             }
-
-//             edgei++;
-
-//         } while (++ec != ecStart);
-
-//         // Calculate the average displacement
-//         disp /= sumw;
-//         totalDisp += disp;
-//         totalDist += mag(disp);
-
-//         // Move the point by a fraction of the average displacement
-//         movePoint(vit, defVert0 + relaxation*disp);
-//     }
-// }
-
-// Info << "\nTotal displacement = " << totalDisp
-//      << " total distance = " << totalDist << endl;
-}
+    // Old Method
+    /*
+    for
+    (
+        Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
+        vit != finite_vertices_end();
+        ++vit
+    )
+    {
+        if (vit->internalPoint())
+        {
+            // Current dual-cell defining vertex ("centre")
+            point2DFromPoint defVert0 = toPoint2D(vit->point());
+
+            Triangulation::Edge_circulator ec = incident_edges(vit);
+            Triangulation::Edge_circulator ecStart = ec;
+
+            // Circulate around the edges to find the first which is not
+            // infinite
+            do
+            {
+                if (!is_infinite(ec)) break;
+            } while (++ec != ecStart);
+
+            // Store the start-end of the first non-infinte edge
+            point2D de0 = toPoint2D(circumcenter(ec->first));
+
+            // Keep track of the maximum edge length^2
+            scalar maxEdgeLen2 = 0.0;
+
+            // Keep track of the index of the longest edge
+            label edgecd0i = -1;
+
+            // Edge counter
+            label edgei = 0;
+
+            do
+            {
+                if (!is_infinite(ec))
+                {
+                    // Get the end of the current edge
+                    point2D de1 = toPoint2D
+                    (
+                        circumcenter(ec->first->neighbor(ec->second))
+                    );
+
+                    // Store the current edge vector
+                    edges[edgei] = de1 - de0;
+
+                    // Store the edge mid-point in the vertices array
+                    vertices[edgei] = 0.5*(de1 + de0);
+
+                    // Move the current edge end into the edge start for the
+                    // next iteration
+                    de0 = de1;
+
+                    // Keep track of the longest edge
+
+                    scalar edgeLen2 = magSqr(edges[edgei]);
+
+                    if (edgeLen2 > maxEdgeLen2)
+                    {
+                        maxEdgeLen2 = edgeLen2;
+                        edgecd0i = edgei;
+                    }
+
+                    edgei++;
+                }
+            } while (++ec != ecStart);
+
+            // Initialise cd0 such that the mesh will align
+            // in in the x-y directions
+            vector2D cd0(1, 0);
+
+            if (meshControls().relaxOrientation())
+            {
+                // Get the longest edge from the array and use as the primary
+                // direction of the coordinate system of the "square" cell
+                cd0 = edges[edgecd0i];
+            }
+
+            if (meshControls().nearWallAlignedDist() > 0)
+            {
+                pointIndexHit pHit = qSurf_.tree().findNearest
+                (
+                    toPoint3D(defVert0),
+                    meshControls().nearWallAlignedDist2()
+                );
+
+                if (pHit.hit())
+                {
+                    cd0 = toPoint2D(faceNormals[pHit.index()]);
+                }
+            }
+
+            // Rotate by 45deg needed to create an averaging procedure which
+            // encourages the cells to be square
+            cd0 = vector2D(cd0.x() + cd0.y(), cd0.y() - cd0.x());
+
+            // Normalise the primary coordinate direction
+            cd0 /= mag(cd0);
+
+            // Calculate the orthogonal coordinate direction
+            vector2D cd1(-cd0.y(), cd0.x());
+
+
+            // Restart the circulator
+            ec = ecStart;
+
+            // ... and the counter
+            edgei = 0;
+
+            // Initialise the displacement for the centre and sum-weights
+            vector2D disp = Zero;
+            scalar sumw = 0;
+
+            do
+            {
+                if (!is_infinite(ec))
+                {
+                    // Pick up the current edge
+                    const vector2D& ei = edges[edgei];
 
+                    // Calculate the centre to edge-centre vector
+                    vector2D deltai = vertices[edgei] - defVert0;
+
+                    // Set the weight for this edge contribution
+                    scalar w = 1;
+
+                    if (meshControls().squares())
+                    {
+                        w = magSqr(deltai.x()*ei.y() - deltai.y()*ei.x());
+                        // alternative weights
+                        //w = mag(deltai.x()*ei.y() - deltai.y()*ei.x());
+                        //w = magSqr(ei)*mag(deltai);
+
+                        // Use the following for an ~square mesh
+                        // Find the coordinate contributions for this edge delta
+                        scalar cd0deltai = cd0 & deltai;
+                        scalar cd1deltai = cd1 & deltai;
+
+                        // Create a "square" displacement
+                        if (mag(cd0deltai) > mag(cd1deltai))
+                        {
+                            disp += (w*cd0deltai)*cd0;
+                        }
+                        else
+                        {
+                            disp += (w*cd1deltai)*cd1;
+                        }
+                    }
+                    else
+                    {
+                        // Use this for a hexagon/pentagon mesh
+                        disp += w*deltai;
+                    }
+
+                    // Sum the weights
+                    sumw += w;
+                }
+                else
+                {
+                    FatalErrorInFunction
+                        << "Infinite triangle found in internal mesh"
+                        << exit(FatalError);
+                }
 
-//void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
-//{
-//    label pointI = 0;
-
-//    for
-//    (
-//        Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
-//        vit != finite_vertices_end();
-//        ++vit
-//    )
-//    {
-//        if (vit->internalPoint())
-//        {
-//            movePoint(vit, newPoints[pointI++]);
-//        }
-//    }
-//}
+                edgei++;
 
+            } while (++ec != ecStart);
+
+            // Calculate the average displacement
+            disp /= sumw;
+            totalDisp += disp;
+            totalDist += mag(disp);
+
+            // Move the point by a fraction of the average displacement
+            movePoint(vit, defVert0 + relaxation*disp);
+        }
+    }
+
+    Info << "\nTotal displacement = " << totalDisp
+         << " total distance = " << totalDist << endl;
+    */
+}
+
+/*
+void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
+{
+    label pointI = 0;
+
+    for
+    (
+        Triangulation::Finite_vertices_iterator vit = finite_vertices_begin();
+        vit != finite_vertices_end();
+        ++vit
+    )
+    {
+        if (vit->internalPoint())
+        {
+            movePoint(vit, newPoints[pointI++]);
+        }
+    }
+}
+*/
 
 void Foam::CV2D::write() const
 {
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H
index 9e04cdcbbfccfdee0bf2b9b24b481cec8bcd0847..70319d5088daadd10431ec3968b3ddbc44dab0f5 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H
@@ -31,7 +31,7 @@ inline Foam::label Foam::CV2D::insertPoint
     const label type
 )
 {
-    uint nVert = number_of_vertices();
+    unsigned int nVert = number_of_vertices();
 
     return insertPoint(toPoint(p), nVert, type);
 }
@@ -55,7 +55,7 @@ inline Foam::label Foam::CV2D::insertPoint
     const label type
 )
 {
-    uint nVert = number_of_vertices();
+    unsigned int nVert = number_of_vertices();
 
     Vertex_handle vh = insert(p);
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options
index 0c04fa99bee1ca5e70ae9d7e1114216a7971095d..1dace00f1e4cba029c9859eb4eb7c0b7f4aaa210 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options
@@ -21,7 +21,7 @@ EXE_INC = \
     -I$(LIB_SRC)/sampling/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude \
     -I$(LIB_SRC)/fileFormats/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -I/usr/include
 
 EXE_LIBS = \
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedFace.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedFace.H
index 571273d1fdfc669b1be85dd7f42a4eaf9f6dbf38..df02689057c32fd0cfb44fde26e4bc35f6c3975e 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedFace.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedFace.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ namespace CGAL
                        Class indexedFace Declaration
 \*---------------------------------------------------------------------------*/
 
-template<class Gt, class Fb=CGAL::Triangulation_face_base_2<Gt> >
+template<class Gt, class Fb=CGAL::Triangulation_face_base_2<Gt>>
 class indexedFace
 :
     public Fb
@@ -70,7 +70,7 @@ public:
     typedef typename Fb::Vertex_handle                   Vertex_handle;
     typedef typename Fb::Face_handle                     Face_handle;
 
-    template<typename TDS2>
+    template<class TDS2>
     struct Rebind_TDS
     {
         typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertex.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertex.H
index 83013847157f6ba24e5be7f684b6e2e6daad5372..c6f7512b5554ac178aed9c314b26d0743691bb29 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertex.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertex.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ bool outsideTriangle
                        Class indexedVertex Declaration
 \*---------------------------------------------------------------------------*/
 
-template<class Gt, class Vb=CGAL::Triangulation_vertex_base_2<Gt> >
+template<class Gt, class Vb=CGAL::Triangulation_vertex_base_2<Gt>>
 class indexedVertex
 :
     public Vb
@@ -105,7 +105,7 @@ public:
     typedef typename Vb::Face_handle        Face_handle;
     typedef typename Vb::Point              Point;
 
-    template<typename TDS2>
+    template<class TDS2>
     struct Rebind_TDS
     {
         typedef typename Vb::template Rebind_TDS<TDS2>::Other    Vb2;
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C
index 9220ca7bedf0e536115d674a86ad43e98fb5b7ad..e8caabad93c9ec0e086976345cc0b5f1d1cb598a 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ void Foam::shortEdgeFilter2D::addRegion
 
 void Foam::shortEdgeFilter2D::assignBoundaryPointRegions
 (
-    List<DynamicList<label> >& boundaryPointRegions
+    List<DynamicList<label>>& boundaryPointRegions
 ) const
 {
     forAllConstIter(EdgeMap<label>, mapEdgesRegion_, iter)
@@ -72,7 +72,7 @@ void Foam::shortEdgeFilter2D::assignBoundaryPointRegions
 void Foam::shortEdgeFilter2D::updateEdgeRegionMap
 (
     const MeshedSurface<face>& surfMesh,
-    const List<DynamicList<label> >& boundaryPtRegions,
+    const List<DynamicList<label>>& boundaryPtRegions,
     const labelList& surfPtToBoundaryPt,
     EdgeMap<label>& mapEdgesRegion,
     labelList& patchSizes
@@ -250,7 +250,7 @@ Foam::shortEdgeFilter2D::filter()
 
     // Check if the point is a boundary point. Flag if it is so that
     // it will not be deleted.
-    List<DynamicList<label> > boundaryPointRegions
+    List<DynamicList<label>> boundaryPointRegions
     (
         points.size(),
         DynamicList<label>()
@@ -426,7 +426,7 @@ Foam::shortEdgeFilter2D::filter()
 
     label totalNewPoints = points.size() - nPointsToRemove;
 
-    pointField newPoints(totalNewPoints, vector::zero);
+    pointField newPoints(totalNewPoints, Zero);
     labelList newPointNumbers(points.size(), -1);
     label numberRemoved = 0;
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.H
index 433b22f95dcbc48084f2940a056a07e726866ae9..66f055a377ea8fb6672b22c8e546235558a2fd0b 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.H
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,13 +78,13 @@ class shortEdgeFilter2D
 
         void assignBoundaryPointRegions
         (
-            List<DynamicList<label> >& boundaryPointRegions
+            List<DynamicList<label>>& boundaryPointRegions
         ) const;
 
         void updateEdgeRegionMap
         (
             const MeshedSurface<face>& surfMesh,
-            const List<DynamicList<label> >& boundaryPtRegions,
+            const List<DynamicList<label>>& boundaryPtRegions,
             const labelList& surfPtToBoundaryPt,
             EdgeMap<label>& mapEdgesRegion,
             labelList& patchSizes
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/Make/options b/applications/utilities/mesh/generation/snappyHexMesh/Make/options
index d62b82a23949f7d27e553f79820f900678fedfcb..465393696a45574cb5485414c0ba1b55e5514508 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/Make/options
+++ b/applications/utilities/mesh/generation/snappyHexMesh/Make/options
@@ -1,7 +1,7 @@
 EXE_INC = \
     /* -g -DFULLDEBUG -O0 */ \
     -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -I$(LIB_SRC)/meshTools/lnInclude \
     -I$(LIB_SRC)/fileFormats/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude \
@@ -22,4 +22,4 @@ EXE_LIBS = \
     -lfileFormats \
     -ldynamicMesh \
     -ldecompose \
-    -lautoMesh
+    -lsnappyHexMesh
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
index fddb75acfa6ccbdd8c096d641aa86430f33fc3f3..b73c1fbecc738793c8ae04e505a8a43c82f5ea37 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
+++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,9 @@ Description
 #include "argList.H"
 #include "Time.H"
 #include "fvMesh.H"
-#include "autoRefineDriver.H"
-#include "autoSnapDriver.H"
-#include "autoLayerDriver.H"
+#include "snappyRefineDriver.H"
+#include "snappySnapDriver.H"
+#include "snappyLayerDriver.H"
 #include "searchableSurfaces.H"
 #include "refinementSurfaces.H"
 #include "refinementFeatures.H"
@@ -108,11 +108,11 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
     labelList globalMaxLevel(surfI, 0);
     labelList globalLevelIncr(surfI, 0);
     PtrList<dictionary> globalPatchInfo(surfI);
-    List<Map<label> > regionMinLevel(surfI);
-    List<Map<label> > regionMaxLevel(surfI);
-    List<Map<label> > regionLevelIncr(surfI);
-    List<Map<scalar> > regionAngle(surfI);
-    List<Map<autoPtr<dictionary> > > regionPatchInfo(surfI);
+    List<Map<label>> regionMinLevel(surfI);
+    List<Map<label>> regionMaxLevel(surfI);
+    List<Map<label>> regionLevelIncr(surfI);
+    List<Map<scalar>> regionAngle(surfI);
+    List<Map<autoPtr<dictionary>>> regionPatchInfo(surfI);
 
     HashSet<word> unmatchedKeys(surfacesDict.toc());
 
@@ -302,8 +302,8 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
               + regionLevelIncr[surfI][iter.key()];
         }
 
-        const Map<autoPtr<dictionary> >& localInfo = regionPatchInfo[surfI];
-        forAllConstIter(Map<autoPtr<dictionary> >, localInfo, iter)
+        const Map<autoPtr<dictionary>>& localInfo = regionPatchInfo[surfI];
+        forAllConstIter(Map<autoPtr<dictionary>>, localInfo, iter)
         {
             label globalRegionI = regionOffset[surfI] + iter.key();
             patchInfo.set(globalRegionI, iter()().clone());
@@ -686,7 +686,7 @@ int main(int argc, char *argv[])
 //                    runTime,
 //                    IOobject::NO_READ
 //                ),
-//                xferMove<Field<vector> >(bb.points()()),
+//                xferMove<Field<vector>>(bb.points()()),
 //                faces.xfer(),
 //                owner.xfer(),
 //                neighbour.xfer()
@@ -884,9 +884,9 @@ int main(int argc, char *argv[])
     if (debugLevel > 0)
     {
         meshRefinement::debug   = debugLevel;
-        autoRefineDriver::debug = debugLevel;
-        autoSnapDriver::debug   = debugLevel;
-        autoLayerDriver::debug  = debugLevel;
+        snappyRefineDriver::debug = debugLevel;
+        snappySnapDriver::debug   = debugLevel;
+        snappyLayerDriver::debug  = debugLevel;
     }
 
     // Set file writing level
@@ -1061,7 +1061,7 @@ int main(int argc, char *argv[])
         (
             100.0,      // max size ratio
             1e-9,       // intersection tolerance
-            autoPtr<writer<scalar> >(new vtkSetWriter<scalar>()),
+            autoPtr<writer<scalar>>(new vtkSetWriter<scalar>()),
             0.01,       // min triangle quality
             true
         );
@@ -1368,7 +1368,7 @@ int main(int argc, char *argv[])
     // Add all information for all the remaining faceZones
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    HashTable<Pair<word> > faceZoneToPatches;
+    HashTable<Pair<word>> faceZoneToPatches;
     forAll(mesh.faceZones(), zoneI)
     {
         const word& fzName = mesh.faceZones()[zoneI].name();
@@ -1400,7 +1400,7 @@ int main(int argc, char *argv[])
 
     if (faceZoneToPatches.size())
     {
-        autoRefineDriver::addFaceZones
+        snappyRefineDriver::addFaceZones
         (
             meshRefiner,
             refineParams,
@@ -1493,7 +1493,7 @@ int main(int argc, char *argv[])
     {
         cpuTime timer;
 
-        autoRefineDriver refineDriver
+        snappyRefineDriver refineDriver
         (
             meshRefiner,
             decomposer,
@@ -1541,7 +1541,7 @@ int main(int argc, char *argv[])
     {
         cpuTime timer;
 
-        autoSnapDriver snapDriver
+        snappySnapDriver snapDriver
         (
             meshRefiner,
             globalToMasterPatch,
@@ -1592,7 +1592,7 @@ int main(int argc, char *argv[])
         // Layer addition parameters
         const layerParameters layerParams(layerDict, mesh.boundaryMesh());
 
-        autoLayerDriver layerDriver
+        snappyLayerDriver layerDriver
         (
             meshRefiner,
             globalToMasterPatch,
diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
index 98e97cb28197122eb771e02f358d0e01a7a378b0..da7a03aa49bcfe809ad609101aeab5ac7f113796 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
@@ -287,7 +287,7 @@ namespace Foam
                 label n = 0;
 
                 // Extract for every face the i'th position
-                pointField ptsAtIndex(pts.size(), vector::zero);
+                pointField ptsAtIndex(pts.size(), Zero);
                 forAll(cpp, faceI)
                 {
                     const pointField& facePts = pts[faceI];
diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
index 190ffef5449b06e8597667a518f3ffec060452d0..56380f04a7ea3327a50e891fa9cb3bcd4cff3d3b 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -538,7 +538,7 @@ Foam::label Foam::checkTopology
                     if (returnReduce(mp.size(), sumOp<label>()) > 0)
                     {
                         boundBox bb(point::max, point::min);
-                        forAll (mp, i)
+                        forAll(mp, i)
                         {
                             bb.min() = min(bb.min(), pts[mp[i]]);
                             bb.max() = max(bb.max(), pts[mp[i]]);
diff --git a/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C b/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C
index 1f9480a5c45ee071061c85b96a31d32b744b6598..f10405674d86fd2fa5a97717dfa4acc62667a112 100644
--- a/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C
+++ b/applications/utilities/mesh/manipulation/flattenMesh/flattenMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C
index 62ef9e13fde805a7b5262e9b72cb707709bef4d1..26c67575c7cb4f817fff123388ff79fefffb8ae8 100644
--- a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C
+++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
 
     masterMesh.write();
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/Make/options b/applications/utilities/mesh/manipulation/orientFaceZone/Make/options
index 30fde688e5aa0fe88f1940882bf0b5d3f888af9c..56e8dc4f1748e4297e3e770831a54074c6a0263c 100644
--- a/applications/utilities/mesh/manipulation/orientFaceZone/Make/options
+++ b/applications/utilities/mesh/manipulation/orientFaceZone/Make/options
@@ -1,9 +1,9 @@
 EXE_INC = \
     -I$(LIB_SRC)/meshTools/lnInclude \
-    -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
+    -I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
     -I$(LIB_SRC)/triSurface/lnInclude
 
 EXE_LIBS = \
     -lmeshTools \
-    -lautoMesh \
+    -lsnappyHexMesh \
     -ltriSurface
diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
index 1e92368b09e3bb8ad23dfde2766f7475d4937d94..5595138322f86b443f56bac466c1fa64048b8e80 100644
--- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
+++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -385,7 +385,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C
index ce6e15e9fa7df11c31cd1773ddd9042d989dba0d..ff34c2a92de9af067c2e419b20c90200df7e7a4f 100644
--- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C
+++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(meshDualiser, 0);
+    defineTypeNameAndDebug(meshDualiser, 0);
 }
 
 
@@ -123,8 +123,6 @@ void Foam::meshDualiser::dumpPolyTopoChange
 }
 
 
-//- Given cell and point on mesh finds the corresponding dualCell. Most
-//  points become only one cell but the feature points might be split.
 Foam::label Foam::meshDualiser::findDualCell
 (
     const label cellI,
@@ -146,8 +144,6 @@ Foam::label Foam::meshDualiser::findDualCell
 }
 
 
-// Helper function to generate dualpoints on all boundary edges emanating
-// from (boundary & feature) point
 void Foam::meshDualiser::generateDualBoundaryEdges
 (
     const PackedBoolList& isBoundaryEdge,
diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict b/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict
index 025eeba2db380df8d18e3e9df02efb5d57b24432..b3abf00ee4e3a198ffad536cd15f325b441cfda9 100644
--- a/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict
+++ b/applications/utilities/mesh/manipulation/refineMesh/refineMeshDict
@@ -22,8 +22,12 @@ set c0;
 //   x,y,z axis. Specify in globalCoeffs section below.
 // - patchLocal : coordinate system different for every cell. Specify in
 //   patchLocalCoeffs section below.
+// - fieldBased : uses the list of field names from the directions list for
+//   selecting the directions to cut. Meant to be used with geometricCut, but
+//   can also be used with useHexTopology.
 coordinateSystem global;
 //coordinateSystem patchLocal;
+//coordinateSystem fieldBased;
 
 // .. and its coefficients. x,y in this case. (normal direction is calculated
 // as tan1^tan2)
@@ -39,7 +43,7 @@ patchLocalCoeffs
     tan1 (1 0 0);
 }
 
-// List of directions to refine
+// List of directions to refine, if global or patchLocal
 directions
 (
     tan1
@@ -47,6 +51,15 @@ directions
     normal
 );
 
+// List of directions to refine, if "fieldBased". Keep in mind that these
+// fields must be of type "vectorField", not "volVectorField".
+//directions
+//(
+//    radialDirectionFieldName
+//    angularDirectionFieldName
+//    heightDirectionFieldName
+//);
+
 // Whether to use hex topology. This will
 // - if patchLocal: all cells on selected patch should be hex
 // - split all hexes in 2x2x2 through the middle of edges.
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
index 64641c22fd22ca806b0e6f3ea3130255e3fc2526..34b8b78d2f124a71d5ca66cbee1da2772ffaeeb5 100755
--- a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
+++ b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake
@@ -1,6 +1,10 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Parse arguments for compilation (at least for error catching)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+set -x
+
 export COMPILE_FLAGS=''
 export LINK_FLAGS=''
 
@@ -19,4 +23,4 @@ fi
 
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
index d9fd1daa6b7c1dd9b436881b967af7af8ba2a7e3..167afe59dd0e725c72709eb00e4fa33523e10fc7 100644
--- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
+++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ tmp<volScalarField> createScalarField
             zeroGradientFvPatchScalarField::typeName
         )
     );
-    volScalarField& fld = tfld();
+    volScalarField& fld = tfld.ref();
 
     forAll(fld, cellI)
     {
@@ -1456,7 +1456,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C b/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C
index ae534f9a5925a4dc67ff059b45720d593c5fb6dc..fb49b074fa48d45a0eef26c94028e03ed2aef4af 100644
--- a/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C
+++ b/applications/utilities/mesh/manipulation/rotateMesh/rotateMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,7 @@ int main(int argc, char *argv[])
         RotateFields<surfaceTensorField>(mesh, objects, T);
     }
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake
index c651ba841fb473c8c15724a41dccb46eb92aac1a..2822be02b89230d4f434c95dd248e978b553cfba 100755
--- a/applications/utilities/mesh/manipulation/setSet/Allwmake
+++ b/applications/utilities/mesh/manipulation/setSet/Allwmake
@@ -1,6 +1,9 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Parse arguments for compilation (at least for error catching)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+
 unset COMP_FLAGS LINK_FLAGS
 
 #
@@ -15,4 +18,4 @@ fi
 
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C
index 07b146f67460a507739769b21d713f39eded9061..1cd3ad69586db3f0fc5d4b2e479d2c7247cd2cc8 100644
--- a/applications/utilities/mesh/manipulation/setSet/setSet.C
+++ b/applications/utilities/mesh/manipulation/setSet/setSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -847,12 +847,12 @@ int main(int argc, char *argv[])
     printAllSets(mesh, Info);
 
     // Read history if interactive
-#   ifdef HAS_READLINE
+    #ifdef HAS_READLINE
     if (!batch && !read_history((runTime.path()/historyFile).c_str()))
     {
         Info<< "Successfully read history from " << historyFile << endl;
     }
-#   endif
+    #endif
 
 
     // Exit status
@@ -929,7 +929,7 @@ int main(int argc, char *argv[])
             }
             else
             {
-#               ifdef HAS_READLINE
+                #ifdef HAS_READLINE
                 {
                     char* linePtr = readline("readline>");
 
@@ -950,7 +950,7 @@ int main(int argc, char *argv[])
                         break;
                     }
                 }
-#               else
+                #else
                 {
                     if (!std::cin.good())
                     {
@@ -961,7 +961,7 @@ int main(int argc, char *argv[])
                     Info<< "Command>" << flush;
                     std::getline(std::cin, rawLine);
                 }
-#               endif
+                #endif
             }
 
             // Strip off anything after #
@@ -1029,7 +1029,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return status;
 }
diff --git a/applications/utilities/mesh/manipulation/setSet/writeFuns.C b/applications/utilities/mesh/manipulation/setSet/writeFuns.C
index 6363a485aab0c1e649fdb5a05de610807a6c3774..720a6dff9427b591f4728c5d016e2be3c6791462 100644
--- a/applications/utilities/mesh/manipulation/setSet/writeFuns.C
+++ b/applications/utilities/mesh/manipulation/setSet/writeFuns.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,19 +26,19 @@ License
 #include "writeFuns.H"
 
 #if defined(__mips)
-#include <standards.h>
-#include <sys/endian.h>
+    #include <standards.h>
+    #include <sys/endian.h>
 #endif
 
 #if defined(LITTLE_ENDIAN) \
  || defined(_LITTLE_ENDIAN) \
  || defined(__LITTLE_ENDIAN)
-#   define LITTLEENDIAN 1
+    #define LITTLEENDIAN 1
 #elif defined(BIG_ENDIAN) || defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN)
-#   undef LITTLEENDIAN
+    #undef LITTLEENDIAN
 #else
-#   error "Cannot find LITTLE_ENDIAN or BIG_ENDIAN symbol defined."
-#   error "Please add to compilation options"
+    #error "Cannot find LITTLE_ENDIAN or BIG_ENDIAN symbol defined."
+    #error "Please add to compilation options"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C
index da157f757731e43ccef627c57c1d8067507f953a..8b23cfe5cd5a6e49711056c2c3c7e68b055d1a5c 100644
--- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C
+++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -333,7 +333,7 @@ int main(int argc, char *argv[])
             << exit(FatalError);
     }
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C
index 3171ed5e8610919a7001cd1d67e0701a2b121c82..5cac0dad7d9d9405487997f0bd2992f842f52ce0 100644
--- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C
+++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
index b44a3cfe7fab63293f2135c52b02a3b84b8435a2..529153f812886292e1cd390eb318316c4283d40c 100644
--- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
+++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -181,8 +181,8 @@ void subsetVolFields
         {
             if (addedPatches.found(patchI))
             {
-                tSubFld().boundaryField()[patchI] ==
-                    pTraits<typename GeoField::value_type>::zero;
+                tSubFld.ref().boundaryField()[patchI] ==
+                    typename GeoField::value_type(Zero);
             }
         }
 
@@ -235,8 +235,8 @@ void subsetSurfaceFields
         {
             if (addedPatches.found(patchI))
             {
-                tSubFld().boundaryField()[patchI] ==
-                    pTraits<typename GeoField::value_type>::zero;
+                tSubFld.ref().boundaryField()[patchI] ==
+                    typename GeoField::value_type(Zero);
             }
         }
 
@@ -269,7 +269,7 @@ void addToInterface
     const label zoneID,
     const label ownRegion,
     const label neiRegion,
-    EdgeMap<Map<label> >& regionsToSize
+    EdgeMap<Map<label>>& regionsToSize
 )
 {
     edge interface
@@ -278,7 +278,7 @@ void addToInterface
         max(ownRegion, neiRegion)
     );
 
-    EdgeMap<Map<label> >::iterator iter = regionsToSize.find
+    EdgeMap<Map<label>>::iterator iter = regionsToSize.find
     (
         interface
     );
@@ -318,14 +318,14 @@ void getInterfaceSizes
     const wordList& regionNames,
 
     edgeList& interfaces,
-    List<Pair<word> >& interfaceNames,
+    List<Pair<word>>& interfaceNames,
     labelList& interfaceSizes,
     labelList& faceToInterface
 )
 {
     // From region-region to faceZone (or -1) to number of faces.
 
-    EdgeMap<Map<label> > regionsToSize;
+    EdgeMap<Map<label>> regionsToSize;
 
 
     // Internal faces
@@ -396,11 +396,11 @@ void getInterfaceSizes
             {
                 IPstream fromSlave(Pstream::blocking, slave);
 
-                EdgeMap<Map<label> > slaveSizes(fromSlave);
+                EdgeMap<Map<label>> slaveSizes(fromSlave);
 
-                forAllConstIter(EdgeMap<Map<label> >, slaveSizes, slaveIter)
+                forAllConstIter(EdgeMap<Map<label>>, slaveSizes, slaveIter)
                 {
-                    EdgeMap<Map<label> >::iterator masterIter =
+                    EdgeMap<Map<label>>::iterator masterIter =
                         regionsToSize.find(slaveIter.key());
 
                     if (masterIter != regionsToSize.end())
@@ -454,7 +454,7 @@ void getInterfaceSizes
     // Now we have the global sizes of all inter-regions.
     // Invert this on master and distribute.
     label nInterfaces = 0;
-    forAllConstIter(EdgeMap<Map<label> >, regionsToSize, iter)
+    forAllConstIter(EdgeMap<Map<label>>, regionsToSize, iter)
     {
         const Map<label>& info = iter();
         nInterfaces += info.size();
@@ -463,10 +463,10 @@ void getInterfaceSizes
     interfaces.setSize(nInterfaces);
     interfaceNames.setSize(nInterfaces);
     interfaceSizes.setSize(nInterfaces);
-    EdgeMap<Map<label> > regionsToInterface(nInterfaces);
+    EdgeMap<Map<label>> regionsToInterface(nInterfaces);
 
     nInterfaces = 0;
-    forAllConstIter(EdgeMap<Map<label> >, regionsToSize, iter)
+    forAllConstIter(EdgeMap<Map<label>>, regionsToSize, iter)
     {
         const edge& e = iter.key();
         const word& name0 = regionNames[e[0]];
@@ -1059,7 +1059,7 @@ labelList addRegionPatches
     fvMesh& mesh,
     const wordList& regionNames,
     const edgeList& interfaces,
-    const List<Pair<word> >& interfaceNames
+    const List<Pair<word>>& interfaceNames
 )
 {
     Info<< nl << "Adding patches" << nl << endl;
@@ -1792,7 +1792,7 @@ int main(int argc, char *argv[])
     // - the name
     // - the (global) size
     edgeList interfaces;
-    List<Pair<word> > interfaceNames;
+    List<Pair<word>> interfaceNames;
     labelList interfaceSizes;
     // per face the interface
     labelList faceToInterface;
diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
index 2e1fc21747efeef21ee0f72514a80a4bf767e6cb..1902f1543d473fad84c31b22d06f4a04327f2abf 100644
--- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
+++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
index 358cbb3ddf062b48ba9f313d58f69778f6de6cd0..c158b748421dea4b04c32b56be953eb491f49907 100644
--- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
+++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ void subsetVolFields
 (
     const fvMeshSubset& subsetter,
     const wordList& fieldNames,
-    PtrList<GeometricField<Type, fvPatchField, volMesh> >& subFields
+    PtrList<GeometricField<Type, fvPatchField, volMesh>>& subFields
 )
 {
     const fvMesh& baseMesh = subsetter.baseMesh();
@@ -161,7 +161,7 @@ void subsetSurfaceFields
 (
     const fvMeshSubset& subsetter,
     const wordList& fieldNames,
-    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& subFields
+    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& subFields
 )
 {
     const fvMesh& baseMesh = subsetter.baseMesh();
@@ -196,7 +196,7 @@ void subsetPointFields
     const fvMeshSubset& subsetter,
     const pointMesh& pMesh,
     const wordList& fieldNames,
-    PtrList<GeometricField<Type, pointPatchField, pointMesh> >& subFields
+    PtrList<GeometricField<Type, pointPatchField, pointMesh>>& subFields
 )
 {
     const fvMesh& baseMesh = subsetter.baseMesh();
@@ -230,7 +230,7 @@ void subsetDimensionedFields
 (
     const fvMeshSubset& subsetter,
     const wordList& fieldNames,
-    PtrList<DimensionedField<Type, volMesh> >& subFields
+    PtrList<DimensionedField<Type, volMesh>>& subFields
 )
 {
     const fvMesh& baseMesh = subsetter.baseMesh();
@@ -681,7 +681,7 @@ int main(int argc, char *argv[])
     }
 
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSet.C b/applications/utilities/mesh/manipulation/topoSet/topoSet.C
index 4112e4df19fc7da068b38ab8041e7663ca285928..8f368f1b3f6f06e06ec58304fa29915d0247d0c3 100644
--- a/applications/utilities/mesh/manipulation/topoSet/topoSet.C
+++ b/applications/utilities/mesh/manipulation/topoSet/topoSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -370,7 +370,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    Info<< "\nEnd\n" << endl;
+    Info<< "End\n" << endl;
 
     return 0;
 }
diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
index 21d4770b4998799be5b129001e8f80505d7ca6ee..cfddb19c2eae539c5df1947a4e060d21a02b50b4 100644
--- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
+++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -256,7 +256,7 @@ int main(int argc, char *argv[])
         // Convert to radians
         v *= pi/180.0;
 
-        quaternion R(v.x(), v.y(), v.z());
+        quaternion R(quaternion::rotationSequence::XYZ, v);
 
         Info<< "Rotating points by quaternion " << R << endl;
         points = transform(R, points);
diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options
index 2324ff61d041f5223e891040930416e2a7cc053e..0a415b6bfbd4a1a947ba3cdf1719e1f978ffb34c 100644
--- a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options
+++ b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options
@@ -1,5 +1,5 @@
 EXE_LIBS = \
-    -lautoMesh \
+    -lsnappyHexMesh \
     -lbarotropicCompressibilityModel \
     -lsolidThermo \
     -lcompressibleTransportModels \
diff --git a/applications/utilities/miscellaneous/foamHelp/Allwclean b/applications/utilities/miscellaneous/foamHelp/Allwclean
index 01d5bfd9f352b783d57e3eb023fe8b14593c2e7b..68cf4d8151832d800aad06124c2daf2869adc6cb 100755
--- a/applications/utilities/miscellaneous/foamHelp/Allwclean
+++ b/applications/utilities/miscellaneous/foamHelp/Allwclean
@@ -5,4 +5,4 @@ wclean libso helpTypes
 wclean
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/miscellaneous/foamHelp/Allwmake b/applications/utilities/miscellaneous/foamHelp/Allwmake
index 2c999bf34b4da2f7ae181e4264e15792fe5cf527..2c97cd692f03237771bfcf252e02217d8c724bc6 100755
--- a/applications/utilities/miscellaneous/foamHelp/Allwmake
+++ b/applications/utilities/miscellaneous/foamHelp/Allwmake
@@ -1,8 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-wmake libso helpTypes
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+set -x
+
+wmake $targetType helpTypes
 wmake
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C
index b77feaff347a20d73ea4340f05d83b9af06d7943..0de175b4b7053d4d7c3c55a5a3c91645e568c6f7 100644
--- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C
+++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,23 +39,32 @@ Foam::doxygenXmlParser::doxygenXmlParser
 :
     dictionary(dictionary::null)
 {
-    const wordRe nameRegEx(".*." + ext, wordRe::DETECT);
-    const wordRe searchRegEx(searchStr, wordRe::DETECT);
+    // Pre-construct and compile regular expressions
+    const wordRe nameRe(".*.H", wordRe::DETECT);
+    const wordRe searchStrRe(searchStr, wordRe::DETECT);
+
+    // Pre-construct constant strings and names to speed-up comparisons
+    const string slashStartTag('/' + startTag);
+    const string kindFileStr("kind=\"file\"");
+    const word compoundWord("compound");
+    const word nameWord("name");
+    const word pathWord("path");
+    const word filenameWord("filename");
 
     IFstream is(fName);
 
-    char c;
-
-    // skip forward to entry name
+    // Skip forward to entry name
     skipForward(is, startTag);
 
+    char c;
+
     while (is.get(c))
     {
         if (c == '<')
         {
-            // if in block, read block name
-            string blockName = "";
-            string params = "";
+            // If in block, read block name
+            string blockName;
+            string params;
             bool readingParam = false;
             while (is.get(c)  && c != '>')
             {
@@ -76,17 +85,17 @@ Foam::doxygenXmlParser::doxygenXmlParser
                 }
             }
 
-            if (blockName == '/' + startTag)
+            if (blockName == slashStartTag)
             {
                 break;
             }
 
-            if ((blockName == "compound") && (params == "kind=\"file\""))
+            if ((blockName == compoundWord) && (params == kindFileStr))
             {
-                // keep entry
-                word name = "";
-                fileName path = "";
-                word fName = "";
+                // Keep entry
+                word name;
+                fileName path;
+                word fName;
                 bool foundName = false;
                 bool foundPath = false;
                 bool foundFName = false;
@@ -95,36 +104,35 @@ Foam::doxygenXmlParser::doxygenXmlParser
                 {
                     word entryName;
                     getEntry<word>(is, entryName);
-                    if (entryName == "name")
+                    if (entryName == nameWord)
                     {
                         getValue<word>(is, name);
-
-                        if (nameRegEx.match(name))
+                        if (nameRe.match(name))
                         {
                             foundName = true;
                         }
                         else
                         {
-                            // not interested in this compound
+                            // Not interested in this compound
                             break;
                         }
                     }
-                    else if (entryName == "path")
+                    else if (entryName == pathWord)
                     {
                         getValue<fileName>(is, path);
 
-                        // filter path on regExp
-                        if (searchRegEx.match(path))
+                        // Filter path on regExp
+                        if (searchStrRe.match(path))
                         {
                             foundPath = true;
                         }
                         else
                         {
-                            // not interested in this compound
+                            // Not interested in this compound
                             break;
                         }
                     }
-                    else if (entryName == "filename")
+                    else if (entryName == filenameWord)
                     {
                         getValue<word>(is, fName);
                         foundFName = true;
@@ -139,7 +147,7 @@ Foam::doxygenXmlParser::doxygenXmlParser
                 {
                     word tName(path.components().last());
 
-                    // only insert if type is not already known
+                    // Only insert if type is not already known
                     // NOTE: not ideal for cases where there are multiple types
                     //    but contained within different namespaces
                     //    preferentially take exact match if it exists
@@ -166,7 +174,7 @@ Foam::doxygenXmlParser::doxygenXmlParser
                     }
                 }
 
-                // skip remanining entries
+                // Skip remanining entries
                 skipBlock(is, blockName);
             }
             else
@@ -186,17 +194,17 @@ void Foam::doxygenXmlParser::skipBlock
     const word& blockName
 ) const
 {
-    // recurse to move forward in 'is' until come across </blockName>
-    string closeName = "";
+    // Recurse to move forward in 'is' until come across </blockName>
+    string closeName;
 
     char c;
     while (is.good() && (closeName != blockName))
     {
-        // fast-forward until we reach a '<'
+        // Fast-forward until we reach a '<'
         while (is.get(c) && c  != '<')
         {}
 
-        // check to see if this is a closing block
+        // Check to see if this is a closing block
         if (is.get(c) && c  == '/')
         {
             closeName = "";
@@ -216,7 +224,7 @@ void Foam::doxygenXmlParser::skipForward
     const word& blockName
 ) const
 {
-    // recurse to move forward in 'is' until come across <blockName>
+    // Recurse to move forward in 'is' until come across <blockName>
     string entryName = "";
     char c;
 
@@ -224,7 +232,7 @@ void Foam::doxygenXmlParser::skipForward
     {
         entryName = "";
 
-        // fast-forward until we reach a '<'
+        // Fast-forward until we reach a '<'
         while (is.get(c) && c != '<')
         {}
 
@@ -237,4 +245,3 @@ void Foam::doxygenXmlParser::skipForward
 
 
 // ************************************************************************* //
-
diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C
index 15ef8f484800818decc76c27c4aa4e921154fd78..ec53cb414dc14c67533907ad951cdd78db89bbf9 100644
--- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C
+++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ void Foam::helpTypes::helpBoundary::fixedValueFieldConditions
             false
         ),
         mesh,   
-        dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
+        dimensioned<Type>("zero", dimless, Zero)
     );
 
 
@@ -125,7 +125,7 @@ void Foam::helpTypes::helpBoundary::fixedValueFieldConditions
 
             fvPatch fvp(pp, mesh.boundary());
 
-            tmp<fvPatchField<Type> > pf
+            tmp<fvPatchField<Type>> pf
             (
                 fvPatchField<Type>::New
                 (
diff --git a/applications/utilities/miscellaneous/patchSummary/patchSummary.C b/applications/utilities/miscellaneous/patchSummary/patchSummary.C
index 7682893b13cd9adc371ceb022bd30348674ecc3a..074774676a9115cc23ef6d578f6009942c573c80 100644
--- a/applications/utilities/miscellaneous/patchSummary/patchSummary.C
+++ b/applications/utilities/miscellaneous/patchSummary/patchSummary.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -152,9 +152,9 @@ int main(int argc, char *argv[])
             // patches.
 
             // Per 'group', the map from fieldname to patchfield type
-            DynamicList<HashTable<word> > fieldToTypes(bm.size());
+            DynamicList<HashTable<word>> fieldToTypes(bm.size());
             // Per 'group' the patches
-            DynamicList<DynamicList<label> > groupToPatches(bm.size());
+            DynamicList<DynamicList<label>> groupToPatches(bm.size());
             forAll(bm, patchI)
             {
                 HashTable<word> fieldToType;
diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
index 21a38d80beaf42946df5c2b20aa05f32ffe31742..06d35e8748e040a639c797092e2d640101b01bac 100644
--- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
+++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -422,8 +422,7 @@ int main(int argc, char *argv[])
                         IOobject::AUTO_WRITE
                     ),
                     mesh,
-                    dimensionedScalar("cellDist", dimless, 0),
-                    zeroGradientFvPatchScalarField::typeName
+                    dimensionedScalar("cellDist", dimless, 0)
                 );
 
                 forAll(procIds, celli)
@@ -484,16 +483,16 @@ int main(int argc, char *argv[])
 
             // Construct the dimensioned fields
             // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-            PtrList<DimensionedField<scalar, volMesh> > dimScalarFields;
+            PtrList<DimensionedField<scalar, volMesh>> dimScalarFields;
             readFields(mesh, objects, dimScalarFields);
-            PtrList<DimensionedField<vector, volMesh> > dimVectorFields;
+            PtrList<DimensionedField<vector, volMesh>> dimVectorFields;
             readFields(mesh, objects, dimVectorFields);
-            PtrList<DimensionedField<sphericalTensor, volMesh> >
+            PtrList<DimensionedField<sphericalTensor, volMesh>>
                 dimSphericalTensorFields;
             readFields(mesh, objects, dimSphericalTensorFields);
-            PtrList<DimensionedField<symmTensor, volMesh> > dimSymmTensorFields;
+            PtrList<DimensionedField<symmTensor, volMesh>> dimSymmTensorFields;
             readFields(mesh, objects, dimSymmTensorFields);
-            PtrList<DimensionedField<tensor, volMesh> > dimTensorFields;
+            PtrList<DimensionedField<tensor, volMesh>> dimTensorFields;
             readFields(mesh, objects, dimTensorFields);
 
 
@@ -536,64 +535,64 @@ int main(int argc, char *argv[])
             );
 
             // Particles
-            PtrList<Cloud<indexedParticle> > lagrangianPositions
+            PtrList<Cloud<indexedParticle>> lagrangianPositions
             (
                 cloudDirs.size()
             );
             // Particles per cell
-            PtrList< List<SLList<indexedParticle*>*> > cellParticles
+            PtrList<List<SLList<indexedParticle*>*>> cellParticles
             (
                 cloudDirs.size()
             );
 
-            PtrList<PtrList<labelIOField> > lagrangianLabelFields
+            PtrList<PtrList<labelIOField>> lagrangianLabelFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<labelFieldCompactIOField> >
+            PtrList<PtrList<labelFieldCompactIOField>>
             lagrangianLabelFieldFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<scalarIOField> > lagrangianScalarFields
+            PtrList<PtrList<scalarIOField>> lagrangianScalarFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<scalarFieldCompactIOField> >
+            PtrList<PtrList<scalarFieldCompactIOField>>
             lagrangianScalarFieldFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<vectorIOField> > lagrangianVectorFields
+            PtrList<PtrList<vectorIOField>> lagrangianVectorFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<vectorFieldCompactIOField> >
+            PtrList<PtrList<vectorFieldCompactIOField>>
             lagrangianVectorFieldFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<sphericalTensorIOField> >
+            PtrList<PtrList<sphericalTensorIOField>>
             lagrangianSphericalTensorFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<sphericalTensorFieldCompactIOField> >
+            PtrList<PtrList<sphericalTensorFieldCompactIOField>>
                 lagrangianSphericalTensorFieldFields(cloudDirs.size());
-            PtrList<PtrList<symmTensorIOField> > lagrangianSymmTensorFields
+            PtrList<PtrList<symmTensorIOField>> lagrangianSymmTensorFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<symmTensorFieldCompactIOField> >
+            PtrList<PtrList<symmTensorFieldCompactIOField>>
             lagrangianSymmTensorFieldFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<tensorIOField> > lagrangianTensorFields
+            PtrList<PtrList<tensorIOField>> lagrangianTensorFields
             (
                 cloudDirs.size()
             );
-            PtrList<PtrList<tensorFieldCompactIOField> >
+            PtrList<PtrList<tensorFieldCompactIOField>>
             lagrangianTensorFieldFields
             (
                 cloudDirs.size()
diff --git a/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposer.H b/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposer.H
index ad04f4689ecb9b4c468489a1fbb3645b7e59279e..ee4fc1d77714b3243cf88888a5793d61194f8d91 100644
--- a/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposer.H
+++ b/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ public:
 
         //- Decompose field
         template<class Type>
-        tmp<DimensionedField<Type, volMesh> > decomposeField
+        tmp<DimensionedField<Type, volMesh>> decomposeField
         (
             const DimensionedField<Type, volMesh>& field
         ) const;
diff --git a/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposerDecomposeFields.C
index 701f91780d77acf7cc12512f1d69a868798191a8..dcdebc31d81fdd4da7f838c4c14e61c57982a052 100644
--- a/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposerDecomposeFields.C
+++ b/applications/utilities/parallelProcessing/decomposePar/dimFieldDecomposerDecomposeFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>>
 Foam::dimFieldDecomposer::decomposeField
 (
     const DimensionedField<Type, volMesh>& field
@@ -38,7 +38,7 @@ Foam::dimFieldDecomposer::decomposeField
     Field<Type> mappedField(field, cellAddressing_);
 
     // Create the field for the processor
-    return tmp<DimensionedField<Type, volMesh> >
+    return tmp<DimensionedField<Type, volMesh>>
     (
         new DimensionedField<Type, volMesh>
         (
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
index 5588ac3a4909049470c0504d73dcc71ff2d4b3e4..62f972f1c1ccf51d3a5d9bf7f5785ae3a4a1cde0 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -416,29 +416,12 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
         label nInterProcPatches = 0;
         forAll(curSubPatchIDs, procPatchI)
         {
-            //Info<< "For processor " << procI
-            //    << " have to destination processor "
-            //    << curNeighbourProcessors[procPatchI] << endl;
-            //
-            //forAll(curSubPatchIDs[procPatchI], i)
-            //{
-            //    Info<< "    from patch:" << curSubPatchIDs[procPatchI][i]
-            //        << " starting at:" << curSubStarts[procPatchI][i]
-            //        << endl;
-            //}
-
             nInterProcPatches += curSubPatchIDs[procPatchI].size();
         }
 
-        //Info<< "For processor " << procI
-        //    << " have " << nInterProcPatches
-        //    << " patches to neighbouring processors" << endl;
-
-
         List<polyPatch*> procPatches
         (
-            curPatchSizes.size()
-          + nInterProcPatches,          //curProcessorPatchSizes.size(),
+            curPatchSizes.size() + nInterProcPatches,
             reinterpret_cast<polyPatch*>(0)
         );
 
@@ -489,22 +472,12 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
                   : curProcessorPatchSizes[procPatchI] - subStarts[i]
                 );
 
-//                Info<< "From processor:" << procI << endl
-//                    << "  to processor:" << curNeighbourProcessors[procPatchI]
-//                    << endl
-//                    << "    via patch:" << subPatchID[i] << endl
-//                    << "    start    :" << curStart << endl
-//                    << "    size     :" << size << endl;
-
                 if (subPatchID[i] == -1)
                 {
                     // From internal faces
                     procPatches[nPatches] =
                         new processorPolyPatch
                         (
-                            word("procBoundary") + Foam::name(procI)
-                          + "to"
-                          + Foam::name(curNeighbourProcessors[procPatchI]),
                             size,
                             curStart,
                             nPatches,
@@ -521,24 +494,16 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
                               boundaryMesh()[subPatchID[i]]
                           );
 
-                    // From cyclic
-                    const word& referPatch = pcPatch.name();
-
                     procPatches[nPatches] =
                         new processorCyclicPolyPatch
                         (
-                            word("procBoundary") + Foam::name(procI)
-                          + "to"
-                          + Foam::name(curNeighbourProcessors[procPatchI])
-                          + "through"
-                          + referPatch,
                             size,
                             curStart,
                             nPatches,
                             procMesh.boundaryMesh(),
                             procI,
                             curNeighbourProcessors[procPatchI],
-                            referPatch,
+                            pcPatch.name(),
                             pcPatch.transform()
                         );
                 }
@@ -549,16 +514,6 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
             }
         }
 
-
-        //forAll(procPatches, patchI)
-        //{
-        //    Pout<< "    " << patchI
-        //        << '\t' << "name:" << procPatches[patchI]->name()
-        //        << '\t' << "type:" << procPatches[patchI]->type()
-        //        << '\t' << "size:" << procPatches[patchI]->size()
-        //        << endl;
-        //}
-
         // Add boundary patches
         procMesh.addPatches(procPatches);
 
@@ -571,7 +526,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
             // Go through all the zoned points and find out if they
             // belong to a zone.  If so, add it to the zone as
             // necessary
-            List<DynamicList<label> > zonePoints(pz.size());
+            List<DynamicList<label>> zonePoints(pz.size());
 
             // Estimate size
             forAll(zonePoints, zoneI)
@@ -637,8 +592,8 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
             // Go through all the zoned face and find out if they
             // belong to a zone.  If so, add it to the zone as
             // necessary
-            List<DynamicList<label> > zoneFaces(fz.size());
-            List<DynamicList<bool> > zoneFaceFlips(fz.size());
+            List<DynamicList<label>> zoneFaces(fz.size());
+            List<DynamicList<bool>> zoneFaceFlips(fz.size());
 
             // Estimate size
             forAll(zoneFaces, zoneI)
@@ -731,7 +686,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
             // Go through all the zoned cells and find out if they
             // belong to a zone.  If so, add it to the zone as
             // necessary
-            List<DynamicList<label> > zoneCells(cz.size());
+            List<DynamicList<label>> zoneCells(cz.size());
 
             // Estimate size
             forAll(zoneCells, zoneI)
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H
index 1acae6123af3accfe03b178f595e8f3aa24bb1c0..21b34f22ac8c08384ff42aec4e896793f9e02cf9 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ class domainDecomposition
         // indices will be incremented by 1 and the decremented as
         // necessary to avoid the problem of face number zero having no
         // sign.
-        List<DynamicList<label> > procFaceAddressing_;
+        List<DynamicList<label>> procFaceAddressing_;
 
         //- Labels of cells for each processor
         labelListList procCellAddressing_;
@@ -137,17 +137,17 @@ class domainDecomposition
             const label ownerProc,
             const label nbrProc,
 
-            List<Map<label> >&,
-            List<DynamicList<DynamicList<label> > >&
+            List<Map<label>>&,
+            List<DynamicList<DynamicList<label>>>&
         ) const;
 
         //- Generate sub patch info for processor cyclics
-        template <class BinaryOp>
+        template<class BinaryOp>
         void processInterCyclics
         (
             const polyBoundaryMesh& patches,
-            List<DynamicList<DynamicList<label> > >& interPatchFaces,
-            List<Map<label> >& procNbrToInterPatch,
+            List<DynamicList<DynamicList<label>>>& interPatchFaces,
+            List<Map<label>>& procNbrToInterPatch,
             List<labelListList>& subPatchIDs,
             List<labelListList>& subPatchStarts,
             bool owner,
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
index f5a767225c3e986989a2b84f21748b7eaf0294bf..efcfc82ebd8372855d7a550ff3e1cc3f25faebdd 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,8 +51,8 @@ void Foam::domainDecomposition::addInterProcFace
     const label ownerProc,
     const label nbrProc,
 
-    List<Map<label> >& nbrToInterPatch,
-    List<DynamicList<DynamicList<label> > >& interPatchFaces
+    List<Map<label>>& nbrToInterPatch,
+    List<DynamicList<DynamicList<label>>>& interPatchFaces
 ) const
 {
     Map<label>::iterator patchIter = nbrToInterPatch[ownerProc].find(nbrProc);
@@ -209,10 +209,10 @@ void Foam::domainDecomposition::decomposeMesh()
 
     // Per processor, from neighbour processor to the inter-processor patch
     // that communicates with that neighbour
-    List<Map<label> > procNbrToInterPatch(nProcs_);
+    List<Map<label>> procNbrToInterPatch(nProcs_);
 
     // Per processor the faces per inter-processor patch
-    List<DynamicList<DynamicList<label> > > interPatchFaces(nProcs_);
+    List<DynamicList<DynamicList<label>>> interPatchFaces(nProcs_);
 
     // Processor boundaries from internal faces
     forAll(neighbour, facei)
@@ -336,7 +336,7 @@ void Foam::domainDecomposition::decomposeMesh()
 
         sortedOrder(nbrs, order);
 
-        DynamicList<DynamicList<label> >& curInterPatchFaces =
+        DynamicList<DynamicList<label>>& curInterPatchFaces =
             interPatchFaces[procI];
 
         forAll(nbrs, i)
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C
index c08be4f7fae721a9fe455fc26286f7b1cc71a9f8..b12668ff1e3e5666ebf13daa5c7e5a37dbacc42c 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,12 +27,12 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-template <class BinaryOp>
+template<class BinaryOp>
 void Foam::domainDecomposition::processInterCyclics
 (
     const polyBoundaryMesh& patches,
-    List<DynamicList<DynamicList<label> > >& interPatchFaces,
-    List<Map<label> >& procNbrToInterPatch,
+    List<DynamicList<DynamicList<label>>>& interPatchFaces,
+    List<Map<label>>& procNbrToInterPatch,
     List<labelListList>& subPatchIDs,
     List<labelListList>& subPatchStarts,
     bool owner,
diff --git a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C
index 361c930ad24e9a75d77767d3642d3e3f731c1cb3..274e3a51a33a7eaf9d9ff19e478b6f2bb6f77e6c 100644
--- a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C
+++ b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ Foam::lagrangianFieldDecomposer::lagrangianFieldDecomposer
 
     particleIndices_.setSize(pi);
 
-    IOPosition<Cloud<passiveParticle> >(positions_).write();
+    IOPosition<Cloud<passiveParticle>>(positions_).write();
 }
 
 
diff --git a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.H b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.H
index 023ca93fb06c22d695cd142c7fa2b0e21038b93b..6e0280398d69f1b63efd6167292fae30ea00bdf0 100644
--- a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.H
+++ b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,8 +100,8 @@ public:
         (
             const label cloudI,
             const IOobjectList& lagrangianObjects,
-            PtrList<PtrList<IOField<Type> > >& lagrangianFields
-//            PtrList<IOField<Type> >& lagrangianFields
+            PtrList<PtrList<IOField<Type>>>& lagrangianFields
+//            PtrList<IOField<Type>>& lagrangianFields
         );
 
         template<class Type>
@@ -111,22 +111,22 @@ public:
             const IOobjectList& lagrangianObjects,
             PtrList
             <
-                PtrList<CompactIOField<Field<Type>, Type> >
+                PtrList<CompactIOField<Field<Type>, Type>>
             >& lagrangianFields
-//            PtrList<CompactIOField<Field<Type>, Type > >& lagrangianFields
+//            PtrList<CompactIOField<Field<Type>, Type >>& lagrangianFields
         );
 
 
         //- Decompose volume field
         template<class Type>
-        tmp<IOField<Type> > decomposeField
+        tmp<IOField<Type>> decomposeField
         (
             const word& cloudName,
             const IOField<Type>& field
         ) const;
 
         template<class Type>
-        tmp<CompactIOField<Field<Type>, Type> > decomposeFieldField
+        tmp<CompactIOField<Field<Type>, Type>> decomposeFieldField
         (
             const word& cloudName,
             const CompactIOField<Field<Type>, Type>& field
diff --git a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C
index 0b1cbcec13423920af13fdb53b894fd6d35cddbe..1b5caf8e6fdfba210573279ac8bfebfa28e62a26 100644
--- a/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C
+++ b/applications/utilities/parallelProcessing/decomposePar/lagrangianFieldDecomposerDecomposeFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ void Foam::lagrangianFieldDecomposer::readFields
 (
     const label cloudI,
     const IOobjectList& lagrangianObjects,
-    PtrList<PtrList<IOField<Type> > >& lagrangianFields
+    PtrList<PtrList<IOField<Type>>>& lagrangianFields
 )
 {
     // Search list of objects for lagrangian fields
@@ -45,7 +45,7 @@ void Foam::lagrangianFieldDecomposer::readFields
     lagrangianFields.set
     (
         cloudI,
-        new PtrList<IOField<Type> >
+        new PtrList<IOField<Type>>
         (
             lagrangianTypeObjects.size()
         )
@@ -68,13 +68,13 @@ void Foam::lagrangianFieldDecomposer::readFieldFields
 (
     const label cloudI,
     const IOobjectList& lagrangianObjects,
-    PtrList<PtrList<CompactIOField<Field<Type>, Type> > >& lagrangianFields
+    PtrList<PtrList<CompactIOField<Field<Type>, Type>>>& lagrangianFields
 )
 {
     // Search list of objects for lagrangian fields
     IOobjectList lagrangianTypeObjectsA
     (
-        lagrangianObjects.lookupClass(IOField<Field<Type> >::typeName)
+        lagrangianObjects.lookupClass(IOField<Field<Type>>::typeName)
     );
 
     IOobjectList lagrangianTypeObjectsB
@@ -89,7 +89,7 @@ void Foam::lagrangianFieldDecomposer::readFieldFields
     lagrangianFields.set
     (
         cloudI,
-        new PtrList<CompactIOField<Field<Type>, Type> >
+        new PtrList<CompactIOField<Field<Type>, Type>>
         (
             lagrangianTypeObjectsA.size() + lagrangianTypeObjectsB.size()
         )
@@ -118,7 +118,7 @@ void Foam::lagrangianFieldDecomposer::readFieldFields
 
 
 template<class Type>
-Foam::tmp<Foam::IOField<Type> >
+Foam::tmp<Foam::IOField<Type>>
 Foam::lagrangianFieldDecomposer::decomposeField
 (
     const word& cloudName,
@@ -129,7 +129,7 @@ Foam::lagrangianFieldDecomposer::decomposeField
     Field<Type> procField(field, particleIndices_);
 
     // Create the field for the processor
-    return tmp<IOField<Type> >
+    return tmp<IOField<Type>>
     (
         new IOField<Type>
         (
@@ -150,7 +150,7 @@ Foam::lagrangianFieldDecomposer::decomposeField
 
 
 template<class Type>
-Foam::tmp<Foam::CompactIOField<Foam::Field<Type>, Type> >
+Foam::tmp<Foam::CompactIOField<Foam::Field<Type>, Type>>
 Foam::lagrangianFieldDecomposer::decomposeFieldField
 (
     const word& cloudName,
@@ -158,10 +158,10 @@ Foam::lagrangianFieldDecomposer::decomposeFieldField
 ) const
 {
     // Create and map the internal field values
-    Field<Field<Type> > procField(field, particleIndices_);
+    Field<Field<Type>> procField(field, particleIndices_);
 
     // Create the field for the processor
-    return tmp<CompactIOField<Field<Type>, Type> >
+    return tmp<CompactIOField<Field<Type>, Type>>
     (
         new CompactIOField<Field<Type>, Type>
         (
diff --git a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.H b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.H
index cf9e4badf8fcfdde96a27926855232622a8e115b..d912ca8d9fe65a456f4b89b104053a9d464f581c 100644
--- a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.H
+++ b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -154,7 +154,7 @@ public:
 
         //- Decompose point field
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> >
+        tmp<GeometricField<Type, pointPatchField, pointMesh>>
         decomposeField
         (
             const GeometricField<Type, pointPatchField, pointMesh>&
diff --git a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C
index 6992180b11d05ef6d41a52143cc9dfac25217cd9..52f1576331c25800fabbb65bb1715048701e2d32 100644
--- a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C
+++ b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposerDecomposeFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
 Foam::pointFieldDecomposer::decomposeField
 (
     const GeometricField<Type, pointPatchField, pointMesh>& field
@@ -39,7 +39,7 @@ Foam::pointFieldDecomposer::decomposeField
     Field<Type> internalField(field.internalField(), pointAddressing_);
 
     // Create a list of pointers for the patchFields
-    PtrList<pointPatchField<Type> > patchFields(boundaryAddressing_.size());
+    PtrList<pointPatchField<Type>> patchFields(boundaryAddressing_.size());
 
     // Create and map the patch field values
     forAll(boundaryAddressing_, patchi)
@@ -73,7 +73,7 @@ Foam::pointFieldDecomposer::decomposeField
     }
 
     // Create the field for the processor
-    return tmp<GeometricField<Type, pointPatchField, pointMesh> >
+    return tmp<GeometricField<Type, pointPatchField, pointMesh>>
     (
         new GeometricField<Type, pointPatchField, pointMesh>
         (
diff --git a/applications/utilities/parallelProcessing/decomposePar/readFields.C b/applications/utilities/parallelProcessing/decomposePar/readFields.C
index eeb53b3e64642c4a4753322735ac66613104bdda..5f36afaffabea679252fecd084a144c64574a749 100644
--- a/applications/utilities/parallelProcessing/decomposePar/readFields.C
+++ b/applications/utilities/parallelProcessing/decomposePar/readFields.C
@@ -33,7 +33,7 @@ void Foam::readFields
 (
     const typename GeoMesh::Mesh& mesh,
     const IOobjectList& objects,
-    PtrList<GeometricField<Type, PatchField, GeoMesh> >& fields,
+    PtrList<GeometricField<Type, PatchField, GeoMesh>>& fields,
     const bool readOldTime
 )
 {
diff --git a/applications/utilities/parallelProcessing/decomposePar/readFields.H b/applications/utilities/parallelProcessing/decomposePar/readFields.H
index 43f870aa825f793f812c636eb7155afd8873b853..d1c24d1031eb7a62c46b6ff707c3b6c017c7da6f 100644
--- a/applications/utilities/parallelProcessing/decomposePar/readFields.H
+++ b/applications/utilities/parallelProcessing/decomposePar/readFields.H
@@ -47,7 +47,7 @@ namespace Foam
     (
         const typename GeoMesh::Mesh& mesh,
         const IOobjectList& objects,
-        PtrList<GeometricField<Type, PatchField, GeoMesh> >& fields,
+        PtrList<GeometricField<Type, PatchField, GeoMesh>>& fields,
         const bool readOldTime
     );
 
diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
index 47192a0fd190d263d83b80cb175c882f7c150631..a4ccd17bb19c47e82ab06ee0aa58df35d4c325d4 100644
--- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
+++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,12 +161,9 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
 
                 for (label mergedProcI = 0; mergedProcI < procI; mergedProcI++)
                 {
-                    const string fromProcString
+                    const word fromProcString
                     (
-                        "procBoundary"
-                      + name(procI)
-                      + "to"
-                      + name(mergedProcI)
+                        processorPolyPatch::newName(procI, mergedProcI)
                     );
 
                     if (pp.name() == fromProcString)
diff --git a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.H b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.H
index e27ed92046d0f5d0493e91c490b76475998ac640..29e36731272fe28d168feb6e3a66da02a67a579b 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.H
+++ b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructor.H
@@ -105,7 +105,7 @@ public:
 
         //- Reconstruct volume internal field
         template<class Type>
-        tmp<DimensionedField<Type, volMesh> >
+        tmp<DimensionedField<Type, volMesh>>
         reconstructFvVolumeInternalField
         (
             const DimensionedField<Type, volMesh>&
@@ -113,14 +113,14 @@ public:
 
         //- Read and reconstruct volume internal field
         template<class Type>
-        tmp<DimensionedField<Type, volMesh> >
+        tmp<DimensionedField<Type, volMesh>>
         reconstructFvVolumeInternalField(const IOobject& fieldIoObject) const;
 
 
 
         //- Reconstruct volume field
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> >
+        tmp<GeometricField<Type, fvPatchField, volMesh>>
         reconstructFvVolumeField
         (
             const GeometricField<Type, fvPatchField, volMesh>& fld
@@ -128,14 +128,14 @@ public:
 
         //- Read and reconstruct volume field
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> >
+        tmp<GeometricField<Type, fvPatchField, volMesh>>
         reconstructFvVolumeField(const IOobject& fieldIoObject) const;
 
 
 
         //- Reconstruct surface field
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         reconstructFvSurfaceField
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>&
@@ -143,7 +143,7 @@ public:
 
         //- Read and reconstruct surface field
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         reconstructFvSurfaceField(const IOobject& fieldIoObject) const;
 
 
diff --git a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C
index d5afc26416357ff7c6caed58552bce079a2e2322..5b9dc19431d2702434000ba17154cd551c3a9100 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parFvFieldReconstructorReconstructFields.C
@@ -41,7 +41,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>>
 Foam::parFvFieldReconstructor::reconstructFvVolumeInternalField
 (
     const DimensionedField<Type, volMesh>& fld
@@ -66,7 +66,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeInternalField
         IOobject::NO_WRITE
     );
 
-    return tmp<DimensionedField<Type, volMesh> >
+    return tmp<DimensionedField<Type, volMesh>>
     (
         new DimensionedField<Type, volMesh>
         (
@@ -80,7 +80,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeInternalField
 
 
 template<class Type>
-Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>>
 Foam::parFvFieldReconstructor::reconstructFvVolumeInternalField
 (
     const IOobject& fieldIoObject
@@ -100,7 +100,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeInternalField
 
 // Reconstruct a field onto the baseMesh
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::parFvFieldReconstructor::reconstructFvVolumeField
 (
     const GeometricField<Type, fvPatchField, volMesh>& fld
@@ -123,7 +123,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     // Note: patchFields still on mesh, not baseMesh
 
-    PtrList<fvPatchField<Type> > patchFields(fld.mesh().boundary().size());
+    PtrList<fvPatchField<Type>> patchFields(fld.mesh().boundary().size());
 
     const typename GeometricField
     <
@@ -151,7 +151,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
     }
 
 
-    PtrList<fvPatchField<Type> > basePatchFields
+    PtrList<fvPatchField<Type>> basePatchFields
     (
         baseMesh_.boundary().size()
     );
@@ -213,7 +213,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
         IOobject::NO_WRITE
     );
 
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -228,7 +228,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::parFvFieldReconstructor::reconstructFvVolumeField
 (
     const IOobject& fieldIoObject
@@ -247,7 +247,7 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::parFvFieldReconstructor::reconstructFvSurfaceField
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& fld
@@ -263,16 +263,13 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
     );
 
     // Create flat field of internalField + all patch fields
-    Field<Type> flatFld(fld.mesh().nFaces(), pTraits<Type>::zero);
-    SubList<Type>(flatFld, fld.internalField().size()).assign
-    (
-        fld.internalField()
-    );
+    Field<Type> flatFld(fld.mesh().nFaces(), Type(Zero));
+    SubList<Type>(flatFld, fld.internalField().size()) = fld.internalField();
     forAll(fld.boundaryField(), patchI)
     {
         const fvsPatchField<Type>& fvp = fld.boundaryField()[patchI];
 
-        SubList<Type>(flatFld, fvp.size(), fvp.patch().start()).assign(fvp);
+        SubList<Type>(flatFld, fvp.size(), fvp.patch().start()) = fvp;
     }
 
     // Map all faces
@@ -293,7 +290,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     // Note: patchFields still on mesh, not baseMesh
 
-    PtrList<fvsPatchField<Type> > patchFields(fld.mesh().boundary().size());
+    PtrList<fvsPatchField<Type>> patchFields(fld.mesh().boundary().size());
 
     const typename GeometricField
     <
@@ -321,7 +318,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
     }
 
 
-    PtrList<fvsPatchField<Type> > basePatchFields
+    PtrList<fvsPatchField<Type>> basePatchFields
     (
         baseMesh_.boundary().size()
     );
@@ -383,7 +380,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
         IOobject::NO_WRITE
     );
 
-    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -398,7 +395,7 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::parFvFieldReconstructor::reconstructFvSurfaceField
 (
     const IOobject& fieldIoObject
@@ -440,7 +437,7 @@ void Foam::parFvFieldReconstructor::reconstructFvVolumeInternalFields
             {
                 Info<< "        " << fieldIter()->name() << endl;
 
-                tmp<DimensionedField<Type, volMesh> > tfld
+                tmp<DimensionedField<Type, volMesh>> tfld
                 (
                     reconstructFvVolumeInternalField<Type>(*fieldIter())
                 );
@@ -484,7 +481,7 @@ void Foam::parFvFieldReconstructor::reconstructFvVolumeFields
             {
                 Info<< "        " << name << endl;
 
-                tmp<GeometricField<Type, fvPatchField, volMesh> > tfld
+                tmp<GeometricField<Type, fvPatchField, volMesh>> tfld
                 (
                     reconstructFvVolumeField<Type>(*fieldIter())
                 );
@@ -525,7 +522,7 @@ void Foam::parFvFieldReconstructor::reconstructFvSurfaceFields
             {
                 Info<< "        " << fieldIter()->name() << endl;
 
-                tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tfld
+                tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tfld
                 (
                     reconstructFvSurfaceField<Type>(*fieldIter())
                 );
diff --git a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C
index 16bf0a51370e4c51f2e61c09c5f6aa977a2fa857..0443a8e72dc25816c13492d132346af62107b919 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributor.C
@@ -142,7 +142,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
     {
         // List of lists of particles to be transfered for all of the
         // neighbour processors
-        List<IDLList<passiveParticle> > particleTransferLists
+        List<IDLList<passiveParticle>> particleTransferLists
         (
             Pstream::nProcs()
         );
@@ -185,7 +185,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
 
 
     // Start sending. Sets number of bytes transferred
-    labelListList allNTrans(Pstream::nProcs());
+    labelList allNTrans(Pstream::nProcs());
     pBufs.finishedSends(allNTrans);
 
 
@@ -208,7 +208,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
         // Retrieve from receive buffers
         forAll(allNTrans, procI)
         {
-            label nRec = allNTrans[procI][Pstream::myProcNo()];
+            label nRec = allNTrans[procI];
 
             //Pout<< "From processor " << procI << " receiving bytes " << nRec
             //    << endl;
diff --git a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C
index ca4f949dab382444e3e935d911daff6bfae02edd..1eca70bd1eb2bc2aff2146a334dc56af627ff193 100644
--- a/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C
+++ b/applications/utilities/parallelProcessing/redistributePar/parLagrangianRedistributorRedistributeFields.C
@@ -74,7 +74,7 @@ void Foam::parLagrangianRedistributor::redistributeLagrangianFields
 {
     const wordList objectNames
     (
-        filterObjects<IOField<Type> >
+        filterObjects<IOField<Type>>
         (
             objects,
             selectedFields
@@ -125,7 +125,7 @@ void Foam::parLagrangianRedistributor::redistributeLagrangianFields
                         IOobject::NO_WRITE,
                         false
                     ),
-                    xferMove<Field<Type> >(field)
+                    xferMove<Field<Type>>(field)
                 ).write();
             }
         }
@@ -146,7 +146,7 @@ void Foam::parLagrangianRedistributor::redistributeLagrangianFieldFields
 {
     wordList objectNames
     (
-        filterObjects<CompactIOField<Field<Type>, Type> >
+        filterObjects<CompactIOField<Field<Type>, Type>>
         (
             objects,
             selectedFields
@@ -157,7 +157,7 @@ void Foam::parLagrangianRedistributor::redistributeLagrangianFieldFields
     {
         const wordList ioFieldNames
         (
-            filterObjects<IOField<Field<Type> > >
+            filterObjects<IOField<Field<Type>>>
             (
                 objects,
                 selectedFields
@@ -212,7 +212,7 @@ void Foam::parLagrangianRedistributor::redistributeLagrangianFieldFields
                         IOobject::NO_WRITE,
                         false
                     ),
-                    xferMove<Field<Field<Type> > >(field)
+                    xferMove<Field<Field<Type>>>(field)
                 ).write();
             }
         }
@@ -309,7 +309,7 @@ void Foam::parLagrangianRedistributor::redistributeStoredLagrangianFields
                         IOobject::NO_WRITE,
                         false
                     ),
-                    xferMove<Field<typename Container::value_type> >(field)
+                    xferMove<Field<typename Container::value_type>>(field)
                 ).write();
             }
         }
diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
index 8b66353f385020e9dfe2de3ece35a4a8ef675d85..a02bf106a7ed7c4c0141418ba2170a1c9499a5e2 100644
--- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
+++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -272,6 +272,8 @@ void writeDecomposition
     {
         procCells[cI] = decomp[cI];
     }
+
+    procCells.correctBoundaryConditions();
     procCells.write();
 }
 
@@ -575,7 +577,7 @@ void readField
     const IOobject& io,
     const fvMesh& mesh,
     const label i,
-    PtrList<GeometricField<Type, PatchField, GeoMesh> >& fields
+    PtrList<GeometricField<Type, PatchField, GeoMesh>>& fields
 )
 {
     fields.set
@@ -597,12 +599,12 @@ void readFields
     PtrList<GeoField>& fields
 )
 {
-    //typedef GeometricField<T, fvPatchField, Mesh> fldType;
-
     // Get my objects of type
     IOobjectList objects(allObjects.lookupClass(GeoField::typeName));
+
     // Check that we all have all objects
     wordList objectNames = objects.sortedNames();
+
     // Get master names
     wordList masterNames(objectNames);
     Pstream::scatter(masterNames);
@@ -827,11 +829,11 @@ autoPtr<mapDistributePolyMesh> redistributeAndWrite
     PtrList<surfaceSymmTensorField> surfSymmTensorFields;
     PtrList<surfaceTensorField> surfTensorFields;
 
-    PtrList<DimensionedField<scalar, volMesh> > dimScalarFields;
-    PtrList<DimensionedField<vector, volMesh> > dimVectorFields;
-    PtrList<DimensionedField<sphericalTensor, volMesh> > dimSphereTensorFields;
-    PtrList<DimensionedField<symmTensor, volMesh> > dimSymmTensorFields;
-    PtrList<DimensionedField<tensor, volMesh> > dimTensorFields;
+    PtrList<DimensionedField<scalar, volMesh>> dimScalarFields;
+    PtrList<DimensionedField<vector, volMesh>> dimVectorFields;
+    PtrList<DimensionedField<sphericalTensor, volMesh>> dimSphereTensorFields;
+    PtrList<DimensionedField<symmTensor, volMesh>> dimSymmTensorFields;
+    PtrList<DimensionedField<tensor, volMesh>> dimTensorFields;
 
 
     if (doReadFields)
@@ -1813,21 +1815,21 @@ void readLagrangian
         //Pout<< "Found clould objects:" << sprayObjs.names() << endl;
 
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<label> >
+        <IOField<label>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<Field<label> > >
+        <IOField<Field<label>>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <CompactIOField<Field<label>, label> >
+        <CompactIOField<Field<label>, label>>
         (
             clouds[i],
             sprayObjs,
@@ -1836,21 +1838,21 @@ void readLagrangian
 
 
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<scalar> >
+        <IOField<scalar>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<Field<scalar> > >
+        <IOField<Field<scalar>>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <CompactIOField<Field<scalar>, scalar> >
+        <CompactIOField<Field<scalar>, scalar>>
         (
             clouds[i],
             sprayObjs,
@@ -1859,21 +1861,21 @@ void readLagrangian
 
 
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<vector> >
+        <IOField<vector>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<Field<vector> > >
+        <IOField<Field<vector>>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <CompactIOField<Field<vector>, vector> >
+        <CompactIOField<Field<vector>, vector>>
         (
             clouds[i],
             sprayObjs,
@@ -1882,21 +1884,21 @@ void readLagrangian
 
 
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<sphericalTensor> >
+        <IOField<sphericalTensor>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<Field<sphericalTensor> > >
+        <IOField<Field<sphericalTensor>>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <CompactIOField<Field<sphericalTensor>, sphericalTensor> >
+        <CompactIOField<Field<sphericalTensor>, sphericalTensor>>
         (
             clouds[i],
             sprayObjs,
@@ -1905,21 +1907,21 @@ void readLagrangian
 
 
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<symmTensor> >
+        <IOField<symmTensor>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<Field<symmTensor> > >
+        <IOField<Field<symmTensor>>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <CompactIOField<Field<symmTensor>, symmTensor> >
+        <CompactIOField<Field<symmTensor>, symmTensor>>
         (
             clouds[i],
             sprayObjs,
@@ -1928,21 +1930,21 @@ void readLagrangian
 
 
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<tensor> >
+        <IOField<tensor>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <IOField<Field<tensor> > >
+        <IOField<Field<tensor>>>
         (
             clouds[i],
             sprayObjs,
             selectedLagrangianFields
         );
         parLagrangianRedistributor::readLagrangianFields
-        <CompactIOField<Field<tensor>, tensor> >
+        <CompactIOField<Field<tensor>, tensor>>
         (
             clouds[i],
             sprayObjs,
@@ -1985,19 +1987,19 @@ void redistributeLagrangian
             distributor.redistributeLagrangianPositions(clouds[i]);
 
             distributor.redistributeStoredLagrangianFields
-            <IOField<label> >
+            <IOField<label>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <IOField<Field<label> > >
+            <IOField<Field<label>>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <CompactIOField<Field<label>, label> >
+            <CompactIOField<Field<label>, label>>
             (
                 lagrangianMap,
                 clouds[i]
@@ -2005,19 +2007,19 @@ void redistributeLagrangian
 
 
             distributor.redistributeStoredLagrangianFields
-            <IOField<scalar> >
+            <IOField<scalar>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <IOField<Field<scalar> > >
+            <IOField<Field<scalar>>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <CompactIOField<Field<scalar>, scalar> >
+            <CompactIOField<Field<scalar>, scalar>>
             (
                 lagrangianMap,
                 clouds[i]
@@ -2025,19 +2027,19 @@ void redistributeLagrangian
 
 
             distributor.redistributeStoredLagrangianFields
-            <IOField<vector> >
+            <IOField<vector>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <IOField<Field<vector> > >
+            <IOField<Field<vector>>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <CompactIOField<Field<vector>, vector> >
+            <CompactIOField<Field<vector>, vector>>
             (
                 lagrangianMap,
                 clouds[i]
@@ -2045,19 +2047,19 @@ void redistributeLagrangian
 
 
             distributor.redistributeStoredLagrangianFields
-            <IOField<sphericalTensor> >
+            <IOField<sphericalTensor>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <IOField<Field<sphericalTensor> > >
+            <IOField<Field<sphericalTensor>>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <CompactIOField<Field<sphericalTensor>, sphericalTensor> >
+            <CompactIOField<Field<sphericalTensor>, sphericalTensor>>
             (
                 lagrangianMap,
                 clouds[i]
@@ -2065,19 +2067,19 @@ void redistributeLagrangian
 
 
             distributor.redistributeStoredLagrangianFields
-            <IOField<symmTensor> >
+            <IOField<symmTensor>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <IOField<Field<symmTensor> > >
+            <IOField<Field<symmTensor>>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <CompactIOField<Field<symmTensor>, symmTensor> >
+            <CompactIOField<Field<symmTensor>, symmTensor>>
             (
                 lagrangianMap,
                 clouds[i]
@@ -2085,19 +2087,19 @@ void redistributeLagrangian
 
 
             distributor.redistributeStoredLagrangianFields
-            <IOField<tensor> >
+            <IOField<tensor>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <IOField<Field<tensor> > >
+            <IOField<Field<tensor>>>
             (
                 lagrangianMap,
                 clouds[i]
             );
             distributor.redistributeStoredLagrangianFields
-            <CompactIOField<Field<tensor>, tensor> >
+            <CompactIOField<Field<tensor>, tensor>>
             (
                 lagrangianMap,
                 clouds[i]
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloudField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloudField.C
index b7780b238218aa52738bf31436c7ea91081cbc76..337380de135d7d9ecaac7672923a75c1af435811 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloudField.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCloudField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ void ensightCloudField
 
             if (mag(v) < 1.0e-90)
             {
-                v = pTraits<Type>::zero;
+                v = Zero;
             }
 
             for (direction i=0; i < pTraits<Type>::nComponents; ++i)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
index 81e20c00bdf6f495f68a3dd019010dcc684e3930..11c3a9a7b6f6566a0c50351b8b36c137b5c2c5fd 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -41,7 +41,7 @@ using namespace Foam;
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 volField
 (
     const fvMeshSubset& meshSubsetter,
@@ -50,12 +50,12 @@ volField
 {
     if (meshSubsetter.hasSubMesh())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tfld
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tfld
         (
             meshSubsetter.interpolate(vf)
         );
-        tfld().checkOut();
-        tfld().rename(vf.name());
+        tfld.ref().checkOut();
+        tfld.ref().rename(vf.name());
         return tfld;
     }
     else
@@ -66,7 +66,7 @@ volField
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 volField
 (
     const fvMeshSubset& meshSubsetter,
@@ -83,7 +83,7 @@ volField
     IOobject io(df);
     io.readOpt() = IOobject::NO_READ;
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tvf
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tvf
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -93,18 +93,18 @@ volField
             zeroGradientFvPatchField<scalar>::typeName
         )
     );
-    tvf().internalField() = df;
-    tvf().correctBoundaryConditions();
+    tvf.ref().internalField() = df;
+    tvf.ref().correctBoundaryConditions();
     const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
 
     if (meshSubsetter.hasSubMesh())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tfld
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tfld
         (
             meshSubsetter.interpolate(vf)
         );
-        tfld().checkOut();
-        tfld().rename(vf.name());
+        tfld.ref().checkOut();
+        tfld.ref().rename(vf.name());
         return tfld;
     }
     else
@@ -809,11 +809,11 @@ void ensightField
 {
     if (nodeValues)
     {
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > pfld
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> pfld
         (
             volPointInterpolation::New(vf.mesh()).interpolate(vf)
         );
-        pfld().rename(vf.name());
+        pfld.ref().rename(vf.name());
 
         ensightPointField<Type>
         (
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H
index 7b909bb4e0bcd3882d37ab77385131b7ecb56fc9..813fea468eb74cd9d07f52bcd6cc2429352de7f1 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ SourceFiles
 
 //- Wrapper to get hold of the field or the subsetted field
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 volField
 (
     const Foam::fvMeshSubset&,
@@ -51,7 +51,7 @@ volField
 
 //- Wrapper to convert dimensionedInternalField to volField
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 volField
 (
     const Foam::fvMeshSubset&,
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C
index 0e391d462c242af3e96e867d3b8fa3e5ad04c537..234c9d85b3e7fd40577925dae315abfff09061ba 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -334,7 +334,7 @@ int main(int argc, char *argv[])
         }
     }
 
-    HashTable<HashTable<word> > allCloudFields;
+    HashTable<HashTable<word>> allCloudFields;
     forAllConstIter(wordHashSet, allCloudNames, cloudIter)
     {
         // Add the name of the cloud(s) to the case file header
@@ -354,7 +354,7 @@ int main(int argc, char *argv[])
         allCloudFields.insert(cloudIter.key(), HashTable<word>());
 
         // Identify the new cloud in the hash table
-        HashTable<HashTable<word> >::iterator newCloudIter =
+        HashTable<HashTable<word>>::iterator newCloudIter =
             allCloudFields.find(cloudIter.key());
 
         // Loop over all times to build list of fields and field types
@@ -672,7 +672,7 @@ int main(int argc, char *argv[])
         // Cloud field data output
         // ~~~~~~~~~~~~~~~~~~~~~~~
 
-        forAllConstIter(HashTable<HashTable<word> >, allCloudFields, cloudIter)
+        forAllConstIter(HashTable<HashTable<word>>, allCloudFields, cloudIter)
         {
             const word& cloudName = cloudIter.key();
 
@@ -706,7 +706,7 @@ int main(int argc, char *argv[])
                     IOobject::MUST_READ
                 );
 
-                bool fieldExists = fieldObject.typeHeaderOk<IOField<scalar> >
+                bool fieldExists = fieldObject.typeHeaderOk<IOField<scalar>>
                 (
                     false
                 );
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputCase.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputCase.H
index 3ccdbbe91b27f0f1bbd21c6b533d33eaaefe8d8b..0d221590790e6ef2dab658669ab9bd0ed819ba1e 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputCase.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputCase.H
@@ -36,7 +36,7 @@ else
 
 // add information for clouds
 // multiple clouds currently require the same time index
-forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
+forAllConstIter(HashTable<HashTable<word>>, cloudFields, cloudIter)
 {
     const word& cloudName = cloudIter.key();
 
@@ -91,7 +91,7 @@ forAllConstIter(HashTable<word>, volumeFields, fieldIter)
 
 
 label cloudNo = 0;
-forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
+forAllConstIter(HashTable<HashTable<word>>, cloudFields, cloudIter)
 {
     const word& cloudName = cloudIter.key();
 
@@ -175,7 +175,7 @@ if (fieldTimesUsed.size())
 
 // TODO: allow similar/different time-steps for each cloud
 cloudNo = 0;
-forAllConstIter(HashTable<DynamicList<label> >, cloudTimesUsed, cloudIter)
+forAllConstIter(HashTable<DynamicList<label>>, cloudTimesUsed, cloudIter)
 {
     // const word& cloudName = cloudIter.key();
     const DynamicList<label>& timesUsed = cloudIter();
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputFunctions.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputFunctions.C
index ace330060df566ba732623f04d4f327b008b3a4b..309b49a82ddaee8e1b7860fa9483b4a3c9b1007d 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputFunctions.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/ensightOutputFunctions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -182,7 +182,7 @@ void Foam::ensightLagrangianField
 
         if (mag(val) < 1.0e-90)
         {
-            val = pTraits<Type>::zero;
+            val = Zero;
         }
 
         for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; cmpt++)
@@ -206,7 +206,6 @@ void Foam::ensightLagrangianField
 }
 
 
-//- Write generalized field components
 template<class Type>
 void Foam::ensightVolField
 (
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H
index 7a6bd938dc466be02a3dfa887bf732dbcd7db6dd..077490f1ecdaaa2116db06ced0bf4823aa0e4ec8 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H
@@ -4,7 +4,7 @@
 HashTable<word> volumeFields;
 
 // 2. the fields for each cloud:
-HashTable< HashTable<word> > cloudFields;
+HashTable<HashTable<word>> cloudFields;
 
 if (timeDirs.size())
 {
@@ -48,7 +48,7 @@ if (timeDirs.size())
         cloudFields.insert(cloudName, HashTable<word>());
 
         // Identify the new cloud within the hash table
-        HashTable<HashTable<word> >::iterator cloudIter =
+        HashTable<HashTable<word>>::iterator cloudIter =
             cloudFields.find(cloudName);
 
         IOobjectList objs
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
index 8e948b1692c9cb6d6ceb3854cf003f54fb04e344..6aecc40fc2e4e237a80e8ec69a0c751ae42731cd 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Usage
     \param -ascii \n
     Write Ensight data in ASCII format instead of "C Binary"
 
-    \parm -name \<subdir\>\n
+    \param -name \<subdir\>\n
     define sub-directory name to use for Ensight data (default: "Ensight")
 
     \param -noZero \n
@@ -220,10 +220,10 @@ int main(int argc, char *argv[])
     DynamicList<label> fieldTimesUsed;
 
     // Track the time indices used by each cloud
-    HashTable<DynamicList<label> > cloudTimesUsed;
+    HashTable<DynamicList<label>> cloudTimesUsed;
 
     // Create a new DynamicList for each cloud
-    forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
+    forAllConstIter(HashTable<HashTable<word>>, cloudFields, cloudIter)
     {
         cloudTimesUsed.insert(cloudIter.key(), DynamicList<label>());
     }
@@ -356,7 +356,7 @@ int main(int argc, char *argv[])
         Info<< " )" << endl;
 
         // check for clouds
-        forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
+        forAllConstIter(HashTable<HashTable<word>>, cloudFields, cloudIter)
         {
             const word& cloudName = cloudIter.key();
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H
index b00aca4d1767ef31d9dc674e647999a623af61f8..f8fe3458221252b45d1f59b6103a092a5d183864 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H
@@ -73,7 +73,7 @@ for (label i=0; i < nTypes; i++)
 
         if
         (
-            lagrangianHeader.typeHeaderOk<IOPosition<Cloud<passiveParticle> > >
+            lagrangianHeader.typeHeaderOk<IOPosition<Cloud<passiveParticle>>>
             (
                 false
             )
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
index 8ef9158c5de7629a9990b38054a0caa649843f9f..df9634c1120842fc008fb83b458786c62b9e76a4 100755
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
@@ -1,6 +1,9 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Parse arguments for application compilation (at least for error control)
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+
 if [ ! -d ${WM_THIRD_PARTY_DIR}/tecio ]
 then
     echo "Did not find tecio in ${WM_THIRD_PARTY_DIR}. Not building foamToTecplot360."
@@ -8,4 +11,4 @@ else
     wmake
 fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.H b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.H
index 60836e9a24abf1166cae69d426ab8d013f65fc53..1bd38ec8921100e242505e3496dedb933326deda 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,7 +120,7 @@ public:
 
         //- Get either fvPatchField or patchInternalField
         template<class Type>
-        tmp<Field<Type> > getPatchField
+        tmp<Field<Type>> getPatchField
         (
             const bool nearCellValue,
             const GeometricField<Type, fvPatchField, volMesh>& vfld,
@@ -130,7 +130,7 @@ public:
         //- Get mixed field: fvsPatchField for boundary faces and
         //  internalField for internal faces.
         template<class Type>
-        tmp<Field<Type> > getFaceField
+        tmp<Field<Type>> getFaceField
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>&,
             const labelList& faceLabels
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C
index 16416593cb49246aa7d6399f836deccef6f7e832..c2ca8ac4a86c710d8f50646cdd05544470ca132b 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,7 +65,7 @@ void Foam::tecplotWriter::writeField(const Field<Type>& fld) const
 
 
 template<class Type>
-Foam::tmp<Field<Type> > Foam::tecplotWriter::getPatchField
+Foam::tmp<Field<Type>> Foam::tecplotWriter::getPatchField
 (
     const bool nearCellValue,
     const GeometricField<Type, fvPatchField, volMesh>& vfld,
@@ -84,7 +84,7 @@ Foam::tmp<Field<Type> > Foam::tecplotWriter::getPatchField
 
 
 template<class Type>
-Foam::tmp<Field<Type> > Foam::tecplotWriter::getFaceField
+Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& sfld,
     const labelList& faceLabels
@@ -92,7 +92,7 @@ Foam::tmp<Field<Type> > Foam::tecplotWriter::getFaceField
 {
     const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
 
-    tmp<Field<Type> > tfld(new Field<Type>(faceLabels.size()));
+    tmp<Field<Type>> tfld(new Field<Type>(faceLabels.size()));
     Field<Type>& fld = tfld();
 
     forAll(faceLabels, i)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C
index 888d274dea364c54fec7560bfa37d652c298d47a..6e50d704717fb450f1872c89352f17e352d600e1 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ void ReadAndMapFields
                 (
                     "zero",
                     readField.dimensions(),
-                    pTraits<Type>::zero
+                    Zero
                 )
             )
         );
@@ -252,7 +252,7 @@ int main(int argc, char *argv[])
         objects,
         tetDualMesh,
         pointDualAddressing,
-        pTraits<scalar>::zero,  // nullValue
+        Zero,  // nullValue
         psFlds
     );
 
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
         objects,
         tetDualMesh,
         pointDualAddressing,
-        pTraits<vector>::zero,  // nullValue
+        Zero,  // nullValue
         pvFlds
     );
 
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
         objects,
         tetDualMesh,
         pointDualAddressing,
-        pTraits<sphericalTensor>::zero,  // nullValue
+        Zero,  // nullValue
         pstFlds
     );
 
@@ -285,7 +285,7 @@ int main(int argc, char *argv[])
         objects,
         tetDualMesh,
         pointDualAddressing,
-        pTraits<symmTensor>::zero,  // nullValue
+        Zero,  // nullValue
         psymmtFlds
     );
 
@@ -296,7 +296,7 @@ int main(int argc, char *argv[])
         objects,
         tetDualMesh,
         pointDualAddressing,
-        pTraits<tensor>::zero,  // nullValue
+        Zero,  // nullValue
         ptFlds
     );
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
index 1b747f5498ba08e54d211649ba3a6f2b1dfe8752..b4c26b21cf628f79916777796adc936063fb642e 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -324,18 +324,19 @@ int main(int argc, char *argv[])
     const bool doWriteInternal = !args.optionFound("noInternal");
     const bool doFaceZones     = !args.optionFound("noFaceZones");
     const bool doLinks         = !args.optionFound("noLinks");
-    const bool binary          = !args.optionFound("ascii");
+    bool binary                = !args.optionFound("ascii");
     const bool useTimeName     = args.optionFound("useTimeName");
 
-    // decomposition of polyhedral cells into tets/pyramids cells
+    // Decomposition of polyhedral cells into tets/pyramids cells
     vtkTopo::decomposePoly     = !args.optionFound("poly");
 
     if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4))
     {
-        FatalErrorInFunction
-            << "floatScalar and/or label are not 4 bytes in size" << nl
-            << "Hence cannot use binary VTK format. Please use -ascii"
-            << exit(FatalError);
+        WarningInFunction
+            << "Using ASCII rather than binary VTK format because "
+               "floatScalar and/or label are not 4 bytes in size."
+            << nl << endl;
+        binary = false;
     }
 
     const bool nearCellValue = args.optionFound("nearCellValue");
@@ -727,9 +728,7 @@ int main(int argc, char *argv[])
 
         if (doWriteInternal)
         {
-            //
             // Create file and write header
-            //
             fileName vtkFileName
             (
                 fvPath/vtkName
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.H
index fa805c37b7cdbc5b6cf45b0fc6ed953694e93b60..68b2f50f7f4e6d52b0d330055d02f7b1afa6dfc8 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -91,14 +91,14 @@ public:
         template<class Type, template<class> class PatchField, class GeoMesh>
         void write
         (
-            const PtrList<GeometricField<Type, PatchField, GeoMesh> >&
+            const PtrList<GeometricField<Type, PatchField, GeoMesh>>&
         );
 
         //- Write generic internal fields
         template<class Type, class GeoMesh>
         void write
         (
-            const PtrList<DimensionedField<Type, volMesh> >& flds
+            const PtrList<DimensionedField<Type, volMesh>>& flds
         );
 
         //- Interpolate and write volFields
@@ -106,7 +106,7 @@ public:
         void write
         (
             const volPointInterpolation&,
-            const PtrList<GeometricField<Type, fvPatchField, volMesh> >&
+            const PtrList<GeometricField<Type, fvPatchField, volMesh>>&
         );
 
         //- Interpolate and internal fields
@@ -114,7 +114,7 @@ public:
         void write
         (
             const volPointInterpolation&,
-            const PtrList<DimensionedField<Type, volMesh> >&
+            const PtrList<DimensionedField<Type, volMesh>>&
         );
 };
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriterTemplates.C
index 797f2d5661bcf36e85d073ab57a1554011a69aab..f2c346c49a86e7c70f6108dceed9d149581b4603 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriterTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 template<class Type, template<class> class PatchField, class GeoMesh>
 void Foam::internalWriter::write
 (
-    const PtrList<GeometricField<Type, PatchField, GeoMesh> >& flds
+    const PtrList<GeometricField<Type, PatchField, GeoMesh>>& flds
 )
 {
     forAll(flds, i)
@@ -44,7 +44,7 @@ void Foam::internalWriter::write
 template<class Type, class GeoMesh>
 void Foam::internalWriter::write
 (
-    const PtrList<DimensionedField<Type, volMesh> >& flds
+    const PtrList<DimensionedField<Type, volMesh>>& flds
 )
 {
     forAll(flds, i)
@@ -58,7 +58,7 @@ template<class Type>
 void Foam::internalWriter::write
 (
     const volPointInterpolation& pInterp,
-    const PtrList<GeometricField<Type, fvPatchField, volMesh> >& flds
+    const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
 )
 {
     forAll(flds, i)
@@ -79,7 +79,7 @@ template<class Type, class GeoMesh>
 void Foam::internalWriter::write
 (
     const volPointInterpolation& pInterp,
-    const PtrList<DimensionedField<Type, volMesh> >& flds
+    const PtrList<DimensionedField<Type, volMesh>>& flds
 )
 {
     forAll(flds, i)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.H
index 730f68098e316ab48aea67f786e157705638a326..f0880c99031d7d22e6a610cdae965a6efd9b8b3e 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,14 +114,14 @@ public:
         template<class Type>
         void write
         (
-            const PtrList<GeometricField<Type, fvPatchField, volMesh> >&
+            const PtrList<GeometricField<Type, fvPatchField, volMesh>>&
         );
 
         //- Write pointFields
         template<class Type>
         void write
         (
-            const PtrList<GeometricField<Type, pointPatchField, pointMesh> >&
+            const PtrList<GeometricField<Type, pointPatchField, pointMesh>>&
         );
 
         //- Interpolate and write volFields
@@ -129,7 +129,7 @@ public:
         void write
         (
             const PrimitivePatchInterpolation<primitivePatch>&,
-            const PtrList<GeometricField<Type, fvPatchField, volMesh> >&
+            const PtrList<GeometricField<Type, fvPatchField, volMesh>>&
         );
 };
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C
index 25e228ebe065f510f54c610638cf80548f8313f5..f6ea96d7b8bfe279efc6451e5e5e8986e6740df4 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 template<class Type>
 void Foam::patchWriter::write
 (
-    const PtrList<GeometricField<Type, fvPatchField, volMesh> >& flds
+    const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
 )
 {
     forAll(flds, fieldI)
@@ -66,7 +66,7 @@ void Foam::patchWriter::write
 template<class Type>
 void Foam::patchWriter::write
 (
-    const PtrList<GeometricField<Type, pointPatchField, pointMesh> >& flds
+    const PtrList<GeometricField<Type, pointPatchField, pointMesh>>& flds
 )
 {
     forAll(flds, fieldI)
@@ -96,7 +96,7 @@ template<class Type>
 void Foam::patchWriter::write
 (
     const PrimitivePatchInterpolation<primitivePatch>& pInter,
-    const PtrList<GeometricField<Type, fvPatchField, volMesh> >& flds
+    const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds
 )
 {
     forAll(flds, fieldI)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.H
index 0a5936cfa1aa3b5246e9359962a5d091a59596fe..2520badad0926a62c7a02fb85a1b9170ef01087a 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,7 +90,7 @@ public:
 
         //- Extract face data
         template<class Type>
-        tmp<Field<Type> > getFaceField
+        tmp<Field<Type>> getFaceField
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>&
         ) const;
@@ -99,7 +99,7 @@ public:
         template<class Type>
         void write
         (
-            const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+            const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>&
         );
 };
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
index 3ae7b08be26cb3671fba616b9c258490260f0358..c3412a1faa4d6a6738f803b07398abf546379a5d 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,15 +29,15 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Field<Type> > Foam::surfaceMeshWriter::getFaceField
+Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& sfld
 ) const
 {
     const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
 
-    tmp<Field<Type> > tfld(new Field<Type>(pp_.size()));
-    Field<Type>& fld = tfld();
+    tmp<Field<Type>> tfld(new Field<Type>(pp_.size()));
+    Field<Type>& fld = tfld.ref();
 
     forAll(pp_.addressing(), i)
     {
@@ -63,7 +63,7 @@ Foam::tmp<Field<Type> > Foam::surfaceMeshWriter::getFaceField
 template<class Type>
 void Foam::surfaceMeshWriter::write
 (
-    const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds
+    const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& sflds
 )
 {
     forAll(sflds, fieldI)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H
index d9d65a1201219ce3afa5c3169a50642ae9858f28..f536ae04fa2f7e27faa7baf121366ba63e988fc4 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ public:
                 if (useSubMesh())
                 {
                     tmp<GeoField> subFld = subsetter_.interpolate(fld);
-                    subFld().rename(fld.name());
+                    subFld.ref().rename(fld.name());
                     return subFld;
                 }
                 else
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C
index 5685ebc4403c2e649488045a628e29d142c293a1..d9e9f9cfc895558b7a5f9648936f3185b52550d7 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,28 +27,28 @@ License
 #include "vtkTopo.H"
 
 #if defined(__mips)
-#include <standards.h>
-#include <sys/endian.h>
+    #include <standards.h>
+    #include <sys/endian.h>
 #endif
 
 // MacOSX
 #ifdef __DARWIN_BYTE_ORDER
-#if __DARWIN_BYTE_ORDER==__DARWIN_BIG_ENDIAN
-#undef LITTLE_ENDIAN
-#else
-#undef BIG_ENDIAN
-#endif
+    #if __DARWIN_BYTE_ORDER==__DARWIN_BIG_ENDIAN
+        #undef LITTLE_ENDIAN
+    #else
+        #undef BIG_ENDIAN
+    #endif
 #endif
 
 #if defined(LITTLE_ENDIAN) \
  || defined(_LITTLE_ENDIAN) \
  || defined(__LITTLE_ENDIAN)
-#   define LITTLEENDIAN 1
+    #define LITTLEENDIAN 1
 #elif defined(BIG_ENDIAN) || defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN)
-#   undef LITTLEENDIAN
+    #undef LITTLEENDIAN
 #else
-#   error "Cannot find LITTLE_ENDIAN or BIG_ENDIAN symbol defined."
-#   error "Please add to compilation options"
+    #error "Cannot find LITTLE_ENDIAN or BIG_ENDIAN symbol defined."
+    #error "Please add to compilation options"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -85,9 +85,9 @@ void Foam::writeFuns::write
 {
     if (binary)
     {
-#       ifdef LITTLEENDIAN
+        #ifdef LITTLEENDIAN
         swapWords(fField.size(), reinterpret_cast<label*>(fField.begin()));
-#       endif
+        #endif
         os.write
         (
             reinterpret_cast<char*>(fField.begin()),
@@ -138,9 +138,9 @@ void Foam::writeFuns::write
 {
     if (binary)
     {
-#       ifdef LITTLEENDIAN
+        #ifdef LITTLEENDIAN
         swapWords(elems.size(), reinterpret_cast<label*>(elems.begin()));
-#       endif
+        #endif
         os.write
         (
             reinterpret_cast<char*>(elems.begin()),
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H
index 56df1d5237d3690611c62c9046b76a3fc8375390..1776eefe09e86d88737c60edc70f1f3cbf37bbcd 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -146,7 +146,7 @@ public:
     (
         std::ostream&,
         const bool binary,
-        const PtrList<GeometricField<Type, PatchField, GeoMesh> >&,
+        const PtrList<GeometricField<Type, PatchField, GeoMesh>>&,
         const vtkMesh&
     );
 
@@ -156,7 +156,7 @@ public:
     (
         std::ostream&,
         const bool binary,
-        const PtrList<DimensionedField<Type, volMesh> >&,
+        const PtrList<DimensionedField<Type, volMesh>>&,
         const vtkMesh&
     );
 
@@ -167,7 +167,7 @@ public:
         std::ostream&,
         const bool binary,
         const volPointInterpolation&,
-        const PtrList<GeometricField<Type, fvPatchField, volMesh> >&,
+        const PtrList<GeometricField<Type, fvPatchField, volMesh>>&,
         const vtkMesh&
     );
 };
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C
index 3082da1e6199bc454e75c848049c937e1724d613..6f0c368bec2e99de675fb21d8bd87c41b6a472bf 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ void Foam::writeFuns::write
 (
     std::ostream& os,
     const bool binary,
-    const PtrList<GeometricField<Type, PatchField, GeoMesh> >& flds,
+    const PtrList<GeometricField<Type, PatchField, GeoMesh>>& flds,
     const vtkMesh& vMesh
 )
 {
@@ -177,7 +177,7 @@ void Foam::writeFuns::write
 (
     std::ostream& os,
     const bool binary,
-    const PtrList<DimensionedField<Type, volMesh> >& flds,
+    const PtrList<DimensionedField<Type, volMesh>>& flds,
     const vtkMesh& vMesh
 )
 {
@@ -194,7 +194,7 @@ void Foam::writeFuns::write
     std::ostream& os,
     const bool binary,
     const volPointInterpolation& pInterp,
-    const PtrList<GeometricField<Type, fvPatchField, volMesh> >& flds,
+    const PtrList<GeometricField<Type, fvPatchField, volMesh>>& flds,
     const vtkMesh& vMesh
 )
 {
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean
index ca689294d1512a7befff159081394e31e0c26c68..47add82a9869c5cb2b9e8468f7e2c99f9baebc3f 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwclean
@@ -6,4 +6,4 @@ wclean libso vtkPV3Readers
 PV3blockMeshReader/Allwclean
 PV3FoamReader/Allwclean
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
index ae0915f2680fef5cceb7b00b604b2296bd5d9374..049c1bfca0e34f3d2fd475222458c9ad88106dbb 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
@@ -1,5 +1,9 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 #set -x
 
 case "$ParaView_VERSION" in
@@ -14,9 +18,9 @@ case "$ParaView_VERSION" in
         # ensure CMake gets the correct C++ compiler
         [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
 
-        wmake libso vtkPV3Readers
-        PV3blockMeshReader/Allwmake
-        PV3FoamReader/Allwmake
+        wmake $targetType vtkPV3Readers
+        PV3blockMeshReader/Allwmake $*
+        PV3FoamReader/Allwmake $*
     else
         echo "ERROR: ParaView not found in $ParaView_DIR"
     fi
@@ -26,4 +30,4 @@ case "$ParaView_VERSION" in
     ;;
 esac
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean
index 6d052fb73d666c674e966af1e7457cb261e6071f..7d374ba5ec71745d847cf580cb67a8ce1f8c22ca 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean
@@ -8,4 +8,4 @@ rm -f $FOAM_LIBBIN/libPV3FoamReader* 2>/dev/null
 rm -rf PV3FoamReader/Make
 wclean libso vtkPV3Foam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
index 93ce993d655c2bb5df9b087391b3d70f7547265c..08602d37edf03094b76a48165f7762c4c2031507 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
@@ -1,10 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
 then
-    wmake libso vtkPV3Foam
+    wmake $targetType vtkPV3Foam
     (
         cd PV3FoamReader
         mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
@@ -14,4 +18,4 @@ then
     )
 fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
index fedacab22deb76413a9dac9b5c3b91adae012e89..d7607f51b916573b2f943e9900d7d457db8249da 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -665,7 +665,7 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
         labelList nZones(pbMesh.size(), 0);
 
         // Per global zone number the average face centre position
-        List<DynamicList<point> > zoneCentre(pbMesh.size());
+        List<DynamicList<point>> zoneCentre(pbMesh.size());
 
 
         // Loop through all patches to determine zones, and centre of each zone
@@ -710,7 +710,7 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
             // Create storage for additional zone centres
             forAll(zoneNFaces, zoneI)
             {
-                zoneCentre[patchI].append(vector::zero);
+                zoneCentre[patchI].append(Zero);
             }
 
             // Do averaging per individual zone
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
index e21bd33fc9536eab4ee7e9e2677bf6fcfb18439b..ab6dc05c831eff0c486708622036c9c1dbc60c4c 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -497,7 +497,7 @@ class vtkPV3Foam
             void convertVolFields
             (
                 const fvMesh&,
-                const PtrList<PrimitivePatchInterpolation<primitivePatch> >&,
+                const PtrList<PrimitivePatchInterpolation<primitivePatch>>&,
                 const IOobjectList&,
                 const bool interpFields,
                 vtkMultiBlockDataSet* output
@@ -508,7 +508,7 @@ class vtkPV3Foam
             void convertVolFieldBlock
             (
                 const GeometricField<Type, fvPatchField, volMesh>&,
-                autoPtr<GeometricField<Type, pointPatchField, pointMesh> >&,
+                autoPtr<GeometricField<Type, pointPatchField, pointMesh>>&,
                 vtkMultiBlockDataSet* output,
                 const arrayRange&,
                 const List<polyDecomp>& decompLst
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C
index 6d0e98dd4072d635fa652e216e4c0a697d987079..0c0fa41c739dedc1fb93ec5ade71510bb2c4b1c5 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ void Foam::vtkPV3Foam::convertVolFields
     }
 
 
-    PtrList<PrimitivePatchInterpolation<primitivePatch> >
+    PtrList<PrimitivePatchInterpolation<primitivePatch>>
         ppInterpList(mesh.boundaryMesh().size());
 
     forAll(ppInterpList, i)
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
index 8235b13d0a8faec2fe6ded068a38d32cb02e7506..64638239881fb49013fc0442a638f1fc4a7ce1ff 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -325,7 +325,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
             // but avoids crashes when there is no vtkPolyhedron support
 
             // establish unique node ids used
-            HashSet<vtkIdType, Hash<label> > hashUniqId(2*256);
+            HashSet<vtkIdType, Hash<label>> hashUniqId(2*256);
 
             forAll(cFaces, cFaceI)
             {
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
index fde516ee442022ae8773c29dca51b6a1e651ab0c..fc1359845d56f6a9100c8be5f30ff3b405c30567 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -678,33 +678,33 @@ void Foam::vtkPV3Foam::updateInfoLagrangianFields()
         lagrangianPrefix/cloudName
     );
 
-    addToSelection<IOField<label> >
+    addToSelection<IOField<label>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<scalar> >
+    addToSelection<IOField<scalar>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<vector> >
+    addToSelection<IOField<vector>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<sphericalTensor> >
+    addToSelection<IOField<sphericalTensor>>
     (
         fieldSelection,
 
         objects
     );
-    addToSelection<IOField<symmTensor> >
+    addToSelection<IOField<symmTensor>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<tensor> >
+    addToSelection<IOField<tensor>>
     (
         fieldSelection,
         objects
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H
index 3ef9124979c528a001ce17ae11401548484d6810..02cf345d4acb774f5b4f47582d711dc02b21b935 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,27 +73,27 @@ void Foam::vtkPV3Foam::updateInfoFields
     IOobjectList objects(dbPtr_(), dbPtr_().timeName(), regionPrefix);
 
     //- Add volume fields to GUI
-    addToSelection<GeometricField<scalar, patchType, meshType> >
+    addToSelection<GeometricField<scalar, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<vector, patchType, meshType> >
+    addToSelection<GeometricField<vector, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<sphericalTensor, patchType, meshType> >
+    addToSelection<GeometricField<sphericalTensor, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<symmTensor, patchType, meshType> >
+    addToSelection<GeometricField<symmTensor, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<tensor, patchType, meshType> >
+    addToSelection<GeometricField<tensor, patchType, meshType>>
     (
         select,
         objects
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
index 57e6931c12173c505ac657ab6203b66c8caadd96..9e11686f205ca1971810774676f441fd2fb9b2fa 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ template<class Type>
 void Foam::vtkPV3Foam::convertVolFields
 (
     const fvMesh& mesh,
-    const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList,
+    const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
     const IOobjectList& objects,
     const bool interpFields,
     vtkMultiBlockDataSet* output
@@ -74,7 +74,7 @@ void Foam::vtkPV3Foam::convertVolFields
         );
 
         // Interpolated field (demand driven)
-        autoPtr<GeometricField<Type, pointPatchField, pointMesh> > ptfPtr;
+        autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
         if (interpFields)
         {
             if (debug)
@@ -144,7 +144,7 @@ void Foam::vtkPV3Foam::convertVolFields
 
             if
             (
-                isType<emptyFvPatchField<Type> >(ptf)
+                isType<emptyFvPatchField<Type>>(ptf)
              ||
                 (
                     reader_->GetExtrapolatePatches()
@@ -154,7 +154,7 @@ void Foam::vtkPV3Foam::convertVolFields
             {
                 fvPatch p(ptf.patch().patch(), tf.mesh().boundary());
 
-                tmp<Field<Type> > tpptf
+                tmp<Field<Type>> tpptf
                 (
                     fvPatchField<Type>(p, tf).patchInternalField()
                 );
@@ -284,7 +284,7 @@ template<class Type>
 void Foam::vtkPV3Foam::convertVolFieldBlock
 (
     const GeometricField<Type, fvPatchField, volMesh>& tf,
-    autoPtr<GeometricField<Type, pointPatchField, pointMesh> >& ptfPtr,
+    autoPtr<GeometricField<Type, pointPatchField, pointMesh>>& ptfPtr,
     vtkMultiBlockDataSet* output,
     const arrayRange& range,
     const List<polyDecomp>& decompLst
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean
index 4ce9a2a07ff01c6e50961fe3474a91c723e5454f..1e6cdb695c56e99d184b6262891bc9c605bc5f1a 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean
@@ -8,4 +8,4 @@ rm -f $FOAM_LIBBIN/libPV3blockMeshReader*  2>/dev/null
 rm -rf PV3blockMeshReader/Make
 wclean libso vtkPV3blockMesh
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
index 09e76eac497dd4d6e3c461defd6ab46dfbe6cf7b..48e136d2094bd4da2f14a0bfdf6d2e647cb327f7 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
@@ -1,10 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
 then
-    wmake libso vtkPV3blockMesh
+    wmake $targetType vtkPV3blockMesh
     (
         cd PV3blockMeshReader
         mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
@@ -14,4 +18,4 @@ then
     )
 fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean
deleted file mode 100755
index 524a715f448c97d86dda672c834427fd6232e46e..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-set -x
-
-wclean libso vtkPV4Readers
-PV4blockMeshReader/Allwclean
-PV4FoamReader/Allwclean
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean
deleted file mode 100755
index b6ef33f8637a9402b9ad3dc5e6e3059decf6250b..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-set -x
-
-# deal with client/server vs combined plugins
-rm -f $FOAM_LIBBIN/libPV4FoamReader* 2>/dev/null
-
-rm -rf PV4FoamReader/Make
-wclean libso vtkPV4Foam
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake
deleted file mode 100755
index 0728cf9f6acb2e5d1064a8ed2e77333db741a005..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-set -x
-
-if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
-then
-    wmake libso vtkPV4Foam
-    (
-        cd PV4FoamReader
-        mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
-        cd Make/$WM_OPTIONS
-        cmake ../..
-        make
-    )
-fi
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/files b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/files
deleted file mode 100644
index 548c4b8a93c2c43c4561b0899c1a8718c6b22fff..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/files
+++ /dev/null
@@ -1,11 +0,0 @@
-vtkPV4Foam.C
-vtkPV4FoamFields.C
-vtkPV4FoamMesh.C
-vtkPV4FoamMeshLagrangian.C
-vtkPV4FoamMeshSet.C
-vtkPV4FoamMeshVolume.C
-vtkPV4FoamMeshZone.C
-vtkPV4FoamUpdateInfo.C
-vtkPV4FoamUtils.C
-
-LIB = $(FOAM_LIBBIN)/libvtkPV4Foam
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean
deleted file mode 100755
index f735dbbe529bd301bdbc9749c6a41d762ed1c0c6..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-set -x
-
-# deal with client/server vs combined plugins
-rm -f $FOAM_LIBBIN/libPV4blockMeshReader*  2>/dev/null
-
-rm -rf PV4blockMeshReader/Make
-wclean libso vtkPV4blockMesh
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake
deleted file mode 100755
index a13503094cee6c0c01938dd704003428ca650114..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-set -x
-
-if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
-then
-    wmake libso vtkPV4blockMesh
-    (
-        cd PV4blockMeshReader
-        mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
-        cd Make/$WM_OPTIONS
-        cmake ../..
-        make
-    )
-fi
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/files b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/files
deleted file mode 100644
index 510637fa3f8110a84a2dbada30ec005fd24c3655..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/files
+++ /dev/null
@@ -1,5 +0,0 @@
-vtkPV4blockMesh.C
-vtkPV4blockMeshConvert.C
-vtkPV4blockMeshUtils.C
-
-LIB = $(FOAM_LIBBIN)/libvtkPV4blockMesh
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/files b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/files
deleted file mode 100644
index 39feee713db0cdd440171cbcb2fd48cd95d530fd..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-vtkPV4Readers.C
-
-LIB = $(FOAM_LIBBIN)/libvtkPV4Readers
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/options b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/options
deleted file mode 100644
index 11c006c3bea328b82dc705da5f4b29e830c23635..0000000000000000000000000000000000000000
--- a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/options
+++ /dev/null
@@ -1,5 +0,0 @@
-EXE_INC = \
-    -I$(ParaView_INCLUDE_DIR)
-
-LIB_LIBS = \
-    $(GLIBS)
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean
new file mode 100755
index 0000000000000000000000000000000000000000..0e2ae161c35d20d75df54377994b0aa657631df5
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean
@@ -0,0 +1,9 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+set -x
+
+wclean libso vtkPVReaders
+PVblockMeshReader/Allwclean
+PVFoamReader/Allwclean
+
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake
similarity index 55%
rename from applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
rename to applications/utilities/postProcessing/graphics/PVReaders/Allwmake
index 6f6e56b9d8d1aae68567258138c6b946639144f6..edaa31a37b0f0220cb1da079cf87b7c37a74e51f 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake
@@ -1,9 +1,13 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 #set -x
 
 case "$ParaView_VERSION" in
-4*)
+4* | 5*)
     if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
     then
         [ -n "$PV_PLUGIN_PATH" ] || {
@@ -14,16 +18,16 @@ case "$ParaView_VERSION" in
         # ensure CMake gets the correct C++ compiler
         [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
 
-        wmake libso vtkPV4Readers
-        PV4blockMeshReader/Allwmake
-        PV4FoamReader/Allwmake
+        wmake $targetType vtkPVReaders
+        PVblockMeshReader/Allwmake $*
+        PVFoamReader/Allwmake $*
     else
         echo "ERROR: ParaView not found in $ParaView_DIR"
     fi
     ;;
 *)
-    echo "WARN: PV4 readers not building: ParaView_VERSION=$ParaView_VERSION"
+    echo "WARN: PV readers not building: ParaView_VERSION=$ParaView_VERSION"
     ;;
 esac
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean
new file mode 100755
index 0000000000000000000000000000000000000000..59f8be2f21c4c4b45ba93354d93a29da336b4d5a
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwclean
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+set -x
+
+# deal with client/server vs combined plugins
+rm -f $FOAM_LIBBIN/libPVFoamReader* 2>/dev/null
+
+rm -rf PVFoamReader/Make
+wclean libso vtkPVFoam
+
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake
new file mode 100755
index 0000000000000000000000000000000000000000..70b8845d4bd7c93a1edbec99c57d8458dae054f4
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake
@@ -0,0 +1,21 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+set -x
+
+if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
+then
+    wmake $targetType vtkPVFoam
+    (
+        cd PVFoamReader
+        mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
+        cd Make/$WM_OPTIONS
+        cmake ../..
+        make
+    )
+fi
+
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
similarity index 73%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
index 65c25ae50724fcd8afc8c9dc4032d578d6b34ea4..fbaedcfb30a1122f68f888090b6ac8c66d513417 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt
@@ -21,10 +21,11 @@ INCLUDE_DIRECTORIES(
     $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
     $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
     $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
-    ${PROJECT_SOURCE_DIR}/../vtkPV4Foam
+    ${PROJECT_SOURCE_DIR}/../vtkPVFoam
 )
 
 ADD_DEFINITIONS(
+    -std=c++0x
     -DWM_$ENV{WM_PRECISION_OPTION}
     -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
 )
@@ -42,41 +43,41 @@ SET(
 #
 
 # Extend the auto-generated panel
-QT4_WRAP_CPP(MOC_SRCS pqPV4FoamReaderPanel.h)
+QT4_WRAP_CPP(MOC_SRCS pqPVFoamReaderPanel.h)
 
 ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
-  CLASS_NAME pqPV4FoamReaderPanel
-  XML_NAME  PV4FoamReader  # name of SourceProxy in *SM.xml
+  CLASS_NAME pqPVFoamReaderPanel
+  XML_NAME  PVFoamReader  # name of SourceProxy in *SM.xml
   XML_GROUP sources
 )
 
 IF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
     ADD_PARAVIEW_PLUGIN(
-        PV4FoamReader_SM "1.0"
-        SERVER_MANAGER_XML PV4FoamReader_SM.xml
-        SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
+        PVFoamReader_SM "1.0"
+        SERVER_MANAGER_XML PVFoamReader_SM.xml
+        SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
         GUI_INTERFACES ${IFACES}
-        GUI_SOURCES pqPV4FoamReaderPanel.cxx
+        GUI_SOURCES pqPVFoamReaderPanel.cxx
             ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
-        GUI_RESOURCE_FILES PV4FoamReader.xml
+        GUI_RESOURCE_FILES PVFoamReader.xml
     )
 ELSE("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
     ADD_PARAVIEW_PLUGIN(
-        PV4FoamReader_SM "1.0"
-        SERVER_MANAGER_XML PV4FoamReader_SM.xml
-        SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
+        PVFoamReader_SM "1.0"
+        SERVER_MANAGER_XML PVFoamReader_SM.xml
+        SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx
         GUI_INTERFACES ${IFACES}
-        GUI_SOURCES pqPV4FoamReaderPanel.cxx
+        GUI_SOURCES pqPVFoamReaderPanel.cxx
             ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
     )
 ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
 
 TARGET_LINK_LIBRARIES(
-    PV4FoamReader_SM
+    PVFoamReader_SM
     LINK_PUBLIC
     OpenFOAM
     finiteVolume
-    vtkPV4Foam
+    vtkPVFoam
 )
 
 #-----------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.qrc b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.qrc
similarity index 65%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.qrc
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.qrc
index c5bfc27b71bcdcb4455b206e3470a1e35556ef09..9bb30ea5c092c45aaa7e8b92f157197d91fb1b2f 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.qrc
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.qrc
@@ -1,5 +1,5 @@
 <RCC>
     <qresource prefix="/ParaViewResources" >
-        <file>PV4FoamReader.xml</file>
+        <file>PVFoamReader.xml</file>
     </qresource>
 </RCC>
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.xml
similarity index 80%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.xml
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.xml
index bb940768de226774c9e098a90fd846e865d61e50..aef46449b349bae63421e3177a6287a041c24a40 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader.xml
@@ -1,5 +1,5 @@
 <ParaViewReaders>
-  <Reader name="PV4FoamReader"
+  <Reader name="PVFoamReader"
           extensions="OpenFOAM"
           file_description="OpenFOAM Reader">
   </Reader>
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
similarity index 99%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
index c0e92cfb774a7cf8e755a2fa1272cfbf5ddd7d7e..69bcfc0962555f3b32f8434cf6fd9fd8066514fd 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
@@ -1,8 +1,8 @@
 <ServerManagerConfiguration>
   <ProxyGroup name="sources">
   <SourceProxy
-    name="PV4FoamReader"
-    class="vtkPV4FoamReader">
+    name="PVFoamReader"
+    class="vtkPVFoamReader">
 
     <!-- File name - compulsory -->
     <StringVectorProperty
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.cxx
similarity index 95%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.cxx
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.cxx
index 775ed90c3873a5b2ced5982e9ad7e32547beab05..521068d4099f4f359fa62037732e294d06eaa184 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.cxx
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "pqPV4FoamReaderPanel.h"
+#include "pqPVFoamReaderPanel.h"
 
 // QT
 #include <QGridLayout>
@@ -50,7 +50,7 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-pqPV4FoamReaderPanel::pqPV4FoamReaderPanel
+pqPVFoamReaderPanel::pqPVFoamReaderPanel
 (
     pqProxy *proxy,
     QWidget *p
@@ -356,7 +356,7 @@ pqPV4FoamReaderPanel::pqPV4FoamReaderPanel
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void pqPV4FoamReaderPanel::CacheMeshToggled()
+void pqPVFoamReaderPanel::CacheMeshToggled()
 {
     vtkSMIntVectorProperty::SafeDownCast
     (
@@ -365,7 +365,7 @@ void pqPV4FoamReaderPanel::CacheMeshToggled()
 }
 
 
-void pqPV4FoamReaderPanel::RefreshPressed()
+void pqPVFoamReaderPanel::RefreshPressed()
 {
     // update everything
     vtkSMIntVectorProperty::SafeDownCast
@@ -380,7 +380,7 @@ void pqPV4FoamReaderPanel::RefreshPressed()
 }
 
 
-void pqPV4FoamReaderPanel::ZeroTimeToggled()
+void pqPVFoamReaderPanel::ZeroTimeToggled()
 {
     vtkSMIntVectorProperty::SafeDownCast
     (
@@ -391,7 +391,7 @@ void pqPV4FoamReaderPanel::ZeroTimeToggled()
 }
 
 
-void pqPV4FoamReaderPanel::ShowPatchNamesToggled()
+void pqPVFoamReaderPanel::ShowPatchNamesToggled()
 {
     vtkSMIntVectorProperty::SafeDownCast
     (
@@ -408,7 +408,7 @@ void pqPV4FoamReaderPanel::ShowPatchNamesToggled()
 }
 
 
-void pqPV4FoamReaderPanel::ShowGroupsOnlyToggled()
+void pqPVFoamReaderPanel::ShowGroupsOnlyToggled()
 {
     vtkSMProperty* prop;
 
@@ -424,7 +424,7 @@ void pqPV4FoamReaderPanel::ShowGroupsOnlyToggled()
 }
 
 
-void pqPV4FoamReaderPanel::IncludeSetsToggled()
+void pqPVFoamReaderPanel::IncludeSetsToggled()
 {
     vtkSMProperty* prop;
 
@@ -440,7 +440,7 @@ void pqPV4FoamReaderPanel::IncludeSetsToggled()
 }
 
 
-void pqPV4FoamReaderPanel::IncludeZonesToggled()
+void pqPVFoamReaderPanel::IncludeZonesToggled()
 {
     vtkSMProperty* prop;
 
@@ -456,7 +456,7 @@ void pqPV4FoamReaderPanel::IncludeZonesToggled()
 }
 
 
-void pqPV4FoamReaderPanel::ExtrapolatePatchesToggled()
+void pqPVFoamReaderPanel::ExtrapolatePatchesToggled()
 {
     vtkSMProperty* prop;
 
@@ -469,7 +469,7 @@ void pqPV4FoamReaderPanel::ExtrapolatePatchesToggled()
 }
 
 
-void pqPV4FoamReaderPanel::InterpolateVolFieldsToggled()
+void pqPVFoamReaderPanel::InterpolateVolFieldsToggled()
 {
     vtkSMProperty* prop;
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.h
similarity index 87%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.h
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.h
index 3f641e271d02ea2de5e963e619af627c094d2396..2bdeaa6028b6c3a919309bffdea030b5dd3c8990 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqPVFoamReaderPanel.h
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,19 +22,19 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    pqPV4FoamReaderPanel
+    pqPVFoamReaderPanel
 
 Description
     GUI modifications for the ParaView reader panel
 
-    A custom panel for the PV4FoamReader.
+    A custom panel for the PVFoamReader.
 
 SourceFiles
-    pqPV4FoamReaderPanel.cxx
+    pqPVFoamReaderPanel.cxx
 
 \*---------------------------------------------------------------------------*/
-#ifndef pqPV4FoamReaderPanel_h
-#define pqPV4FoamReaderPanel_h
+#ifndef pqPVFoamReaderPanel_h
+#define pqPVFoamReaderPanel_h
 
 
 #include "pqAutoGeneratedObjectPanel.h"
@@ -51,10 +51,10 @@ class vtkSMSourceProxy;
 
 
 /*---------------------------------------------------------------------------*\
-                  Class pqPV4FoamReaderPanel Declaration
+                  Class pqPVFoamReaderPanel Declaration
 \*---------------------------------------------------------------------------*/
 
-class pqPV4FoamReaderPanel
+class pqPVFoamReaderPanel
 :
     public pqAutoGeneratedObjectPanel
 {
@@ -105,11 +105,11 @@ public:
     // Constructors
 
         //- Construct from components
-        pqPV4FoamReaderPanel(pqProxy*, QWidget*);
+        pqPVFoamReaderPanel(pqProxy*, QWidget*);
 
 
     //- Destructor
-    // virtual ~pqPV4FoamReaderPanel();
+    // virtual ~pqPVFoamReaderPanel();
 };
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
similarity index 85%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
index 176895b668503e02e83617c7ba125c546ea75891..03984210658f9a620b6c08701e92e57756521549 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 \*---------------------------------------------------------------------------*/
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoamReader.h"
 
 #include "pqApplicationCore.h"
 #include "pqRenderView.h"
@@ -40,18 +40,18 @@ License
 #include "vtkStringArray.h"
 
 // OpenFOAM includes
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 #undef EXPERIMENTAL_TIME_CACHING
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-vtkStandardNewMacro(vtkPV4FoamReader);
+vtkStandardNewMacro(vtkPVFoamReader);
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-vtkPV4FoamReader::vtkPV4FoamReader()
+vtkPVFoamReader::vtkPVFoamReader()
 {
     Debug = 0;
     vtkDebugMacro(<<"Constructor");
@@ -63,7 +63,7 @@ vtkPV4FoamReader::vtkPV4FoamReader()
 
     output0_  = NULL;
 
-#ifdef VTKPV4FOAM_DUALPORT
+#ifdef VTKPVFOAM_DUALPORT
     // Add second output for the Lagrangian
     this->SetNumberOfOutputPorts(2);
     vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New();
@@ -100,7 +100,7 @@ vtkPV4FoamReader::vtkPV4FoamReader()
     SelectionObserver = vtkCallbackCommand::New();
     SelectionObserver->SetCallback
     (
-        &vtkPV4FoamReader::SelectionModifiedCallback
+        &vtkPVFoamReader::SelectionModifiedCallback
     );
     SelectionObserver->SetClientData(this);
 
@@ -129,7 +129,7 @@ vtkPV4FoamReader::vtkPV4FoamReader()
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-vtkPV4FoamReader::~vtkPV4FoamReader()
+vtkPVFoamReader::~vtkPVFoamReader()
 {
     vtkDebugMacro(<<"Deconstructor");
 
@@ -168,7 +168,7 @@ vtkPV4FoamReader::~vtkPV4FoamReader()
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 // Do everything except set the output info
-int vtkPV4FoamReader::RequestInformation
+int vtkPVFoamReader::RequestInformation
 (
     vtkInformation* vtkNotUsed(request),
     vtkInformationVector** vtkNotUsed(inputVector),
@@ -177,7 +177,7 @@ int vtkPV4FoamReader::RequestInformation
 {
     vtkDebugMacro(<<"RequestInformation");
 
-    if (Foam::vtkPV4Foam::debug)
+    if (Foam::vtkPVFoam::debug)
     {
         cout<<"REQUEST_INFORMATION\n";
     }
@@ -190,7 +190,7 @@ int vtkPV4FoamReader::RequestInformation
 
     int nInfo = outputVector->GetNumberOfInformationObjects();
 
-    if (Foam::vtkPV4Foam::debug)
+    if (Foam::vtkPVFoam::debug)
     {
         cout<<"RequestInformation with " << nInfo << " item(s)\n";
         for (int infoI = 0; infoI < nInfo; ++infoI)
@@ -201,7 +201,7 @@ int vtkPV4FoamReader::RequestInformation
 
     if (!foamData_)
     {
-        foamData_ = new Foam::vtkPV4Foam(FileName, this);
+        foamData_ = new Foam::vtkPVFoam(FileName, this);
     }
     else
     {
@@ -238,7 +238,7 @@ int vtkPV4FoamReader::RequestInformation
         timeRange[0] = timeSteps[0];
         timeRange[1] = timeSteps[nTimeSteps-1];
 
-        if (Foam::vtkPV4Foam::debug > 1)
+        if (Foam::vtkPVFoam::debug > 1)
         {
             cout<<"nTimeSteps " << nTimeSteps << "\n"
                 <<"timeRange " << timeRange[0] << " to " << timeRange[1]
@@ -268,7 +268,7 @@ int vtkPV4FoamReader::RequestInformation
 
 
 // Set the output info
-int vtkPV4FoamReader::RequestData
+int vtkPVFoamReader::RequestData
 (
     vtkInformation* vtkNotUsed(request),
     vtkInformationVector** vtkNotUsed(inputVector),
@@ -292,7 +292,7 @@ int vtkPV4FoamReader::RequestData
 
     int nInfo = outputVector->GetNumberOfInformationObjects();
 
-    if (Foam::vtkPV4Foam::debug)
+    if (Foam::vtkPVFoam::debug)
     {
         cout<<"RequestData with " << nInfo << " item(s)\n";
         for (int infoI = 0; infoI < nInfo; ++infoI)
@@ -310,7 +310,7 @@ int vtkPV4FoamReader::RequestData
     // taking port0 as the lead for other outputs would be nice, but fails when
     // a filter is added - we need to check everything
     // but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic
-    // to the vtkPV4Foam::setTime() method
+    // to the vtkPVFoam::setTime() method
     for (int infoI = 0; infoI < nInfo; ++infoI)
     {
         vtkInformation *outInfo = outputVector->GetInformationObject(infoI);
@@ -342,7 +342,7 @@ int vtkPV4FoamReader::RequestData
         )
     );
 
-    if (Foam::vtkPV4Foam::debug)
+    if (Foam::vtkPVFoam::debug)
     {
         cout<< "update output with "
             << output->GetNumberOfBlocks() << " blocks\n";
@@ -370,7 +370,7 @@ int vtkPV4FoamReader::RequestData
         output->ShallowCopy(output0_);
     }
 
-    if (Foam::vtkPV4Foam::debug)
+    if (Foam::vtkPVFoam::debug)
     {
         if (needsUpdate)
         {
@@ -390,7 +390,7 @@ int vtkPV4FoamReader::RequestData
 
 #else
 
-#ifdef VTKPV4FOAM_DUALPORT
+#ifdef VTKPVFOAM_DUALPORT
     foamData_->Update
     (
         output,
@@ -417,13 +417,13 @@ int vtkPV4FoamReader::RequestData
 }
 
 
-void vtkPV4FoamReader::SetRefresh(int val)
+void vtkPVFoamReader::SetRefresh(int val)
 {
     Modified();
 }
 
 
-void vtkPV4FoamReader::SetIncludeSets(int val)
+void vtkPVFoamReader::SetIncludeSets(int val)
 {
     if (IncludeSets != val)
     {
@@ -436,7 +436,7 @@ void vtkPV4FoamReader::SetIncludeSets(int val)
 }
 
 
-void vtkPV4FoamReader::SetIncludeZones(int val)
+void vtkPVFoamReader::SetIncludeZones(int val)
 {
     if (IncludeZones != val)
     {
@@ -449,7 +449,7 @@ void vtkPV4FoamReader::SetIncludeZones(int val)
 }
 
 
-void vtkPV4FoamReader::SetShowPatchNames(int val)
+void vtkPVFoamReader::SetShowPatchNames(int val)
 {
     if (ShowPatchNames != val)
     {
@@ -459,7 +459,7 @@ void vtkPV4FoamReader::SetShowPatchNames(int val)
 }
 
 
-void vtkPV4FoamReader::SetShowGroupsOnly(int val)
+void vtkPVFoamReader::SetShowGroupsOnly(int val)
 {
     if (ShowGroupsOnly != val)
     {
@@ -472,7 +472,7 @@ void vtkPV4FoamReader::SetShowGroupsOnly(int val)
 }
 
 
-void vtkPV4FoamReader::updatePatchNamesView(const bool show)
+void vtkPVFoamReader::updatePatchNamesView(const bool show)
 {
     pqApplicationCore* appCore = pqApplicationCore::instance();
 
@@ -506,7 +506,7 @@ void vtkPV4FoamReader::updatePatchNamesView(const bool show)
 }
 
 
-void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent)
+void vtkPVFoamReader::PrintSelf(ostream& os, vtkIndent indent)
 {
     vtkDebugMacro(<<"PrintSelf");
 
@@ -522,7 +522,7 @@ void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent)
 }
 
 
-int vtkPV4FoamReader::GetTimeStep()
+int vtkPVFoamReader::GetTimeStep()
 {
     return foamData_ ? foamData_->timeIndex() : -1;
 }
@@ -531,35 +531,35 @@ int vtkPV4FoamReader::GetTimeStep()
 // ----------------------------------------------------------------------
 // Parts selection list control
 
-vtkDataArraySelection* vtkPV4FoamReader::GetPartSelection()
+vtkDataArraySelection* vtkPVFoamReader::GetPartSelection()
 {
     vtkDebugMacro(<<"GetPartSelection");
     return PartSelection;
 }
 
 
-int vtkPV4FoamReader::GetNumberOfPartArrays()
+int vtkPVFoamReader::GetNumberOfPartArrays()
 {
     vtkDebugMacro(<<"GetNumberOfPartArrays");
     return PartSelection->GetNumberOfArrays();
 }
 
 
-const char* vtkPV4FoamReader::GetPartArrayName(int index)
+const char* vtkPVFoamReader::GetPartArrayName(int index)
 {
     vtkDebugMacro(<<"GetPartArrayName");
     return PartSelection->GetArrayName(index);
 }
 
 
-int vtkPV4FoamReader::GetPartArrayStatus(const char* name)
+int vtkPVFoamReader::GetPartArrayStatus(const char* name)
 {
     vtkDebugMacro(<<"GetPartArrayStatus");
     return PartSelection->ArrayIsEnabled(name);
 }
 
 
-void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status)
+void vtkPVFoamReader::SetPartArrayStatus(const char* name, int status)
 {
     vtkDebugMacro("Set mesh part \"" << name << "\" status to: " << status);
 
@@ -577,35 +577,35 @@ void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status)
 // ----------------------------------------------------------------------
 // volField selection list control
 
-vtkDataArraySelection* vtkPV4FoamReader::GetVolFieldSelection()
+vtkDataArraySelection* vtkPVFoamReader::GetVolFieldSelection()
 {
     vtkDebugMacro(<<"GetVolFieldSelection");
     return VolFieldSelection;
 }
 
 
-int vtkPV4FoamReader::GetNumberOfVolFieldArrays()
+int vtkPVFoamReader::GetNumberOfVolFieldArrays()
 {
     vtkDebugMacro(<<"GetNumberOfVolFieldArrays");
     return VolFieldSelection->GetNumberOfArrays();
 }
 
 
-const char* vtkPV4FoamReader::GetVolFieldArrayName(int index)
+const char* vtkPVFoamReader::GetVolFieldArrayName(int index)
 {
     vtkDebugMacro(<<"GetVolFieldArrayName");
     return VolFieldSelection->GetArrayName(index);
 }
 
 
-int vtkPV4FoamReader::GetVolFieldArrayStatus(const char* name)
+int vtkPVFoamReader::GetVolFieldArrayStatus(const char* name)
 {
     vtkDebugMacro(<<"GetVolFieldArrayStatus");
     return VolFieldSelection->ArrayIsEnabled(name);
 }
 
 
-void vtkPV4FoamReader::SetVolFieldArrayStatus(const char* name, int status)
+void vtkPVFoamReader::SetVolFieldArrayStatus(const char* name, int status)
 {
     vtkDebugMacro(<<"SetVolFieldArrayStatus");
     if (status)
@@ -622,35 +622,35 @@ void vtkPV4FoamReader::SetVolFieldArrayStatus(const char* name, int status)
 // ----------------------------------------------------------------------
 // pointField selection list control
 
-vtkDataArraySelection* vtkPV4FoamReader::GetPointFieldSelection()
+vtkDataArraySelection* vtkPVFoamReader::GetPointFieldSelection()
 {
     vtkDebugMacro(<<"GetPointFieldSelection");
     return PointFieldSelection;
 }
 
 
-int vtkPV4FoamReader::GetNumberOfPointFieldArrays()
+int vtkPVFoamReader::GetNumberOfPointFieldArrays()
 {
     vtkDebugMacro(<<"GetNumberOfPointFieldArrays");
     return PointFieldSelection->GetNumberOfArrays();
 }
 
 
-const char* vtkPV4FoamReader::GetPointFieldArrayName(int index)
+const char* vtkPVFoamReader::GetPointFieldArrayName(int index)
 {
     vtkDebugMacro(<<"GetPointFieldArrayName");
     return PointFieldSelection->GetArrayName(index);
 }
 
 
-int vtkPV4FoamReader::GetPointFieldArrayStatus(const char* name)
+int vtkPVFoamReader::GetPointFieldArrayStatus(const char* name)
 {
     vtkDebugMacro(<<"GetPointFieldArrayStatus");
     return PointFieldSelection->ArrayIsEnabled(name);
 }
 
 
-void vtkPV4FoamReader::SetPointFieldArrayStatus(const char* name, int status)
+void vtkPVFoamReader::SetPointFieldArrayStatus(const char* name, int status)
 {
     vtkDebugMacro(<<"SetPointFieldArrayStatus");
     if (status)
@@ -667,35 +667,35 @@ void vtkPV4FoamReader::SetPointFieldArrayStatus(const char* name, int status)
 // ----------------------------------------------------------------------
 // lagrangianField selection list control
 
-vtkDataArraySelection* vtkPV4FoamReader::GetLagrangianFieldSelection()
+vtkDataArraySelection* vtkPVFoamReader::GetLagrangianFieldSelection()
 {
     vtkDebugMacro(<<"GetLagrangianFieldSelection");
     return LagrangianFieldSelection;
 }
 
 
-int vtkPV4FoamReader::GetNumberOfLagrangianFieldArrays()
+int vtkPVFoamReader::GetNumberOfLagrangianFieldArrays()
 {
     vtkDebugMacro(<<"GetNumberOfLagrangianFieldArrays");
     return LagrangianFieldSelection->GetNumberOfArrays();
 }
 
 
-const char* vtkPV4FoamReader::GetLagrangianFieldArrayName(int index)
+const char* vtkPVFoamReader::GetLagrangianFieldArrayName(int index)
 {
     vtkDebugMacro(<<"GetLagrangianFieldArrayName");
     return LagrangianFieldSelection->GetArrayName(index);
 }
 
 
-int vtkPV4FoamReader::GetLagrangianFieldArrayStatus(const char* name)
+int vtkPVFoamReader::GetLagrangianFieldArrayStatus(const char* name)
 {
     vtkDebugMacro(<<"GetLagrangianFieldArrayStatus");
     return LagrangianFieldSelection->ArrayIsEnabled(name);
 }
 
 
-void vtkPV4FoamReader::SetLagrangianFieldArrayStatus
+void vtkPVFoamReader::SetLagrangianFieldArrayStatus
 (
     const char* name,
     int status
@@ -715,7 +715,7 @@ void vtkPV4FoamReader::SetLagrangianFieldArrayStatus
 
 // ----------------------------------------------------------------------
 
-void vtkPV4FoamReader::SelectionModifiedCallback
+void vtkPVFoamReader::SelectionModifiedCallback
 (
     vtkObject*,
     unsigned long,
@@ -723,18 +723,18 @@ void vtkPV4FoamReader::SelectionModifiedCallback
     void*
 )
 {
-    static_cast<vtkPV4FoamReader*>(clientdata)->SelectionModified();
+    static_cast<vtkPVFoamReader*>(clientdata)->SelectionModified();
 }
 
 
-void vtkPV4FoamReader::SelectionModified()
+void vtkPVFoamReader::SelectionModified()
 {
     vtkDebugMacro(<<"SelectionModified");
     Modified();
 }
 
 
-int vtkPV4FoamReader::FillOutputPortInformation
+int vtkPVFoamReader::FillOutputPortInformation
 (
     int port,
     vtkInformation* info
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.h
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
index 0b898e3a9cc90138c56a42f013bbc765e62c7468..d29b80e1ff229886342f223350eabe6825714165 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,21 +22,21 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    vtkPV4FoamReader
+    vtkPVFoamReader
 
 Description
     reads a dataset in OpenFOAM format
 
-    vtkPV4blockMeshReader creates an multiblock dataset.
+    vtkPVblockMeshReader creates an multiblock dataset.
     It uses the OpenFOAM infrastructure (fvMesh, etc) to handle mesh and
     field data.
 
 SourceFiles
-    vtkPV4blockMeshReader.cxx
+    vtkPVblockMeshReader.cxx
 
 \*---------------------------------------------------------------------------*/
-#ifndef vtkPV4FoamReader_h
-#define vtkPV4FoamReader_h
+#ifndef vtkPVFoamReader_h
+#define vtkPVFoamReader_h
 
 // VTK includes
 #include "vtkMultiBlockDataSetAlgorithm.h"
@@ -50,23 +50,23 @@ class vtkCallbackCommand;
 // OpenFOAM forward declarations
 namespace Foam
 {
-    class vtkPV4Foam;
+    class vtkPVFoam;
 }
 
 
 /*---------------------------------------------------------------------------*\
-                     Class vtkPV4FoamReader Declaration
+                     Class vtkPVFoamReader Declaration
 \*---------------------------------------------------------------------------*/
 
-class vtkPV4FoamReader
+class vtkPVFoamReader
 :
     public vtkMultiBlockDataSetAlgorithm
 {
 public:
-    vtkTypeMacro(vtkPV4FoamReader, vtkMultiBlockDataSetAlgorithm);
+    vtkTypeMacro(vtkPVFoamReader, vtkMultiBlockDataSetAlgorithm);
     void PrintSelf(ostream&, vtkIndent);
 
-    static vtkPV4FoamReader* New();
+    static vtkPVFoamReader* New();
 
     // Description:
     // Get the current timestep and the timestep range.
@@ -184,10 +184,10 @@ public:
 protected:
 
     //- Construct null
-    vtkPV4FoamReader();
+    vtkPVFoamReader();
 
     //- Destructor
-    ~vtkPV4FoamReader();
+    ~vtkPVFoamReader();
 
     //- Return information about mesh, times, etc without loading anything
     virtual int RequestInformation
@@ -218,10 +218,10 @@ protected:
 private:
 
     //- Disallow default bitwise copy construct
-    vtkPV4FoamReader(const vtkPV4FoamReader&);
+    vtkPVFoamReader(const vtkPVFoamReader&);
 
     //- Disallow default bitwise assignment
-    void operator=(const vtkPV4FoamReader&);
+    void operator=(const vtkPVFoamReader&);
 
     //- Add/remove patch names to/from the view
     void updatePatchNamesView(const bool show);
@@ -251,7 +251,7 @@ private:
     vtkMultiBlockDataSet* output0_;
 
     //BTX
-    Foam::vtkPV4Foam* foamData_;
+    Foam::vtkPVFoam* foamData_;
     //ETX
 };
 
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/files b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..b26829761d796f7fb3dbc70fb6c1e5a4ff822c87
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/files
@@ -0,0 +1,11 @@
+vtkPVFoam.C
+vtkPVFoamFields.C
+vtkPVFoamMesh.C
+vtkPVFoamMeshLagrangian.C
+vtkPVFoamMeshSet.C
+vtkPVFoamMeshVolume.C
+vtkPVFoamMeshZone.C
+vtkPVFoamUpdateInfo.C
+vtkPVFoamUtils.C
+
+LIB = $(FOAM_LIBBIN)/libvtkPVFoam
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options
similarity index 79%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/options
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options
index 2ca47f135daa889e329dbc054ae3ea861fd62c71..a78b301d97e675bbe65bedacec923e44d47735d4 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/options
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/Make/options
@@ -5,9 +5,10 @@ EXE_INC = \
     -I$(LIB_SRC)/finiteVolume/lnInclude \
     -I$(LIB_SRC)/dynamicMesh/lnInclude \
     -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-    -I../../vtkPV4Readers/lnInclude \
-    -I../PV4FoamReader \
+    -I../../vtkPVReaders/lnInclude \
+    -I../PVFoamReader \
     -I$(ParaView_INCLUDE_DIR) \
+    -I$(ParaView_INCLUDE_DIR)/vtkkwiml \
     $(shell \
         test -f $(ParaView_INCLUDE_DIR)/vtkPolyhedron.h && \
         echo "-DHAS_VTK_POLYHEDRON" || echo "-UHAS_VTK_POLYHEDRON" \
@@ -19,5 +20,5 @@ LIB_LIBS = \
     -ldynamicMesh \
     -lgenericPatchFields \
     -llagrangian \
-    -L$(FOAM_LIBBIN) -lvtkPV4Readers \
+    -L$(FOAM_LIBBIN) -lvtkPVReaders \
     $(GLIBS)
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkOpenFOAMPoints.H
similarity index 96%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMPoints.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkOpenFOAMPoints.H
index a41fe2730dafbd8806b79457d2a96c9e05dda245..2a45d73b2afe070876ae71224c3cec9ca5e60f8e 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMPoints.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkOpenFOAMPoints.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMTupleRemap.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkOpenFOAMTupleRemap.H
similarity index 96%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMTupleRemap.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkOpenFOAMTupleRemap.H
index b8358b57fe668f38d0ad4b4ba75bea30fb05074a..610eac4f3478102e6877a2316ed270d42e588ce6 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMTupleRemap.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkOpenFOAMTupleRemap.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
index 4e31b83811a948fad091e4aefe8d06932870c732..15d67503dee08959ee3b8d994f6a2ae55b8816da 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoam.H"
+#include "vtkPVFoamReader.h"
 
 // OpenFOAM includes
 #include "fvMesh.H"
@@ -42,16 +42,16 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(vtkPV4Foam, 0);
+defineTypeNameAndDebug(vtkPVFoam, 0);
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-#include "vtkPV4FoamAddToSelection.H"
-#include "vtkPV4FoamUpdateInfoFields.H"
+#include "vtkPVFoamAddToSelection.H"
+#include "vtkPVFoamUpdateInfoFields.H"
 
-void Foam::vtkPV4Foam::resetCounters()
+void Foam::vtkPVFoam::resetCounters()
 {
     // Reset array range information (ids and sizes)
     arrayRangeVolume_.reset();
@@ -66,7 +66,7 @@ void Foam::vtkPV4Foam::resetCounters()
 }
 
 
-void Foam::vtkPV4Foam::reduceMemory()
+void Foam::vtkPVFoam::reduceMemory()
 {
     forAll(regionPolyDecomp_, i)
     {
@@ -91,7 +91,7 @@ void Foam::vtkPV4Foam::reduceMemory()
 }
 
 
-int Foam::vtkPV4Foam::setTime(int nRequest, const double requestTimes[])
+int Foam::vtkPVFoam::setTime(int nRequest, const double requestTimes[])
 {
     Time& runTime = dbPtr_();
 
@@ -116,7 +116,7 @@ int Foam::vtkPV4Foam::setTime(int nRequest, const double requestTimes[])
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::setTime(";
+        Info<< "<beg> Foam::vtkPVFoam::setTime(";
         for (int requestI = 0; requestI < nRequest; ++requestI)
         {
             if (requestI)
@@ -160,7 +160,7 @@ int Foam::vtkPV4Foam::setTime(int nRequest, const double requestTimes[])
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::setTime() - selectedTime="
+        Info<< "<end> Foam::vtkPVFoam::setTime() - selectedTime="
             << Times[nearestIndex].name() << " index=" << timeIndex_
             << "/" << Times.size()
             << " meshChanged=" << Switch(meshChanged_)
@@ -171,11 +171,11 @@ int Foam::vtkPV4Foam::setTime(int nRequest, const double requestTimes[])
 }
 
 
-void Foam::vtkPV4Foam::updateMeshPartsStatus()
+void Foam::vtkPVFoam::updateMeshPartsStatus()
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateMeshPartsStatus" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::updateMeshPartsStatus" << endl;
     }
 
     vtkDataArraySelection* selection = reader_->GetPartSelection();
@@ -212,17 +212,17 @@ void Foam::vtkPV4Foam::updateMeshPartsStatus()
     }
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::updateMeshPartsStatus" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateMeshPartsStatus" << endl;
     }
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::vtkPV4Foam::vtkPV4Foam
+Foam::vtkPVFoam::vtkPVFoam
 (
     const char* const FileName,
-    vtkPV4FoamReader* reader
+    vtkPVFoamReader* reader
 )
 :
     reader_(reader),
@@ -245,7 +245,7 @@ Foam::vtkPV4Foam::vtkPV4Foam
 {
     if (debug)
     {
-        Info<< "Foam::vtkPV4Foam::vtkPV4Foam - " << FileName << endl;
+        Info<< "Foam::vtkPVFoam::vtkPVFoam - " << FileName << endl;
         printMemory();
     }
 
@@ -329,11 +329,11 @@ Foam::vtkPV4Foam::vtkPV4Foam
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::vtkPV4Foam::~vtkPV4Foam()
+Foam::vtkPVFoam::~vtkPVFoam()
 {
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::~vtkPV4Foam" << endl;
+        Info<< "<end> Foam::vtkPVFoam::~vtkPVFoam" << endl;
     }
 
     delete meshPtr_;
@@ -342,11 +342,11 @@ Foam::vtkPV4Foam::~vtkPV4Foam()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::vtkPV4Foam::updateInfo()
+void Foam::vtkPVFoam::updateInfo()
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfo"
+        Info<< "<beg> Foam::vtkPVFoam::updateInfo"
             << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex="
             << timeIndex_ << endl;
     }
@@ -409,17 +409,17 @@ void Foam::vtkPV4Foam::updateInfo()
     {
         // just for debug info
         getSelectedArrayEntries(partSelection);
-        Info<< "<end> Foam::vtkPV4Foam::updateInfo" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfo" << endl;
     }
 
 }
 
 
-void Foam::vtkPV4Foam::updateFoamMesh()
+void Foam::vtkPVFoam::updateFoamMesh()
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateFoamMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::updateFoamMesh" << endl;
         printMemory();
     }
 
@@ -463,13 +463,13 @@ void Foam::vtkPV4Foam::updateFoamMesh()
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::updateFoamMesh" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateFoamMesh" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::Update
+void Foam::vtkPVFoam::Update
 (
     vtkMultiBlockDataSet* output,
     vtkMultiBlockDataSet* lagrangianOutput
@@ -477,7 +477,7 @@ void Foam::vtkPV4Foam::Update
 {
     if (debug)
     {
-        cout<< "<beg> Foam::vtkPV4Foam::Update - output with "
+        cout<< "<beg> Foam::vtkPVFoam::Update - output with "
             << output->GetNumberOfBlocks() << " and "
             << lagrangianOutput->GetNumberOfBlocks() << " blocks\n";
         output->Print(cout);
@@ -518,7 +518,7 @@ void Foam::vtkPV4Foam::Update
         reader_->UpdateProgress(0.7);
     }
 
-#ifdef VTKPV4FOAM_DUALPORT
+#ifdef VTKPVFOAM_DUALPORT
     // restart port1 at block=0
     blockNo = 0;
 #endif
@@ -540,7 +540,7 @@ void Foam::vtkPV4Foam::Update
 }
 
 
-void Foam::vtkPV4Foam::CleanUp()
+void Foam::vtkPVFoam::CleanUp()
 {
     // reclaim some memory
     reduceMemory();
@@ -548,7 +548,7 @@ void Foam::vtkPV4Foam::CleanUp()
 }
 
 
-double* Foam::vtkPV4Foam::findTimes(int& nTimeSteps)
+double* Foam::vtkPVFoam::findTimes(int& nTimeSteps)
 {
     int nTimes = 0;
     double* tsteps = NULL;
@@ -627,7 +627,7 @@ double* Foam::vtkPV4Foam::findTimes(int& nTimeSteps)
 }
 
 
-void Foam::vtkPV4Foam::renderPatchNames
+void Foam::vtkPVFoam::renderPatchNames
 (
     vtkRenderer* renderer,
     const bool show
@@ -669,7 +669,7 @@ void Foam::vtkPV4Foam::renderPatchNames
         labelList nZones(pbMesh.size(), 0);
 
         // Per global zone number the average face centre position
-        List<DynamicList<point> > zoneCentre(pbMesh.size());
+        List<DynamicList<point>> zoneCentre(pbMesh.size());
 
 
         // Loop through all patches to determine zones, and centre of each zone
@@ -714,7 +714,7 @@ void Foam::vtkPV4Foam::renderPatchNames
             // Create storage for additional zone centres
             forAll(zoneNFaces, zoneI)
             {
-                zoneCentre[patchI].append(vector::zero);
+                zoneCentre[patchI].append(Zero);
             }
 
             // Do averaging per individual zone
@@ -825,7 +825,7 @@ void Foam::vtkPV4Foam::renderPatchNames
 }
 
 
-void Foam::vtkPV4Foam::PrintSelf(ostream& os, vtkIndent indent) const
+void Foam::vtkPVFoam::PrintSelf(ostream& os, vtkIndent indent) const
 {
     os  << indent << "Number of nodes: "
         << (meshPtr_ ? meshPtr_->nPoints() : 0) << "\n";
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
similarity index 94%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
index 78e4496f176dfc6692e7aa0f1143dd25563a0c39..5fb4b0b0d8431d86025f6adc6652c29a6f267340 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,39 +22,39 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::vtkPV4Foam
+    Foam::vtkPVFoam
 
 Description
     Provides a reader interface for OpenFOAM to VTK interaction.
 
 SourceFiles
-    vtkPV4Foam.C
-    vtkPV4Foam.H
-    vtkPV4FoamFields.C
-    vtkPV4FoamMesh.C
-    vtkPV4FoamMeshLagrangian.C
-    vtkPV4FoamTemplates.C
-    vtkPV4FoamMeshSet.C
-    vtkPV4FoamMeshVolume.C
-    vtkPV4FoamMeshZone.C
-    vtkPV4FoamFaceField.H
-    vtkPV4FoamLagrangianFields.H
-    vtkPV4FoamPatchField.H
-    vtkPV4FoamPointFields.H
-    vtkPV4FoamPoints.H
-    vtkPV4FoamUpdateInfo.C
-    vtkPV4FoamUpdateInfoFields.H
-    vtkPV4FoamUtils.C
-    vtkPV4FoamVolFields.H
-    vtkPV4FoamAddToSelection.H
+    vtkPVFoam.C
+    vtkPVFoam.H
+    vtkPVFoamFields.C
+    vtkPVFoamMesh.C
+    vtkPVFoamMeshLagrangian.C
+    vtkPVFoamTemplates.C
+    vtkPVFoamMeshSet.C
+    vtkPVFoamMeshVolume.C
+    vtkPVFoamMeshZone.C
+    vtkPVFoamFaceField.H
+    vtkPVFoamLagrangianFields.H
+    vtkPVFoamPatchField.H
+    vtkPVFoamPointFields.H
+    vtkPVFoamPoints.H
+    vtkPVFoamUpdateInfo.C
+    vtkPVFoamUpdateInfoFields.H
+    vtkPVFoamUtils.C
+    vtkPVFoamVolFields.H
+    vtkPVFoamAddToSelection.H
 
     // Needed by VTK:
     vtkDataArrayTemplateImplicit.txx
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4Foam_H
-#define vtkPV4Foam_H
+#ifndef vtkPVFoam_H
+#define vtkPVFoam_H
 
 // do not include legacy strstream headers
 #ifndef  VTK_EXCLUDE_STRSTREAM_HEADERS
@@ -69,14 +69,14 @@ SourceFiles
 #include "PrimitivePatchInterpolation.H"
 #include "volPointInterpolation.H"
 
-#undef VTKPV4FOAM_DUALPORT
+#undef VTKPVFOAM_DUALPORT
 
 // * * * * * * * * * * * * * Forward Declarations  * * * * * * * * * * * * * //
 
 class vtkDataArraySelection;
 class vtkDataSet;
 class vtkPoints;
-class vtkPV4FoamReader;
+class vtkPVFoamReader;
 class vtkRenderer;
 class vtkTextActor;
 class vtkMultiBlockDataSet;
@@ -102,10 +102,10 @@ template<class Type> class IOField;
 template<class Type> class List;
 
 /*---------------------------------------------------------------------------*\
-                        Class vtkPV4Foam Declaration
+                        Class vtkPVFoam Declaration
 \*---------------------------------------------------------------------------*/
 
-class vtkPV4Foam
+class vtkPVFoam
 {
     // Private classes
 
@@ -246,8 +246,8 @@ class vtkPV4Foam
 
     // Private Data
 
-        //- Access to the controlling vtkPV4FoamReader
-        vtkPV4FoamReader* reader_;
+        //- Access to the controlling vtkPVFoamReader
+        vtkPVFoamReader* reader_;
 
         //- OpenFOAM time control
         autoPtr<Time> dbPtr_;
@@ -487,7 +487,7 @@ class vtkPV4Foam
             template<class Type>
             void convertVolField
             (
-                const PtrList<PrimitivePatchInterpolation<primitivePatch> >&,
+                const PtrList<PrimitivePatchInterpolation<primitivePatch>>&,
                 const GeometricField<Type, fvPatchField, volMesh>&,
                 const bool interpFields,
                 vtkMultiBlockDataSet* output
@@ -498,7 +498,7 @@ class vtkPV4Foam
             void convertVolFields
             (
                 const fvMesh&,
-                const PtrList<PrimitivePatchInterpolation<primitivePatch> >&,
+                const PtrList<PrimitivePatchInterpolation<primitivePatch>>&,
                 const IOobjectList&,
                 const bool interpFields,
                 vtkMultiBlockDataSet* output
@@ -509,7 +509,7 @@ class vtkPV4Foam
             void convertDimFields
             (
                 const fvMesh&,
-                const PtrList<PrimitivePatchInterpolation<primitivePatch> >&,
+                const PtrList<PrimitivePatchInterpolation<primitivePatch>>&,
                 const IOobjectList&,
                 const bool interpFields,
                 vtkMultiBlockDataSet* output
@@ -520,7 +520,7 @@ class vtkPV4Foam
             void convertVolFieldBlock
             (
                 const GeometricField<Type, fvPatchField, volMesh>&,
-                autoPtr<GeometricField<Type, pointPatchField, pointMesh> >&,
+                autoPtr<GeometricField<Type, pointPatchField, pointMesh>>&,
                 vtkMultiBlockDataSet* output,
                 const arrayRange&,
                 const List<polyDecomp>& decompLst
@@ -664,31 +664,31 @@ class vtkPV4Foam
 
 
         //- Disallow default bitwise copy construct
-        vtkPV4Foam(const vtkPV4Foam&);
+        vtkPVFoam(const vtkPVFoam&);
 
         //- Disallow default bitwise assignment
-        void operator=(const vtkPV4Foam&);
+        void operator=(const vtkPVFoam&);
 
 
 public:
 
     //- Static data members
 
-        ClassName("vtkPV4Foam");
+        ClassName("vtkPVFoam");
 
 
     // Constructors
 
         //- Construct from components
-        vtkPV4Foam
+        vtkPVFoam
         (
             const char* const FileName,
-            vtkPV4FoamReader* reader
+            vtkPVFoamReader* reader
         );
 
 
     //- Destructor
-    ~vtkPV4Foam();
+    ~vtkPVFoam();
 
 
     // Member Functions
@@ -743,7 +743,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-    #include "vtkPV4FoamTemplates.C"
+    #include "vtkPVFoamTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamAddToSelection.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamAddToSelection.H
similarity index 91%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamAddToSelection.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamAddToSelection.H
index 0dc9c1a463379b4f9cd1d05abb4711c33caf7f47..8368b7d350ee9dbbe75d2fc0909b3578a7e9affe 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamAddToSelection.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamAddToSelection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamAddToSelection_H
-#define vtkPV4FoamAddToSelection_H
+#ifndef vtkPVFoamAddToSelection_H
+#define vtkPVFoamAddToSelection_H
 
 // OpenFOAM includes
 #include "IOobjectList.H"
@@ -36,7 +36,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::label Foam::vtkPV4Foam::addToSelection
+Foam::label Foam::vtkPVFoam::addToSelection
 (
     vtkDataArraySelection *select,
     const IOobjectList& objectLst,
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFaceField.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H
similarity index 94%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFaceField.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H
index b1f25f116a29315168a060af2423614cd7d02706..dae21728b07682d077b94c3e4a1e90cd080185d3 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFaceField.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,12 +22,12 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamFaceField_H
-#define vtkPV4FoamFaceField_H
+#ifndef vtkPVFoamFaceField_H
+#define vtkPVFoamFaceField_H
 
 // VTK includes
 #include "vtkCellData.h"
@@ -40,7 +40,7 @@ InClass
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtkPV4Foam::convertFaceField
+void Foam::vtkPVFoam::convertFaceField
 (
     const GeometricField<Type, fvPatchField, volMesh>& tf,
     vtkMultiBlockDataSet* output,
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFields.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFields.C
similarity index 89%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFields.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFields.C
index ec28f4dfe85d98de20951c62774d82177eca3e4d..47d2c3aa078fa5e13841f2ffb8585b371951d108 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFields.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,11 +23,11 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "IOobjectList.H"
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoamReader.h"
 
 // VTK includes
 #include "vtkDataArraySelection.h"
@@ -36,12 +36,12 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-#include "vtkPV4FoamVolFields.H"
-#include "vtkPV4FoamPointFields.H"
-#include "vtkPV4FoamLagrangianFields.H"
+#include "vtkPVFoamVolFields.H"
+#include "vtkPVFoamPointFields.H"
+#include "vtkPVFoamLagrangianFields.H"
 
 
-void Foam::vtkPV4Foam::pruneObjectList
+void Foam::vtkPVFoam::pruneObjectList
 (
     IOobjectList& objects,
     const wordHashSet& selected
@@ -64,7 +64,7 @@ void Foam::vtkPV4Foam::pruneObjectList
 }
 
 
-void Foam::vtkPV4Foam::convertVolFields
+void Foam::vtkPVFoam::convertVolFields
 (
     vtkMultiBlockDataSet* output
 )
@@ -93,7 +93,7 @@ void Foam::vtkPV4Foam::convertVolFields
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertVolFields" << nl
+        Info<< "<beg> Foam::vtkPVFoam::convertVolFields" << nl
             << "converting OpenFOAM volume fields" << endl;
         forAllConstIter(IOobjectList, objects, iter)
         {
@@ -104,7 +104,7 @@ void Foam::vtkPV4Foam::convertVolFields
     }
 
 
-    PtrList<PrimitivePatchInterpolation<primitivePatch> >
+    PtrList<PrimitivePatchInterpolation<primitivePatch>>
         ppInterpList(mesh.boundaryMesh().size());
 
     forAll(ppInterpList, i)
@@ -166,13 +166,13 @@ void Foam::vtkPV4Foam::convertVolFields
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertVolFields" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertVolFields" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertPointFields
+void Foam::vtkPVFoam::convertPointFields
 (
     vtkMultiBlockDataSet* output
 )
@@ -205,7 +205,7 @@ void Foam::vtkPV4Foam::convertPointFields
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertPointFields" << nl
+        Info<< "<beg> Foam::vtkPVFoam::convertPointFields" << nl
             << "converting OpenFOAM volume fields -> point fields" << endl;
         forAllConstIter(IOobjectList, objects, iter)
         {
@@ -242,13 +242,13 @@ void Foam::vtkPV4Foam::convertPointFields
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertPointFields" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertPointFields" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertLagrangianFields
+void Foam::vtkPVFoam::convertLagrangianFields
 (
     vtkMultiBlockDataSet* output
 )
@@ -268,7 +268,7 @@ void Foam::vtkPV4Foam::convertLagrangianFields
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertLagrangianFields" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertLagrangianFields" << endl;
         printMemory();
     }
 
@@ -337,7 +337,7 @@ void Foam::vtkPV4Foam::convertLagrangianFields
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertLagrangianFields" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertLagrangianFields" << endl;
         printMemory();
     }
 }
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamLagrangianFields.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamLagrangianFields.H
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamLagrangianFields.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamLagrangianFields.H
index 9edea96c5598fdac9afac988eb43e0e7ffa219af..fcaff892ec6ea69f8c9a2c6e6da1726d1edeb0a2 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamLagrangianFields.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamLagrangianFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,12 +22,12 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamLagrangianFields_H
-#define vtkPV4FoamLagrangianFields_H
+#ifndef vtkPVFoamLagrangianFields_H
+#define vtkPVFoamLagrangianFields_H
 
 #include "Cloud.H"
 
@@ -36,7 +36,7 @@ InClass
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtkPV4Foam::convertLagrangianFields
+void Foam::vtkPVFoam::convertLagrangianFields
 (
     const IOobjectList& objects,
     vtkMultiBlockDataSet* output,
@@ -58,7 +58,7 @@ void Foam::vtkPV4Foam::convertLagrangianFields
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertLagrangianField
+void Foam::vtkPVFoam::convertLagrangianField
 (
     const IOField<Type>& tf,
     vtkMultiBlockDataSet* output,
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C
similarity index 89%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMesh.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C
index 379868404c4d253345b2611c6901793fda32062d..8d1c9a7949fb3fce766f937c751c3b839731ada9 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMesh.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,14 +23,14 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "cellSet.H"
 #include "faceSet.H"
 #include "pointSet.H"
 #include "fvMeshSubset.H"
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoamReader.h"
 #include "uindirectPrimitivePatch.H"
 
 // VTK includes
@@ -41,7 +41,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::vtkPV4Foam::convertMeshVolume
+void Foam::vtkPVFoam::convertMeshVolume
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -57,7 +57,7 @@ void Foam::vtkPV4Foam::convertMeshVolume
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshVolume" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshVolume" << endl;
         printMemory();
     }
 
@@ -95,13 +95,13 @@ void Foam::vtkPV4Foam::convertMeshVolume
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshVolume" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshVolume" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshLagrangian
+void Foam::vtkPVFoam::convertMeshLagrangian
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -114,7 +114,7 @@ void Foam::vtkPV4Foam::convertMeshLagrangian
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshLagrangian" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshLagrangian" << endl;
         printMemory();
     }
 
@@ -146,13 +146,13 @@ void Foam::vtkPV4Foam::convertMeshLagrangian
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshLagrangian" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshLagrangian" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshPatches
+void Foam::vtkPVFoam::convertMeshPatches
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -166,7 +166,7 @@ void Foam::vtkPV4Foam::convertMeshPatches
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshPatches" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshPatches" << endl;
         printMemory();
     }
 
@@ -235,13 +235,13 @@ void Foam::vtkPV4Foam::convertMeshPatches
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshPatches" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshPatches" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshCellZones
+void Foam::vtkPVFoam::convertMeshCellZones
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -262,7 +262,7 @@ void Foam::vtkPV4Foam::convertMeshCellZones
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshCellZones" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshCellZones" << endl;
         printMemory();
     }
 
@@ -324,13 +324,13 @@ void Foam::vtkPV4Foam::convertMeshCellZones
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshCellZones" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshCellZones" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshCellSets
+void Foam::vtkPVFoam::convertMeshCellSets
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -346,7 +346,7 @@ void Foam::vtkPV4Foam::convertMeshCellSets
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshCellSets" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshCellSets" << endl;
         printMemory();
     }
 
@@ -406,13 +406,13 @@ void Foam::vtkPV4Foam::convertMeshCellSets
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshCellSets" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshCellSets" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshFaceZones
+void Foam::vtkPVFoam::convertMeshFaceZones
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -430,7 +430,7 @@ void Foam::vtkPV4Foam::convertMeshFaceZones
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshFaceZones" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshFaceZones" << endl;
         printMemory();
     }
 
@@ -470,13 +470,13 @@ void Foam::vtkPV4Foam::convertMeshFaceZones
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshFaceZones" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshFaceZones" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshFaceSets
+void Foam::vtkPVFoam::convertMeshFaceSets
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -489,7 +489,7 @@ void Foam::vtkPV4Foam::convertMeshFaceSets
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshFaceSets" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshFaceSets" << endl;
         printMemory();
     }
 
@@ -527,13 +527,13 @@ void Foam::vtkPV4Foam::convertMeshFaceSets
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshFaceSets" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshFaceSets" << endl;
         printMemory();
     }
 }
 
 
-void Foam::vtkPV4Foam::convertMeshPointZones
+void Foam::vtkPVFoam::convertMeshPointZones
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -546,7 +546,7 @@ void Foam::vtkPV4Foam::convertMeshPointZones
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshPointZones" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshPointZones" << endl;
         printMemory();
     }
 
@@ -582,14 +582,14 @@ void Foam::vtkPV4Foam::convertMeshPointZones
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshPointZones" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshPointZones" << endl;
         printMemory();
     }
 }
 
 
 
-void Foam::vtkPV4Foam::convertMeshPointSets
+void Foam::vtkPVFoam::convertMeshPointSets
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -602,7 +602,7 @@ void Foam::vtkPV4Foam::convertMeshPointSets
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::convertMeshPointSets" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::convertMeshPointSets" << endl;
         printMemory();
     }
 
@@ -640,7 +640,7 @@ void Foam::vtkPV4Foam::convertMeshPointSets
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::convertMeshPointSets" << endl;
+        Info<< "<end> Foam::vtkPVFoam::convertMeshPointSets" << endl;
         printMemory();
     }
 }
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C
similarity index 91%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshLagrangian.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C
index 9ade1f47e58d71f0559b15d7e5404f88d7ab1cc2..6ec01765309983aa489711970f301699e0b6b387 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshLagrangian.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshLagrangian.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "Cloud.H"
@@ -39,7 +39,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-vtkPolyData* Foam::vtkPV4Foam::lagrangianVTKMesh
+vtkPolyData* Foam::vtkPVFoam::lagrangianVTKMesh
 (
     const fvMesh& mesh,
     const word& cloudName
@@ -49,7 +49,7 @@ vtkPolyData* Foam::vtkPV4Foam::lagrangianVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::lagrangianVTKMesh - timePath "
+        Info<< "<beg> Foam::vtkPVFoam::lagrangianVTKMesh - timePath "
             << mesh.time().timePath()/cloud::prefix/cloudName << endl;
         printMemory();
     }
@@ -98,7 +98,7 @@ vtkPolyData* Foam::vtkPV4Foam::lagrangianVTKMesh
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::lagrangianVTKMesh" << endl;
+        Info<< "<end> Foam::vtkPVFoam::lagrangianVTKMesh" << endl;
         printMemory();
     }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C
similarity index 88%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshSet.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C
index 2d5f3bdb79d79d658f01c915070da6c4fb708c92..f72627367fce0613457a91940bbee93377e468d5 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshSet.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "faceSet.H"
@@ -37,7 +37,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-vtkPolyData* Foam::vtkPV4Foam::faceSetVTKMesh
+vtkPolyData* Foam::vtkPVFoam::faceSetVTKMesh
 (
     const fvMesh& mesh,
     const faceSet& fSet
@@ -47,7 +47,7 @@ vtkPolyData* Foam::vtkPV4Foam::faceSetVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::faceSetVTKMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::faceSetVTKMesh" << endl;
         printMemory();
     }
 
@@ -100,7 +100,7 @@ vtkPolyData* Foam::vtkPV4Foam::faceSetVTKMesh
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::faceSetVTKMesh" << endl;
+        Info<< "<end> Foam::vtkPVFoam::faceSetVTKMesh" << endl;
         printMemory();
     }
 
@@ -108,7 +108,7 @@ vtkPolyData* Foam::vtkPV4Foam::faceSetVTKMesh
 }
 
 
-vtkPolyData* Foam::vtkPV4Foam::pointSetVTKMesh
+vtkPolyData* Foam::vtkPVFoam::pointSetVTKMesh
 (
     const fvMesh& mesh,
     const pointSet& pSet
@@ -118,7 +118,7 @@ vtkPolyData* Foam::vtkPV4Foam::pointSetVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::pointSetVTKMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::pointSetVTKMesh" << endl;
         printMemory();
     }
 
@@ -137,7 +137,7 @@ vtkPolyData* Foam::vtkPV4Foam::pointSetVTKMesh
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::pointSetVTKMesh" << endl;
+        Info<< "<end> Foam::vtkPVFoam::pointSetVTKMesh" << endl;
         printMemory();
     }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C
similarity index 97%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C
index 70a7c04a1a6d74c1bd4cc92a8447d090621a8b99..c4a52dbc98bc3fbd7dd9a2c13b84e3ff6bdda557 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoam.H"
+#include "vtkPVFoamReader.h"
 
 // OpenFOAM includes
 #include "fvMesh.H"
@@ -39,7 +39,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh
+vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
 (
     const fvMesh& mesh,
     polyDecomp& decompInfo
@@ -56,7 +56,7 @@ vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::volumeVTKMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::volumeVTKMesh" << endl;
         printMemory();
     }
 
@@ -325,7 +325,7 @@ vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh
             // but avoids crashes when there is no vtkPolyhedron support
 
             // establish unique node ids used
-            HashSet<vtkIdType, Hash<label> > hashUniqId(2*256);
+            HashSet<vtkIdType, Hash<label>> hashUniqId(2*256);
 
             forAll(cFaces, cFaceI)
             {
@@ -469,7 +469,7 @@ vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::volumeVTKMesh" << endl;
+        Info<< "<end> Foam::vtkPVFoam::volumeVTKMesh" << endl;
         printMemory();
     }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshZone.C
similarity index 87%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshZone.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshZone.C
index 78eb386b1a870474d0832bcf10cde356450107fe..fbeaf966a0b776e4ccef0823197643b4b8314d1e 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshZone.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshZone.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "vtkOpenFOAMPoints.H"
@@ -35,7 +35,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-vtkPolyData* Foam::vtkPV4Foam::pointZoneVTKMesh
+vtkPolyData* Foam::vtkPVFoam::pointZoneVTKMesh
 (
     const fvMesh& mesh,
     const labelList& pointLabels
@@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPV4Foam::pointZoneVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::pointZoneVTKMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::pointZoneVTKMesh" << endl;
         printMemory();
     }
 
@@ -64,7 +64,7 @@ vtkPolyData* Foam::vtkPV4Foam::pointZoneVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::pointZoneVTKMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::pointZoneVTKMesh" << endl;
         printMemory();
     }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPatchField.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamPatchField.H
similarity index 93%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPatchField.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamPatchField.H
index 982c9d80991a4faceb59325a5fd2ead4784977ef..0aafd18bd2912bb0e6c95f36c6a73375ea82da25 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPatchField.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,12 +22,12 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamPatchField_H
-#define vtkPV4FoamPatchField_H
+#ifndef vtkPVFoamPatchField_H
+#define vtkPVFoamPatchField_H
 
 // VTK includes
 #include "vtkCellData.h"
@@ -41,7 +41,7 @@ InClass
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtkPV4Foam::convertPatchField
+void Foam::vtkPVFoam::convertPatchField
 (
     const word& name,
     const Field<Type>& ptf,
@@ -83,7 +83,7 @@ void Foam::vtkPV4Foam::convertPatchField
 
 // as above, but with PointData()
 template<class Type>
-void Foam::vtkPV4Foam::convertPatchPointField
+void Foam::vtkPVFoam::convertPatchPointField
 (
     const word& name,
     const Field<Type>& pptf,
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPointFields.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamPointFields.H
similarity index 96%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPointFields.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamPointFields.H
index 05bc1b1bd664fbadd6896a6c047db7b8287a5b99..2e83520e4476eb1690e3c8e9a3d6b81dd4b7f881 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPointFields.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamPointFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,12 +22,12 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamPointFields_H
-#define vtkPV4FoamPointFields_H
+#ifndef vtkPVFoamPointFields_H
+#define vtkPVFoamPointFields_H
 
 // OpenFOAM includes
 #include "interpolatePointToCell.H"
@@ -37,7 +37,7 @@ InClass
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtkPV4Foam::convertPointFields
+void Foam::vtkPVFoam::convertPointFields
 (
     const fvMesh& mesh,
     const pointMesh& pMesh,
@@ -62,7 +62,7 @@ void Foam::vtkPV4Foam::convertPointFields
 
         if (debug)
         {
-            Info<< "Foam::vtkPV4Foam::convertPointFields : "
+            Info<< "Foam::vtkPVFoam::convertPointFields : "
                 << fieldName << endl;
         }
 
@@ -170,7 +170,7 @@ void Foam::vtkPV4Foam::convertPointFields
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertPointFieldBlock
+void Foam::vtkPVFoam::convertPointFieldBlock
 (
     const GeometricField<Type, pointPatchField, pointMesh>& ptf,
     vtkMultiBlockDataSet* output,
@@ -199,7 +199,7 @@ void Foam::vtkPV4Foam::convertPointFieldBlock
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertPointField
+void Foam::vtkPVFoam::convertPointField
 (
     const GeometricField<Type, pointPatchField, pointMesh>& ptf,
     const GeometricField<Type, fvPatchField, volMesh>& tf,
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamTemplates.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C
similarity index 89%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamTemplates.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C
index bfdf3f5a9541fbc969647fee38c40c198dc326c7..6f044d42acff62d75f3cb1cc8aad595b57d55e9c 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamTemplates.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "polyPatch.H"
@@ -38,7 +38,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class PatchType>
-vtkPolyData* Foam::vtkPV4Foam::patchVTKMesh
+vtkPolyData* Foam::vtkPVFoam::patchVTKMesh
 (
     const word& name,
     const PatchType& p
@@ -48,7 +48,7 @@ vtkPolyData* Foam::vtkPV4Foam::patchVTKMesh
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::patchVTKMesh - " << name << endl;
+        Info<< "<beg> Foam::vtkPVFoam::patchVTKMesh - " << name << endl;
         printMemory();
     }
 
@@ -88,7 +88,7 @@ vtkPolyData* Foam::vtkPV4Foam::patchVTKMesh
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::patchVTKMesh - " << name << endl;
+        Info<< "<end> Foam::vtkPVFoam::patchVTKMesh - " << name << endl;
         printMemory();
     }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C
similarity index 90%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C
index 5357717a61b37538cf5beae53fc62d645c3171c7..27ed82e4e5a4ff3fa00d817f81c7df1c1ff4a036 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
+#include "vtkPVFoam.H"
 
 // OpenFOAM includes
 #include "cellSet.H"
@@ -34,11 +34,11 @@ License
 #include "polyBoundaryMeshEntries.H"
 #include "entry.H"
 #include "Cloud.H"
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoamReader.h"
 
 // local headers
-#include "vtkPV4FoamAddToSelection.H"
-#include "vtkPV4FoamUpdateInfoFields.H"
+#include "vtkPVFoamAddToSelection.H"
+#include "vtkPVFoamUpdateInfoFields.H"
 
 // VTK includes
 #include "vtkDataArraySelection.h"
@@ -82,7 +82,7 @@ public:
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class ZoneType>
-Foam::wordList Foam::vtkPV4Foam::getZoneNames
+Foam::wordList Foam::vtkPVFoam::getZoneNames
 (
     const ZoneMesh<ZoneType, polyMesh>& zmesh
 ) const
@@ -103,7 +103,7 @@ Foam::wordList Foam::vtkPV4Foam::getZoneNames
 }
 
 
-Foam::wordList Foam::vtkPV4Foam::getZoneNames(const word& zoneType) const
+Foam::wordList Foam::vtkPVFoam::getZoneNames(const word& zoneType) const
 {
     wordList names;
 
@@ -139,14 +139,14 @@ Foam::wordList Foam::vtkPV4Foam::getZoneNames(const word& zoneType) const
 }
 
 
-void Foam::vtkPV4Foam::updateInfoInternalMesh
+void Foam::vtkPVFoam::updateInfoInternalMesh
 (
     vtkDataArraySelection* arraySelection
 )
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoInternalMesh" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoInternalMesh" << endl;
     }
 
     // Determine mesh parts (internalMesh, patches...)
@@ -163,19 +163,19 @@ void Foam::vtkPV4Foam::updateInfoInternalMesh
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoInternalMesh" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfoInternalMesh" << endl;
     }
 }
 
 
-void Foam::vtkPV4Foam::updateInfoLagrangian
+void Foam::vtkPVFoam::updateInfoLagrangian
 (
     vtkDataArraySelection* arraySelection
 )
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoLagrangian" << nl
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoLagrangian" << nl
             << "    " << dbPtr_->timePath()/cloud::prefix << endl;
     }
 
@@ -214,12 +214,12 @@ void Foam::vtkPV4Foam::updateInfoLagrangian
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoLagrangian" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfoLagrangian" << endl;
     }
 }
 
 
-void Foam::vtkPV4Foam::updateInfoPatches
+void Foam::vtkPVFoam::updateInfoPatches
 (
     vtkDataArraySelection* arraySelection,
     stringList& enabledEntries
@@ -227,7 +227,7 @@ void Foam::vtkPV4Foam::updateInfoPatches
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoPatches"
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoPatches"
             << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
     }
 
@@ -458,12 +458,12 @@ void Foam::vtkPV4Foam::updateInfoPatches
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoPatches" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfoPatches" << endl;
     }
 }
 
 
-void Foam::vtkPV4Foam::updateInfoZones
+void Foam::vtkPVFoam::updateInfoZones
 (
     vtkDataArraySelection* arraySelection
 )
@@ -475,7 +475,7 @@ void Foam::vtkPV4Foam::updateInfoZones
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoZones"
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoZones"
             << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
     }
 
@@ -554,12 +554,12 @@ void Foam::vtkPV4Foam::updateInfoZones
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoZones" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfoZones" << endl;
     }
 }
 
 
-void Foam::vtkPV4Foam::updateInfoSets
+void Foam::vtkPVFoam::updateInfoSets
 (
     vtkDataArraySelection* arraySelection
 )
@@ -571,7 +571,7 @@ void Foam::vtkPV4Foam::updateInfoSets
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoSets" << endl;
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoSets" << endl;
     }
 
     // Add names of sets. Search for last time directory with a sets
@@ -596,7 +596,7 @@ void Foam::vtkPV4Foam::updateInfoSets
 
     if (debug)
     {
-        Info<< "     Foam::vtkPV4Foam::updateInfoSets read "
+        Info<< "     Foam::vtkPVFoam::updateInfoSets read "
             << objects.names() << " from " << setsInstance << endl;
     }
 
@@ -630,16 +630,16 @@ void Foam::vtkPV4Foam::updateInfoSets
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoSets" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfoSets" << endl;
     }
 }
 
 
-void Foam::vtkPV4Foam::updateInfoLagrangianFields()
+void Foam::vtkPVFoam::updateInfoLagrangianFields()
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoLagrangianFields"
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoLagrangianFields"
             << endl;
     }
 
@@ -678,33 +678,33 @@ void Foam::vtkPV4Foam::updateInfoLagrangianFields()
         lagrangianPrefix/cloudName
     );
 
-    addToSelection<IOField<label> >
+    addToSelection<IOField<label>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<scalar> >
+    addToSelection<IOField<scalar>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<vector> >
+    addToSelection<IOField<vector>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<sphericalTensor> >
+    addToSelection<IOField<sphericalTensor>>
     (
         fieldSelection,
 
         objects
     );
-    addToSelection<IOField<symmTensor> >
+    addToSelection<IOField<symmTensor>>
     (
         fieldSelection,
         objects
     );
-    addToSelection<IOField<tensor> >
+    addToSelection<IOField<tensor>>
     (
         fieldSelection,
         objects
@@ -715,7 +715,7 @@ void Foam::vtkPV4Foam::updateInfoLagrangianFields()
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoLagrangianFields - "
+        Info<< "<end> Foam::vtkPVFoam::updateInfoLagrangianFields - "
             << "lagrangian objects.size() = " << objects.size() << endl;
     }
 }
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H
similarity index 78%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H
index 784432ea4b1d1801d8500ffb57826d86902242c3..11ed19a4888b210803c1a46cb380868c278e3f8e 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfoFields.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -22,24 +22,24 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamUpdateInfoFields_H
-#define vtkPV4FoamUpdateInfoFields_H
+#ifndef vtkPVFoamUpdateInfoFields_H
+#define vtkPVFoamUpdateInfoFields_H
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<template<class> class patchType, class meshType>
-void Foam::vtkPV4Foam::updateInfoFields
+void Foam::vtkPVFoam::updateInfoFields
 (
     vtkDataArraySelection* select
 )
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4Foam::updateInfoFields <"
+        Info<< "<beg> Foam::vtkPVFoam::updateInfoFields <"
             << meshType::Mesh::typeName
             << "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]"
             << endl;
@@ -73,54 +73,54 @@ void Foam::vtkPV4Foam::updateInfoFields
     IOobjectList objects(dbPtr_(), dbPtr_().timeName(), regionPrefix);
 
     //- Add volume fields to GUI
-    addToSelection<GeometricField<scalar, patchType, meshType> >
+    addToSelection<GeometricField<scalar, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<vector, patchType, meshType> >
+    addToSelection<GeometricField<vector, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<sphericalTensor, patchType, meshType> >
+    addToSelection<GeometricField<sphericalTensor, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<symmTensor, patchType, meshType> >
+    addToSelection<GeometricField<symmTensor, patchType, meshType>>
     (
         select,
         objects
     );
-    addToSelection<GeometricField<tensor, patchType, meshType> >
+    addToSelection<GeometricField<tensor, patchType, meshType>>
     (
         select,
         objects
     );
 
     //- Add dimensioned fields to GUI
-    addToSelection<DimensionedField<scalar, meshType> >
+    addToSelection<DimensionedField<scalar, meshType>>
     (
         select,
         objects
     );
-    addToSelection<DimensionedField<vector, meshType> >
+    addToSelection<DimensionedField<vector, meshType>>
     (
         select,
         objects
     );
-    addToSelection<DimensionedField<sphericalTensor, meshType> >
+    addToSelection<DimensionedField<sphericalTensor, meshType>>
     (
         select,
         objects
     );
-    addToSelection<DimensionedField<symmTensor, meshType> >
+    addToSelection<DimensionedField<symmTensor, meshType>>
     (
         select,
         objects
     );
-    addToSelection<DimensionedField<tensor, meshType> >
+    addToSelection<DimensionedField<tensor, meshType>>
     (
         select,
         objects
@@ -132,7 +132,7 @@ void Foam::vtkPV4Foam::updateInfoFields
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4Foam::updateInfoFields" << endl;
+        Info<< "<end> Foam::vtkPVFoam::updateInfoFields" << endl;
     }
 }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUtils.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUtils.C
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUtils.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUtils.C
index 18573ec94f9aa86cdb11650890d900a412dd2958..0280afa5aeedca6d05bf3336b6a9f4153f329bb4 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUtils.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUtils.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,8 +26,8 @@ Description
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Foam.H"
-#include "vtkPV4FoamReader.h"
+#include "vtkPVFoam.H"
+#include "vtkPVFoamReader.h"
 
 // OpenFOAM includes
 #include "fvMesh.H"
@@ -72,7 +72,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::vtkPV4Foam::AddToBlock
+void Foam::vtkPVFoam::AddToBlock
 (
     vtkMultiBlockDataSet* output,
     vtkDataSet* dataset,
@@ -132,7 +132,7 @@ void Foam::vtkPV4Foam::AddToBlock
 }
 
 
-vtkDataSet* Foam::vtkPV4Foam::GetDataSetFromBlock
+vtkDataSet* Foam::vtkPVFoam::GetDataSetFromBlock
 (
     vtkMultiBlockDataSet* output,
     const arrayRange& range,
@@ -154,7 +154,7 @@ vtkDataSet* Foam::vtkPV4Foam::GetDataSetFromBlock
 
 
 // ununsed at the moment
-Foam::label Foam::vtkPV4Foam::GetNumberOfDataSets
+Foam::label Foam::vtkPVFoam::GetNumberOfDataSets
 (
     vtkMultiBlockDataSet* output,
     const arrayRange& range
@@ -173,13 +173,13 @@ Foam::label Foam::vtkPV4Foam::GetNumberOfDataSets
 }
 
 
-Foam::word Foam::vtkPV4Foam::getPartName(const int partId)
+Foam::word Foam::vtkPVFoam::getPartName(const int partId)
 {
     return getFirstWord(reader_->GetPartArrayName(partId));
 }
 
 
-Foam::wordHashSet Foam::vtkPV4Foam::getSelected
+Foam::wordHashSet Foam::vtkPVFoam::getSelected
 (
     vtkDataArraySelection* select
 )
@@ -199,7 +199,7 @@ Foam::wordHashSet Foam::vtkPV4Foam::getSelected
 }
 
 
-Foam::wordHashSet Foam::vtkPV4Foam::getSelected
+Foam::wordHashSet Foam::vtkPVFoam::getSelected
 (
     vtkDataArraySelection* select,
     const arrayRange& range
@@ -220,7 +220,7 @@ Foam::wordHashSet Foam::vtkPV4Foam::getSelected
 }
 
 
-Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries
+Foam::stringList Foam::vtkPVFoam::getSelectedArrayEntries
 (
     vtkDataArraySelection* select
 )
@@ -259,7 +259,7 @@ Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries
 }
 
 
-Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries
+Foam::stringList Foam::vtkPVFoam::getSelectedArrayEntries
 (
     vtkDataArraySelection* select,
     const arrayRange& range
@@ -298,7 +298,7 @@ Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries
 }
 
 
-void Foam::vtkPV4Foam::setSelectedArrayEntries
+void Foam::vtkPVFoam::setSelectedArrayEntries
 (
     vtkDataArraySelection* select,
     const stringList& selections
@@ -326,7 +326,7 @@ void Foam::vtkPV4Foam::setSelectedArrayEntries
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::vtkPV4Foam::printMemory()
+void Foam::vtkPVFoam::printMemory()
 {
     memInfo mem;
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
similarity index 91%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
index fbc51aeaa1c159759f83dc9d28a697126d18705c..7a34bbca1ca2fe100bbb4e615ca6001cd9660e71 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamVolFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,12 +22,12 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4Foam
+    vtkPVFoam
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4FoamVolFields_H
-#define vtkPV4FoamVolFields_H
+#ifndef vtkPVFoamVolFields_H
+#define vtkPVFoamVolFields_H
 
 // OpenFOAM includes
 #include "emptyFvPatchField.H"
@@ -36,17 +36,17 @@ InClass
 #include "volPointInterpolation.H"
 #include "zeroGradientFvPatchField.H"
 
-#include "vtkPV4FoamFaceField.H"
-#include "vtkPV4FoamPatchField.H"
+#include "vtkPVFoamFaceField.H"
+#include "vtkPVFoamPatchField.H"
 
 #include "vtkOpenFOAMTupleRemap.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::vtkPV4Foam::convertVolField
+void Foam::vtkPVFoam::convertVolField
 (
-    const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList,
+    const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
     const GeometricField<Type, fvPatchField, volMesh>& tf,
     const bool interpFields,
     vtkMultiBlockDataSet* output
@@ -56,7 +56,7 @@ void Foam::vtkPV4Foam::convertVolField
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
     // Interpolated field (demand driven)
-    autoPtr<GeometricField<Type, pointPatchField, pointMesh> > ptfPtr;
+    autoPtr<GeometricField<Type, pointPatchField, pointMesh>> ptfPtr;
     if (interpFields)
     {
         if (debug)
@@ -71,7 +71,6 @@ void Foam::vtkPV4Foam::convertVolField
         );
     }
 
-
     // Convert activated internalMesh regions
     convertVolFieldBlock
     (
@@ -126,7 +125,7 @@ void Foam::vtkPV4Foam::convertVolField
 
         if
         (
-            isType<emptyFvPatchField<Type> >(ptf)
+            isType<emptyFvPatchField<Type>>(ptf)
          ||
             (
                 reader_->GetExtrapolatePatches()
@@ -136,7 +135,7 @@ void Foam::vtkPV4Foam::convertVolField
         {
             fvPatch p(ptf.patch().patch(), mesh.boundary());
 
-            tmp<Field<Type> > tpptf
+            tmp<Field<Type>> tpptf
             (
                 fvPatchField<Type>(p, tf).patchInternalField()
             );
@@ -262,10 +261,10 @@ void Foam::vtkPV4Foam::convertVolField
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertVolFields
+void Foam::vtkPVFoam::convertVolFields
 (
     const fvMesh& mesh,
-    const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList,
+    const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
     const IOobjectList& objects,
     const bool interpFields,
     vtkMultiBlockDataSet* output
@@ -297,10 +296,10 @@ void Foam::vtkPV4Foam::convertVolFields
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertDimFields
+void Foam::vtkPVFoam::convertDimFields
 (
     const fvMesh& mesh,
-    const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList,
+    const PtrList<PrimitivePatchInterpolation<primitivePatch>>& ppInterpList,
     const IOobjectList& objects,
     const bool interpFields,
     vtkMultiBlockDataSet* output
@@ -327,7 +326,7 @@ void Foam::vtkPV4Foam::convertDimFields
         IOobject io(dimFld);
         io.readOpt() = IOobject::NO_READ;
 
-        PtrList<fvPatchField<Type> > patchFields(mesh.boundary().size());
+        PtrList<fvPatchField<Type>> patchFields(mesh.boundary().size());
         forAll(patchFields, patchI)
         {
             patchFields.set
@@ -358,10 +357,10 @@ void Foam::vtkPV4Foam::convertDimFields
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertVolFieldBlock
+void Foam::vtkPVFoam::convertVolFieldBlock
 (
     const GeometricField<Type, fvPatchField, volMesh>& tf,
-    autoPtr<GeometricField<Type, pointPatchField, pointMesh> >& ptfPtr,
+    autoPtr<GeometricField<Type, pointPatchField, pointMesh>>& ptfPtr,
     vtkMultiBlockDataSet* output,
     const arrayRange& range,
     const List<polyDecomp>& decompLst
@@ -400,7 +399,7 @@ void Foam::vtkPV4Foam::convertVolFieldBlock
 
 
 template<class Type>
-void Foam::vtkPV4Foam::convertVolField
+void Foam::vtkPVFoam::convertVolField
 (
     const GeometricField<Type, fvPatchField, volMesh>& tf,
     vtkMultiBlockDataSet* output,
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean
new file mode 100755
index 0000000000000000000000000000000000000000..5401dfdd07a66005b378f03e07bbcd9db3c54f08
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwclean
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+set -x
+
+# deal with client/server vs combined plugins
+rm -f $FOAM_LIBBIN/libPVblockMeshReader*  2>/dev/null
+
+rm -rf PVblockMeshReader/Make
+wclean libso vtkPVblockMesh
+
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake
new file mode 100755
index 0000000000000000000000000000000000000000..54b75743f90ed014f8a5ad73cc8fdbfe18a62ca0
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake
@@ -0,0 +1,21 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
+set -x
+
+if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
+then
+    wmake $targetType vtkPVblockMesh
+    (
+        cd PVblockMeshReader
+        mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
+        cd Make/$WM_OPTIONS
+        cmake ../..
+        make
+    )
+fi
+
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt
similarity index 71%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt
index d081db2ff6ceb0fbd256a6a6c14c268d9036ea91..2b28dafd1ae7b7388d20a1b4a93f8ada1566ea5d 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt
@@ -21,10 +21,11 @@ INCLUDE_DIRECTORIES(
     $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
     $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
     $ENV{WM_PROJECT_DIR}/src/meshing/blockMesh/lnInclude
-    ${PROJECT_SOURCE_DIR}/../vtkPV4blockMesh
+    ${PROJECT_SOURCE_DIR}/../vtkPVblockMesh
 )
 
 ADD_DEFINITIONS(
+    -std=c++0x
     -DWM_$ENV{WM_PRECISION_OPTION}
     -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
 )
@@ -41,31 +42,31 @@ SET(
 #
 
 # Extend the auto-generated panel
-QT4_WRAP_CPP(MOC_SRCS pqPV4blockMeshReaderPanel.h)
+QT4_WRAP_CPP(MOC_SRCS pqPVblockMeshReaderPanel.h)
 
 ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
-  CLASS_NAME pqPV4blockMeshReaderPanel
-  XML_NAME  PV4blockMeshReader # name of SourceProxy in *SM.xml
+  CLASS_NAME pqPVblockMeshReaderPanel
+  XML_NAME  PVblockMeshReader # name of SourceProxy in *SM.xml
   XML_GROUP sources
 )
 
 IF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
         ADD_PARAVIEW_PLUGIN(
-            PV4blockMeshReader_SM "1.0"
-        SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
-        SERVER_MANAGER_SOURCES  vtkPV4blockMeshReader.cxx
+            PVblockMeshReader_SM "1.0"
+        SERVER_MANAGER_XML PVblockMeshReader_SM.xml
+        SERVER_MANAGER_SOURCES  vtkPVblockMeshReader.cxx
         GUI_INTERFACES ${IFACES}
-        GUI_SOURCES pqPV4blockMeshReaderPanel.cxx
+        GUI_SOURCES pqPVblockMeshReaderPanel.cxx
             ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
-        GUI_RESOURCE_FILES PV4blockMeshReader.xml
+        GUI_RESOURCE_FILES PVblockMeshReader.xml
     )
 ELSE("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
         ADD_PARAVIEW_PLUGIN(
-            PV4blockMeshReader_SM "1.0"
-        SERVER_MANAGER_XML PV4blockMeshReader_SM.xml
-        SERVER_MANAGER_SOURCES  vtkPV4blockMeshReader.cxx
+            PVblockMeshReader_SM "1.0"
+        SERVER_MANAGER_XML PVblockMeshReader_SM.xml
+        SERVER_MANAGER_SOURCES  vtkPVblockMeshReader.cxx
         GUI_INTERFACES ${IFACES}
-        GUI_SOURCES pqPV4blockMeshReaderPanel.cxx
+        GUI_SOURCES pqPVblockMeshReaderPanel.cxx
             ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
     )
 ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
@@ -73,11 +74,11 @@ ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0)
 # Build the client-side plugin
 
 TARGET_LINK_LIBRARIES(
-    PV4blockMeshReader_SM
+    PVblockMeshReader_SM
     LINK_PUBLIC
     OpenFOAM
     blockMesh
-    vtkPV4blockMesh
+    vtkPVblockMesh
 )
 
 #-----------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.qrc b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader.qrc
similarity index 62%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.qrc
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader.qrc
index 5b5cc69b5278da7b8ed36fca36629d9ce4a066bf..228226bd56ae52129ac3538820218138c65fc61a 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.qrc
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader.qrc
@@ -1,5 +1,5 @@
 <RCC>
   <qresource prefix="/ParaViewResources" >
-      <file>PV4blockMeshReader.xml</file>
+      <file>PVblockMeshReader.xml</file>
   </qresource>
 </RCC>
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader.xml
similarity index 78%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.xml
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader.xml
index 0d4b97285eafc5a8574d2adb2ccc42d175d18c38..18413ee30078159f21ba6ecf801861b251f67f59 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader.xml
@@ -1,5 +1,5 @@
 <ParaViewReaders>
-  <Reader name="PV4blockMeshReader"
+  <Reader name="PVblockMeshReader"
       extensions="blockMesh"
       file_description="OpenFOAM blockMesh reader">
   </Reader>
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml
similarity index 98%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml
index 09f962d32f595e9963deb75d53832f835c06349a..3a80fe5136d5529bd50aa54fe7d5fe86cc0373cd 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml
@@ -1,8 +1,8 @@
 <ServerManagerConfiguration>
   <ProxyGroup name="sources">
   <SourceProxy
-    name="PV4blockMeshReader"
-    class="vtkPV4blockMeshReader">
+    name="PVblockMeshReader"
+    class="vtkPVblockMeshReader">
 
     <!-- File name - compulsory -->
     <StringVectorProperty
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqPVblockMeshReaderPanel.cxx
similarity index 93%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.cxx
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqPVblockMeshReaderPanel.cxx
index b5f10f01fd6e0d1d12dd1e2140538416857dc087..70b1489dd049dca2c49f741fcc09143edbd47fa7 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqPVblockMeshReaderPanel.cxx
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "pqPV4blockMeshReaderPanel.h"
+#include "pqPVblockMeshReaderPanel.h"
 
 // QT
 #include <QGridLayout>
@@ -50,7 +50,7 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-pqPV4blockMeshReaderPanel::pqPV4blockMeshReaderPanel
+pqPVblockMeshReaderPanel::pqPVblockMeshReaderPanel
 (
     pqProxy *proxy,
     QWidget *p
@@ -90,7 +90,7 @@ pqPV4blockMeshReaderPanel::pqPV4blockMeshReaderPanel
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-void pqPV4blockMeshReaderPanel::ShowPointNumbersToggled()
+void pqPVblockMeshReaderPanel::ShowPointNumbersToggled()
 {
     vtkSMIntVectorProperty::SafeDownCast
     (
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.h b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqPVblockMeshReaderPanel.h
similarity index 82%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.h
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqPVblockMeshReaderPanel.h
index 215787a00a4c2cdc4b6a2a0b86ee0692dc88c142..f6a8acf247ac1f37be59052b0edf5cd2d92438a9 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqPVblockMeshReaderPanel.h
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,19 +22,19 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    pqPV4blockMeshReaderPanel
+    pqPVblockMeshReaderPanel
 
 Description
     GUI modifications for the ParaView reader panel
 
-    A custom panel for the PV4blockMeshReader.
+    A custom panel for the PVblockMeshReader.
 
 SourceFiles
-    pqPV4blockMeshReaderPanel.cxx
+    pqPVblockMeshReaderPanel.cxx
 
 \*---------------------------------------------------------------------------*/
-#ifndef pqPV4blockMeshReaderPanel_h
-#define pqPV4blockMeshReaderPanel_h
+#ifndef pqPVblockMeshReaderPanel_h
+#define pqPVblockMeshReaderPanel_h
 
 #include "pqAutoGeneratedObjectPanel.h"
 
@@ -50,10 +50,10 @@ class vtkSMSourceProxy;
 
 
 /*---------------------------------------------------------------------------*\
-                 Class pqPV4blockMeshReaderPanel Declaration
+                 Class pqPVblockMeshReaderPanel Declaration
 \*---------------------------------------------------------------------------*/
 
-class pqPV4blockMeshReaderPanel
+class pqPVblockMeshReaderPanel
 :
     public pqAutoGeneratedObjectPanel
 {
@@ -74,11 +74,11 @@ public:
     // Constructors
 
         //- Construct from components
-        pqPV4blockMeshReaderPanel(pqProxy*, QWidget*);
+        pqPVblockMeshReaderPanel(pqProxy*, QWidget*);
 
 
     //- Destructor
-    // virtual ~pqPV4blockMeshReaderPanel();
+    // virtual ~pqPVblockMeshReaderPanel();
 };
 
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx
similarity index 83%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.cxx
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx
index aa7667c78472afd45375bc42852c246d198fd6ef..b6e3769c7623a8998522317eb7c9ce90791952ad 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 \*---------------------------------------------------------------------------*/
-#include "vtkPV4blockMeshReader.h"
+#include "vtkPVblockMeshReader.h"
 
 #include "pqApplicationCore.h"
 #include "pqRenderView.h"
@@ -40,16 +40,16 @@ License
 #include "vtkStringArray.h"
 
 // OpenFOAM includes
-#include "vtkPV4blockMesh.H"
+#include "vtkPVblockMesh.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-vtkStandardNewMacro(vtkPV4blockMeshReader);
+vtkStandardNewMacro(vtkPVblockMeshReader);
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-vtkPV4blockMeshReader::vtkPV4blockMeshReader()
+vtkPVblockMeshReader::vtkPVblockMeshReader()
 {
     Debug = 0;
     vtkDebugMacro(<<"Constructor");
@@ -70,7 +70,7 @@ vtkPV4blockMeshReader::vtkPV4blockMeshReader()
     SelectionObserver = vtkCallbackCommand::New();
     SelectionObserver->SetCallback
     (
-        &vtkPV4blockMeshReader::SelectionModifiedCallback
+        &vtkPVblockMeshReader::SelectionModifiedCallback
     );
     SelectionObserver->SetClientData(this);
 
@@ -91,7 +91,7 @@ vtkPV4blockMeshReader::vtkPV4blockMeshReader()
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-vtkPV4blockMeshReader::~vtkPV4blockMeshReader()
+vtkPVblockMeshReader::~vtkPVblockMeshReader()
 {
     vtkDebugMacro(<<"Deconstructor");
 
@@ -118,7 +118,7 @@ vtkPV4blockMeshReader::~vtkPV4blockMeshReader()
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
 // Do everything except set the output info
-int vtkPV4blockMeshReader::RequestInformation
+int vtkPVblockMeshReader::RequestInformation
 (
     vtkInformation* vtkNotUsed(request),
     vtkInformationVector** vtkNotUsed(inputVector),
@@ -127,7 +127,7 @@ int vtkPV4blockMeshReader::RequestInformation
 {
     vtkDebugMacro(<<"RequestInformation");
 
-    if (Foam::vtkPV4blockMesh::debug)
+    if (Foam::vtkPVblockMesh::debug)
     {
         cout<<"REQUEST_INFORMATION\n";
     }
@@ -140,7 +140,7 @@ int vtkPV4blockMeshReader::RequestInformation
 
     int nInfo = outputVector->GetNumberOfInformationObjects();
 
-    if (Foam::vtkPV4blockMesh::debug)
+    if (Foam::vtkPVblockMesh::debug)
     {
         cout<<"RequestInformation with " << nInfo << " item(s)\n";
         for (int infoI = 0; infoI < nInfo; ++infoI)
@@ -151,7 +151,7 @@ int vtkPV4blockMeshReader::RequestInformation
 
     if (!foamData_)
     {
-        foamData_ = new Foam::vtkPV4blockMesh(FileName, this);
+        foamData_ = new Foam::vtkPVblockMesh(FileName, this);
     }
     else
     {
@@ -175,7 +175,7 @@ int vtkPV4blockMeshReader::RequestInformation
 
 
 // Set the output info
-int vtkPV4blockMeshReader::RequestData
+int vtkPVblockMeshReader::RequestData
 (
     vtkInformation* vtkNotUsed(request),
     vtkInformationVector** vtkNotUsed(inputVector),
@@ -199,7 +199,7 @@ int vtkPV4blockMeshReader::RequestData
 
     int nInfo = outputVector->GetNumberOfInformationObjects();
 
-    if (Foam::vtkPV4blockMesh::debug)
+    if (Foam::vtkPVblockMesh::debug)
     {
         cout<<"RequestData with " << nInfo << " item(s)\n";
         for (int infoI = 0; infoI < nInfo; ++infoI)
@@ -216,7 +216,7 @@ int vtkPV4blockMeshReader::RequestData
         )
     );
 
-    if (Foam::vtkPV4blockMesh::debug)
+    if (Foam::vtkPVblockMesh::debug)
     {
         cout<< "update output with "
             << output->GetNumberOfBlocks() << " blocks\n";
@@ -234,7 +234,7 @@ int vtkPV4blockMeshReader::RequestData
 
 
 
-void vtkPV4blockMeshReader::SetShowPointNumbers(const int val)
+void vtkPVblockMeshReader::SetShowPointNumbers(const int val)
 {
     if (ShowPointNumbers != val)
     {
@@ -244,7 +244,7 @@ void vtkPV4blockMeshReader::SetShowPointNumbers(const int val)
 }
 
 
-void vtkPV4blockMeshReader::updatePointNumbersView(const bool show)
+void vtkPVblockMeshReader::updatePointNumbersView(const bool show)
 {
     pqApplicationCore* appCore = pqApplicationCore::instance();
 
@@ -277,7 +277,7 @@ void vtkPV4blockMeshReader::updatePointNumbersView(const bool show)
 }
 
 
-void vtkPV4blockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
+void vtkPVblockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
 {
     vtkDebugMacro(<<"PrintSelf");
 
@@ -292,35 +292,35 @@ void vtkPV4blockMeshReader::PrintSelf(ostream& os, vtkIndent indent)
 // ----------------------------------------------------------------------
 // Block selection list control
 
-vtkDataArraySelection* vtkPV4blockMeshReader::GetBlockSelection()
+vtkDataArraySelection* vtkPVblockMeshReader::GetBlockSelection()
 {
     vtkDebugMacro(<<"GetBlockSelection");
     return BlockSelection;
 }
 
 
-int vtkPV4blockMeshReader::GetNumberOfBlockArrays()
+int vtkPVblockMeshReader::GetNumberOfBlockArrays()
 {
     vtkDebugMacro(<<"GetNumberOfBlockArrays");
     return BlockSelection->GetNumberOfArrays();
 }
 
 
-const char* vtkPV4blockMeshReader::GetBlockArrayName(int index)
+const char* vtkPVblockMeshReader::GetBlockArrayName(int index)
 {
     vtkDebugMacro(<<"GetBlockArrayName");
     return BlockSelection->GetArrayName(index);
 }
 
 
-int vtkPV4blockMeshReader::GetBlockArrayStatus(const char* name)
+int vtkPVblockMeshReader::GetBlockArrayStatus(const char* name)
 {
     vtkDebugMacro(<<"GetBlockArrayStatus");
     return BlockSelection->ArrayIsEnabled(name);
 }
 
 
-void vtkPV4blockMeshReader::SetBlockArrayStatus
+void vtkPVblockMeshReader::SetBlockArrayStatus
 (
     const char* name,
     int status
@@ -341,35 +341,35 @@ void vtkPV4blockMeshReader::SetBlockArrayStatus
 // ----------------------------------------------------------------------
 // CurvedEdges selection list control
 
-vtkDataArraySelection* vtkPV4blockMeshReader::GetCurvedEdgesSelection()
+vtkDataArraySelection* vtkPVblockMeshReader::GetCurvedEdgesSelection()
 {
     vtkDebugMacro(<<"GetCurvedEdgesSelection");
     return CurvedEdgesSelection;
 }
 
 
-int vtkPV4blockMeshReader::GetNumberOfCurvedEdgesArrays()
+int vtkPVblockMeshReader::GetNumberOfCurvedEdgesArrays()
 {
     vtkDebugMacro(<<"GetNumberOfCurvedEdgesArrays");
     return CurvedEdgesSelection->GetNumberOfArrays();
 }
 
 
-const char* vtkPV4blockMeshReader::GetCurvedEdgesArrayName(int index)
+const char* vtkPVblockMeshReader::GetCurvedEdgesArrayName(int index)
 {
     vtkDebugMacro(<<"GetCurvedEdgesArrayName");
     return CurvedEdgesSelection->GetArrayName(index);
 }
 
 
-int vtkPV4blockMeshReader::GetCurvedEdgesArrayStatus(const char* name)
+int vtkPVblockMeshReader::GetCurvedEdgesArrayStatus(const char* name)
 {
     vtkDebugMacro(<<"GetCurvedEdgesArrayStatus");
     return CurvedEdgesSelection->ArrayIsEnabled(name);
 }
 
 
-void vtkPV4blockMeshReader::SetCurvedEdgesArrayStatus
+void vtkPVblockMeshReader::SetCurvedEdgesArrayStatus
 (
     const char* name,
     int status
@@ -389,7 +389,7 @@ void vtkPV4blockMeshReader::SetCurvedEdgesArrayStatus
 
 // ----------------------------------------------------------------------
 
-void vtkPV4blockMeshReader::SelectionModifiedCallback
+void vtkPVblockMeshReader::SelectionModifiedCallback
 (
     vtkObject*,
     unsigned long,
@@ -397,11 +397,11 @@ void vtkPV4blockMeshReader::SelectionModifiedCallback
     void*
 )
 {
-    static_cast<vtkPV4blockMeshReader*>(clientdata)->Modified();
+    static_cast<vtkPVblockMeshReader*>(clientdata)->Modified();
 }
 
 
-int vtkPV4blockMeshReader::FillOutputPortInformation
+int vtkPVblockMeshReader::FillOutputPortInformation
 (
     int port,
     vtkInformation* info
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h
similarity index 86%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.h
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h
index ba0deee4ff971fbb7fc2ed9278548d5da1729c39..a08c85acb46ed248a4401df1535828ccedd6caad 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,21 +22,21 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    vtkPV4blockMeshReader
+    vtkPVblockMeshReader
 
 Description
     reads a dataset in OpenFOAM bockMesh format
 
-    vtkPV4blockMeshReader creates an multiblock dataset.
+    vtkPVblockMeshReader creates an multiblock dataset.
     It uses the OpenFOAM infrastructure (blockMesh).
 
 SourceFiles
-    vtkPV4blockMeshReader.cxx
+    vtkPVblockMeshReader.cxx
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4blockMeshReader_h
-#define vtkPV4blockMeshReader_h
+#ifndef vtkPVblockMeshReader_h
+#define vtkPVblockMeshReader_h
 
 // VTK includes
 #include "vtkMultiBlockDataSetAlgorithm.h"
@@ -49,22 +49,22 @@ class vtkCallbackCommand;
 
 namespace Foam
 {
-    class vtkPV4blockMesh;
+    class vtkPVblockMesh;
 }
 
 /*---------------------------------------------------------------------------*\
-                   Class vtkPV4blockMeshReader Declaration
+                   Class vtkPVblockMeshReader Declaration
 \*---------------------------------------------------------------------------*/
 
-class vtkPV4blockMeshReader
+class vtkPVblockMeshReader
 :
     public vtkMultiBlockDataSetAlgorithm
 {
 public:
-    vtkTypeMacro(vtkPV4blockMeshReader, vtkMultiBlockDataSetAlgorithm);
+    vtkTypeMacro(vtkPVblockMeshReader, vtkMultiBlockDataSetAlgorithm);
     void PrintSelf(ostream&, vtkIndent);
 
-    static vtkPV4blockMeshReader* New();
+    static vtkPVblockMeshReader* New();
 
     // Description:
     // Set/Get the filename.
@@ -113,10 +113,10 @@ public:
 protected:
 
     //- Construct null
-    vtkPV4blockMeshReader();
+    vtkPVblockMeshReader();
 
     //- Destructor
-    ~vtkPV4blockMeshReader();
+    ~vtkPVblockMeshReader();
 
     //- Return information about mesh, times, etc without loading anything
     virtual int RequestInformation
@@ -146,10 +146,10 @@ protected:
 private:
 
     //- Disallow default bitwise copy construct
-    vtkPV4blockMeshReader(const vtkPV4blockMeshReader&);
+    vtkPVblockMeshReader(const vtkPVblockMeshReader&);
 
     //- Disallow default bitwise assignment
-    void operator=(const vtkPV4blockMeshReader&);
+    void operator=(const vtkPVblockMeshReader&);
 
     //- Add/remove point numbers to/from the view
     void updatePointNumbersView(const bool show);
@@ -166,7 +166,7 @@ private:
     vtkDataArraySelection* CurvedEdgesSelection;
 
     //BTX
-    Foam::vtkPV4blockMesh* foamData_;
+    Foam::vtkPVblockMesh* foamData_;
     //ETX
 };
 
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/files b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..e6e4fb230e51ae856be56d128e1682718cb1f7c3
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/files
@@ -0,0 +1,5 @@
+vtkPVblockMesh.C
+vtkPVblockMeshConvert.C
+vtkPVblockMeshUtils.C
+
+LIB = $(FOAM_LIBBIN)/libvtkPVblockMesh
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options
similarity index 57%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/options
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options
index b1c25d894d66689f8124143ff503287b1e0d0142..ccbea978f7fbc3069a2abc3401e990f9caba1747 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/options
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/Make/options
@@ -2,11 +2,12 @@ EXE_INC = \
     -I$(LIB_SRC)/meshTools/lnInclude \
     -I$(LIB_SRC)/mesh/blockMesh/lnInclude \
     -I$(ParaView_INCLUDE_DIR) \
-    -I../../vtkPV4Readers/lnInclude \
-    -I../PV4blockMeshReader
+    -I$(ParaView_INCLUDE_DIR)/vtkkwiml \
+    -I../../vtkPVReaders/lnInclude \
+    -I../PVblockMeshReader
 
 LIB_LIBS = \
     -lmeshTools \
     -lblockMesh \
-    -L$(FOAM_LIBBIN) -lvtkPV4Readers \
+    -L$(FOAM_LIBBIN) -lvtkPVReaders \
     $(GLIBS)
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkOpenFOAMPoints.H
similarity index 95%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkOpenFOAMPoints.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkOpenFOAMPoints.H
index d97dfed2dc988f19725a01e4835d409042582c40..d36406984ed26077794e74634df94b8ebd895151 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkOpenFOAMPoints.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkOpenFOAMPoints.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 InClass
-    vtkPV4blockMesh
+    vtkPVblockMesh
 
 \*---------------------------------------------------------------------------*/
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C
similarity index 89%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C
index b9a40707e9c6840eb1a90f53e5cb7ba8f5e3391c..8737cc8f1b8886f567e4c0cee314795413b30d8e 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4blockMesh.H"
-#include "vtkPV4blockMeshReader.h"
+#include "vtkPVblockMesh.H"
+#include "vtkPVblockMeshReader.h"
 
 // OpenFOAM includes
 #include "blockMesh.H"
@@ -43,13 +43,13 @@ License
 
 namespace Foam
 {
-    defineTypeNameAndDebug(vtkPV4blockMesh, 0);
+    defineTypeNameAndDebug(vtkPVblockMesh, 0);
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::vtkPV4blockMesh::resetCounters()
+void Foam::vtkPVblockMesh::resetCounters()
 {
     // Reset mesh part ids and sizes
     arrayRangeBlocks_.reset();
@@ -58,14 +58,14 @@ void Foam::vtkPV4blockMesh::resetCounters()
 }
 
 
-void Foam::vtkPV4blockMesh::updateInfoBlocks
+void Foam::vtkPVblockMesh::updateInfoBlocks
 (
     vtkDataArraySelection* arraySelection
 )
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::updateInfoBlocks"
+        Info<< "<beg> Foam::vtkPVblockMesh::updateInfoBlocks"
             << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
     }
 
@@ -96,19 +96,19 @@ void Foam::vtkPV4blockMesh::updateInfoBlocks
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4blockMesh::updateInfoBlocks" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::updateInfoBlocks" << endl;
     }
 }
 
 
-void Foam::vtkPV4blockMesh::updateInfoEdges
+void Foam::vtkPVblockMesh::updateInfoEdges
 (
     vtkDataArraySelection* arraySelection
 )
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::updateInfoEdges"
+        Info<< "<beg> Foam::vtkPVblockMesh::updateInfoEdges"
             << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
     }
 
@@ -136,17 +136,17 @@ void Foam::vtkPV4blockMesh::updateInfoEdges
         // just for debug info
         getSelectedArrayEntries(arraySelection);
 
-        Info<< "<end> Foam::vtkPV4blockMesh::updateInfoEdges" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::updateInfoEdges" << endl;
     }
 }
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::vtkPV4blockMesh::vtkPV4blockMesh
+Foam::vtkPVblockMesh::vtkPVblockMesh
 (
     const char* const FileName,
-    vtkPV4blockMeshReader* reader
+    vtkPVblockMeshReader* reader
 )
 :
     reader_(reader),
@@ -160,7 +160,7 @@ Foam::vtkPV4blockMesh::vtkPV4blockMesh
 {
     if (debug)
     {
-        Info<< "Foam::vtkPV4blockMesh::vtkPV4blockMesh - "
+        Info<< "Foam::vtkPVblockMesh::vtkPVblockMesh - "
             << FileName << endl;
     }
 
@@ -243,11 +243,11 @@ Foam::vtkPV4blockMesh::vtkPV4blockMesh
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-Foam::vtkPV4blockMesh::~vtkPV4blockMesh()
+Foam::vtkPVblockMesh::~vtkPVblockMesh()
 {
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::~vtkPV4blockMesh" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::~vtkPVblockMesh" << endl;
     }
 
     // Hmm. pointNumberTextActors are not getting removed
@@ -264,11 +264,11 @@ Foam::vtkPV4blockMesh::~vtkPV4blockMesh()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::vtkPV4blockMesh::updateInfo()
+void Foam::vtkPVblockMesh::updateInfo()
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::updateInfo"
+        Info<< "<beg> Foam::vtkPVblockMesh::updateInfo"
             << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl;
     }
 
@@ -314,16 +314,16 @@ void Foam::vtkPV4blockMesh::updateInfo()
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::updateInfo" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::updateInfo" << endl;
     }
 }
 
 
-void Foam::vtkPV4blockMesh::updateFoamMesh()
+void Foam::vtkPVblockMesh::updateFoamMesh()
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::updateFoamMesh" << endl;
+        Info<< "<beg> Foam::vtkPVblockMesh::updateFoamMesh" << endl;
     }
 
     // Check to see if the OpenFOAM mesh has been created
@@ -370,12 +370,12 @@ void Foam::vtkPV4blockMesh::updateFoamMesh()
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::updateFoamMesh" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::updateFoamMesh" << endl;
     }
 }
 
 
-void Foam::vtkPV4blockMesh::Update
+void Foam::vtkPVblockMesh::Update
 (
     vtkMultiBlockDataSet* output
 )
@@ -406,13 +406,13 @@ void Foam::vtkPV4blockMesh::Update
 }
 
 
-void Foam::vtkPV4blockMesh::CleanUp()
+void Foam::vtkPVblockMesh::CleanUp()
 {
     reader_->UpdateProgress(1.0);
 }
 
 
-void Foam::vtkPV4blockMesh::renderPointNumbers
+void Foam::vtkPVblockMesh::renderPointNumbers
 (
     vtkRenderer* renderer,
     const bool show
@@ -471,7 +471,7 @@ void Foam::vtkPV4blockMesh::renderPointNumbers
 
 
 
-void Foam::vtkPV4blockMesh::PrintSelf(ostream& os, vtkIndent indent) const
+void Foam::vtkPVblockMesh::PrintSelf(ostream& os, vtkIndent indent) const
 {
 #if 0
     os  << indent << "Number of nodes: "
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.H b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.H
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H
index 48b0b036dff89aba93a57e8e66232f18488bf67c..dc502926f42ade1b0e501c6dd20871d3b9031f91 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,24 +22,24 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::vtkPV4blockMesh
+    Foam::vtkPVblockMesh
 
 Description
     Provides a reader interface for OpenFOAM blockMesh to VTK interaction
 
 SourceFiles
-    vtkPV4blockMesh.C
-    vtkPV4blockMeshConvert.C
-    vtkPV4blockMeshUpdate.C
-    vtkPV4blockMeshUtils.C
+    vtkPVblockMesh.C
+    vtkPVblockMeshConvert.C
+    vtkPVblockMeshUpdate.C
+    vtkPVblockMeshUtils.C
 
     // Needed by VTK:
     vtkDataArrayTemplateImplicit.txx
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4blockMesh_H
-#define vtkPV4blockMesh_H
+#ifndef vtkPVblockMesh_H
+#define vtkPVblockMesh_H
 
 // do not include legacy strstream headers
 #ifndef  VTK_EXCLUDE_STRSTREAM_HEADERS
@@ -58,7 +58,7 @@ SourceFiles
 class vtkDataArraySelection;
 class vtkDataSet;
 class vtkPoints;
-class vtkPV4blockMeshReader;
+class vtkPVblockMeshReader;
 class vtkRenderer;
 class vtkTextActor;
 class vtkMultiBlockDataSet;
@@ -79,10 +79,10 @@ class blockMesh;
 template<class Type> class List;
 
 /*---------------------------------------------------------------------------*\
-                     Class vtkPV4blockMesh Declaration
+                     Class vtkPVblockMesh Declaration
 \*---------------------------------------------------------------------------*/
 
-class vtkPV4blockMesh
+class vtkPVblockMesh
 {
     // Private classes
 
@@ -164,8 +164,8 @@ class vtkPV4blockMesh
 
     // Private Data
 
-        //- Access to the controlling vtkPV4blockMeshReader
-        vtkPV4blockMeshReader* reader_;
+        //- Access to the controlling vtkPVblockMeshReader
+        vtkPVblockMeshReader* reader_;
 
         //- OpenFOAM time control
         autoPtr<Time> dbPtr_;
@@ -294,31 +294,31 @@ class vtkPV4blockMesh
 
 
         //- Disallow default bitwise copy construct
-        vtkPV4blockMesh(const vtkPV4blockMesh&);
+        vtkPVblockMesh(const vtkPVblockMesh&);
 
         //- Disallow default bitwise assignment
-        void operator=(const vtkPV4blockMesh&);
+        void operator=(const vtkPVblockMesh&);
 
 
 public:
 
     //- Static data members
 
-        ClassName("vtkPV4blockMesh");
+        ClassName("vtkPVblockMesh");
 
 
     // Constructors
 
         //- Construct from components
-        vtkPV4blockMesh
+        vtkPVblockMesh
         (
             const char* const FileName,
-            vtkPV4blockMeshReader* reader
+            vtkPVblockMeshReader* reader
         );
 
 
     //- Destructor
-    ~vtkPV4blockMesh();
+    ~vtkPVblockMesh();
 
 
     // Member Functions
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshConvert.C b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMeshConvert.C
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshConvert.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMeshConvert.C
index d0552eb96d90196e84055bb7d4e22c8a0152babd..b723b36bca34a24680dd1ec098ee235a493e7bb8 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshConvert.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMeshConvert.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4blockMesh.H"
-#include "vtkPV4blockMeshReader.h"
+#include "vtkPVblockMesh.H"
+#include "vtkPVblockMeshReader.h"
 
 // OpenFOAM includes
 #include "blockMesh.H"
@@ -43,7 +43,7 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::vtkPV4blockMesh::convertMeshBlocks
+void Foam::vtkPVblockMesh::convertMeshBlocks
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -59,7 +59,7 @@ void Foam::vtkPV4blockMesh::convertMeshBlocks
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::convertMeshBlocks" << endl;
+        Info<< "<beg> Foam::vtkPVblockMesh::convertMeshBlocks" << endl;
     }
 
     int blockI = 0;
@@ -130,12 +130,12 @@ void Foam::vtkPV4blockMesh::convertMeshBlocks
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::convertMeshBlocks" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::convertMeshBlocks" << endl;
     }
 }
 
 
-void Foam::vtkPV4blockMesh::convertMeshEdges
+void Foam::vtkPVblockMesh::convertMeshEdges
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -240,13 +240,13 @@ void Foam::vtkPV4blockMesh::convertMeshEdges
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::convertMeshEdges" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::convertMeshEdges" << endl;
     }
 
 }
 
 
-void Foam::vtkPV4blockMesh::convertMeshCorners
+void Foam::vtkPVblockMesh::convertMeshCorners
 (
     vtkMultiBlockDataSet* output,
     int& blockNo
@@ -261,7 +261,7 @@ void Foam::vtkPV4blockMesh::convertMeshCorners
 
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::convertMeshCorners" << endl;
+        Info<< "<beg> Foam::vtkPVblockMesh::convertMeshCorners" << endl;
     }
 
     if (true)  // or some flag or other condition
@@ -311,7 +311,7 @@ void Foam::vtkPV4blockMesh::convertMeshCorners
 
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::convertMeshCorners" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::convertMeshCorners" << endl;
     }
 }
 
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshUtils.C b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMeshUtils.C
similarity index 90%
rename from applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshUtils.C
rename to applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMeshUtils.C
index 7cb10730580853e7391045ef15bc808543018a89..a838c5b602c3a84ee98c58ca13713cf7c689709c 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshUtils.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMeshUtils.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,8 +26,8 @@ Description
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4blockMesh.H"
-#include "vtkPV4blockMeshReader.h"
+#include "vtkPVblockMesh.H"
+#include "vtkPVblockMeshReader.h"
 
 // VTK includes
 #include "vtkDataArraySelection.h"
@@ -66,7 +66,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::vtkPV4blockMesh::AddToBlock
+void Foam::vtkPVblockMesh::AddToBlock
 (
     vtkMultiBlockDataSet* output,
     vtkDataSet* dataset,
@@ -126,7 +126,7 @@ void Foam::vtkPV4blockMesh::AddToBlock
 }
 
 
-vtkDataSet* Foam::vtkPV4blockMesh::GetDataSetFromBlock
+vtkDataSet* Foam::vtkPVblockMesh::GetDataSetFromBlock
 (
     vtkMultiBlockDataSet* output,
     const arrayRange& range,
@@ -148,7 +148,7 @@ vtkDataSet* Foam::vtkPV4blockMesh::GetDataSetFromBlock
 
 
 // ununsed at the moment
-Foam::label Foam::vtkPV4blockMesh::GetNumberOfDataSets
+Foam::label Foam::vtkPVblockMesh::GetNumberOfDataSets
 (
     vtkMultiBlockDataSet* output,
     const arrayRange& range
@@ -167,7 +167,7 @@ Foam::label Foam::vtkPV4blockMesh::GetNumberOfDataSets
 }
 
 
-Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected
+Foam::wordHashSet Foam::vtkPVblockMesh::getSelected
 (
     vtkDataArraySelection* select
 )
@@ -187,7 +187,7 @@ Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected
 }
 
 
-Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected
+Foam::wordHashSet Foam::vtkPVblockMesh::getSelected
 (
     vtkDataArraySelection* select,
     const arrayRange& range
@@ -208,7 +208,7 @@ Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected
 }
 
 
-Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries
+Foam::stringList Foam::vtkPVblockMesh::getSelectedArrayEntries
 (
     vtkDataArraySelection* select
 )
@@ -247,7 +247,7 @@ Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries
 }
 
 
-Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries
+Foam::stringList Foam::vtkPVblockMesh::getSelectedArrayEntries
 (
     vtkDataArraySelection* select,
     const arrayRange& range
@@ -286,7 +286,7 @@ Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries
 }
 
 
-void Foam::vtkPV4blockMesh::setSelectedArrayEntries
+void Foam::vtkPVblockMesh::setSelectedArrayEntries
 (
     vtkDataArraySelection* select,
     const stringList& selections
@@ -312,7 +312,7 @@ void Foam::vtkPV4blockMesh::setSelectedArrayEntries
 }
 
 
-void Foam::vtkPV4blockMesh::updateBoolListStatus
+void Foam::vtkPVblockMesh::updateBoolListStatus
 (
     boolList& status,
     vtkDataArraySelection* selection
@@ -320,7 +320,7 @@ void Foam::vtkPV4blockMesh::updateBoolListStatus
 {
     if (debug)
     {
-        Info<< "<beg> Foam::vtkPV4blockMesh::updateBoolListStatus" << endl;
+        Info<< "<beg> Foam::vtkPVblockMesh::updateBoolListStatus" << endl;
     }
 
     const label nElem = selection->GetNumberOfArrays();
@@ -345,7 +345,7 @@ void Foam::vtkPV4blockMesh::updateBoolListStatus
     }
     if (debug)
     {
-        Info<< "<end> Foam::vtkPV4blockMesh::updateBoolListStatus" << endl;
+        Info<< "<end> Foam::vtkPVblockMesh::updateBoolListStatus" << endl;
     }
 }
 
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/files b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..e26a8c4979edaf598e44246acf36382211b3cc16
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/files
@@ -0,0 +1,3 @@
+vtkPVReaders.C
+
+LIB = $(FOAM_LIBBIN)/libvtkPVReaders
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..8a80ee14970d1cb3adc50b58537e3a22c5c7d4c5
--- /dev/null
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/Make/options
@@ -0,0 +1,6 @@
+EXE_INC = \
+    -I$(ParaView_INCLUDE_DIR) \
+    -I$(ParaView_INCLUDE_DIR)/vtkkwiml
+
+LIB_LIBS = \
+    $(GLIBS)
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.C
similarity index 92%
rename from applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.C
rename to applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.C
index dfb9511999828130e1081a02bd27af667ac71df5..2197fb73616229df4e874b992058c08ff6163177 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ Description
 
 \*---------------------------------------------------------------------------*/
 
-#include "vtkPV4Readers.H"
+#include "vtkPVReaders.H"
 
 // OpenFOAM includes
 #include "IFstream.H"
@@ -41,7 +41,7 @@ Description
 
 namespace Foam
 {
-defineTypeNameAndDebug(vtkPV4Readers, 0);
+defineTypeNameAndDebug(vtkPVReaders, 0);
 }
 
 
@@ -75,7 +75,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void Foam::vtkPV4Readers::AddToBlock
+void Foam::vtkPVReaders::AddToBlock
 (
     vtkMultiBlockDataSet* output,
     vtkDataSet* dataset,
@@ -135,7 +135,7 @@ void Foam::vtkPV4Readers::AddToBlock
 }
 
 
-vtkDataSet* Foam::vtkPV4Readers::GetDataSetFromBlock
+vtkDataSet* Foam::vtkPVReaders::GetDataSetFromBlock
 (
     vtkMultiBlockDataSet* output,
     const partInfo& selector,
@@ -157,7 +157,7 @@ vtkDataSet* Foam::vtkPV4Readers::GetDataSetFromBlock
 
 
 // ununsed at the moment
-Foam::label Foam::vtkPV4Readers::GetNumberOfDataSets
+Foam::label Foam::vtkPVReaders::GetNumberOfDataSets
 (
     vtkMultiBlockDataSet* output,
     const partInfo& selector
@@ -176,13 +176,13 @@ Foam::label Foam::vtkPV4Readers::GetNumberOfDataSets
 }
 
 
-// Foam::word Foam::vtkPV4Readers::getPartName(int partId)
+// Foam::word Foam::vtkPVReaders::getPartName(int partId)
 // {
 //     return getFirstWord(reader_->GetPartArrayName(partId));
 // }
 
 
-Foam::wordHashSet Foam::vtkPV4Readers::getSelected
+Foam::wordHashSet Foam::vtkPVReaders::getSelected
 (
     vtkDataArraySelection* select
 )
@@ -202,7 +202,7 @@ Foam::wordHashSet Foam::vtkPV4Readers::getSelected
 }
 
 
-Foam::wordHashSet Foam::vtkPV4Readers::getSelected
+Foam::wordHashSet Foam::vtkPVReaders::getSelected
 (
     vtkDataArraySelection* select,
     const partInfo& selector
@@ -223,7 +223,7 @@ Foam::wordHashSet Foam::vtkPV4Readers::getSelected
 }
 
 
-Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries
+Foam::stringList Foam::vtkPVReaders::getSelectedArrayEntries
 (
     vtkDataArraySelection* select
 )
@@ -262,7 +262,7 @@ Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries
 }
 
 
-Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries
+Foam::stringList Foam::vtkPVReaders::getSelectedArrayEntries
 (
     vtkDataArraySelection* select,
     const partInfo& selector
@@ -301,7 +301,7 @@ Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries
 }
 
 
-void Foam::vtkPV4Readers::setSelectedArrayEntries
+void Foam::vtkPVReaders::setSelectedArrayEntries
 (
     vtkDataArraySelection* select,
     const stringList& selections
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.H b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H
similarity index 95%
rename from applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.H
rename to applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H
index 8ab4b94f2c1b8a075a627fc3b34125895673e0c8..958668105f701ddcbb9c2b52de9e5daf8d42ce58 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVReaders/vtkPVReaders.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,19 +22,19 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Namespace
-    Foam::vtkPV4Readers
+    Foam::vtkPVReaders
 
 Description
     A collection of helper functions when building a reader interface in
     ParaView3.
 
 SourceFiles
-    vtkPV4Readers.C
+    vtkPVReaders.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef vtkPV4Readers_H
-#define vtkPV4Readers_H
+#ifndef vtkPVReaders_H
+#define vtkPVReaders_H
 
 // do not include legacy strstream headers
 #ifndef  VTK_EXCLUDE_STRSTREAM_HEADERS
@@ -53,7 +53,7 @@ SourceFiles
 class vtkDataArraySelection;
 class vtkDataSet;
 class vtkPoints;
-class vtkPV4FoamReader;
+class vtkPVFoamReader;
 class vtkRenderer;
 class vtkTextActor;
 class vtkMultiBlockDataSet;
@@ -66,10 +66,10 @@ class vtkIndent;
 
 namespace Foam
 {
-namespace vtkPV4Readers
+namespace vtkPVReaders
 {
     //- Declare name of the class and its debug switch
-    NamespaceName("vtkPV4Readers");
+    NamespaceName("vtkPVReaders");
 
     //- Bookkeeping for GUI checklists and the multi-block organization
     class partInfo
@@ -217,7 +217,7 @@ namespace vtkPV4Readers
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-} // End namespace vtkPV4
+} // End namespace vtkPV
 
 } // End namespace Foam
 
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
index e033316861cc9150d617487cadbafbde94f68fa9..7a5f1a0863ae22ca3c4294caa22dffc8125ffcf9 100755
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
@@ -1,6 +1,10 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-wmake libso
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
-# ----------------------------------------------------------------- end-of-file
+wmake $targetType
+
+#------------------------------------------------------------------------------
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 c9fd0d389ffc43c211a01bb936eba0791cb8b2a0..7d768159ce333f622fca385b16a887aa337e9076 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
@@ -5,7 +5,7 @@ int USERD_get_part_elements_by_type
     int **conn_array
 )
 {
-#   ifdef ENSIGHTDEBUG
+    #ifdef ENSIGHTDEBUG
     Info<< "Entering: USERD_get_part_elements_by_type" << nl
         << "part_number = " << part_number << nl
         << "element_type = " << element_type;
@@ -46,7 +46,7 @@ int USERD_get_part_elements_by_type
         Info<< " unknown";
     }
     Info<< endl << flush;
-#   endif
+    #endif
 
     if (part_number == 1)
     {
@@ -244,9 +244,9 @@ int USERD_get_part_elements_by_type
         return Z_ERR;
     }
 
-#   ifdef ENSIGHTDEBUG
+    #ifdef ENSIGHTDEBUG
     Info<< "Leaving: USERD_get_part_elements_by_type" << endl;
-#   endif
+    #endif
 
     return Z_OK;
 }
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H
index ba26142e3e157120ebb9507efd6bc530906f7b84..7110e2431c5b16ae3693378b9b1b466f24b9efcc 100644
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H
@@ -171,7 +171,7 @@ int USERD_set_filenames
         false
     );
 
-    if (sprayHeader.typeHeaderOk<Cloud<passiveParticle> >(false))
+    if (sprayHeader.typeHeaderOk<Cloud<passiveParticle>>(false))
     {
         Info<< "[Found lagrangian]" << endl;
 
diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C
index 83f9bc2ebb92a5c33e650e7dd43f189ee41856a5..d6dbcb41e45b6e070945e7e8b59bb09952c51ae4 100644
--- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C
+++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
     label nTracks = nParticle/sampleFrequency;
 
     // storage for all particle tracks
-    List<DynamicList<vector> > allTracks(nTracks);
+    List<DynamicList<vector>> allTracks(nTracks);
 
     Info<< "\nGenerating " << nTracks << " particle tracks for cloud "
         << cloudName << nl << endl;
@@ -211,7 +211,7 @@ int main(int argc, char *argv[])
             tracks[trackI].transfer(allTracks[trackI]);
         }
 
-        autoPtr<writer<scalar> > scalarFormatterPtr = writer<scalar>::New
+        autoPtr<writer<scalar>> scalarFormatterPtr = writer<scalar>::New
         (
             setFormat
         );
@@ -242,7 +242,7 @@ int main(int argc, char *argv[])
             true,           // writeTracks
             tracks,
             wordList(0),
-            List<List<scalarField> >(0),
+            List<List<scalarField>>(0),
             vtkTracks
         );
     }
diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C
index 0f279d335874b8ce5cdd1b69ee4fd06f212fc860..11f6bd116e6bca451cff09b3b12426709afc92c4 100644
--- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C
+++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
     fileName vtkPath(runTime.path()/"VTK");
     mkDir(vtkPath);
 
-    typedef HashTable<label, labelPair, labelPair::Hash<> > trackTableType;
+    typedef HashTable<label, labelPair, labelPair::Hash<>> trackTableType;
 
     forAll(timeDirs, timeI)
     {
@@ -204,8 +204,8 @@ int main(int argc, char *argv[])
             }
 
             // particle "age" property used to sort the tracks
-            List<SortableList<scalar> > agePerTrack(nTracks);
-            List<List<label> > particleMap(nTracks);
+            List<SortableList<scalar>> agePerTrack(nTracks);
+            List<List<label>> particleMap(nTracks);
 
             forAll(trackLengths, i)
             {
diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C
index edf43c9a293a2e7a74791b16b00f798cd65011ec..8499dc509f176b50813dafbd9076da8d355545ce 100644
--- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C
+++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ bool fieldOk(const IOobjectList& cloudObjs, const word& name)
 
 
 template<class Type>
-tmp<Field<Type> > readParticleField
+tmp<Field<Type>> readParticleField
 (
     const word& name,
     const IOobjectList cloudObjs
@@ -54,7 +54,7 @@ tmp<Field<Type> > readParticleField
     if (obj != NULL)
     {
         IOField<Type> newField(*obj);
-        return tmp<Field<Type> >(new Field<Type>(newField.xfer()));
+        return tmp<Field<Type>>(new Field<Type>(newField.xfer()));
     }
 
     FatalErrorInFunction
@@ -68,7 +68,7 @@ tmp<Field<Type> > readParticleField
 template<class Type>
 void readFields
 (
-    PtrList<List<Type> >& values,
+    PtrList<List<Type>>& values,
     const List<word>& fieldNames,
     const IOobjectList& cloudObjs
 )
@@ -109,8 +109,8 @@ template<class Type>
 void writeVTKFields
 (
     OFstream& os,
-    const PtrList<List<Type> >& values,
-    const List<List<label> >& addr,
+    const PtrList<List<Type>>& values,
+    const List<List<label>>& addr,
     const List<word>& fieldNames
 )
 {
@@ -150,7 +150,7 @@ template<class Type>
 void processFields
 (
     OFstream& os,
-    const List<List<label> >& addr,
+    const List<List<label>>& addr,
     const List<word>& userFieldNames,
     const IOobjectList& cloudObjs
 )
@@ -170,7 +170,7 @@ void processFields
         }
         fieldNames.shrink();
 
-        PtrList<List<Type> > values(fieldNames.size());
+        PtrList<List<Type>> values(fieldNames.size());
         readFields<Type>(values, fieldNames, cloudObjs);
 
         writeVTKFields<Type>
diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H
index f3b5d48d2d2437c657534478cb5cf923bb0708fd..46c6ba91b385bf92e462a5ae5ee66a6061fc60e6 100644
--- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H
+++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ namespace Foam
     bool fieldOk(const IOobjectList& cloudObjs, const word& name);
 
     template<class Type>
-    tmp<Field<Type> > readParticleField
+    tmp<Field<Type>> readParticleField
     (
         const word& name,
         const IOobjectList cloudObjs
@@ -51,7 +51,7 @@ namespace Foam
     template<class Type>
     void readFields
     (
-        PtrList<List<Type> >& values,
+        PtrList<List<Type>>& values,
         const List<word>& fields,
         const IOobjectList& cloudObjs
     );
@@ -63,15 +63,15 @@ namespace Foam
     void writeVTKFields
     (
         OFstream& os,
-        const PtrList<List<Type> >& values,
-        const List<SortableList<scalar> >& agePerTrack,
+        const PtrList<List<Type>>& values,
+        const List<SortableList<scalar>>& agePerTrack,
         const List<word>& fieldNames
     );
 
     void processFields
     (
         OFstream& os,
-        const List<SortableList<scalar> >& agePerTrack,
+        const List<SortableList<scalar>>& agePerTrack,
         const List<word>& userFieldNames,
         const IOobjectList& cloudObjs
     );
diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C
index eed7d90376f609fdc3744433c03be82692a63d9b..5abf6253fe1166d608ef53ca47c5685ab2837120 100644
--- a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C
+++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ namespace Foam
     bool addFieldsToList
     (
         const fvMesh& mesh,
-        PtrList<GeometricField<Type, fvPatchField, volMesh> >& list,
+        PtrList<GeometricField<Type, fvPatchField, volMesh>>& list,
         const wordList& fieldNames
     )
     {
diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C
index b4ce9a7bfbf9a36858a50c496d4885825815ec68..2f505548027c5ebbcf142375a40022025278e176 100644
--- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C
+++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 template<class T>
 Foam::Field<T> Foam::channelIndex::regionSum(const Field<T>& cellField) const
 {
-    Field<T> regionField(cellRegion_().nRegions(), pTraits<T>::zero);
+    Field<T> regionField(cellRegion_().nRegions(), Zero);
 
     forAll(cellRegion_(), cellI)
     {
diff --git a/applications/utilities/postProcessing/noise/noise.C b/applications/utilities/postProcessing/noise/noise.C
index 4f4cb599ff0941ded49b8f307654781b46c78189..43597560f0d91822a07aa4a2ec6687175354d8c2 100644
--- a/applications/utilities/postProcessing/noise/noise.C
+++ b/applications/utilities/postProcessing/noise/noise.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
     #include "createFields.H"
 
     Info<< "Reading data file" << endl;
-    CSV<scalar> pData("pressure", dict, "Data");
+    Function1Types::CSV<scalar> pData("pressure", dict, "Data");
 
     // time history data
     const scalarField t(pData.x());
diff --git a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C
index ab8507b9b7a2a4ca721bfe6b632652ae905899cf..53190221b7d21c61b640cd4adc910cd3069d85db 100644
--- a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C
+++ b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ void printAverage
         FieldType field(fieldHeader, mesh);
 
         typename FieldType::value_type sumField =
-            pTraits<typename FieldType::value_type>::zero;
+            Zero;
 
         if (area > 0)
         {
diff --git a/applications/utilities/postProcessing/sampling/sample/sampleDict b/applications/utilities/postProcessing/sampling/sample/sampleDict
index c1b5bc7ccff40327697011b9fdeff3f3e2c9cf23..d23f8a380ffa3e13f2853e1dd42100b8524a305c 100644
--- a/applications/utilities/postProcessing/sampling/sample/sampleDict
+++ b/applications/utilities/postProcessing/sampling/sample/sampleDict
@@ -92,6 +92,10 @@ formatOptions
         //        setting
         format  short;      // short/long/free
     }
+    raw
+    {
+         compression  uncompressed; // 'uncompressed' or 'compressed'
+    }
 }
 
 // interpolationScheme. choice of
diff --git a/applications/utilities/postProcessing/velocityField/Co/Co.C b/applications/utilities/postProcessing/velocityField/Co/Co.C
index 95f11893c21c58ee893ce0ba55bfb7c1eeb35243..1e88dd92d3052d86079fc217bf8bbf4a57ac4a48 100644
--- a/applications/utilities/postProcessing/velocityField/Co/Co.C
+++ b/applications/utilities/postProcessing/velocityField/Co/Co.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,6 +35,7 @@ Description
 
 #include "calc.H"
 #include "fvc.H"
+#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C b/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
index 49e1454485e71529e46c2aed05a24f99e6465f67..650d075ea735054f7b87d0c544f954cc1f22b747 100644
--- a/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
+++ b/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
                 (
                     "wallGradU",
                     U.dimensions()/dimLength,
-                    vector::zero
+                    Zero
                 )
             );
 
diff --git a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
index 248893451fe5a3f5ca4258f5de38024e7fcddc0f..6d8b48dff673c153a4faa61ef88402ff7ac00af0 100644
--- a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
+++ b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,8 +25,8 @@ Application
     wallShearStress
 
 Description
-    Calculates and reports wall shear stress for all patches, for the
-    specified times when using RAS turbulence models.
+    Calculates and reports the turbulent wall shear stress for all patches,
+    for the specified times.
 
     Compressible modes is automatically selected based on the existence of the
     "thermophysicalProperties" dictionary required to construct the
@@ -53,9 +53,9 @@ void calcIncompressible
 
     singlePhaseTransportModel laminarTransport(U, phi);
 
-    autoPtr<incompressible::RASModel> model
+    autoPtr<incompressible::turbulenceModel> model
     (
-        incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
+        incompressible::turbulenceModel::New(U, phi, laminarTransport)
     );
 
     const volSymmTensorField Reff(model->devReff());
@@ -102,15 +102,9 @@ void calcCompressible
     autoPtr<fluidThermo> pThermo(fluidThermo::New(mesh));
     fluidThermo& thermo = pThermo();
 
-    autoPtr<compressible::RASModel> model
+    autoPtr<compressible::turbulenceModel> model
     (
-        compressible::New<compressible::RASModel>
-        (
-            rho,
-            U,
-            phi,
-            thermo
-        )
+        compressible::turbulenceModel::New(rho, U, phi, thermo)
     );
 
     const volSymmTensorField Reff(model->devRhoReff());
@@ -156,7 +150,7 @@ int main(int argc, char *argv[])
             (
                 "wallShearStress",
                 sqr(dimLength)/sqr(dimTime),
-                vector::zero
+                Zero
             )
         );
 
diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
index 2759555e07d4226af68ca902aa9111c84460f0f2..7b597bd77713a1bbbaeeef01b6ab1ea2938744eb 100644
--- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
+++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -45,13 +45,41 @@ Description
 #include "turbulentFluidThermoModel.H"
 #include "wallDist.H"
 #include "processorFvPatchField.H"
+#include "zeroGradientFvPatchField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// turbulence constants - file-scope
+// Turbulence constants - file-scope
 static const scalar Cmu(0.09);
 static const scalar kappa(0.41);
 
+
+Foam::tmp<Foam::volVectorField> createSimplifiedU(const volVectorField& U)
+{
+    tmp<volVectorField> tU
+    (
+        new volVectorField
+        (
+            IOobject
+            (
+                "Udash",
+                U.mesh().time().timeName(),
+                U.mesh(),
+                IOobject::NO_READ
+            ),
+            U.mesh(),
+            dimensionedVector("0", dimVelocity, vector::zero),
+            zeroGradientFvPatchField<vector>::typeName
+        )
+    );
+
+    // Assign the internal value to the original field
+    tU.ref() = U;
+
+    return tU;
+}
+
+
 void correctProcessorPatches(volScalarField& vf)
 {
     if (!Pstream::parRun())
@@ -62,12 +90,11 @@ void correctProcessorPatches(volScalarField& vf)
     // Not possible to use correctBoundaryConditions on fields as they may
     // use local info as opposed to the constraint values employed here,
     // but still need to update processor patches
-
     volScalarField::GeometricBoundaryField& bf = vf.boundaryField();
 
     forAll(bf, patchI)
     {
-        if (isA<processorFvPatchField<scalar> >(bf[patchI]))
+        if (isA<processorFvPatchField<scalar>>(bf[patchI]))
         {
             bf[patchI].initEvaluate();
         }
@@ -75,7 +102,7 @@ void correctProcessorPatches(volScalarField& vf)
 
     forAll(bf, patchI)
     {
-        if (isA<processorFvPatchField<scalar> >(bf[patchI]))
+        if (isA<processorFvPatchField<scalar>>(bf[patchI]))
         {
             bf[patchI].evaluate();
         }
@@ -83,73 +110,49 @@ void correctProcessorPatches(volScalarField& vf)
 }
 
 
-template<class TurbulenceModel>
-Foam::tmp<Foam::volScalarField> calcK
-(
-    TurbulenceModel& turbulence,
-    const volScalarField& mask,
-    const volScalarField& nut,
-    const volScalarField& y,
-    const dimensionedScalar& ybl,
-    const scalar Cmu,
-    const scalar kappa
-)
-{
-    // Turbulence k
-    tmp<volScalarField> tk = turbulence->k();
-    volScalarField& k = tk();
-    scalar ck0 = pow025(Cmu)*kappa;
-    k = (1 - mask)*k + mask*sqr(nut/(ck0*min(y, ybl)));
-
-    // Do not correct BC
-    // - operation may use inconsistent fields wrt these local manipulations
-    // k.correctBoundaryConditions();
-    correctProcessorPatches(k);
-
-    Info<< "Writing k\n" << endl;
-    k.write();
-
-    return tk;
-}
-
-
-template<class TurbulenceModel>
-Foam::tmp<Foam::volScalarField> calcEpsilon
+void blendField
 (
-    TurbulenceModel& turbulence,
-    const volScalarField& mask,
-    const volScalarField& k,
-    const volScalarField& y,
-    const dimensionedScalar& ybl,
-    const scalar Cmu,
-    const scalar kappa
+    const word& fieldName,
+    const fvMesh& mesh,
+    const scalarField& mask,
+    const scalarField& boundaryLayerField
 )
 {
-    // Turbulence epsilon
-    tmp<volScalarField> tepsilon = turbulence->epsilon();
-    volScalarField& epsilon = tepsilon();
-    scalar ce0 = ::pow(Cmu, 0.75)/kappa;
-    epsilon = (1 - mask)*epsilon + mask*ce0*k*sqrt(k)/min(y, ybl);
-    epsilon.max(SMALL);
+    IOobject fieldHeader
+    (
+        fieldName,
+        mesh.time().timeName(),
+        mesh,
+        IOobject::MUST_READ,
+        IOobject::NO_WRITE,
+        false
+    );
 
-    // Do not correct BC
-    // - operation may use inconsistent fields wrt these local manipulations
-    // epsilon.correctBoundaryConditions();
-    correctProcessorPatches(epsilon);
+    if (fieldHeader.typeHeaderOk<volScalarField>(true))
+    {
+        volScalarField fld(fieldHeader, mesh);
+        scalarField& internalField = fld.internalField();
+        internalField = (1 - mask)*internalField + mask*boundaryLayerField;
+        fld.max(SMALL);
 
-    Info<< "Writing epsilon\n" << endl;
-    epsilon.write();
+        // Do not correct BC
+        // - operation may use inconsistent fields wrt these local
+        //   manipulations
+        //fld.correctBoundaryConditions();
+        correctProcessorPatches(fld);
 
-    return tepsilon;
+        Info<< "Writing " << fieldName << nl << endl;
+        fld.write();
+    }
 }
 
 
-void calcOmega
+void calcOmegaField
 (
     const fvMesh& mesh,
-    const volScalarField& mask,
-    const volScalarField& k,
-    const volScalarField& epsilon
+    const scalarField& mask,
+    const scalarField& kBL,
+    const scalarField& epsilonBL
 )
 {
     // Turbulence omega
@@ -166,9 +169,10 @@ void calcOmega
     if (omegaHeader.typeHeaderOk<volScalarField>(true))
     {
         volScalarField omega(omegaHeader, mesh);
-        dimensionedScalar k0("SMALL", k.dimensions(), SMALL);
+        scalarField& internalField = omega.internalField();
 
-        omega = (1 - mask)*omega + mask*epsilon/(Cmu*k + k0);
+        internalField =
+            (1 - mask)*internalField + mask*epsilonBL/(Cmu*kBL + SMALL);
         omega.max(SMALL);
 
         // Do not correct BC
@@ -217,99 +221,79 @@ void setField
 }
 
 
-void calcCompressible
+tmp<volScalarField> calcNut
 (
     const fvMesh& mesh,
-    const volScalarField& mask,
-    const volVectorField& U,
-    const volScalarField& y,
-    const dimensionedScalar& ybl
+    const volVectorField& U
 )
 {
     const Time& runTime = mesh.time();
 
-    autoPtr<fluidThermo> pThermo(fluidThermo::New(mesh));
-    fluidThermo& thermo = pThermo();
-    volScalarField rho(thermo.rho());
-
-    // Update/re-write phi
-    #include "compressibleCreatePhi.H"
-    phi.write();
-
-    autoPtr<compressible::turbulenceModel> turbulence
+    if
     (
-        compressible::turbulenceModel::New
+        IOobject
         (
-            rho,
-            U,
-            phi,
-            thermo
-        )
-    );
-
-    // Calculate nut - reference nut is calculated by the turbulence model
-    // on its construction
-    tmp<volScalarField> tnut = turbulence->nut();
-
-    volScalarField& nut = tnut();
-    volScalarField S(mag(dev(symm(fvc::grad(U)))));
-    nut = (1 - mask)*nut + mask*sqr(kappa*min(y, ybl))*::sqrt(2)*S;
-
-    // Do not correct BC - wall functions will 'undo' manipulation above
-    // by using nut from turbulence model
-    correctProcessorPatches(nut);
-    nut.write();
-
-    tmp<volScalarField> k =
-        calcK(turbulence, mask, nut, y, ybl, Cmu, kappa);
-    tmp<volScalarField> epsilon =
-        calcEpsilon(turbulence, mask, k, y, ybl, Cmu, kappa);
-    calcOmega(mesh, mask, k, epsilon);
-    setField(mesh, "nuTilda", nut);
-}
-
-
-void calcIncompressible
-(
-    const fvMesh& mesh,
-    const volScalarField& mask,
-    const volVectorField& U,
-    const volScalarField& y,
-    const dimensionedScalar& ybl
-)
-{
-    const Time& runTime = mesh.time();
-
-    // Update/re-write phi
-    #include "createPhi.H"
-    phi.write();
-
-    singlePhaseTransportModel laminarTransport(U, phi);
+            basicThermo::dictName,
+            runTime.constant(),
+            mesh
+        ).typeHeaderOk<IOdictionary>(true)
+    )
+    {
+        // Compressible
+        autoPtr<fluidThermo> pThermo(fluidThermo::New(mesh));
+        fluidThermo& thermo = pThermo();
+        volScalarField rho(thermo.rho());
 
-    autoPtr<incompressible::turbulenceModel> turbulence
-    (
-        incompressible::turbulenceModel::New(U, phi, laminarTransport)
-    );
+        // Update/re-write phi
+        #include "compressibleCreatePhi.H"
+        phi.write();
 
-    tmp<volScalarField> tnut = turbulence->nut();
+        autoPtr<compressible::turbulenceModel> turbulence
+        (
+            compressible::turbulenceModel::New
+            (
+                rho,
+                U,
+                phi,
+                thermo
+            )
+        );
+
+        // Hack to correct nut
+        // Note: in previous versions of the code, nut was initialised on
+        //       construction of the turbulence model.  This is no longer the
+        //       case for the Templated Turbulence models.  The call to correct
+        //       below will evolve the turbulence model equations and update nut,
+        //       whereas only nut update is required.  Need to revisit.
+        turbulence->correct();
+
+        return tmp<volScalarField>(new volScalarField(turbulence->nut()));
+    }
+    else
+    {
+        // Incompressible
 
-    // Calculate nut - reference nut is calculated by the turbulence model
-    // on its construction
-    volScalarField& nut = tnut();
-    volScalarField S(mag(dev(symm(fvc::grad(U)))));
-    nut = (1 - mask)*nut + mask*sqr(kappa*min(y, ybl))*::sqrt(2)*S;
+        // Update/re-write phi
+        #include "createPhi.H"
+        phi.write();
 
-    // Do not correct BC - wall functions will 'undo' manipulation above
-    // by using nut from turbulence model
-    correctProcessorPatches(nut);
-    nut.write();
+        singlePhaseTransportModel laminarTransport(U, phi);
 
-    tmp<volScalarField> k =
-        calcK(turbulence, mask, nut, y, ybl, Cmu, kappa);
-    tmp<volScalarField> epsilon =
-        calcEpsilon(turbulence, mask, k, y, ybl, Cmu, kappa);
-    calcOmega(mesh, mask, k, epsilon);
-    setField(mesh, "nuTilda", nut);
+        autoPtr<incompressible::turbulenceModel> turbulence
+        (
+            incompressible::turbulenceModel::New(U, phi, laminarTransport)
+        );
+
+        // Hack to correct nut
+        // Note: in previous versions of the code, nut was initialised on
+        //       construction of the turbulence model.  This is no longer the
+        //       case for the Templated Turbulence models.  The call to correct
+        //       below will evolve the turbulence model equations and update nut,
+        //       whereas only nut update is required.  Need to revisit.
+        turbulence->correct();
+
+        return tmp<volScalarField>(new volScalarField(turbulence->nut()));
+    }
 }
 
 
@@ -361,43 +345,59 @@ int main(int argc, char *argv[])
 
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+    // Create a copy of the U field where BCs are simplified to  zeroGradient
+    // to enable boundary condition update without requiring other fields,
+    // e.g. phi.  We can then call correctBoundaryConditions on this field to
+    // enable appropriate behaviour for processor patches.
+    volVectorField Udash(createSimplifiedU(U));
+
     // Modify velocity by applying a 1/7th power law boundary-layer
     // u/U0 = (y/ybl)^(1/7)
     // assumes U0 is the same as the current cell velocity
-
     Info<< "Setting boundary layer velocity" << nl << endl;
     scalar yblv = ybl.value();
-    forAll(U, cellI)
+    forAll(Udash, cellI)
     {
         if (y[cellI] <= yblv)
         {
             mask[cellI] = 1;
-            U[cellI] *= ::pow(y[cellI]/yblv, (1.0/7.0));
+            Udash[cellI] *= ::pow(y[cellI]/yblv, (1.0/7.0));
         }
     }
     mask.correctBoundaryConditions();
+    Udash.correctBoundaryConditions();
 
-    Info<< "Writing U\n" << endl;
-    U.write();
+    // Retrieve nut from turbulence model
+    volScalarField nut(calcNut(mesh, Udash));
 
+    // Blend nut using boundary layer profile
+    volScalarField S("S", mag(dev(symm(fvc::grad(Udash)))));
+    nut = (1 - mask)*nut + mask*sqr(kappa*min(y, ybl))*::sqrt(2)*S;
 
-    if
-    (
-        IOobject
-        (
-            basicThermo::dictName,
-            runTime.constant(),
-            mesh
-        ).typeHeaderOk<IOdictionary>(true)
-    )
-    {
-        calcCompressible(mesh, mask, U, y, ybl);
-    }
-    else
-    {
-        calcIncompressible(mesh, mask, U, y, ybl);
-    }
+    // Do not correct BC - wall functions will 'undo' manipulation above
+    // by using nut from turbulence model
+    correctProcessorPatches(nut);
+    nut.write();
+
+    // Boundary layer turbulence kinetic energy
+    scalar ck0 = pow025(Cmu)*kappa;
+    scalarField kBL(sqr(nut/(ck0*min(y, ybl))));
 
+    // Boundary layer turbulence dissipation
+    scalar ce0 = ::pow(Cmu, 0.75)/kappa;
+    scalarField epsilonBL(ce0*kBL*sqrt(kBL)/min(y, ybl));
+
+    // Process fields if they are present
+    blendField("k", mesh, mask, kBL);
+    blendField("epsilon", mesh, mask, epsilonBL);
+    calcOmegaField(mesh, mask, kBL, epsilonBL);
+    setField(mesh, "nuTilda", nut);
+
+
+    // Copy internal field Udash into U before writing
+    Info<< "Writing U\n" << endl;
+    U = Udash;
+    U.write();
 
     Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
         << "  ClockTime = " << runTime.elapsedClockTime() << " s"
diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H
index a5847f74ee9b4e1dc78f342b98771feef3afaa6d..0adeb49b7203e4262e129b0d4f7b4cef754b37e5 100644
--- a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H
+++ b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H
@@ -38,7 +38,23 @@ volVectorField U
 );
 
 Info<< "Calculating wall distance field" << endl;
-const volScalarField& y(wallDist::New(mesh).y());
+volScalarField y
+(
+    IOobject
+    (
+        "y",
+        runTime.timeName(),
+        mesh,
+        IOobject::NO_READ,
+        IOobject::NO_WRITE
+    ),
+    mesh,
+    dimensionedScalar("zero", dimLength, 0.0),
+    zeroGradientFvPatchScalarField::typeName
+);
+y.internalField() = wallDist::New(mesh).y().internalField();
+y.correctBoundaryConditions();
+
 
 // Set the mean boundary-layer thickness
 dimensionedScalar ybl("ybl", dimLength, 0);
diff --git a/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.H b/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.H
index 128806c023175cc469817e295b33bfeca5bcf3a3..26c9577f4c5fae9117b44e10fb32046ee1e7c185 100644
--- a/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.H
+++ b/applications/utilities/preProcessing/createZeroDirectory/solverTemplate.H
@@ -94,7 +94,7 @@ private:
             List<wordList> fieldTypes_;
 
             //- Field dimensions
-            List<PtrList<dimensionSet> > fieldDimensions_;
+            List<PtrList<dimensionSet>> fieldDimensions_;
 
 
     // Public member functions
diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C
index 77db19822a5bc068f5a15db6126077bec0624339..7f2746338c71a9a85abd0e5eb553f2c2d638833f 100644
--- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C
+++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C
@@ -74,7 +74,7 @@ void rewriteBoundary
     HashTable<word>& nbrNames
 )
 {
-    Info<< "Reading boundary from " << typeFilePath<IOPtrList<entry> >(io)
+    Info<< "Reading boundary from " << typeFilePath<IOPtrList<entry>>(io)
         << endl;
 
     // Read PtrList of dictionary.
@@ -447,7 +447,7 @@ int main(int argc, char *argv[])
         false
     );
 
-    if (io.typeHeaderOk<IOPtrList<entry> >(false))
+    if (io.typeHeaderOk<IOPtrList<entry>>(false))
     {
         rewriteBoundary
         (
@@ -481,7 +481,7 @@ int main(int argc, char *argv[])
             false
         );
 
-        if (io.typeHeaderOk<IOPtrList<entry> >(false))
+        if (io.typeHeaderOk<IOPtrList<entry>>(false))
         {
             rewriteBoundary
             (
diff --git a/applications/utilities/preProcessing/mapFields/MapLagrangianFields.H b/applications/utilities/preProcessing/mapFields/MapLagrangianFields.H
index 9244091d2e22cc5babf4a762d7c555655560370c..605f43090ae33a3273201c0bc264b63ff6d219ab 100644
--- a/applications/utilities/preProcessing/mapFields/MapLagrangianFields.H
+++ b/applications/utilities/preProcessing/mapFields/MapLagrangianFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ void MapLagrangianFields
 
     {
         IOobjectList fieldFields =
-            objects.lookupClass(IOField<Field<Type> >::typeName);
+            objects.lookupClass(IOField<Field<Type>>::typeName);
 
         forAllIter(IOobjectList, fieldFields, fieldIter)
         {
@@ -104,7 +104,7 @@ void MapLagrangianFields
                 << fieldIter()->name() << endl;
 
             // Read field (does not need mesh)
-            IOField<Field<Type> > fieldSource(*fieldIter());
+            IOField<Field<Type>> fieldSource(*fieldIter());
 
             // Map - use CompactIOField to automatically write in
             // compact form for binary format.
diff --git a/applications/utilities/preProcessing/mapFieldsPar/MapLagrangianFields.H b/applications/utilities/preProcessing/mapFieldsPar/MapLagrangianFields.H
index d1a010ce21e19e37d378e1be7bf587a0e0a4ca65..19656c12d7828189ad607c81b1798503ac317a97 100644
--- a/applications/utilities/preProcessing/mapFieldsPar/MapLagrangianFields.H
+++ b/applications/utilities/preProcessing/mapFieldsPar/MapLagrangianFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ void MapLagrangianFields
 
     {
         IOobjectList fieldFields =
-            objects.lookupClass(IOField<Field<Type> >::typeName);
+            objects.lookupClass(IOField<Field<Type>>::typeName);
 
         forAllIter(IOobjectList, fieldFields, fieldIter)
         {
@@ -106,7 +106,7 @@ void MapLagrangianFields
             // Read field (does not need mesh)
             // Note: some fieldFields are 0 size (e.g. collision records) if
             //       not used
-            IOField<Field<Type> > fieldSource(*fieldIter());
+            IOField<Field<Type>> fieldSource(*fieldIter());
 
             // Map - use CompactIOField to automatically write in
             // compact form for binary format.
diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C
index c20c2e51f5e1c2bbd8b43389170e2506e745fbfe..7d22cec68bba91da0ae33d9bfc9e131e5ef6de86 100644
--- a/applications/utilities/preProcessing/setFields/setFields.C
+++ b/applications/utilities/preProcessing/setFields/setFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -240,7 +240,7 @@ bool setFaceFieldType
                 field.boundaryField()[patchi].size(),
                 field.boundaryField()[patchi].patch().start()
               - mesh.nInternalFaces()
-            ).assign(field.boundaryField()[patchi]);
+            ) = field.boundaryField()[patchi];
         }
 
         // Override
diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
index ee7f6475b8c7a7a75f332c1a8ab0af68f7c381f5..02f0c5d9ad3f6d4dfe2ea546da74b24e109bedb6 100644
--- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
+++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -335,7 +335,7 @@ int main(int argc, char *argv[])
     const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
 
     labelList viewFactorsPatches(patches.findIndices(viewFactorWall));
-    forAll (viewFactorsPatches, i)
+    forAll(viewFactorsPatches, i)
     {
         label patchI = viewFactorsPatches[i];
         nCoarseFaces += coarsePatches[patchI].size();
@@ -363,10 +363,9 @@ int main(int argc, char *argv[])
 
     DynamicList<point> localCoarseCf(nCoarseFaces);
     DynamicList<point> localCoarseSf(nCoarseFaces);
-
     DynamicList<label> localAgg(nCoarseFaces);
-
     labelHashSet includePatches;
+
     forAll(viewFactorsPatches, i)
     {
         const label patchID = viewFactorsPatches[i];
@@ -404,7 +403,6 @@ int main(int argc, char *argv[])
                     pp.points()
                 );
 
-
                 List<point> availablePoints
                 (
                     upp.faceCentres().size()
@@ -415,14 +413,14 @@ int main(int argc, char *argv[])
                 (
                     availablePoints,
                     upp.faceCentres().size()
-                ).assign(upp.faceCentres());
+                ) = upp.faceCentres();
 
                 SubList<point>
                 (
                     availablePoints,
                     upp.localPoints().size(),
                     upp.faceCentres().size()
-                ).assign(upp.localPoints());
+                ) = upp.localPoints();
 
                 point cfo = cf;
                 scalar dist = GREAT;
@@ -505,7 +503,7 @@ int main(int argc, char *argv[])
     // - construct distribute map
     // - renumber rayEndFace into compact addressing
 
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
 
     mapDistribute map(globalNumbering, rayEndFace, compactMap);
 
@@ -526,16 +524,16 @@ int main(int argc, char *argv[])
     // I need coarse Sf (Ai), fine Sf (dAi) and fine Cf(r) to calculate Fij
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    pointField compactCoarseCf(map.constructSize(), pTraits<vector>::zero);
-    pointField compactCoarseSf(map.constructSize(), pTraits<vector>::zero);
-    List<List<point> > compactFineSf(map.constructSize());
-    List<List<point> > compactFineCf(map.constructSize());
+    pointField compactCoarseCf(map.constructSize(), Zero);
+    pointField compactCoarseSf(map.constructSize(), Zero);
+    List<List<point>> compactFineSf(map.constructSize());
+    List<List<point>> compactFineCf(map.constructSize());
 
     DynamicList<label> compactPatchId(map.constructSize());
 
     // Insert my coarse local values
-    SubList<point>(compactCoarseSf, nCoarseFaces).assign(localCoarseSf);
-    SubList<point>(compactCoarseCf, nCoarseFaces).assign(localCoarseCf);
+    SubList<point>(compactCoarseSf, nCoarseFaces) = localCoarseSf;
+    SubList<point>(compactCoarseCf, nCoarseFaces) = localCoarseCf;
 
     // Insert my fine local values
     label compactI = 0;
@@ -622,7 +620,6 @@ int main(int argc, char *argv[])
     // Matrix sum in j(Fij) for each i (if enclosure sum = 1)
     scalarSquareMatrix sumViewFactorPatch
     (
-        totalPatches,
         totalPatches,
         0.0
     );
@@ -636,7 +633,7 @@ int main(int argc, char *argv[])
 
     if (mesh.nSolutionD() == 3)
     {
-        forAll (localCoarseSf, coarseFaceI)
+        forAll(localCoarseSf, coarseFaceI)
         {
             const List<point>& localFineSf = compactFineSf[coarseFaceI];
             const vector Ai = sum(localFineSf);
@@ -656,12 +653,12 @@ int main(int argc, char *argv[])
                 const label toPatchId = compactPatchId[compactJ];
 
                 scalar Fij = 0;
-                forAll (localFineSf, i)
+                forAll(localFineSf, i)
                 {
                     const vector& dAi = localFineSf[i];
                     const vector& dCi = localFineCf[i];
 
-                    forAll (remoteFineSj, j)
+                    forAll(remoteFineSj, j)
                     {
                         const vector& dAj = remoteFineSj[j];
                         const vector& dCj = remoteFineCj[j];
@@ -686,7 +683,7 @@ int main(int argc, char *argv[])
     {
         const boundBox& box = mesh.bounds();
         const Vector<label>& dirs = mesh.geometricD();
-        vector emptyDir = vector::zero;
+        vector emptyDir = Zero;
         forAll(dirs, i)
         {
             if (dirs[i] == -1)
@@ -709,7 +706,7 @@ int main(int argc, char *argv[])
             patchArea[fromPatchId] += mag(Ai);
 
             const labelList& visCoarseFaces = visibleFaceFaces[coarseFaceI];
-            forAll (visCoarseFaces, visCoarseFaceI)
+            forAll(visCoarseFaces, visCoarseFaceI)
             {
                 F[coarseFaceI].setSize(visCoarseFaces.size());
                 label compactJ = visCoarseFaces[visCoarseFaceI];
@@ -796,7 +793,7 @@ int main(int argc, char *argv[])
                     const scalar Fij = sum(F[compactI]);
                     const label coarseFaceID = coarsePatchFace[coarseI];
                     const labelList& fineFaces = coarseToFine[coarseFaceID];
-                    forAll (fineFaces, fineId)
+                    forAll(fineFaces, fineId)
                     {
                         const label faceID = fineFaces[fineId];
                         viewFactorField.boundaryField()[patchID][faceID] = Fij;
diff --git a/applications/utilities/preProcessing/wallFunctionTable/Allwmake b/applications/utilities/preProcessing/wallFunctionTable/Allwmake
index c527fdf38fc6ee6b5ef0eb9353412d2e11998c94..63dbf325bed40513f05cd71108ebbbc63b864201 100755
--- a/applications/utilities/preProcessing/wallFunctionTable/Allwmake
+++ b/applications/utilities/preProcessing/wallFunctionTable/Allwmake
@@ -1,8 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
+
+# Parse arguments for library compilation
+targetType=libso
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake libso tabulatedWallFunction
+wmake $targetType tabulatedWallFunction
 wmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C
index 73d87c004bbe5a454ed29235bc029d17571920fe..7857569be374ebfbc911c11675cf83554f4e7cdc 100644
--- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C
+++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -144,7 +144,7 @@ Foam::tabulatedWallFunctions::general::general
     log10YPlus_(coeffDict_.lookup("log10YPlus")),
     log10UPlus_(coeffDict_.lookup("log10UPlus"))
 {
-    List<Tuple2<scalar, scalar> > inputTable = coeffDict_.lookup("inputTable");
+    List<Tuple2<scalar, scalar>> inputTable = coeffDict_.lookup("inputTable");
     if (inputTable.size() < 2)
     {
         FatalErrorInFunction
diff --git a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
index 91918be9e90df8cacd3fa7e0b200ed47ca323e06..f8c094c4bdf5c5acd213f9865391decbe58361ce 100644
--- a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
+++ b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -607,7 +607,7 @@ labelPair edgeIntersectionsCGAL
     const labelList& meshPoints = surf.meshPoints();
 
     //Info<< "Intersecting CGAL surface ..." << endl;
-    List<List<pointIndexHit> > intersections(edges.size());
+    List<List<pointIndexHit>> intersections(edges.size());
     labelListList classifications(edges.size());
 
     label nPoints = 0;
@@ -1006,12 +1006,12 @@ void calcEdgeCutsBitsCGAL
     {
         edgeCuts1 = edgeIntersections
         (
-            List<List<pointIndexHit> >(surf1.nEdges()),
+            List<List<pointIndexHit>>(surf1.nEdges()),
             labelListList(surf1.nEdges())
         );
         edgeCuts2 = edgeIntersections
         (
-            List<List<pointIndexHit> >(surf2.nEdges()),
+            List<List<pointIndexHit>>(surf2.nEdges()),
             labelListList(surf2.nEdges())
         );
 
@@ -1247,8 +1247,8 @@ autoPtr<extendedFeatureEdgeMesh> createEdgeMesh
     (
         2*nFeatEds
     );
-    List<DynamicList<label> > edgeNormals(nFeatEds);
-    List<DynamicList<label> > normalDirections(nFeatEds);
+    List<DynamicList<label>> edgeNormals(nFeatEds);
+    List<DynamicList<label>> normalDirections(nFeatEds);
 
 
     const triSurface& s1 = surf1;
@@ -1570,7 +1570,7 @@ int main(int argc, char *argv[])
     }
 
 
-    List<Pair<word> > surfaceAndSide;
+    List<Pair<word>> surfaceAndSide;
     if (args.optionReadIfPresent("trim", surfaceAndSide))
     {
         Info<< "Trimming edges with " << surfaceAndSide << endl;
diff --git a/applications/utilities/surface/surfaceClean/collapseEdge.C b/applications/utilities/surface/surfaceClean/collapseEdge.C
index c2eb4b0d05a42f2c8c08198ab72169dec92e5652..8b752129ef8461be39b1b843b203773bc97ec93f 100644
--- a/applications/utilities/surface/surfaceClean/collapseEdge.C
+++ b/applications/utilities/surface/surfaceClean/collapseEdge.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,6 @@ License
 
 #include "collapseEdge.H"
 
-//- Sets point neighbours of face to val
 static void markPointNbrs
 (
     const triSurface& surf,
diff --git a/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h b/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h
index 1c19f0d99c4405b4bfaee87e9659bb1517b7d23d..225496ef2fca1b4ab8b603a34ed42a71db74bb27 100644
--- a/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h
+++ b/applications/utilities/surface/surfaceCoarsen/bunnylod/list.h
@@ -9,7 +9,7 @@
 #include <assert.h>
 #include <stdio.h>
 
-template <class Type> class List {
+template<class Type> class List {
         public:
                 List(int s=0);
                 ~List();
@@ -30,7 +30,7 @@ template <class Type> class List {
 };
 
 
-template <class Type>
+template<class Type>
 List<Type>::List(int s){
         num=0;
         array_size = 0;
@@ -40,12 +40,12 @@ List<Type>::List(int s){
         }
 }
 
-template <class Type>
+template<class Type>
 List<Type>::~List(){
         delete element;
 }
 
-template <class Type>
+template<class Type>
 void List<Type>::allocate(int s){
         assert(s>0);
         assert(s>=num);
@@ -58,18 +58,18 @@ void List<Type>::allocate(int s){
         }
         if(old) delete old;
 }
-template <class Type>
+template<class Type>
 void List<Type>::SetSize(int s){
         if(s==0) { if(element) delete element;}
         else {  allocate(s); }
         num=s;
 }
-template <class Type>
+template<class Type>
 void List<Type>::Pack(){
         allocate(num);
 }
 
-template <class Type>
+template<class Type>
 void List<Type>::Add(Type t){
         assert(num<=array_size);
         if(num==array_size) {
@@ -83,7 +83,7 @@ void List<Type>::Add(Type t){
         element[num++] = t;
 }
 
-template <class Type>
+template<class Type>
 int List<Type>::Contains(Type t){
         int i;
         int count=0;
@@ -93,13 +93,13 @@ int List<Type>::Contains(Type t){
         return count;
 }
 
-template <class Type>
+template<class Type>
 void List<Type>::AddUnique(Type t){
         if(!Contains(t)) Add(t);
 }
 
 
-template <class Type>
+template<class Type>
 void List<Type>::DelIndex(int i){
         assert(i<num);
         num--;
@@ -109,7 +109,7 @@ void List<Type>::DelIndex(int i){
         }
 }
 
-template <class Type>
+template<class Type>
 void List<Type>::Remove(Type t){
         int i;
         for(i=0;i<num;i++) {
diff --git a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C
index 05f4001409178dfe8444f61ef00eb09d5b53e9df..fdbeca8e28b56b5d22c49e06416f52e91c83bf5b 100644
--- a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C
+++ b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
index 0ee2abbfbd4cf9a4aad4bace61916adf1f50cac5..5c81c5699c02f1288037a76f1335f923641131b8 100644
--- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
+++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -196,7 +196,7 @@ vectorField calcVertexNormals(const triSurface& surf)
 
     Info<< "Calculating vertex normals" << endl;
 
-    vectorField pointNormals(surf.nPoints(), vector::zero);
+    vectorField pointNormals(surf.nPoints(), Zero);
 
     const pointField& points = surf.points();
     const labelListList& pointFaces = surf.pointFaces();
@@ -276,8 +276,8 @@ triSurfacePointScalarField calcCurvature
         const edgeList fEdges = f.edges();
 
         // Calculate the edge vectors and the normal differences
-        vectorField edgeVectors(f.size(), vector::zero);
-        vectorField normalDifferences(f.size(), vector::zero);
+        vectorField edgeVectors(f.size(), Zero);
+        vectorField normalDifferences(f.size(), Zero);
 
         forAll(fEdges, feI)
         {
@@ -303,7 +303,7 @@ triSurfacePointScalarField calcCurvature
         faceCoordSys.normalize();
 
         // Construct the matrix to solve
-        scalarSymmetricSquareMatrix T(3, 3, 0);
+        scalarSymmetricSquareMatrix T(3, 0);
         scalarDiagonalMatrix Z(3, 0);
 
         // Least Squares
@@ -312,11 +312,11 @@ triSurfacePointScalarField calcCurvature
             scalar x = edgeVectors[i] & faceCoordSys[0];
             scalar y = edgeVectors[i] & faceCoordSys[1];
 
-            T[0][0] += sqr(x);
-            T[1][0] += x*y;
-            T[1][1] += sqr(x) + sqr(y);
-            T[2][1] += x*y;
-            T[2][2] += sqr(y);
+            T(0, 0) += sqr(x);
+            T(1, 0) += x*y;
+            T(1, 1) += sqr(x) + sqr(y);
+            T(2, 1) += x*y;
+            T(2, 2) += sqr(y);
 
             scalar dndx = normalDifferences[i] & faceCoordSys[0];
             scalar dndy = normalDifferences[i] & faceCoordSys[1];
@@ -1438,7 +1438,7 @@ int main(int argc, char *argv[])
             pointField end(searchSurf.faceCentres() + span*normals);
             const pointField& faceCentres = searchSurf.faceCentres();
 
-            List<List<pointIndexHit> > allHitInfo;
+            List<List<pointIndexHit>> allHitInfo;
 
             // Find all intersections (in order)
             searchSurf.findLineAll(start, end, allHitInfo);
diff --git a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C
index 4c5a91d1080644a388f4b46445eb252f8723b0b0..b7c5ca03b2a3125727cda5f68b37781269df7d23 100644
--- a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C
+++ b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -151,7 +151,7 @@ void greenRefine
 void createBoundaryEdgeTrees
 (
     const PtrList<triSurfaceMesh>& surfs,
-    PtrList<indexedOctree<treeDataEdge> >& bEdgeTrees,
+    PtrList<indexedOctree<treeDataEdge>>& bEdgeTrees,
     labelListList& treeBoundaryEdges
 )
 {
@@ -325,11 +325,11 @@ int main(int argc, char *argv[])
         Info<< decrIndent;
     }
 
-    PtrList<indexedOctree<treeDataEdge> > bEdgeTrees(surfs.size());
+    PtrList<indexedOctree<treeDataEdge>> bEdgeTrees(surfs.size());
     labelListList treeBoundaryEdges(surfs.size());
 
-    List<DynamicList<labelledTri> > newFaces(surfs.size());
-    List<DynamicList<point> > newPoints(surfs.size());
+    List<DynamicList<labelledTri>> newFaces(surfs.size());
+    List<DynamicList<point>> newPoints(surfs.size());
     List<PackedBoolList> visitedFace(surfs.size());
 
     PtrList<triSurfaceMesh> newSurfaces(surfs.size());
diff --git a/applications/utilities/surface/surfaceInertia/surfaceInertia.C b/applications/utilities/surface/surfaceInertia/surfaceInertia.C
index 2bd44076a82b9449f3c08dc25d57d9a48f617b02..3c832966976da7b9334ce638b736a6438d1d7b0c 100644
--- a/applications/utilities/surface/surfaceInertia/surfaceInertia.C
+++ b/applications/utilities/surface/surfaceInertia/surfaceInertia.C
@@ -2,7 +2,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2011-2015 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2011-2016 OpenFOAM Foundation
     \\/      M anipulation   | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -84,14 +84,14 @@ int main(int argc, char *argv[])
     const fileName surfFileName = args[1];
     const scalar density = args.optionLookupOrDefault("density", 1.0);
 
-    vector refPt = vector::zero;
+    vector refPt = Zero;
     bool calcAroundRefPt = args.optionReadIfPresent("referencePoint", refPt);
 
     triSurface surf(surfFileName);
 
     scalar m = 0.0;
-    vector cM = vector::zero;
-    tensor J = tensor::zero;
+    vector cM = Zero;
+    tensor J = Zero;
 
     if (args.optionFound("shellProperties"))
     {
diff --git a/applications/utilities/surface/surfaceInflate/surfaceInflate.C b/applications/utilities/surface/surfaceInflate/surfaceInflate.C
index aeb9b87d1c42548bd987871ad5cbd394e4bf6a8f..e30ff5fc551b8e8396a71be5446cdb1602d047ac 100644
--- a/applications/utilities/surface/surfaceInflate/surfaceInflate.C
+++ b/applications/utilities/surface/surfaceInflate/surfaceInflate.C
@@ -88,9 +88,9 @@ tmp<vectorField> calcVertexNormals(const triSurface& surf)
     // Weight = fA / (mag(e0)^2 * mag(e1)^2);
     tmp<vectorField> tpointNormals
     (
-        new pointField(surf.nPoints(), vector::zero)
+        new pointField(surf.nPoints(), Zero)
     );
-    vectorField& pointNormals = tpointNormals();
+    vectorField& pointNormals = tpointNormals.ref();
 
     const pointField& points = surf.points();
     const labelListList& pointFaces = surf.pointFaces();
@@ -134,7 +134,7 @@ tmp<vectorField> calcPointNormals
 {
     //const pointField pointNormals(s.pointNormals());
     tmp<vectorField> tpointNormals(calcVertexNormals(s));
-    vectorField& pointNormals = tpointNormals();
+    vectorField& pointNormals = tpointNormals.ref();
 
 
     // feature edges: create edge normals from edgeFaces only.
@@ -151,7 +151,7 @@ tmp<vectorField> calcPointNormals
                 {
                     if (!isFeaturePoint[e[i]])
                     {
-                        pointNormals[e[i]] = vector::zero;
+                        pointNormals[e[i]] = Zero;
                     }
                 }
             }
@@ -164,7 +164,7 @@ tmp<vectorField> calcPointNormals
                 const labelList& eFaces = edgeFaces[edgeI];
 
                 // Get average edge normal
-                vector n = vector::zero;
+                vector n = Zero;
                 forAll(eFaces, i)
                 {
                     n += s.faceNormals()[eFaces[i]];
@@ -356,7 +356,7 @@ tmp<scalarField> avg
 )
 {
     tmp<scalarField> tres(new scalarField(s.nPoints(), 0.0));
-    scalarField& res = tres();
+    scalarField& res = tres.ref();
 
     scalarField sumWeight(s.nPoints(), 0.0);
 
@@ -483,7 +483,7 @@ void lloydsSmoothing
             {
                 const labelList& pFaces = pointFaces[pointI];
 
-                point avg = point::zero;
+                point avg(Zero);
                 forAll(pFaces, pFaceI)
                 {
                     avg += faceCentres[pFaces[pFaceI]];
@@ -498,7 +498,7 @@ void lloydsSmoothing
 
         const pointField& points = s.points();
 
-        vectorField pointSum(s.nPoints(), vector::zero);
+        vectorField pointSum(s.nPoints(), Zero);
         labelList nPointSum(s.nPoints(), 0);
 
         forAll(edges, edgeI)
diff --git a/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C b/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C
index eaac3f4c6d541c1c2bcff25ed696bdfa823721c1..0352ce0eef6ae76230a492a821ff3c4ffc6ae675 100644
--- a/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C
+++ b/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -56,8 +56,8 @@ tmp<pointField> avg
 {
     const labelListList& pointEdges = s.pointEdges();
 
-    tmp<pointField> tavg(new pointField(s.nPoints(), vector::zero));
-    pointField& avg = tavg();
+    tmp<pointField> tavg(new pointField(s.nPoints(), Zero));
+    pointField& avg = tavg.ref();
 
     forAll(pointEdges, vertI)
     {
diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C
index e5f280e65811e670a22d968cc7a731c4df8bbc98..e34cf579b3df9132dfd2e182d235779371477496 100644
--- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C
+++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -197,6 +197,7 @@ int main(int argc, char *argv[])
         if (!csDictIoPtr->typeHeaderOk<coordinateSystems>(false))
         {
             FatalErrorInFunction
+                << "Cannot open coordinateSystems file\n    "
                 << csDictIoPtr->objectPath() << nl
                 << exit(FatalError);
         }
@@ -240,6 +241,7 @@ int main(int argc, char *argv[])
         if (fromCsys.valid() && toCsys.valid())
         {
             FatalErrorInFunction
+                << "Only allowed  '-from' or '-to' option at the moment."
                 << exit(FatalError);
         }
     }
diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C
index 2b69ddad7381de0123cf595682da2016d451625a..c94e56ac4cce86fc34f6e3662aa8098ca24db479 100644
--- a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C
+++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ using namespace Foam;
 void writeProcStats
 (
     const triSurface& s,
-    const List<List<treeBoundBox> >& meshBb
+    const List<List<treeBoundBox>>& meshBb
 )
 {
     // Determine surface bounding boxes, faces, points
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
     Random rndGen(653213);
 
     // Determine mesh bounding boxes:
-    List<List<treeBoundBox> > meshBb(Pstream::nProcs());
+    List<List<treeBoundBox>> meshBb(Pstream::nProcs());
     if (distType == distributedTriSurfaceMesh::FOLLOW)
     {
         #include "createPolyMesh.H"
diff --git a/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C b/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C
index 4c21e50dc9c8995896e8294232185698b75e38d9..c90dee56e939936575d0c27dcbf6c6c9bee0d7fc 100644
--- a/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C
+++ b/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
             {
                 if (faceZone[f] == z)
                 {
-                    forAll (faceEds[f], fe)
+                    forAll(faceEds[f], fe)
                     {
                         if (edFaces[faceEds[f][fe]].size() < 2)
                         {
diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C
index ba613d06a2188613826349dc772d6d8e65d27ba7..b490fe726ad53684821e53e6a6476fd042b34b23 100644
--- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C
+++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -560,7 +560,7 @@ void calcPointVecs
 
             // Determine vector as average of the vectors in the two faces.
             // If there is only one face available use only one vector.
-            vector midVec(vector::zero);
+            vector midVec(Zero);
 
             if (face0I != -1)
             {
diff --git a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C
index e4653d1d61a417ffe8ca9e19e9279ce6966f8172..3dcc86b9a9e278f359a57de7a02761e10f7cb90a 100644
--- a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C
+++ b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
         // Convert to radians
         v *= pi/180.0;
 
-        quaternion R(v.x(), v.y(), v.z());
+        quaternion R(quaternion::rotationSequence::XYZ, v);
 
         Info<< "Rotating points by quaternion " << R << endl;
         points = transform(R, points);
diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C
index 51aaab6669bdfbf54af50649173bffb25970131d..2e41a7870e38a0a561c8b03ea9bd9a3a0ba75614 100644
--- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C
+++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ Description
 
 using namespace Foam;
 
-typedef species::thermo<janafThermo<perfectGas<specie> >, absoluteEnthalpy>
+typedef species::thermo<janafThermo<perfectGas<specie>>, absoluteEnthalpy>
     thermo;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C
index 7f7994bdf1ee9254092488033f3bfdc08afcdfd5..9ecd074bb4cf85d35f9e642362722b4345e4e417 100644
--- a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C
+++ b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ Description
 
 using namespace Foam;
 
-typedef species::thermo<janafThermo<perfectGas<specie> >, absoluteEnthalpy>
+typedef species::thermo<janafThermo<perfectGas<specie>>, absoluteEnthalpy>
     thermo;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C
index 424cdc629e63c9c6745bcfa40116ba08eba5e1b4..fae3960ab6602b501700856e91f60333cb691144 100644
--- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C
+++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ Description
 
 using namespace Foam;
 
-typedef species::thermo<janafThermo<perfectGas<specie> >, absoluteEnthalpy>
+typedef species::thermo<janafThermo<perfectGas<specie>>, absoluteEnthalpy>
     thermo;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C
index 358bb7ab0fc7fed0dd0cb4c43565791802908775..c755532d65781541df32bcf0db10ae3e778a3a4b 100644
--- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C
+++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ Description
 
 using namespace Foam;
 
-typedef species::thermo<janafThermo<perfectGas<specie> >, absoluteEnthalpy>
+typedef species::thermo<janafThermo<perfectGas<specie>>, absoluteEnthalpy>
     thermo;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/bin/findEmptyMake b/bin/findEmptyMake
index 7ba3eda3d554e1f1ba566a9132af1bcb1864e6ef..e0ac838ca81cd6e6fc6c1dd9ce4ce0926dea9b42 100755
--- a/bin/findEmptyMake
+++ b/bin/findEmptyMake
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -79,4 +79,4 @@ do
     done
 
 done
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/bin/foamCleanPath b/bin/foamCleanPath
index c6f1147bf4fb9a884b0bddc6aed9fa4667dc9044..86a8c171fd828eea9af9388fa0d02a165217e9cd 100755
--- a/bin/foamCleanPath
+++ b/bin/foamCleanPath
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -153,4 +153,4 @@ IFS="$oldIFS"
 ##DEBUG echo "output>$dirList<" 1>&2
 echo "$dirList"
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/bin/foamCopySettings b/bin/foamCopySettings
index f913f1212e2c47b81f341b209b401420708cddd1..089dd2e08dbf98ea8809df4dec68dde3804495f2 100755
--- a/bin/foamCopySettings
+++ b/bin/foamCopySettings
@@ -1,11 +1,11 @@
 #!/bin/sh
-#-------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM.
 #
@@ -35,7 +35,7 @@
 # Note
 #     The foamCopySettings.rc (found with the ~OpenFOAM expansion) can be used
 #     to add any custom rsync options.
-#-------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 Script=${0##*/}
 
 #------------------------------------------------------------------------------
@@ -148,4 +148,4 @@ do
     esac
 done
 
-# ------------------------------------------------------------------ end-of-file
+#------------------------------------------------------------------------------
diff --git a/bin/foamCreateVideo b/bin/foamCreateVideo
index fa4a01166fd3be41c89fb8708f30853b2902323a..a204d7cdbc81286e78bd4652c41c9a6bd56c565b 100755
--- a/bin/foamCreateVideo
+++ b/bin/foamCreateVideo
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -43,6 +43,7 @@ options:
   -h | -help          help
   -i | -image <name>  name of image sequence (default = image)
   -o | -out <name>    name of output video file (default = video)
+  -s | -start <frame> specify the start frame number for avconv
   -w | -webm          WebM output video file format
 
 Creates a video file from a sequence of PNG images
@@ -64,6 +65,7 @@ IMAGE='image'
 VIDEO='video'
 FPS=10
 FMT='mp4'
+START_NUMBER=''
 
 while [ "$#" -gt 0 ]
 do
@@ -91,6 +93,11 @@ do
       VIDEO=$2
       shift 2
       ;;
+   -s | -start)
+      [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
+      START_NUMBER="-start_number $2"
+      shift 2
+      ;;
    -w | -webm)
       FMT=webm
       echo "Selected $FMT format, requires avconv..."
@@ -116,6 +123,7 @@ if [ "$FMT" = "webm" ] ; then
         echo "Creating image with avconv..."
         avconv \
             -r $FPS \
+            $START_NUMBER \
             -i ${DIR}/${IMAGE}.%04d.png \
             -c:v libvpx -crf 15 -b:v 1M \
             $VIDEO.$FMT
@@ -127,6 +135,7 @@ else
         echo "Creating image with avconv..."
         avconv \
             -r $FPS \
+            $START_NUMBER \
             -i ${DIR}/${IMAGE}.%04d.png \
             -c:v libx264 -pix_fmt yuv420p \
             $VIDEO.$FMT
diff --git a/bin/foamInstallationTest b/bin/foamInstallationTest
index ed4bb9c782ca4cd3eac43ae98d3de22c438711fb..17b285a5ab621407985ff2260743d462bb867740 100755
--- a/bin/foamInstallationTest
+++ b/bin/foamInstallationTest
@@ -344,9 +344,9 @@ checkOpenFOAMEnvironment()
         echo ""
         echo "FATAL ERROR: OpenFOAM environment not configured."
         echo ""
-        echo "    Please refer to the installation section of the README file:"
-        echo "    <OpenFOAM installation dir>/OpenFOAM-${WM_PROJECT_VERSION}/README"
-        echo "    to source the OpenFOAM environment."
+        echo "    Please follow the download and installation link in README.html:"
+        echo "    <OpenFOAM installation dir>/OpenFOAM-${WM_PROJECT_VERSION}/README.html"
+        echo "    for information on setting-up the OpenFOAM environment."
         echo ""
         exit 1
     }
diff --git a/bin/foamMonitor b/bin/foamMonitor
index 9f70c74570624bc4dbaa06306fefae21cde8456f..e38545f00d4b5a7de02a7b3dfe763309b78a702b 100755
--- a/bin/foamMonitor
+++ b/bin/foamMonitor
@@ -154,7 +154,12 @@ i=1
 for field in $KEYS
 do
     i=$(expr $i + 1)
-    echo "\"$FILE\" using 1:${i} with lines title \"$field\", \\" >> $GPFILE
+    PLOTLINE="\"$FILE\" using 1:${i} with lines title \"$field\""
+    if [[ $i -lt $NCOLS ]]
+    then
+       PLOTLINE="$PLOTLINE, \\"
+    fi
+    echo $PLOTLINE >> $GPFILE
 done
 plotFileFooter >> $GPFILE
 
diff --git a/wmake/makeWmake b/bin/foamNewApp
similarity index 58%
rename from wmake/makeWmake
rename to bin/foamNewApp
index 98b5b55e14d9aa8510f27867e7f3b07229460e70..b2f664817bd735b665cb66db8da25bfd3834431c 100755
--- a/wmake/makeWmake
+++ b/bin/foamNewApp
@@ -3,9 +3,9 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
-#------------------------------------------------------------------------------
+#-------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM.
 #
@@ -23,51 +23,51 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Script
-#     makeWmake
+#     foamNewApp
 #
 # Description
-#     Build platform-specific parts of wmake
+#     Create directory with source and compilation files for a new application
 #
 #------------------------------------------------------------------------------
 Script=${0##*/}
+DIR="$FOAM_ETC/codeTemplates/app"
 
 usage() {
-    exec 1>&2
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
-Usage: $Script
-
-  Build platform-specific parts of wmake
+Usage: $Script [-h | -help] <applicationName>
 
+* Create directory with source and compilation files for a new application
+  <applicationName> (dir)
+  - <applicationName>.C
+  - Make (dir)
+    - files
+    - options
+  Compiles an executable named <applicationName> in \$FOAM_USER_APPBIN:
+  $FOAM_USER_APPBIN
 USAGE
     exit 1
 }
 
 case "$1" in
--h | -help)
+(-h | -help)
     usage
     ;;
+-*)
+    usage "$1 is not a valid filename"
+    ;;
 esac
 
+[ "$#" -eq 1 ] || usage "Wrong number of arguments"
+[ -d "$1" ] && usage "$1 directory already exists, aborting..."
 
-echo ========================================
-echo Build platform-specific parts of wmake
-echo
-(
-    set -x
-    make -C ${0%/*}/src $@
-)
-echo
-echo ========================================
-echo Done building wmake
-echo ========================================
-echo
+NAME=$1
 
+echo "Creating application code directory $NAME" && mkdir $NAME
+sed "s#NAME#${NAME}#g" ${DIR}/app.C > $NAME/$NAME.C
 
-#------------------------------------------------------------------------------
-# Cleanup local variables and functions
-#------------------------------------------------------------------------------
-
-unset Script usage
+echo "Creating Make subdirectory" && mkdir $NAME/Make
+sed "s#NAME#${NAME}#g" ${DIR}/Make/files > $NAME/Make/files
+cp ${DIR}/Make/options $NAME/Make
 
 #------------------------------------------------------------------------------
diff --git a/bin/foamNewBC b/bin/foamNewBC
new file mode 100755
index 0000000000000000000000000000000000000000..61e093d7a37007a35407d07b289ecd5aa9cfd380
--- /dev/null
+++ b/bin/foamNewBC
@@ -0,0 +1,216 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Script
+#     foamNewBC
+#
+# Description
+#     Create directory of source and compilation files for a new BC
+#
+#------------------------------------------------------------------------------
+Script=${0##*/}
+DIR="$FOAM_ETC/codeTemplates/BC"
+
+usage() {
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+    cat<<USAGE
+Usage: $Script [-h | -help] <base> <type> <boundaryConditionName>
+
+* Create directory of source and compilation files for a new boundary condition
+  <boundaryConditionName> (dir)
+  - .C and .H source files
+  - Make (dir)
+    - files
+    - options
+  Compiles a library named lib<boundaryConditionName>.so in \$FOAM_USER_LIBBIN:
+  $FOAM_USER_LIBBIN
+
+<base> conditions:
+-f | -fixedValue    | fixedValue
+-m | -mixed         | mixed
+
+<type> options:
+-a | -all    | all  | template (creates a template class)
+-s | -scalar | scalar
+-v | -vector | vector
+-t | -tensor | tensor
+-symmTensor  | symmTensor
+-sphericalTensor | sphericalTensor
+
+USAGE
+    exit 1
+}
+
+cap() {
+    echo $1 | sed -e 's/^./\U&/'
+}
+
+# Implicitly covers a lone -help
+[ "$#" -gt 1 ] || usage
+
+case "$1" in
+(-h | -help)
+    usage
+    ;;
+(-f | -fixedValue | fixedValue)
+    BASE=fixedValue
+    ;;
+(-m | -mixed | mixed )
+    BASE=mixed
+    ;;
+(*)
+    usage "Unknown <base> condition '$1'"
+    ;;
+esac
+shift
+
+case "$1" in
+(-a | -all | all | template)
+    TYPE=Type
+    UNIT='VALUE-or-(VALUE 0 0)'
+    ;;
+(-s | -scalar | scalar)
+    TYPE=scalar
+    UNIT=VALUE
+    ;;
+(-v | -vector | vector)
+    TYPE=vector
+    UNIT='(VALUE 0 0)'
+    ;;
+(-t | -tensor | tensor)
+    TYPE=tensor
+    UNIT='(VALUE 0 0 0 0 0 0 0 0)'
+    ;;
+(-symmTensor | symmTensor)
+    TYPE=symmTensor
+    UNIT='(VALUE 0 0 0 0 0)'
+    ;;
+(-sphericalTensor | sphericalTensor)
+    TYPE=sphericalTensor
+    UNIT=VALUE
+    ;;
+(*)
+    usage "Unknown <type> option '$1'"
+    ;;
+esac
+shift
+[ "$#" -eq 1 ] || usage "Wrong number of arguments"
+NAME=$1
+
+# Prevents over-writing of existing directory
+[ -d $NAME ] && usage "$NAME directory already exists, aborting..."
+echo "Creating $NAME directory" && mkdir $NAME
+
+# Establish meta template files to copy
+FILES=$(cd ${DIR} && ls *.*)
+[ "$TYPE" = "Type" ] || FILES=$(cd ${DIR} && ls BC.[CH])
+
+# Substitutions for meta-template files
+FIELD="Field<${TYPE}>"
+[ "$TYPE" = "Type" ] || FIELD=${TYPE}Field
+
+FVPATCHF=fvPatch$(cap $FIELD)
+CLASS=$NAME$(cap $FVPATCHF)
+PARENT=$BASE$(cap $FVPATCHF)
+CONSTRUCT=$(echo $CLASS | sed 's/<Type>//g')
+
+# Create some example values for the Description
+n=0
+for N in $(echo "ZERO ONE TWO THREE FOUR")
+do
+   eval $(expr $N='$(echo $UNIT | sed "s#VALUE#$n#g")')
+   n=$(( $n + 1 ))
+done
+
+# Make substitutions to meta-template files
+for F in $FILES
+do
+    EXT=$(echo $F | sed "s#BC##")
+    NEWFILE=${CONSTRUCT}${EXT}
+    echo "   Adding file ${NEWFILE}..."
+
+    # Adds readScalar function when TYPE = scalar
+    sed -e "s#TYPE#${TYPE}#g" \
+        -e "s#NAME#${NAME}#g" \
+        -e "s#BASE#${BASE}#g" \
+        -e "s#CONSTRUCT#${CONSTRUCT}#g" \
+        -e "s#CLASS#${CLASS}#g" \
+        -e "s#FIELD#${FIELD}#g" \
+        -e "s#FVPATCHF#${FVPATCHF}#g" \
+        -e "s#PARENT#${PARENT}#g" \
+        -e "s#ZERO#${ZERO}#g" \
+        -e "s#ONE#${ONE}#g" \
+        -e "s#TWO#${TWO}#g" \
+        -e "s#THREE#${THREE}#g" \
+        -e "s#FOUR#${FOUR}#g" \
+        -e 's/>>/>>/g' \
+        ${DIR}/${F} > ${NAME}/${NEWFILE}
+
+    case $BASE in
+        fixedValue)
+            # refValue(), refGrad(), valueFraction() removed
+            # phip removed
+            sed -i \
+                -e '/refValue/d' \
+                -e '/refGrad/d' \
+                -e '/valueFraction/d' \
+                -e '/phip/,/lookupPatchField/d' \
+                ${NAME}/${NEWFILE}
+            ;;
+        mixed)
+            # evaluate() removed
+            # operator== becomes refValue() =
+            sed -i \
+                -e '/evaluate/d' \
+                -e 's/operator==/refValue() =/g' \
+                ${NAME}/${NEWFILE}
+            ;;
+    esac
+
+    case $TYPE in
+        Type)
+            # Build Macro removed (in ..Fields.C)
+            sed -i -e '/Build Macro/,/^}/d' \
+                ${NAME}/${NEWFILE}
+            ;;
+        *)
+            # template<class Type> removed
+            # this-> removed
+            # .template functionTemplate<...> becomes functionTemplate<...>
+            # template instantiation repository removed
+            sed -i \
+                -e '/^template<class Type>$/d' \
+                -e 's/this->//g' \
+                -e 's/\.template[\t ]*\([a-Z]\)/\.\1/g' \
+                -e '/#ifdef NoRepository/,/\/\/ */d' \
+                ${NAME}/${NEWFILE}
+            ;;
+    esac
+done
+
+echo "Creating Make subdirectory" && cp -r ${DIR}/Make ${NAME}
+COMPILED=$(cd ${NAME} && ls -r1 *C | head -1) # ...Fields.C for template class
+sed -i -e "s#NAME#${NAME}#g" -e "s#COMPILED.*#${COMPILED}#g" ${NAME}/Make/files
+
+#------------------------------------------------------------------------------
diff --git a/bin/foamNewFunctionObject b/bin/foamNewFunctionObject
new file mode 100755
index 0000000000000000000000000000000000000000..a6de93f70d271ecb9439b732947a93c703418f5a
--- /dev/null
+++ b/bin/foamNewFunctionObject
@@ -0,0 +1,83 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Script
+#     foamNewFunctionObject
+#
+# Description
+#     Create directory with source and compilation files for a new function
+#     object
+#
+#------------------------------------------------------------------------------
+Script=${0##*/}
+DIR="$FOAM_ETC/codeTemplates/functionObject"
+
+usage() {
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+    cat<<USAGE
+Usage: $Script [-h | -help] <functionObjectName>
+
+* Create directory with source and compilation files for a new function object
+  <functionObjectName> (dir)
+  - <functionObjectName>.H
+  - <functionObjectName>.C
+  - <functionObjectName>FunctionObject.H
+  - <functionObjectName>FunctionObject.C
+  - IO<functionObjectName>.H
+  - Make (dir)
+    - files
+    - options
+  Compiles a library named lib<functionObjectName>FunctionObject.so in
+  \$FOAM_USER_LIBBIN:
+  $FOAM_USER_LIBBIN
+USAGE
+    exit 1
+}
+
+case "$1" in
+(-h | -help)
+    usage
+    ;;
+-*)
+    usage "$1 is not a valid option/filename"
+    ;;
+esac
+
+[ "$#" -eq 1 ] || usage "Wrong number of arguments"
+[ -d "$1" ] && usage "$1 directory already exists, aborting..."
+
+NAME=$1
+
+echo "Creating function object code directory $NAME" && mkdir $NAME
+for F in $(ls ${DIR}/*.*)
+do
+    FILE=$(basename $F | sed "s#FUNCTIONOBJECT#${NAME}#g")
+    sed "s#FUNCTIONOBJECT#${NAME}#g" ${F} > ${NAME}/${FILE}
+done
+
+echo "Creating Make subdirectory" && mkdir $NAME/Make
+sed "s#FUNCTIONOBJECT#${NAME}#g" ${DIR}/Make/files > $NAME/Make/files
+cp ${DIR}/Make/options $NAME/Make
+
+#------------------------------------------------------------------------------
diff --git a/bin/foamRunTutorials b/bin/foamRunTutorials
index a2c33cfb8e7935f4087738e0f18935f833bd5cf1..7aabb6c480035c410a04f94e1ad903b4f45a7275 100755
--- a/bin/foamRunTutorials
+++ b/bin/foamRunTutorials
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -26,47 +26,15 @@
 #     foamRunTutorials
 #
 # Description
-#       Run either Allrun or blockMesh/application in current directory
-#       and all its subdirectories.
+#     Run either Allrun or blockMesh/application in current directory
+#     and all its subdirectories.
 #
 #------------------------------------------------------------------------------
 
-#------------------------------------------------------------------------------
-# Select the version of make to be used
-#------------------------------------------------------------------------------
-
-# normally use "make"
+# Normally use standard "make"
 make="make"
-runTests=false
-skipFirst=false
-
-## set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
-#if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
-#then
-#    WM_NCOMPPROCS=$(wmakeScheduler -count)
-#    [ $? -eq 0 ] || unset WM_NCOMPPROCS
-#fi
-#
-#if [ "$WM_NCOMPPROCS" ]
-#then
-#    if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ]
-#    then
-#        lockDir=$HOME/.$WM_PROJECT/.wmake
-#
-#        if [ -d $lockDir ]
-#        then
-#            rm -f $lockDir/*
-#        else
-#            mkdir -p $lockDir
-#        fi
-#
-#        make="make --no-print-directory -j "$WM_NCOMPPROCS
-#    fi
-#fi
-
 
-
-# Source tutorial functions
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 thisScript=$0
@@ -75,13 +43,14 @@ then
     thisScript="$PWD/$thisScript"
 fi
 
+skipFirst=false
 
-# parse options
+# Parse options
 while [ "$#" -gt 0 ]
 do
     case "$1" in
     -t | -test)
-        runTests=true
+        passArgs="-test"
         shift
         ;;
     -s | -skipFirst)
@@ -94,19 +63,14 @@ do
     esac
 done
 
-
 # If an argument is supplied do not execute ./Allrun to avoid recursion
-if ! $skipFirst && $runTests && [ -f "./Alltest" ]
-then
-    # Run a special test script.
-    ./Alltest
-elif ! $skipFirst && [ -f "./Allrun" ]
+if ! $skipFirst && [ -f "./Allrun" ]
 then
-    # Specialised script.
-    ./Allrun
+    # Run specialised Allrun script.
+    ./Allrun $passArgs
 elif [ -d system ]
 then
-    # Normal case.
+    # Run normal case.
     parentDir=`dirname $PWD`
     application=`getApplication`
     runApplication blockMesh
@@ -120,20 +84,12 @@ else
             ( compileApplication $caseName )
         fi
     done
-    # Recurse to subdirectories
-    #for caseName in *
-    #do
-    #    if [ -d $caseName ]
-    #    then
-    #        ( cd $caseName && $thisScript )
-    #    fi
-    #done
     FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs)
-    #$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript"
-
-    passArgs=$(if $runTests; then echo "-test"; fi)
 
-    $make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript" FOAM_ARGS="$passArgs"
+    # Run all cases which have not already been run
+    $make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs \
+          FOAM_TARGETS="$FOAM_TARGETS" \
+          FOAM_APP="$thisScript" FOAM_ARGS="$passArgs"
 fi
 
 #------------------------------------------------------------------------------
diff --git a/bin/foamSequenceVTKFiles b/bin/foamSequenceVTKFiles
index fbbfc6014eeab67ab356891bca16f4d3b20c7753..86e512228373688a5f507f590e6d211ff67240e5 100755
--- a/bin/foamSequenceVTKFiles
+++ b/bin/foamSequenceVTKFiles
@@ -72,7 +72,7 @@ do
       shift 2
       ;;
    -h | -help)
-      printUsage
+      usage
       ;;
    -o | -out)
       [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
@@ -94,7 +94,7 @@ if [ ! -d $DIR ]; then
 fi
 
 FILES=$(find $DIR -type f -name *vtk)
-NAMES=$(basename -s .vtk -a $FILES | sort -u)
+NAMES=$(for f in $FILES; do basename $f .vtk; done | sort -u)
 
 if [ -d $OUT ]; then
     echo "$OUT directory already exists.  Deleting links within it..."
diff --git a/bin/foamUpdateCaseFileHeader b/bin/foamUpdateCaseFileHeader
index d3aa08e221f7c16c6a581c36ab9ed09ddb1fc137..a90510765373ffae07de59eccda40e503a99095f 100755
--- a/bin/foamUpdateCaseFileHeader
+++ b/bin/foamUpdateCaseFileHeader
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -141,4 +141,4 @@ do
     fi
 done
 
-#------------------------------------------------------------------ end-of-file
+#------------------------------------------------------------------------------
diff --git a/bin/mpirunDebug b/bin/mpirunDebug
index b9a284d61168d46216e15bda49ad8075500f07fa..3be74baa251afe9d78056913915df5072b9bf488 100755
--- a/bin/mpirunDebug
+++ b/bin/mpirunDebug
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -250,7 +250,7 @@ MPICH)
 *)
     echo
     echo "Unsupported WM_MPLIB setting : $WM_MPLIB"
-    printUsage
+    usage
     exit 1
 esac
 
diff --git a/bin/paraFoam b/bin/paraFoam
index b032fc6ce8c8a1aa71e73d1278bd74d18ef3a9b2..84b82ecdbf8d05e49cebb92ae13d35adc2077db4 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -121,18 +121,15 @@ do
     esac
 done
 
-# Get the ParaView major version to select the appropriate readers
-version=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\).*$/\1/'`
-
 # Check that reader module has been built
-if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV${version}FoamReader_SM.so ]
+if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPVFoamReader_SM.so ]
 then
     cat<< BUILDREADER
 
 FATAL ERROR: ParaView reader module libraries do not exist
 
 Please build the reader module before continuing:
-cd \$FOAM_UTILITIES/postProcessing/graphics/PV${version}Readers
+cd \$FOAM_UTILITIES/postProcessing/graphics/PVReaders
 ./Allwclean
 ./Allwmake
 
diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions
index be396cd2db3fe61734d2cfae41501df9ef1aa9aa..8e51e3e906970582911046a2c48dc1666c66d679 100644
--- a/bin/tools/CleanFunctions
+++ b/bin/tools/CleanFunctions
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 #------------------------------------------------------------------------------
 # License
@@ -128,7 +128,14 @@ cleanCase()
             > /dev/null 2>&1 \
         )
     fi
-    (cd constant && rm -rf cellToRegion > /dev/null 2>&1)
+    if [ -d constant ]
+    then
+        (cd constant && \
+            rm -rf \
+            cellToRegion cellLevel* pointLevel* \
+            > /dev/null 2>&1 \
+        )
+    fi
 
     rm -rf constant/tetDualMesh > /dev/null 2>&1
 
diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
old mode 100644
new mode 100755
index f05567c7379f3df433caf28b503ad708c197e78a..407800e791718f91d82157382a080c6162e29c59
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -2,8 +2,8 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-#    \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+#    \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 #------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM.
@@ -28,9 +28,23 @@
 #     Miscellaneous functions for running tutorial cases
 #------------------------------------------------------------------------------
 
+isTest()
+{
+    for i in "$@"; do
+        if [ "$i" = "-test" ]
+        then
+            return 0
+        fi
+    done
+    return 1
+}
+
 getNumberOfProcessors()
 {
-    sed -ne 's/^numberOfSubdomains\s*\(.*\);/\1/p' system/decomposeParDict
+    if [ -f $1 ]
+    then
+        expandDictionary $1 | sed -ne 's/^numberOfSubdomains\s*\(.*\);/\1/p'
+    fi
 }
 
 getApplication()
@@ -44,41 +58,42 @@ runApplication()
     APP_RUN=
     LOG_IGNORE=false
     LOG_APPEND=false
+    LOG_SUFFIX=
 
     # Parse options and executable
     while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
         key="$1"
         case "$key" in
-            -append)
+            -append|-a)
                 LOG_IGNORE=true
                 LOG_APPEND=true
                 ;;
-            -overwrite)
+            -overwrite|-o)
                 LOG_IGNORE=true
                 ;;
-            -log)
-                LOG_NAME=$2
+            -suffix|-s)
+                LOG_SUFFIX=".$2"
                 shift
                 ;;
             *)
                 APP_RUN="$key"
                 APP_NAME="${key##*/}"
+                LOG_SUFFIX="${APP_NAME}${LOG_SUFFIX}"
                 ;;
         esac
         shift
     done
 
-    LOG_NAME=${LOG_NAME:="log.$APP_NAME"}
-
-    if [ -f $LOG_NAME ] && [ "$LOG_IGNORE" = "false" ]
+    if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
     then
-        echo "$APP_NAME already run on $PWD: remove log file $LOG_NAME to re-run"
+        echo "$APP_NAME already run on $PWD:" \
+             "remove log file 'log.$LOG_SUFFIX' to re-run"
     else
         echo "Running $APP_RUN on $PWD"
         if [ "$LOG_APPEND" = "true" ]; then
-            $APP_RUN "$@" >> $LOG_NAME 2>&1
+            $APP_RUN "$@" >> log.$LOG_SUFFIX 2>&1
         else
-            $APP_RUN "$@" > $LOG_NAME 2>&1
+            $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1
         fi
     fi
 }
@@ -87,46 +102,58 @@ runParallel()
 {
     LOG_NAME=
     APP_RUN=
+    # Store any parsed additional arguments e.g. decomposeParDict
+    APP_PARARGS=
     LOG_IGNORE=false
     LOG_APPEND=false
+    LOG_SUFFIX=
+    # Check the default decomposeParDict if available
+    nProcs=$(getNumberOfProcessors "system/decomposeParDict")
 
     # Parse options and executable
-    while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
+    while [ $# -gt 0 ] && [ -z "$APP_RUN" ] ; do
         key="$1"
         case "$key" in
-            -append)
+            -append|-a)
                 LOG_IGNORE=true
                 LOG_APPEND=true
                 ;;
-            -overwrite)
+            -overwrite|-o)
                 LOG_IGNORE=true
                 ;;
-            -log)
-                LOG_NAME=$2
+            -suffix|-s)
+                LOG_SUFFIX=".$2"
+                shift
+                ;;
+            -np|-n)
+                nProcs="$2"
+                shift
+                ;;
+            -decomposeParDict)
+                nProcs=$(getNumberOfProcessors "$2")
+                APP_PARARGS="$APP_PARARGS -decomposeParDict $2"
                 shift
                 ;;
             *)
                 APP_RUN="$key"
                 APP_NAME="${key##*/}"
-                # also read number of processors
-                nProcs="$2"
-                shift
+                LOG_SUFFIX="${APP_NAME}${LOG_SUFFIX}"
                 ;;
         esac
-    shift
-    done
 
-    LOG_NAME=${LOG_NAME:="log.$APP_NAME"}
+        shift
+    done
 
-    if [ -f $LOG_NAME ] && [ "$LOG_IGNORE" = "false" ]
+    if [ -f log.$SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
     then
-        echo "$APP_NAME already run on $PWD: remove log file $LOG_NAME to re-run"
+        echo "$APP_NAME already run on $PWD:" \
+             "remove log file 'log.$LOG_SUFFIX' to re-run"
     else
         echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"
         if [ "$LOG_APPEND" = "true" ]; then
-            ( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null >> $LOG_NAME 2>&1 )
+            ( mpirun -np $nProcs $APP_RUN $APP_PARARGS -parallel "$@" < /dev/null >> log.$LOG_SUFFIX 2>&1 )
         else
-            ( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null > $LOG_NAME 2>&1 )
+            ( mpirun -np $nProcs $APP_RUN $APP_PARARGS -parallel "$@" < /dev/null > log.$LOG_SUFFIX 2>&1 )
         fi
     fi
 }
diff --git a/bin/tools/doxyFilter-ignore.awk b/bin/tools/doxyFilter-ignore.awk
index 7be7595737068cd6135b7e5e80dde8c3c084a581..e06f5c275547f23bbe9130e76e2ab8f44d32e5bf 100644
--- a/bin/tools/doxyFilter-ignore.awk
+++ b/bin/tools/doxyFilter-ignore.awk
@@ -1,10 +1,10 @@
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM.
 #
@@ -30,7 +30,7 @@
 #     - Surround the contents of an entire file with @cond / @endcond
 #       to skip documenting all classes/variables
 #
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 BEGIN {
    print "//! @file %filePath%"
    print "//! @cond OpenFOAMIgnoreAppDoxygen"
@@ -41,4 +41,4 @@ BEGIN {
 END {
    print "//! @endcond"
 }
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/bin/tools/doxyFilter-top.awk b/bin/tools/doxyFilter-top.awk
index bd81ede558e1aa4c4c43b63af8f3a38d330df9f6..af9ba7331f7e2ca77a738250d5bef17e8cd9d05a 100644
--- a/bin/tools/doxyFilter-top.awk
+++ b/bin/tools/doxyFilter-top.awk
@@ -1,8 +1,8 @@
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -30,7 +30,7 @@
 #     - This is useful for application files in which only the first
 #       block documents the application itself.
 #
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 BEGIN {
     state = 0
 }
@@ -78,4 +78,4 @@ END {
     }
 }
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/bin/tools/doxyFilter.awk b/bin/tools/doxyFilter.awk
index e6d7226e825b1d4a1a1d30b0b10afc1364e3cbc9..f45cc776ddd349d6f2fe0062e06f54873d2c0835 100644
--- a/bin/tools/doxyFilter.awk
+++ b/bin/tools/doxyFilter.awk
@@ -1,10 +1,10 @@
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # License
 #     This file is part of OpenFOAM.
 #
@@ -39,7 +39,7 @@
 #         */
 #     The intermediate "/*! ... */" block is left-justified to handle
 #     possible verbatim text
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 
 BEGIN {
     state = 0
@@ -86,4 +86,4 @@ BEGIN {
     next
 }
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/bin/tools/doxyFilter.sed b/bin/tools/doxyFilter.sed
index f3bec2901f39effb2a3c64e02c2bcac72789352e..202c0e88a7e23b17ba1e5a548113ba93e7ad91dc 100644
--- a/bin/tools/doxyFilter.sed
+++ b/bin/tools/doxyFilter.sed
@@ -1,11 +1,11 @@
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # Script
 #     doxyFilter.sed
 #
 # Description
 #     Transform human-readable tags such as 'Description' into the Doxygen
 #     equivalent
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 
 # new FSF address
 /^License/,/\*\//{
@@ -182,4 +182,4 @@ s#\\linebreak#<br>#g
 
 }
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths
index 34c6fc200431223d26407fbbefe37d22ff7f78f4..41f82f277d37fd807b5c09bcefa43e904ec0bd55 100755
--- a/bin/tools/foamConfigurePaths
+++ b/bin/tools/foamConfigurePaths
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -146,7 +146,7 @@ do
         paraviewInstall="$2"
         # replace ParaView_DIR=...
         _inlineSed \
-            etc/config/paraview.sh \
+            etc/config.sh/paraview \
             'ParaView_DIR=.*' \
             'ParaView_DIR='"$paraviewInstall" \
             "Replacing ParaView_DIR setting by '$paraviewInstall'"
@@ -157,7 +157,7 @@ do
         paraviewVersion="$2"
         # replace ParaView_VERSION=...
         _inlineSed \
-            etc/config/paraview.sh \
+            etc/config.sh/paraview \
             'ParaView_VERSION=.*' \
             'ParaView_VERSION='"$paraviewVersion" \
             "Replacing ParaView_VERSION setting by '$paraviewVersion'"
@@ -167,7 +167,7 @@ do
         [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
         scotchVersion="$2"
         _inlineSed \
-            etc/config/scotch.sh \
+            etc/config.sh/scotch \
             'SCOTCH_VERSION=.*' \
             'SCOTCH_VERSION='"$scotchVersion" \
             "Replacing SCOTCH_VERSION setting by '$scotchVersion'"
@@ -177,7 +177,7 @@ do
         [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
         scotchArchPath="$2"
         _inlineSed \
-            etc/config/scotch.sh \
+            etc/config.sh/scotch \
             'SCOTCH_ARCH_PATH=.*' \
             'SCOTCH_ARCH_PATH='"$scotchArchPath" \
             "Replacing SCOTCH_ARCH_PATH setting by '$scotchArchPath'"
@@ -204,11 +204,11 @@ _inlineSed \
     'export WM_MPLIB=SYSTEMOPENMPI' \
     "Replacing WM_MPLIB setting by 'SYSTEMOPENMPI'"
 
-## set foamCompiler=system always
+## set WM_COMPILER_TYPE=system always
 #_inlineSed \
 #    etc/bashrc \
-#    'foamCompiler=.*' \
-#    'foamCompiler=system' \
-#    "Replacing foamCompiler setting by 'system'"
+#    'WM_COMPILER_TYPE=.*' \
+#    'WM_COMPILER_TYPE=system' \
+#    "Replacing WM_COMPILER_TYPE setting by 'system'"
 
 #------------------------------------------------------------------------------
diff --git a/bin/tools/foamListSourceFiles b/bin/tools/foamListSourceFiles
index 5fb1b3f893ff8f824cc980141753d497da484be2..72690d1bfdf5176272438b8e3bc5ee422e7f63c1 100755
--- a/bin/tools/foamListSourceFiles
+++ b/bin/tools/foamListSourceFiles
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -58,33 +58,33 @@ packDir=$(echo "$1" | sed -e 's@//*@/@g' -e 's@/$@@')
 # - exclude Doxygen documentation etc
 #
 
-find -H $packDir                                                              \
-    ! -type d                                                                 \
-   \( -type f -o -type l \)                                                   \
-    ! -name "*~"                                                              \
- -a ! -name ".*~"                                                             \
- -a ! -name "*.orig"                                                          \
- -a ! -name "*.dep"                                                           \
- -a ! -name "*.o"                                                             \
- -a ! -name "*.so"                                                            \
- -a ! -name "*.a"                                                             \
- -a ! -name "*.tar"                                                           \
- -a ! -name "*.tar.gz"                                                        \
- -a ! -name "*.tgz"                                                           \
- -a ! -name "*.tar.bz2"                                                       \
- -a ! -name "*.tbz"                                                           \
- -a ! -name "core"                                                            \
- -a ! -name "core.[1-9]*"                                                     \
- -a ! -name "libccmio*"                                                       \
-| sed                                                                         \
- -e '\@/\.git/@d'                                                             \
- -e '\@/\.tags/@d'                                                            \
- -e '\@/platforms/@d'                                                         \
- -e '\@/t/@d'                                                                 \
- -e '\@/Make[.A-Za-z]*/[^/]*/@d'                                              \
- -e '\@/[Dd]oxygen/html/@d'                                                   \
- -e '\@/download/@d'                                                          \
- -e '\@/libccmio-.*/@d'                                                       \
+find -H $packDir                                                               \
+    ! -type d                                                                  \
+   \( -type f -o -type l \)                                                    \
+    ! -name "*~"                                                               \
+ -a ! -name ".*~"                                                              \
+ -a ! -name "*.orig"                                                           \
+ -a ! -name "*.dep"                                                            \
+ -a ! -name "*.o"                                                              \
+ -a ! -name "*.so"                                                             \
+ -a ! -name "*.a"                                                              \
+ -a ! -name "*.tar"                                                            \
+ -a ! -name "*.tar.gz"                                                         \
+ -a ! -name "*.tgz"                                                            \
+ -a ! -name "*.tar.bz2"                                                        \
+ -a ! -name "*.tbz"                                                            \
+ -a ! -name "core"                                                             \
+ -a ! -name "core.[1-9]*"                                                      \
+ -a ! -name "libccmio*"                                                        \
+| sed                                                                          \
+ -e '\@/\.git/@d'                                                              \
+ -e '\@/\.tags/@d'                                                             \
+ -e '\@/platforms/@d'                                                          \
+ -e '\@/t/@d'                                                                  \
+ -e '\@/Make[.A-Za-z]*/[^/]*/@d'                                               \
+ -e '\@/[Dd]oxygen/html/@d'                                                    \
+ -e '\@/download/@d'                                                           \
+ -e '\@/libccmio-.*/@d'                                                        \
  -e '\@\./debian/@d'
 
 
diff --git a/doc/Allwmake b/doc/Allwmake
index 76b8eee2ce6ccb29213077cafe3cf8a53f81d16c..ba28b7955fcc22fcb22b32bd8cc44555c0d388d4 100755
--- a/doc/Allwmake
+++ b/doc/Allwmake
@@ -7,4 +7,4 @@ chmod a+rX $WM_PROJECT_DIR $WM_PROJECT_DIR/doc Doxygen
 
 Doxygen/Allwmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake
index 4b841f0c4532a3ee32cd0a67c35902036de18f99..3784ac39a4dc53988e91bf81091165bbe57b1fee 100755
--- a/doc/Doxygen/Allwmake
+++ b/doc/Doxygen/Allwmake
@@ -81,4 +81,4 @@ echo
 echo "Done doxygen"
 echo
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/doc/Doxygen/_Footer b/doc/Doxygen/_Footer
index e558a423e71ad8e9a30affb1d1eedc4ce26f1517..f65081cbce3d230e8c4efd8e5fdf5100ebc24459 100644
--- a/doc/Doxygen/_Footer
+++ b/doc/Doxygen/_Footer
@@ -3,7 +3,7 @@
   <div class="footer">
     <p>
       Copyright&nbsp;&copy;&nbsp;2011-2016&nbsp;
-      <a href="http://www.openfoam.com/about">OpenFOAM</a>
+      <a href="http://www.openfoam.com">OpenFOAM</a>
       |
       OPENFOAM&reg; is a registered
       <a href="http://www.openfoam.com/legal/trademark-policy.php">trademarks
diff --git a/doc/Doxygen/_Header b/doc/Doxygen/_Header
index f4a2ae1445eaba21ec58e42f39591a5dfab877d2..8a7d5ef0cadfe909a1759a4785451dd7d923673b 100644
--- a/doc/Doxygen/_Header
+++ b/doc/Doxygen/_Header
@@ -2,15 +2,19 @@
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=UFT-8"/>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 <title> OpenFOAM&reg; Programmer's C++ documentation </title>
 <!-- links -->
 <link href="../OpenFOAMdocIcon.png" rel="icon" type="image/png" />
 <link href="search/search.css" rel="stylesheet" type="text/css" />
 <link href="../css/openfoam.css" rel="stylesheet" type="text/css" />
+<script type="text/javaScript" src="search/searchdata.js"></script>
 <script type="text/javaScript" src="search/search.js"></script>
 <script type="text/javascript" src="jquery.js"></script>
 <script type="text/javascript" src="dynsections.js"></script>
+<script type="text/javascript">
+    $(document).ready(function() { init_search(); });
+</script>
 
 <!-- meta info -->
 <meta
diff --git a/doc/Doxygen/css/cfdLayout.css b/doc/Doxygen/css/cfdLayout.css
index f803ce8802b93605c51779fe336138d05105655c..c99508066e30097e5823fb9de8cb098bba2b02a1 100644
--- a/doc/Doxygen/css/cfdLayout.css
+++ b/doc/Doxygen/css/cfdLayout.css
@@ -11,6 +11,11 @@ body {
     font-size: 62.5%;
 } /*Font-size: 1.0em = 10px when browser default size is 16px*/
 
+/* Using the same as the code/verbatim blocks in doxygen.css */
+code {
+    font-family: "Courier New", Courier, monospace, fixed;
+}
+
 p:after {
     content:".";
     display:block;
@@ -243,7 +248,7 @@ p:after {
     padding-bottom:30px;
     border-left: 3px solid rgb(175,175,175);
     border-right:3px solid rgb(175,175,175);
-    background:transparent url(img/bg_main.gif) top left repeat-y;
+    background:transparent;
 }
 .main img {
     clear:both;
diff --git a/doc/Doxygen/css/doxyMod.css b/doc/Doxygen/css/doxyMod.css
index fd250189cbd4822f9c0e7edff7bd9dfa8a65c4ce..46ac2dfc5e4241e51e5230294d5864a4e2262aec 100644
--- a/doc/Doxygen/css/doxyMod.css
+++ b/doc/Doxygen/css/doxyMod.css
@@ -12,6 +12,10 @@
     list-style-type: square;
 }
 
+.contents ol {
+    margin-left: 20px;
+}
+
 /* colour and underline to match OpenFOAM style */
 div.title
 {
diff --git a/doc/codingStyleGuide.org b/doc/codingStyleGuide.org
index 29eb59145c66b79c1737c25cf60d3e94afd2202d..ba9343a76743dc92709691439981ee20ba507851 100644
--- a/doc/codingStyleGuide.org
+++ b/doc/codingStyleGuide.org
@@ -1,14 +1,14 @@
 #                            -*- mode: org; -*-
 #
-#+TITLE:                 OpenFOAM C++ style guide
+#+TITLE:                 OpenFOAM C++ Style Guide
 #+AUTHOR:                  OpenFOAM Foundation
-#+DATE:                       Aug 2011-2015
+#+DATE:                         2011-2016
 #+LINK:                   http://www.OpenFOAM.org
 #+OPTIONS: author:nil ^:{}
 #+STARTUP: hidestars
 #+STARTUP: odd
 
-* OpenFOAM C++ style guide
+* Code
 *** General
     + 80 character lines max
     + The normal indentation is 4 spaces per logical level.
@@ -22,23 +22,23 @@
     + Stream output
       + =<<= is always four characters after the start of the stream,
         so that the =<<= symbols align, i.e.
-        #+BEGIN_SRC c++
+        #+begin_src c++
         Info<< ...
         os  << ...
-        #+END_SRC
+        #+end_src
         so
-        #+BEGIN_SRC C++
+        #+begin_src C++
         WarningInFunction
             << "Warning message"
-        #+END_SRC
+        #+end_src
         *not*
-        #+BEGIN_SRC C++
+        #+begin_src C++
         WarningInFunction
         << "Warning message"
-        #+END_SRC
+        #+end_src
 
     + Remove unnecessary class section headers, i.e. remove
-#+BEGIN_SRC C++
+#+begin_src C++
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
     // Check
@@ -46,21 +46,21 @@
     // Edit
 
     // Write
-#+END_SRC
+#+end_src
       if they contain nothing, even if planned for 'future use'
 
     + Class titles should be centred
-#+BEGIN_SRC C++
+#+begin_src C++
 /*---------------------------------------------------------------------------*\
                         Class exampleClass Declaration
 \*---------------------------------------------------------------------------*/
-#+END_SRC
+#+end_src
       *not*
-#+BEGIN_SRC C++
+#+begin_src C++
 /*---------------------------------------------------------------------------*\
                 Class exampleClass Declaration
 \*---------------------------------------------------------------------------*/
-#+END_SRC
+#+end_src
 
 *** The /.H/ Header Files
     + Header file spacing
@@ -71,42 +71,42 @@
       + Text on the line starting with =//-= becomes the Doxygen brief
         description;
       + Text on subsequent lines becomes the Doxygen detailed description /e.g./
-        #+BEGIN_SRC C++
+        #+begin_src C++
         //- A function which returns a thing
         //  This is a detailed description of the function
         //  which processes stuff and returns other stuff
         //  depending on things.
         thing function(stuff1, stuff2);
-        #+END_SRC
+        #+end_src
       + List entries start with =-= or =-#= for numbered lists but cannot start
         on the line immediately below the brief description so
-        #+BEGIN_SRC C++
+        #+begin_src C++
         //- Compare triFaces
         //  Returns:
         //  -  0: different
         //  - +1: identical
         //  - -1: same face, but different orientation
         static inline int compare(const triFace&, const triFace&);
-        #+END_SRC
+        #+end_src
         or
-        #+BEGIN_SRC C++
+        #+begin_src C++
         //- Compare triFaces returning 0, +1 or -1
         //
         //  -  0: different
         //  - +1: identical
         //  - -1: same face, but different orientation
         static inline int compare(const triFace&, const triFace&);
-        #+END_SRC
+        #+end_src
         *not*
-        #+BEGIN_SRC C++
+        #+begin_src C++
         //- Compare triFaces returning 0, +1 or -1
         //  -  0: different
         //  - +1: identical
         //  - -1: same face, but different orientation
         static inline int compare(const triFace&, const triFace&);
-        #+END_SRC
+        #+end_src
       + List can be nested for example
-        #+BEGIN_SRC C++
+        #+begin_src C++
         //- Search for \em name
         //  in the following hierarchy:
         //  -# personal settings:
@@ -125,15 +125,15 @@
         //  \return the full path name or fileName() if the name cannot be found
         //  Optionally abort if the file cannot be found
         fileName findEtcFile(const fileName&, bool mandatory=false);
-        #+END_SRC
+        #+end_src
       + For more details see the Doxygen documentation.
     + Destructor
       + When adding a comment to the destructor use =//-= and code as a normal
         function:
-        #+BEGIN_SRC C++
+        #+begin_src C++
         //- Destructor
         ~className();
-        #+END_SRC
+        #+end_src
     + Inline functions
       + Use inline functions where appropriate in a separate /classNameI.H/
         file.  Avoid cluttering the header file with function bodies.
@@ -141,22 +141,22 @@
 *** The /.C/ Sourcs Files
     + Do not open/close namespaces in a /.C/ file
       + Fully scope the function name, i.e.
-        #+BEGIN_SRC C++
+        #+begin_src C++
         Foam::returnType Foam::className::functionName()
-        #+END_SRC
+        #+end_src
         *not*
-        #+BEGIN_SRC C++
+        #+begin_src C++
         namespace Foam
         {
             ...
             returnType className::functionName()
             ...
         }
-        #+END_SRC
+        #+end_src
         *Exception*
         When there are multiple levels of namespace, they may be used in the
         /.C/ file to avoid excessive clutter, i.e.
-        #+BEGIN_SRC C++
+        #+begin_src C++
         namespace Foam
         {
         namespace compressible
@@ -167,7 +167,7 @@
         } // End namespace RASModels
         } // End namespace compressible
         } // End namespace Foam
-        #+END_SRC
+        #+end_src
 
     + Use two empty lines between functions
 
@@ -178,25 +178,25 @@
     + =const=
       + Use everywhere it is applicable.
     + Variable initialisation using
-      #+BEGIN_SRC C++
+      #+begin_src C++
       const className& variableName = otherClass.data();
-      #+END_SRC
+      #+end_src
       *not*
-      #+BEGIN_SRC C++
+      #+begin_src C++
       const className& variableName(otherClass.data());
-      #+END_SRC
+      #+end_src
     + Virtual functions
       + If a class is virtual, make all derived classes virtual.
 
 *** Conditional Statements
-    #+BEGIN_SRC C++
+    #+begin_src C++
     if (condition)
     {
         code;
     }
-    #+END_SRC
+    #+end_src
     OR
-    #+BEGIN_SRC C++
+    #+begin_src C++
     if
     (
        long condition
@@ -204,24 +204,24 @@
     {
         code;
     }
-    #+END_SRC
+    #+end_src
     *not* (no space between =if= and =(= used)
-    #+BEGIN_SRC C++
+    #+begin_src C++
     if(condition)
     {
         code;
     }
-    #+END_SRC
+    #+end_src
 
 *** =for= and =while= Loops
-    #+BEGIN_SRC C++
+    #+begin_src C++
     for (i = 0; i < maxI; i++)
     {
         code;
     }
-    #+END_SRC
+    #+end_src
     OR
-    #+BEGIN_SRC C++
+    #+begin_src C++
     for
     (
         i = 0;
@@ -231,33 +231,33 @@
     {
         code;
     }
-    #+END_SRC
+    #+end_src
     *not* this (no space between =for= and =(= used)
-    #+BEGIN_SRC C++
+    #+begin_src C++
     for(i = 0; i < maxI; i++)
     {
         code;
     }
-    #+END_SRC
+    #+end_src
     Note that when indexing through iterators, it is often slightly more
     efficient to use the pre-increment form. Eg, =++iter= instead of =iter++=
 
 *** =forAll=, =forAllIter=, =forAllConstIter=, /etc./ loops
     Like =for= loops, but
-    #+BEGIN_SRC C++
+    #+begin_src C++
     forAll(
-    #+END_SRC
+    #+end_src
     *not*
-    #+BEGIN_SRC C++
+    #+begin_src C++
     forAll (
-    #+END_SRC
+    #+end_src
     Using the =forAllIter= and =forAllConstIter= macros is generally
     advantageous - less typing, easier to find later.  However, since
     they are macros, they will fail if the iterated object contains
     any commas /e.g./ following will FAIL!:
-    #+BEGIN_SRC C++
-    forAllIter(HashTable<labelPair, edge, Hash<edge> >, foo, iter)
-    #+END_SRC
+    #+begin_src C++
+    forAllIter(HashTable<labelPair, edge, Hash<edge>>, foo, iter)
+    #+end_src
     These convenience macros are also generally avoided in other
     container classes and OpenFOAM primitive classes.
 
@@ -266,106 +266,106 @@
       + Split initially after the function return type and left align
       + Do not put =const= onto its own line - use a split to keep it with
         the function name and arguments.
-        #+BEGIN_SRC C++
+        #+begin_src C++
         const Foam::longReturnTypeName&
         Foam::longClassName::longFunctionName const
-        #+END_SRC
+        #+end_src
         *not*
-        #+BEGIN_SRC C++
+        #+begin_src C++
         const Foam::longReturnTypeName&
             Foam::longClassName::longFunctionName const
-        #+END_SRC
+        #+end_src
         *nor*
-        #+BEGIN_SRC C++
+        #+begin_src C++
         const Foam::longReturnTypeName& Foam::longClassName::longFunctionName
         const
-        #+END_SRC
+        #+end_src
         *nor*
-        #+BEGIN_SRC C++
+        #+begin_src C++
         const Foam::longReturnTypeName& Foam::longClassName::
         longFunctionName const
-        #+END_SRC
+        #+end_src
       + If it needs to be split again, split at the function name (leaving
         behind the preceding scoping =::=s), and again, left align, i.e.
-        #+BEGIN_SRC C++
+        #+begin_src C++
         const Foam::longReturnTypeName&
         Foam::veryveryveryverylongClassName::
         veryveryveryverylongFunctionName const
-        #+END_SRC
+        #+end_src
 
 ***** Splitting long lines at an "="
      Indent after split
-     #+BEGIN_SRC C++
+     #+begin_src C++
      variableName =
          longClassName.longFunctionName(longArgument);
-     #+END_SRC
+     #+end_src
      OR (where necessary)
-     #+BEGIN_SRC C++
+     #+begin_src C++
      variableName =
          longClassName.longFunctionName
          (
              longArgument1,
              longArgument2
          );
-     #+END_SRC
+     #+end_src
      *not*
-     #+BEGIN_SRC C++
+     #+begin_src C++
      variableName =
      longClassName.longFunctionName(longArgument);
-     #+END_SRC
+     #+end_src
      *nor*
-     #+BEGIN_SRC C++
+     #+begin_src C++
      variableName = longClassName.longFunctionName
      (
          longArgument1,
          longArgument2
      );
-     #+END_SRC
+     #+end_src
 
 *** Maths and Logic
     + Operator spacing
-      #+BEGIN_SRC C++
+      #+begin_src C++
       a + b, a - b
       a*b, a/b
       a & b, a ^ b
       a = b, a != b
       a < b, a > b, a >= b, a <= b
       a || b, a && b
-      #+END_SRC
+      #+end_src
     + Splitting formulae over several lines
 
       Split and indent as per "splitting long lines at an ="
       with the operator on the lower line.  Align operator so that first
       variable, function or bracket on the next line is 4 spaces indented i.e.
-      #+BEGIN_SRC C++
+      #+begin_src C++
       variableName =
           a*(a + b)
          *exp(c/d)
          *(k + t);
-      #+END_SRC
+      #+end_src
       This is sometimes more legible when surrounded by extra parentheses:
 
-      #+BEGIN_SRC C++
+      #+begin_src C++
       variableName =
       (
           a*(a + b)
          *exp(c/d)
          *(k + t)
       );
-      #+END_SRC
+      #+end_src
     + Splitting logical tests over several lines
 
       outdent the operator so that the next variable to test is aligned with
       the four space indentation, i.e.
-      #+BEGIN_SRC C++
+      #+begin_src C++
       if
       (
           a == true
        && b == c
       )
-      #+END_SRC
+      #+end_src
 
-** Documentation
+* Documentation
 *** General
     + For readability in the comment blocks, certain tags are used that are
       translated by pre-filtering the file before sending it to Doxygen.
@@ -376,7 +376,7 @@
     + The first paragraph following the 'Description' will be used for the
       brief description, the remaining paragraphs become the detailed
       description.  For example,
-      #+BEGIN_SRC C++
+      #+begin_example C++
       Class
           Foam::myClass
 
@@ -385,38 +385,38 @@
 
           The class is implemented as a set of recommendations that may
           sometimes be useful.
-      #+END_SRC
+      #+end_example
 
     + The class name must be qualified by its namespace, otherwise Doxygen
       will think you are documenting some other class.
     + If you don't have anything to say about the class (at the moment), use
       the namespace-qualified class name for the description. This aids with
       finding these under-documented classes later.
-      #+BEGIN_SRC C++
+      #+begin_example C++
       Class
           Foam::myUnderDocumentedClass
 
       Description
           Foam::myUnderDocumentedClass
-      #+END_SRC
+      #+end_example
     + Use 'Class' and 'Namespace' tags in the header files.
       The Description block then applies to documenting the class.
     + Use 'InClass' and 'InNamespace' in the source files.
       The Description block then applies to documenting the file itself.
-      #+BEGIN_SRC C++
+      #+begin_example C++
       InClass
           Foam::myClass
 
       Description
           Implements the read and writing of files.
-      #+END_SRC
+      #+end_example
 
 *** Doxygen Special Commands
     Doxygen has a large number of special commands with a =\= prefix.
 
     Since the filtering removes the leading spaces within the blocks, the
     Doxygen commmands can be inserted within the block without problems.
-    #+BEGIN_SRC C++
+    #+begin_example C++
     InClass
         Foam::myClass
 
@@ -440,7 +440,7 @@
                 ...  // some operation
             }
         \endcode
-    #+END_SRC
+    #+end_example
 
 *** HTML Special Commands
     Since Doxygen also handles HTML tags to a certain extent, the angle
@@ -457,15 +457,15 @@
     + If the namespaces is used to hold sub-models, the namespace can be
       documented in the same file as the class with the model selector.
       /e.g./,
-      #+BEGIN_SRC C++
+      #+begin_example C++
       documented namespace 'Foam::functionEntries' within the
       class 'Foam::functionEntry'
-      #+END_SRC
+      #+end_example
     + If nothing else helps, find some sensible header.
       /e.g./,
-      #+BEGIN_SRC C++
+      #+begin_example C++
       namespace 'Foam' is documented in the foamVersion.H file
-      #+END_SRC
+      #+end_example
 
 *** Documenting Applications
     Any number of classes might be defined by a particular application, but
@@ -491,6 +491,36 @@
     used as a variable or class method name, it is probably better to use
     '-ize', which is considered the main form by the Oxford University
     Press. /e.g./,
-    #+BEGIN_SRC C++
+    #+begin_src C++
     myClass.initialize()
-    #+END_SRC
+    #+end_src
+*** References
+    References provided in the =Description= section of the class header files
+    should be formatted in the [[http://www.apastyle.org][APA (American
+    Psychological Association)]] style /e.g./ from =kEpsilon.H=
+    #+begin_example
+Description
+    Standard k-epsilon turbulence model for incompressible and compressible
+    flows including rapid distortion theory (RDT) based compression term.
+
+    Reference:
+    \verbatim
+        Standard model:
+            Launder, B. E., & Spalding, D. B. (1972).
+            Lectures in mathematical models of turbulence.
+
+            Launder, B. E., & Spalding, D. B. (1974).
+            The numerical computation of turbulent flows.
+            Computer methods in applied mechanics and engineering,
+            3(2), 269-289.
+
+        For the RDT-based compression term:
+            El Tahry, S. H. (1983).
+            k-epsilon equation for compressible reciprocating engine flows.
+            Journal of Energy, 7(4), 345-353.
+    \endverbatim
+    #+end_example
+    The APA style is a commonly used standard and references are available in
+    this format from many sources including
+    [[http://www.citationmachine.net/apa/cite-a-book][Citation Machine]] and
+    [[http://scholar.google.com][Google Scholar]].
diff --git a/doc/tools/find-its b/doc/tools/find-its
index 7f8996b32b13c6c40ff3c29e50b54fddc50925be..44c85130fbf5bfe768275105b99a0a86361b2ce0 100755
--- a/doc/tools/find-its
+++ b/doc/tools/find-its
@@ -1,5 +1,5 @@
 #!/bin/sh
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # Script
 #     find-its
 #
@@ -8,10 +8,10 @@
 #     This contraction (== "it is") looks too much like "its" (possesive)
 #     and confuses non-native (and some native) English speakers.
 #
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 set -x
 cd $WM_PROJECT_DIR || exit 1
 
 git grep -e "it's"
 
-#------------------------------------------------------------------ end-of-file
+#------------------------------------------------------------------------------
diff --git a/doc/tools/find-trailingspace b/doc/tools/find-trailingspace
index a04ee94d460a1ae21ab90cc6ec56b9e9a84ea3b7..a7bf8390f20a989f494130a157e55d6390e0b56a 100755
--- a/doc/tools/find-trailingspace
+++ b/doc/tools/find-trailingspace
@@ -1,12 +1,12 @@
 #!/bin/bash
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 # Script
 #     find-trailingspace
 #
 # Description
 #     Search for files with trailing whitesapce
 #
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 set -x
 cd $WM_PROJECT_DIR || exit 1
 
@@ -14,4 +14,4 @@ tab=$'\t'
 
 git grep -c -E "[ $tab]+"'$' -- $@
 
-#------------------------------------------------------------------ end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/README.org b/etc/README.org
new file mode 100644
index 0000000000000000000000000000000000000000..60029da36aa877944599c3a749fcca7aaf4dc91f
--- /dev/null
+++ b/etc/README.org
@@ -0,0 +1,21 @@
+* OpenFOAM Configuration
+  The main OpenFOAM settings are located in the parent etc/ directory.  The bash
+  and csh shells are supported and to configure OpenFOAM source etc/bashrc or
+  etc/cshrc respectively which source the following files in the config.sh or
+  config.csh respectively:
+  + =settings=: core settings
+  + =aliases=: aliases for interactive shells
+  + =unset=: sourced to clear as many OpenFOAM environment settings as possible
+  + =mpi=: MPI communications library settings
+  + =ensight=: application settings for EnSight
+  + =paraview=: application settings for ParaView
+  + =scotch=: application settings for compiling against scotch
+  + =metis=: application settings for compiling against metis 5
+
+  The config.*/example directories contains various example configuration files
+  for the corresponding shell:
+  + =compiler=: an example of fine tuning ThirdParty compiler settings
+  + =openmpi=: an example of fine tuning openmpi settings for OpenFOAM
+  + =paraview=: an example of chaining to the standard config/paraview with a
+    different ParaView_VERSION
+  + =prefs=: an example of supplying alternative site-defined settings
diff --git a/etc/bashrc b/etc/bashrc
index 251cd3430304158f47517fec87e28a1bbb614dbf..9a190e2548f49a53b8ade3a3b7ac569f5ceb03fe 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -58,8 +58,8 @@ foamInstall=$HOME/$WM_PROJECT
 : ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR
 
 #- Compiler location:
-#    foamCompiler= system | ThirdParty (OpenFOAM)
-foamCompiler=system
+#    WM_COMPILER_TYPE= system | ThirdParty (OpenFOAM)
+export WM_COMPILER_TYPE=system
 
 #- Compiler:
 #    WM_COMPILER = Gcc | Gcc45 | Gcc46 | Gcc47 | Gcc48 | Gcc49| Clang | Icc
@@ -137,52 +137,9 @@ fi
 # ~~~~~~~~~~~~~~~~~~~~~~
 export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
 
-
-# Source files, possibly with some verbosity
-_foamSource()
-{
-    while [ $# -ge 1 ]
-    do
-        [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1" 1>&2
-        . $1
-       shift
-    done
-}
-
-# Evaluate command-line parameters
-_foamEval()
-{
-    while [ $# -gt 0 ]
-    do
-        case "$1" in
-        -*)
-            # stray option (not meant for us here) -> get out
-            break
-            ;;
-        *=)
-            # name=       -> unset name
-            [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}" 1>&2
-            eval "unset ${1%=}"
-            ;;
-        *=*)
-            # name=value  -> export name=value
-            [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1" 1>&2
-            eval "export $1"
-            ;;
-        *)
-            # filename: source it
-            if [ -f "$1" ]
-            then
-                _foamSource "$1"
-            else
-                _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"`
-            fi
-            ;;
-        esac
-        shift
-    done
-}
-
+# Source initialization functions
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+. $WM_PROJECT_DIR/etc/config.sh/functions
 
 # Add in preset user or site preferences:
 _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
@@ -211,16 +168,18 @@ export PATH LD_LIBRARY_PATH MANPATH
 
 # Source project setup files
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamSource $WM_PROJECT_DIR/etc/config/settings.sh
-_foamSource $WM_PROJECT_DIR/etc/config/aliases.sh
+_foamSource $WM_PROJECT_DIR/etc/config.sh/settings
+_foamSource $WM_PROJECT_DIR/etc/config.sh/aliases
 
 
 # Source user setup files for optional packages
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
 
 
 # Clean environment paths again. Only remove duplicates
@@ -244,9 +203,13 @@ then
 fi
 
 
-# cleanup environment:
+# Cleanup environment:
 # ~~~~~~~~~~~~~~~~~~~~
 unset cleaned foamClean foamInstall foamOldDirs
-unset _foamSource _foamEval
 
-# ----------------------------------------------------------------- end-of-file
+
+# Unload initialization functions:
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+. $WM_PROJECT_DIR/etc/config.sh/functions
+
+#------------------------------------------------------------------------------
diff --git a/etc/caseDicts/general/coordinateSystem/cylindrical b/etc/caseDicts/general/coordinateSystem/cylindrical
index 7c7b6dfd7d720200851ac73c466b7a5c1965bf86..2fbe12ec5711b46c56938e7dcf862bcb91049ce6 100644
--- a/etc/caseDicts/general/coordinateSystem/cylindrical
+++ b/etc/caseDicts/general/coordinateSystem/cylindrical
@@ -17,7 +17,7 @@ FoamFile
 type      cartesian;
 coordinateRotation
 {
-    type  localAxesRotation;
+    type  cylindrical;
     e3    $axis;
 }
 
diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C
new file mode 100644
index 0000000000000000000000000000000000000000..ced40005b3acdda5540ca51d9f210052f8c437a5
--- /dev/null
+++ b/etc/codeTemplates/BC/BC.C
@@ -0,0 +1,243 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "CONSTRUCT.H"
+#include "addToRunTimeSelectionTable.H"
+#include "fvPatchFieldMapper.H"
+#include "volFields.H"
+#include "surfaceFields.H"
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+template<class Type>
+Foam::scalar Foam::CLASS::t() const
+{
+    return this->db().time().timeOutputValue();
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::CLASS::
+CONSTRUCT
+(
+    const fvPatch& p,
+    const DimensionedField<TYPE, volMesh>& iF
+)
+:
+    PARENT(p, iF),
+    scalarData_(0.0),
+    data_(Zero),
+    fieldData_(p.size(), Zero),
+    timeVsData_(),
+    wordData_("wordDefault"),
+    labelData_(-1),
+    boolData_(false)
+{
+    this->refValue() = Zero;
+    this->refGrad() = Zero;
+    this->valueFraction() = 0.0;
+}
+
+
+template<class Type>
+Foam::CLASS::
+CONSTRUCT
+(
+    const fvPatch& p,
+    const DimensionedField<TYPE, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    PARENT(p, iF),
+    scalarData_(readScalar(dict.lookup("scalarData"))),
+    data_(pTraits<TYPE>(dict.lookup("data"))),
+    fieldData_("fieldData", dict, p.size()),
+    timeVsData_(Function1<TYPE>::New("timeVsData", dict)),
+    wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
+    labelData_(-1),
+    boolData_(false)
+{
+    this->refGrad() = Zero;
+    this->valueFraction() = 0.0;
+
+    this->refValue() = FIELD("fieldData", dict, p.size());
+    FVPATCHF::operator=(this->refValue());
+
+    PARENT::evaluate();
+
+    /*
+    //Initialise with the value entry if evaluation is not possible
+    FVPATCHF::operator=
+    (
+        FIELD("value", dict, p.size())
+    );
+    this->refValue() = *this;
+    */
+}
+
+
+template<class Type>
+Foam::CLASS::
+CONSTRUCT
+(
+    const CLASS& ptf,
+    const fvPatch& p,
+    const DimensionedField<TYPE, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    PARENT(ptf, p, iF, mapper),
+    scalarData_(ptf.scalarData_),
+    data_(ptf.data_),
+    fieldData_(ptf.fieldData_, mapper),
+    timeVsData_(ptf.timeVsData_, false),
+    wordData_(ptf.wordData_),
+    labelData_(-1),
+    boolData_(ptf.boolData_)
+{}
+
+
+template<class Type>
+Foam::CLASS::
+CONSTRUCT
+(
+    const CLASS& ptf
+)
+:
+    PARENT(ptf),
+    scalarData_(ptf.scalarData_),
+    data_(ptf.data_),
+    fieldData_(ptf.fieldData_),
+    timeVsData_(ptf.timeVsData_, false),
+    wordData_(ptf.wordData_),
+    labelData_(-1),
+    boolData_(ptf.boolData_)
+{}
+
+
+template<class Type>
+Foam::CLASS::
+CONSTRUCT
+(
+    const CLASS& ptf,
+    const DimensionedField<TYPE, volMesh>& iF
+)
+:
+    PARENT(ptf, iF),
+    scalarData_(ptf.scalarData_),
+    data_(ptf.data_),
+    fieldData_(ptf.fieldData_),
+    timeVsData_(ptf.timeVsData_, false),
+    wordData_(ptf.wordData_),
+    labelData_(-1),
+    boolData_(ptf.boolData_)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::CLASS::autoMap
+(
+    const fvPatchFieldMapper& m
+)
+{
+    PARENT::autoMap(m);
+    fieldData_.autoMap(m);
+}
+
+
+template<class Type>
+void Foam::CLASS::rmap
+(
+    const FVPATCHF& ptf,
+    const labelList& addr
+)
+{
+    PARENT::rmap(ptf, addr);
+
+    const CLASS& tiptf =
+        refCast<const CLASS>(ptf);
+
+    fieldData_.rmap(tiptf.fieldData_, addr);
+}
+
+
+template<class Type>
+void Foam::CLASS::updateCoeffs()
+{
+    if (this->updated())
+    {
+        return;
+    }
+
+    PARENT::operator==
+    (
+        data_
+      + fieldData_
+      + scalarData_*timeVsData_->value(t())
+    );
+
+    const scalarField& phip =
+        this->patch().template lookupPatchField<surfaceScalarField, scalar>
+        (
+            "phi"
+        );
+    this->valueFraction() = 1.0 - pos(phip);
+
+    PARENT::updateCoeffs();
+}
+
+
+template<class Type>
+void Foam::CLASS::write
+(
+    Ostream& os
+) const
+{
+    FVPATCHF::write(os);
+    os.writeKeyword("scalarData") << scalarData_ << token::END_STATEMENT << nl;
+    os.writeKeyword("data") << data_ << token::END_STATEMENT << nl;
+    fieldData_.writeEntry("fieldData", os);
+    timeVsData_->writeData(os);
+    os.writeKeyword("wordData") << wordData_ << token::END_STATEMENT << nl;
+    this->writeEntry("value", os);
+}
+
+
+// * * * * * * * * * * * * * * Build Macro Function  * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makePatchTypeField
+    (
+        FVPATCHF,
+        CLASS
+    );
+}
+
+// ************************************************************************* //
diff --git a/etc/codeTemplates/BC/BC.H b/etc/codeTemplates/BC/BC.H
new file mode 100644
index 0000000000000000000000000000000000000000..65a47570369628b0fcc538d0677645be68531d40
--- /dev/null
+++ b/etc/codeTemplates/BC/BC.H
@@ -0,0 +1,246 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::CONSTRUCT
+
+Group
+    grpGenericBoundaryConditions
+
+Description
+    This boundary condition provides a NAME condition,
+    calculated as:
+
+        \f[
+            Q = Q_{0} + Q_{p} + s*Q_{t}
+        \f]
+
+    where
+    \vartable
+        s      | single scalar value [units]
+        Q_{0}  | single TYPE value [units]
+        Q_{p}  | TYPE field across patch [units]
+        Q_{t}  | TYPE function of time [units]
+    \endtable
+
+    \heading Patch usage
+
+    \table
+        Property   | Description                  | Req'd? | Default
+        scalarData | single scalar value          | yes    |
+        data       | single TYPE value          | yes    |
+        fieldData  | TYPE field across patch    | yes    |
+        timeVsData | TYPE function of time      | yes    |
+        wordData   | word, eg name of data object | no     | wordDefault
+    \endtable
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type       NAME;
+        scalarData -1;
+        data       ONE;
+        fieldData  uniform THREE;
+        timeVsData table (
+                             (0 ZERO)
+                             (1 TWO)
+                          );
+        wordName   anotherName;
+        value      uniform FOUR; // optional initial value
+    }
+    \endverbatim
+
+SourceFiles
+    CONSTRUCT.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef CONSTRUCT_H
+#define CONSTRUCT_H
+
+#include "BASEFvPatchFields.H"
+#include "Function1.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+     Class CONSTRUCT Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class CONSTRUCT
+:
+    public PARENT
+{
+    // Private data
+
+        //- Single valued scalar quantity, e.g. a coefficient
+        scalar scalarData_;
+
+        //- Single valued Type quantity, e.g. reference pressure pRefValue_
+        //  Other options include vector, tensor
+        TYPE data_;
+
+        //- Field of Types, typically defined across patch faces
+        //  e.g. total pressure p0_.  Other options include vectorField
+        FIELD fieldData_;
+
+        //- Type specified as a function of time for time-varying BCs
+        autoPtr<Function1<TYPE>> timeVsData_;
+
+        //- Word entry, e.g. pName_ for name of the pressure field on database
+        word wordData_;
+
+        //- Label, e.g. patch index, current time index
+        label labelData_;
+
+        //- Boolean for true/false, e.g. specify if flow rate is volumetric_
+        bool boolData_;
+
+
+    // Private Member Functions
+
+        //- Return current time
+        scalar t() const;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("NAME");
+
+
+    // Constructors
+
+        //- Construct from patch and internal field
+        CONSTRUCT
+        (
+            const fvPatch&,
+            const DimensionedField<TYPE, volMesh>&
+        );
+
+        //- Construct from patch, internal field and dictionary
+        CONSTRUCT
+        (
+            const fvPatch&,
+            const DimensionedField<TYPE, volMesh>&,
+            const dictionary&
+        );
+
+        //- Construct by mapping given BASETypeFvPatchField
+        //  onto a new patch
+        CONSTRUCT
+        (
+            const CLASS&,
+            const fvPatch&,
+            const DimensionedField<TYPE, volMesh>&,
+            const fvPatchFieldMapper&
+        );
+
+        //- Construct as copy
+        CONSTRUCT
+        (
+            const CLASS&
+        );
+
+        //- Construct and return a clone
+        virtual tmp<FVPATCHF> clone() const
+        {
+            return tmp<FVPATCHF>
+            (
+                new CLASS(*this)
+            );
+        }
+
+        //- Construct as copy setting internal field reference
+        CONSTRUCT
+        (
+            const CLASS&,
+            const DimensionedField<TYPE, volMesh>&
+        );
+
+        //- Construct and return a clone setting internal field reference
+        virtual tmp<FVPATCHF> clone
+        (
+            const DimensionedField<TYPE, volMesh>& iF
+        ) const
+        {
+            return tmp<FVPATCHF>
+            (
+                new CLASS
+                (
+                    *this,
+                    iF
+                )
+            );
+        }
+
+
+    // Member functions
+
+        // Mapping functions
+
+            //- Map (and resize as needed) from self given a mapping object
+            virtual void autoMap
+            (
+                const fvPatchFieldMapper&
+            );
+
+            //- Reverse map the given fvPatchField onto this fvPatchField
+            virtual void rmap
+            (
+                const FVPATCHF&,
+                const labelList&
+            );
+
+
+        // Evaluation functions
+
+            //- Update the coefficients associated with the patch field
+            virtual void updateCoeffs();
+
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "CONSTRUCT.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C b/etc/codeTemplates/BC/BCs.C
similarity index 90%
rename from src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
rename to etc/codeTemplates/BC/BCs.C
index a75aa80c341ee24cae37ef6015aef2e09d178b5b..a0b084933ad755952b65d1e4b605a5794593ee7f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
+++ b/etc/codeTemplates/BC/BCs.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "oscillatingFixedValueFvPatchFields.H"
+#include "CONSTRUCTs.H"
 #include "addToRunTimeSelectionTable.H"
 #include "volFields.H"
 
@@ -34,7 +34,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-makePatchFields(oscillatingFixedValue);
+makePatchFields(NAME);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.H b/etc/codeTemplates/BC/BCs.H
similarity index 86%
rename from src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.H
rename to etc/codeTemplates/BC/BCs.H
index 557d4973e771cdb8f6312f6c8036dd3637b4c542..bbd112ed9d13febf74db55eef3b213e61ff5edaf 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.H
+++ b/etc/codeTemplates/BC/BCs.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,10 +23,10 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef oscillatingFixedValueFvPatchFields_H
-#define oscillatingFixedValueFvPatchFields_H
+#ifndef CONSTRUCTs_H
+#define CONSTRUCTs_H
 
-#include "oscillatingFixedValueFvPatchField.H"
+#include "CONSTRUCT.H"
 #include "fieldTypes.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -36,7 +36,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-makePatchTypeFieldTypedefs(oscillatingFixedValue);
+makePatchTypeFieldTypedefs(NAME);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFieldsFwd.H b/etc/codeTemplates/BC/BCsFwd.H
similarity index 85%
rename from src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFieldsFwd.H
rename to etc/codeTemplates/BC/BCsFwd.H
index f46b9216b9d7f19b67a3a2188751c011431d68a6..4c600dd7eb09b54e6521dcd9af40e38aeb9083d1 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFieldsFwd.H
+++ b/etc/codeTemplates/BC/BCsFwd.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,8 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef oscillatingFixedValueFvPatchFieldsFwd_H
-#define oscillatingFixedValueFvPatchFieldsFwd_H
+#ifndef CONSTRUCTsFwd_H
+#define CONSTRUCTsFwd_H
 
 #include "fieldTypes.H"
 
@@ -35,9 +35,9 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-template<class Type> class oscillatingFixedValueFvPatchField;
+template<class Type> class CONSTRUCT;
 
-makePatchTypeFieldTypedefs(oscillatingFixedValue);
+makePatchTypeFieldTypedefs(NAME);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/etc/codeTemplates/BC/Make/files b/etc/codeTemplates/BC/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..bf5c6588a5528a7ff266479385825efe57468cf6
--- /dev/null
+++ b/etc/codeTemplates/BC/Make/files
@@ -0,0 +1,3 @@
+COMPILED.C
+
+LIB = $(FOAM_USER_LIBBIN)/libNAME
diff --git a/etc/codeTemplates/BC/Make/options b/etc/codeTemplates/BC/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..a3ae8da833177387e9eecf75b5e2675fc7b481f5
--- /dev/null
+++ b/etc/codeTemplates/BC/Make/options
@@ -0,0 +1,7 @@
+EXE_INC = \
+    -I$(LIB_SRC)/finiteVolume/lnInclude \
+    -I$(LIB_SRC)/meshTools/lnInclude
+
+LIB_LIBS = \
+    -lfiniteVolume \
+    -lmeshTools
diff --git a/etc/codeTemplates/app/Make/files b/etc/codeTemplates/app/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..bfe94ae06e97dcf02156bb123b04da43e8ff56e0
--- /dev/null
+++ b/etc/codeTemplates/app/Make/files
@@ -0,0 +1,3 @@
+NAME.C
+
+EXE = $(FOAM_USER_APPBIN)/NAME
diff --git a/etc/codeTemplates/app/Make/options b/etc/codeTemplates/app/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..d27c95d033dd5d7b1995c8ff8dc406e35ca1f586
--- /dev/null
+++ b/etc/codeTemplates/app/Make/options
@@ -0,0 +1,7 @@
+EXE_INC = \
+    -I$(LIB_SRC)/finiteVolume/lnInclude \
+    -I$(LIB_SRC)/meshTools/lnInclude
+
+EXE_LIBS = \
+    -lfiniteVolume \
+    -lmeshTools
diff --git a/etc/codeTemplates/app/app.C b/etc/codeTemplates/app/app.C
new file mode 100644
index 0000000000000000000000000000000000000000..2ed97537f6bb8e5d96bce5383a60651f50a1f09a
--- /dev/null
+++ b/etc/codeTemplates/app/app.C
@@ -0,0 +1,52 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Application
+    NAME
+
+Description
+
+\*---------------------------------------------------------------------------*/
+
+#include "fvCFD.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+    #include "setRootCase.H"
+    #include "createTime.H"
+
+    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+    Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
+        << "  ClockTime = " << runTime.elapsedClockTime() << " s"
+        << nl << endl;
+
+    Info<< "End\n" << endl;
+
+    return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H b/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H
index 4bb70e27ac5d8e84c837ee51da704ff5b8a5fce8..6026fe1256cb8b0973a77f271201fffad69f04ca 100644
--- a/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H
+++ b/etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp< fvPatch${FieldType} > clone() const
+        virtual tmp<fvPatch${FieldType} > clone() const
         {
-            return tmp< fvPatch${FieldType} >
+            return tmp<fvPatch${FieldType} >
             (
                 new ${typeName}FixedValueFvPatch${FieldType}(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp< fvPatch${FieldType} > clone
+        virtual tmp<fvPatch${FieldType} > clone
         (
             const DimensionedField<${TemplateType}, volMesh>& iF
         ) const
         {
-            return tmp< fvPatch${FieldType} >
+            return tmp<fvPatch${FieldType} >
             (
                 new ${typeName}FixedValueFvPatch${FieldType}(*this, iF)
             );
diff --git a/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H b/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H
index 1b1baf40c673c815cee4ad0d6442345613bdc4cf..bbb46269ff592451c4ddcdc624b4f42d041aa36a 100644
--- a/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H
+++ b/etc/codeTemplates/dynamicCode/fixedValuePointPatchFieldTemplate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr< pointPatchField<${TemplateType}> > clone() const
+        virtual autoPtr<pointPatchField<${TemplateType}>> clone() const
         {
-            return autoPtr< pointPatchField<${TemplateType}> >
+            return autoPtr<pointPatchField<${TemplateType}>>
             (
                 new ${typeName}FixedValuePointPatch${FieldType}(*this)
             );
@@ -109,12 +109,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr< pointPatchField<${TemplateType}> > clone
+        virtual autoPtr<pointPatchField<${TemplateType}>> clone
         (
             const DimensionedField<${TemplateType}, pointMesh>& iF
         ) const
         {
-            return autoPtr< pointPatchField<${TemplateType}> >
+            return autoPtr<pointPatchField<${TemplateType}>>
             (
                 new ${typeName}FixedValuePointPatch${FieldType}(*this, iF)
             );
diff --git a/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H b/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H
index 06e1c9887c5a31cc40d57d5eaa4a8260b04e0f4a..129fb534dd4be1299730a5436b89f6793fce9550 100644
--- a/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H
+++ b/etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp< fvPatch${FieldType} > clone() const
+        virtual tmp<fvPatch${FieldType} > clone() const
         {
-            return tmp< fvPatch${FieldType} >
+            return tmp<fvPatch${FieldType} >
             (
                 new ${typeName}MixedValueFvPatch${FieldType}(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp< fvPatch${FieldType} > clone
+        virtual tmp<fvPatch${FieldType} > clone
         (
             const DimensionedField<${TemplateType}, volMesh>& iF
         ) const
         {
-            return tmp< fvPatch${FieldType} >
+            return tmp<fvPatch${FieldType} >
             (
                 new ${typeName}MixedValueFvPatch${FieldType}(*this, iF)
             );
diff --git a/etc/codeTemplates/foamScript b/etc/codeTemplates/foamScript
index 56f750e175e4072bcba88ce9e7d0dc18787754c0..0c30f3371529ea384d46e4051b89ff433ec4e937 100755
--- a/etc/codeTemplates/foamScript
+++ b/etc/codeTemplates/foamScript
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -29,4 +29,4 @@
 #
 #------------------------------------------------------------------------------
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C b/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C
new file mode 100644
index 0000000000000000000000000000000000000000..68189c6d43f17084575ff2f575ebb6b987098e86
--- /dev/null
+++ b/etc/codeTemplates/functionObject/FUNCTIONOBJECT.C
@@ -0,0 +1,96 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "FUNCTIONOBJECT.H"
+#include "dictionary.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+defineTypeNameAndDebug(FUNCTIONOBJECT, 0);
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::FUNCTIONOBJECT::FUNCTIONOBJECT
+(
+    const word& name,
+    const objectRegistry& obr,
+    const dictionary& dict,
+    const bool loadFromFiles
+)
+:
+    name_(name),
+    obr_(obr),
+    wordData_(dict.lookupOrDefault<word>("wordData", "defaultWord")),
+    scalarData_(readScalar(dict.lookup("scalarData"))),
+    labelData_(readLabel(dict.lookup("labelData")))
+{
+    read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::FUNCTIONOBJECT::~FUNCTIONOBJECT()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::FUNCTIONOBJECT::read(const dictionary& dict)
+{
+    dict.readIfPresent("wordData", wordData_);
+    dict.lookup("scalarData") >> scalarData_;
+    dict.lookup("labelData") >> labelData_;
+}
+
+
+void Foam::FUNCTIONOBJECT::execute()
+{
+    // Do nothing - only valid on write
+}
+
+
+void Foam::FUNCTIONOBJECT::end()
+{
+    // Do nothing - only valid on write
+}
+
+
+void Foam::FUNCTIONOBJECT::timeSet()
+{
+    // Do nothing - only valid on write
+}
+
+
+void Foam::FUNCTIONOBJECT::write()
+{
+}
+
+
+// ************************************************************************* //
diff --git a/etc/codeTemplates/functionObject/FUNCTIONOBJECT.H b/etc/codeTemplates/functionObject/FUNCTIONOBJECT.H
new file mode 100644
index 0000000000000000000000000000000000000000..62fdf144e206437a4179b76b9f835660755cb115
--- /dev/null
+++ b/etc/codeTemplates/functionObject/FUNCTIONOBJECT.H
@@ -0,0 +1,176 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::FUNCTIONOBJECT
+
+Group
+
+Description
+    This function object...
+
+    Example of function object specification:
+    \verbatim
+    FUNCTIONOBJECT1
+    {
+        type           FUNCTIONOBJECT;
+        functionObjectLibs ("libFUNCTIONOBJECTFunctionObject.so");
+        ...
+        wordData       someWord;
+        scalarData     1.0;
+        labelData      1;
+    }
+    \endverbatim
+
+    \heading Function object usage
+    \table
+        Property     | Description               | Required | Default value
+        type         | type name: FUNCTIONOBJECT | yes      |
+        wordData     | some word option...       | no       | defaultWord
+        scalarData   | some scalar value...      | yes      |
+        labelData    | some label value...       | yes      |
+    \endtable
+
+SourceFiles
+    FUNCTIONOBJECT.C
+    IOFUNCTIONOBJECT.H
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef FUNCTIONOBJECT_H
+#define FUNCTIONOBJECT_H
+
+#include "runTimeSelectionTables.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of classes
+class objectRegistry;
+class dictionary;
+class polyMesh;
+class mapPolyMesh;
+
+/*---------------------------------------------------------------------------*\
+                   Class FUNCTIONOBJECT Declaration
+\*---------------------------------------------------------------------------*/
+
+class FUNCTIONOBJECT
+{
+    // Private data
+
+        //- Name of this set of FUNCTIONOBJECT
+        word name_;
+
+        //- Refererence to Db
+        const objectRegistry& obr_;
+
+        // Read from dictionary
+
+            //- word
+            word wordData_;
+
+            //- scalar
+            scalar scalarData_;
+
+            //- label
+            label labelData_;
+
+
+    // Private Member Functions
+
+
+        //- Disallow default bitwise copy construct
+        FUNCTIONOBJECT(const FUNCTIONOBJECT&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const FUNCTIONOBJECT&);
+
+
+public:
+
+    //- Runtime type information
+    TypeName("FUNCTIONOBJECT");
+
+
+    // Constructors
+
+        //- Construct for given objectRegistry and dictionary.
+        //  Allow the possibility to load fields from files
+        FUNCTIONOBJECT
+        (
+            const word& name,
+            const objectRegistry&,
+            const dictionary&,
+            const bool loadFromFiles = false
+        );
+
+
+    //- Destructor
+    virtual ~FUNCTIONOBJECT();
+
+
+    // Member Functions
+
+        //- Return name of the FUNCTIONOBJECT
+        virtual const word& name() const
+        {
+            return name_;
+        }
+
+        //- Read the FUNCTIONOBJECT data
+        virtual void read(const dictionary&);
+
+        //- Execute, currently does nothing
+        virtual void execute();
+
+        //- Execute at the final time-loop, currently does nothing
+        virtual void end();
+
+        //- Called when time was set at the end of the Time::operator++
+        virtual void timeSet();
+
+        //- Write the FUNCTIONOBJECT
+        virtual void write();
+
+        //- Update for changes of mesh
+        virtual void updateMesh(const mapPolyMesh&)
+        {}
+
+        //- Update for changes of mesh
+        virtual void movePoints(const polyMesh&)
+        {}
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryIO.C b/etc/codeTemplates/functionObject/FUNCTIONOBJECTFunctionObject.C
similarity index 69%
rename from src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryIO.C
rename to etc/codeTemplates/functionObject/FUNCTIONOBJECTFunctionObject.C
index eabaadbcdc3a18c03deb4028c68905016aa2c3c6..b10ecc50983f34e4d1545b802bc3233d6aebcd83 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryIO.C
+++ b/etc/codeTemplates/functionObject/FUNCTIONOBJECTFunctionObject.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,34 +23,24 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "DataEntry.H"
+#include "FUNCTIONOBJECTFunctionObject.H"
 
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-template<class Type>
-Foam::Ostream& Foam::operator<<
-(
-    Ostream& os,
-    const DataEntry<Type>& de
-)
+namespace Foam
 {
-    // Check state of Ostream
-    os.check
+    defineNamedTemplateTypeNameAndDebug
     (
-        "Ostream& operator<<(Ostream&, const DataEntry<Type>&)"
+        FUNCTIONOBJECTFunctionObject,
+        0
     );
 
-    os  << de.name_;
-
-    return os;
-}
-
-
-template<class Type>
-void Foam::DataEntry<Type>::writeData(Ostream& os) const
-{
-    os.writeKeyword(name_) << type();
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        FUNCTIONOBJECTFunctionObject,
+        dictionary
+    );
 }
 
-
 // ************************************************************************* //
diff --git a/etc/codeTemplates/functionObject/FUNCTIONOBJECTFunctionObject.H b/etc/codeTemplates/functionObject/FUNCTIONOBJECTFunctionObject.H
new file mode 100644
index 0000000000000000000000000000000000000000..78e6a7f0b96cc1e2d3d31980574b42e9f77c7a50
--- /dev/null
+++ b/etc/codeTemplates/functionObject/FUNCTIONOBJECTFunctionObject.H
@@ -0,0 +1,54 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Typedef
+    Foam::FUNCTIONOBJECTFunctionObject
+
+Description
+    FunctionObject wrapper around FUNCTIONOBJECT to allow them to be
+    created via the functions entry within controlDict.
+
+SourceFiles
+    FUNCTIONOBJECTFunctionObject.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef FUNCTIONOBJECTFunctionObject_H
+#define FUNCTIONOBJECTFunctionObject_H
+
+#include "FUNCTIONOBJECT.H"
+#include "OutputFilterFunctionObject.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    typedef OutputFilterFunctionObject<FUNCTIONOBJECT>
+        FUNCTIONOBJECTFunctionObject;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C b/etc/codeTemplates/functionObject/IOFUNCTIONOBJECT.H
similarity index 82%
rename from src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C
rename to etc/codeTemplates/functionObject/IOFUNCTIONOBJECT.H
index 3847b5df83f939d3ae61a22184f7fd59169d89e1..0075f798a1452ca1c474d87965cf47f17043921d 100644
--- a/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C
+++ b/etc/codeTemplates/functionObject/IOFUNCTIONOBJECT.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,24 +22,24 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Typedef
-    Foam::IOdsmcFields
+    Foam::IOFUNCTIONOBJECT
 
 Description
-    Instance of the generic IOOutputFilter for dsmcFields.
+    Instance of the generic IOOutputFilter for FUNCTIONOBJECT.
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef IOdsmcFields_H
-#define IOdsmcFields_H
+#ifndef IOFUNCTIONOBJECT_H
+#define IOFUNCTIONOBJECT_H
 
-#include "dsmcFields.H"
+#include "FUNCTIONOBJECT.H"
 #include "IOOutputFilter.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-    typedef IOOutputFilter<dsmcFields> IOdsmcFields;
+    typedef IOOutputFilter<FUNCTIONOBJECT> IOFUNCTIONOBJECT;
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/etc/codeTemplates/functionObject/Make/files b/etc/codeTemplates/functionObject/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..73b99560319cbbcee4a083b7fba1a5bdb5f20ae8
--- /dev/null
+++ b/etc/codeTemplates/functionObject/Make/files
@@ -0,0 +1,4 @@
+FUNCTIONOBJECT.C
+FUNCTIONOBJECTFunctionObject.C
+
+LIB = $(FOAM_USER_LIBBIN)/libFUNCTIONOBJECTFunctionObject
diff --git a/etc/codeTemplates/functionObject/Make/options b/etc/codeTemplates/functionObject/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..a3ae8da833177387e9eecf75b5e2675fc7b481f5
--- /dev/null
+++ b/etc/codeTemplates/functionObject/Make/options
@@ -0,0 +1,7 @@
+EXE_INC = \
+    -I$(LIB_SRC)/finiteVolume/lnInclude \
+    -I$(LIB_SRC)/meshTools/lnInclude
+
+LIB_LIBS = \
+    -lfiniteVolume \
+    -lmeshTools
diff --git a/etc/codeTemplates/source/_Template.C b/etc/codeTemplates/source/_Template.C
index a7005f5a207b511acc81eca9dd0f372db90c1163..6812cbdf16ff8b4bd1dbcae4a4306fbce57527ac 100644
--- a/etc/codeTemplates/source/_Template.C
+++ b/etc/codeTemplates/source/_Template.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/codeTemplates/source/_Template.H b/etc/codeTemplates/source/_Template.H
index 79343cc9037c26f35f1770f016ca2805adfcb646..d2cbe47d0b5280d2b69aa8c819e1cf86335a5825 100644
--- a/etc/codeTemplates/source/_Template.H
+++ b/etc/codeTemplates/source/_Template.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/codeTemplates/source/_TemplateApp.C b/etc/codeTemplates/source/_TemplateApp.C
index 36dfe222d925cf7aa98eb8a3b64471b417e2e309..80c562cbdbc9b40185dbec45bf9df0e9fe11459a 100644
--- a/etc/codeTemplates/source/_TemplateApp.C
+++ b/etc/codeTemplates/source/_TemplateApp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/codeTemplates/source/_TemplateI.H b/etc/codeTemplates/source/_TemplateI.H
index 4ad835f082ce272cdb0325b3c6b911d008f3a659..eca8d9ea3b2ab1a5690711352eb2a1cf5e7a7166 100644
--- a/etc/codeTemplates/source/_TemplateI.H
+++ b/etc/codeTemplates/source/_TemplateI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/codeTemplates/source/_TemplateIO.C b/etc/codeTemplates/source/_TemplateIO.C
index 155f05eabe5f24591bdfdaa8364eecdebebbab59..d07fc0d3f30ee81b258acf0a66b2b2a0fcae897f 100644
--- a/etc/codeTemplates/source/_TemplateIO.C
+++ b/etc/codeTemplates/source/_TemplateIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/codeTemplates/template/_TemplateTemplate.C b/etc/codeTemplates/template/_TemplateTemplate.C
index 41469f7b13d8772e8e2d8bb8d6090ac1ad0b5a01..63b895032b60ec2ed6046a6fdb3ef77b75d12ef9 100644
--- a/etc/codeTemplates/template/_TemplateTemplate.C
+++ b/etc/codeTemplates/template/_TemplateTemplate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,10 +66,10 @@ Foam::CLASSNAME<TemplateArgument>::CLASSNAME
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<TemplateClassArgument>
-Foam::autoPtr<Foam::CLASSNAME<TemplateArgument> >
+Foam::autoPtr<Foam::CLASSNAME<TemplateArgument>>
 Foam::CLASSNAME<TemplateArgument>::New()
 {
-    return autoPtr<CLASSNAME<TemplateArgument> >
+    return autoPtr<CLASSNAME<TemplateArgument>>
     (
         new CLASSNAME<TemplateArgument>
     );
diff --git a/etc/codeTemplates/template/_TemplateTemplate.H b/etc/codeTemplates/template/_TemplateTemplate.H
index 8db7a0fc991a6a4f0b895a28790bf219915bec12..12e5511b732819851a7d73e52c0802b6073cffc5 100644
--- a/etc/codeTemplates/template/_TemplateTemplate.H
+++ b/etc/codeTemplates/template/_TemplateTemplate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ public:
     // Selectors
 
         //- Select null constructed
-        static autoPtr<CLASSNAME<TemplateArgument> > New();
+        static autoPtr<CLASSNAME<TemplateArgument>> New();
 
 
     //- Destructor
@@ -147,7 +147,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CLASSNAME.C"
+    #include "CLASSNAME.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/etc/codeTemplates/template/_TemplateTemplateI.H b/etc/codeTemplates/template/_TemplateTemplateI.H
index 687d269a906bbfb52adcd6d91137c884074ed2a8..eca8d9ea3b2ab1a5690711352eb2a1cf5e7a7166 100644
--- a/etc/codeTemplates/template/_TemplateTemplateI.H
+++ b/etc/codeTemplates/template/_TemplateTemplateI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/codeTemplates/template/_TemplateTemplateIO.C b/etc/codeTemplates/template/_TemplateTemplateIO.C
index 8a5e6e56c43f1792fa4703738b0efec18a439589..c60b5be8b8d8494dd982b9958fb8a81ac4b04485 100644
--- a/etc/codeTemplates/template/_TemplateTemplateIO.C
+++ b/etc/codeTemplates/template/_TemplateTemplateIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/etc/config/CGAL.csh b/etc/config.csh/CGAL
similarity index 92%
rename from etc/config/CGAL.csh
rename to etc/config.csh/CGAL
index 7269587c3098bebedae0cd0da8a2fb0f65bfc382..0ec72b5e761a480b4e26eeec62110d0d0af5bf31 100644
--- a/etc/config/CGAL.csh
+++ b/etc/config.csh/CGAL
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/CGAL.csh
+#     config.csh/CGAL
 #
 # Description
 #     Setup file for CGAL (& boost) include/libraries.
@@ -51,4 +51,4 @@ endif
 
 unset boost_version cgal_version
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/aliases.csh b/etc/config.csh/aliases
similarity index 90%
rename from etc/config/aliases.csh
rename to etc/config.csh/aliases
index 489a771268afa24638dcfc95008c2ff8164b291d..aff45a10e51ea92aa6d20ec27c583822e03982a4 100644
--- a/etc/config/aliases.csh
+++ b/etc/config.csh/aliases
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     etc/config/aliases.csh
+#     etc/config.csh/aliases
 #
 # Description
 #     Aliases for working with OpenFOAM
@@ -42,7 +42,7 @@ alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
 alias wmREFRESH 'wmSET $FOAM_SETTINGS'
 
 # clear env
-alias wmUNSET 'source $WM_PROJECT_DIR/etc/config/unset.csh'
+alias wmUNSET 'source $WM_PROJECT_DIR/etc/config.csh/unset'
 
 # Toggle wmakeScheduler on/off
 #  - also need to set WM_HOSTS
@@ -52,7 +52,7 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER'
 
 # Change ParaView version
 # ~~~~~~~~~~~~~~~~~~~~~~~
-alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
+alias foamPV 'source `$WM_PROJECT_DIR/etc/config.csh/paraview` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
 
 
 # Change directory aliases
@@ -80,4 +80,4 @@ else
     alias foamSite 'cd $WM_PROJECT_INST_DIR/site'
 endif
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/ensight.csh b/etc/config.csh/ensight
similarity index 91%
rename from etc/config/ensight.csh
rename to etc/config.csh/ensight
index bdf4ac29e5440b315ce1b8de9ee2ee8bceab6573..d8f1e8ac32290ae54e319bb5916a9b646d25ccb9 100644
--- a/etc/config/ensight.csh
+++ b/etc/config.csh/ensight
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/ensight.csh
+#     config.csh/ensight
 #
 # Description
 #     Setup file for Ensight
@@ -51,4 +51,4 @@ else
     unsetenv CEI_HOME
 endif
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/compiler.csh b/etc/config.csh/example/compiler
similarity index 86%
rename from etc/config/example/compiler.csh
rename to etc/config.csh/example/compiler
index 4310f43cc78708199268e233e2194f2d3583f75e..b6c16c57ae3ae5ffe8316b2ce639cd210cce64ad 100644
--- a/etc/config/example/compiler.csh
+++ b/etc/config.csh/example/compiler
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,11 +22,11 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/compiler.csh
+#     config.csh/example/compiler
 #
 # Description
 #     Example of fine tuning ThirdParty compiler settings for OpenFOAM
-#     Sourced from OpenFOAM-<VERSION>/etc/config/settings.csh
+#     Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
 #
 #------------------------------------------------------------------------------
 
@@ -48,4 +48,4 @@ case Gcc45++0x:
     breaksw
 endsw
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/openmpi.csh b/etc/config.csh/example/openmpi
similarity index 83%
rename from etc/config/example/openmpi.csh
rename to etc/config.csh/example/openmpi
index dc4854b53f0c84da898d2a4fd0740f2be4ef2113..70dc5d69caaebe16a5ef217f36c613ca5f4b97fe 100644
--- a/etc/config/example/openmpi.csh
+++ b/etc/config.csh/example/openmpi
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,15 +22,15 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/openmpi.csh
+#     config.csh/example/openmpi
 #
 # Description
 #     Example of fine tuning openmpi settings for OpenFOAM
-#     Sourced from OpenFOAM-<VERSION>/etc/config/settings.csh
+#     Sourced from OpenFOAM-<VERSION>/etc/config.csh/settings
 #
 #------------------------------------------------------------------------------
 
 # Modified openmpi settings
 setenv FOAM_MPI openmpi-1.4.3
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/paraview.csh b/etc/config.csh/example/paraview
similarity index 83%
rename from etc/config/example/paraview.csh
rename to etc/config.csh/example/paraview
index 9b639c74ba34e4d375519325afa6369c650791fe..63d2e2668233647ad2b86866d07488b696312db5 100644
--- a/etc/config/example/paraview.csh
+++ b/etc/config.csh/example/paraview
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,10 +22,10 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/paraview.csh
+#     config.csh/example/paraview
 #
 # Description
-#     Example of chaining to the standard config/paraview.csh with a
+#     Example of chaining to the standard config.csh/paraview with a
 #     different ParaView_VERSION
 #
 # Note
@@ -38,9 +38,9 @@
 # Use other (shipped) paraview.csh with a different ParaView_VERSION
 #
 
-set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.csh`
+set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config.csh/paraview`
 if ( $status == 0 ) source $foamFile ParaView_VERSION=3.12.0
 
 unset foamFile
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/prefs.csh b/etc/config.csh/example/prefs.csh
similarity index 88%
rename from etc/config/example/prefs.csh
rename to etc/config.csh/example/prefs.csh
index 03fb5d048fab65f2fe29ac0ddd88a48e56f988b2..20ac1a67be073d05acf45f5c0473ea10b5ec21ec 100644
--- a/etc/config/example/prefs.csh
+++ b/etc/config.csh/example/prefs.csh
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/prefs.csh
+#     config.csh/example/prefs.csh
 #
 # Description
 #     Preset variables for the OpenFOAM configuration - C-Shell shell syntax.
@@ -38,7 +38,7 @@
 
 ## Specify OpenFOAM ThirdParty compiler
 ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# set foamCompiler=ThirdParty
+# set WM_COMPILER_TYPE=ThirdParty
 
 ## Specify compiler type
 ## ~~~~~~~~~~~~~~~~~~~~~
@@ -49,4 +49,4 @@
 # setenv WM_MPLIB SYSTEMOPENMPI
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi
new file mode 100644
index 0000000000000000000000000000000000000000..34280a12c91490159780577a4215ba73cd12a916
--- /dev/null
+++ b/etc/config.csh/mpi
@@ -0,0 +1,277 @@
+#----------------------------------*-sh-*--------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+#     etc/config.csh/mpi
+#
+# Description
+#     Startup file for communications library (MPI) for OpenFOAM
+#     Sourced from OpenFOAM-<VERSION>/etc/bashrc
+#
+#------------------------------------------------------------------------------
+
+# Communications library
+# ~~~~~~~~~~~~~~~~~~~~~~
+
+unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
+
+switch ("$WM_MPLIB")
+case SYSTEMOPENMPI:
+    # Use the system installed openmpi, get library directory via mpicc
+    setenv FOAM_MPI openmpi-system
+
+    set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+
+    # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
+    # Include files and libraries.
+    setenv MPI_ARCH_PATH "${libDir:h}"
+
+    _foamAddLib     $libDir
+    unset libDir
+    breaksw
+
+case OPENMPI:
+    setenv FOAM_MPI openmpi-1.10.2
+    # Optional configuration tweaks:
+    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/openmpi`
+
+    setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
+
+    # Tell OpenMPI where to find its install directory
+    setenv OPAL_PREFIX $MPI_ARCH_PATH
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+
+    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
+    _foamAddLib     $MPI_ARCH_PATH/lib
+
+    _foamAddMan     $MPI_ARCH_PATH/share/man
+    breaksw
+
+case SYSTEMMPI:
+    setenv FOAM_MPI mpi-system
+
+    if ( ! ($?MPI_ROOT) ) then
+        echo
+        echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+        echo "    Please set the environment variable MPI_ROOT to point to" \
+             " the base folder for the system MPI in use."
+        echo "    Example:"
+        echo
+        echo "        setenv MPI_ROOT /opt/mpi"
+        echo
+    else
+        setenv MPI_ARCH_PATH $MPI_ROOT
+
+        if ( ! ($?MPI_ARCH_FLAGS) ) then
+            echo
+            echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+            echo "    MPI_ARCH_FLAGS is not set. Example:"
+            echo
+            echo '        setenv MPI_ARCH_FLAGS "-DOMPI_SKIP_MPICXX"'
+            echo
+        endif
+
+        if ( ! ($?MPI_ARCH_INC) ) then
+            echo
+            echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+            echo "    MPI_ARCH_INC is not set. Example:"
+            echo
+            echo '        setenv MPI_ARCH_INC "-isystem $MPI_ROOT/include"'
+            echo
+        endif
+
+        if ( ! ($?MPI_ARCH_LIBS) ) then
+            echo
+            echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+            echo "    MPI_ARCH_LIBS is not set. Example:"
+            echo
+            echo '        setenv MPI_ARCH_LIBS "-L$MPI_ROOT/lib -lmpi"'
+            echo
+        endif
+    endif
+    breaksw
+
+case MPICH:
+    setenv FOAM_MPI mpich2-1.1.1p1
+    setenv MPI_HOME $WM_THIRD_PARTY_DIR/$FOAM_MPI
+    setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+
+    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
+    _foamAddLib     $MPI_ARCH_PATH/lib
+
+    _foamAddMan     $MPI_ARCH_PATH/share/man
+    breaksw
+
+case MPICH-GM:
+    setenv FOAM_MPI mpich-gm
+    setenv MPI_ARCH_PATH /opt/mpi
+    setenv MPICH_PATH $MPI_ARCH_PATH
+    setenv GM_LIB_PATH /opt/gm/lib64
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+
+    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
+    _foamAddLib     $MPI_ARCH_PATH/lib
+
+    _foamAddLib     $GM_LIB_PATH
+    breaksw
+
+case HPMPI:
+    setenv FOAM_MPI hpmpi
+    setenv MPI_HOME /opt/hpmpi
+    setenv MPI_ARCH_PATH $MPI_HOME
+
+    _foamAddPath $MPI_ARCH_PATH/bin
+
+    switch (`uname -m`)
+    case i686:
+        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
+        breaksw
+    case x86_64:
+        _foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
+        breaksw
+    case ia64:
+        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
+        breaksw
+    default:
+        echo Unknown processor type `uname -m` for Linux
+        breaksw
+    endsw
+    breaksw
+
+case MPI:
+    setenv FOAM_MPI mpi
+    setenv MPI_ARCH_PATH /opt/mpi
+    breaksw
+
+case FJMPI:
+    setenv FOAM_MPI fjmpi
+    setenv MPI_ARCH_PATH /opt/FJSVmpi2
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+    _foamAddLib     $MPI_ARCH_PATH/lib/sparcv9
+    _foamAddLib     /opt/FSUNf90/lib/sparcv9
+    _foamAddLib     /opt/FJSVpnidt/lib
+    breaksw
+
+case QSMPI:
+    setenv FOAM_MPI qsmpi
+    setenv MPI_ARCH_PATH /usr/lib/mpi
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+    _foamAddLib     $MPI_ARCH_PATH/lib
+    breaksw
+
+case SGIMPI:
+    if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
+
+    if ( ! -d "$MPI_ROOT" ) then
+        echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+        echo "    MPI_ROOT not a valid mpt installation directory."
+        echo "    Please set MPI_ROOT to the mpt installation directory."
+        echo "    (usually done by loading the mpt module)"
+        echo "    MPI_ROOT currently set to '$MPI_ROOT'"
+    endif
+
+    if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
+        setenv MPI_ROOT ${MPI_ROOT:h}
+    endif
+
+    setenv FOAM_MPI ${MPI_ROOT:t}
+    setenv MPI_ARCH_PATH $MPI_ROOT
+
+
+    if ($?FOAM_VERBOSE && $?prompt) then
+        echo "Using SGI MPT:"
+        echo "    MPI_ROOT : $MPI_ROOT"
+        echo "    FOAM_MPI : $FOAM_MPI"
+    endif
+
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+    _foamAddLib     $MPI_ARCH_PATH/lib
+    breaksw
+
+case INTELMPI:
+    if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
+
+    if ( ! -d "$MPI_ROOT" ) then
+        echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+        echo "    MPI_ROOT not a valid mpt installation directory."
+        echo "    Please set MPI_ROOT to the mpt installation directory."
+        echo "    (usually done by loading the mpt module)"
+        echo "    MPI_ROOT currently set to '$MPI_ROOT'"
+    endif
+
+    if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
+        setenv MPI_ROOT ${MPI_ROOT:h}
+    endif
+
+    setenv FOAM_MPI ${MPI_ROOT:t}
+    setenv MPI_ARCH_PATH $MPI_ROOT
+
+
+    if ($?FOAM_VERBOSE && $?prompt) then
+        echo "Using INTEL MPT:"
+        echo "    MPI_ROOT : $MPI_ROOT"
+        echo "    FOAM_MPI : $FOAM_MPI"
+    endif
+
+
+    _foamAddPath    $MPI_ARCH_PATH/bin64
+    _foamAddLib     $MPI_ARCH_PATH/lib64
+    breaksw
+
+default:
+    setenv FOAM_MPI dummy
+    breaksw
+endsw
+
+
+# Add (non-dummy) MPI implementation
+# Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
+if ( "$FOAM_MPI" != dummy ) then
+    _foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}:${FOAM_EXT_LIBBIN}/${FOAM_MPI}
+endif
+
+
+
+# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+if ( ! $?minBufferSize ) set minBufferSize=20000000
+
+if ( $?MPI_BUFFER_SIZE ) then
+    if ( $MPI_BUFFER_SIZE < $minBufferSize ) then
+        setenv MPI_BUFFER_SIZE $minBufferSize
+    endif
+else
+    setenv MPI_BUFFER_SIZE $minBufferSize
+endif
+
+#------------------------------------------------------------------------------
diff --git a/etc/config/paraview.csh b/etc/config.csh/paraview
similarity index 91%
rename from etc/config/paraview.csh
rename to etc/config.csh/paraview
index f81a894d11ebabd86646753b76c65dd2cdf9f520..9e5f7eb0f7838ec16c473250b4c558d3f7114f84 100644
--- a/etc/config/paraview.csh
+++ b/etc/config.csh/paraview
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,10 +22,10 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/paraview.csh
+#     config.csh/paraview
 #
 # Description
-#     Setup file for paraview-[3-4].x
+#     Setup file for paraview-[3-5].x
 #     Sourced from OpenFOAM-<VERSION>/etc/cshrc or from foamPV alias
 #
 # Note
@@ -53,7 +53,8 @@ end
 #setenv ParaView_VERSION 4.0.1
 #setenv ParaView_VERSION 4.1.0
 #setenv ParaView_VERSION 4.3.1
-setenv ParaView_VERSION 4.4.0
+#setenv ParaView_VERSION 4.4.0
+setenv ParaView_VERSION 5.0.0
 setenv ParaView_MAJOR detect
 
 
@@ -92,14 +93,11 @@ setenv ParaView_DIR $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraview
 # set paths if binaries or source are present
 if ( -r $ParaView_DIR || -r $paraviewInstDir ) then
     setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-${ParaView_MAJOR}
-    if (! -r $ParaView_INCLUDE_DIR && -r $ParaView_DIR/include/paraview) then
-        setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview
+    if (! -r $ParaView_INCLUDE_DIR && -r $ParaView_DIR/include/paraview-3.0) then
+        setenv ParaView_INCLUDE_DIR $ParaView_DIR/include/paraview-3.0
     endif
 
     set ParaView_LIB_DIR=${ParaView_DIR}/lib/paraview-${ParaView_MAJOR}
-    if (! -r $ParaView_LIB_DIR && -r ${ParaView_DIR}/lib/paraview) then
-        set ParaView_LIB_DIR=${ParaView_DIR}/lib/paraview
-    endif
 
     setenv PATH ${ParaView_DIR}/bin:${PATH}
     setenv LD_LIBRARY_PATH "${ParaView_LIB_DIR}:${LD_LIBRARY_PATH}"
@@ -130,4 +128,4 @@ endif
 
 unset cleaned cmake paraviewInstDir paraviewPython
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/settings.csh b/etc/config.csh/settings
similarity index 50%
rename from etc/config/settings.csh
rename to etc/config.csh/settings
index e6848ea579594ab24e84804bc7223dc57dfd9d42..b93503e36f4c2004864aaedfcfa58775aa566480 100644
--- a/etc/config/settings.csh
+++ b/etc/config.csh/settings
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     etc/config/settings.csh
+#     etc/config.csh/settings
 #
 # Description
 #     Startup file for OpenFOAM
@@ -60,7 +60,7 @@ case Linux:
             setenv WM_CC 'gcc'
             setenv WM_CXX 'g++'
             setenv WM_CFLAGS '-m32 -fPIC'
-            setenv WM_CXXFLAGS '-m32 -fPIC'
+            setenv WM_CXXFLAGS '-m32 -fPIC -std=c++0x'
             setenv WM_LDFLAGS '-m32'
             breaksw
 
@@ -70,7 +70,7 @@ case Linux:
             setenv WM_CC 'gcc'
             setenv WM_CXX 'g++'
             setenv WM_CFLAGS '-m64 -fPIC'
-            setenv WM_CXXFLAGS '-m64 -fPIC'
+            setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
             setenv WM_LDFLAGS '-m64'
             breaksw
 
@@ -92,7 +92,7 @@ case Linux:
         setenv WM_CC 'gcc'
         setenv WM_CXX 'g++'
         setenv WM_CFLAGS '-m64 -fPIC'
-        setenv WM_CXXFLAGS '-m64 -fPIC'
+        setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
         setenv WM_LDFLAGS '-m64'
         breaksw
 
@@ -102,7 +102,7 @@ case Linux:
         setenv WM_CC 'gcc'
         setenv WM_CXX 'g++'
         setenv WM_CFLAGS '-m64 -fPIC'
-        setenv WM_CXXFLAGS '-m64 -fPIC'
+        setenv WM_CXXFLAGS '-m64 -fPIC -std=c++0x'
         setenv WM_LDFLAGS '-m64'
         breaksw
 
@@ -120,7 +120,7 @@ case SunOS:
     setenv WM_CC 'gcc'
     setenv WM_CXX 'g++'
     setenv WM_CFLAGS '-mabi=64 -fPIC'
-    setenv WM_CXXFLAGS '-mabi=64 -fPIC'
+    setenv WM_CXXFLAGS '-mabi=64 -fPIC -std=c++0x'
     setenv WM_LDFLAGS '-mabi=64 -G0'
     breaksw
 
@@ -187,10 +187,10 @@ if ( -d "${WM_DIR}" ) setenv PATH ${WM_DIR}:${PATH}
 setenv PATH ${WM_PROJECT_DIR}/bin:${PATH}
 
 # Add site-specific scripts to path - only if they exist
-if ( -d "$siteDir/bin" ) then                       # generic
+if ( -d "$siteDir/bin" ) then                       # Generic
     _foamAddPath "$siteDir/bin"
 endif
-if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then   # version-specific
+if ( -d "$siteDir/$WM_PROJECT_VERSION/bin" ) then   # Version-specific
     _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
 endif
 unset siteDir
@@ -207,62 +207,54 @@ unsetenv MPFR_ARCH_PATH GMP_ARCH_PATH
 
 # Location of compiler installation
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-if ( ! $?foamCompiler ) then
-    set foamCompiler=system
-    echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-    echo "    foamCompiler not set, using '$foamCompiler'"
+if ( ! $?WM_COMPILER_TYPE ) then
+    set WM_COMPILER_TYPE=system
+    echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
+    echo "    WM_COMPILER_TYPE not set, using '$WM_COMPILER_TYPE'"
 endif
 
-switch ("$foamCompiler")
+switch ("$WM_COMPILER_TYPE")
 case OpenFOAM:
 case ThirdParty:
+    # Default versions of GMP, MPFR and MPC, overide as necessary
+    set gmp_version=gmp-5.1.2
+    set mpfr_version=mpfr-3.1.2
+    set mpc_version=mpc-1.0.1
     switch ("$WM_COMPILER")
     case Gcc:
     case Gcc48:
-        set gcc_version=gcc-4.8.4
-        set gmp_version=gmp-5.1.2
-        set mpfr_version=mpfr-3.1.2
-        set mpc_version=mpc-1.0.1
+        set gcc_version=gcc-4.8.5
         breaksw
     case Gcc45:
         set gcc_version=gcc-4.5.4
-        set gmp_version=gmp-5.1.2
-        set mpfr_version=mpfr-3.1.2
-        set mpc_version=mpc-1.0.1
         breaksw
     case Gcc46:
         set gcc_version=gcc-4.6.4
-        set gmp_version=gmp-5.1.2
-        set mpfr_version=mpfr-3.1.2
-        set mpc_version=mpc-1.0.1
         breaksw
     case Gcc47:
         set gcc_version=gcc-4.7.4
-        set gmp_version=gmp-5.1.2
-        set mpfr_version=mpfr-3.1.2
-        set mpc_version=mpc-1.0.1
         breaksw
     case Gcc49:
-        set gcc_version=gcc-4.9.2
-        set gmp_version=gmp-5.1.2
-        set mpfr_version=mpfr-3.1.2
-        set mpc_version=mpc-1.0.1
+        set gcc_version=gcc-4.9.3
         breaksw
     case Gcc51:
         set gcc_version=gcc-5.1.0
-        set gmp_version=gmp-5.1.2
-        set mpfr_version=mpfr-3.1.2
-        set mpc_version=mpc-1.0.1
+        breaksw
+    case Gcc52:
+        set gcc_version=gcc-5.2.0
+        breaksw
+    case Gcc53:
+        set gcc_version=gcc-5.3.0
         breaksw
     case Clang:
         # Using clang - not gcc
         setenv WM_CC 'clang'
         setenv WM_CXX 'clang++'
-        set clang_version=llvm-3.6.0
+        set clang_version=llvm-3.7.0
         breaksw
     default:
         echo
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
+        echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
         echo "    Unknown OpenFOAM compiler type '$WM_COMPILER'"
         echo "    Please check your settings"
         echo
@@ -270,7 +262,7 @@ case ThirdParty:
     endsw
 
     # Optional configuration tweaks:
-    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.csh`
+    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/compiler`
 
     if ( $?gcc_version ) then
         set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
@@ -283,11 +275,11 @@ case ThirdParty:
         # Check that the compiler directory can be found
         if ( ! -d "$gccDir" ) then
             echo
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
+            echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
             echo "    Cannot find $gccDir installation."
             echo "    Please install this compiler version or if you wish to" \
                  " use the system compiler,"
-            echo "    change the 'foamCompiler' setting to 'system'"
+            echo "    change the 'WM_COMPILER_TYPE' setting to 'system'"
             echo
         endif
 
@@ -319,11 +311,11 @@ case ThirdParty:
         # Check that the compiler directory can be found
         if ( ! -d "$clangDir" ) then
             echo
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
+            echo "Warning in $WM_PROJECT_DIR/etc/config.csh/settings:"
             echo "    Cannot find $clangDir installation."
             echo "    Please install this compiler version or if you wish to" \
                  " use the system compiler,"
-            echo "    change the 'foamCompiler' setting to 'system'"
+            echo "    change the 'WM_COMPILER_TYPE' setting to 'system'"
             echo
         endif
 
@@ -339,274 +331,16 @@ case system:
     breaksw
 
 default:
-    echo "Warn: foamCompiler='$foamCompiler' is unsupported"
+    echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported"
     echo "   treating as 'system' instead"
     breaksw
 endsw
 
 
-#
-# Add c++0x flags for external programs
-#
-if ( $?WM_CXXFLAGS ) then
-    switch ("$WM_COMPILER")
-    case Gcc*++0x:
-        setenv WM_CXXFLAGS "$WM_CXXFLAGS -std=c++0x"
-        breaksw
-    endsw
-endif
-
-
-
-# Communications library
-# ~~~~~~~~~~~~~~~~~~~~~~
-
-unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
-
-switch ("$WM_MPLIB")
-case SYSTEMOPENMPI:
-    # Use the system installed openmpi, get library directory via mpicc
-    setenv FOAM_MPI openmpi-system
-
-    set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
-
-    # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
-    # Include files and libraries.
-    setenv MPI_ARCH_PATH "${libDir:h}"
-
-    _foamAddLib     $libDir
-    unset libDir
-    breaksw
-
-case OPENMPI:
-    setenv FOAM_MPI openmpi-1.10.0
-    # Optional configuration tweaks:
-    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.csh`
-
-    setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
-
-    # Tell OpenMPI where to find its install directory
-    setenv OPAL_PREFIX $MPI_ARCH_PATH
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddMan     $MPI_ARCH_PATH/share/man
-    breaksw
-
-case SYSTEMMPI:
-    setenv FOAM_MPI mpi-system
-
-    if ( ! ($?MPI_ROOT) ) then
-        echo
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-        echo "    Please set the environment variable MPI_ROOT to point to" \
-             " the base folder for the system MPI in use."
-        echo "    Example:"
-        echo
-        echo "        setenv MPI_ROOT /opt/mpi"
-        echo
-    else
-        setenv MPI_ARCH_PATH $MPI_ROOT
-
-        if ( ! ($?MPI_ARCH_FLAGS) ) then
-            echo
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-            echo "    MPI_ARCH_FLAGS is not set. Example:"
-            echo
-            echo '        setenv MPI_ARCH_FLAGS "-DOMPI_SKIP_MPICXX"'
-            echo
-        endif
-
-        if ( ! ($?MPI_ARCH_INC) ) then
-            echo
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-            echo "    MPI_ARCH_INC is not set. Example:"
-            echo
-            echo '        setenv MPI_ARCH_INC "-isystem $MPI_ROOT/include"'
-            echo
-        endif
-
-        if ( ! ($?MPI_ARCH_LIBS) ) then
-            echo
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-            echo "    MPI_ARCH_LIBS is not set. Example:"
-            echo
-            echo '        setenv MPI_ARCH_LIBS "-L$MPI_ROOT/lib -lmpi"'
-            echo
-        endif
-    endif
-    breaksw
-
-case MPICH:
-    setenv FOAM_MPI mpich2-1.1.1p1
-    setenv MPI_HOME $WM_THIRD_PARTY_DIR/$FOAM_MPI
-    setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddMan     $MPI_ARCH_PATH/share/man
-    breaksw
-
-case MPICH-GM:
-    setenv FOAM_MPI mpich-gm
-    setenv MPI_ARCH_PATH /opt/mpi
-    setenv MPICH_PATH $MPI_ARCH_PATH
-    setenv GM_LIB_PATH /opt/gm/lib64
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddLib     $GM_LIB_PATH
-    breaksw
-
-case HPMPI:
-    setenv FOAM_MPI hpmpi
-    setenv MPI_HOME /opt/hpmpi
-    setenv MPI_ARCH_PATH $MPI_HOME
-
-    _foamAddPath $MPI_ARCH_PATH/bin
-
-    switch (`uname -m`)
-    case i686:
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
-        breaksw
-    case x86_64:
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
-        breaksw
-    case ia64:
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
-        breaksw
-    default:
-        echo Unknown processor type `uname -m` for Linux
-        breaksw
-    endsw
-    breaksw
-
-case MPI:
-    setenv FOAM_MPI mpi
-    setenv MPI_ARCH_PATH /opt/mpi
-    breaksw
-
-case FJMPI:
-    setenv FOAM_MPI fjmpi
-    setenv MPI_ARCH_PATH /opt/FJSVmpi2
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib/sparcv9
-    _foamAddLib     /opt/FSUNf90/lib/sparcv9
-    _foamAddLib     /opt/FJSVpnidt/lib
-    breaksw
-
-case QSMPI:
-    setenv FOAM_MPI qsmpi
-    setenv MPI_ARCH_PATH /usr/lib/mpi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib
-    breaksw
-
-case SGIMPI:
-    if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
-
-    if ( ! -d "$MPI_ROOT" ) then
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-        echo "    MPI_ROOT not a valid mpt installation directory."
-        echo "    Please set MPI_ROOT to the mpt installation directory."
-        echo "    (usually done by loading the mpt module)"
-        echo "    MPI_ROOT currently set to '$MPI_ROOT'"
-    endif
-
-    if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
-        setenv MPI_ROOT ${MPI_ROOT:h}
-    endif
-
-    setenv FOAM_MPI ${MPI_ROOT:t}
-    setenv MPI_ARCH_PATH $MPI_ROOT
-
-
-    if ($?FOAM_VERBOSE && $?prompt) then
-        echo "Using SGI MPT:"
-        echo "    MPI_ROOT : $MPI_ROOT"
-        echo "    FOAM_MPI : $FOAM_MPI"
-    endif
-
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib
-    breaksw
-
-case INTELMPI:
-    if ( ! $?MPI_ROOT) setenv MPI_ROOT /dummy
-
-    if ( ! -d "$MPI_ROOT" ) then
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.csh:"
-        echo "    MPI_ROOT not a valid mpt installation directory."
-        echo "    Please set MPI_ROOT to the mpt installation directory."
-        echo "    (usually done by loading the mpt module)"
-        echo "    MPI_ROOT currently set to '$MPI_ROOT'"
-    endif
-
-    if ( "${MPI_ROOT:h}/" == $MPI_ROOT ) then
-        setenv MPI_ROOT ${MPI_ROOT:h}
-    endif
-
-    setenv FOAM_MPI ${MPI_ROOT:t}
-    setenv MPI_ARCH_PATH $MPI_ROOT
-
-
-    if ($?FOAM_VERBOSE && $?prompt) then
-        echo "Using INTEL MPT:"
-        echo "    MPI_ROOT : $MPI_ROOT"
-        echo "    FOAM_MPI : $FOAM_MPI"
-    endif
-
-
-    _foamAddPath    $MPI_ARCH_PATH/bin64
-    _foamAddLib     $MPI_ARCH_PATH/lib64
-    breaksw
-
-default:
-    setenv FOAM_MPI dummy
-    breaksw
-endsw
-
-
-# Add (non-dummy) MPI implementation
-# Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
-if ( "$FOAM_MPI" != dummy ) then
-    _foamAddLib ${FOAM_LIBBIN}/${FOAM_MPI}:${FOAM_EXT_LIBBIN}/${FOAM_MPI}
-endif
-
-
-
-# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-if ( ! $?minBufferSize ) set minBufferSize=20000000
-
-if ( $?MPI_BUFFER_SIZE ) then
-    if ( $MPI_BUFFER_SIZE < $minBufferSize ) then
-        setenv MPI_BUFFER_SIZE $minBufferSize
-    endif
-else
-    setenv MPI_BUFFER_SIZE $minBufferSize
-endif
-
-
 # Cleanup environment:
 # ~~~~~~~~~~~~~~~~~~~~
 #- keep _foamAddPath _foamAddLib _foamAddMan
 unset minBufferSize
-unsetenv foamCompiler
+unsetenv WM_COMPILER_TYPE
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/unset.csh b/etc/config.csh/unset
similarity index 96%
rename from etc/config/unset.csh
rename to etc/config.csh/unset
index 928f08f442205fd2ca3b7b1c2ab9d74d53b9032d..38bedd2874fa2aaea5ffe403dbc09a87f7aa138c 100644
--- a/etc/config/unset.csh
+++ b/etc/config.csh/unset
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     etc/config/unset.csh
+#     etc/config.csh/unset
 #
 # Description
 #     Clear as many OpenFOAM environment settings as possible
@@ -191,4 +191,4 @@ unalias foam3rdParty
 unalias foamSite
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/CGAL.sh b/etc/config.sh/CGAL
similarity index 55%
rename from etc/config/CGAL.sh
rename to etc/config.sh/CGAL
index 7a59fc6e009f9a91999c29faa98ef7fdb5633454..4d0ca25ff636663c73b2dfc5415cd33648186a2d 100644
--- a/etc/config/CGAL.sh
+++ b/etc/config.sh/CGAL
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,36 +22,49 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/CGAL.sh
+#     etc/config.sh/CGAL
 #
 # Description
 #     Setup file for CGAL (& boost) include/libraries.
 #     Sourced from OpenFOAM-<VERSION>/etc/bashrc
+#
+#     If using system-wide installations for either one, use the following
+#     version settings:
+#
+#         boost_version=boost-system
+#         cgal_version=cgal-system
 #------------------------------------------------------------------------------
 
 boost_version=boost-system
 cgal_version=CGAL-4.7
 
-export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
-export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
-
-if [ "$FOAM_VERBOSE" -a "$PS1" ]
+if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ]
 then
-    echo "Using CGAL and boost" 1>&2
-    echo "    $cgal_version at $CGAL_ARCH_PATH" 1>&2
-    echo "    $boost_version at $BOOST_ARCH_PATH" 1>&2
-fi
 
-if [ -d "$CGAL_ARCH_PATH" ]
-then
-    _foamAddLib $CGAL_ARCH_PATH/lib
-fi
+    common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
 
-if [ -d "$BOOST_ARCH_PATH" ]
-then
-    _foamAddLib $BOOST_ARCH_PATH/lib
-fi
+    export BOOST_ARCH_PATH=$common_path/$boost_version
+    export CGAL_ARCH_PATH=$common_path/$cgal_version
+
+    if [ "$FOAM_VERBOSE" -a "$PS1" ]
+    then
+        echo "Using CGAL and boost" 1>&2
+        echo "    $cgal_version at $CGAL_ARCH_PATH" 1>&2
+        echo "    $boost_version at $BOOST_ARCH_PATH" 1>&2
+    fi
+
+    if [ -d "$CGAL_ARCH_PATH" -a "$cgal_version" != "cgal-system" ]
+    then
+        _foamAddLib $CGAL_ARCH_PATH/lib
+    fi
+
+    if [ -d "$BOOST_ARCH_PATH" -a "$boost_version" != "boost-system" ]
+    then
+        _foamAddLib $BOOST_ARCH_PATH/lib
+    fi
 
-unset boost_version cgal_version
+    unset boost_version cgal_version common_path
 
-# -----------------------------------------------------------------------------
+fi
+
+#------------------------------------------------------------------------------
diff --git a/etc/config/aliases.sh b/etc/config.sh/aliases
similarity index 90%
rename from etc/config/aliases.sh
rename to etc/config.sh/aliases
index 7f120a5caa4c44dd6893ed073011b6998eb5942b..44de3c70b593f41b2d2f3c27eb033fa77a1a2f61 100644
--- a/etc/config/aliases.sh
+++ b/etc/config.sh/aliases
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     etc/config/aliases.sh
+#     etc/config.sh/aliases
 #
 # Description
 #     Aliases for working with OpenFOAM
@@ -42,7 +42,7 @@ alias wmDP='wmSET WM_PRECISION_OPTION=DP'
 alias wmREFRESH='wmSET $FOAM_SETTINGS'
 
 # clear env
-alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh'
+alias wmUNSET='. $WM_PROJECT_DIR/etc/config.sh/unset'
 
 # Toggle wmakeScheduler on/off
 #  - also need to set WM_HOSTS
@@ -55,7 +55,7 @@ alias wmSchedOFF='unset WM_SCHEDULER'
 unset foamPV
 foamPV()
 {
-    . $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1
+    . $WM_PROJECT_DIR/etc/config.sh/paraview ParaView_VERSION=$1
     echo "paraview-$ParaView_VERSION  (major: $ParaView_MAJOR)" 1>&2
 }
 
@@ -86,4 +86,4 @@ else
     alias foamSite='cd $WM_PROJECT_INST_DIR/site'
 fi
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config.sh/compiler b/etc/config.sh/compiler
new file mode 100644
index 0000000000000000000000000000000000000000..63099a7923bfeec706ed98d8ac8c0b859b0ffeb7
--- /dev/null
+++ b/etc/config.sh/compiler
@@ -0,0 +1,82 @@
+#----------------------------------*-sh-*--------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+#     etc/config.sh/compiler
+#
+# Description
+#     Startup file for custom compiler versions for OpenFOAM
+#     Sourced from OpenFOAM-<VERSION>/etc/config.sh/settings
+#
+#------------------------------------------------------------------------------
+
+case "$WM_COMPILER_TYPE" in
+OpenFOAM | ThirdParty)
+
+    # Default versions of GMP, MPFR and MPC, override as necessary
+    gmp_version=gmp-5.1.2
+    mpfr_version=mpfr-3.1.2
+    mpc_version=mpc-1.0.1
+
+    case "$WM_COMPILER" in
+    Gcc | Gcc48)
+        gcc_version=gcc-4.8.5
+        ;;
+    Gcc45)
+        gcc_version=gcc-4.5.4
+        ;;
+    Gcc46)
+        gcc_version=gcc-4.6.4
+        ;;
+    Gcc47)
+        gcc_version=gcc-4.7.4
+        ;;
+    Gcc49)
+        gcc_version=gcc-4.9.3
+        ;;
+    Gcc51)
+        gcc_version=gcc-5.1.0
+        ;;
+    Gcc52)
+        gcc_version=gcc-5.2.0
+        ;;
+    Gcc53)
+        gcc_version=gcc-5.3.0
+        ;;
+    Clang)
+        # Using clang - not gcc
+        export WM_CC='clang'
+        export WM_CXX='clang++'
+        clang_version=llvm-3.7.0
+        ;;
+    *)
+        echo 1>&2
+        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/compiler:" 1>&2
+        echo "    Unknown OpenFOAM compiler type '$WM_COMPILER'" 1>&2
+        echo "    Please check your settings" 1>&2
+        echo 1>&2
+        ;;
+    esac
+    ;;
+
+esac
diff --git a/etc/config/ensight.sh b/etc/config.sh/ensight
similarity index 91%
rename from etc/config/ensight.sh
rename to etc/config.sh/ensight
index 75d7a3221e258892ac82802bbf9f6585911d52a5..aea759741a36d79a3db53f2ebb007e1b49127796 100644
--- a/etc/config/ensight.sh
+++ b/etc/config.sh/ensight
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/ensight.sh
+#     etc/config.sh/ensight
 #
 # Description
 #     Setup file for Ensight
@@ -57,4 +57,4 @@ else
     unset CEI_HOME
 fi
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/compiler.sh b/etc/config.sh/example/compiler
similarity index 61%
rename from etc/config/example/compiler.sh
rename to etc/config.sh/example/compiler
index 4b4fdd9d703d1c74d90746f9032a4f4fb23ee636..493cafb56ef064fe8973fb01ed8ead4da0bd1708 100644
--- a/etc/config/example/compiler.sh
+++ b/etc/config.sh/example/compiler
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,15 +22,22 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/compiler.sh
+#     config.sh/example/compiler
 #
 # Description
-#     Example of fine tuning ThirdParty compiler settings for OpenFOAM
-#     Sourced from OpenFOAM-<VERSION>/etc/config/settings.sh
+#     Example of fine tuning compiler versions and settings for OpenFOAM
+#     Sourced from OpenFOAM-<VERSION>/etc/config.sh/settings
 #
 #------------------------------------------------------------------------------
 
-# Modified compiler settings
+# First load the standard versions, if necessary
+foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config.sh/compiler \
+               2>/dev/null)
+[ $? -eq 0 ] && _foamSource $foamFile
+unset foamFile
+
+
+# Override compiler settings
 case "$WM_COMPILER" in
 Gcc46 | Gcc46++0x)
     gcc_version=gcc-4.6.0
@@ -44,6 +51,17 @@ Gcc45 | Gcc45++0x)
     mpfr_version=mpfr-2.4.2
     mpc_version=mpc-0.8.1
     ;;
+Gcc48u)
+    # Example of using the system GCC 4.8 in Ubuntu 15.10. Keep in mind you
+    # will also need to create respective directory in "wmake/rules"
+    export WM_CC='gcc-4.8'
+    export WM_CXX='g++-4.8'
+    ;;
+Icc)
+    # Example for ensuring that 3rd software uses the Icc compilers
+    export WM_CC='icc'
+    export WM_CXX='icpc'
+    ;;
 esac
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/openmpi.sh b/etc/config.sh/example/openmpi
similarity index 83%
rename from etc/config/example/openmpi.sh
rename to etc/config.sh/example/openmpi
index cbb6957a45608c346c888b2abd545738b37d1cf1..7fa099f841ff0c867a9b3ca10bca722d4224fdeb 100644
--- a/etc/config/example/openmpi.sh
+++ b/etc/config.sh/example/openmpi
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,15 +22,15 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/openmpi.sh
+#     config.sh/example/openmpi
 #
 # Description
 #     Example of fine tuning openmpi settings for OpenFOAM
-#     Sourced from OpenFOAM-<VERSION>/etc/config/settings.sh
+#     Sourced from OpenFOAM-<VERSION>/etc/config.sh/settings
 #
 #------------------------------------------------------------------------------
 
 # Modified openmpi settings
 export FOAM_MPI=openmpi-1.4.3
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/paraview.sh b/etc/config.sh/example/paraview
similarity index 79%
rename from etc/config/example/paraview.sh
rename to etc/config.sh/example/paraview
index 9586dc81dcd9fd672094dc1c6198729f1670cf1e..06caae46ccecd58ce8690e7d5537bace2f5bb455 100644
--- a/etc/config/example/paraview.sh
+++ b/etc/config.sh/example/paraview
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,10 +22,10 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/paraview.sh
+#     config.sh/example/paraview
 #
 # Description
-#     Example of chaining to the standard config/paraview.sh with a
+#     Example of chaining to the standard config.sh/paraview with a
 #     different ParaView_VERSION
 #
 # Note
@@ -35,12 +35,12 @@
 #------------------------------------------------------------------------------
 
 #
-# Use other (shipped) paraview.sh with a different ParaView_VERSION
+# Use other (shipped) paraview with a different ParaView_VERSION
 #
 
-foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.sh 2>/dev/null)
+foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config.sh/paraview 2>/dev/null)
 [ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.12.0
 
 unset foamFile
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/example/prefs.sh b/etc/config.sh/example/prefs.sh
similarity index 87%
rename from etc/config/example/prefs.sh
rename to etc/config.sh/example/prefs.sh
index eec63fc545b9f16d88e070b4e593e060b5ab8ab3..58b1fd76614c2c9237664da7ce1158e0f1244ee3 100644
--- a/etc/config/example/prefs.sh
+++ b/etc/config.sh/example/prefs.sh
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/example/prefs.sh
+#     config.sh/example/prefs.sh
 #
 # Description
 #     Preset variables for the OpenFOAM configuration - POSIX shell syntax.
@@ -38,7 +38,7 @@
 
 ## Specify OpenFOAM ThirdParty compiler
 ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# foamCompiler=ThirdParty
+#WM_COMPILER_TYPE=ThirdParty
 
 ## Specify compiler type
 ## ~~~~~~~~~~~~~~~~~~~~~
@@ -46,7 +46,7 @@
 
 ## Specify system openmpi
 ## ~~~~~~~~~~~~~~~~~~~~~~
-# export WM_MPLIB=SYSTEMOPENMPI
+#export WM_MPLIB=SYSTEMOPENMPI
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config.sh/functions b/etc/config.sh/functions
new file mode 100644
index 0000000000000000000000000000000000000000..dcec6549d474c5ac2eaeb6a943dd24c18162c8f0
--- /dev/null
+++ b/etc/config.sh/functions
@@ -0,0 +1,122 @@
+#----------------------------------*-sh-*--------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+#     etc/config.sh/functions
+#
+# Description
+#     Initialization script functions for the bashrc environment
+#     Sourced from OpenFOAM-<VERSION>/etc/config.sh/bashrc
+#
+#------------------------------------------------------------------------------
+
+if [ -z "$WM_BASH_FUNCTIONS" ]
+then
+
+    # Temporary environment variable for automatically (un)loading functions
+    WM_BASH_FUNCTIONS=loaded
+
+    # Source files, possibly with some verbosity
+    _foamSource()
+    {
+        while [ $# -ge 1 ]
+        do
+            [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1" 1>&2
+            . $1
+          shift
+        done
+    }
+
+    # Evaluate command-line parameters
+    _foamEval()
+    {
+        while [ $# -gt 0 ]
+        do
+            case "$1" in
+            -*)
+                # stray option (not meant for us here) -> get out
+                break
+                ;;
+            *=)
+                # name=       -> unset name
+                [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}" 1>&2
+                eval "unset ${1%=}"
+                ;;
+            *=*)
+                # name=value  -> export name=value
+                [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1" 1>&2
+                eval "export $1"
+                ;;
+            *)
+                # filename: source it
+                if [ -f "$1" ]
+                then
+                    _foamSource "$1"
+                else
+                    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"`
+                fi
+                ;;
+            esac
+            shift
+        done
+    }
+
+    # Prefix to PATH
+    _foamAddPath()
+    {
+        while [ $# -ge 1 ]
+        do
+            export PATH=$1:$PATH
+            shift
+        done
+    }
+
+    # Prefix to LD_LIBRARY_PATH
+    _foamAddLib()
+    {
+        while [ $# -ge 1 ]
+        do
+            export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
+            shift
+        done
+    }
+
+    # Prefix to MANPATH
+    _foamAddMan()
+    {
+        while [ $# -ge 1 ]
+        do
+            export MANPATH=$1:$MANPATH
+            shift
+        done
+    }
+
+else
+
+    # Cleanup environment:
+    # ~~~~~~~~~~~~~~~~~~~~
+    unset WM_BASH_FUNCTIONS
+    unset _foamAddPath _foamAddLib _foamAddMan
+    unset _foamSource _foamEval
+
+fi
diff --git a/etc/config/gperftools.sh b/etc/config.sh/gperftools
similarity index 89%
rename from etc/config/gperftools.sh
rename to etc/config.sh/gperftools
index f71a6cf2afe7e2dab5f3d33a5166cb13569fdd5c..06604630377dc675a9b858168757c2a7e7c05581 100644
--- a/etc/config/gperftools.sh
+++ b/etc/config.sh/gperftools
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/gperftools.sh
+#     etc/config.sh/gperftools
 #
 # Description
 #     Setup file for gperftools binaries libraries.
@@ -38,4 +38,4 @@ GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION
 export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH
 export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/metis.sh b/etc/config.sh/metis
similarity index 89%
rename from etc/config/metis.sh
rename to etc/config.sh/metis
index af7efde3acbf470c6c08da9c59ded6f4c050c2af..69618dd27f905601eedbb184ed7d88731c78edea 100644
--- a/etc/config/metis.sh
+++ b/etc/config.sh/metis
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/metis.sh
+#     etc/config.sh/metis
 #
 # Description
 #     Setup file for metis include/libraries.
@@ -36,4 +36,4 @@
 export METIS_VERSION=metis-5.1.0
 export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$METIS_VERSION
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi
new file mode 100644
index 0000000000000000000000000000000000000000..36b651e0fcc10923bf5fb3272d00491911bb53fe
--- /dev/null
+++ b/etc/config.sh/mpi
@@ -0,0 +1,275 @@
+#----------------------------------*-sh-*--------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+#     etc/config.sh/mpi
+#
+# Description
+#     Startup file for communications library (MPI) for OpenFOAM
+#     Sourced from OpenFOAM-<VERSION>/etc/bashrc
+#
+#------------------------------------------------------------------------------
+
+unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
+
+case "$WM_MPLIB" in
+SYSTEMOPENMPI)
+    # Use the system installed openmpi, get library directory via mpicc
+    export FOAM_MPI=openmpi-system
+
+    libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+
+    # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
+    # include files and libraries.
+    export MPI_ARCH_PATH="${libDir%/*}"
+
+    _foamAddLib     $libDir
+    unset libDir
+    ;;
+
+OPENMPI)
+    export FOAM_MPI=openmpi-1.10.2
+    # Optional configuration tweaks:
+    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/openmpi`
+
+    export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
+
+    # Tell OpenMPI where to find its install directory
+    export OPAL_PREFIX=$MPI_ARCH_PATH
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+
+    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
+    _foamAddLib     $MPI_ARCH_PATH/lib
+
+    _foamAddMan     $MPI_ARCH_PATH/share/man
+    ;;
+
+SYSTEMMPI)
+    export FOAM_MPI=mpi-system
+
+    if [ -z "$MPI_ROOT" ]
+    then
+        echo 1>&2
+        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+        echo "    Please set the environment variable MPI_ROOT to point to" \
+             " the base folder for the system MPI in use." 1>&2
+        echo "    Example:" 1>&2
+        echo 1>&2
+        echo "        export MPI_ROOT=/opt/mpi" 1>&2
+        echo 1>&2
+    else
+        export MPI_ARCH_PATH=$MPI_ROOT
+
+        if [ -z "$MPI_ARCH_FLAGS" ]
+        then
+            echo 1>&2
+            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+            echo "    MPI_ARCH_FLAGS is not set. Example:" 1>&2
+            echo 1>&2
+            echo "        export MPI_ARCH_FLAGS=\"-DOMPI_SKIP_MPICXX\"" 1>&2
+            echo 1>&2
+        fi
+
+        if [ -z "$MPI_ARCH_INC" ]
+        then
+            echo 1>&2
+            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+            echo "    MPI_ARCH_INC is not set. Example:" 1>&2
+            echo 1>&2
+            echo "        export MPI_ARCH_INC=\"-isystem \$MPI_ROOT/include\"" 1>&2
+            echo 1>&2
+        fi
+
+        if [ -z "$MPI_ARCH_LIBS" ]
+        then
+            echo 1>&2
+            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+            echo "    MPI_ARCH_LIBS is not set. Example:" 1>&2
+            echo 1>&2
+            echo "        export MPI_ARCH_LIBS=\"-L\$MPI_ROOT/lib -lmpi\"" 1>&2
+            echo 1>&2
+        fi
+    fi
+    ;;
+
+MPICH)
+    export FOAM_MPI=mpich2-1.1.1p1
+    export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
+    export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+
+    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
+    _foamAddLib     $MPI_ARCH_PATH/lib
+
+    _foamAddMan     $MPI_ARCH_PATH/share/man
+    ;;
+
+MPICH-GM)
+    export FOAM_MPI=mpich-gm
+    export MPI_ARCH_PATH=/opt/mpi
+    export MPICH_PATH=$MPI_ARCH_PATH
+    export GM_LIB_PATH=/opt/gm/lib64
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+
+    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
+    _foamAddLib     $MPI_ARCH_PATH/lib
+
+    _foamAddLib     $GM_LIB_PATH
+    ;;
+
+HPMPI)
+    export FOAM_MPI=hpmpi
+    export MPI_HOME=/opt/hpmpi
+    export MPI_ARCH_PATH=$MPI_HOME
+
+    _foamAddPath $MPI_ARCH_PATH/bin
+
+    case `uname -m` in
+    i686)
+        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
+        ;;
+
+    x86_64)
+        _foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
+        ;;
+    ia64)
+        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
+        ;;
+    *)
+        echo Unknown processor type `uname -m` 1>&2
+        ;;
+    esac
+    ;;
+
+MPI)
+    export FOAM_MPI=mpi
+    export MPI_ARCH_PATH=/opt/mpi
+    ;;
+
+FJMPI)
+    export FOAM_MPI=fjmpi
+    export MPI_ARCH_PATH=/opt/FJSVmpi2
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+    _foamAddLib     $MPI_ARCH_PATH/lib/sparcv9
+    _foamAddLib     /opt/FSUNf90/lib/sparcv9
+    _foamAddLib     /opt/FJSVpnidt/lib
+    ;;
+
+QSMPI)
+    export FOAM_MPI=qsmpi
+    export MPI_ARCH_PATH=/usr/lib/mpi
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+    _foamAddLib     $MPI_ARCH_PATH/lib
+    ;;
+
+SGIMPI)
+    # No trailing slash
+    [ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
+
+    export FOAM_MPI="${MPI_ROOT##*/}"
+    export MPI_ARCH_PATH=$MPI_ROOT
+
+    if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
+    then
+        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+        echo "    MPI_ROOT not a valid mpt installation directory or ending" \
+             " in a '/'." 1>&2
+        echo "    Please set MPI_ROOT to the mpt installation directory." 1>&2
+        echo "    MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
+    fi
+
+    if [ "$FOAM_VERBOSE" -a "$PS1" ]
+    then
+        echo "Using SGI MPT:" 1>&2
+        echo "    MPI_ROOT : $MPI_ROOT" 1>&2
+        echo "    FOAM_MPI : $FOAM_MPI" 1>&2
+    fi
+
+    _foamAddPath    $MPI_ARCH_PATH/bin
+    _foamAddLib     $MPI_ARCH_PATH/lib
+    ;;
+
+INTELMPI)
+    # No trailing slash
+    [ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
+
+    export FOAM_MPI="${MPI_ROOT##*/}"
+    export MPI_ARCH_PATH=$MPI_ROOT
+
+    if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
+    then
+        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+        echo "    MPI_ROOT not a valid mpt installation directory or ending" \
+             " in a '/'." 1>&2
+        echo "    Please set MPI_ROOT to the mpt installation directory." 1>&2
+        echo "    MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
+    fi
+
+    if [ "$FOAM_VERBOSE" -a "$PS1" ]
+    then
+        echo "Using INTEL MPI:" 1>&2
+        echo "    MPI_ROOT : $MPI_ROOT" 1>&2
+        echo "    FOAM_MPI : $FOAM_MPI" 1>&2
+    fi
+
+    _foamAddPath    $MPI_ARCH_PATH/bin64
+    _foamAddLib     $MPI_ARCH_PATH/lib64
+    ;;
+*)
+    export FOAM_MPI=dummy
+    ;;
+esac
+
+# Add (non-dummy) MPI implementation
+# Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
+if [ "$FOAM_MPI" != dummy ]
+then
+    _foamAddLib $FOAM_LIBBIN/$FOAM_MPI:$FOAM_EXT_LIBBIN/$FOAM_MPI
+fi
+
+
+
+# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+: ${minBufferSize:=20000000}
+
+if [ "${MPI_BUFFER_SIZE:=$minBufferSize}" -lt $minBufferSize ]
+then
+    MPI_BUFFER_SIZE=$minBufferSize
+fi
+export MPI_BUFFER_SIZE
+
+
+# Cleanup environment:
+# ~~~~~~~~~~~~~~~~~~~~
+unset minBufferSize
+
+#------------------------------------------------------------------------------
diff --git a/etc/config/paraview.sh b/etc/config.sh/paraview
similarity index 85%
rename from etc/config/paraview.sh
rename to etc/config.sh/paraview
index 6b34500881819ade527221b37cd64d84097294a5..b6216f0579788ab76f80f59ea920897329555ecd 100644
--- a/etc/config/paraview.sh
+++ b/etc/config.sh/paraview
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,10 +22,10 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/paraview.sh
+#     etc/config.sh/paraview
 #
 # Description
-#     Setup file for paraview-[3-4].x
+#     Setup file for paraview-[3-5].x
 #     Sourced from OpenFOAM-<VERSION>/etc/bashrc or from foamPV alias
 #
 # Note
@@ -34,16 +34,22 @@
 #------------------------------------------------------------------------------
 
 # clean the PATH
-cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"` && PATH="$cleaned"
+cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \
+        "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- \
+        $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-" \
+        ) \
+        && PATH="$cleaned"
 
 # determine the cmake to be used
 unset CMAKE_HOME
-for cmake in cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1
+for cmake in cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 \
+             cmake-2.8.1
 do
     cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
     if [ -r $cmake ]
     then
         export CMAKE_HOME=$cmake
+        export CMAKE_ROOT=$cmake
         export PATH=$CMAKE_HOME/bin:$PATH
         break
     fi
@@ -55,7 +61,8 @@ done
 #export ParaView_VERSION=4.0.1
 #export ParaView_VERSION=4.1.0
 #export ParaView_VERSION=4.3.1
-export ParaView_VERSION=4.4.0
+#export ParaView_VERSION=4.4.0
+export ParaView_VERSION=5.0.0
 export ParaView_MAJOR=detect
 
 
@@ -87,7 +94,8 @@ case "$ParaView_VERSION" in
 
 [0-9]*)
     # extract major from the version
-    ParaView_MAJOR=`echo $ParaView_VERSION | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`
+    ParaView_MAJOR=$(echo $ParaView_VERSION | \
+                   sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
     ;;
 esac
 export ParaView_VERSION ParaView_MAJOR
@@ -101,16 +109,12 @@ export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraview
 if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
 then
     export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR
-    if [ ! -d $ParaView_INCLUDE_DIR -a -d $ParaView_DIR/include/paraview ]
+    if [ ! -d $ParaView_INCLUDE_DIR -a -d $ParaView_DIR/include/paraview-3.0 ]
     then
-        export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview
+        export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-3.0
     fi
 
     ParaView_LIB_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR
-    if [ ! -d $ParaView_LIB_DIR -a -d $ParaView_DIR/lib/paraview ]
-    then
-        ParaView_LIB_DIR=$ParaView_DIR/lib/paraview
-    fi
 
     export PATH=$ParaView_DIR/bin:$PATH
     export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH
@@ -143,4 +147,4 @@ fi
 unset _foamParaviewEval
 unset cleaned cmake paraviewInstDir paraviewPython
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config/scotch.sh b/etc/config.sh/scotch
similarity index 90%
rename from etc/config/scotch.sh
rename to etc/config.sh/scotch
index e40e1c7bdfa8ea96addeab61786141e6d5d996b8..68c242e6abd6c506b62beb7f5460cb78c2a66a48 100644
--- a/etc/config/scotch.sh
+++ b/etc/config.sh/scotch
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     config/scotch.sh
+#     etc/config.sh/scotch
 #
 # Description
 #     Setup file for scotch include/libraries.
@@ -36,4 +36,4 @@
 export SCOTCH_VERSION=scotch_6.0.3
 export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_LABEL_OPTION/$SCOTCH_VERSION
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/etc/config.sh/settings b/etc/config.sh/settings
new file mode 100644
index 0000000000000000000000000000000000000000..f53af4b162a9d5de547298f4caccae2ed0b89563
--- /dev/null
+++ b/etc/config.sh/settings
@@ -0,0 +1,289 @@
+#----------------------------------*-sh-*--------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# File
+#     etc/config.sh/settings
+#
+# Description
+#     Startup file for OpenFOAM
+#     Sourced from OpenFOAM-<VERSION>/etc/bashrc
+#
+#------------------------------------------------------------------------------
+
+# Set environment variables according to system type
+export WM_ARCH=`uname -s`
+
+case "$WM_ARCH" in
+Linux)
+    WM_ARCH=linux
+
+    # Compiler specifics
+    case `uname -m` in
+        i686)
+            export WM_ARCH_OPTION=32
+        ;;
+
+    x86_64)
+        case "$WM_ARCH_OPTION" in
+        32)
+            export WM_COMPILER_ARCH=64
+            export WM_CC='gcc'
+            export WM_CXX='g++'
+            export WM_CFLAGS='-m32 -fPIC'
+            export WM_CXXFLAGS='-m32 -fPIC -std=c++0x'
+            export WM_LDFLAGS='-m32'
+            ;;
+        64)
+            WM_ARCH=linux64
+            export WM_COMPILER_LIB_ARCH=64
+            export WM_CC='gcc'
+            export WM_CXX='g++'
+            export WM_CFLAGS='-m64 -fPIC'
+            export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
+            export WM_LDFLAGS='-m64'
+            ;;
+        *)
+            echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"\
+                 1>&2
+            ;;
+        esac
+        ;;
+
+    ia64)
+        WM_ARCH=linuxIA64
+        export WM_COMPILER=I64
+        ;;
+
+    armv7l)
+        WM_ARCH=linuxARM7
+        export WM_COMPILER_LIB_ARCH=32
+        export WM_CC='gcc'
+        export WM_CXX='g++'
+        export WM_CFLAGS='-fPIC'
+        export WM_CXXFLAGS='-fPIC -std=c++0x'
+        export WM_LDFLAGS=
+        ;;
+
+    ppc64)
+        WM_ARCH=linuxPPC64
+        export WM_COMPILER_LIB_ARCH=64
+        export WM_CC='gcc'
+        export WM_CXX='g++'
+        export WM_CFLAGS='-m64 -fPIC'
+        export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
+        export WM_LDFLAGS='-m64'
+        ;;
+
+    ppc64le)
+        WM_ARCH=linuxPPC64le
+        export WM_COMPILER_LIB_ARCH=64
+        export WM_CC='gcc'
+        export WM_CXX='g++'
+        export WM_CFLAGS='-m64 -fPIC'
+        export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
+        export WM_LDFLAGS='-m64'
+        ;;
+
+    *)
+        echo Unknown processor type `uname -m` for Linux 1>&2
+        ;;
+    esac
+    ;;
+
+SunOS)
+    WM_ARCH=SunOS64
+    WM_MPLIB=FJMPI
+    export WM_COMPILER_LIB_ARCH=64
+    export WM_CC='gcc'
+    export WM_CXX='g++'
+    export WM_CFLAGS='-mabi=64 -fPIC'
+    export WM_CXXFLAGS='-mabi=64 -fPIC -std=c++0x'
+    export WM_LDFLAGS='-mabi=64 -G0'
+    ;;
+
+*)    # An unsupported operating system
+    /bin/cat <<USAGE 1>&2
+
+    Your "$WM_ARCH" operating system is not supported by this release
+    of OpenFOAM. For further assistance, please contact www.OpenFOAM.com
+
+USAGE
+    ;;
+esac
+
+
+#------------------------------------------------------------------------------
+
+# Location of the jobControl directory
+export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl
+
+# wmake configuration
+export WM_DIR=$WM_PROJECT_DIR/wmake
+export WM_LINK_LANGUAGE=c++
+export WM_LABEL_OPTION=Int$WM_LABEL_SIZE
+export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION
+
+# Base executables/libraries
+export FOAM_APPBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
+export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
+
+# External (ThirdParty) libraries
+export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
+
+# Site-specific directory
+siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}"
+
+# Shared site executables/libraries
+# Similar naming convention as ~OpenFOAM expansion
+export FOAM_SITE_APPBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
+export FOAM_SITE_LIBBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
+
+# User executables/libraries
+export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
+export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib
+
+# DynamicCode templates
+# - default location is the "~OpenFOAM/codeTemplates/dynamicCode" expansion
+# export FOAM_CODE_TEMPLATES=$WM_PROJECT_DIR/etc/codeTemplates/dynamicCode
+
+# Convenience
+export FOAM_ETC=$WM_PROJECT_DIR/etc
+export FOAM_APP=$WM_PROJECT_DIR/applications
+export FOAM_SRC=$WM_PROJECT_DIR/src
+export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
+export FOAM_UTILITIES=$FOAM_APP/utilities
+export FOAM_SOLVERS=$FOAM_APP/solvers
+export FOAM_RUN=$WM_PROJECT_USER_DIR/run
+
+# Add wmake to the path - not required for runtime-only environment
+[ -d "$WM_DIR" ] && PATH=$WM_DIR:$PATH
+# Add OpenFOAM scripts to the path
+export PATH=$WM_PROJECT_DIR/bin:$PATH
+
+# Add site-specific scripts to path - only if they exist
+if [ -d "$siteDir/bin" ]                        # Generic
+then
+    _foamAddPath "$siteDir/bin"
+fi
+if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ]    # Version-specific
+then
+    _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
+fi
+unset siteDir
+
+_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
+# Make sure to pick up dummy versions of external libraries last
+_foamAddLib  $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$FOAM_LIBBIN/dummy
+
+# Compiler settings
+# ~~~~~~~~~~~~~~~~~
+unset gcc_version gmp_version mpfr_version mpc_version
+unset MPFR_ARCH_PATH GMP_ARCH_PATH
+
+# Location of compiler installation
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+if [ -z "$WM_COMPILER_TYPE" ]
+then
+    WM_COMPILER_TYPE=system
+    echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+    echo "    WM_COMPILER_TYPE not set, using '$WM_COMPILER_TYPE'" 1>&2
+fi
+
+# Load configured compiler versions, regardless of the compiler type
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler`
+
+case "$WM_COMPILER_TYPE" in
+OpenFOAM | ThirdParty)
+
+    if [ -n "$gcc_version" ]
+    then
+        gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
+        gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
+        mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
+        mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
+
+        # Check that the compiler directory can be found
+        [ -d "$gccDir" ] || {
+            echo 1>&2
+            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+            echo "    Cannot find $gccDir installation." 1>&2
+            echo "    Please install this compiler version or if you wish to" \
+                 " use the system compiler," 1>&2
+            echo "    change the 'WM_COMPILER_TYPE' setting to 'system'" 1>&2
+            echo
+        }
+
+        _foamAddMan     $gccDir/man
+        _foamAddPath    $gccDir/bin
+
+        # Add compiler libraries to run-time environment
+        _foamAddLib     $gccDir/lib$WM_COMPILER_LIB_ARCH
+
+        # Add gmp/mpfr libraries to run-time environment
+        _foamAddLib     $gmpDir/lib
+        _foamAddLib     $mpfrDir/lib
+
+        # Add mpc libraries (not need for older gcc) to run-time environment
+        if [ -n "$mpc_version" ]
+        then
+            _foamAddLib     $mpcDir/lib
+        fi
+
+        # Used by boost/CGAL:
+        export MPFR_ARCH_PATH=$mpfrDir
+        export GMP_ARCH_PATH=$gmpDir
+    fi
+    unset gcc_version gccDir
+    unset gmp_version gmpDir  mpfr_version mpfrDir  mpc_version mpcDir
+
+    if [ -n "$clang_version" ]
+    then
+        clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version
+
+        # Check that the compiler directory can be found
+        [ -d "$clangDir" ] || {
+            echo 1>&2
+            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
+            echo "    Cannot find $clangDir installation." 1>&2
+            echo "    Please install this compiler version or if you wish to" \
+                 " use the system compiler," 1>&2
+            echo "    change the 'WM_COMPILER_TYPE' setting to 'system'" 1>&2
+            echo 1>&2
+        }
+
+        _foamAddMan     $clangDir/share/man
+        _foamAddPath    $clangDir/bin
+    fi
+    unset clang_version clangDir
+    ;;
+system)
+    # Use system compiler
+    ;;
+*)
+    echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported" 1>&2
+    echo "   treating as 'system' instead" 1>&2
+    ;;
+esac
+
+#------------------------------------------------------------------------------
diff --git a/etc/config/unset.sh b/etc/config.sh/unset
similarity index 96%
rename from etc/config/unset.sh
rename to etc/config.sh/unset
index 59428c5d6bb2765366eb0000b61d47105b868db6..af44571f03ae89590c64c049bfc7a89c69686afd 100644
--- a/etc/config/unset.sh
+++ b/etc/config.sh/unset
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     etc/config/unset.sh
+#     etc/config.sh/unset
 #
 # Description
 #     Clear as many OpenFOAM environment settings as possible
@@ -170,4 +170,4 @@ unalias foam3rdParty
 unalias foamSite
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/config/README b/etc/config/README
deleted file mode 100644
index b63135f1413ef168bfb6cf0d1041a48a83308e34..0000000000000000000000000000000000000000
--- a/etc/config/README
+++ /dev/null
@@ -1,54 +0,0 @@
-The main OpenFOAM settings are located in the parent etc/ directory
-
-* bashrc, cshrc
-  entry point for sourcing
-
-* prefs.csh, prefs.sh
-  these files are untracked and can be used for some site-defined
-  settings
-
-
-The etc/config/ directory contains various configuration files in
-sh/csh variants:
-
-* settings.csh, settings.sh
-  core settings
-
-* aliases.csh, aliases.sh
-  aliases for interactive shells
-
-* unset.csh, unset.sh
-  sourced to clear as many OpenFOAM environment settings as possible
-
-
-* ensight.csh, ensight.sh
-  application settings for EnSight
-
-* paraview.csh, paraview.sh
-  application settings for ParaView
-
-* scotch.sh
-  application settings for compiling against scotch
-
-* metis.sh
-  application settings for compiling against metis 5
-
----
-
-The config/example directory contains various example configuration files
-in sh/csh variants
-
-* compiler.csh, compiler.sh
-  an example of fine tuning ThirdParty compiler settings for OpenFOAM
-
-* openmpi.csh, openmpi.sh
-  an example of fine tuning openmpi settings for OpenFOAM
-
-* paraview.csh, paraview.sh
-  an example of chaining to the standard config/paraview.sh with a
-  different ParaView_VERSION
-
-* prefs.csh, prefs.sh
-  an example of supplying alternative site-defined settings
-
----
diff --git a/etc/config/settings.sh b/etc/config/settings.sh
deleted file mode 100644
index 99b4bd5966b18ba4b8a34c80d315f4aefdceaec2..0000000000000000000000000000000000000000
--- a/etc/config/settings.sh
+++ /dev/null
@@ -1,631 +0,0 @@
-#----------------------------------*-sh-*--------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# File
-#     etc/config/settings.sh
-#
-# Description
-#     Startup file for OpenFOAM
-#     Sourced from OpenFOAM-<VERSION>/etc/bashrc
-#
-#------------------------------------------------------------------------------
-
-# Prefix to PATH
-_foamAddPath()
-{
-    while [ $# -ge 1 ]
-    do
-        export PATH=$1:$PATH
-        shift
-    done
-}
-
-# Prefix to LD_LIBRARY_PATH
-_foamAddLib()
-{
-    while [ $# -ge 1 ]
-    do
-        export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
-        shift
-    done
-}
-
-# Prefix to MANPATH
-_foamAddMan()
-{
-    while [ $# -ge 1 ]
-    do
-        export MANPATH=$1:$MANPATH
-        shift
-    done
-}
-
-#------------------------------------------------------------------------------
-# Set environment variables according to system type
-export WM_ARCH=`uname -s`
-
-case "$WM_ARCH" in
-Linux)
-    WM_ARCH=linux
-
-    # compiler specifics
-    case `uname -m` in
-        i686)
-            export WM_ARCH_OPTION=32
-        ;;
-
-    x86_64)
-        case "$WM_ARCH_OPTION" in
-        32)
-            export WM_COMPILER_ARCH=64
-            export WM_CC='gcc'
-            export WM_CXX='g++'
-            export WM_CFLAGS='-m32 -fPIC'
-            export WM_CXXFLAGS='-m32 -fPIC'
-            export WM_LDFLAGS='-m32'
-            ;;
-        64)
-            WM_ARCH=linux64
-            export WM_COMPILER_LIB_ARCH=64
-            export WM_CC='gcc'
-            export WM_CXX='g++'
-            export WM_CFLAGS='-m64 -fPIC'
-            export WM_CXXFLAGS='-m64 -fPIC'
-            export WM_LDFLAGS='-m64'
-            ;;
-        *)
-            echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"\
-                 1>&2
-            ;;
-        esac
-        ;;
-
-    ia64)
-        WM_ARCH=linuxIA64
-        export WM_COMPILER=I64
-        ;;
-
-    armv7l)
-        WM_ARCH=linuxARM7
-        export WM_COMPILER_LIB_ARCH=32
-        export WM_CC='gcc'
-        export WM_CXX='g++'
-        export WM_CFLAGS='-fPIC'
-        export WM_CXXFLAGS='-fPIC'
-        export WM_LDFLAGS=
-        ;;
-
-    ppc64)
-        WM_ARCH=linuxPPC64
-        export WM_COMPILER_LIB_ARCH=64
-        export WM_CC='gcc'
-        export WM_CXX='g++'
-        export WM_CFLAGS='-m64 -fPIC'
-        export WM_CXXFLAGS='-m64 -fPIC'
-        export WM_LDFLAGS='-m64'
-        ;;
-
-    ppc64le)
-        WM_ARCH=linuxPPC64le
-        export WM_COMPILER_LIB_ARCH=64
-        export WM_CC='gcc'
-        export WM_CXX='g++'
-        export WM_CFLAGS='-m64 -fPIC'
-        export WM_CXXFLAGS='-m64 -fPIC'
-        export WM_LDFLAGS='-m64'
-        ;;
-
-    *)
-        echo Unknown processor type `uname -m` for Linux 1>&2
-        ;;
-    esac
-    ;;
-
-SunOS)
-    WM_ARCH=SunOS64
-    WM_MPLIB=FJMPI
-    export WM_COMPILER_LIB_ARCH=64
-    export WM_CC='gcc'
-    export WM_CXX='g++'
-    export WM_CFLAGS='-mabi=64 -fPIC'
-    export WM_CXXFLAGS='-mabi=64 -fPIC'
-    export WM_LDFLAGS='-mabi=64 -G0'
-    ;;
-
-*)    # an unsupported operating system
-    /bin/cat <<USAGE 1>&2
-
-    Your "$WM_ARCH" operating system is not supported by this release
-    of OpenFOAM. For further assistance, please contact www.OpenFOAM.com
-
-USAGE
-    ;;
-esac
-
-
-#------------------------------------------------------------------------------
-
-# Location of the jobControl directory
-export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl
-
-# wmake configuration
-export WM_DIR=$WM_PROJECT_DIR/wmake
-export WM_LINK_LANGUAGE=c++
-export WM_LABEL_OPTION=Int$WM_LABEL_SIZE
-export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION
-
-# Base executables/libraries
-export FOAM_APPBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
-export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
-
-# External (ThirdParty) libraries
-export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_OPTIONS/lib
-
-# Site-specific directory
-siteDir="${WM_PROJECT_SITE:-$WM_PROJECT_INST_DIR/site}"
-
-# Shared site executables/libraries
-# Similar naming convention as ~OpenFOAM expansion
-export FOAM_SITE_APPBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
-export FOAM_SITE_LIBBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
-
-# User executables/libraries
-export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
-export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib
-
-# DynamicCode templates
-# - default location is the "~OpenFOAM/codeTemplates/dynamicCode" expansion
-# export FOAM_CODE_TEMPLATES=$WM_PROJECT_DIR/etc/codeTemplates/dynamicCode
-
-# Convenience
-export FOAM_ETC=$WM_PROJECT_DIR/etc
-export FOAM_APP=$WM_PROJECT_DIR/applications
-export FOAM_SRC=$WM_PROJECT_DIR/src
-export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
-export FOAM_UTILITIES=$FOAM_APP/utilities
-export FOAM_SOLVERS=$FOAM_APP/solvers
-export FOAM_RUN=$WM_PROJECT_USER_DIR/run
-
-# Add wmake to the path - not required for runtime-only environment
-[ -d "$WM_DIR" ] && PATH=$WM_DIR:$PATH
-# Add OpenFOAM scripts to the path
-export PATH=$WM_PROJECT_DIR/bin:$PATH
-
-# add site-specific scripts to path - only if they exist
-if [ -d "$siteDir/bin" ]                        # generic
-then
-    _foamAddPath "$siteDir/bin"
-fi
-if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ]    # version-specific
-then
-    _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
-fi
-unset siteDir
-
-_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
-# Make sure to pick up dummy versions of external libraries last
-_foamAddLib  $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_EXT_LIBBIN:$FOAM_LIBBIN/dummy
-
-# Compiler settings
-# ~~~~~~~~~~~~~~~~~
-unset gcc_version gmp_version mpfr_version mpc_version
-unset MPFR_ARCH_PATH GMP_ARCH_PATH
-
-# Location of compiler installation
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-if [ -z "$foamCompiler" ]
-then
-    foamCompiler=system
-    echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-    echo "    foamCompiler not set, using '$foamCompiler'" 1>&2
-fi
-
-case "${foamCompiler}" in
-OpenFOAM | ThirdParty)
-    case "$WM_COMPILER" in
-    Gcc | Gcc48)
-        gcc_version=gcc-4.8.4
-        gmp_version=gmp-5.1.2
-        mpfr_version=mpfr-3.1.2
-        mpc_version=mpc-1.0.1
-        ;;
-    Gcc45)
-        gcc_version=gcc-4.5.4
-        gmp_version=gmp-5.1.2
-        mpfr_version=mpfr-3.1.2
-        mpc_version=mpc-1.0.1
-        ;;
-    Gcc46)
-        gcc_version=gcc-4.6.4
-        gmp_version=gmp-5.1.2
-        mpfr_version=mpfr-3.1.2
-        mpc_version=mpc-1.0.1
-        ;;
-    Gcc47)
-        gcc_version=gcc-4.7.4
-        gmp_version=gmp-5.1.2
-        mpfr_version=mpfr-3.1.2
-        mpc_version=mpc-1.0.1
-        ;;
-    Gcc49)
-        gcc_version=gcc-4.9.2
-        gmp_version=gmp-5.1.2
-        mpfr_version=mpfr-3.1.2
-        mpc_version=mpc-1.0.1
-        ;;
-    Gcc51)
-        gcc_version=gcc-5.1.0
-        gmp_version=gmp-5.1.2
-        mpfr_version=mpfr-3.1.2
-        mpc_version=mpc-1.0.1
-        ;;
-    Clang)
-        # using clang - not gcc
-        export WM_CC='clang'
-        export WM_CXX='clang++'
-        clang_version=llvm-3.6.0
-        ;;
-    *)
-        echo 1>&2
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-        echo "    Unknown OpenFOAM compiler type '$WM_COMPILER'" 1>&2
-        echo "    Please check your settings" 1>&2
-        echo 1>&2
-        ;;
-    esac
-
-    # Optional configuration tweaks:
-    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.sh`
-
-    if [ -n "$gcc_version" ]
-    then
-        gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
-        gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
-        mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
-        mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
-
-        # Check that the compiler directory can be found
-        [ -d "$gccDir" ] || {
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-            echo "    Cannot find $gccDir installation." 1>&2
-            echo "    Please install this compiler version or if you wish to" \
-                 " use the system compiler," 1>&2
-            echo "    change the 'foamCompiler' setting to 'system'" 1>&2
-            echo
-        }
-
-        _foamAddMan     $gccDir/man
-        _foamAddPath    $gccDir/bin
-
-        # Add compiler libraries to run-time environment
-        _foamAddLib     $gccDir/lib$WM_COMPILER_LIB_ARCH
-
-        # Add gmp/mpfr libraries to run-time environment
-        _foamAddLib     $gmpDir/lib
-        _foamAddLib     $mpfrDir/lib
-
-        # Add mpc libraries (not need for older gcc) to run-time environment
-        if [ -n "$mpc_version" ]
-        then
-            _foamAddLib     $mpcDir/lib
-        fi
-
-        # Used by boost/CGAL:
-        export MPFR_ARCH_PATH=$mpfrDir
-        export GMP_ARCH_PATH=$gmpDir
-    fi
-    unset gcc_version gccDir
-    unset gmp_version gmpDir  mpfr_version mpfrDir  mpc_version mpcDir
-
-    if [ -n "$clang_version" ]
-    then
-        clangDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$clang_version
-
-        # Check that the compiler directory can be found
-        [ -d "$clangDir" ] || {
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-            echo "    Cannot find $clangDir installation." 1>&2
-            echo "    Please install this compiler version or if you wish to" \
-                 " use the system compiler," 1>&2
-            echo "    change the 'foamCompiler' setting to 'system'" 1>&2
-            echo 1>&2
-        }
-
-        _foamAddMan     $clangDir/share/man
-        _foamAddPath    $clangDir/bin
-    fi
-    unset clang_version clangDir
-    ;;
-system)
-    # Use system compiler
-    ;;
-*)
-    echo "Warn: foamCompiler='$foamCompiler' is unsupported" 1>&2
-    echo "   treating as 'system' instead" 1>&2
-    ;;
-esac
-
-
-#
-# Add c++0x flags for external programs
-#
-if [ -n "$WM_CXXFLAGS" ]
-then
-    case "$WM_COMPILER" in
-    Gcc*++0x)
-        WM_CXXFLAGS="$WM_CXXFLAGS -std=c++0x"
-        ;;
-    esac
-fi
-
-
-
-# Communications library
-# ~~~~~~~~~~~~~~~~~~~~~~
-
-unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
-
-case "$WM_MPLIB" in
-SYSTEMOPENMPI)
-    # Use the system installed openmpi, get library directory via mpicc
-    export FOAM_MPI=openmpi-system
-
-    libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
-
-    # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
-    # include files and libraries.
-    export MPI_ARCH_PATH="${libDir%/*}"
-
-    _foamAddLib     $libDir
-    unset libDir
-    ;;
-
-OPENMPI)
-    export FOAM_MPI=openmpi-1.10.0
-    # Optional configuration tweaks:
-    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.sh`
-
-    export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
-
-    # Tell OpenMPI where to find its install directory
-    export OPAL_PREFIX=$MPI_ARCH_PATH
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddMan     $MPI_ARCH_PATH/share/man
-    ;;
-
-SYSTEMMPI)
-    export FOAM_MPI=mpi-system
-
-    if [ -z "$MPI_ROOT" ]
-    then
-        echo 1>&2
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-        echo "    Please set the environment variable MPI_ROOT to point to" \
-             " the base folder for the system MPI in use." 1>&2
-        echo "    Example:" 1>&2
-        echo 1>&2
-        echo "        export MPI_ROOT=/opt/mpi" 1>&2
-        echo 1>&2
-    else
-        export MPI_ARCH_PATH=$MPI_ROOT
-
-        if [ -z "$MPI_ARCH_FLAGS" ]
-        then
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-            echo "    MPI_ARCH_FLAGS is not set. Example:" 1>&2
-            echo 1>&2
-            echo "        export MPI_ARCH_FLAGS=\"-DOMPI_SKIP_MPICXX\"" 1>&2
-            echo 1>&2
-        fi
-
-        if [ -z "$MPI_ARCH_INC" ]
-        then
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-            echo "    MPI_ARCH_INC is not set. Example:" 1>&2
-            echo 1>&2
-            echo "        export MPI_ARCH_INC=\"-isystem \$MPI_ROOT/include\"" 1>&2
-            echo 1>&2
-        fi
-
-        if [ -z "$MPI_ARCH_LIBS" ]
-        then
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-            echo "    MPI_ARCH_LIBS is not set. Example:" 1>&2
-            echo 1>&2
-            echo "        export MPI_ARCH_LIBS=\"-L\$MPI_ROOT/lib -lmpi\"" 1>&2
-            echo 1>&2
-        fi
-    fi
-    ;;
-
-MPICH)
-    export FOAM_MPI=mpich2-1.1.1p1
-    export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
-    export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddMan     $MPI_ARCH_PATH/share/man
-    ;;
-
-MPICH-GM)
-    export FOAM_MPI=mpich-gm
-    export MPI_ARCH_PATH=/opt/mpi
-    export MPICH_PATH=$MPI_ARCH_PATH
-    export GM_LIB_PATH=/opt/gm/lib64
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddLib     $GM_LIB_PATH
-    ;;
-
-HPMPI)
-    export FOAM_MPI=hpmpi
-    export MPI_HOME=/opt/hpmpi
-    export MPI_ARCH_PATH=$MPI_HOME
-
-    _foamAddPath $MPI_ARCH_PATH/bin
-
-    case `uname -m` in
-    i686)
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
-        ;;
-
-    x86_64)
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
-        ;;
-    ia64)
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia64
-        ;;
-    *)
-        echo Unknown processor type `uname -m` 1>&2
-        ;;
-    esac
-    ;;
-
-MPI)
-    export FOAM_MPI=mpi
-    export MPI_ARCH_PATH=/opt/mpi
-    ;;
-
-FJMPI)
-    export FOAM_MPI=fjmpi
-    export MPI_ARCH_PATH=/opt/FJSVmpi2
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib/sparcv9
-    _foamAddLib     /opt/FSUNf90/lib/sparcv9
-    _foamAddLib     /opt/FJSVpnidt/lib
-    ;;
-
-QSMPI)
-    export FOAM_MPI=qsmpi
-    export MPI_ARCH_PATH=/usr/lib/mpi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib
-    ;;
-
-SGIMPI)
-    # No trailing slash
-    [ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
-
-    export FOAM_MPI="${MPI_ROOT##*/}"
-    export MPI_ARCH_PATH=$MPI_ROOT
-
-    if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
-    then
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-        echo "    MPI_ROOT not a valid mpt installation directory or ending" \
-             " in a '/'." 1>&2
-        echo "    Please set MPI_ROOT to the mpt installation directory." 1>&2
-        echo "    MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
-    fi
-
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using SGI MPT:" 1>&2
-        echo "    MPI_ROOT : $MPI_ROOT" 1>&2
-        echo "    FOAM_MPI : $FOAM_MPI" 1>&2
-    fi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib
-    ;;
-
-INTELMPI)
-    # No trailing slash
-    [ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
-
-    export FOAM_MPI="${MPI_ROOT##*/}"
-    export MPI_ARCH_PATH=$MPI_ROOT
-
-    if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
-    then
-        echo "Warning in $WM_PROJECT_DIR/etc/config/settings.sh:" 1>&2
-        echo "    MPI_ROOT not a valid mpt installation directory or ending" \
-             " in a '/'." 1>&2
-        echo "    Please set MPI_ROOT to the mpt installation directory." 1>&2
-        echo "    MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
-    fi
-
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using INTEL MPI:" 1>&2
-        echo "    MPI_ROOT : $MPI_ROOT" 1>&2
-        echo "    FOAM_MPI : $FOAM_MPI" 1>&2
-    fi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin64
-    _foamAddLib     $MPI_ARCH_PATH/lib64
-    ;;
-*)
-    export FOAM_MPI=dummy
-    ;;
-esac
-
-# Add (non-dummy) MPI implementation
-# Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
-if [ "$FOAM_MPI" != dummy ]
-then
-    _foamAddLib $FOAM_LIBBIN/$FOAM_MPI:$FOAM_EXT_LIBBIN/$FOAM_MPI
-fi
-
-
-
-# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-: ${minBufferSize:=20000000}
-
-if [ "${MPI_BUFFER_SIZE:=$minBufferSize}" -lt $minBufferSize ]
-then
-    MPI_BUFFER_SIZE=$minBufferSize
-fi
-export MPI_BUFFER_SIZE
-
-
-# Cleanup environment:
-# ~~~~~~~~~~~~~~~~~~~~
-#keep _foamAddPath _foamAddLib _foamAddMan
-unset foamCompiler minBufferSize
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/etc/controlDict b/etc/controlDict
index 137be083516d6df3d2c80a742f369aff2d886086..7dfe186d387ea525fd732866f257c8de36c9d84b 100644
--- a/etc/controlDict
+++ b/etc/controlDict
@@ -123,7 +123,7 @@ DebugSwitches
     DICGaussSeidel      0;
     DILU                0;
     DILUGaussSeidel     0;
-    DataEntry           0;
+    Function1           0;
     DeardorffDiffStress 0;
     DispersionModel     0;
     DispersionRASModel  0;
@@ -313,10 +313,10 @@ DebugSwitches
     atomizationModel    0;
     attachDetach        0;
     autoDensity         0;
-    autoHexMeshDriver   0;
-    autoLayerDriver     0;
-    autoRefineDriver    0;
-    autoSnapDriver      0;
+    snappyHexMeshDriver 0;
+    snappyLayerDriver     0;
+    snappyRefineDriver    0;
+    snappySnapDriver      0;
     bC11H10             0;
     backgroundMeshDecomposition 0;
     backward            0;
diff --git a/etc/cshrc b/etc/cshrc
index a7612b98522859e3ac07b573fe339844b4e31170..5604372d0639b1d412a2d24504e44aa2111625aa 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -57,8 +57,8 @@ set foamInstall = $HOME/$WM_PROJECT
 if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
 
 #- Compiler location:
-#    foamCompiler = system | ThirdParty (OpenFOAM)
-setenv foamCompiler system
+#    WM_COMPILER_TYPE = system | ThirdParty (OpenFOAM)
+setenv WM_COMPILER_TYPE system
 
 #- Compiler:
 #    WM_COMPILER = Gcc | Gcc45 | Gcc46 | Gcc47 | Gcc48 | Gcc49 | Clang | Icc
@@ -202,14 +202,15 @@ if ( $status == 0 ) setenv MANPATH $cleaned
 
 # Source project setup files
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamSource $WM_PROJECT_DIR/etc/config/settings.csh
-_foamSource $WM_PROJECT_DIR/etc/config/aliases.csh
+_foamSource $WM_PROJECT_DIR/etc/config.csh/settings
+_foamSource $WM_PROJECT_DIR/etc/config.csh/aliases
 
 # Source user setup files for optional packages
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.csh`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/mpi`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/paraview`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/ensight`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.csh/CGAL`
 
 
 # Clean environment paths again. Only remove duplicates
@@ -237,4 +238,4 @@ endif
 unset cleaned foamClean foamInstall foamOldDirs
 unalias _foamSource
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/templates/axisymmetricJet/Allrun b/etc/templates/axisymmetricJet/Allrun
index 2f68265be98b3a0042d39d4ca903519be8b6281d..411484a5bf9b74786d5eb16f983952d8888469e1 100755
--- a/etc/templates/axisymmetricJet/Allrun
+++ b/etc/templates/axisymmetricJet/Allrun
@@ -11,4 +11,4 @@ runApplication extrudeMesh
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/etc/templates/closedVolume/0/U b/etc/templates/closedVolume/0/U
index 502884d30143426e684f0eacd0f254a51505f628..1af9ccc579c3844881afbdeeee3ea20cb9bde4ce 100644
--- a/etc/templates/closedVolume/0/U
+++ b/etc/templates/closedVolume/0/U
@@ -22,8 +22,7 @@ boundaryField
 {
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/etc/templates/closedVolumeRotating/0/U b/etc/templates/closedVolumeRotating/0/U
index 3a0a3d54542ca83ac8216bbd2755302292b5475f..b0cf37f40ea7601380a9f0c9d756640d477b0ad6 100644
--- a/etc/templates/closedVolumeRotating/0/U
+++ b/etc/templates/closedVolumeRotating/0/U
@@ -27,8 +27,7 @@ boundaryField
     }
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/etc/templates/compressibleInflowOutflow/0/U b/etc/templates/compressibleInflowOutflow/0/U
index 7cfc26c1f9fd9e810a25965442ed6ebe1b263bdb..6b20896f9297687b11a4e8fbad6bdac03247e4aa 100644
--- a/etc/templates/compressibleInflowOutflow/0/U
+++ b/etc/templates/compressibleInflowOutflow/0/U
@@ -36,8 +36,7 @@ boundaryField
 
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     #includeEtc "caseDicts/setConstraintTypes"
diff --git a/etc/templates/inflowOutflow/0/U b/etc/templates/inflowOutflow/0/U
index 7cfc26c1f9fd9e810a25965442ed6ebe1b263bdb..6b20896f9297687b11a4e8fbad6bdac03247e4aa 100644
--- a/etc/templates/inflowOutflow/0/U
+++ b/etc/templates/inflowOutflow/0/U
@@ -36,8 +36,7 @@ boundaryField
 
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     #includeEtc "caseDicts/setConstraintTypes"
diff --git a/etc/templates/inflowOutflowRotating/0/U b/etc/templates/inflowOutflowRotating/0/U
index 374a21f96a6b8abead0d65c8015fc8f4cc15f59c..159fe22463971632737962b9e25bd28bb7e032e2 100644
--- a/etc/templates/inflowOutflowRotating/0/U
+++ b/etc/templates/inflowOutflowRotating/0/U
@@ -42,8 +42,7 @@ boundaryField
 
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     #includeEtc "caseDicts/setConstraintTypes"
diff --git a/src/Allwmake b/src/Allwmake
index 6cfda6ea06ae30e2ab4599b27fca9f8ec51abc85..750691e799c5a0bde80905bb92103c22c1540fb3 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -81,8 +81,10 @@ wmake $targetType regionCoupled
 postProcessing/Allwmake $targetType $*
 
 wmake $targetType sixDoFRigidBodyMotion
+wmake $targetType rigidBodyDynamics
+wmake $targetType rigidBodyMeshMotion
 
 # Needs access to Turbulence
 wmake $targetType thermophysicalModels/properties/liquidPropertiesFvPatchFields
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/ODE/ODESolvers/EulerSI/EulerSI.C b/src/ODE/ODESolvers/EulerSI/EulerSI.C
index 91a60461a1c857f6df7f36c99203ec019ee51556..0648b2664916047cdcd2e81671acec6b128fa379 100644
--- a/src/ODE/ODESolvers/EulerSI/EulerSI.C
+++ b/src/ODE/ODESolvers/EulerSI/EulerSI.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,10 +67,10 @@ Foam::scalar Foam::EulerSI::solve
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/dx;
+        a_(i, i) += 1.0/dx;
     }
 
     LUDecompose(a_, pivotIndices_);
diff --git a/src/ODE/ODESolvers/Rosenbrock12/Rosenbrock12.C b/src/ODE/ODESolvers/Rosenbrock12/Rosenbrock12.C
index f5fd2b94bd52fbf716d4ab5632a68db3b2ef5e50..fa163aec0e9bef5df8ba786c944789a5e1eac83e 100644
--- a/src/ODE/ODESolvers/Rosenbrock12/Rosenbrock12.C
+++ b/src/ODE/ODESolvers/Rosenbrock12/Rosenbrock12.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,10 +81,10 @@ Foam::scalar Foam::Rosenbrock12::solve
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/(gamma*dx);
+        a_(i, i) += 1.0/(gamma*dx);
     }
 
     LUDecompose(a_, pivotIndices_);
diff --git a/src/ODE/ODESolvers/Rosenbrock23/Rosenbrock23.C b/src/ODE/ODESolvers/Rosenbrock23/Rosenbrock23.C
index 495f351e8d0abffcf8767bf2a9bf90fea6e891b4..3b6c8cf463530576512f59a6ebb63c5fbf51c08c 100644
--- a/src/ODE/ODESolvers/Rosenbrock23/Rosenbrock23.C
+++ b/src/ODE/ODESolvers/Rosenbrock23/Rosenbrock23.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,10 +94,10 @@ Foam::scalar Foam::Rosenbrock23::solve
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/(gamma*dx);
+        a_(i, i) += 1.0/(gamma*dx);
     }
 
     LUDecompose(a_, pivotIndices_);
diff --git a/src/ODE/ODESolvers/Rosenbrock34/Rosenbrock34.C b/src/ODE/ODESolvers/Rosenbrock34/Rosenbrock34.C
index db16f61959064039c4f8fc00affad76e9629ba5e..5b761b267faec1f6e01f27e8ff479aeceea57677 100644
--- a/src/ODE/ODESolvers/Rosenbrock34/Rosenbrock34.C
+++ b/src/ODE/ODESolvers/Rosenbrock34/Rosenbrock34.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,10 +139,10 @@ Foam::scalar Foam::Rosenbrock34::solve
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/(gamma*dx);
+        a_(i, i) += 1.0/(gamma*dx);
     }
 
     LUDecompose(a_, pivotIndices_);
diff --git a/src/ODE/ODESolvers/SIBS/SIBS.C b/src/ODE/ODESolvers/SIBS/SIBS.C
index 36acb8a6b1abc36f54ba485a36c74f89ec4831b5..a095a7c50738b4c9b066bdbcd8631bd3a72751ed 100644
--- a/src/ODE/ODESolvers/SIBS/SIBS.C
+++ b/src/ODE/ODESolvers/SIBS/SIBS.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ Foam::SIBS::SIBS(const ODESystem& ode, const dictionary& dict)
 :
     ODESolver(ode, dict),
     a_(iMaxX_, 0.0),
-    alpha_(kMaxX_, kMaxX_, 0.0),
+    alpha_(kMaxX_, 0.0),
     d_p_(n_, kMaxX_, 0.0),
     x_p_(kMaxX_, 0.0),
     err_(kMaxX_, 0.0),
@@ -60,7 +60,7 @@ Foam::SIBS::SIBS(const ODESystem& ode, const dictionary& dict)
     yErr_(n_, 0.0),
     dydx0_(n_),
     dfdx_(n_, 0.0),
-    dfdy_(n_, n_, 0.0),
+    dfdy_(n_, 0.0),
     first_(1),
     epsOld_(-1.0)
 {}
diff --git a/src/ODE/ODESolvers/SIBS/SIMPR.C b/src/ODE/ODESolvers/SIBS/SIMPR.C
index 0017d4c23bcd32fb2d4fe0ab3c6266f7ec9d6075..d747b36dc69e71961efc3f6576c47e36822aeda4 100644
--- a/src/ODE/ODESolvers/SIBS/SIMPR.C
+++ b/src/ODE/ODESolvers/SIBS/SIMPR.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,9 +46,9 @@ void Foam::SIBS::SIMPR
     {
         for (label j=0; j<n_; j++)
         {
-            a[i][j] = -h*dfdy[i][j];
+            a(i, j) = -h*dfdy(i, j);
         }
-        ++a[i][i];
+        ++a(i, i);
     }
 
     labelList pivotIndices(n_);
diff --git a/src/ODE/ODESolvers/SIBS/polyExtrapolate.C b/src/ODE/ODESolvers/SIBS/polyExtrapolate.C
index 8b1c72d09d82f70bb4a32863f52916e48e11750d..3f74d209156ffc0691df270468dc4eea1084f410 100644
--- a/src/ODE/ODESolvers/SIBS/polyExtrapolate.C
+++ b/src/ODE/ODESolvers/SIBS/polyExtrapolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ void Foam::SIBS::polyExtrapolate
     {
         for (label j=0; j<n; j++)
         {
-            d[j][0] = yest[j];
+            d(j, 0) = yest[j];
         }
     }
     else
diff --git a/src/ODE/ODESolvers/rodas23/rodas23.C b/src/ODE/ODESolvers/rodas23/rodas23.C
index af4540b96dec0d8790c42407ba177a6afd836a74..31d5e8aceec81399d1643e69079873128ea8aed9 100644
--- a/src/ODE/ODESolvers/rodas23/rodas23.C
+++ b/src/ODE/ODESolvers/rodas23/rodas23.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,10 +85,10 @@ Foam::scalar Foam::rodas23::solve
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/(gamma*dx);
+        a_(i, i) += 1.0/(gamma*dx);
     }
 
     LUDecompose(a_, pivotIndices_);
diff --git a/src/ODE/ODESolvers/rodas34/rodas34.C b/src/ODE/ODESolvers/rodas34/rodas34.C
index 6a15ad191353fd65db1c50a1393b1824f7065cb5..5f403238d7f2511d46d67859552f1e3d449281ad 100644
--- a/src/ODE/ODESolvers/rodas34/rodas34.C
+++ b/src/ODE/ODESolvers/rodas34/rodas34.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,10 +108,10 @@ Foam::scalar Foam::rodas34::solve
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/(gamma*dx);
+        a_(i, i) += 1.0/(gamma*dx);
     }
 
     LUDecompose(a_, pivotIndices_);
diff --git a/src/ODE/ODESolvers/seulex/seulex.C b/src/ODE/ODESolvers/seulex/seulex.C
index 51389d0779ce789fddecf902c59fd3d4b7731a55..f91a55557e5c959040245a744c1bc520c25797de 100644
--- a/src/ODE/ODESolvers/seulex/seulex.C
+++ b/src/ODE/ODESolvers/seulex/seulex.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,7 +92,7 @@ Foam::seulex::seulex(const ODESystem& ode, const dictionary& dict)
         for (int l=0; l<k; l++)
         {
             scalar ratio = scalar(nSeq_[k])/nSeq_[l];
-            coeff_[k][l] = 1.0/(ratio - 1.0);
+            coeff_(k, l) = 1.0/(ratio - 1.0);
         }
     }
 }
@@ -117,10 +117,10 @@ bool Foam::seulex::seul
     {
         for (label j=0; j<n_; j++)
         {
-            a_[i][j] = -dfdy_[i][j];
+            a_(i, j) = -dfdy_(i, j);
         }
 
-        a_[i][i] += 1.0/dx;
+        a_(i, i) += 1.0/dx;
     }
 
     LUDecompose(a_, pivotIndices_);
@@ -192,13 +192,13 @@ void Foam::seulex::extrapolate
         for (label i=0; i<n_; i++)
         {
             table[j-1][i] =
-                table[j][i] + coeff_[k][j]*(table[j][i] - table[j-1][i]);
+                table(j, i) + coeff_(k, j)*(table(j, i) - table[j-1][i]);
         }
     }
 
     for (int i=0; i<n_; i++)
     {
-        y[i] = table[0][i] + coeff_[k][0]*(table[0][i] - y[i]);
+        y[i] = table(0, i) + coeff_(k, 0)*(table(0, i) - y[i]);
     }
 }
 
@@ -288,7 +288,7 @@ void Foam::seulex::solve
                 forAll(scale_, i)
                 {
                     scale_[i] = absTol_[i] + relTol_[i]*mag(y0_[i]);
-                    err += sqr((y[i] - table_[0][i])/scale_[i]);
+                    err += sqr((y[i] - table_(0, i))/scale_[i]);
                 }
                 err = sqrt(err/n_);
                 if (err > 1.0/SMALL || (k > 1 && err >= errOld))
diff --git a/src/OSspecific/POSIX/Allwmake b/src/OSspecific/POSIX/Allwmake
index 6cb776136efe51830771754ff96ecc30c5a4dbe7..bd5b6259b99029ca91e05abbd70aec45e33b8dc2 100755
--- a/src/OSspecific/POSIX/Allwmake
+++ b/src/OSspecific/POSIX/Allwmake
@@ -21,4 +21,4 @@ fi
 # make (non-shared by default) object
 wmake $targetType
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C
index 44ee3c7088fa3df0ff64aeac1521365c44e483fd..0b9a541d94083d0aa63f2b5641b300ae5ef64762 100644
--- a/src/OSspecific/POSIX/POSIX.C
+++ b/src/OSspecific/POSIX/POSIX.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,7 +27,7 @@ Description
 \*---------------------------------------------------------------------------*/
 
 #ifdef solarisGcc
-# define _SYS_VNODE_H
+    #define _SYS_VNODE_H
 #endif
 
 #include "OSspecific.H"
@@ -58,11 +58,11 @@ Description
 #include <netinet/in.h>
 
 #ifdef USE_RANDOM
-#   include <climits>
-#   if INT_MAX    != 2147483647
-#       error "INT_MAX    != 2147483647"
-#       error "The random number generator may not work!"
-#   endif
+    #include <climits>
+    #if INT_MAX    != 2147483647
+        #error "INT_MAX    != 2147483647"
+        #error "The random number generator may not work!"
+    #endif
 #endif
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -188,7 +188,6 @@ bool Foam::isAdministrator()
 }
 
 
-// use $HOME environment variable or passwd info
 Foam::fileName Foam::home()
 {
     char* env = ::getenv("HOME");
@@ -246,19 +245,44 @@ Foam::fileName Foam::home(const string& userName)
 
 Foam::fileName Foam::cwd()
 {
-    char buf[256];
-    if (::getcwd(buf, sizeof(buf)))
-    {
-        return buf;
-    }
-    else
+    label pathLengthLimit = POSIX::pathLengthChunk;
+    List<char> path(pathLengthLimit);
+
+    // Resize path if getcwd fails with an ERANGE error
+    while(pathLengthLimit == path.size())
     {
-        FatalErrorInFunction
-            << "Couldn't get the current working directory"
-            << exit(FatalError);
+        if (::getcwd(path.data(), path.size()))
+        {
+            return path.data();
+        }
+        else if(errno == ERANGE)
+        {
+            // Increment path length upto the pathLengthMax limit
+            if
+            (
+                (pathLengthLimit += POSIX::pathLengthChunk)
+             >= POSIX::pathLengthMax
+            )
+            {
+                FatalErrorInFunction
+                    << "Attempt to increase path length beyond limit of "
+                    << POSIX::pathLengthMax
+                    << exit(FatalError);
+            }
 
-        return fileName::null;
+            path.setSize(pathLengthLimit);
+        }
+        else
+        {
+            break;
+        }
     }
+
+    FatalErrorInFunction
+        << "Couldn't get the current working directory"
+        << exit(FatalError);
+
+    return fileName::null;
 }
 
 
@@ -563,14 +587,12 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
 }
 
 
-// Set the file mode
 bool Foam::chMod(const fileName& name, const mode_t m)
 {
     return ::chmod(name.c_str(), m) == 0;
 }
 
 
-// Return the file mode
 mode_t Foam::mode(const fileName& name)
 {
     fileStat fileStatus(name);
@@ -585,7 +607,6 @@ mode_t Foam::mode(const fileName& name)
 }
 
 
-// Return the file type: FILE or DIRECTORY
 Foam::fileName::Type Foam::type(const fileName& name)
 {
     mode_t m = mode(name);
@@ -605,28 +626,24 @@ Foam::fileName::Type Foam::type(const fileName& name)
 }
 
 
-// Does the name exist in the filing system?
 bool Foam::exists(const fileName& name, const bool checkGzip)
 {
     return mode(name) || isFile(name, checkGzip);
 }
 
 
-// Does the directory exist?
 bool Foam::isDir(const fileName& name)
 {
     return S_ISDIR(mode(name));
 }
 
 
-// Does the file exist?
 bool Foam::isFile(const fileName& name, const bool checkGzip)
 {
     return S_ISREG(mode(name)) || (checkGzip && S_ISREG(mode(name + ".gz")));
 }
 
 
-// Return size of file
 off_t Foam::fileSize(const fileName& name)
 {
     fileStat fileStatus(name);
@@ -641,7 +658,6 @@ off_t Foam::fileSize(const fileName& name)
 }
 
 
-// Return time of last file modification
 time_t Foam::lastModified(const fileName& name)
 {
     fileStat fileStatus(name);
@@ -656,7 +672,6 @@ time_t Foam::lastModified(const fileName& name)
 }
 
 
-// Read a directory and return the entries as a string list
 Foam::fileNameList Foam::readDir
 (
     const fileName& directory,
@@ -670,8 +685,8 @@ Foam::fileNameList Foam::readDir
 
     if (POSIX::debug)
     {
-        Info<< "readDir(const fileName&, const fileType, const bool filtergz)"
-            << " : reading directory " << directory << endl;
+        InfoInFunction
+            << "reading directory " << directory << endl;
     }
 
     // Setup empty string list MAXTVALUES long
@@ -691,9 +706,8 @@ Foam::fileNameList Foam::readDir
 
         if (POSIX::debug)
         {
-            Info<< "readDir(const fileName&, const fileType, "
-                   "const bool filtergz) : cannot open directory "
-                << directory << endl;
+            InfoInFunction
+                << "cannot open directory " << directory << endl;
         }
     }
     else
@@ -752,7 +766,6 @@ Foam::fileNameList Foam::readDir
 }
 
 
-// Copy, recursively if necessary, the source to the destination
 bool Foam::cp(const fileName& src, const fileName& dest)
 {
     // Make sure source exists.
@@ -824,7 +837,8 @@ bool Foam::cp(const fileName& src, const fileName& dest)
         {
             if (POSIX::debug)
             {
-                Info<< "Copying : " << src/contents[i]
+                InfoInFunction
+                    << "Copying : " << src/contents[i]
                     << " to " << destFile/contents[i] << endl;
             }
 
@@ -838,7 +852,8 @@ bool Foam::cp(const fileName& src, const fileName& dest)
         {
             if (POSIX::debug)
             {
-                Info<< "Copying : " << src/subdirs[i]
+                InfoInFunction
+                    << "Copying : " << src/subdirs[i]
                     << " to " << destFile << endl;
             }
 
@@ -851,12 +866,12 @@ bool Foam::cp(const fileName& src, const fileName& dest)
 }
 
 
-// Create a softlink. dst should not exist. Returns true if successful.
 bool Foam::ln(const fileName& src, const fileName& dst)
 {
     if (POSIX::debug)
     {
-        Info<< "Create softlink from : " << src << " to " << dst
+        InfoInFunction
+            << "Create softlink from : " << src << " to " << dst
             << endl;
     }
 
@@ -888,12 +903,12 @@ bool Foam::ln(const fileName& src, const fileName& dst)
 }
 
 
-// Rename srcFile dstFile
 bool Foam::mv(const fileName& src, const fileName& dst)
 {
     if (POSIX::debug)
     {
-        Info<< "Move : " << src << " to " << dst << endl;
+        InfoInFunction
+            << "Move : " << src << " to " << dst << endl;
     }
 
     if
@@ -913,13 +928,12 @@ bool Foam::mv(const fileName& src, const fileName& dst)
 }
 
 
-//- Rename to a corresponding backup file
-//  If the backup file already exists, attempt with "01" .. "99" index
 bool Foam::mvBak(const fileName& src, const std::string& ext)
 {
     if (POSIX::debug)
     {
-        Info<< "mvBak : " << src << " to extension " << ext << endl;
+        InfoInFunction
+            << "mvBak : " << src << " to extension " << ext << endl;
     }
 
     if (exists(src, false))
@@ -951,12 +965,12 @@ bool Foam::mvBak(const fileName& src, const std::string& ext)
 }
 
 
-// Remove a file, returning true if successful otherwise false
 bool Foam::rm(const fileName& file)
 {
     if (POSIX::debug)
     {
-        Info<< "Removing : " << file << endl;
+        InfoInFunction
+            << "Removing : " << file << endl;
     }
 
     // Try returning plain file name; if not there, try with .gz
@@ -971,12 +985,11 @@ bool Foam::rm(const fileName& file)
 }
 
 
-// Remove a dirctory and its contents
 bool Foam::rmDir(const fileName& directory)
 {
     if (POSIX::debug)
     {
-        Info<< "rmDir(const fileName&) : "
+        InfoInFunction
             << "removing directory " << directory << endl;
     }
 
@@ -1284,31 +1297,31 @@ Foam::fileNameList Foam::dlLoaded()
 
 void Foam::osRandomSeed(const label seed)
 {
-#ifdef USE_RANDOM
+    #ifdef USE_RANDOM
     srandom((unsigned int)seed);
-#else
+    #else
     srand48(seed);
-#endif
+    #endif
 }
 
 
 Foam::label Foam::osRandomInteger()
 {
-#ifdef USE_RANDOM
+    #ifdef USE_RANDOM
     return random();
-#else
+    #else
     return lrand48();
-#endif
+    #endif
 }
 
 
 Foam::scalar Foam::osRandomDouble()
 {
-#ifdef USE_RANDOM
+    #ifdef USE_RANDOM
     return (scalar)random()/INT_MAX;
-#else
+    #else
     return drand48();
-#endif
+    #endif
 }
 
 
diff --git a/src/OSspecific/POSIX/POSIX.H b/src/OSspecific/POSIX/POSIX.H
index 9947f3de74c0c6e7e6d74fbf51f23d86c7bfc277..0b17af7325f8f5ac498359e47049d43c87d2bd2f 100644
--- a/src/OSspecific/POSIX/POSIX.H
+++ b/src/OSspecific/POSIX/POSIX.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,6 +48,9 @@ namespace POSIX
 {
     //- Declare name of the class and its debug switch
     NamespaceName("POSIX");
+
+    const label pathLengthChunk = 256;
+    const label pathLengthMax = 4096;
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C
index e3bddbc78f3d633a0950e55d259305e8746fa46b..045ed5be4978d1fb7146c5219ea1965d95ad2c3e 100644
--- a/src/OSspecific/POSIX/fileMonitor.C
+++ b/src/OSspecific/POSIX/fileMonitor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,15 +32,15 @@ License
 #include "regIOobject.H"     // for fileModificationSkew symbol
 
 #ifdef FOAM_USE_INOTIFY
-#   include <unistd.h>
-#   include <sys/inotify.h>
-#   include <sys/ioctl.h>
-#   include <errno.h>
-#   define EVENT_SIZE  ( sizeof (struct inotify_event) )
-#   define EVENT_LEN   (EVENT_SIZE + 16)
-#   define EVENT_BUF_LEN     ( 1024 * EVENT_LEN )
+    #include <unistd.h>
+    #include <sys/inotify.h>
+    #include <sys/ioctl.h>
+    #include <errno.h>
+    #define EVENT_SIZE  ( sizeof (struct inotify_event) )
+    #define EVENT_LEN   (EVENT_SIZE + 16)
+    #define EVENT_BUF_LEN     ( 1024 * EVENT_LEN )
 #else
-#   include "OSspecific.H"
+    #include "OSspecific.H"
 #endif
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
diff --git a/src/OSspecific/POSIX/fileStat.C b/src/OSspecific/POSIX/fileStat.C
index bf04835f25eaec1dc681799d2c42381174169293..9826983d642d8d09cc5035a35dee4c0ce9ec87bf 100644
--- a/src/OSspecific/POSIX/fileStat.C
+++ b/src/OSspecific/POSIX/fileStat.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,6 @@ License
 
 #include <signal.h>
 #include <unistd.h>
-#include <sys/sysmacros.h>
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
diff --git a/src/OSspecific/POSIX/timer.C b/src/OSspecific/POSIX/timer.C
index 7e1f5886d3558eac59f22a803f97e8f6a0ae8d1b..d9c1bac05e6829e16b648b38198fe676c2fff3f5 100644
--- a/src/OSspecific/POSIX/timer.C
+++ b/src/OSspecific/POSIX/timer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,8 +48,7 @@ void Foam::timer::signalHandler(int)
 {
     if (debug)
     {
-        Info<< "Foam::timer::signalHandler(int sig) : "
-            << " timed out. Jumping."
+        InfoInFunction<< "Timed out. Jumping."
             << endl;
     }
     longjmp(envAlarm, 1);
@@ -91,8 +90,8 @@ Foam::timer::timer(const unsigned int newTimeOut)
 
         if (debug)
         {
-            Info<< "Foam::timer::timer(const unsigned int) : "
-                << " installing timeout " << int(newTimeOut_)
+            InfoInFunction
+                << "Installing timeout " << int(newTimeOut_)
                 << " seconds"
                 << " (overriding old timeout " << int(oldTimeOut_)
                 << ")." << endl;
@@ -109,8 +108,8 @@ Foam::timer::~timer()
     {
         if (debug)
         {
-            Info<< "Foam::timer::~timer(const unsigned int) : timeOut="
-                << int(newTimeOut_)
+            InfoInFunction
+                << "timeOut=" << int(newTimeOut_)
                 << " : resetting timeOut to " << int(oldTimeOut_) << endl;
         }
 
@@ -128,4 +127,5 @@ Foam::timer::~timer()
     }
 }
 
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files
index 8d9b38f21f25bae4742aa1b88550e6f17598c79c..460c85c164bb4a68c54eaad58556de9ba0e9aa73 100644
--- a/src/OpenFOAM/Make/files
+++ b/src/OpenFOAM/Make/files
@@ -52,6 +52,7 @@ primitives/Tensor/lists/tensorList.C
 primitives/Vector/complexVector/complexVector.C
 #if !defined(WM_SP)
 primitives/Vector/floatVector/floatVector.C
+primitives/Tensor/floatTensor/floatTensor.C
 #endif
 primitives/Vector/labelVector/labelVector.C
 primitives/Vector/vector/vector.C
@@ -72,7 +73,7 @@ primitives/septernion/septernion.C
 primitives/triad/triad.C
 
 /* functions, data entries */
-primitives/functions/DataEntry/makeDataEntries.C
+primitives/functions/Function1/makeDataEntries.C
 primitives/functions/Polynomial/polynomialFunction.C
 
 primitives/subModelBase/subModelBase.C
@@ -109,6 +110,11 @@ $(ranges)/labelRange/labelRanges.C
 $(ranges)/scalarRange/scalarRange.C
 $(ranges)/scalarRange/scalarRanges.C
 
+spatialVectorAlgebra = primitives/spatialVectorAlgebra
+$(spatialVectorAlgebra)/SpatialVector/spatialVector/spatialVector.C
+$(spatialVectorAlgebra)/SpatialTensor/spatialTensor/spatialTensor.C
+$(spatialVectorAlgebra)/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.C
+
 containers/HashTables/HashTable/HashTableCore.C
 containers/HashTables/StaticHashTable/StaticHashTableCore.C
 containers/Lists/SortableList/ParSortableListName.C
diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C
index 922a62415f320e5e3b6402aea3763a8df6a5f3bb..20475acead2cfbedc82e85d2a72d74c71b354fc5 100644
--- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C
+++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,11 +33,8 @@ License
 template<class Type>
 Foam::scalar Foam::dynamicIndexedOctree<Type>::perturbTol_ = 10*SMALL;
 
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Does bb intersect a sphere around sample? Or is any corner point of bb
-// closer than nearestDistSqr to sample.
 template<class Type>
 bool Foam::dynamicIndexedOctree<Type>::overlaps
 (
@@ -80,8 +77,6 @@ bool Foam::dynamicIndexedOctree<Type>::overlaps
 }
 
 
-// Does bb intersect a sphere around sample? Or is any corner point of bb
-// closer than nearestDistSqr to sample.
 template<class Type>
 bool Foam::dynamicIndexedOctree<Type>::overlaps
 (
@@ -139,16 +134,10 @@ bool Foam::dynamicIndexedOctree<Type>::overlaps
 }
 
 
-//
-// Construction helper routines
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-
-// Split list of indices into 8 bins
 template<class Type>
 void Foam::dynamicIndexedOctree<Type>::divide
 (
-    const autoPtr<DynamicList<label> >& indices,
+    const autoPtr<DynamicList<label>>& indices,
     const treeBoundBox& bb,
     contentListList& result
 ) const
@@ -157,7 +146,7 @@ void Foam::dynamicIndexedOctree<Type>::divide
     {
         result.append
         (
-            autoPtr<DynamicList<label> >
+            autoPtr<DynamicList<label>>
             (
                 new DynamicList<label>(indices().size()/8)
             )
@@ -186,7 +175,6 @@ void Foam::dynamicIndexedOctree<Type>::divide
 }
 
 
-// Subdivide the (content) node.
 template<class Type>
 typename Foam::dynamicIndexedOctree<Type>::node
 Foam::dynamicIndexedOctree<Type>::divide
@@ -197,7 +185,7 @@ Foam::dynamicIndexedOctree<Type>::divide
     const label octantToBeDivided
 )
 {
-    const autoPtr<DynamicList<label> >& indices = contents_[contentI];
+    const autoPtr<DynamicList<label>>& indices = contents_[contentI];
 
     node nod;
 
@@ -226,7 +214,7 @@ Foam::dynamicIndexedOctree<Type>::divide
 
     for (direction octant = 0; octant < dividedIndices.size(); octant++)
     {
-        autoPtr<DynamicList<label> >& subIndices = dividedIndices[octant];
+        autoPtr<DynamicList<label>>& subIndices = dividedIndices[octant];
 
         if (subIndices().size())
         {
@@ -245,7 +233,7 @@ Foam::dynamicIndexedOctree<Type>::divide
 
                 contents_.append
                 (
-                    autoPtr<DynamicList<label> >
+                    autoPtr<DynamicList<label>>
                     (
                         new DynamicList<label>()
                     )
@@ -330,15 +318,16 @@ void Foam::dynamicIndexedOctree<Type>::recursiveSubDivision
 }
 
 
-// Pre-calculates wherever possible the volume status per node/subnode.
-// Recurses to determine status of lowest level boxes. Level above is
-// combination of octants below.
 template<class Type>
 Foam::volumeType Foam::dynamicIndexedOctree<Type>::calcVolumeType
 (
     const label nodeI
 ) const
 {
+    // Pre-calculates wherever possible the volume status per node/subnode.
+    // Recurses to determine status of lowest level boxes. Level above is
+    // combination of octants below.
+
     const node& nod = nodes_[nodeI];
 
     volumeType myType = volumeType::UNKNOWN;
@@ -477,12 +466,6 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getSide
 }
 
 
-//
-// Query routines
-// ~~~~~~~~~~~~~~
-//
-
-// Find nearest point starting from nodeI
 template<class Type>
 void Foam::dynamicIndexedOctree<Type>::findNearest
 (
@@ -554,7 +537,6 @@ void Foam::dynamicIndexedOctree<Type>::findNearest
 }
 
 
-// Find nearest point to line.
 template<class Type>
 void Foam::dynamicIndexedOctree<Type>::findNearest
 (
@@ -645,8 +627,6 @@ Foam::treeBoundBox Foam::dynamicIndexedOctree<Type>::subBbox
 }
 
 
-// Takes a bb and a point on/close to the edge of the bb and pushes the point
-// inside by a small fraction.
 template<class Type>
 Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
 (
@@ -655,6 +635,9 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
     const bool pushInside
 )
 {
+    // Takes a bb and a point on/close to the edge of the bb and pushes the
+    // point inside by a small fraction.
+
     // Get local length scale.
     const vector perturbVec = perturbTol_*bb.span();
 
@@ -716,8 +699,6 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
 }
 
 
-// Takes a bb and a point on the edge of the bb and pushes the point
-// outside by a small fraction.
 template<class Type>
 Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
 (
@@ -727,6 +708,9 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
     const bool pushInside
 )
 {
+    // Takes a bb and a point on the edge of the bb and pushes the point
+    // outside by a small fraction.
+
     // Get local length scale.
     const vector perturbVec = perturbTol_*bb.span();
 
@@ -828,9 +812,6 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
 }
 
 
-// Guarantees that if pt is on a face it gets perturbed so it is away
-// from the face edges.
-// If pt is not on a face does nothing.
 template<class Type>
 Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
 (
@@ -988,205 +969,6 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
 }
 
 
-//// Takes a bb and a point on the outside of the bb. Checks if on multiple
-// faces
-//// and if so perturbs point so it is only on one face.
-//template<class Type>
-//void Foam::dynamicIndexedOctree<Type>::checkMultipleFaces
-//(
-//    const treeBoundBox& bb,
-//    const vector& dir,          // end-start
-//    pointIndexHit& faceHitInfo,
-//    direction& faceID
-//)
-//{
-//    // Do the quick elimination of no or one face.
-//    if
-//    (
-//        (faceID == 0)
-//     || (faceID == treeBoundBox::LEFTBIT)
-//     || (faceID == treeBoundBox::RIGHTBIT)
-//     || (faceID == treeBoundBox::BOTTOMBIT)
-//     || (faceID == treeBoundBox::TOPBIT)
-//     || (faceID == treeBoundBox::BACKBIT)
-//     || (faceID == treeBoundBox::FRONTBIT)
-//    )
-//    {
-//        return;
-//    }
-//
-//
-//    // Check the direction of vector w.r.t. faces being intersected.
-//    FixedList<scalar, 6> inproducts(-GREAT);
-//
-//    direction nFaces = 0;
-//
-//    if (faceID & treeBoundBox::LEFTBIT)
-//    {
-//        inproducts[treeBoundBox::LEFT] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::LEFT]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//    if (faceID & treeBoundBox::RIGHTBIT)
-//    {
-//        inproducts[treeBoundBox::RIGHT] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::RIGHT]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//
-//    if (faceID & treeBoundBox::BOTTOMBIT)
-//    {
-//        inproducts[treeBoundBox::BOTTOM] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::BOTTOM]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//    if (faceID & treeBoundBox::TOPBIT)
-//    {
-//        inproducts[treeBoundBox::TOP] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::TOP]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//
-//    if (faceID & treeBoundBox::BACKBIT)
-//    {
-//        inproducts[treeBoundBox::BACK] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::BACK]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//    if (faceID & treeBoundBox::FRONTBIT)
-//    {
-//        inproducts[treeBoundBox::FRONT] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::FRONT]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//
-//    if (nFaces == 0 || nFaces == 1 || nFaces > 3)
-//    {
-//        FatalErrorInFunction
-//            << "Problem : nFaces:" << nFaces << abort(FatalError);
-//    }
-//
-//    // Keep point on most perpendicular face; shift it away from the aligned
-//    // ones.
-//    // E.g. line hits top and left face:
-//    //     a
-//    // ----+----+
-//    //     |    |
-//    //     |    |
-//    //     +----+
-//    // Shift point down (away from top):
-//    //
-//    //    a+----+
-//    // ----|    |
-//    //     |    |
-//    //     +----+
-//
-//    label maxIndex = -1;
-//    scalar maxInproduct = -GREAT;
-//
-//    for (direction i = 0; i < 6; i++)
-//    {
-//        if (inproducts[i] > maxInproduct)
-//        {
-//            maxInproduct = inproducts[i];
-//            maxIndex = i;
-//        }
-//    }
-//
-//    if (maxIndex == -1)
-//    {
-//        FatalErrorInFunction
-//            << "Problem maxIndex:" << maxIndex << " inproducts:" << inproducts
-//            << abort(FatalError);
-//    }
-//
-//    const point oldPoint(faceHitInfo.rawPoint());
-//    const direction oldFaceID = faceID;
-//
-//    // 1. Push point into bb, away from all corners
-//
-//    faceHitInfo.rawPoint() = pushPoint(bb, oldFaceID, oldPoint, true);
-//
-//    // 2. Snap it back onto the preferred face
-//
-//    if (maxIndex == treeBoundBox::LEFT)
-//    {
-//        faceHitInfo.rawPoint().x() = bb.min().x();
-//        faceID = treeBoundBox::LEFTBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::RIGHT)
-//    {
-//        faceHitInfo.rawPoint().x() = bb.max().x();
-//        faceID = treeBoundBox::RIGHTBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::BOTTOM)
-//    {
-//        faceHitInfo.rawPoint().y() = bb.min().y();
-//        faceID = treeBoundBox::BOTTOMBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::TOP)
-//    {
-//        faceHitInfo.rawPoint().y() = bb.max().y();
-//        faceID = treeBoundBox::TOPBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::BACK)
-//    {
-//        faceHitInfo.rawPoint().z() = bb.min().z();
-//        faceID = treeBoundBox::BACKBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::FRONT)
-//    {
-//        faceHitInfo.rawPoint().z() = bb.max().z();
-//        faceID = treeBoundBox::FRONTBIT;
-//    }
-//
-//    Pout<< "From ray:" << dir
-//        << " from point:" << oldPoint
-//        << " on faces:" << faceString(oldFaceID)
-//        << " of bb:" << bb
-//        << " with inprods:" << inproducts
-//        << " maxIndex:" << maxIndex << endl
-//        << "perturbed to point:" << faceHitInfo.rawPoint()
-//        << " on face:" << faceString(faceID)
-//        << endl;
-//
-//
-//    if (debug)
-//    {
-//        if (faceID != bb.faceBits(faceHitInfo.rawPoint()))
-//        {
-//            FatalErrorInFunction
-//                << "Pushed point from " << oldPoint
-//                << " on face:" << oldFaceID << " of bb:" << bb << endl
-//                << "onto " << faceHitInfo.rawPoint()
-//                << " on face:" << faceID
-//                << " which is not consistent with geometric face "
-//                <<  bb.faceBits(faceHitInfo.rawPoint())
-//                << abort(FatalError);
-//        }
-//    }
-//}
-
-
-// Get parent node and octant. Return false if top of tree reached.
 template<class Type>
 bool Foam::dynamicIndexedOctree<Type>::walkToParent
 (
@@ -1233,10 +1015,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToParent
 }
 
 
-// Walk tree to neighbouring node. Gets current position as
-// node and octant in this node and walks in the direction given by
-// the facePointBits (combination of treeBoundBox::LEFTBIT, TOPBIT etc.)
-// Returns false if edge of tree hit.
+
 template<class Type>
 bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
 (
@@ -1246,6 +1025,11 @@ bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
     direction& octant
 ) const
 {
+    // Walk tree to neighbouring node. Gets current position as node and octant
+    // in this node and walks in the direction given by the facePointBits
+    // (combination of treeBoundBox::LEFTBIT, TOPBIT etc.)  Returns false if
+    // edge of tree hit.
+
     label oldNodeI = nodeI;
     direction oldOctant = octant;
 
@@ -1521,12 +1305,6 @@ Foam::word Foam::dynamicIndexedOctree<Type>::faceString
 }
 
 
-// Traverse a node. If intersects a triangle return first intersection point:
-//  hitInfo.index = index of shape
-//  hitInfo.point = point on shape
-// Else return a miss and the bounding box face hit:
-//  hitInfo.point = coordinate of intersection of ray with bounding box
-//  hitBits  = posbits of point on bounding box
 template<class Type>
 void Foam::dynamicIndexedOctree<Type>::traverseNode
 (
@@ -1689,7 +1467,6 @@ void Foam::dynamicIndexedOctree<Type>::traverseNode
 }
 
 
-// Find first intersection
 template<class Type>
 Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
 (
@@ -1877,7 +1654,6 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
 }
 
 
-// Find first intersection
 template<class Type>
 Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
 (
@@ -1901,7 +1677,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
         if ((startBit & endBit) != 0)
         {
             // Both start and end outside domain and in same block.
-            return pointIndexHit(false, vector::zero, -1);
+            return pointIndexHit(false, Zero, -1);
         }
 
 
@@ -1915,7 +1691,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
             // Track start to inside domain.
             if (!treeBb.intersects(start, end, trackStart))
             {
-                return pointIndexHit(false, vector::zero, -1);
+                return pointIndexHit(false, Zero, -1);
             }
         }
 
@@ -1924,7 +1700,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
             // Track end to inside domain.
             if (!treeBb.intersects(end, trackStart, trackEnd))
             {
-                return pointIndexHit(false, vector::zero, -1);
+                return pointIndexHit(false, Zero, -1);
             }
         }
 
@@ -2218,7 +1994,6 @@ void Foam::dynamicIndexedOctree<Type>::findNear
 }
 
 
-// Number of elements in node.
 template<class Type>
 Foam::label Foam::dynamicIndexedOctree<Type>::countElements
 (
@@ -2354,7 +2129,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
 {
     scalar nearestDistSqr = startDistSqr;
     label nearestShapeI = -1;
-    point nearestPoint = vector::zero;
+    point nearestPoint = Zero;
 
     if (nodes_.size())
     {
@@ -2399,14 +2174,13 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
     }
     else
     {
-        nearestPoint = vector::zero;
+        nearestPoint = Zero;
     }
 
     return pointIndexHit(nearestShapeI != -1, nearestPoint, nearestShapeI);
 }
 
 
-// Find nearest intersection
 template<class Type>
 Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
 (
@@ -2418,7 +2192,6 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
 }
 
 
-// Find nearest intersection
 template<class Type>
 Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLineAny
 (
@@ -2467,7 +2240,6 @@ Foam::labelList Foam::dynamicIndexedOctree<Type>::findSphere
 }
 
 
-// Find node (as parent+octant) containing point
 template<class Type>
 Foam::labelBits Foam::dynamicIndexedOctree<Type>::findNode
 (
@@ -2571,7 +2343,6 @@ const Foam::labelList& Foam::dynamicIndexedOctree<Type>::findIndices
 }
 
 
-// Determine type (inside/outside/mixed) per node.
 template<class Type>
 Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
 (
@@ -2677,7 +2448,7 @@ bool Foam::dynamicIndexedOctree<Type>::insert(label startIndex, label endIndex)
     {
         contents_.append
         (
-            autoPtr<DynamicList<label> >
+            autoPtr<DynamicList<label>>
             (
                 new DynamicList<label>(1)
             )
@@ -2771,7 +2542,7 @@ bool Foam::dynamicIndexedOctree<Type>::insertIndex
 
                 contents_.append
                 (
-                    autoPtr<DynamicList<label> >(new DynamicList<label>(1))
+                    autoPtr<DynamicList<label>>(new DynamicList<label>(1))
                 );
 
                 contents_[sz]().append(index);
@@ -2885,7 +2656,6 @@ Foam::label Foam::dynamicIndexedOctree<Type>::removeIndex
 }
 
 
-// Print contents of nodeI
 template<class Type>
 void Foam::dynamicIndexedOctree<Type>::print
 (
@@ -2985,7 +2755,6 @@ void Foam::dynamicIndexedOctree<Type>::writeTreeInfo() const
 }
 
 
-// Print contents of nodeI
 template<class Type>
 bool Foam::dynamicIndexedOctree<Type>::write(Ostream& os) const
 {
diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H
index 3c1d969c46f2eeff85be614a75b1687f8256c1ee..8017a943fb5945fd81a4ea992e4ba48647d0024b 100644
--- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H
+++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ SourceFiles
 namespace Foam
 {
 
-typedef DynamicList<autoPtr<DynamicList<label > > > contentListList;
+typedef DynamicList<autoPtr<DynamicList<label >>> contentListList;
 
 // Forward declaration of classes
 template<class Type> class dynamicIndexedOctree;
@@ -181,7 +181,7 @@ private:
             //  according to where they are in relation to mid.
             void divide
             (
-                const autoPtr<DynamicList<label> >& indices,
+                const autoPtr<DynamicList<label>>& indices,
                 const treeBoundBox& bb,
                 contentListList& result
             ) const;
@@ -206,17 +206,6 @@ private:
                 label& nLevels
             );
 
-//            static label compactContents
-//            (
-//                DynamicList<node>& nodes,
-//                DynamicList<labelList>& contents,
-//                const label compactLevel,
-//                const label nodeI,
-//                const label level,
-//                List<labelList>& compactedContents,
-//                label& compactI
-//            );
-
             //- Determine inside/outside per node (mixed if cannot be
             //  determined). Only valid for closed shapes.
             volumeType calcVolumeType(const label nodeI) const;
@@ -266,7 +255,7 @@ private:
             );
 
             //- Helper: take point on face(s) of bb and push it away from
-            //  edges of face.
+            //  edges of face.  If pt is not on a face does nothing.
             static point pushPointIntoFace
             (
                 const treeBoundBox& bb,
@@ -274,16 +263,8 @@ private:
                 const point& pt
             );
 
-            ////- Push point on multiple faces away from any corner/edge.
-            //static void checkMultipleFaces
-            //(
-            //    const treeBoundBox& bb,
-            //    const vector& dir,          // end-start
-            //    pointIndexHit& faceHitInfo,
-            //    direction& faceID
-            //);
-
             //- Walk to parent of node+octant.
+            //  Return false if top of tree reached.
             bool walkToParent
             (
                 const label nodeI,
@@ -435,9 +416,9 @@ public:
         );
 
         //- Clone
-        autoPtr<dynamicIndexedOctree<Type> > clone() const
+        autoPtr<dynamicIndexedOctree<Type>> clone() const
         {
-            return autoPtr<dynamicIndexedOctree<Type> >
+            return autoPtr<dynamicIndexedOctree<Type>>
             (
                 new dynamicIndexedOctree<Type>(*this)
             );
@@ -683,7 +664,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dynamicIndexedOctree.C"
+    #include "dynamicIndexedOctree.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C
index 821e4ff5007bb35a1f2d07d45a98ef2a2ca0f01c..94f1b6f02e1f1574adf651f703274d65d5d00d92 100644
--- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C
+++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,8 +55,6 @@ Foam::dynamicTreeDataPoint::shapePoints() const
 }
 
 
-//- Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
-//  Only makes sense for closed surfaces.
 Foam::volumeType Foam::dynamicTreeDataPoint::getVolumeType
 (
     const dynamicIndexedOctree<dynamicTreeDataPoint>& oc,
@@ -67,7 +65,6 @@ Foam::volumeType Foam::dynamicTreeDataPoint::getVolumeType
 }
 
 
-// Check if any point on shape is inside cubeBb.
 bool Foam::dynamicTreeDataPoint::overlaps
 (
     const label index,
@@ -78,7 +75,6 @@ bool Foam::dynamicTreeDataPoint::overlaps
 }
 
 
-// Check if any point on shape is inside sphere.
 bool Foam::dynamicTreeDataPoint::overlaps
 (
     const label index,
@@ -99,8 +95,6 @@ bool Foam::dynamicTreeDataPoint::overlaps
 }
 
 
-// Calculate nearest point to sample. Updates (if any) nearestDistSqr, minIndex,
-// nearestPoint.
 void Foam::dynamicTreeDataPoint::findNearest
 (
     const labelUList& indices,
@@ -129,8 +123,6 @@ void Foam::dynamicTreeDataPoint::findNearest
 }
 
 
-//- Calculates nearest (to line) point in shape.
-//  Returns point and distance (squared)
 void Foam::dynamicTreeDataPoint::findNearest
 (
     const labelUList& indices,
diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
index 9706ffc52fc7f63740127baad6b6df5b0e95c06a..2480f2dc75ff30b0b71d569791b4704a3b440e42 100644
--- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
+++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,8 +37,6 @@ Foam::scalar Foam::indexedOctree<Type>::perturbTol_ = 10*SMALL;
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Does bb intersect a sphere around sample? Or is any corner point of bb
-// closer than nearestDistSqr to sample.
 template<class Type>
 bool Foam::indexedOctree<Type>::overlaps
 (
@@ -54,8 +52,6 @@ bool Foam::indexedOctree<Type>::overlaps
 }
 
 
-// Does bb intersect a sphere around sample? Or is any corner point of bb
-// closer than nearestDistSqr to sample.
 template<class Type>
 bool Foam::indexedOctree<Type>::overlaps
 (
@@ -113,12 +109,6 @@ bool Foam::indexedOctree<Type>::overlaps
 }
 
 
-//
-// Construction helper routines
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-
-// Split list of indices into 8 bins
 template<class Type>
 void Foam::indexedOctree<Type>::divide
 (
@@ -127,7 +117,7 @@ void Foam::indexedOctree<Type>::divide
     labelListList& result
 ) const
 {
-    List<DynamicList<label> > subIndices(8);
+    List<DynamicList<label>> subIndices(8);
     for (direction octant = 0; octant < subIndices.size(); octant++)
     {
         subIndices[octant].setCapacity(indices.size()/8);
@@ -161,7 +151,6 @@ void Foam::indexedOctree<Type>::divide
 }
 
 
-// Subdivide the (content) node.
 template<class Type>
 typename Foam::indexedOctree<Type>::node
 Foam::indexedOctree<Type>::divide
@@ -231,7 +220,6 @@ Foam::indexedOctree<Type>::divide
 }
 
 
-// Split any contents node with more than minSize elements.
 template<class Type>
 void Foam::indexedOctree<Type>::splitNodes
 (
@@ -284,8 +272,6 @@ void Foam::indexedOctree<Type>::splitNodes
 }
 
 
-// Reorder contents to be in same order as nodes. Returns number of nodes on
-// the compactLevel.
 template<class Type>
 Foam::label Foam::indexedOctree<Type>::compactContents
 (
@@ -353,15 +339,16 @@ Foam::label Foam::indexedOctree<Type>::compactContents
 }
 
 
-// Pre-calculates wherever possible the volume status per node/subnode.
-// Recurses to determine status of lowest level boxes. Level above is
-// combination of octants below.
 template<class Type>
 Foam::volumeType Foam::indexedOctree<Type>::calcVolumeType
 (
     const label nodeI
 ) const
 {
+    // Pre-calculates wherever possible the volume status per node/subnode.
+    // Recurses to determine status of lowest level boxes. Level above is
+    // combination of octants below.
+
     const node& nod = nodes_[nodeI];
 
     volumeType myType = volumeType::UNKNOWN;
@@ -497,13 +484,6 @@ Foam::volumeType Foam::indexedOctree<Type>::getSide
 }
 
 
-//
-// Query routines
-// ~~~~~~~~~~~~~~
-//
-
-
-// Find nearest point starting from nodeI
 template<class Type>
 template<class FindNearestOp>
 void Foam::indexedOctree<Type>::findNearest
@@ -580,7 +560,6 @@ void Foam::indexedOctree<Type>::findNearest
 }
 
 
-// Find nearest point to line.
 template<class Type>
 template<class FindNearestOp>
 void Foam::indexedOctree<Type>::findNearest
@@ -676,8 +655,6 @@ Foam::treeBoundBox Foam::indexedOctree<Type>::subBbox
 }
 
 
-// Takes a bb and a point on/close to the edge of the bb and pushes the point
-// inside by a small fraction.
 template<class Type>
 Foam::point Foam::indexedOctree<Type>::pushPoint
 (
@@ -747,8 +724,6 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
 }
 
 
-// Takes a bb and a point on the edge of the bb and pushes the point
-// outside by a small fraction.
 template<class Type>
 Foam::point Foam::indexedOctree<Type>::pushPoint
 (
@@ -859,9 +834,6 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
 }
 
 
-// Guarantees that if pt is on a face it gets perturbed so it is away
-// from the face edges.
-// If pt is not on a face does nothing.
 template<class Type>
 Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
 (
@@ -1019,205 +991,6 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
 }
 
 
-//// Takes a bb and a point on the outside of the bb. Checks if on multiple
-// faces
-//// and if so perturbs point so it is only on one face.
-//template<class Type>
-//void Foam::indexedOctree<Type>::checkMultipleFaces
-//(
-//    const treeBoundBox& bb,
-//    const vector& dir,          // end-start
-//    pointIndexHit& faceHitInfo,
-//    direction& faceID
-//)
-//{
-//    // Do the quick elimination of no or one face.
-//    if
-//    (
-//        (faceID == 0)
-//     || (faceID == treeBoundBox::LEFTBIT)
-//     || (faceID == treeBoundBox::RIGHTBIT)
-//     || (faceID == treeBoundBox::BOTTOMBIT)
-//     || (faceID == treeBoundBox::TOPBIT)
-//     || (faceID == treeBoundBox::BACKBIT)
-//     || (faceID == treeBoundBox::FRONTBIT)
-//    )
-//    {
-//        return;
-//    }
-//
-//
-//    // Check the direction of vector w.r.t. faces being intersected.
-//    FixedList<scalar, 6> inproducts(-GREAT);
-//
-//    direction nFaces = 0;
-//
-//    if (faceID & treeBoundBox::LEFTBIT)
-//    {
-//        inproducts[treeBoundBox::LEFT] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::LEFT]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//    if (faceID & treeBoundBox::RIGHTBIT)
-//    {
-//        inproducts[treeBoundBox::RIGHT] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::RIGHT]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//
-//    if (faceID & treeBoundBox::BOTTOMBIT)
-//    {
-//        inproducts[treeBoundBox::BOTTOM] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::BOTTOM]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//    if (faceID & treeBoundBox::TOPBIT)
-//    {
-//        inproducts[treeBoundBox::TOP] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::TOP]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//
-//    if (faceID & treeBoundBox::BACKBIT)
-//    {
-//        inproducts[treeBoundBox::BACK] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::BACK]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//    if (faceID & treeBoundBox::FRONTBIT)
-//    {
-//        inproducts[treeBoundBox::FRONT] = mag
-//        (
-//            treeBoundBox::faceNormals[treeBoundBox::FRONT]
-//          & dir
-//        );
-//        nFaces++;
-//    }
-//
-//    if (nFaces == 0 || nFaces == 1 || nFaces > 3)
-//    {
-//        FatalErrorInFunction
-//            << "Problem : nFaces:" << nFaces << abort(FatalError);
-//    }
-//
-//    // Keep point on most perpendicular face; shift it away from the aligned
-//    // ones.
-//    // E.g. line hits top and left face:
-//    //     a
-//    // ----+----+
-//    //     |    |
-//    //     |    |
-//    //     +----+
-//    // Shift point down (away from top):
-//    //
-//    //    a+----+
-//    // ----|    |
-//    //     |    |
-//    //     +----+
-//
-//    label maxIndex = -1;
-//    scalar maxInproduct = -GREAT;
-//
-//    for (direction i = 0; i < 6; i++)
-//    {
-//        if (inproducts[i] > maxInproduct)
-//        {
-//            maxInproduct = inproducts[i];
-//            maxIndex = i;
-//        }
-//    }
-//
-//    if (maxIndex == -1)
-//    {
-//        FatalErrorInFunction
-//            << "Problem maxIndex:" << maxIndex << " inproducts:" << inproducts
-//            << abort(FatalError);
-//    }
-//
-//    const point oldPoint(faceHitInfo.rawPoint());
-//    const direction oldFaceID = faceID;
-//
-//    // 1. Push point into bb, away from all corners
-//
-//    faceHitInfo.rawPoint() = pushPoint(bb, oldFaceID, oldPoint, true);
-//
-//    // 2. Snap it back onto the preferred face
-//
-//    if (maxIndex == treeBoundBox::LEFT)
-//    {
-//        faceHitInfo.rawPoint().x() = bb.min().x();
-//        faceID = treeBoundBox::LEFTBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::RIGHT)
-//    {
-//        faceHitInfo.rawPoint().x() = bb.max().x();
-//        faceID = treeBoundBox::RIGHTBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::BOTTOM)
-//    {
-//        faceHitInfo.rawPoint().y() = bb.min().y();
-//        faceID = treeBoundBox::BOTTOMBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::TOP)
-//    {
-//        faceHitInfo.rawPoint().y() = bb.max().y();
-//        faceID = treeBoundBox::TOPBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::BACK)
-//    {
-//        faceHitInfo.rawPoint().z() = bb.min().z();
-//        faceID = treeBoundBox::BACKBIT;
-//    }
-//    else if (maxIndex == treeBoundBox::FRONT)
-//    {
-//        faceHitInfo.rawPoint().z() = bb.max().z();
-//        faceID = treeBoundBox::FRONTBIT;
-//    }
-//
-//    Pout<< "From ray:" << dir
-//        << " from point:" << oldPoint
-//        << " on faces:" << faceString(oldFaceID)
-//        << " of bb:" << bb
-//        << " with inprods:" << inproducts
-//        << " maxIndex:" << maxIndex << endl
-//        << "perturbed to point:" << faceHitInfo.rawPoint()
-//        << " on face:" << faceString(faceID)
-//        << endl;
-//
-//
-//    if (debug)
-//    {
-//        if (faceID != bb.faceBits(faceHitInfo.rawPoint()))
-//        {
-//            FatalErrorInFunction
-//                << "Pushed point from " << oldPoint
-//                << " on face:" << oldFaceID << " of bb:" << bb << endl
-//                << "onto " << faceHitInfo.rawPoint()
-//                << " on face:" << faceID
-//                << " which is not consistent with geometric face "
-//                <<  bb.faceBits(faceHitInfo.rawPoint())
-//                << abort(FatalError);
-//        }
-//    }
-//}
-
-
-// Get parent node and octant. Return false if top of tree reached.
 template<class Type>
 bool Foam::indexedOctree<Type>::walkToParent
 (
@@ -1264,10 +1037,6 @@ bool Foam::indexedOctree<Type>::walkToParent
 }
 
 
-// Walk tree to neighbouring node. Gets current position as
-// node and octant in this node and walks in the direction given by
-// the facePointBits (combination of treeBoundBox::LEFTBIT, TOPBIT etc.)
-// Returns false if edge of tree hit.
 template<class Type>
 bool Foam::indexedOctree<Type>::walkToNeighbour
 (
@@ -1277,6 +1046,10 @@ bool Foam::indexedOctree<Type>::walkToNeighbour
     direction& octant
 ) const
 {
+    // Gets current position as node and octant in this node and walks in the
+    // direction given by the facePointBits (combination of
+    // treeBoundBox::LEFTBIT, TOPBIT etc.)  Returns false if edge of tree hit.
+
     label oldNodeI = nodeI;
     direction oldOctant = octant;
 
@@ -1552,12 +1325,6 @@ Foam::word Foam::indexedOctree<Type>::faceString
 }
 
 
-// Traverse a node. If intersects a triangle return first intersection point:
-//  hitInfo.index = index of shape
-//  hitInfo.point = point on shape
-// Else return a miss and the bounding box face hit:
-//  hitInfo.point = coordinate of intersection of ray with bounding box
-//  hitBits  = posbits of point on bounding box
 template<class Type>
 template<class FindIntersectOp>
 void Foam::indexedOctree<Type>::traverseNode
@@ -1577,6 +1344,14 @@ void Foam::indexedOctree<Type>::traverseNode
     const FindIntersectOp& fiOp
 ) const
 {
+    // Traverse a node. If intersects a triangle return first intersection
+    // point:
+    //  hitInfo.index = index of shape
+    //  hitInfo.point = point on shape
+    // Else return a miss and the bounding box face hit:
+    //  hitInfo.point = coordinate of intersection of ray with bounding box
+    //  hitBits  = posbits of point on bounding box
+
     if (debug)
     {
         const treeBoundBox octantBb(subBbox(nodeI, octant));
@@ -1718,7 +1493,6 @@ void Foam::indexedOctree<Type>::traverseNode
 }
 
 
-// Find first intersection
 template<class Type>
 template<class FindIntersectOp>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
@@ -1911,7 +1685,6 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
 }
 
 
-// Find first intersection
 template<class Type>
 template<class FindIntersectOp>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
@@ -1937,7 +1710,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
         if ((startBit & endBit) != 0)
         {
             // Both start and end outside domain and in same block.
-            return pointIndexHit(false, vector::zero, -1);
+            return pointIndexHit(false, Zero, -1);
         }
 
 
@@ -1951,7 +1724,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
             // Track start to inside domain.
             if (!treeBb.intersects(start, end, trackStart))
             {
-                return pointIndexHit(false, vector::zero, -1);
+                return pointIndexHit(false, Zero, -1);
             }
         }
 
@@ -1960,7 +1733,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
             // Track end to inside domain.
             if (!treeBb.intersects(end, trackStart, trackEnd))
             {
-                return pointIndexHit(false, vector::zero, -1);
+                return pointIndexHit(false, Zero, -1);
             }
         }
 
@@ -2255,7 +2028,6 @@ void Foam::indexedOctree<Type>::findNear
 }
 
 
-// Number of elements in node.
 template<class Type>
 Foam::label Foam::indexedOctree<Type>::countElements
 (
@@ -2550,27 +2322,6 @@ Foam::scalar& Foam::indexedOctree<Type>::perturbTol()
 }
 
 
-//template<class Type>
-//bool Foam::indexedOctree<Type>::findAnyOverlap
-//(
-//    const point& sample,
-//    const scalar startDistSqr
-//) const
-//{
-//    if (nodes_.size())
-//    {
-//        return findAnyOverlap
-//        (
-//            0,
-//            sample,
-//            startDistSqr
-//        );
-//    }
-//
-//    return false;
-//}
-
-
 template<class Type>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
 (
@@ -2599,7 +2350,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
 {
     scalar nearestDistSqr = startDistSqr;
     label nearestShapeI = -1;
-    point nearestPoint = vector::zero;
+    point nearestPoint = Zero;
 
     if (nodes_.size())
     {
@@ -2650,7 +2401,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
 ) const
 {
     label nearestShapeI = -1;
-    point nearestPoint = vector::zero;
+    point nearestPoint = Zero;
 
     if (nodes_.size())
     {
@@ -2672,7 +2423,6 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
 }
 
 
-// Find nearest intersection
 template<class Type>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
 (
@@ -2690,7 +2440,6 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
 }
 
 
-// Find nearest intersection
 template<class Type>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny
 (
@@ -2708,7 +2457,6 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny
 }
 
 
-// Find nearest intersection
 template<class Type>
 template<class FindIntersectOp>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
@@ -2722,7 +2470,6 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
 }
 
 
-// Find nearest intersection
 template<class Type>
 template<class FindIntersectOp>
 Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny
@@ -2773,7 +2520,6 @@ Foam::labelList Foam::indexedOctree<Type>::findSphere
 }
 
 
-// Find node (as parent+octant) containing point
 template<class Type>
 Foam::labelBits Foam::indexedOctree<Type>::findNode
 (
@@ -2874,7 +2620,6 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices
 }
 
 
-// Determine type (inside/outside/mixed) per node.
 template<class Type>
 Foam::volumeType Foam::indexedOctree<Type>::getVolumeType
 (
@@ -2886,13 +2631,6 @@ Foam::volumeType Foam::indexedOctree<Type>::getVolumeType
         return volumeType::UNKNOWN;
     }
 
-//    // If the sample is not within the octree, then have to query shapes
-//    // directly
-//    if (!nodes_[0].bb_.contains(sample))
-//    {
-//        return volumeType(shapes_.getVolumeType(*this, sample));
-//    }
-
     if (nodeTypes_.size() != 8*nodes_.size())
     {
         // Calculate type for every octant of node.
@@ -2975,7 +2713,6 @@ void Foam::indexedOctree<Type>::findNear
 }
 
 
-// Print contents of nodeI
 template<class Type>
 void Foam::indexedOctree<Type>::print
 (
@@ -3049,7 +2786,6 @@ void Foam::indexedOctree<Type>::print
 }
 
 
-// Print contents of nodeI
 template<class Type>
 bool Foam::indexedOctree<Type>::write(Ostream& os) const
 {
diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H
index e111d4f4af725b66a146c52f565c6d858d5fd5b0..0fb024f2d182688ce4ffab7c6e3b8d23e9e4a2a1 100644
--- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H
+++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -181,6 +181,8 @@ private:
                 DynamicList<labelList>& contents
             ) const;
 
+            //- Reorder contents to be in same order as nodes.
+            //  Returns number of nodes on the compactLevel.
             static label compactContents
             (
                 DynamicList<node>& nodes,
@@ -245,6 +247,9 @@ private:
 
             //- Helper: take point on face(s) of bb and push it away from
             //  edges of face.
+            //  Guarantees that if pt is on a face it gets perturbed
+            //  so it is away from the face edges.
+            //  If pt is not on a face does nothing.
             static point pushPointIntoFace
             (
                 const treeBoundBox& bb,
@@ -252,15 +257,6 @@ private:
                 const point& pt
             );
 
-            ////- Push point on multiple faces away from any corner/edge.
-            //static void checkMultipleFaces
-            //(
-            //    const treeBoundBox& bb,
-            //    const vector& dir,          // end-start
-            //    pointIndexHit& faceHitInfo,
-            //    direction& faceID
-            //);
-
             //- Walk to parent of node+octant.
             bool walkToParent
             (
@@ -434,9 +430,9 @@ public:
         indexedOctree(const Type& shapes, Istream& is);
 
         //- Clone
-        autoPtr<indexedOctree<Type> > clone() const
+        autoPtr<indexedOctree<Type>> clone() const
         {
-            return autoPtr<indexedOctree<Type> >
+            return autoPtr<indexedOctree<Type>>
             (
                 new indexedOctree<Type>(*this)
             );
@@ -697,7 +693,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "indexedOctree.C"
+    #include "indexedOctree.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/algorithms/indexedOctree/labelBits.H b/src/OpenFOAM/algorithms/indexedOctree/labelBits.H
index b2a8907e3ce2f54be9b2927b963e933f9fb8d9c5..665318994519c8da86dd7b27184bf01c5b4bc928 100644
--- a/src/OpenFOAM/algorithms/indexedOctree/labelBits.H
+++ b/src/OpenFOAM/algorithms/indexedOctree/labelBits.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ class labelBits
 
         inline static label pack(const label val, const direction bits)
         {
-#           ifdef FULLDEBUG
+            #ifdef FULLDEBUG
             if (bits > 7 || (((val<<3)>>3) != val))
             {
                 FatalErrorInFunction
@@ -66,7 +66,7 @@ class labelBits
                     << label(8*sizeof(label)-3) << " bit representation"
                     << abort(FatalError);
             }
-#           endif
+            #endif
 
             return (val<<3) | bits;
         }
diff --git a/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.H b/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.H
index 85901731f22ae7a7d3e946bccf360dba4ccb07a2..98be8b170c35fada1e3757f0aab769d1a630246f 100644
--- a/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.H
+++ b/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Dictionary.C"
+    #include "Dictionary.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C
index 8ddb9e062d49945a041a706b4d5aaa1679b16411..9693eb9488b81a1b38aa05a6e676b41e6dc87f45 100644
--- a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C
+++ b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,6 @@ Foam::DictionaryBase<IDLListType, T>::DictionaryBase(Istream& is)
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Find and return T
 template<class IDLListType, class T>
 bool Foam::DictionaryBase<IDLListType, T>::found(const word& keyword) const
 {
@@ -96,7 +95,6 @@ bool Foam::DictionaryBase<IDLListType, T>::found(const word& keyword) const
 }
 
 
-// Find and return T*, return NULL if not found
 template<class IDLListType, class T>
 const T* Foam::DictionaryBase<IDLListType, T>::lookupPtr
 (
@@ -116,7 +114,6 @@ const T* Foam::DictionaryBase<IDLListType, T>::lookupPtr
 }
 
 
-// Find and return T*, return NULL if not found
 template<class IDLListType, class T>
 T* Foam::DictionaryBase<IDLListType, T>::lookupPtr(const word& keyword)
 {
@@ -133,7 +130,6 @@ T* Foam::DictionaryBase<IDLListType, T>::lookupPtr(const word& keyword)
 }
 
 
-// Find and return T*, FatalError if keyword not found
 template<class IDLListType, class T>
 const T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword) const
 {
@@ -150,7 +146,6 @@ const T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword) const
 }
 
 
-// Find and return T*, FatalError if keyword not found
 template<class IDLListType, class T>
 T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword)
 {
@@ -167,7 +162,6 @@ T* Foam::DictionaryBase<IDLListType, T>::lookup(const word& keyword)
 }
 
 
-// Return the table of contents
 template<class IDLListType, class T>
 Foam::wordList Foam::DictionaryBase<IDLListType, T>::toc() const
 {
@@ -188,7 +182,6 @@ Foam::wordList Foam::DictionaryBase<IDLListType, T>::toc() const
 }
 
 
-// Add at head of dictionary
 template<class IDLListType, class T>
 void Foam::DictionaryBase<IDLListType, T>::insert(const word& keyword, T* tPtr)
 {
@@ -198,7 +191,6 @@ void Foam::DictionaryBase<IDLListType, T>::insert(const word& keyword, T* tPtr)
 }
 
 
-// Add at tail of dictionary
 template<class IDLListType, class T>
 void Foam::DictionaryBase<IDLListType, T>::append(const word& keyword, T* tPtr)
 {
diff --git a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H
index f9294eedd0338e540eef4c422307a98c2cda0bb1..9b85e0159443b0aa1605e343c851e8821246e23a 100644
--- a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H
+++ b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -183,7 +183,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DictionaryBase.C"
+    #include "DictionaryBase.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Dictionaries/PtrDictionary/PtrDictionary.H b/src/OpenFOAM/containers/Dictionaries/PtrDictionary/PtrDictionary.H
index a287e326cb635215ba66b474f9ae9604744753b1..974a9678906ac7b80526670b7c93738622c61e8e 100644
--- a/src/OpenFOAM/containers/Dictionaries/PtrDictionary/PtrDictionary.H
+++ b/src/OpenFOAM/containers/Dictionaries/PtrDictionary/PtrDictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PtrDictionary.C"
+    #include "PtrDictionary.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Dictionaries/PtrListDictionary/PtrListDictionary.H b/src/OpenFOAM/containers/Dictionaries/PtrListDictionary/PtrListDictionary.H
index 761bccd76e38a1ce9a2c23e2343385da0fb6a7d6..ab45e2c49193e6926c334b887675beae9493a4f8 100644
--- a/src/OpenFOAM/containers/Dictionaries/PtrListDictionary/PtrListDictionary.H
+++ b/src/OpenFOAM/containers/Dictionaries/PtrListDictionary/PtrListDictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PtrListDictionary.C"
+    #include "PtrListDictionary.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Dictionaries/UDictionary/UDictionary.H b/src/OpenFOAM/containers/Dictionaries/UDictionary/UDictionary.H
index efe4542b0c9bdad10da66e22736d6e27fac23758..b01140d28388805e7fe6383e765d5054cde75cc9 100644
--- a/src/OpenFOAM/containers/Dictionaries/UDictionary/UDictionary.H
+++ b/src/OpenFOAM/containers/Dictionaries/UDictionary/UDictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UDictionary.C"
+    #include "UDictionary.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Dictionaries/UPtrDictionary/UPtrDictionary.H b/src/OpenFOAM/containers/Dictionaries/UPtrDictionary/UPtrDictionary.H
index f83825a32747a4c7339cc1d66928f0a19bcec138..6be6c44a65144c2c851056477fea6e4a2bb0ec74 100644
--- a/src/OpenFOAM/containers/Dictionaries/UPtrDictionary/UPtrDictionary.H
+++ b/src/OpenFOAM/containers/Dictionaries/UPtrDictionary/UPtrDictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UPtrDictionary.C"
+    #include "UPtrDictionary.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.C b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.C
index 4f6ad375ab9db6ab7187a3c5cd9474f1c77e1a5e..df115134ef3379bf3156c1700b53e5a2095db5a1 100644
--- a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.C
+++ b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,6 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct given initial table size
 template<class T, class Key, class Hash>
 Foam::HashPtrTable<T, Key, Hash>::HashPtrTable(const label size)
 :
@@ -36,7 +35,6 @@ Foam::HashPtrTable<T, Key, Hash>::HashPtrTable(const label size)
 {}
 
 
-// Construct as copy
 template<class T, class Key, class Hash>
 Foam::HashPtrTable<T, Key, Hash>::HashPtrTable
 (
diff --git a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H
index 783e579989125d1382cf5959949716823688db68..796076fe22a49226fa4f5e2105ed9863fe11226a 100644
--- a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H
+++ b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,7 +153,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "HashPtrTable.C"
+    #include "HashPtrTable.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C
index 814fcdcc8cdf061f11f7a4cf637818b74c2b6f3b..08dc33d3cfc8eaa4f096a0441a0d907f8032dba9 100644
--- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C
+++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,7 +166,6 @@ void Foam::HashSet<Key, Hash>::operator^=(const HashSet<Key, Hash>& rhs)
 }
 
 
-// same as HashTable::erase()
 template<class Key, class Hash>
 void Foam::HashSet<Key, Hash>::operator-=(const HashSet<Key, Hash>& rhs)
 {
diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H
index ffe4e8a76664a04fa975cf89a2c6ce6dfe6a7b49..bbc04789bde89475ac1a64c6870fb3c25158b30c 100644
--- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H
+++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,13 +92,13 @@ public:
         {}
 
         //- Construct by transferring the parameter contents
-        HashSet(const Xfer<HashSet<Key, Hash> >& hs)
+        HashSet(const Xfer<HashSet<Key, Hash>>& hs)
         :
             HashTable<nil, Key, Hash>(hs)
         {}
 
         //- Construct by transferring the parameter contents
-        HashSet(const Xfer<HashTable<nil, Key, Hash> >& hs)
+        HashSet(const Xfer<HashTable<nil, Key, Hash>>& hs)
         :
             HashTable<nil, Key, Hash>(hs)
         {}
@@ -208,7 +208,7 @@ HashSet<Key,Hash> operator^
 typedef HashSet<> wordHashSet;
 
 //- A HashSet with label keys.
-typedef HashSet<label, Hash<label> > labelHashSet;
+typedef HashSet<label, Hash<label>> labelHashSet;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -218,7 +218,7 @@ typedef HashSet<label, Hash<label> > labelHashSet;
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "HashSet.C"
+    #include "HashSet.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C
index 2ebab1e3a9da50d52c5e5a2c25def350400fd4e1..9755dc56c1cf0cb6b94c6df419b5a23302fb8197 100644
--- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C
+++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht)
 template<class T, class Key, class Hash>
 Foam::HashTable<T, Key, Hash>::HashTable
 (
-    const Xfer<HashTable<T, Key, Hash> >& ht
+    const Xfer<HashTable<T, Key, Hash>>& ht
 )
 :
     HashTableCore(),
@@ -121,13 +121,12 @@ bool Foam::HashTable<T, Key, Hash>::found(const Key& key) const
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
-        Info<< "HashTable<T, Key, Hash>::found(const Key& key) : "
-            << "Entry " << key << " not found in hash table\n";
+        InfoInFunction << "Entry " << key << " not found in hash table\n";
     }
-#   endif
+    #endif
 
     return false;
 }
@@ -153,13 +152,12 @@ Foam::HashTable<T, Key, Hash>::find
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
-        Info<< "HashTable<T, Key, Hash>::find(const Key& key) : "
-            << "Entry " << key << " not found in hash table\n";
+        InfoInFunction << "Entry " << key << " not found in hash table\n";
     }
-#   endif
+    #endif
 
     return iterator();
 }
@@ -185,13 +183,12 @@ Foam::HashTable<T, Key, Hash>::find
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
-        Info<< "HashTable<T, Key, Hash>::find(const Key& key) const : "
-            << "Entry " << key << " not found in hash table\n";
+        InfoInFunction << "Entry " << key << " not found in hash table\n";
     }
-#   endif
+    #endif
 
     return const_iterator();
 }
@@ -250,7 +247,7 @@ bool Foam::HashTable<T, Key, Hash>::set
         prev = ep;
     }
 
-    // not found, insert it at the head
+    // Not found, insert it at the head
     if (!existing)
     {
         table_[hashIdx] = new hashedEntry(key, table_[hashIdx], newEntry);
@@ -258,39 +255,36 @@ bool Foam::HashTable<T, Key, Hash>::set
 
         if (double(nElmts_)/tableSize_ > 0.8 && tableSize_ < maxTableSize)
         {
-#           ifdef FULLDEBUG
+            #ifdef FULLDEBUG
             if (debug)
             {
-                Info<< "HashTable<T, Key, Hash>::set"
-                    "(const Key& key, T newEntry) : "
-                    "Doubling table size\n";
+                InfoInFunction << "Doubling table size\n";
             }
-#           endif
+            #endif
 
             resize(2*tableSize_);
         }
     }
     else if (protect)
     {
-        // found - but protected from overwriting
+        // Found - but protected from overwriting
         // this corresponds to the STL 'insert' convention
-#       ifdef FULLDEBUG
+        #ifdef FULLDEBUG
         if (debug)
         {
-            Info<< "HashTable<T, Key, Hash>::set"
-                "(const Key& key, T newEntry, true) : "
-                "Cannot insert " << key << " already in hash table\n";
+            InfoInFunction
+                << "Cannot insert " << key << " already in hash table\n";
         }
-#       endif
+        #endif
         return false;
     }
     else
     {
-        // found - overwrite existing entry
+        // Found - overwrite existing entry
         // this corresponds to the Perl convention
         hashedEntry* ep = new hashedEntry(key, existing->next_, newEntry);
 
-        // replace existing element - within list or insert at the head
+        // Replace existing element - within list or insert at the head
         if (prev)
         {
             prev->next_ = ep;
@@ -310,7 +304,7 @@ bool Foam::HashTable<T, Key, Hash>::set
 template<class T, class Key, class Hash>
 bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
 {
-    // note: entryPtr_ is NULL for end(), so this catches that too
+    // Note: entryPtr_ is NULL for end(), so this catches that too
     if (entryPtr_)
     {
         // Search element before entryPtr_
@@ -332,7 +326,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
 
         if (prev)
         {
-            // has an element before entryPtr - reposition to there
+            // Has an element before entryPtr - reposition to there
             prev->next_ = entryPtr_->next_;
             delete entryPtr_;
             entryPtr_ = prev;
@@ -343,7 +337,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
             hashTable_->table_[hashIndex_] = entryPtr_->next_;
             delete entryPtr_;
 
-            // assign any non-NULL pointer value so it doesn't look
+            // Assign any non-NULL pointer value so it doesn't look
             // like end()/cend()
             entryPtr_ = reinterpret_cast<hashedEntry*>(this);
 
@@ -369,16 +363,14 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
 }
 
 
-
-// NOTE:
-// We use (const iterator&) here, but manipulate its contents anyhow.
-// The parameter should be (iterator&), but then the compiler doesn't find
-// it correctly and tries to call as (iterator) instead.
-//
 template<class T, class Key, class Hash>
 bool Foam::HashTable<T, Key, Hash>::erase(const iterator& iter)
 {
-    // adjust iterator after erase
+    // NOTE: We use (const iterator&) here, but manipulate its contents anyhow.
+    // The parameter should be (iterator&), but then the compiler doesn't find
+    // it correctly and tries to call as (iterator) instead.
+    //
+    // Adjust iterator after erase
     return const_cast<iterator&>(iter).erase();
 }
 
@@ -439,13 +431,12 @@ void Foam::HashTable<T, Key, Hash>::resize(const label sz)
 
     if (newSize == tableSize_)
     {
-#       ifdef FULLDEBUG
+        #ifdef FULLDEBUG
         if (debug)
         {
-            Info<< "HashTable<T, Key, Hash>::resize(const label) : "
-                << "new table size == old table size\n";
+            InfoInFunction << "New table size == old table size\n";
         }
-#       endif
+        #endif
 
         return;
     }
@@ -508,7 +499,7 @@ void Foam::HashTable<T, Key, Hash>::shrink()
 
     if (newSize < tableSize_)
     {
-        // avoid having the table disappear on us
+        // Avoid having the table disappear on us
         resize(newSize ? newSize : 2);
     }
 }
@@ -517,7 +508,7 @@ void Foam::HashTable<T, Key, Hash>::shrink()
 template<class T, class Key, class Hash>
 void Foam::HashTable<T, Key, Hash>::transfer(HashTable<T, Key, Hash>& ht)
 {
-    // as per the Destructor
+    // As per the Destructor
     if (table_)
     {
         clear();
@@ -551,7 +542,7 @@ void Foam::HashTable<T, Key, Hash>::operator=
             << abort(FatalError);
     }
 
-    // could be zero-sized from a previous transfer()
+    // Could be zero-sized from a previous transfer()
     if (!tableSize_)
     {
         resize(rhs.tableSize_);
@@ -574,7 +565,7 @@ bool Foam::HashTable<T, Key, Hash>::operator==
     const HashTable<T, Key, Hash>& rhs
 ) const
 {
-    // sizes (number of keys) must match
+    // Sizes (number of keys) must match
     if (size() != rhs.size())
     {
         return false;
diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H
index 0b3218c40b6ae5fb2feb3f18da113b2f4621dc50..f2137687385dd8ef423e18072aa35869beb9c1e6 100644
--- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H
+++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -205,7 +205,7 @@ public:
         HashTable(const HashTable<T, Key, Hash>&);
 
         //- Construct by transferring the parameter contents
-        HashTable(const Xfer<HashTable<T, Key, Hash> >&);
+        HashTable(const Xfer<HashTable<T, Key, Hash>>&);
 
 
     //- Destructor
@@ -290,7 +290,7 @@ public:
             void transfer(HashTable<T, Key, Hash>&);
 
             //- Transfer contents to the Xfer container
-            inline Xfer<HashTable<T, Key, Hash> > xfer();
+            inline Xfer<HashTable<T, Key, Hash>> xfer();
 
 
     // Member Operators
@@ -546,13 +546,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "HashTableI.H"
+    #include "HashTableI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifndef NoHashTableC
 #ifdef NoRepository
-#   include "HashTable.C"
+    #include "HashTable.C"
 #endif
 #endif
 
diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H
index 9839015f02ae77eafba2045b7610d2f4bdba4639..b3e3406da55f80362542f08e0da4ebfd38a6bef8 100644
--- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H
+++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ inline bool Foam::HashTable<T, Key, Hash>::set
 
 
 template<class T, class Key, class Hash>
-inline Foam::Xfer<Foam::HashTable<T, Key, Hash> >
+inline Foam::Xfer<Foam::HashTable<T, Key, Hash>>
 Foam::HashTable<T, Key, Hash>::xfer()
 {
     return xferMove(*this);
diff --git a/src/OpenFOAM/containers/HashTables/Map/Map.H b/src/OpenFOAM/containers/HashTables/Map/Map.H
index 61da5981fd623b9ce1dec4b31807afe49ca378c6..f9d6082eada09469bb9e24d6c42b8169742229f6 100644
--- a/src/OpenFOAM/containers/HashTables/Map/Map.H
+++ b/src/OpenFOAM/containers/HashTables/Map/Map.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,14 +49,14 @@ namespace Foam
 template<class T>
 class Map
 :
-    public HashTable<T, label, Hash<label> >
+    public HashTable<T, label, Hash<label>>
 {
 
 public:
 
-    typedef typename HashTable<T, label, Hash<label> >::iterator iterator;
+    typedef typename HashTable<T, label, Hash<label>>::iterator iterator;
 
-    typedef typename HashTable<T, label, Hash<label> >::const_iterator
+    typedef typename HashTable<T, label, Hash<label>>::const_iterator
         const_iterator;
 
     // Constructors
@@ -64,31 +64,31 @@ public:
         //- Construct given initial size
         Map(const label size = 128)
         :
-            HashTable<T, label, Hash<label> >(size)
+            HashTable<T, label, Hash<label>>(size)
         {}
 
         //- Construct from Istream
         Map(Istream& is)
         :
-            HashTable<T, label, Hash<label> >(is)
+            HashTable<T, label, Hash<label>>(is)
         {}
 
         //- Construct as copy
         Map(const Map<T>& map)
         :
-            HashTable<T, label, Hash<label> >(map)
+            HashTable<T, label, Hash<label>>(map)
         {}
 
         //- Construct by transferring the parameter contents
-        Map(const Xfer<Map<T> >& map)
+        Map(const Xfer<Map<T>>& map)
         :
-            HashTable<T, label, Hash<label> >(map)
+            HashTable<T, label, Hash<label>>(map)
         {}
 
         //- Construct by transferring the parameter contents
-        Map(const Xfer<HashTable<T, label, Hash<label> > >& map)
+        Map(const Xfer<HashTable<T, label, Hash<label>>>& map)
         :
-            HashTable<T, label, Hash<label> >(map)
+            HashTable<T, label, Hash<label>>(map)
         {}
 
 };
diff --git a/src/OpenFOAM/containers/HashTables/PtrMap/PtrMap.H b/src/OpenFOAM/containers/HashTables/PtrMap/PtrMap.H
index c225048b01564fb8cf106148bea172e1c318997e..89054f95a11f02e5e60179653069f72d9f375773 100644
--- a/src/OpenFOAM/containers/HashTables/PtrMap/PtrMap.H
+++ b/src/OpenFOAM/containers/HashTables/PtrMap/PtrMap.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ namespace Foam
 template<class T>
 class PtrMap
 :
-    public HashPtrTable<T, label, Hash<label> >
+    public HashPtrTable<T, label, Hash<label>>
 {
 
 public:
@@ -59,19 +59,19 @@ public:
         //- Construct given initial map size
         PtrMap(const label size = 128)
         :
-            HashPtrTable<T, label, Hash<label> >(size)
+            HashPtrTable<T, label, Hash<label>>(size)
         {}
 
         //- Construct from Istream
         PtrMap(Istream& is)
         :
-            HashPtrTable<T, label, Hash<label> >(is)
+            HashPtrTable<T, label, Hash<label>>(is)
         {}
 
         //- Construct as copy
         PtrMap(const PtrMap<T>& map)
         :
-            HashPtrTable<T, label, Hash<label> >(map)
+            HashPtrTable<T, label, Hash<label>>(map)
         {}
 };
 
diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C
index 2b1dacbc39cd99cd5bf9e8759a1a4927920a6f77..05ad88f33e959c31fbc4a969884cc33c7629453e 100644
--- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C
+++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,12 +39,12 @@ Foam::label Foam::StaticHashTableCore::canonicalSize(const label size)
         return 0;
     }
 
-    // enforce power of two
+    // Enforce power of two
     unsigned int goodSize = size;
 
     if (goodSize & (goodSize - 1))
     {
-        // brute-force is fast enough
+        // Brute-force is fast enough
         goodSize = 1;
         while (goodSize < unsigned(size))
         {
@@ -58,7 +58,6 @@ Foam::label Foam::StaticHashTableCore::canonicalSize(const label size)
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct given initial table size
 template<class T, class Key, class Hash>
 Foam::StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)
 :
@@ -78,7 +77,6 @@ Foam::StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)
 }
 
 
-// Construct as copy
 template<class T, class Key, class Hash>
 Foam::StaticHashTable<T, Key, Hash>::StaticHashTable
 (
@@ -97,7 +95,7 @@ Foam::StaticHashTable<T, Key, Hash>::StaticHashTable
 template<class T, class Key, class Hash>
 Foam::StaticHashTable<T, Key, Hash>::StaticHashTable
 (
-    const Xfer<StaticHashTable<T, Key, Hash> >& ht
+    const Xfer<StaticHashTable<T, Key, Hash>>& ht
 )
 :
     StaticHashTableCore(),
@@ -137,13 +135,12 @@ bool Foam::StaticHashTable<T, Key, Hash>::found(const Key& key) const
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
-        Info<< "StaticHashTable<T, Key, Hash>::found(const Key&) : "
-            << "Entry " << key << " not found in hash table\n";
+        InfoInFunction << "Entry " << key << " not found in hash table\n";
     }
-#   endif
+    #endif
 
     return false;
 }
@@ -170,13 +167,12 @@ Foam::StaticHashTable<T, Key, Hash>::find
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
-        Info<< "StaticHashTable<T, Key, Hash>::find(const Key&) : "
-            << "Entry " << key << " not found in hash table\n";
+        InfoInFunction << "Entry " << key << " not found in hash table\n";
     }
-#   endif
+    #endif
 
     return end();
 }
@@ -203,19 +199,17 @@ Foam::StaticHashTable<T, Key, Hash>::find
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
-        Info<< "StaticHashTable<T, Key, Hash>::find(const Key&) const : "
-            << "Entry " << key << " not found in hash table\n";
+        InfoInFunction << "Entry " << key << " not found in hash table\n";
     }
-#   endif
+    #endif
 
     return cend();
 }
 
 
-// Return the table of contents
 template<class T, class Key, class Hash>
 Foam::List<Key> Foam::StaticHashTable<T, Key, Hash>::toc() const
 {
@@ -254,7 +248,7 @@ bool Foam::StaticHashTable<T, Key, Hash>::set
 
     if (existing == localKeys.size())
     {
-        // not found, append
+        // Not found, append
         List<T>& localObjects = objects_[hashIdx];
 
         localKeys.setSize(existing+1);
@@ -267,21 +261,20 @@ bool Foam::StaticHashTable<T, Key, Hash>::set
     }
     else if (protect)
     {
-        // found - but protected from overwriting
+        // Found - but protected from overwriting
         // this corresponds to the STL 'insert' convention
-#       ifdef FULLDEBUG
+        #ifdef FULLDEBUG
         if (debug)
         {
-            Info<< "StaticHashTable<T, Key, Hash>::set"
-                "(const Key& key, T newEntry, true) : "
-                "Cannot insert " << key << " already in hash table\n";
+            InfoInFunction
+                << "Cannot insert " << key << " already in hash table\n";
         }
-#       endif
+        #endif
         return false;
     }
     else
     {
-        // found - overwrite existing entry
+        // Found - overwrite existing entry
         // this corresponds to the Perl convention
         objects_[hashIdx][existing] = newEntry;
     }
@@ -307,7 +300,7 @@ bool Foam::StaticHashTable<T, Key, Hash>::erase(const iterator& cit)
         localKeys.setSize(localKeys.size()-1);
         localObjects.setSize(localObjects.size()-1);
 
-        // adjust iterator after erase
+        // Adjust iterator after erase
         iterator& it = const_cast<iterator&>(cit);
 
         it.elemIndex_--;
@@ -321,25 +314,24 @@ bool Foam::StaticHashTable<T, Key, Hash>::erase(const iterator& cit)
 
         nElmts_--;
 
-#       ifdef FULLDEBUG
+        #ifdef FULLDEBUG
         if (debug)
         {
-            Info<< "StaticHashTable<T, Key, Hash>::erase(iterator&) : "
-                << "hashedEntry removed.\n";
+            InfoInFunction << "hashedEntry removed.\n";
         }
-#       endif
+        #endif
 
         return true;
     }
     else
     {
-#       ifdef FULLDEBUG
+        #ifdef FULLDEBUG
         if (debug)
         {
-            Info<< "StaticHashTable<T, Key, Hash>::erase(iterator&) : "
-                << "cannot remove hashedEntry from hash table\n";
+            InfoInFunction
+                << "Cannot remove hashedEntry from hash table\n";
         }
-#       endif
+        #endif
 
         return false;
     }
@@ -391,13 +383,12 @@ void Foam::StaticHashTable<T, Key, Hash>::resize(const label sz)
 
     if (newSize == keys_.size())
     {
-#       ifdef FULLDEBUG
+        #ifdef FULLDEBUG
         if (debug)
         {
-            Info<< "StaticHashTable<T, Key, Hash>::resize(const label) : "
-                << "new table size == old table size\n";
+            InfoInFunction << "New table size == old table size\n";
         }
-#       endif
+        #endif
 
         return;
     }
@@ -517,7 +508,7 @@ bool Foam::StaticHashTable<T, Key, Hash>::operator==
     const StaticHashTable<T, Key, Hash>& rhs
 ) const
 {
-    // sizes (number of keys) must match
+    // Sizes (number of keys) must match
 
     for (const_iterator iter = rhs.cbegin(); iter != rhs.cend(); ++iter)
     {
diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H
index d3372ed0e1901eefb58690d0cb2ef72b7228ed93..67dfdfa5a92e9de2fe185f14b528bcd03402f209 100644
--- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H
+++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,10 +111,10 @@ class StaticHashTable
     // Private data type for table entries
 
         //- The lookup keys, ordered per hash value
-        List<List<Key> > keys_;
+        List<List<Key>> keys_;
 
         //- For each key the corresponding object.
-        List<List<T> > objects_;
+        List<List<T>> objects_;
 
         //- The current number of elements in table
         label nElmts_;
@@ -178,7 +178,7 @@ public:
         StaticHashTable(const StaticHashTable<T, Key, Hash>&);
 
         //- Construct by transferring the parameter contents
-        StaticHashTable(const Xfer<StaticHashTable<T, Key, Hash> >&);
+        StaticHashTable(const Xfer<StaticHashTable<T, Key, Hash>>&);
 
 
     //- Destructor
@@ -246,7 +246,7 @@ public:
             void transfer(StaticHashTable<T, Key, Hash>&);
 
             //- Transfer contents to the Xfer container
-            inline Xfer<StaticHashTable<T, Key, Hash> > xfer();
+            inline Xfer<StaticHashTable<T, Key, Hash>> xfer();
 
 
     // Member Operators
@@ -397,13 +397,13 @@ private:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "StaticHashTableI.H"
+    #include "StaticHashTableI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifndef NoStaticHashTableC
 #ifdef NoRepository
-#   include "StaticHashTable.C"
+    #include "StaticHashTable.C"
 #endif
 #endif
 
diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H
index 49f84be2b480bcd42424fbefe4424577ee896830..cebb3852aa56de015e2067f4b415134b88bed8a0 100644
--- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H
+++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ inline bool Foam::StaticHashTable<T, Key, Hash>::set
 
 
 template<class T, class Key, class Hash>
-inline Foam::Xfer<Foam::StaticHashTable<T, Key, Hash> >
+inline Foam::Xfer<Foam::StaticHashTable<T, Key, Hash>>
 Foam::StaticHashTable<T, Key, Hash>::xfer()
 {
     return xferMove(*this);
@@ -345,12 +345,12 @@ Foam::StaticHashTable<T, Key, Hash>::begin()
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
         Info<< "StaticHashTable is empty\n";
     }
-#   endif
+    #endif
 
     return StaticHashTable<T, Key, Hash>::endIter_;
 }
@@ -377,12 +377,12 @@ Foam::StaticHashTable<T, Key, Hash>::cbegin() const
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (debug)
     {
         Info<< "StaticHashTable is empty\n";
     }
-#   endif
+    #endif
 
     return StaticHashTable<T, Key, Hash>::endConstIter_;
 }
diff --git a/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H b/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H
index 70cb858119aa6f4eb5d9b7f44011b960855f645f..df695531de15a6405cb36920fada8ea49efc1ef6 100644
--- a/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H
+++ b/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,14 +69,14 @@ public:
     // Static Members
 
         //- Add labels to a list of values
-        inline static List<Keyed<T> > createList
+        inline static List<Keyed<T>> createList
         (
             const List<T>&,
             const label key=0
         );
 
         //- Add labels to a list of values
-        inline static List<Keyed<T> > createList
+        inline static List<Keyed<T>> createList
         (
             const List<T>&,
             const labelUList& keys
diff --git a/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H b/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H
index ed5edf6c8f9f8a859262890499ff23f6b2f0149b..d07aeb0f6af080661f00b9af7a180f72096287f6 100644
--- a/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H
+++ b/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,10 +75,10 @@ inline Foam::label& Foam::Keyed<T>::key()
 
 
 template<class T>
-inline Foam::List<Foam::Keyed<T> >
+inline Foam::List<Foam::Keyed<T>>
 Foam::Keyed<T>::createList(const List<T>& lst, const label key)
 {
-    List<Keyed<T> > newList(lst.size());
+    List<Keyed<T>> newList(lst.size());
 
     forAll(lst, elemI)
     {
@@ -89,7 +89,7 @@ Foam::Keyed<T>::createList(const List<T>& lst, const label key)
 
 
 template<class T>
-inline Foam::List<Foam::Keyed<T> >
+inline Foam::List<Foam::Keyed<T>>
 Foam::Keyed<T>::createList(const List<T>& lst, const labelUList& keys)
 {
     if (lst.size() != keys.size())
@@ -101,7 +101,7 @@ Foam::Keyed<T>::createList(const List<T>& lst, const labelUList& keys)
             << abort(FatalError);
     }
 
-    List<Keyed<T> > newList(lst.size());
+    List<Keyed<T>> newList(lst.size());
 
     forAll(lst, elemI)
     {
diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H
index 893095d15bcfb75d321488af6bbd4310ed5b4997..3a25cfad7a7b72ed471c32d5083a2fc2b729e940 100644
--- a/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H
+++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/ILList/ILList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -147,7 +147,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ILList.C"
+    #include "ILList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H
index e8a9ff22d4d5c7781c9fa8506b3b457fc2586895..fd1c3e0aef5c807a01485a24bcb91239c0bef4da 100644
--- a/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H
+++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/LList/LList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -368,7 +368,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LList.C"
+    #include "LList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/LPtrList/LPtrList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/LPtrList/LPtrList.H
index 0ef461ccde9373290ba243c5a3a22eb59e80ecba..e2b7e49a5aad4103a7470d553918eebe977378d8 100644
--- a/src/OpenFOAM/containers/LinkedLists/accessTypes/LPtrList/LPtrList.H
+++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/LPtrList/LPtrList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -270,7 +270,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LPtrList.C"
+    #include "LPtrList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.C b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.C
index 9afa118da04573ba89b0ea657da76508e91c188f..0a7f05728620ae9e3db87f0112111d0a94bbe74b 100644
--- a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.C
+++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,6 @@ bool Foam::UILList<LListBase, T>::operator==
 }
 
 
-// Comparison for inequality
 template<class LListBase, class T>
 bool Foam::UILList<LListBase, T>::operator!=
 (
diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H
index b2ec4c8fca4c65b3d500e1a63325f40b94f8be91..28d1231762f0e0713a2f5c834a9180eaa91a07fe 100644
--- a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H
+++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -380,7 +380,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UILList.C"
+    #include "UILList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H
index 667a0f40cbfab01179fab006956f12b94ffc1f19..e436c1f0dc9c7e334313c7dbd355140f7f9b357a 100644
--- a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H
+++ b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ public:
         (
             const UList<T>& posList,
             const UList<T>& negList,
-            const Xfer<List<label> >&
+            const Xfer<List<label>>&
         );
 
 
@@ -101,7 +101,7 @@ public:
 
             //- Reset addressing
             inline void resetAddressing(const labelUList&);
-            inline void resetAddressing(const Xfer<List<label> >&);
+            inline void resetAddressing(const Xfer<List<label>>&);
 
 
         // Member Operators
diff --git a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H
index dcf70d41a5a3e1421eacebcf749d6f85165c2ceb..1f1dd4de5b3df3555f17cedef0f99d933f66c291 100644
--- a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H
+++ b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ inline Foam::BiIndirectList<T>::BiIndirectList
 (
     const UList<T>& posList,
     const UList<T>& negList,
-    const Xfer<List<label> >& addr
+    const Xfer<List<label>>& addr
 )
 :
     posList_(const_cast<UList<T>&>(posList)),
@@ -104,7 +104,7 @@ inline void Foam::BiIndirectList<T>::resetAddressing
 template<class T>
 inline void Foam::BiIndirectList<T>::resetAddressing
 (
-    const Xfer<List<label> >& addr
+    const Xfer<List<label>>& addr
 )
 {
     addressing_.transfer(addr());
diff --git a/src/OpenFOAM/containers/Lists/BinSum/BinSum.C b/src/OpenFOAM/containers/Lists/BinSum/BinSum.C
index 1e099613269d7f7582ace01f2f436e13b1c5aef3..3850f4b653f430779f1dbdadc25d8fe4d8874a77 100644
--- a/src/OpenFOAM/containers/Lists/BinSum/BinSum.C
+++ b/src/OpenFOAM/containers/Lists/BinSum/BinSum.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,12 +35,12 @@ Foam::BinSum<IndexType, List, CombineOp>::BinSum
     const IndexType delta
 )
 :
-    List(ceil((max-min)/delta), pTraits<typename List::value_type>::zero),
+    List(ceil((max-min)/delta), Zero),
     min_(min),
     max_(max),
     delta_(delta),
-    lowSum_(pTraits<typename List::value_type>::zero),
-    highSum_(pTraits<typename List::value_type>::zero)
+    lowSum_(Zero),
+    highSum_(Zero)
 {}
 
 
@@ -55,12 +55,12 @@ Foam::BinSum<IndexType, List, CombineOp>::BinSum
     const CombineOp& cop
 )
 :
-    List(ceil((max-min)/delta), pTraits<typename List::value_type>::zero),
+    List(ceil((max-min)/delta), Zero),
     min_(min),
     max_(max),
     delta_(delta),
-    lowSum_(pTraits<typename List::value_type>::zero),
-    highSum_(pTraits<typename List::value_type>::zero)
+    lowSum_(Zero),
+    highSum_(Zero)
 {
     forAll(indexVals, i)
     {
diff --git a/src/OpenFOAM/containers/Lists/BinSum/BinSum.H b/src/OpenFOAM/containers/Lists/BinSum/BinSum.H
index 3cf09bc3a7752bb1479df39d5fbc2c97e358be77..dc7d72c4cb6c63698adf52e1ada81bffd5d7306b 100644
--- a/src/OpenFOAM/containers/Lists/BinSum/BinSum.H
+++ b/src/OpenFOAM/containers/Lists/BinSum/BinSum.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,7 +139,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "BinSum.C"
+    #include "BinSum.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C
index 4e18ee617614be3e049e3ed43d584208409a7b5a..f2ad0802b08b45e0936c367e6d0bf6c4a4c1ad7f 100644
--- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C
+++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ Foam::CompactListList<T, Container>::CompactListList
 template<class T, class Container>
 Foam::CompactListList<T, Container>::CompactListList
 (
-    const Xfer<CompactListList<T, Container> >& lst
+    const Xfer<CompactListList<T, Container>>& lst
 )
 {
     transfer(lst());
@@ -113,35 +113,35 @@ template<class T, class Container>
 Foam::CompactListList<T, Container>::CompactListList
 (
     CompactListList<T, Container>& lst,
-    bool reUse
+    bool reuse
 )
 :
     size_(lst.size()),
-    offsets_(lst.offsets_, reUse),
-    m_(lst.m_, reUse)
+    offsets_(lst.offsets_, reuse),
+    m_(lst.m_, reuse)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class T, class Container>
-void Foam::CompactListList<T, Container>::setSize(const label nRows)
+void Foam::CompactListList<T, Container>::setSize(const label mRows)
 {
-    if (nRows == 0)
+    if (mRows == 0)
     {
         clear();
     }
-    if (nRows < size())
+    if (mRows < size())
     {
-        size_ = nRows;
-        offsets_.setSize(nRows+1);
-        m_.setSize(offsets_[nRows]);
+        size_ = mRows;
+        offsets_.setSize(mRows+1);
+        m_.setSize(offsets_[mRows]);
     }
-    else if (nRows > size())
+    else if (mRows > size())
     {
         FatalErrorInFunction
             << "Cannot be used to extend the list from " << offsets_.size()
-            << " to " << nRows << nl
+            << " to " << mRows << nl
             << "    Please use one of the other setSize member functions"
             << abort(FatalError);
     }
@@ -151,12 +151,12 @@ void Foam::CompactListList<T, Container>::setSize(const label nRows)
 template<class T, class Container>
 void Foam::CompactListList<T, Container>::setSize
 (
-    const label nRows,
+    const label mRows,
     const label nData
 )
 {
-    size_ = nRows;
-    offsets_.setSize(nRows+1);
+    size_ = mRows;
+    offsets_.setSize(mRows+1);
     m_.setSize(nData);
 }
 
@@ -164,13 +164,13 @@ void Foam::CompactListList<T, Container>::setSize
 template<class T, class Container>
 void Foam::CompactListList<T, Container>::setSize
 (
-    const label nRows,
+    const label mRows,
     const label nData,
     const T& t
 )
 {
-    size_ = nRows;
-    offsets_.setSize(nRows+1);
+    size_ = mRows;
+    offsets_.setSize(mRows+1);
     m_.setSize(nData, t);
 }
 
diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H
index fe0e33da2dc8b39bc2114df5405aa393eb8bc067..fcb7ea2ba557c573aa8e8fa1171b79eeeba3ee34 100644
--- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H
+++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ template<class T, class Container> Ostream& operator<<
                        Class CompactListList Declaration
 \*---------------------------------------------------------------------------*/
 
-template<class T, class Container = List<T> >
+template<class T, class Container = List<T>>
 class CompactListList
 {
     // Private data
@@ -102,16 +102,16 @@ public:
         //- Null constructor.
         inline CompactListList();
 
-        //- Construct by converting given List<List<T> >
+        //- Construct by converting given List<List<T>>
         explicit CompactListList(const List<Container>&);
 
         //- Construct given size of offset table (number of rows)
         //  and number of data.
-        inline CompactListList(const label nRows, const label nData);
+        inline CompactListList(const label mRows, const label nData);
 
         //- Construct given size of offset table (number of rows),
         //  the number of data and a value for all elements.
-        inline CompactListList(const label nRows, const label nData, const T&);
+        inline CompactListList(const label mRows, const label nData, const T&);
 
         //- Construct given list of row-sizes.
         explicit CompactListList(const labelUList& rowSizes);
@@ -120,16 +120,16 @@ public:
         CompactListList(const labelUList& rowSizes, const T&);
 
         //- Construct by transferring the parameter contents
-        explicit CompactListList(const Xfer<CompactListList<T, Container> >&);
+        explicit CompactListList(const Xfer<CompactListList<T, Container>>&);
 
         //- Construct as copy or re-use as specified.
-        CompactListList(CompactListList<T, Container>&, bool reUse);
+        CompactListList(CompactListList<T, Container>&, bool reuse);
 
         //- Construct from Istream.
         CompactListList(Istream&);
 
         //- Clone
-        inline autoPtr<CompactListList<T, Container> > clone() const;
+        inline autoPtr<CompactListList<T, Container>> clone() const;
 
 
     // Member Functions
@@ -159,26 +159,26 @@ public:
 
             //- Reset size of CompactListList.
             //  This form only allows contraction of the CompactListList.
-            void setSize(const label nRows);
+            void setSize(const label mRows);
 
             //- Reset size of CompactListList.
-            void setSize(const label nRows, const label nData);
+            void setSize(const label mRows, const label nData);
 
             //- Reset sizes of CompactListList and value for new elements.
-            void setSize(const label nRows, const label nData, const T&);
+            void setSize(const label mRows, const label nData, const T&);
 
             //- Reset size of CompactListList.
             void setSize(const labelUList& rowSizes);
 
             //- Reset size of CompactListList.
             //  This form only allows contraction of the CompactListList.
-            inline void resize(const label nRows);
+            inline void resize(const label mRows);
 
             //- Reset size of CompactListList.
-            inline void resize(const label nRows, const label nData);
+            inline void resize(const label mRows, const label nData);
 
             //- Reset sizes of CompactListList and value for new elements.
-            inline void resize(const label nRows, const label nData, const T&);
+            inline void resize(const label mRows, const label nData, const T&);
 
             //- Reset size of CompactListList.
             inline void resize(const labelUList& rowSizes);
@@ -194,7 +194,7 @@ public:
             void transfer(CompactListList<T, Container>&);
 
             //- Transfer the contents to the Xfer container
-            inline Xfer<CompactListList<T, Container> > xfer();
+            inline Xfer<CompactListList<T, Container>> xfer();
 
         // Other
 
@@ -254,12 +254,12 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "CompactListListI.H"
+    #include "CompactListListI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CompactListList.C"
+    #include "CompactListList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H
index c426fd151cca90aa03e84272a00b11eef98c3ee9..2072887cc5040a5969bfcc039d8c5d2904fd7d1c 100644
--- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H
+++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,12 +38,12 @@ inline Foam::CompactListList<T, Container>::CompactListList()
 template<class T, class Container>
 inline Foam::CompactListList<T, Container>::CompactListList
 (
-    const label nRows,
+    const label mRows,
     const label nData
 )
 :
-    size_(nRows),
-    offsets_(nRows+1, 0),
+    size_(mRows),
+    offsets_(mRows+1, 0),
     m_(nData)
 {}
 
@@ -51,22 +51,22 @@ inline Foam::CompactListList<T, Container>::CompactListList
 template<class T, class Container>
 inline Foam::CompactListList<T, Container>::CompactListList
 (
-    const label nRows,
+    const label mRows,
     const label nData,
     const T& t
 )
 :
-    size_(nRows),
-    offsets_(nRows+1, 0),
+    size_(mRows),
+    offsets_(mRows+1, 0),
     m_(nData, t)
 {}
 
 
 template<class T, class Container>
-inline Foam::autoPtr<Foam::CompactListList<T, Container> >
+inline Foam::autoPtr<Foam::CompactListList<T, Container>>
 Foam::CompactListList<T, Container>::clone() const
 {
-    return autoPtr<CompactListList<T, Container> >
+    return autoPtr<CompactListList<T, Container>>
     (
         new CompactListList<T, Container>(*this)
     );
@@ -79,7 +79,7 @@ template<class T, class Container>
 inline const Foam::CompactListList<T, Container>&
 Foam::CompactListList<T, Container>::null()
 {
-    return NullObjectRef<CompactListList<T, Container> >();
+    return NullObjectRef<CompactListList<T, Container>>();
 }
 
 
@@ -165,7 +165,7 @@ inline Foam::label Foam::CompactListList<T, Container>::whichColumn
 
 
 template<class T, class Container>
-inline Foam::Xfer<Foam::CompactListList<T, Container> >
+inline Foam::Xfer<Foam::CompactListList<T, Container>>
 Foam::CompactListList<T, Container>::xfer()
 {
     return xferMove(*this);
@@ -173,32 +173,32 @@ Foam::CompactListList<T, Container>::xfer()
 
 
 template<class T, class Container>
-inline void Foam::CompactListList<T, Container>::resize(const label nRows)
+inline void Foam::CompactListList<T, Container>::resize(const label mRows)
 {
-    this->setSize(nRows);
+    this->setSize(mRows);
 }
 
 
 template<class T, class Container>
 inline void Foam::CompactListList<T, Container>::resize
 (
-    const label nRows,
+    const label mRows,
     const label nData
 )
 {
-    this->setSize(nRows, nData);
+    this->setSize(mRows, nData);
 }
 
 
 template<class T, class Container>
 inline void Foam::CompactListList<T, Container>::resize
 (
-    const label nRows,
+    const label mRows,
     const label nData,
     const T& t
 )
 {
-    this->setSize(nRows, nData, t);
+    this->setSize(mRows, nData, t);
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C
index 7e8e1715562b6bbba91e60c6825268cc6101d39d..e6d45249959002730420e82650684d1ec2c34cc8 100644
--- a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C
+++ b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ License
 template<class Type>
 Foam::Distribution<Type>::Distribution()
 :
-    List< List<scalar> >(pTraits<Type>::nComponents),
+    List<List<scalar>>(pTraits<Type>::nComponents),
     binWidth_(pTraits<Type>::one),
     listStarts_(pTraits<Type>::nComponents, 0)
 {}
@@ -41,7 +41,7 @@ Foam::Distribution<Type>::Distribution()
 template<class Type>
 Foam::Distribution<Type>::Distribution(const Type& binWidth)
 :
-    List< List<scalar> >(pTraits<Type>::nComponents),
+    List<List<scalar>>(pTraits<Type>::nComponents),
     binWidth_(binWidth),
     listStarts_(pTraits<Type>::nComponents, 0)
 {}
@@ -50,7 +50,7 @@ Foam::Distribution<Type>::Distribution(const Type& binWidth)
 template<class Type>
 Foam::Distribution<Type>::Distribution(const Distribution<Type>& d)
 :
-    List< List<scalar> >(static_cast< const List< List<scalar> >& >(d)),
+    List<List<scalar>>(static_cast<const List<List<scalar>>& >(d)),
     binWidth_(d.binWidth()),
     listStarts_(d.listStarts())
 {}
@@ -196,7 +196,7 @@ Foam::Pair<Foam::label> Foam::Distribution<Type>::validLimits
 template<class Type>
 Type Foam::Distribution<Type>::mean() const
 {
-    Type meanValue(pTraits<Type>::zero);
+    Type meanValue(Zero);
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
@@ -225,13 +225,13 @@ Type Foam::Distribution<Type>::mean() const
 template<class Type>
 Type Foam::Distribution<Type>::median() const
 {
-    Type medianValue(pTraits<Type>::zero);
+    Type medianValue(Zero);
 
-    List< List < Pair<scalar> > > normDistribution = normalised();
+    List<List<Pair<scalar>>> normDistribution = normalised();
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        List< Pair<scalar> >& normDist = normDistribution[cmpt];
+        List<Pair<scalar>>& normDist = normDistribution[cmpt];
 
         if (normDist.size())
         {
@@ -331,10 +331,10 @@ void Foam::Distribution<Type>::add
 
 
 template<class Type>
-Foam::List< Foam::List< Foam::Pair<Foam::scalar> > >Foam::
+Foam::List<Foam::List<Foam::Pair<Foam::scalar>>>Foam::
 Distribution<Type>::normalised() const
 {
-    List< List < Pair<scalar> > > normDistribution(pTraits<Type>::nComponents);
+    List<List<Pair<scalar>>> normDistribution(pTraits<Type>::nComponents);
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
@@ -349,7 +349,7 @@ Distribution<Type>::normalised() const
 
         List<label> cmptKeys = keys(cmpt);
 
-        List< Pair<scalar> >& normDist = normDistribution[cmpt];
+        List<Pair<scalar>>& normDist = normDistribution[cmpt];
 
         Pair<label> limits = validLimits(cmpt);
 
@@ -379,10 +379,10 @@ Distribution<Type>::normalised() const
 
 
 template<class Type>
-Foam::List< Foam::List< Foam::Pair<Foam::scalar> > >Foam::
+Foam::List<Foam::List<Foam::Pair<Foam::scalar>>>Foam::
 Distribution<Type>::raw() const
 {
-    List< List < Pair<scalar> > > rawDistribution(pTraits<Type>::nComponents);
+    List<List<Pair<scalar>>> rawDistribution(pTraits<Type>::nComponents);
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
@@ -395,7 +395,7 @@ Distribution<Type>::raw() const
 
         List<label> cmptKeys = keys(cmpt);
 
-        List< Pair<scalar> >& rawDist = rawDistribution[cmpt];
+        List<Pair<scalar>>& rawDist = rawDistribution[cmpt];
 
         Pair<label> limits = validLimits(cmpt);
 
@@ -421,20 +421,20 @@ Distribution<Type>::raw() const
 
 
 template<class Type>
-Foam::List< Foam::List< Foam::Pair<Foam::scalar> > >Foam::
+Foam::List<Foam::List<Foam::Pair<Foam::scalar>>>Foam::
 Distribution<Type>::cumulativeNormalised() const
 {
-    List< List< Pair<scalar> > > normalisedDistribution = normalised();
+    List<List<Pair<scalar>>> normalisedDistribution = normalised();
 
-    List< List < Pair<scalar> > > cumulativeNormalisedDistribution =
+    List<List<Pair<scalar>>> cumulativeNormalisedDistribution =
         normalisedDistribution;
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        const List< Pair<scalar> >& normalisedCmpt =
+        const List<Pair<scalar>>& normalisedCmpt =
             normalisedDistribution[cmpt];
 
-        List< Pair<scalar> >& cumNormalisedCmpt =
+        List<Pair<scalar>>& cumNormalisedCmpt =
             cumulativeNormalisedDistribution[cmpt];
 
         scalar sum = 0.0;
@@ -457,18 +457,18 @@ Distribution<Type>::cumulativeNormalised() const
 
 
 template<class Type>
-Foam::List< Foam::List< Foam::Pair<Foam::scalar> > >Foam::
+Foam::List<Foam::List<Foam::Pair<Foam::scalar>>>Foam::
 Distribution<Type>::cumulativeRaw() const
 {
-    List< List< Pair<scalar> > > rawDistribution = raw();
+    List<List<Pair<scalar>>> rawDistribution = raw();
 
-    List< List < Pair<scalar> > > cumulativeRawDistribution = rawDistribution;
+    List<List<Pair<scalar>>> cumulativeRawDistribution = rawDistribution;
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        const List< Pair<scalar> >& rawCmpt = rawDistribution[cmpt];
+        const List<Pair<scalar>>& rawCmpt = rawDistribution[cmpt];
 
-        List< Pair<scalar> >& cumRawCmpt = cumulativeRawDistribution[cmpt];
+        List<Pair<scalar>>& cumRawCmpt = cumulativeRawDistribution[cmpt];
 
         scalar sum = 0.0;
 
@@ -503,15 +503,15 @@ void Foam::Distribution<Type>::clear()
 template<class Type>
 void Foam::Distribution<Type>::write(const fileName& filePrefix) const
 {
-    List< List< Pair<scalar> > > rawDistribution = raw();
+    List<List<Pair<scalar>>> rawDistribution = raw();
 
-    List< List < Pair<scalar> > > normDistribution = normalised();
+    List<List<Pair<scalar>>> normDistribution = normalised();
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        const List< Pair<scalar> >& rawPairs = rawDistribution[cmpt];
+        const List<Pair<scalar>>& rawPairs = rawDistribution[cmpt];
 
-        const List< Pair<scalar> >& normPairs = normDistribution[cmpt];
+        const List<Pair<scalar>>& normPairs = normDistribution[cmpt];
 
         OFstream os(filePrefix + '_' + pTraits<Type>::componentNames[cmpt]);
 
@@ -526,15 +526,15 @@ void Foam::Distribution<Type>::write(const fileName& filePrefix) const
         }
     }
 
-    List< List< Pair<scalar> > > rawCumDist = cumulativeRaw();
+    List<List<Pair<scalar>>> rawCumDist = cumulativeRaw();
 
-    List< List < Pair<scalar> > > normCumDist = cumulativeNormalised();
+    List<List<Pair<scalar>>> normCumDist = cumulativeNormalised();
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        const List< Pair<scalar> >& rawPairs = rawCumDist[cmpt];
+        const List<Pair<scalar>>& rawPairs = rawCumDist[cmpt];
 
-        const List< Pair<scalar> >& normPairs = normCumDist[cmpt];
+        const List<Pair<scalar>>& normPairs = normCumDist[cmpt];
 
         OFstream os
         (
@@ -570,7 +570,7 @@ void Foam::Distribution<Type>::operator=
             << abort(FatalError);
     }
 
-    List< List<scalar> >::operator=(rhs);
+    List<List<scalar>>::operator=(rhs);
 
     binWidth_ = rhs.binWidth();
 
@@ -587,7 +587,7 @@ Foam::Istream& Foam::operator>>
     Distribution<Type>& d
 )
 {
-    is  >> static_cast<List< List<scalar> >&>(d)
+    is  >> static_cast<List<List<scalar>>&>(d)
         >> d.binWidth_
         >> d.listStarts_;
 
@@ -605,7 +605,7 @@ Foam::Ostream& Foam::operator<<
     const Distribution<Type>& d
 )
 {
-    os  <<  static_cast<const List< List<scalar> >& >(d)
+    os  <<  static_cast<const List<List<scalar>>& >(d)
         << d.binWidth_ << token::SPACE
         << d.listStarts_;
 
@@ -628,7 +628,7 @@ Foam::Distribution<Type> Foam::operator+
     // The coarsest binWidth is the sensible choice
     Distribution<Type> d(max(d1.binWidth(), d2.binWidth()));
 
-    List< List< List < Pair<scalar> > > > rawDists(2);
+    List<List<List<Pair<scalar>>>> rawDists(2);
 
     rawDists[0] = d1.raw();
     rawDists[1] = d2.raw();
@@ -639,7 +639,7 @@ Foam::Distribution<Type> Foam::operator+
         {
             List<scalar>& cmptDistribution = d[cmpt];
 
-            const List < Pair<scalar> >& cmptRaw = rawDists[rDI][cmpt];
+            const List<Pair<scalar>>& cmptRaw = rawDists[rDI][cmpt];
 
             forAll(cmptRaw, rI)
             {
diff --git a/src/OpenFOAM/containers/Lists/Distribution/Distribution.H b/src/OpenFOAM/containers/Lists/Distribution/Distribution.H
index d84a1c763a9f3ca1185215fabc55ad4460e2ee11..5ef5d4de3a21c7b5b7770f14607e7bf0050ab489 100644
--- a/src/OpenFOAM/containers/Lists/Distribution/Distribution.H
+++ b/src/OpenFOAM/containers/Lists/Distribution/Distribution.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ Ostream& operator<<(Ostream&, const Distribution<Type>&);
 template<class Type>
 class Distribution
 :
-    public List< List<scalar> >
+    public List<List<scalar>>
 {
     // Private data
 
@@ -125,18 +125,18 @@ public:
 
         //- Return the normalised distribution (probability density)
         //  and bins
-        List< List<Pair<scalar> > > normalised() const;
+        List<List<Pair<scalar>>> normalised() const;
 
         //- Return the distribution of the total bin weights
-        List< List < Pair<scalar> > > raw() const;
+        List<List < Pair<scalar>>> raw() const;
 
         //- Return the cumulative normalised distribution and
         //  integration locations (at end of bins)
-        List< List<Pair<scalar> > > cumulativeNormalised() const;
+        List<List<Pair<scalar>>> cumulativeNormalised() const;
 
         //- Return the cumulative total bin weights and integration
         //  locations (at end of bins)
-        List< List<Pair<scalar> > > cumulativeRaw() const;
+        List<List<Pair<scalar>>> cumulativeRaw() const;
 
         //- Resets the Distribution by clearing the stored lists.
         //  Leaves the same number of them and the same binWidth.
@@ -197,7 +197,7 @@ Distribution<Type> operator+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Distribution.C"
+    #include "Distribution.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H
index 0d9621c50dcc1081ca5e104fd39cc53b85ccd52a..f62ba3a41a97a38d19626b466be67e18f67f1934 100644
--- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H
+++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,6 +104,9 @@ public:
         //- Construct given size.
         explicit inline DynamicList(const label);
 
+        //- Construct with given size and value for all elements.
+        inline DynamicList(const label, const T&);
+
         //- Construct copy.
         inline DynamicList(const DynamicList<T, SizeInc, SizeMult, SizeDiv>&);
 
@@ -115,7 +118,7 @@ public:
         explicit inline DynamicList(const UIndirectList<T>&);
 
         //- Construct by transferring the parameter contents
-        explicit inline DynamicList(const Xfer<List<T> >&);
+        explicit inline DynamicList(const Xfer<List<T>>&);
 
         //- Construct from Istream. Size set to size of list read.
         explicit DynamicList(Istream&);
@@ -178,7 +181,7 @@ public:
             inline void transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>&);
 
             //- Transfer contents to the Xfer container as a plain List
-            inline Xfer<List<T> > xfer();
+            inline Xfer<List<T>> xfer();
 
 
         // Member Operators
@@ -224,6 +227,12 @@ public:
             inline void operator=(const UIndirectList<T>&);
 
 
+        // STL member functions
+
+            //- Erase an element, move the remaining elements to fill the gap
+            //  and resize the List
+            typename UList<T>::iterator erase(typename UList<T>::iterator);
+
 
         // IOstream operators
 
@@ -254,7 +263,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DynamicList.C"
+    #include "DynamicList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H
index c6ed4d1569a4fcce4ff2d45b21c45957525a994e..fdd4ec571a8030dfdc4f56c1f76b4e3161b29445 100644
--- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H
+++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,11 +44,23 @@ inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
     List<T>(nElem),
     capacity_(nElem)
 {
-    // we could also enforce SizeInc granularity when (!SizeMult || !SizeDiv)
+    // We could also enforce SizeInc granularity when (!SizeMult || !SizeDiv)
     List<T>::size(0);
 }
 
 
+template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
+inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
+(
+    const label nElem,
+    const T& a
+)
+:
+    List<T>(nElem, a),
+    capacity_(nElem)
+{}
+
+
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
 inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
 (
@@ -85,7 +97,7 @@ inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
 inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
 (
-    const Xfer<List<T> >& lst
+    const Xfer<List<T>>& lst
 )
 :
     List<T>(lst),
@@ -115,10 +127,11 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setCapacity
 
     if (nextFree > capacity_)
     {
-        // truncate addressed sizes too
+        // Truncate addressed sizes too
         nextFree = capacity_;
     }
-    // we could also enforce SizeInc granularity when (!SizeMult || !SizeDiv)
+
+    // We could also enforce SizeInc granularity when (!SizeMult || !SizeDiv)
 
     List<T>::setSize(capacity_);
     List<T>::size(nextFree);
@@ -131,21 +144,21 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::reserve
     const label nElem
 )
 {
-    // allocate more capacity?
+    // Allocate more capacity?
     if (nElem > capacity_)
     {
-// TODO: convince the compiler that division by zero does not occur
-//        if (SizeInc && (!SizeMult || !SizeDiv))
-//        {
-//            // resize with SizeInc as the granularity
-//            capacity_ = nElem;
-//            unsigned pad = SizeInc - (capacity_ % SizeInc);
-//            if (pad != SizeInc)
-//            {
-//                capacity_ += pad;
-//            }
-//        }
-//        else
+        // TODO: convince the compiler that division by zero does not occur
+        //        if (SizeInc && (!SizeMult || !SizeDiv))
+        //        {
+        //            // resize with SizeInc as the granularity
+        //            capacity_ = nElem;
+        //            unsigned pad = SizeInc - (capacity_ % SizeInc);
+        //            if (pad != SizeInc)
+        //            {
+        //                capacity_ += pad;
+        //            }
+        //        }
+        //        else
         {
             capacity_ = max
             (
@@ -154,7 +167,7 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::reserve
             );
         }
 
-        // adjust allocated size, leave addressed size untouched
+        // Adjust allocated size, leave addressed size untouched
         label nextFree = List<T>::size();
         List<T>::setSize(capacity_);
         List<T>::size(nextFree);
@@ -168,21 +181,21 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
     const label nElem
 )
 {
-    // allocate more capacity?
+    // Allocate more capacity?
     if (nElem > capacity_)
     {
-// TODO: convince the compiler that division by zero does not occur
-//        if (SizeInc && (!SizeMult || !SizeDiv))
-//        {
-//            // resize with SizeInc as the granularity
-//            capacity_ = nElem;
-//            unsigned pad = SizeInc - (capacity_ % SizeInc);
-//            if (pad != SizeInc)
-//            {
-//                capacity_ += pad;
-//            }
-//        }
-//        else
+        // TODO: convince the compiler that division by zero does not occur
+        //        if (SizeInc && (!SizeMult || !SizeDiv))
+        //        {
+        //            // resize with SizeInc as the granularity
+        //            capacity_ = nElem;
+        //            unsigned pad = SizeInc - (capacity_ % SizeInc);
+        //            if (pad != SizeInc)
+        //            {
+        //                capacity_ += pad;
+        //            }
+        //        }
+        //        else
         {
             capacity_ = max
             (
@@ -194,7 +207,7 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
         List<T>::setSize(capacity_);
     }
 
-    // adjust addressed size
+    // Adjust addressed size
     List<T>::size(nElem);
 }
 
@@ -209,7 +222,7 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
     label nextFree = List<T>::size();
     setSize(nElem);
 
-    // set new elements to constant value
+    // Set new elements to constant value
     while (nextFree < nElem)
     {
         this->operator[](nextFree++) = t;
@@ -260,10 +273,10 @@ Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::shrink()
     label nextFree = List<T>::size();
     if (capacity_ > nextFree)
     {
-        // use the full list when resizing
+        // Use the full list when resizing
         List<T>::size(capacity_);
 
-        // the new size
+        // The new size
         capacity_ = nextFree;
         List<T>::setSize(capacity_);
         List<T>::size(nextFree);
@@ -277,7 +290,7 @@ inline void
 Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer(List<T>& lst)
 {
     capacity_ = lst.size();
-    List<T>::transfer(lst);   // take over storage, clear addressing for lst.
+    List<T>::transfer(lst);   // Take over storage, clear addressing for lst.
 }
 
 
@@ -288,7 +301,7 @@ Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer
     DynamicList<T, SizeInc, SizeMult, SizeDiv>& lst
 )
 {
-    // take over storage as-is (without shrink), clear addressing for lst.
+    // Take over storage as-is (without shrink), clear addressing for lst.
     capacity_ = lst.capacity_;
     lst.capacity_ = 0;
 
@@ -297,10 +310,10 @@ Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer
 
 
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
-inline Foam::Xfer<Foam::List<T> >
+inline Foam::Xfer<Foam::List<T>>
 Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::xfer()
 {
-    return xferMoveTo< List<T> >(*this);
+    return xferMoveTo<List<T>>(*this);
 }
 
 
@@ -421,13 +434,13 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
 
     if (capacity_ >= lst.size())
     {
-        // can copy w/o reallocating, match initial size to avoid reallocation
+        // Can copy w/o reallocating, match initial size to avoid reallocation
         List<T>::size(lst.size());
         List<T>::operator=(lst);
     }
     else
     {
-        // make everything available for the copy operation
+        // Make everything available for the copy operation
         List<T>::size(capacity_);
 
         List<T>::operator=(lst);
@@ -444,13 +457,13 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
 {
     if (capacity_ >= lst.size())
     {
-        // can copy w/o reallocating, match initial size to avoid reallocation
+        // Can copy w/o reallocating, match initial size to avoid reallocation
         List<T>::size(lst.size());
         List<T>::operator=(lst);
     }
     else
     {
-        // make everything available for the copy operation
+        // Make everything available for the copy operation
         List<T>::size(capacity_);
 
         List<T>::operator=(lst);
@@ -467,13 +480,13 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
 {
     if (capacity_ >= lst.size())
     {
-        // can copy w/o reallocating, match initial size to avoid reallocation
+        // Can copy w/o reallocating, match initial size to avoid reallocation
         List<T>::size(lst.size());
         List<T>::operator=(lst);
     }
     else
     {
-        // make everything available for the copy operation
+        // Make everything available for the copy operation
         List<T>::size(capacity_);
 
         List<T>::operator=(lst);
@@ -481,4 +494,33 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
     }
 }
 
+
+// * * * * * * * * * * * * * * STL Member Functions  * * * * * * * * * * * * //
+
+template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
+typename Foam::UList<T>::iterator
+Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::erase
+(
+    typename UList<T>::iterator curIter
+)
+{
+    typename Foam::UList<T>::iterator iter = curIter;
+    typename Foam::UList<T>::iterator nextIter = curIter;
+
+    if (iter != this->end())
+    {
+        ++iter;
+
+        while (iter != this->end())
+        {
+            *nextIter++ = *iter++;
+        }
+
+        this->setSize(this->size() - 1);
+    }
+
+    return curIter;
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H
index 0ebbcf6a4dc96d92734f26b2eaecb7d37c20c7c0..c7974940c5bf436c6c9142607bb21441cce0fcd1 100644
--- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H
+++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ public:
 
     //- Hashing function class.
     //  Use Hasher directly for contiguous data. Otherwise hash incrementally.
-    template< class HashT=Hash<T> >
+    template<class HashT=Hash<T>>
     class Hash
     {
     public:
@@ -127,7 +127,7 @@ public:
         FixedList(Istream&);
 
         //- Clone
-        inline autoPtr< FixedList<T, Size> > clone() const;
+        inline autoPtr<FixedList<T, Size>> clone() const;
 
 
     // Member Functions
@@ -365,7 +365,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FixedList.C"
+    #include "FixedList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H
index 053a4e4e6d56555ef957904bc07e7304586b46e3..0b0daf1d711c48b61fb5a4df7d7c929e3ec109da 100644
--- a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H
+++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,10 +95,10 @@ inline Foam::FixedList<T, Size>::FixedList(const FixedList<T, Size>& lst)
 
 
 template<class T, unsigned Size>
-inline Foam::autoPtr< Foam::FixedList<T, Size> >
+inline Foam::autoPtr<Foam::FixedList<T, Size>>
 Foam::FixedList<T, Size>::clone() const
 {
-    return autoPtr< FixedList<T, Size> >(new FixedList<T, Size>(*this));
+    return autoPtr<FixedList<T, Size>>(new FixedList<T, Size>(*this));
 }
 
 
@@ -107,7 +107,7 @@ Foam::FixedList<T, Size>::clone() const
 template<class T, unsigned Size>
 inline const Foam::FixedList<T, Size>& Foam::FixedList<T, Size>::null()
 {
-    return NullObjectRef<FixedList<T, Size> >();
+    return NullObjectRef<FixedList<T, Size>>();
 }
 
 
@@ -125,7 +125,6 @@ inline Foam::label Foam::FixedList<T, Size>::rcIndex(const label i) const
 }
 
 
-// Check start is within valid range (0 ... size-1).
 template<class T, unsigned Size>
 inline void Foam::FixedList<T, Size>::checkStart(const label start) const
 {
@@ -138,7 +137,6 @@ inline void Foam::FixedList<T, Size>::checkStart(const label start) const
 }
 
 
-// Check size is within valid range (0 ... size).
 template<class T, unsigned Size>
 inline void Foam::FixedList<T, Size>::checkSize(const label size) const
 {
@@ -151,8 +149,6 @@ inline void Foam::FixedList<T, Size>::checkSize(const label size) const
 }
 
 
-// Check index i is within valid range (0 ... size-1)
-// The check for zero-sized list is already done in static assert
 template<class T, unsigned Size>
 inline void Foam::FixedList<T, Size>::checkIndex(const label i) const
 {
@@ -168,17 +164,17 @@ inline void Foam::FixedList<T, Size>::checkIndex(const label i) const
 template<class T, unsigned Size>
 inline void Foam::FixedList<T, Size>::resize(const label s)
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     checkSize(s);
-#   endif
+    #endif
 }
 
 template<class T, unsigned Size>
 inline void Foam::FixedList<T, Size>::setSize(const label s)
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     checkSize(s);
-#   endif
+    #endif
 }
 
 template<class T, unsigned Size>
@@ -237,24 +233,22 @@ inline const T& Foam::FixedList<T, Size>::last() const
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-// element access
 template<class T, unsigned Size>
 inline T& Foam::FixedList<T, Size>::operator[](const label i)
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     checkIndex(i);
-#   endif
+    #endif
     return v_[i];
 }
 
 
-// const element access
 template<class T, unsigned Size>
 inline const T& Foam::FixedList<T, Size>::operator[](const label i) const
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     checkIndex(i);
-#   endif
+    #endif
     return v_[i];
 }
 
@@ -435,12 +429,12 @@ inline unsigned Foam::FixedList<T, Size>::Hash<HashT>::operator()
 {
     if (contiguous<T>())
     {
-        // hash directly
+        // Hash directly
         return Hasher(lst.v_, sizeof(lst.v_), seed);
     }
     else
     {
-        // hash incrementally
+        // Hash incrementally
         unsigned val = seed;
 
         for (unsigned i=0; i<Size; i++)
diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C
index 62e801dd986edb956683e450c996f0c4135831a7..2bf821a369e8717aa9297caa0226c281df6bae20 100644
--- a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C
+++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
 
         if (firstToken.isCompound())
         {
-            L = dynamicCast<token::Compound<List<T> > >
+            L = dynamicCast<token::Compound<List<T>>>
             (
                 firstToken.transferCompoundToken(is)
             );
diff --git a/src/OpenFOAM/containers/Lists/Histogram/Histogram.H b/src/OpenFOAM/containers/Lists/Histogram/Histogram.H
index 7cdf6ebda352f499fe73ea822630e9d103dca024..5b4b5a9b222343b5404c89ee8f339bd22b4ac2d5 100644
--- a/src/OpenFOAM/containers/Lists/Histogram/Histogram.H
+++ b/src/OpenFOAM/containers/Lists/Histogram/Histogram.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,12 +120,12 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-//#   include "HistogramI.H"
+//    #include "HistogramI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Histogram.C"
+    #include "Histogram.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H b/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H
index 030dfd9e30bf5354e9b75b45b298a88399077c55..1d554d7d7e972d4e5e86d998fc9abe0e20dbf3b7 100644
--- a/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H
+++ b/src/OpenFOAM/containers/Lists/IndirectList/IndirectList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ protected:
         explicit inline IndirectListAddressing(const labelUList& addr);
 
         //- Construct by transferring addressing array
-        explicit inline IndirectListAddressing(const Xfer<List<label> >& addr);
+        explicit inline IndirectListAddressing(const Xfer<List<label>>& addr);
 
 
     // Member Functions
@@ -90,7 +90,7 @@ protected:
 
             //- Reset addressing
             inline void resetAddressing(const labelUList&);
-            inline void resetAddressing(const Xfer<List<label> >&);
+            inline void resetAddressing(const Xfer<List<label>>&);
 
 };
 
@@ -107,10 +107,10 @@ class IndirectList
 {
     // Private Member Functions
 
-        //- Disable default assignment operator
+        //- Disallow default assignment operator
         void operator=(const IndirectList<T>&);
 
-        //- Disable assignment from UIndirectList
+        //- Disallow assignment from UIndirectList
         void operator=(const UIndirectList<T>&);
 
 
@@ -122,7 +122,7 @@ public:
         inline IndirectList(const UList<T>&, const labelUList&);
 
         //- Construct given the complete list and by transferring addressing
-        inline IndirectList(const UList<T>&, const Xfer<List<label> >&);
+        inline IndirectList(const UList<T>&, const Xfer<List<label>>&);
 
         //- Copy constructor
         inline IndirectList(const IndirectList<T>&);
diff --git a/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H b/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H
index b8374b02262923704aae6d806c5b738a22af9f17..068b38ed9d21da56dbdff749bbd1baa1c9f3e037 100644
--- a/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H
+++ b/src/OpenFOAM/containers/Lists/IndirectList/IndirectListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ inline Foam::IndirectListAddressing::IndirectListAddressing
 
 inline Foam::IndirectListAddressing::IndirectListAddressing
 (
-    const Xfer<List<label> >& addr
+    const Xfer<List<label>>& addr
 )
 :
     addressing_(addr)
@@ -64,7 +64,7 @@ template<class T>
 inline Foam::IndirectList<T>::IndirectList
 (
     const UList<T>& completeList,
-    const Xfer<List<label> >& addr
+    const Xfer<List<label>>& addr
 )
 :
     IndirectListAddressing(addr),
@@ -126,7 +126,7 @@ inline void Foam::IndirectListAddressing::resetAddressing
 
 inline void Foam::IndirectListAddressing::resetAddressing
 (
-    const Xfer<List<label> >& addr
+    const Xfer<List<label>>& addr
 )
 {
     addressing_.transfer(addr());
diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C
index e184284d82305bdeced682bc0bdd6cbc9c923197..34cc05ee8d601445f743bb7e80a816daf5d19e6b 100644
--- a/src/OpenFOAM/containers/Lists/List/List.C
+++ b/src/OpenFOAM/containers/Lists/List/List.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,11 +34,8 @@ License
 #include "BiIndirectList.H"
 #include "contiguous.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
 
-// Construct with length specified
 template<class T>
 Foam::List<T>::List(const label s)
 :
@@ -58,7 +55,6 @@ Foam::List<T>::List(const label s)
 }
 
 
-// Construct with length and single value specified
 template<class T>
 Foam::List<T>::List(const label s, const T& a)
 :
@@ -83,7 +79,30 @@ Foam::List<T>::List(const label s, const T& a)
 }
 
 
-// Construct as copy
+template<class T>
+Foam::List<T>::List(const label s, const zero)
+:
+    UList<T>(NULL, s)
+{
+    if (this->size_ < 0)
+    {
+        FatalErrorInFunction
+            << "bad size " << this->size_
+            << abort(FatalError);
+    }
+
+    if (this->size_)
+    {
+        this->v_ = new T[this->size_];
+
+        List_ACCESS(T, (*this), vp);
+        List_FOR_ALL((*this), i)
+            List_ELEM((*this), vp, i) = Zero;
+        List_END_FOR_ALL
+    }
+}
+
+
 template<class T>
 Foam::List<T>::List(const List<T>& a)
 :
@@ -93,13 +112,13 @@ Foam::List<T>::List(const List<T>& a)
     {
         this->v_ = new T[this->size_];
 
-#       ifdef USEMEMCPY
+        #ifdef USEMEMCPY
         if (contiguous<T>())
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
         else
-#       endif
+        #endif
         {
             List_ACCESS(T, (*this), vp);
             List_CONST_ACCESS(T, a, ap);
@@ -111,21 +130,19 @@ Foam::List<T>::List(const List<T>& a)
 }
 
 
-// Construct by transferring the parameter contents
 template<class T>
-Foam::List<T>::List(const Xfer<List<T> >& lst)
+Foam::List<T>::List(const Xfer<List<T>>& lst)
 {
     transfer(lst());
 }
 
 
-// Construct as copy or re-use as specified.
 template<class T>
-Foam::List<T>::List(List<T>& a, bool reUse)
+Foam::List<T>::List(List<T>& a, bool reuse)
 :
     UList<T>(NULL, a.size_)
 {
-    if (reUse)
+    if (reuse)
     {
         this->v_ = a.v_;
         a.v_ = 0;
@@ -135,13 +152,13 @@ Foam::List<T>::List(List<T>& a, bool reUse)
     {
         this->v_ = new T[this->size_];
 
-#       ifdef USEMEMCPY
+        #ifdef USEMEMCPY
         if (contiguous<T>())
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
         else
-#       endif
+        #endif
         {
             List_ACCESS(T, (*this), vp);
             List_CONST_ACCESS(T, a, ap);
@@ -153,7 +170,6 @@ Foam::List<T>::List(List<T>& a, bool reUse)
 }
 
 
-// Construct as subset
 template<class T>
 Foam::List<T>::List(const UList<T>& a, const labelUList& map)
 :
@@ -173,7 +189,6 @@ Foam::List<T>::List(const UList<T>& a, const labelUList& map)
 }
 
 
-// Construct given start and end iterators.
 template<class T>
 template<class InputIterator>
 Foam::List<T>::List(InputIterator first, InputIterator last)
@@ -205,7 +220,6 @@ Foam::List<T>::List(InputIterator first, InputIterator last)
 }
 
 
-// Construct as copy of FixedList<T, Size>
 template<class T>
 template<unsigned Size>
 Foam::List<T>::List(const FixedList<T, Size>& lst)
@@ -224,7 +238,6 @@ Foam::List<T>::List(const FixedList<T, Size>& lst)
 }
 
 
-// Construct as copy of PtrList<T>
 template<class T>
 Foam::List<T>::List(const PtrList<T>& lst)
 :
@@ -242,7 +255,6 @@ Foam::List<T>::List(const PtrList<T>& lst)
 }
 
 
-// Construct as copy of SLList<T>
 template<class T>
 Foam::List<T>::List(const SLList<T>& lst)
 :
@@ -266,7 +278,6 @@ Foam::List<T>::List(const SLList<T>& lst)
 }
 
 
-// Construct as copy of UIndirectList<T>
 template<class T>
 Foam::List<T>::List(const UIndirectList<T>& lst)
 :
@@ -284,7 +295,6 @@ Foam::List<T>::List(const UIndirectList<T>& lst)
 }
 
 
-// Construct as copy of BiIndirectList<T>
 template<class T>
 Foam::List<T>::List(const BiIndirectList<T>& lst)
 :
@@ -304,7 +314,6 @@ Foam::List<T>::List(const BiIndirectList<T>& lst)
 
 // * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * * //
 
-// Destroy list elements
 template<class T>
 Foam::List<T>::~List()
 {
@@ -334,13 +343,13 @@ void Foam::List<T>::setSize(const label newSize)
             {
                 label i = min(this->size_, newSize);
 
-#               ifdef USEMEMCPY
+                #ifdef USEMEMCPY
                 if (contiguous<T>())
                 {
                     memcpy(nv, this->v_, i*sizeof(T));
                 }
                 else
-#               endif
+                #endif
                 {
                     T* vv = &this->v_[i];
                     T* av = &nv[i];
@@ -384,8 +393,6 @@ void Foam::List<T>::clear()
 }
 
 
-// Transfer the contents of the argument List into this List
-// and annul the argument list
 template<class T>
 void Foam::List<T>::transfer(List<T>& a)
 {
@@ -398,25 +405,21 @@ void Foam::List<T>::transfer(List<T>& a)
 }
 
 
-// Transfer the contents of the argument DynamicList into this List
-// and annul the argument list
 template<class T>
 template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
 void Foam::List<T>::transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>& a)
 {
-    // shrink the allocated space to the number of elements used
+    // Shrink the allocated space to the number of elements used
     a.shrink();
     transfer(static_cast<List<T>&>(a));
     a.clearStorage();
 }
 
 
-// Transfer the contents of the argument SortableList into this List
-// and annul the argument list
 template<class T>
 void Foam::List<T>::transfer(SortableList<T>& a)
 {
-    // shrink away the sort indices
+    // Shrink away the sort indices
     a.shrink();
     transfer(static_cast<List<T>&>(a));
 }
@@ -424,7 +427,6 @@ void Foam::List<T>::transfer(SortableList<T>& a)
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-// Assignment to UList operator. Takes linear time.
 template<class T>
 void Foam::List<T>::operator=(const UList<T>& a)
 {
@@ -438,13 +440,13 @@ void Foam::List<T>::operator=(const UList<T>& a)
 
     if (this->size_)
     {
-#       ifdef USEMEMCPY
+        #ifdef USEMEMCPY
         if (contiguous<T>())
         {
             memcpy(this->v_, a.v_, this->byteSize());
         }
         else
-#       endif
+        #endif
         {
             List_ACCESS(T, (*this), vp);
             List_CONST_ACCESS(T, a, ap);
@@ -456,7 +458,6 @@ void Foam::List<T>::operator=(const UList<T>& a)
 }
 
 
-// Assignment operator. Takes linear time.
 template<class T>
 void Foam::List<T>::operator=(const List<T>& a)
 {
@@ -471,7 +472,6 @@ void Foam::List<T>::operator=(const List<T>& a)
 }
 
 
-// Assignment operator. Takes linear time.
 template<class T>
 void Foam::List<T>::operator=(const SLList<T>& lst)
 {
@@ -499,7 +499,6 @@ void Foam::List<T>::operator=(const SLList<T>& lst)
 }
 
 
-// Assignment operator. Takes linear time.
 template<class T>
 void Foam::List<T>::operator=(const UIndirectList<T>& lst)
 {
@@ -518,7 +517,6 @@ void Foam::List<T>::operator=(const UIndirectList<T>& lst)
 }
 
 
-// Assignment operator. Takes linear time.
 template<class T>
 void Foam::List<T>::operator=(const BiIndirectList<T>& lst)
 {
diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H
index 0523b55b7503ad42dabc2eaa8d1f2971319466dd..a4f342cc4aad51793337b2d30564cc37f0c22de6 100644
--- a/src/OpenFOAM/containers/Lists/List/List.H
+++ b/src/OpenFOAM/containers/Lists/List/List.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,14 +105,17 @@ public:
         //- Construct with given size and value for all elements.
         List(const label, const T&);
 
+        //- Construct with given size initializing all elements to zero.
+        List(const label, const zero);
+
         //- Copy constructor.
         List(const List<T>&);
 
         //- Construct by transferring the parameter contents
-        List(const Xfer<List<T> >&);
+        List(const Xfer<List<T>>&);
 
         //- Construct as copy or re-use as specified.
-        List(List<T>&, bool reUse);
+        List(List<T>&, bool reuse);
 
         //- Construct as subset.
         List(const UList<T>&, const labelUList& mapAddressing);
@@ -141,7 +144,7 @@ public:
         List(Istream&);
 
         //- Clone
-        inline autoPtr<List<T> > clone() const;
+        inline autoPtr<List<T>> clone() const;
 
 
     //- Destructor
@@ -200,11 +203,16 @@ public:
             void transfer(SortableList<T>&);
 
             //- Transfer contents to the Xfer container
-            inline Xfer<List<T> > xfer();
+            inline Xfer<List<T>> xfer();
 
             //- Return subscript-checked element of UList.
             inline T& newElmt(const label);
 
+
+        //- Disallow implicit shallowCopy
+        void shallowCopy(const UList<T>&) = delete;
+
+
     // Member operators
 
         //- Assignment from UList operator. Takes linear time.
@@ -225,6 +233,9 @@ public:
         //- Assignment of all entries to the given value
         inline void operator=(const T&);
 
+        //- Assignment of all entries to zero
+        inline void operator=(const zero);
+
 
     // Istream operator
 
@@ -251,12 +262,12 @@ List<T> readList(Istream&);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "ListI.H"
+    #include "ListI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "List.C"
+    #include "List.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/List/ListI.H b/src/OpenFOAM/containers/Lists/List/ListI.H
index f304da6e218a7dcf3512cc8ddd954f695e602ed1..7d4b325140fb689ba0fb73612c98de231d85c571 100644
--- a/src/OpenFOAM/containers/Lists/List/ListI.H
+++ b/src/OpenFOAM/containers/Lists/List/ListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,9 +31,9 @@ inline Foam::List<T>::List()
 
 
 template<class T>
-inline Foam::autoPtr<Foam::List<T> > Foam::List<T>::clone() const
+inline Foam::autoPtr<Foam::List<T>> Foam::List<T>::clone() const
 {
-    return autoPtr<List<T> >(new List<T>(*this));
+    return autoPtr<List<T>>(new List<T>(*this));
 }
 
 
@@ -42,7 +42,7 @@ inline Foam::autoPtr<Foam::List<T> > Foam::List<T>::clone() const
 template<class T>
 inline const Foam::List<T>& Foam::List<T>::null()
 {
-    return NullObjectRef<List<T> >();
+    return NullObjectRef<List<T>>();
 }
 
 
@@ -87,7 +87,7 @@ inline Foam::label Foam::List<T>::size() const
 
 
 template<class T>
-inline Foam::Xfer<Foam::List<T> > Foam::List<T>::xfer()
+inline Foam::Xfer<Foam::List<T>> Foam::List<T>::xfer()
 {
     return xferMove(*this);
 }
@@ -141,4 +141,11 @@ inline void Foam::List<T>::operator=(const T& t)
 }
 
 
+template<class T>
+inline void Foam::List<T>::operator=(const zero)
+{
+    UList<T>::operator=(Zero);
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/containers/Lists/List/ListIO.C b/src/OpenFOAM/containers/Lists/List/ListIO.C
index 4480234cd0996705c0144b814142d02dbdb3df20..1ac3ecc9193d81fe18b1fa1df8e2dffb1c28c191 100644
--- a/src/OpenFOAM/containers/Lists/List/ListIO.C
+++ b/src/OpenFOAM/containers/Lists/List/ListIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,6 @@ License
 
 // * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
 
-// Construct from Istream
 template<class T>
 Foam::List<T>::List(Istream& is)
 :
@@ -57,7 +56,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
     {
         L.transfer
         (
-            dynamicCast<token::Compound<List<T> > >
+            dynamicCast<token::Compound<List<T>>>
             (
                 firstToken.transferCompoundToken(is)
             )
@@ -173,12 +172,12 @@ Foam::List<T> Foam::readList(Istream& is)
                 << exit(FatalIOError);
         }
 
-        // read via a singly-linked list
+        // Read via a singly-linked list
         L = SLList<T>(is);
     }
     else
     {
-        // create list with a single item
+        // Create list with a single item
         L.setSize(1);
 
         is >> L[0];
diff --git a/src/OpenFOAM/containers/Lists/ListListOps/ListListOps.H b/src/OpenFOAM/containers/Lists/ListListOps/ListListOps.H
index 02afe8abf338bef11254f94a1b8b1aca816052b0..ab9dfd4e499a706e0c9d83ea5046fb653db80872 100644
--- a/src/OpenFOAM/containers/Lists/ListListOps/ListListOps.H
+++ b/src/OpenFOAM/containers/Lists/ListListOps/ListListOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -150,7 +150,7 @@ namespace ListListOps
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ListListOps.C"
+    #include "ListListOps.C"
 #endif
 
 
diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H
index b67663c0334e8166e4cb9453c7f7b196f80609e9..684d0859bf77c7ea8c4fdc88c75aa2c9218d5245 100644
--- a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H
+++ b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -244,14 +244,14 @@ label findLower
 
 //- To construct a List from a C array. Has extra Container type
 //  to initialise e.g. wordList from arrays of char*.
-template<class Container, class T, int nRows>
-List<Container> initList(const T[nRows]);
+template<class Container, class T, int mRows>
+List<Container> initList(const T[mRows]);
 
 
 //- To construct a (square) ListList from a C array. Has extra Container type
 //  to initialise e.g. faceList from arrays of labels.
-template<class Container, class T, int nRows, int nColumns>
-List<Container> initListList(const T[nRows][nColumns]);
+template<class Container, class T, int mRows, int nColumns>
+List<Container> initListList(const T[mRows][nColumns]);
 
 
 //- Helper class for list to append y onto the end of x
@@ -300,7 +300,7 @@ void inplaceRotateList(ListType<DataType>& list, label n);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ListOpsTemplates.C"
+    #include "ListOpsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C
index 1fb871c8e371318707cd92236c4e2696033c9ec0..ad0ea34bdab323861cc7980755577a51d7e55e1b 100644
--- a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C
+++ b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -411,8 +411,6 @@ void Foam::inplaceSubset
 }
 
 
-// As clarification:
-// coded as inversion from pointEdges to edges but completely general.
 template<class InList, class OutList>
 void Foam::invertManyToMany
 (
@@ -689,10 +687,10 @@ Foam::label Foam::findLower
 }
 
 
-template<class Container, class T, int nRows>
-Foam::List<Container> Foam::initList(const T elems[nRows])
+template<class Container, class T, int mRows>
+Foam::List<Container> Foam::initList(const T elems[mRows])
 {
-    List<Container> lst(nRows);
+    List<Container> lst(mRows);
 
     forAll(lst, rowI)
     {
@@ -702,10 +700,10 @@ Foam::List<Container> Foam::initList(const T elems[nRows])
 }
 
 
-template<class Container, class T, int nRows, int nColumns>
-Foam::List<Container> Foam::initListList(const T elems[nRows][nColumns])
+template<class Container, class T, int mRows, int nColumns>
+Foam::List<Container> Foam::initListList(const T elems[mRows][nColumns])
 {
-    List<Container> lst(nRows);
+    List<Container> lst(mRows);
 
     Container cols(nColumns);
     forAll(lst, rowI)
diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C
index 69cdf15e742ade596dccada3e11f33701492e577..791d53cc591ae792abd441989f0225f76b3e73c6 100644
--- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C
+++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -286,8 +286,7 @@ Foam::Xfer<Foam::labelList> Foam::PackedBoolList::used() const
 
 // * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * * //
 
-Foam::PackedBoolList&
-Foam::PackedBoolList::operator=(const Foam::UList<bool>& lst)
+void Foam::PackedBoolList::operator=(const Foam::UList<bool>& lst)
 {
     this->setSize(lst.size());
 
@@ -296,8 +295,6 @@ Foam::PackedBoolList::operator=(const Foam::UList<bool>& lst)
     {
         set(elemI, lst[elemI]);
     }
-
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H
index 4909cf9240623ee4613ef969acf59db85ca11bd0..37620f97f8ec0adeefe6348f11c36f98855021c2 100644
--- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H
+++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,7 +112,7 @@ public:
         inline PackedBoolList(const Xfer<PackedBoolList>&);
 
         //- Construct by transferring the parameter contents
-        inline PackedBoolList(const Xfer<PackedList<1> >&);
+        inline PackedBoolList(const Xfer<PackedList<1>>&);
 
         //- Construct from a list of bools
         explicit inline PackedBoolList(const Foam::UList<bool>&);
@@ -191,24 +191,24 @@ public:
     // Member Operators
 
             //- Assignment of all entries to the given value.
-            inline PackedBoolList& operator=(const bool val);
+            inline void operator=(const bool val);
 
             //- Assignment operator.
-            inline PackedBoolList& operator=(const PackedBoolList&);
+            inline void operator=(const PackedBoolList&);
 
             //- Assignment operator.
-            inline PackedBoolList& operator=(const PackedList<1>&);
+            inline void operator=(const PackedList<1>&);
 
             //- Assignment operator.
-            PackedBoolList& operator=(const Foam::UList<bool>&);
+            void operator=(const Foam::UList<bool>&);
 
             //- Assignment operator,
             //  using the labels as indices to indicate which bits are set
-            inline PackedBoolList& operator=(const labelUList& indices);
+            inline void operator=(const labelUList& indices);
 
             //- Assignment operator,
             //  using the labels as indices to indicate which bits are set
-            inline PackedBoolList& operator=(const UIndirectList<label>&);
+            inline void operator=(const UIndirectList<label>&);
 
             //- Complement operator
             inline PackedBoolList operator~() const;
diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H
index 3a76fdc65cfb0f7ad74fc0076697b58ebd508dce..d5561cfc28288a636493e4a86c9d7972ab97e416 100644
--- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H
+++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ inline Foam::PackedBoolList::PackedBoolList(const Xfer<PackedBoolList>& lst)
 }
 
 
-inline Foam::PackedBoolList::PackedBoolList(const Xfer<PackedList<1> >& lst)
+inline Foam::PackedBoolList::PackedBoolList(const Xfer<PackedList<1>>& lst)
 :
     PackedList<1>(lst)
 {}
@@ -126,47 +126,35 @@ inline Foam::Xfer<Foam::PackedBoolList> Foam::PackedBoolList::xfer()
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-inline Foam::PackedBoolList&
-Foam::PackedBoolList::operator=(const bool val)
+inline void Foam::PackedBoolList::operator=(const bool val)
 {
     PackedList<1>::operator=(val);
-    return *this;
 }
 
 
-inline Foam::PackedBoolList&
-Foam::PackedBoolList::operator=(const PackedBoolList& lst)
+inline void Foam::PackedBoolList::operator=(const PackedBoolList& lst)
 {
     PackedList<1>::operator=(lst);
-    return *this;
 }
 
 
-inline Foam::PackedBoolList&
-Foam::PackedBoolList::operator=(const PackedList<1>& lst)
+inline void Foam::PackedBoolList::operator=(const PackedList<1>& lst)
 {
     PackedList<1>::operator=(lst);
-    return *this;
 }
 
 
-inline Foam::PackedBoolList&
-Foam::PackedBoolList::operator=(const labelUList& indices)
+inline void Foam::PackedBoolList::operator=(const labelUList& indices)
 {
     clear();
     set(indices);
-
-    return *this;
 }
 
 
-inline Foam::PackedBoolList&
-Foam::PackedBoolList::operator=(const UIndirectList<label>& indices)
+inline void Foam::PackedBoolList::operator=(const UIndirectList<label>& indices)
 {
     clear();
     set(indices);
-
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedList.C b/src/OpenFOAM/containers/Lists/PackedList/PackedList.C
index a33a3bac1630ec9629737251890ae7d8e7a789f8..5e0487ebcddbc901d4e89614f429537537a419fb 100644
--- a/src/OpenFOAM/containers/Lists/PackedList/PackedList.C
+++ b/src/OpenFOAM/containers/Lists/PackedList/PackedList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,23 +31,23 @@ License
 
 #if (UINT_MAX == 0xFFFFFFFF)
 // 32-bit counting, Hamming weight method
-#   define COUNT_PACKEDBITS(sum, x)                                           \
-{                                                                             \
-    x -= (x >> 1) & 0x55555555;                                               \
-    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);                           \
-    sum += (((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;                \
+    #define COUNT_PACKEDBITS(sum, x)                                            \
+{                                                                              \
+    x -= (x >> 1) & 0x55555555;                                                \
+    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);                            \
+    sum += (((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;                 \
 }
 #elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
 // 64-bit counting, Hamming weight method
-#   define COUNT_PACKEDBITS(sum, x)                                           \
-{                                                                             \
-    x -= (x >> 1) & 0x5555555555555555;                                       \
-    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333);           \
+    #define COUNT_PACKEDBITS(sum, x)                                            \
+{                                                                              \
+    x -= (x >> 1) & 0x5555555555555555;                                        \
+    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333);            \
     sum += (((x + (x >> 4)) & 0x0F0F0F0F0F0F0F0F) * 0x0101010101010101) >> 56;\
 }
 #else
 // Arbitrary number of bits, Brian Kernighan's method
-#   define COUNT_PACKEDBITS(sum, x)    for (; x; ++sum) { x &= x - 1; }
+    #define COUNT_PACKEDBITS(sum, x)    for (; x; ++sum) { x &= x - 1; }
 #endif
 
 
@@ -513,18 +513,15 @@ void Foam::PackedList<nBits>::writeEntry
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<unsigned nBits>
-Foam::PackedList<nBits>&
-Foam::PackedList<nBits>::operator=(const PackedList<nBits>& lst)
+void Foam::PackedList<nBits>::operator=(const PackedList<nBits>& lst)
 {
     StorageList::operator=(lst);
     size_ = lst.size();
-    return *this;
 }
 
 
 template<unsigned nBits>
-Foam::PackedList<nBits>&
-Foam::PackedList<nBits>::operator=(const labelUList& lst)
+void Foam::PackedList<nBits>::operator=(const labelUList& lst)
 {
     setCapacity(lst.size());
     size_ = lst.size();
@@ -533,13 +530,11 @@ Foam::PackedList<nBits>::operator=(const labelUList& lst)
     {
         set(i, lst[i]);
     }
-    return *this;
 }
 
 
 template<unsigned nBits>
-Foam::PackedList<nBits>&
-Foam::PackedList<nBits>::operator=(const UIndirectList<label>& lst)
+void Foam::PackedList<nBits>::operator=(const UIndirectList<label>& lst)
 {
     setCapacity(lst.size());
     size_ = lst.size();
@@ -548,7 +543,6 @@ Foam::PackedList<nBits>::operator=(const UIndirectList<label>& lst)
     {
         set(i, lst[i]);
     }
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedList.H
index ccec25c25e42e8ec812727e9d3310998370f488c..078a4dde9f45c86ad56d4fe979ff087c8a2d32c5 100644
--- a/src/OpenFOAM/containers/Lists/PackedList/PackedList.H
+++ b/src/OpenFOAM/containers/Lists/PackedList/PackedList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -226,7 +226,7 @@ public:
         inline PackedList(const PackedList<nBits>&);
 
         //- Construct by transferring the parameter contents
-        inline PackedList(const Xfer<PackedList<nBits> >&);
+        inline PackedList(const Xfer<PackedList<nBits>>&);
 
         //- Construct from a list of labels
         explicit inline PackedList(const labelUList&);
@@ -235,7 +235,7 @@ public:
         explicit inline PackedList(const UIndirectList<label>&);
 
         //- Clone
-        inline autoPtr< PackedList<nBits> > clone() const;
+        inline autoPtr<PackedList<nBits>> clone() const;
 
 
     // Member Functions
@@ -344,7 +344,7 @@ public:
             inline void transfer(PackedList<nBits>&);
 
             //- Transfer contents to the Xfer container
-            inline Xfer<PackedList<nBits> > xfer();
+            inline Xfer<PackedList<nBits>> xfer();
 
 
         // IO
@@ -398,16 +398,16 @@ public:
             inline iteratorBase operator[](const label);
 
             //- Assignment of all entries to the given value. Takes linear time.
-            inline PackedList<nBits>& operator=(const unsigned int val);
+            inline void operator=(const unsigned int val);
 
             //- Assignment operator.
-            PackedList<nBits>& operator=(const PackedList<nBits>&);
+            void operator=(const PackedList<nBits>&);
 
             //- Assignment operator.
-            PackedList<nBits>& operator=(const labelUList&);
+            void operator=(const labelUList&);
 
             //- Assignment operator.
-            PackedList<nBits>& operator=(const UIndirectList<label>&);
+            void operator=(const UIndirectList<label>&);
 
 
     // Iterators and helpers
@@ -468,11 +468,11 @@ public:
 
                 //- Assign value, not position.
                 //  This allows packed[0] = packed[3] for assigning values
-                inline unsigned int operator=(const iteratorBase&);
+                inline void operator=(const iteratorBase&);
 
                 //- Assign value.
                 //  A non-existent entry will be auto-vivified.
-                inline unsigned int operator=(const unsigned int val);
+                inline void operator=(const unsigned int val);
 
                 //- Conversion operator
                 //  Never auto-vivify entries.
@@ -522,7 +522,7 @@ public:
 
                 //- Assign from iteratorBase, eg iter = packedlist[i]
                 //  An out-of-range iterator is assigned end()
-                inline iterator& operator=(const iteratorBase&);
+                inline void operator=(const iteratorBase&);
 
                 //- Return value
                 inline unsigned int operator*() const;
@@ -583,7 +583,7 @@ public:
 
                 //- Assign from iteratorBase or derived
                 //  eg, iter = packedlist[i] or even iter = list.begin()
-                inline const_iterator& operator=(const iteratorBase&);
+                inline void operator=(const iteratorBase&);
 
                 //- Return referenced value directly
                 inline unsigned int operator*() const;
@@ -639,7 +639,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PackedList.C"
+    #include "PackedList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H b/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H
index 01f21e37adf1e45f2796641996e692234663cf8d..69d68a8b328279796d9770b5f2b6a5b1cbfc55fa 100644
--- a/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H
+++ b/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ inline unsigned int Foam::PackedList<nBits>::packing()
 template<unsigned nBits>
 inline unsigned int Foam::PackedList<nBits>::maskLower(unsigned offset)
 {
-    // return (1u << (nBits * offset)) - 1;
+    // Return (1u << (nBits * offset)) - 1;
     // The next one works more reliably with overflows
     // eg, when compiled without optimization
     return (~0u >> ( sizeof(StorageType)*CHAR_BIT - nBits * offset));
@@ -222,7 +222,7 @@ inline Foam::PackedList<nBits>::PackedList(const PackedList<nBits>& lst)
 
 
 template<unsigned nBits>
-inline Foam::PackedList<nBits>::PackedList(const Xfer<PackedList<nBits> >& lst)
+inline Foam::PackedList<nBits>::PackedList(const Xfer<PackedList<nBits>>& lst)
 {
     transfer(lst());
 }
@@ -257,17 +257,15 @@ inline Foam::PackedList<nBits>::PackedList(const UIndirectList<label>& lst)
 
 
 template<unsigned nBits>
-inline Foam::autoPtr<Foam::PackedList<nBits> >
+inline Foam::autoPtr<Foam::PackedList<nBits>>
 Foam::PackedList<nBits>::clone() const
 {
-    return autoPtr<PackedList<nBits> >(new PackedList<nBits>(*this));
+    return autoPtr<PackedList<nBits>>(new PackedList<nBits>(*this));
 }
 
 
 // * * * * * * * * * * * * * * * * Iterators * * * * * * * * * * * * * * * * //
 
-// iteratorBase
-
 template<unsigned nBits>
 inline Foam::PackedList<nBits>::iteratorBase::iteratorBase()
 :
@@ -315,7 +313,7 @@ Foam::PackedList<nBits>::iteratorBase::set(const unsigned int val)
 
     if (val >= max_value())
     {
-        // overflow is max_value, fill everything
+        // Overflow is max_value, fill everything
         stored |= mask;
     }
     else
@@ -356,27 +354,29 @@ inline bool Foam::PackedList<nBits>::iteratorBase::operator!=
 
 
 template<unsigned nBits>
-inline unsigned int
-Foam::PackedList<nBits>::iteratorBase::operator=(const iteratorBase& iter)
+inline void Foam::PackedList<nBits>::iteratorBase::operator=
+(
+    const iteratorBase& iter
+)
 {
     const unsigned int val = iter.get();
     this->set(val);
-    return val;
 }
 
 
 template<unsigned nBits>
-inline unsigned int
-Foam::PackedList<nBits>::iteratorBase::operator=(const unsigned int val)
+inline void Foam::PackedList<nBits>::iteratorBase::operator=
+(
+    const unsigned int val
+)
 {
-    // lazy evaluation - increase size on assigment
+    // Lazy evaluation - increase size on assigment
     if (index_ >= list_->size_)
     {
         list_->resize(index_ + 1);
     }
 
     this->set(val);
-    return val;
 }
 
 
@@ -384,7 +384,7 @@ template<unsigned nBits>
 inline Foam::PackedList<nBits>::iteratorBase::operator
 unsigned int () const
 {
-    // lazy evaluation - return 0 for out-of-range
+    // Lazy evaluation - return 0 for out-of-range
     if (index_ >= list_->size_)
     {
         return 0;
@@ -394,8 +394,6 @@ unsigned int () const
 }
 
 
-// const_iterator, iterator
-
 template<unsigned nBits>
 inline Foam::PackedList<nBits>::iterator::iterator()
 :
@@ -418,7 +416,7 @@ inline Foam::PackedList<nBits>::iterator::iterator
 :
     iteratorBase(iter)
 {
-    // avoid going past end()
+    // Avoid going past end()
     // eg, iter = iterator(list, Inf)
     if (this->index_ > this->list_->size_)
     {
@@ -435,7 +433,7 @@ inline Foam::PackedList<nBits>::const_iterator::const_iterator
 :
     iteratorBase(iter)
 {
-    // avoid going past end()
+    // Avoid going past end()
     // eg, iter = iterator(list, Inf)
     if (this->index_ > this->list_->size_)
     {
@@ -517,31 +515,33 @@ inline bool Foam::PackedList<nBits>::const_iterator::operator!=
 
 
 template<unsigned nBits>
-inline typename Foam::PackedList<nBits>::iterator&
-Foam::PackedList<nBits>::iterator::operator=(const iteratorBase& iter)
+inline void Foam::PackedList<nBits>::iterator::operator=
+(
+    const iteratorBase& iter
+)
 {
     this->list_  = iter.list_;
     this->index_ = iter.index_;
 
-    // avoid going past end()
+    // Avoid going past end()
     // eg, iter = iterator(list, Inf)
     if (this->index_ > this->list_->size_)
     {
         this->index_ = this->list_->size_;
     }
-
-    return *this;
 }
 
 
 template<unsigned nBits>
-inline typename Foam::PackedList<nBits>::const_iterator&
-Foam::PackedList<nBits>::const_iterator::operator=(const iteratorBase& iter)
+inline void Foam::PackedList<nBits>::const_iterator::operator=
+(
+    const iteratorBase& iter
+)
 {
     this->list_  = iter.list_;
     this->index_ = iter.index_;
 
-    // avoid going past end()
+    // Avoid going past end()
     // eg, iter = iterator(list, Inf)
     if (this->index_ > this->list_->size_)
     {
@@ -738,15 +738,15 @@ inline void Foam::PackedList<nBits>::resize
 
     if (size_ > oldSize)
     {
-        // fill new elements or newly exposed elements
+        // Fill new elements or newly exposed elements
         if (val)
         {
-            // fill value for complete segments
+            // Fill value for complete segments
             unsigned int fill = val;
 
             if (val >= max_value())
             {
-                // fill everything
+                // Fill everything
                 fill = maskLower(packing());
             }
             else
@@ -757,7 +757,7 @@ inline void Foam::PackedList<nBits>::resize
                 }
             }
 
-            // fill in complete segments
+            // Fill in complete segments
             const label oldLen = packedLength(oldSize);
             const label newLen = packedLength(size_);
             for (label i=oldLen; i < newLen; ++i)
@@ -765,7 +765,7 @@ inline void Foam::PackedList<nBits>::resize
                 StorageList::operator[](i) = fill;
             }
 
-            // finish previous partial segment, preserve existing value
+            // Finish previous partial segment, preserve existing value
             {
                 const unsigned int off = oldSize % packing();
                 if (off)
@@ -779,7 +779,7 @@ inline void Foam::PackedList<nBits>::resize
             }
 
 
-            // mask off the (new) final partial segment
+            // Mask off the (new) final partial segment
             {
                 const unsigned int off = size_ % packing();
                 if (off)
@@ -793,10 +793,10 @@ inline void Foam::PackedList<nBits>::resize
     }
     else if (size_ < oldSize)
     {
-        // resize shrinking
+        // Resize shrinking
         // - clear newly exposed elements
 
-        // fill in complete segments
+        // Fill in complete segments
         const label oldLen = packedLength(oldSize);
         const label newLen = packedLength(size_);
         for (label i=newLen; i < oldLen; ++i)
@@ -804,7 +804,7 @@ inline void Foam::PackedList<nBits>::resize
             StorageList::operator[](i) = 0u;
         }
 
-        // mask off the final partial segment
+        // Mask off the final partial segment
         {
             const unsigned int off = size_ % packing();
             if (off)
@@ -842,12 +842,12 @@ inline void Foam::PackedList<nBits>::setCapacity(const label nElem)
 {
     StorageList::setSize(packedLength(nElem), 0u);
 
-    // truncate addressed size too
+    // Truncate addressed size too
     if (size_ > nElem)
     {
         size_ = nElem;
 
-        // mask off the final partial segment
+        // Mask off the final partial segment
         const unsigned int off = size_ % packing();
         if (off)
         {
@@ -864,7 +864,7 @@ inline void Foam::PackedList<nBits>::reserve(const label nElem)
 {
     const label len = packedLength(nElem);
 
-    // need more capacity?
+    // Need more capacity?
     if (len > StorageList::size())
     {
         // Like DynamicList with SizeInc=0, SizeMult=2, SizeDiv=1
@@ -907,7 +907,7 @@ inline void Foam::PackedList<nBits>::clearStorage()
 template<unsigned nBits>
 inline void Foam::PackedList<nBits>::shrink()
 {
-    // any uneed space allocated?
+    // Any uneed space allocated?
     const label len = packedLength();
     if (len < StorageList::size())
     {
@@ -954,7 +954,7 @@ inline void Foam::PackedList<nBits>::transfer(PackedList<nBits>& lst)
 
 
 template<unsigned nBits>
-inline Foam::Xfer<Foam::PackedList<nBits> > Foam::PackedList<nBits>::xfer()
+inline Foam::Xfer<Foam::PackedList<nBits>> Foam::PackedList<nBits>::xfer()
 {
     return xferMove(*this);
 }
@@ -963,7 +963,7 @@ inline Foam::Xfer<Foam::PackedList<nBits> > Foam::PackedList<nBits>::xfer()
 template<unsigned nBits>
 inline unsigned int Foam::PackedList<nBits>::get(const label i) const
 {
-    // lazy evaluation - return 0 for out-of-range
+    // Lazy evaluation - return 0 for out-of-range
     if (i < 0 || i >= size_)
     {
         return 0;
@@ -978,7 +978,7 @@ inline unsigned int Foam::PackedList<nBits>::get(const label i) const
 template<unsigned nBits>
 inline unsigned int Foam::PackedList<nBits>::operator[](const label i) const
 {
-    // lazy evaluation - return 0 for out-of-range
+    // Lazy evaluation - return 0 for out-of-range
     if (i < 0 || i >= size_)
     {
         return 0;
@@ -999,12 +999,12 @@ inline bool Foam::PackedList<nBits>::set
 {
     if (i < 0)
     {
-        // lazy evaluation - ignore out-of-bounds
+        // Lazy evaluation - ignore out-of-bounds
         return false;
     }
     else if (i >= size_)
     {
-        // lazy evaluation - increase size on assigment
+        // Lazy evaluation - increase size on assigment
         resize(i + 1);
     }
 
@@ -1066,8 +1066,7 @@ Foam::PackedList<nBits>::operator[](const label i)
 
 
 template<unsigned nBits>
-inline Foam::PackedList<nBits>&
-Foam::PackedList<nBits>::operator=(const unsigned int val)
+inline void Foam::PackedList<nBits>::operator=(const unsigned int val)
 {
     const label packLen = packedLength();
 
@@ -1077,7 +1076,7 @@ Foam::PackedList<nBits>::operator=(const unsigned int val)
 
         if (val >= max_value())
         {
-            // fill everything
+            // Fill everything
             fill = maskLower(packing());
         }
         else
@@ -1093,7 +1092,7 @@ Foam::PackedList<nBits>::operator=(const unsigned int val)
             StorageList::operator[](i) = fill;
         }
 
-        // mask off the final partial segment
+        // Mask off the final partial segment
         {
             const unsigned int off = size_ % packing();
             if (off)
@@ -1111,8 +1110,6 @@ Foam::PackedList<nBits>::operator=(const unsigned int val)
             StorageList::operator[](i) = 0u;
         }
     }
-
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C
index db29382769a6c8c393e724298c8bb2ea1f358f55..2fdafcbb74711faf48f042611a82b65856f3dd5e 100644
--- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C
+++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,27 +70,18 @@ Foam::PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
 
 
 template<class T>
-Foam::PtrList<T>::PtrList(const Xfer<PtrList<T> >& lst)
+Foam::PtrList<T>::PtrList(const Xfer<PtrList<T>>& lst)
 {
     transfer(lst());
 }
 
 
 template<class T>
-Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
+Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reuse)
 :
-    ptrs_(a.size())
+    ptrs_(a.ptrs_, reuse)
 {
-    if (reUse)
-    {
-        forAll(*this, i)
-        {
-            ptrs_[i] = a.ptrs_[i];
-            a.ptrs_[i] = NULL;
-        }
-        a.setSize(0);
-    }
-    else
+    if (!reuse)
     {
         forAll(*this, i)
         {
@@ -258,7 +249,7 @@ void Foam::PtrList<T>::reorder(const labelUList& oldToNew)
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class T>
-Foam::PtrList<T>& Foam::PtrList<T>::operator=(const PtrList<T>& a)
+void Foam::PtrList<T>::operator=(const PtrList<T>& a)
 {
     if (this == &a)
     {
@@ -290,9 +281,6 @@ Foam::PtrList<T>& Foam::PtrList<T>::operator=(const PtrList<T>& a)
             << " for type " << typeid(T).name()
             << abort(FatalError);
     }
-
-
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H
index b3b2924d9f8becac800ae3607f24d50e66ca4784..2b5e5584d6c5c183319d436897cdfc4c7b0ddf0c 100644
--- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H
+++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -158,10 +158,10 @@ public:
         PtrList(const PtrList<T>&, const CloneArg&);
 
         //- Construct by transferring the parameter contents
-        PtrList(const Xfer<PtrList<T> >&);
+        PtrList(const Xfer<PtrList<T>>&);
 
         //- Construct as copy or re-use as specified.
-        PtrList(PtrList<T>&, bool reUse);
+        PtrList(PtrList<T>&, bool reuse);
 
         //- Construct as copy of SLPtrList<T>
         explicit PtrList(const SLPtrList<T>&);
@@ -224,7 +224,7 @@ public:
             void transfer(PtrList<T>&);
 
             //- Transfer contents to the Xfer container
-            inline Xfer<PtrList<T> > xfer();
+            inline Xfer<PtrList<T>> xfer();
 
             //- Is element set
             inline bool set(const label) const;
@@ -252,9 +252,8 @@ public:
         //- Return element const pointer.
         inline const T* operator()(const label) const;
 
-
         //- Assignment.
-        PtrList<T>& operator=(const PtrList<T>&);
+        void operator=(const PtrList<T>&);
 
 
     // STL type definitions
@@ -433,12 +432,12 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "PtrListI.H"
+    #include "PtrListI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PtrList.C"
+    #include "PtrList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H
index c9065e8c46b4ee423265d4d2f0d07a0eaa394949..2913f19106eb2fc88681ce993a4b866ffbfa7f70 100644
--- a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H
+++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -142,7 +142,7 @@ inline Foam::autoPtr<T> Foam::PtrList<T>::set
 
 
 template<class T>
-inline Foam::Xfer<Foam::PtrList<T> > Foam::PtrList<T>::xfer()
+inline Foam::Xfer<Foam::PtrList<T>> Foam::PtrList<T>::xfer()
 {
     return xferMove(*this);
 }
diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C b/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C
index 81741ed1c6bed69031bc3e64f9a2b545ac3cf5f5..893a1cfd02c7508a92121dcd960e279c1c25d903 100644
--- a/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C
+++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -188,7 +188,8 @@ template<class T>
 Foam::Ostream& Foam::operator<<(Ostream& os, const PtrList<T>& L)
 {
     // Write size and start delimiter
-    os << nl << L.size() << nl << token::BEGIN_LIST;
+    os  << nl << indent << L.size() << nl
+        << indent << token::BEGIN_LIST << incrIndent;
 
     // Write contents
     forAll(L, i)
@@ -197,7 +198,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const PtrList<T>& L)
     }
 
     // Write end delimiter
-    os << nl << token::END_LIST << nl;
+    os << nl << decrIndent << indent << token::END_LIST << nl;
 
     // Check state of IOstream
     os.check("Ostream& operator<<(Ostream&, const PtrList&)");
diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C
index ef9e71ffc209a1cc79847df2d3d0fd8ad729fe9a..67de1b2dc043bdd32e340a0499199e0a130aac1b 100644
--- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C
+++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,6 @@ void Foam::ParSortableList<Type>::write
 }
 
 
-// Copy src, starting at destI into dest.
 template<class Type>
 void Foam::ParSortableList<Type>::copyInto
 (
@@ -122,7 +121,6 @@ void Foam::ParSortableList<Type>::checkAndSend
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from List, sorting the elements
 template<class Type>
 Foam::ParSortableList<Type>::ParSortableList(const UList<Type>& values)
 :
@@ -134,7 +132,6 @@ Foam::ParSortableList<Type>::ParSortableList(const UList<Type>& values)
 }
 
 
-// Construct given size. Sort later on.
 template<class Type>
 Foam::ParSortableList<Type>::ParSortableList(const label size)
 :
@@ -146,7 +143,6 @@ Foam::ParSortableList<Type>::ParSortableList(const label size)
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Sort
 template<class Type>
 void Foam::ParSortableList<Type>::sort()
 {
diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H
index c528d94d86bcea09511212a4f9f7929d748a1473..9d7bdf71c4927a2b3e270f7a3b81c8acce7aa6af 100644
--- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H
+++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -204,7 +204,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ParSortableList.C"
+    #include "ParSortableList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C
index d610a56a04cdf408325dcb8a8b1b805d53945563..784b1f9e1d64828e884f752143690bb1a5a3d9fa 100644
--- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C
+++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ Foam::SortableList<T>::SortableList(const UList<T>& values)
 
 
 template<class T>
-Foam::SortableList<T>::SortableList(const Xfer<List<T> >& values)
+Foam::SortableList<T>::SortableList(const Xfer<List<T>>& values)
 :
     List<T>(values)
 {
@@ -122,9 +122,9 @@ void Foam::SortableList<T>::reverseSort()
 
 
 template<class T>
-Foam::Xfer<Foam::List<T> > Foam::SortableList<T>::xfer()
+Foam::Xfer<Foam::List<T>> Foam::SortableList<T>::xfer()
 {
-    return xferMoveTo<List<T> >(*this);
+    return xferMoveTo<List<T>>(*this);
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H
index 2d7b31a9e89ff315670d6608d23882528294d985..1eb4fe782c16400d35c9812b88d47f1bea32a71c 100644
--- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H
+++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ public:
         explicit SortableList(const UList<T>&);
 
         //- Construct from transferred List, sorting immediately.
-        explicit SortableList(const Xfer<List<T> >&);
+        explicit SortableList(const Xfer<List<T>>&);
 
         //- Construct given size. Sort later on.
         //  The indices remain empty until the list is sorted
@@ -113,7 +113,7 @@ public:
         void reverseSort();
 
         //- Transfer contents to the Xfer container as a plain List
-        inline Xfer<List<T> > xfer();
+        inline Xfer<List<T>> xfer();
 
 
     // Member Operators
@@ -137,7 +137,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SortableList.C"
+    #include "SortableList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/SubList/SubList.H b/src/OpenFOAM/containers/Lists/SubList/SubList.H
index b75745382ae4311511302528653550fc7f234cd5..b55fced6bb53d9272febef281fa1eacc5e82c901 100644
--- a/src/OpenFOAM/containers/Lists/SubList/SubList.H
+++ b/src/OpenFOAM/containers/Lists/SubList/SubList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,6 +87,12 @@ public:
         //- Allow cast to a const List<T>&
         inline operator const Foam::List<T>&() const;
 
+        //- Assignment of all entries to the given sub-list
+        inline void operator=(const SubList<T>&);
+
+        //- Assignment of all entries to the given list
+        inline void operator=(const UList<T>&);
+
         //- Assignment of all entries to the given value
         inline void operator=(const T&);
 };
diff --git a/src/OpenFOAM/containers/Lists/SubList/SubListI.H b/src/OpenFOAM/containers/Lists/SubList/SubListI.H
index 98a419186572d3502f090a6fb10f7c8c5bbbc869..dbbed7469baecb610f36bba690721ac92287c5a7 100644
--- a/src/OpenFOAM/containers/Lists/SubList/SubListI.H
+++ b/src/OpenFOAM/containers/Lists/SubList/SubListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,9 +34,9 @@ inline Foam::SubList<T>::SubList
 :
     UList<T>(list.v_, subSize)
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     list.checkSize(subSize);
-#   endif
+    #endif
 }
 
 
@@ -50,7 +50,7 @@ inline Foam::SubList<T>::SubList
 :
     UList<T>(&(list.v_[startIndex]), subSize)
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
 
     // Artificially allow the start of a zero-sized subList to be
     // one past the end of the original list.
@@ -65,7 +65,7 @@ inline Foam::SubList<T>::SubList
         // behind the last element is allowed
         list.checkSize(startIndex);
     }
-#   endif
+    #endif
 }
 
 
@@ -74,7 +74,7 @@ inline Foam::SubList<T>::SubList
 template<class T>
 inline const Foam::SubList<T>& Foam::SubList<T>::null()
 {
-    return NullObjectRef<SubList<T> >();
+    return NullObjectRef<SubList<T>>();
 }
 
 
@@ -83,7 +83,21 @@ inline const Foam::SubList<T>& Foam::SubList<T>::null()
 template<class T>
 inline Foam::SubList<T>::operator const Foam::List<T>&() const
 {
-    return *reinterpret_cast< const List<T>* >(this);
+    return *reinterpret_cast<const List<T>* >(this);
+}
+
+
+template<class T>
+inline void Foam::SubList<T>::operator=(const SubList<T>& sl)
+{
+    UList<T>::deepCopy(sl);
+}
+
+
+template<class T>
+inline void Foam::SubList<T>::operator=(const UList<T>& l)
+{
+    UList<T>::deepCopy(l);
 }
 
 
diff --git a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H
index 4409dac8c057ee3f1c1510a00ae094fe4eea5305..bb3b9e3a9ad8f3fa9b53e48f2462c476e6ef6d82 100644
--- a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H
+++ b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -165,7 +165,7 @@ public:
 #include "UIndirectListI.H"
 
 #ifdef NoRepository
-#   include "UIndirectListIO.C"
+    #include "UIndirectListIO.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/UList/UList.C b/src/OpenFOAM/containers/Lists/UList/UList.C
index 2bbe09038ac2521ccbb73355277eb4a57b9aa913..ea871ed3f96f7676c30059cca88378ef1b7cf504 100644
--- a/src/OpenFOAM/containers/Lists/UList/UList.C
+++ b/src/OpenFOAM/containers/Lists/UList/UList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class T>
-void Foam::UList<T>::assign(const UList<T>& a)
+void Foam::UList<T>::deepCopy(const UList<T>& a)
 {
     if (a.size_ != this->size_)
     {
@@ -76,6 +76,16 @@ void Foam::UList<T>::operator=(const T& t)
 }
 
 
+template<class T>
+void Foam::UList<T>::operator=(const zero)
+{
+    List_ACCESS(T, (*this), vp);
+    List_FOR_ALL((*this), i)
+        List_ELEM((*this), vp, i) = Zero;
+    List_END_FOR_ALL
+}
+
+
 // * * * * * * * * * * * * * * STL Member Functions  * * * * * * * * * * * * //
 
 template<class T>
diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H
index 1bb858d7969a150c9fe0b037a615c4c66f944535..984bd90436ddd74c0b99e70738514df2396c027e 100644
--- a/src/OpenFOAM/containers/Lists/UList/UList.H
+++ b/src/OpenFOAM/containers/Lists/UList/UList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,6 +46,7 @@ SourceFiles
 #include "label.H"
 #include "uLabel.H"
 #include "nullObject.H"
+#include "zero.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -79,6 +80,19 @@ class UList
         T* __restrict__ v_;
 
 
+    // Private Member Functions
+
+        //- Disallow default shallow-copy assignment
+        //
+        //  Assignment of UList<T> may need to be either shallow (copy pointer)
+        //  or deep (copy elements) depending on context or the particular type
+        //  of list derived from UList and it is confusing and prone to error
+        //  for the default assignment to be either.  The solution is to
+        //  disallow default assignment and provide separate 'shallowCopy' and
+        //  'deepCopy' member functions.
+        void operator=(const UList<T>&) = delete;
+
+
 public:
 
     // Related types
@@ -89,11 +103,13 @@ public:
         //- Declare friendship with the SubList class
         friend class SubList<T>;
 
+
     // Static Member Functions
 
         //- Return a null UList
         inline static const UList<T>& null();
 
+
     // Public classes
 
         //- Less function class that can be used for sorting
@@ -197,15 +213,18 @@ public:
             inline void checkIndex(const label i) const;
 
 
+        //- Copy the pointer held by the given UList.
+        inline void shallowCopy(const UList<T>&);
+
+        //- Copy elements of the given UList.
+        void deepCopy(const UList<T>&);
+
         //- Write the UList as a dictionary entry.
         void writeEntry(Ostream&) const;
 
         //- Write the UList as a dictionary entry with keyword.
         void writeEntry(const word& keyword, Ostream&) const;
 
-        //- Assign elements to those from UList.
-        void assign(const UList<T>&);
-
 
     // Member operators
 
@@ -223,6 +242,9 @@ public:
         //- Assignment of all entries to the given value
         void operator=(const T&);
 
+        //- Assignment of all entries to zero
+        void operator=(const zero);
+
 
     // STL type definitions
 
@@ -323,7 +345,7 @@ public:
     // STL member operators
 
         //- Equality operation on ULists of the same type.
-        //  Returns true when the ULists are elementwise equal
+        //  Returns true when the ULists are element-wise equal
         //  (using UList::value_type::operator==).  Takes linear time.
         bool operator==(const UList<T>&) const;
 
@@ -391,7 +413,7 @@ inline void reverse(UList<T>&);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "UListI.H"
+    #include "UListI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -459,7 +481,7 @@ inline void reverse(UList<T>&);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UList.C"
+    #include "UList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/UList/UListI.H b/src/OpenFOAM/containers/Lists/UList/UListI.H
index 5985d4526ca4fb6e6846f69c722d243aa03009fe..0e4825c79c85f578c3bfcaeedcdcce01ab316712 100644
--- a/src/OpenFOAM/containers/Lists/UList/UListI.H
+++ b/src/OpenFOAM/containers/Lists/UList/UListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ inline Foam::UList<T>::UList(T* __restrict__ v, label size)
 template<class T>
 inline const Foam::UList<T>& Foam::UList<T>::null()
 {
-    return NullObjectRef<UList<T> >();
+    return NullObjectRef<UList<T>>();
 }
 
 
@@ -68,7 +68,6 @@ inline Foam::label Foam::UList<T>::rcIndex(const label i) const
 }
 
 
-// Check start is within valid range (0 ... size-1).
 template<class T>
 inline void Foam::UList<T>::checkStart(const label start) const
 {
@@ -81,7 +80,6 @@ inline void Foam::UList<T>::checkStart(const label start) const
 }
 
 
-// Check size is within valid range (0 ... size).
 template<class T>
 inline void Foam::UList<T>::checkSize(const label size) const
 {
@@ -94,7 +92,6 @@ inline void Foam::UList<T>::checkSize(const label size) const
 }
 
 
-// Check index i is within valid range (0 ... size-1).
 template<class T>
 inline void Foam::UList<T>::checkIndex(const label i) const
 {
@@ -155,23 +152,29 @@ inline T* Foam::UList<T>::data()
 }
 
 
+template<class T>
+inline void Foam::UList<T>::shallowCopy(const UList<T>& a)
+{
+    size_ = a.size_;
+    v_ = a.v_;
+}
+
+
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 
-// element access
 template<class T>
 inline T& Foam::UList<T>::operator[](const label i)
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     checkIndex(i);
-#   endif
+    #endif
     return v_[i];
 }
 
 
 namespace Foam
 {
-
     // Template specialization for bool
     template<>
     inline const bool& Foam::UList<bool>::operator[](const label i) const
@@ -186,22 +189,19 @@ namespace Foam
             return Foam::pTraits<bool>::zero;
         }
     }
-
-} // end of namespace Foam
+}
 
 
-// const element access
 template<class T>
 inline const T& Foam::UList<T>::operator[](const label i) const
 {
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     checkIndex(i);
-#   endif
+    #endif
     return v_[i];
 }
 
 
-// Allow cast to a const List<T>&
 template<class T>
 inline Foam::UList<T>::operator const Foam::List<T>&() const
 {
diff --git a/src/OpenFOAM/containers/Lists/UList/UListIO.C b/src/OpenFOAM/containers/Lists/UList/UListIO.C
index bb888a7fd276d4fd65e1d7068e51310ba42c8953..e31b5dd2bcc1933483b32dde4428a58b8d1c4ab7 100644
--- a/src/OpenFOAM/containers/Lists/UList/UListIO.C
+++ b/src/OpenFOAM/containers/Lists/UList/UListIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -152,7 +152,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
         List<T> elems;
         elems.transfer
         (
-            dynamicCast<token::Compound<List<T> > >
+            dynamicCast<token::Compound<List<T>>>
             (
                 firstToken.transferCompoundToken(is)
             )
diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C
index 7eff18957bd8f090e4994c5e41c31f071e9d6be7..dd52529602ca0262ef90df4e4314c4e7cdd59f0a 100644
--- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C
+++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -68,16 +68,16 @@ Foam::UPtrList<T>::UPtrList(PtrList<T>& lst)
 
 
 template<class T>
-Foam::UPtrList<T>::UPtrList(const Xfer<UPtrList<T> >& lst)
+Foam::UPtrList<T>::UPtrList(const Xfer<UPtrList<T>>& lst)
 {
     transfer(lst());
 }
 
 
 template<class T>
-Foam::UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
+Foam::UPtrList<T>::UPtrList(UPtrList<T>& a, bool reuse)
 :
-    ptrs_(a.ptrs_, reUse)
+    ptrs_(a.ptrs_, reuse)
 {}
 
 
diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H
index e6f776807ca72330e1248c9d824bc365a3ccb3c0..06e0c3b9dfdf65b398f491e3c6f66aec253f33de 100644
--- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H
+++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,10 +117,10 @@ public:
         explicit UPtrList(PtrList<T>&);
 
         //- Construct by transferring the parameter contents
-        UPtrList(const Xfer<UPtrList<T> >&);
+        UPtrList(const Xfer<UPtrList<T>>&);
 
         //- Construct as copy or re-use as specified.
-        UPtrList(UPtrList<T>&, bool reUse);
+        UPtrList(UPtrList<T>&, bool reuse);
 
 
     // Member functions
@@ -166,7 +166,7 @@ public:
             void transfer(UPtrList<T>&);
 
             //- Transfer contents to the Xfer container
-            inline Xfer<UPtrList<T> > xfer();
+            inline Xfer<UPtrList<T>> xfer();
 
             //- Is element set
             inline bool set(const label) const;
@@ -280,12 +280,12 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "UPtrListI.H"
+#include "UPtrListI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UPtrList.C"
+    #include "UPtrList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H
index 2f69d169299a818876f516d105b270351e0c63b9..7162cd5c3d7cf0fb084658bc49eb4f23483a3260 100644
--- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H
+++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,7 +93,7 @@ inline T* Foam::UPtrList<T>::set(const label i, T* ptr)
 
 
 template<class T>
-inline Foam::Xfer<Foam::UPtrList<T> > Foam::UPtrList<T>::xfer()
+inline Foam::Xfer<Foam::UPtrList<T>> Foam::UPtrList<T>::xfer()
 {
     return xferMove(*this);
 }
diff --git a/src/OpenFOAM/containers/NamedEnum/NamedEnum.H b/src/OpenFOAM/containers/NamedEnum/NamedEnum.H
index 3fb7dc0e07d13d1ed89a2d8a4ef969e7f33a097b..f4af06792cadd8a8aae25d79900ae4b7ef8b673b 100644
--- a/src/OpenFOAM/containers/NamedEnum/NamedEnum.H
+++ b/src/OpenFOAM/containers/NamedEnum/NamedEnum.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NamedEnum.C"
+    #include "NamedEnum.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/Callback/Callback.H b/src/OpenFOAM/db/Callback/Callback.H
index c4ef9705954f1fe51d38814b8dcd48b5d94dbcab..b68e13e1e6cbfd220640085cb7338d87463e7636 100644
--- a/src/OpenFOAM/db/Callback/Callback.H
+++ b/src/OpenFOAM/db/Callback/Callback.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Callback.C"
+    #include "Callback.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/CallbackRegistry/CallbackRegistry.H b/src/OpenFOAM/db/CallbackRegistry/CallbackRegistry.H
index 71777c2c09b69040a7b39566632d6a613bd1b925..e2481e64732529e0510326ac8baf817619f3e4db 100644
--- a/src/OpenFOAM/db/CallbackRegistry/CallbackRegistry.H
+++ b/src/OpenFOAM/db/CallbackRegistry/CallbackRegistry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CallbackRegistry.C"
+    #include "CallbackRegistry.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C
index 3643d1ee2220e0fc031898963e63823aa4f84f9e..aa5b0e249d3b7969de330c7e16554d1694afb0f1 100644
--- a/src/OpenFOAM/db/IOobject/IOobject.C
+++ b/src/OpenFOAM/db/IOobject/IOobject.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -210,7 +210,8 @@ Foam::IOobject::IOobject
 {
     if (objectRegistry::debug)
     {
-        Info<< "Constructing IOobject called " << name_
+        InfoInFunction
+            << "Constructing IOobject called " << name_
             << " of type " << headerClassName_
             << endl;
     }
@@ -243,7 +244,8 @@ Foam::IOobject::IOobject
 {
     if (objectRegistry::debug)
     {
-        Info<< "Constructing IOobject called " << name_
+        InfoInFunction
+            << "Constructing IOobject called " << name_
             << " of type " << headerClassName_
             << endl;
     }
@@ -281,7 +283,8 @@ Foam::IOobject::IOobject
 
     if (objectRegistry::debug)
     {
-        Info<< "Constructing IOobject called " << name_
+        InfoInFunction
+            << "Constructing IOobject called " << name_
             << " of type " << headerClassName_
             << endl;
     }
@@ -600,14 +603,14 @@ void Foam::IOobject::setBad(const string& s)
     if (objState_ != GOOD)
     {
         FatalErrorInFunction
-            << "recurrent failure for object " << s
+            << "Recurrent failure for object " << s
             << exit(FatalError);
     }
 
     if (error::level)
     {
-        Info<< "IOobject::setBad(const string&) : "
-            << "broken object " << s << info() << endl;
+        InfoInFunction
+            << "Broken object " << s << info() << endl;
     }
 
     objState_ = BAD;
diff --git a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C
index 98b5e3e3ee33a918b761c631efc682dc8fd3ffbf..7d639e7b5cb6014e54382458c32cb4c67bfdb3dd 100644
--- a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C
+++ b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,7 @@ bool Foam::IOobject::readHeader(Istream& is)
 {
     if (IOobject::debug)
     {
-        Info<< "IOobject::readHeader(Istream&) : reading header for file "
-            << is.name() << endl;
+        InfoInFunction << "Reading header for file " << is.name() << endl;
     }
 
     // Check Istream not already bad
@@ -114,8 +113,8 @@ bool Foam::IOobject::readHeader(Istream& is)
 
         if (IOobject::debug)
         {
-            Info<< "IOobject::readHeader(Istream&) :"
-                << " stream failure while reading header"
+            InfoInFunction
+                << "Stream failure while reading header"
                 << " on line " << is.lineNumber()
                 << " of file " << is.name() << endl;
         }
diff --git a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C
index 5c9fd3210ddbd335194458b0fabece9916696d16..bb19caf668807f03e89c3e3d84d392df6205425b 100644
--- a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C
+++ b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,8 +36,8 @@ bool Foam::IOobject::writeHeader(Ostream& os, const word& type) const
 {
     if (!os.good())
     {
-        Info<< "IOobject::writeHeader(Ostream&) : "
-            << "no stream open for write" << nl
+        InfoInFunction
+            << "No stream open for write" << nl
             << os.info() << endl;
 
         return false;
diff --git a/src/OpenFOAM/db/IOobjectList/IOobjectList.C b/src/OpenFOAM/db/IOobjectList/IOobjectList.C
index 1ff7afedd4d42a49d7afc6fbe506bac493069dcd..d5c3e77214a78c377e1a96f2d4b7721d8beb3f14 100644
--- a/src/OpenFOAM/db/IOobjectList/IOobjectList.C
+++ b/src/OpenFOAM/db/IOobjectList/IOobjectList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ Foam::IOobjectList::IOobjectList
         );
 
         // Use object with local scope
-        if (objectPtr->typeHeaderOk<IOList<label> >(false))
+        if (objectPtr->typeHeaderOk<IOList<label>>(false))
         {
             insert(ObjectNames[i], objectPtr);
         }
@@ -134,8 +134,7 @@ Foam::IOobject* Foam::IOobjectList::lookup(const word& name) const
     {
         if (IOobject::debug)
         {
-            Info<< "IOobjectList::lookup : found "
-                << name << endl;
+            InfoInFunction << "Found " << name << endl;
         }
 
         return const_cast<IOobject*>(*iter);
@@ -144,8 +143,7 @@ Foam::IOobject* Foam::IOobjectList::lookup(const word& name) const
     {
         if (IOobject::debug)
         {
-            Info<< "IOobjectList::lookup : could not find "
-                << name << endl;
+            InfoInFunction << "Could not find " << name << endl;
         }
 
         return NULL;
@@ -163,7 +161,7 @@ Foam::IOobjectList Foam::IOobjectList::lookup(const wordRe& name) const
         {
             if (IOobject::debug)
             {
-                Info<< "IOobjectList::lookupRe : found " << iter.key() << endl;
+                InfoInFunction << "Found " << iter.key() << endl;
             }
 
             objectsOfName.insert(iter.key(), new IOobject(*iter()));
@@ -186,7 +184,7 @@ Foam::IOobjectList Foam::IOobjectList::lookup(const wordReList& patterns) const
         {
             if (IOobject::debug)
             {
-                Info<< "IOobjectList::lookupRe : found " << iter.key() << endl;
+                InfoInFunction << "Found " << iter.key() << endl;
             }
 
             objectsOfName.insert(iter.key(), new IOobject(*iter()));
@@ -207,8 +205,7 @@ Foam::IOobjectList Foam::IOobjectList::lookupClass(const word& ClassName) const
         {
             if (IOobject::debug)
             {
-                Info<< "IOobjectList::lookupClass : found "
-                    << iter.key() << endl;
+                InfoInFunction << "Found " << iter.key() << endl;
             }
 
             objectsOfClass.insert(iter.key(), new IOobject(*iter()));
diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C
index 9cdaf8de8891a597061a8c2eb38f42c219fbc151..c5e369b1cf2446dea1953117fa350d5aa6ed67f7 100644
--- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C
+++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ template<class T, class BaseType>
 Foam::CompactIOField<T, BaseType>::CompactIOField
 (
     const IOobject& io,
-    const Xfer<Field<T> >& list
+    const Xfer<Field<T>>& list
 )
 :
     regIOobject(io)
diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H
index 31edac7970051368473c1e3e634e902f40ebef4e..231119e6a003dacb1d337fceee29387fd0615893 100644
--- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H
+++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
         CompactIOField(const IOobject&, const Field<T>&);
 
         //- Construct by transferring the Field contents
-        CompactIOField(const IOobject&, const Xfer<Field<T> >&);
+        CompactIOField(const IOobject&, const Xfer<Field<T>>&);
 
 
     // Destructor
@@ -130,7 +130,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CompactIOField.C"
+    #include "CompactIOField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C
index 6feb58cbc56317c2e4c02fd45e7e1c9b1d9ad38e..8bb3aa009b3e886908b0adc469b47bd9c505d375 100644
--- a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C
+++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -142,7 +142,7 @@ template<class T, class BaseType>
 Foam::CompactIOList<T, BaseType>::CompactIOList
 (
     const IOobject& io,
-    const Xfer<List<T> >& list
+    const Xfer<List<T>>& list
 )
 :
     regIOobject(io)
diff --git a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H
index a0c8af07d20fc3873eb8d1163013a2c482317466..80c902c73bf24765ab39170fdf6eb63edc1484fd 100644
--- a/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H
+++ b/src/OpenFOAM/db/IOobjects/CompactIOList/CompactIOList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ public:
         CompactIOList(const IOobject&, const List<T>&);
 
         //- Construct by transferring the List contents
-        CompactIOList(const IOobject&, const Xfer<List<T> >&);
+        CompactIOList(const IOobject&, const Xfer<List<T>>&);
 
 
     // Destructor
@@ -152,7 +152,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CompactIOList.C"
+    #include "CompactIOList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C
index 84c9cc37714501f11c41bdb9293fb10e2ccd4765..3cb85ba18a19c5902a4a69a91447aa6bc5bcc0e0 100644
--- a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C
+++ b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -33,7 +33,7 @@ Foam::GlobalIOField<Type>::GlobalIOField(const IOobject& io)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOField<Type> >();
+    warnNoRereading<GlobalIOField<Type>>();
 
     readHeaderOk(IOstream::BINARY, typeName);
 }
@@ -45,7 +45,7 @@ Foam::GlobalIOField<Type>::GlobalIOField(const IOobject& io, const label size)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOField<Type> >();
+    warnNoRereading<GlobalIOField<Type>>();
 
     if (!readHeaderOk(IOstream::BINARY, typeName))
     {
@@ -64,7 +64,7 @@ Foam::GlobalIOField<Type>::GlobalIOField
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOField<Type> >();
+    warnNoRereading<GlobalIOField<Type>>();
 
     if (!readHeaderOk(IOstream::BINARY, typeName))
     {
@@ -77,13 +77,13 @@ template<class Type>
 Foam::GlobalIOField<Type>::GlobalIOField
 (
     const IOobject& io,
-    const Xfer<Field<Type> >& f
+    const Xfer<Field<Type>>& f
 )
 :
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOField<Type> >();
+    warnNoRereading<GlobalIOField<Type>>();
 
     Field<Type>::transfer(f());
 
diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H
index db33e9ef8cf3089a9999371d96ca0576bc7260df..ee2dcbf79a534e33bc0b9fb8a883c0c3ea0af955 100644
--- a/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H
+++ b/src/OpenFOAM/db/IOobjects/GlobalIOField/GlobalIOField.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -71,7 +71,7 @@ public:
         GlobalIOField(const IOobject&, const Field<Type>&);
 
         //- Construct by transferring the Field contents
-        GlobalIOField(const IOobject&, const Xfer<Field<Type> >&);
+        GlobalIOField(const IOobject&, const Xfer<Field<Type>>&);
 
 
     //- Destructor
diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C
index 51130e9b21ae031d106adce5eb285441677b606a..bad4fe1237f63303c775a016101f8b8f8c5853b1 100644
--- a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C
+++ b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -33,7 +33,7 @@ Foam::GlobalIOList<Type>::GlobalIOList(const IOobject& io)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOList<Type> >();
+    warnNoRereading<GlobalIOList<Type>>();
 
     readHeaderOk(IOstream::BINARY, typeName);
 }
@@ -45,7 +45,7 @@ Foam::GlobalIOList<Type>::GlobalIOList(const IOobject& io, const label size)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOList<Type> >();
+    warnNoRereading<GlobalIOList<Type>>();
 
     if (!readHeaderOk(IOstream::BINARY, typeName))
     {
@@ -60,7 +60,7 @@ Foam::GlobalIOList<Type>::GlobalIOList(const IOobject& io, const List<Type>& f)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOList<Type> >();
+    warnNoRereading<GlobalIOList<Type>>();
 
     if (!readHeaderOk(IOstream::BINARY, typeName))
     {
@@ -73,13 +73,13 @@ template<class Type>
 Foam::GlobalIOList<Type>::GlobalIOList
 (
     const IOobject& io,
-    const Xfer<List<Type> >& f
+    const Xfer<List<Type>>& f
 )
 :
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<GlobalIOList<Type> >();
+    warnNoRereading<GlobalIOList<Type>>();
 
     List<Type>::transfer(f());
 
diff --git a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H
index f2ef2ee73ed09c26b05b23f4fed141b94ca2527d..7230fd6c7d20c561a3a413527951031c25eb6d74 100644
--- a/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H
+++ b/src/OpenFOAM/db/IOobjects/GlobalIOList/GlobalIOList.H
@@ -71,7 +71,7 @@ public:
         GlobalIOList(const IOobject&, const List<Type>&);
 
         //- Construct by transferring the List contents
-        GlobalIOList(const IOobject&, const Xfer<List<Type> >&);
+        GlobalIOList(const IOobject&, const Xfer<List<Type>>&);
 
 
     //- Destructor
diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.C b/src/OpenFOAM/db/IOobjects/IOField/IOField.C
index 96ad19a83bce18bc638f08b557cc255c9361937c..ce115c36f7be69b5d4199835fa5204e9460d3a7a 100644
--- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C
+++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -33,7 +33,7 @@ Foam::IOField<Type>::IOField(const IOobject& io)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOField<Type> >();
+    warnNoRereading<IOField<Type>>();
 
     if
     (
@@ -56,7 +56,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const label size)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOField<Type> >();
+    warnNoRereading<IOField<Type>>();
 
     if
     (
@@ -83,7 +83,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOField<Type> >();
+    warnNoRereading<IOField<Type>>();
 
     if
     (
@@ -105,12 +105,12 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f)
 
 
 template<class Type>
-Foam::IOField<Type>::IOField(const IOobject& io, const Xfer<Field<Type> >& f)
+Foam::IOField<Type>::IOField(const IOobject& io, const Xfer<Field<Type>>& f)
 :
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOField<Type> >();
+    warnNoRereading<IOField<Type>>();
 
     Field<Type>::transfer(f());
 
diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.H b/src/OpenFOAM/db/IOobjects/IOField/IOField.H
index 5c18b4e4ffc3823abe620d2fb299114b8c36c8b3..c5029307db6099041028cdf1d1bc8a29222dafd2 100644
--- a/src/OpenFOAM/db/IOobjects/IOField/IOField.H
+++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ public:
         IOField(const IOobject&, const Field<Type>&);
 
         //- Construct by transferring the Field contents
-        IOField(const IOobject&, const Xfer<Field<Type> >&);
+        IOField(const IOobject&, const Xfer<Field<Type>>&);
 
 
     //- Destructor
@@ -98,7 +98,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IOField.C"
+    #include "IOField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C
index 63a8ac462be049db6b14ab4080103d1aded95796..3859e4de047cba95e4b63cb8fb0d9c44bec9e4ad 100644
--- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C
+++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -33,7 +33,7 @@ Foam::IOList<T>::IOList(const IOobject& io)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOList<T> >();
+    warnNoRereading<IOList<T>>();
 
     if
     (
@@ -56,7 +56,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const label size)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOList<T> >();
+    warnNoRereading<IOList<T>>();
 
     if
     (
@@ -83,7 +83,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list)
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOList<T> >();
+    warnNoRereading<IOList<T>>();
 
     if
     (
@@ -105,12 +105,12 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list)
 
 
 template<class T>
-Foam::IOList<T>::IOList(const IOobject& io, const Xfer<List<T> >& list)
+Foam::IOList<T>::IOList(const IOobject& io, const Xfer<List<T>>& list)
 :
     regIOobject(io)
 {
     // Check for MUST_READ_IF_MODIFIED
-    warnNoRereading<IOList<T> >();
+    warnNoRereading<IOList<T>>();
 
     List<T>::transfer(list());
 
diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.H b/src/OpenFOAM/db/IOobjects/IOList/IOList.H
index ef3f5c341fe0a804186345cc9cfb05d25efb1e17..ea5b42dc502353f3455fe9e74d095972ae60f468 100644
--- a/src/OpenFOAM/db/IOobjects/IOList/IOList.H
+++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ public:
         IOList(const IOobject&, const List<T>&);
 
         //- Construct by transferring the List contents
-        IOList(const IOobject&, const Xfer<List<T> >&);
+        IOList(const IOobject&, const Xfer<List<T>>&);
 
 
     //- Destructor
@@ -99,7 +99,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IOList.C"
+    #include "IOList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C
index 00a52ccc577c3e7459f4b17e92ccb97648b53959..39bf6c994f01343d2eb26b772fe91936ca8b2f73 100644
--- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C
+++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Map<T>& map)
 
 
 template<class T>
-Foam::IOMap<T>::IOMap(const IOobject& io, const Xfer<Map<T> >& map)
+Foam::IOMap<T>::IOMap(const IOobject& io, const Xfer<Map<T>>& map)
 :
     regIOobject(io)
 {
diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H
index 77dec6c5ff7734f7e6848d0853b6f89d374848e9..1d79af3ec54b1eb8ee9f27759e3dd7e5796ef9d6 100644
--- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H
+++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ public:
         IOMap(const IOobject&, const Map<T>&);
 
         //- Construct by transferring the Map contents
-        IOMap(const IOobject&, const Xfer<Map<T> >&);
+        IOMap(const IOobject&, const Xfer<Map<T>>&);
 
 
     //- Destructor
@@ -114,7 +114,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IOMap.C"
+    #include "IOMap.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMapName.C b/src/OpenFOAM/db/IOobjects/IOMap/IOMapName.C
index dd64eb60d5ab0175f54df204288f7af9019651c1..894dd2cfc603c0a7f6825f9b282185886491df05 100644
--- a/src/OpenFOAM/db/IOobjects/IOMap/IOMapName.C
+++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMapName.C
@@ -32,7 +32,7 @@ namespace Foam
 
     //- Template specialisation for obtaining filePath
     template<>
-    fileName typeFilePath<IOMap<dictionary> >(const IOobject& io)
+    fileName typeFilePath<IOMap<dictionary>>(const IOobject& io)
     {
         return io.globalFilePath();
     }
diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C
index 4df5f0ea14a9b2721dd0a07eec262adfbe9236d9..2c7e436faaf7f0615f8809473070a7a49d380ef2 100644
--- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C
+++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list)
 
 
 template<class T>
-Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const Xfer<PtrList<T> >& list)
+Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const Xfer<PtrList<T>>& list)
 :
     regIOobject(io)
 {
diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H
index 5267f38a2084c7a1fd045837806d848f068a449f..09df9ba721635104e70526225121fe1bcd852451 100644
--- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H
+++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ public:
         IOPtrList(const IOobject&, const PtrList<T>&);
 
         //- Construct by transferring the PtrList contents
-        IOPtrList(const IOobject&, const Xfer<PtrList<T> >&);
+        IOPtrList(const IOobject&, const Xfer<PtrList<T>>&);
 
 
     //- Destructor
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IOPtrList.C"
+    #include "IOPtrList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H
index 4775832bca14622a0cc48b4ac303516cbc82015c..f97aa40b17aafb494d5041c5e2b0582fb601e724 100644
--- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H
+++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C
index cb78b012891493d1f7f7236a8a68f7a4b4740c93..57a90a196d0689e653eaebc2e679d5877604d8d6 100644
--- a/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C
+++ b/src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(IFstream, 0);
+    defineTypeNameAndDebug(IFstream, 0);
 }
 
 
@@ -46,8 +46,7 @@ Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
     {
         if (IFstream::debug)
         {
-            Info<< "IFstreamAllocator::IFstreamAllocator(const fileName&) : "
-                    "cannot open null file " << endl;
+            InfoInFunction << "Cannot open null file " << endl;
         }
     }
 
@@ -58,8 +57,7 @@ Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
     {
         if (IFstream::debug)
         {
-            Info<< "IFstreamAllocator::IFstreamAllocator(const fileName&) : "
-                    "decompressing " << pathname + ".gz" << endl;
+            InfoInFunction << "Decompressing " << pathname + ".gz" << endl;
         }
 
         delete ifPtr_;
@@ -108,11 +106,8 @@ Foam::IFstream::IFstream
     {
         if (debug)
         {
-            Info<< "IFstream::IFstream(const fileName&,"
-                   "streamFormat=ASCII,"
-                   "versionNumber=currentVersion) : "
-                   "could not open file for input"
-                << endl << info() << endl;
+            InfoInFunction
+                << "Could not open file for input" << endl << info() << endl;
         }
 
         setBad();
diff --git a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C
index 5e9734d91563a4826b9f44bc225320da4bf8d4cf..1dd2c0531cdb762475e67ae1370fe2237c4124a5 100644
--- a/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C
+++ b/src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(OFstream, 0);
+    defineTypeNameAndDebug(OFstream, 0);
 }
 
 
@@ -49,8 +49,7 @@ Foam::OFstreamAllocator::OFstreamAllocator
     {
         if (OFstream::debug)
         {
-            Info<< "OFstreamAllocator::OFstreamAllocator(const fileName&) : "
-                   "cannot open null file " << endl;
+            InfoInFunction << "Cannot open null file " << endl;
         }
     }
 
@@ -104,9 +103,8 @@ Foam::OFstream::OFstream
     {
         if (debug)
         {
-            Info<< "OFstream::OFstream(const fileName&,"
-                   "streamFormat, versionNumber, compressionType) : "
-                   "could not open file " << pathname
+            InfoInFunction
+                << "Could not open file " << pathname
                 << "for input\n"
                    "in stream " << info() << Foam::endl;
         }
diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.C b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.C
index 06dcc9200e849085f6cf296d40f955bdb9bcadb2..25ee28e005574b0cfc9dfa2b531fca4f34c3185b 100644
--- a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.C
+++ b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,8 +83,6 @@ bool Foam::Istream::peekBack(token& t)
 }
 
 
-// Functions for reading object delimiters ( ... )
-
 Foam::Istream& Foam::Istream::readBegin(const char* funcName)
 {
     token delimiter(*this);
@@ -126,8 +124,6 @@ Foam::Istream& Foam::Istream::readEndBegin(const char* funcName)
 }
 
 
-// Functions for reading List delimiters ( ... ) or { ... }
-
 char Foam::Istream::readBeginList(const char* funcName)
 {
     token delimiter(*this);
diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H
index 5eefb98e995aa6e67100a4102e4e58fdfac8b188..984110e31460cc1d5475fc2897a0b0a41c6c3f53 100644
--- a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H
+++ b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -181,7 +181,7 @@ inline Istream& operator>>(Istream& is, IOstreamManip f)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "HashTable.C"
+    #include "HashTable.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.C b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.C
index 26515263364c6a88351098aa16285f2f0bcf7ac3..ab95c8c19f5a6789afff1e5480b53c18d4da2926 100644
--- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.C
+++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,6 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Decrement the indent level
 void Foam::Ostream::decrIndent()
 {
     if (indentLevel_ == 0)
@@ -46,16 +45,12 @@ void Foam::Ostream::decrIndent()
 }
 
 
-// Write keyType
-// write regular expression as quoted string
-// write plain word as word (unquoted)
 Foam::Ostream& Foam::Ostream::write(const keyType& kw)
 {
     return writeQuoted(kw, kw.isPattern());
 }
 
 
-// Write the keyword followed by appropriate indentation
 Foam::Ostream& Foam::Ostream::writeKeyword(const keyType& kw)
 {
     indent();
diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
index bf808f25783d5f52a4930b19ac81209bb8153cb3..aada0b4f9a1b5784c9428528a7ed19cda83fb363 100644
--- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
+++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,6 +109,8 @@ public:
             virtual Ostream& write(const word&) = 0;
 
             //- Write keyType
+            //  write regular expression as quoted string
+            //  write plain word as word (unquoted)
             virtual Ostream& write(const keyType&);
 
             //- Write string
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.H
index 2a0ebd43b79b24678d0a2384deb56d751f3111c6..e2ec02e88beef62e46d97efb72cb2758a0201ae9 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.H
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/Pstream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,7 @@ Class
     Foam::Pstream
 
 Description
-    Inter-processor communications stream
+    Inter-processor communications stream.
 
 SourceFiles
     Pstream.C
@@ -123,7 +123,7 @@ public:
             );
 
             //- Like above but switches between linear/tree communication
-            template <class T>
+            template<class T>
             static void scatter
             (
                 T& Value,
@@ -303,21 +303,42 @@ public:
 
         // Exchange
 
-            //- Exchange data. Sends sendData, receives into recvData, sets
-            //  sizes (not bytes). sizes[p0][p1] is what processor p0 has
-            //  sent to p1. Continuous data only.
-            //  If block=true will wait for all transfers to finish.
+            //- Helper: exchange contiguous data. Sends sendData, receives into
+            //  recvData. If block=true will wait for all transfers to finish.
             template<class Container, class T>
             static void exchange
             (
-                const List<Container >&,
-                List<Container >&,
-                labelListList& sizes,
+                const UList<Container>& sendData,
+                const labelUList& recvSizes,
+                List<Container>& recvData,
                 const int tag = UPstream::msgType(),
                 const label comm = UPstream::worldComm,
                 const bool block = true
             );
 
+            //- Helper: exchange sizes of sendData. sendData is the data per
+            //  processor (in the communicator). Returns sizes of sendData
+            //  on the sending processor.
+            template<class Container>
+            static void exchangeSizes
+            (
+                const Container& sendData,
+                labelList& sizes,
+                const label comm = UPstream::worldComm
+            );
+
+            //- Exchange contiguous data. Sends sendData, receives into
+            //  recvData. Determines sizes to receive.
+            //  If block=true will wait for all transfers to finish.
+            template<class Container, class T>
+            static void exchange
+            (
+                const UList<Container>& sendData,
+                List<Container>& recvData,
+                const int tag = UPstream::msgType(),
+                const label comm = UPstream::worldComm,
+                const bool block = true
+            );
 };
 
 
@@ -328,10 +349,10 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gatherScatter.C"
-#   include "combineGatherScatter.C"
-#   include "gatherScatterList.C"
-#   include "exchange.C"
+    #include "gatherScatter.C"
+    #include "combineGatherScatter.C"
+    #include "gatherScatterList.C"
+    #include "exchange.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C
index f6ab958e7c1cf0136b327167fc411091d6ae5c61..73616e681aa65cf8be8a5d3a96dcec427104cba0 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,12 +85,10 @@ void Foam::PstreamBuffers::finishedSends(const bool block)
 
     if (commsType_ == UPstream::nonBlocking)
     {
-        labelListList sizes;
         Pstream::exchange<DynamicList<char>, char>
         (
             sendBuf_,
             recvBuf_,
-            sizes,
             tag_,
             comm_,
             block
@@ -99,17 +97,19 @@ void Foam::PstreamBuffers::finishedSends(const bool block)
 }
 
 
-void Foam::PstreamBuffers::finishedSends(labelListList& sizes, const bool block)
+void Foam::PstreamBuffers::finishedSends(labelList& recvSizes, const bool block)
 {
     finishedSendsCalled_ = true;
 
     if (commsType_ == UPstream::nonBlocking)
     {
+        Pstream::exchangeSizes(sendBuf_, recvSizes, comm_);
+
         Pstream::exchange<DynamicList<char>, char>
         (
             sendBuf_,
+            recvSizes,
             recvBuf_,
-            sizes,
             tag_,
             comm_,
             block
@@ -123,22 +123,8 @@ void Foam::PstreamBuffers::finishedSends(labelListList& sizes, const bool block)
             << " since transfers already in progress. Use non-blocking instead."
             << exit(FatalError);
 
-        // Note: possible only if using different tag from write started
+        // Note: maybe possible only if using different tag from write started
         // by ~UOPstream. Needs some work.
-        //sizes.setSize(UPstream::nProcs(comm));
-        //labelList& nsTransPs = sizes[UPstream::myProcNo(comm)];
-        //nsTransPs.setSize(UPstream::nProcs(comm));
-        //
-        //forAll(sendBuf_, procI)
-        //{
-        //    nsTransPs[procI] = sendBuf_[procI].size();
-        //}
-        //
-        //// Send sizes across.
-        //int oldTag = UPstream::msgType();
-        //UPstream::msgType() = tag_;
-        //combineReduce(sizes, UPstream::listEq());
-        //UPstream::msgType() = oldTag;
     }
 }
 
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
index 718366cd5bebac8cf52645a16116413c428a4025..16caa9d7209fca84efe79a189e7b316cd6acc63d 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,10 +102,10 @@ class PstreamBuffers
         const IOstream::versionNumber version_;
 
         //- Send buffer
-        List<DynamicList<char> > sendBuf_;
+        List<DynamicList<char>> sendBuf_;
 
         //- Receive buffer
-        List<DynamicList<char> > recvBuf_;
+        List<DynamicList<char>> recvBuf_;
 
         //- Read position in recvBuf_
         labelList recvBufPos_;
@@ -149,9 +149,9 @@ public:
         void finishedSends(const bool block = true);
 
         //- Mark all sends as having been done. Same as above but also returns
-        //  sizes (bytes) transferred. Note:currently only valid for
+        //  sizes (bytes) received. Note:currently only valid for
         //  non-blocking.
-        void finishedSends(labelListList& sizes, const bool block = true);
+        void finishedSends(labelList& recvSizes, const bool block = true);
 
         //- Clear storage and reset
         void clear();
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H
index 3ed4ee0b0ac2de5aa021edf13486bee6e0669e3e..53c4b6f344d847bed4582e98d1ad923d319540aa 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -21,6 +21,12 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
+InNamespace
+    Foam
+
+Description
+    Inter-processor communication reduction functions.
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef PstreamReduceOps_H
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C
index 87b21b43b3e8b9e306835d54cb5d2dc9e442338d..657f0636bd0c7f21d3d13dd08dc0f67d147e8eb9 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -134,14 +134,15 @@ Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::calcLinearComm
 }
 
 
-// Append my children (and my children children etc.) to allReceives.
 void Foam::UPstream::collectReceives
 (
     const label procID,
-    const List<DynamicList<label> >& receives,
+    const List<DynamicList<label>>& receives,
     DynamicList<label>& allReceives
 )
 {
+    // Append my children (and my children children etc.) to allReceives.
+
     const DynamicList<label>& myChildren = receives[procID];
 
     forAll(myChildren, childI)
@@ -152,44 +153,45 @@ void Foam::UPstream::collectReceives
 }
 
 
-// Tree like schedule. For 8 procs:
-// (level 0)
-//      0 receives from 1
-//      2 receives from 3
-//      4 receives from 5
-//      6 receives from 7
-// (level 1)
-//      0 receives from 2
-//      4 receives from 6
-// (level 2)
-//      0 receives from 4
-//
-// The sends/receives for all levels are collected per processor (one send per
-// processor; multiple receives possible) creating a table:
-//
-// So per processor:
-// proc     receives from   sends to
-// ----     -------------   --------
-//  0       1,2,4           -
-//  1       -               0
-//  2       3               0
-//  3       -               2
-//  4       5               0
-//  5       -               4
-//  6       7               4
-//  7       -               6
 Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::calcTreeComm
 (
     label nProcs
 )
 {
+    // Tree like schedule. For 8 procs:
+    // (level 0)
+    //      0 receives from 1
+    //      2 receives from 3
+    //      4 receives from 5
+    //      6 receives from 7
+    // (level 1)
+    //      0 receives from 2
+    //      4 receives from 6
+    // (level 2)
+    //      0 receives from 4
+    //
+    // The sends/receives for all levels are collected per processor
+    //  (one send per processor; multiple receives possible) creating a table:
+    //
+    // So per processor:
+    // proc     receives from   sends to
+    // ----     -------------   --------
+    //  0       1,2,4           -
+    //  1       -               0
+    //  2       3               0
+    //  3       -               2
+    //  4       5               0
+    //  5       -               4
+    //  6       7               4
+    //  7       -               6
+
     label nLevels = 1;
     while ((1 << nLevels) < nProcs)
     {
         nLevels++;
     }
 
-    List<DynamicList<label> > receives(nProcs);
+    List<DynamicList<label>> receives(nProcs);
     labelList sends(nProcs, -1);
 
     // Info<< "Using " << nLevels << " communication levels" << endl;
@@ -220,7 +222,7 @@ Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::calcTreeComm
 
     // For all processors find the processors it receives data from
     // (and the processors they receive data from etc.)
-    List<DynamicList<label> > allReceives(nProcs);
+    List<DynamicList<label>> allReceives(nProcs);
     for (label procID = 0; procID < nProcs; procID++)
     {
         collectReceives(procID, receives, allReceives[procID]);
@@ -397,30 +399,23 @@ Foam::label Foam::UPstream::procNo
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// By default this is not a parallel run
 bool Foam::UPstream::parRun_(false);
 
-// Free communicators
 Foam::LIFOStack<Foam::label> Foam::UPstream::freeComms_;
 
-// My processor number
 Foam::DynamicList<int> Foam::UPstream::myProcNo_(10);
 
-// List of process IDs
-Foam::DynamicList<Foam::List<int> > Foam::UPstream::procIDs_(10);
+Foam::DynamicList<Foam::List<int>> Foam::UPstream::procIDs_(10);
 
-// Parent communicator
 Foam::DynamicList<Foam::label> Foam::UPstream::parentCommunicator_(10);
 
-// Standard transfer message type
 int Foam::UPstream::msgType_(1);
 
-// Linear communication schedule
-Foam::DynamicList<Foam::List<Foam::UPstream::commsStruct> >
+
+Foam::DynamicList<Foam::List<Foam::UPstream::commsStruct>>
 Foam::UPstream::linearCommunication_(10);
 
-// Multi level communication schedule
-Foam::DynamicList<Foam::List<Foam::UPstream::commsStruct> >
+Foam::DynamicList<Foam::List<Foam::UPstream::commsStruct>>
 Foam::UPstream::treeCommunication_(10);
 
 
@@ -434,10 +429,6 @@ Foam::UPstream::communicator serialComm
 );
 
 
-
-// Should compact transfer be used in which floats replace doubles
-// reducing the bandwidth requirement at the expense of some loss
-// in accuracy
 bool Foam::UPstream::floatTransfer
 (
     Foam::debug::optimisationSwitch("floatTransfer", 0)
@@ -449,8 +440,6 @@ registerOptSwitch
     Foam::UPstream::floatTransfer
 );
 
-// Number of processors at which the reduce algorithm changes from linear to
-// tree
 int Foam::UPstream::nProcsSimpleSum
 (
     Foam::debug::optimisationSwitch("nProcsSimpleSum", 16)
@@ -462,7 +451,6 @@ registerOptSwitch
     Foam::UPstream::nProcsSimpleSum
 );
 
-// Default commsType
 Foam::UPstream::commsTypes Foam::UPstream::defaultCommsType
 (
     commsTypeNames.read(Foam::debug::optimisationSwitches().lookup("commsType"))
@@ -502,15 +490,10 @@ namespace Foam
     addcommsTypeToOpt addcommsTypeToOpt_("commsType");
 }
 
-// Default communicator
 Foam::label Foam::UPstream::worldComm(0);
 
-
-// Warn for use of any communicator
 Foam::label Foam::UPstream::warnComm(-1);
 
-
-// Number of polling cycles in processor updates
 int Foam::UPstream::nPollProcInterfaces
 (
     Foam::debug::optimisationSwitch("nPollProcInterfaces", 0)
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H
index 2659cd33ef7f984c06609af1c3889f4feac19165..97821784f5e528eba670300b3e0b4a29a926b32f 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -181,18 +181,31 @@ private:
 
     // Private data
 
+        //- By default this is not a parallel run
         static bool parRun_;
+
+        //- Standard transfer message type
         static int msgType_;
 
         // Communicator specific data
 
+        //- Free communicators
         static LIFOStack<label> freeComms_;
+
+        //- My processor number
         static DynamicList<int> myProcNo_;
-        static DynamicList<List<int> > procIDs_;
+
+        //- List of process IDs
+        static DynamicList<List<int>> procIDs_;
+
+        //- Parent communicator
         static DynamicList<label> parentCommunicator_;
 
-        static DynamicList<List<commsStruct> > linearCommunication_;
-        static DynamicList<List<commsStruct> > treeCommunication_;
+        //- Linear communication schedule
+        static DynamicList<List<commsStruct>> linearCommunication_;
+
+        //- Multi level communication schedule
+        static DynamicList<List<commsStruct>> treeCommunication_;
 
 
     // Private Member Functions
@@ -208,7 +221,7 @@ private:
         static void collectReceives
         (
             const label procID,
-            const List<DynamicList<label> >& receives,
+            const List<DynamicList<label>>& receives,
             DynamicList<label>& allReceives
         );
 
@@ -477,7 +490,15 @@ public:
         //- Abort program
         static void abort();
 
-
+        //- Exchange label with all processors (in the communicator).
+        //  sendData[procI] is the label to send to procI.
+        //  After return recvData contains the data from the other processors.
+        static void allToAll
+        (
+            const labelUList& sendData,
+            labelUList& recvData,
+            const label communicator = 0
+        );
 };
 
 
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C b/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
index 1c58bd0d4d7e5874bb6123e01c7be8ee5e6d792a..6403905ad65fb71eeb53c271b3b0ae94d261526c 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/combineGatherScatter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,15 +38,10 @@ Description
 #include "IOstreams.H"
 #include "contiguous.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class T, class CombineOp>
-void Pstream::combineGather
+void Foam::Pstream::combineGather
 (
     const List<UPstream::commsStruct>& comms,
     T& Value,
@@ -139,8 +134,8 @@ void Pstream::combineGather
 }
 
 
-template <class T, class CombineOp>
-void Pstream::combineGather
+template<class T, class CombineOp>
+void Foam::Pstream::combineGather
 (
     T& Value,
     const CombineOp& cop,
@@ -174,7 +169,7 @@ void Pstream::combineGather
 
 
 template<class T>
-void Pstream::combineScatter
+void Foam::Pstream::combineScatter
 (
     const List<UPstream::commsStruct>& comms,
     T& Value,
@@ -223,7 +218,7 @@ void Pstream::combineScatter
         }
 
         // Send to my downstairs neighbours
-        forAll(myComm.below(), belowI)
+        forAllReverse(myComm.below(), belowI)
         {
             label belowID = myComm.below()[belowI];
 
@@ -254,8 +249,8 @@ void Pstream::combineScatter
 }
 
 
-template <class T>
-void Pstream::combineScatter
+template<class T>
+void Foam::Pstream::combineScatter
 (
     T& Value,
     const int tag,
@@ -273,12 +268,8 @@ void Pstream::combineScatter
 }
 
 
-// Same thing but for whole list at a time
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
 template<class T, class CombineOp>
-void Pstream::listCombineGather
+void Foam::Pstream::listCombineGather
 (
     const List<UPstream::commsStruct>& comms,
     List<T>& Values,
@@ -379,7 +370,7 @@ void Pstream::listCombineGather
 
 
 template<class T, class CombineOp>
-void Pstream::listCombineGather
+void Foam::Pstream::listCombineGather
 (
     List<T>& Values,
     const CombineOp& cop,
@@ -413,7 +404,7 @@ void Pstream::listCombineGather
 
 
 template<class T>
-void Pstream::listCombineScatter
+void Foam::Pstream::listCombineScatter
 (
     const List<UPstream::commsStruct>& comms,
     List<T>& Values,
@@ -462,7 +453,7 @@ void Pstream::listCombineScatter
         }
 
         // Send to my downstairs neighbours
-        forAll(myComm.below(), belowI)
+        forAllReverse(myComm.below(), belowI)
         {
             label belowID = myComm.below()[belowI];
 
@@ -493,8 +484,8 @@ void Pstream::listCombineScatter
 }
 
 
-template <class T>
-void Pstream::listCombineScatter
+template<class T>
+void Foam::Pstream::listCombineScatter
 (
     List<T>& Values,
     const int tag,
@@ -524,14 +515,8 @@ void Pstream::listCombineScatter
 }
 
 
-
-
-// Same thing but for sparse list (map)
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
 template<class Container, class CombineOp>
-void Pstream::mapCombineGather
+void Foam::Pstream::mapCombineGather
 (
     const List<UPstream::commsStruct>& comms,
     Container& Values,
@@ -598,7 +583,7 @@ void Pstream::mapCombineGather
 
 
 template<class Container, class CombineOp>
-void Pstream::mapCombineGather
+void Foam::Pstream::mapCombineGather
 (
     Container& Values,
     const CombineOp& cop,
@@ -632,7 +617,7 @@ void Pstream::mapCombineGather
 
 
 template<class Container>
-void Pstream::mapCombineScatter
+void Foam::Pstream::mapCombineScatter
 (
     const List<UPstream::commsStruct>& comms,
     Container& Values,
@@ -666,7 +651,7 @@ void Pstream::mapCombineScatter
         }
 
         // Send to my downstairs neighbours
-        forAll(myComm.below(), belowI)
+        forAllReverse(myComm.below(), belowI)
         {
             label belowID = myComm.below()[belowI];
 
@@ -682,8 +667,8 @@ void Pstream::mapCombineScatter
 }
 
 
-template <class Container>
-void Pstream::mapCombineScatter
+template<class Container>
+void Foam::Pstream::mapCombineScatter
 (
     Container& Values,
     const int tag,
@@ -713,8 +698,4 @@ void Pstream::mapCombineScatter
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C
index 7abcac134aece02189bd30b9695662fe450127ee..57951ed6c7cc26a775a65fdd28f0217087f51b4a 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -36,9 +36,9 @@ Description
 template<class Container, class T>
 void Foam::Pstream::exchange
 (
-    const List<Container>& sendBufs,
+    const UList<Container>& sendBufs,
+    const labelUList& recvSizes,
     List<Container>& recvBufs,
-    labelListList& sizes,
     const int tag,
     const label comm,
     const bool block
@@ -53,23 +53,13 @@ void Foam::Pstream::exchange
     if (sendBufs.size() != UPstream::nProcs(comm))
     {
         FatalErrorInFunction
-            << "Size of list:" << sendBufs.size()
-            << " does not equal the number of processors:"
+            << "Size of list " << sendBufs.size()
+            << " does not equal the number of processors "
             << UPstream::nProcs(comm)
             << Foam::abort(FatalError);
     }
 
-    sizes.setSize(UPstream::nProcs(comm));
-    labelList& nsTransPs = sizes[UPstream::myProcNo(comm)];
-    nsTransPs.setSize(UPstream::nProcs(comm));
-
-    forAll(sendBufs, procI)
-    {
-        nsTransPs[procI] = sendBufs[procI].size();
-    }
-
-    // Send sizes across. Note: blocks.
-    combineReduce(sizes, UPstream::listEq(), tag, comm);
+    recvBufs.setSize(sendBufs.size());
 
     recvBufs.setSize(sendBufs.size());
 
@@ -80,9 +70,9 @@ void Foam::Pstream::exchange
         // Set up receives
         // ~~~~~~~~~~~~~~~
 
-        forAll(sizes, procI)
+        forAll(recvSizes, procI)
         {
-            label nRecv = sizes[procI][UPstream::myProcNo(comm)];
+            label nRecv = recvSizes[procI];
 
             if (procI != Pstream::myProcNo(comm) && nRecv > 0)
             {
@@ -144,4 +134,48 @@ void Foam::Pstream::exchange
 }
 
 
+template<class Container>
+void Foam::Pstream::exchangeSizes
+(
+    const Container& sendBufs,
+    labelList& recvSizes,
+    const label comm
+)
+{
+    if (sendBufs.size() != UPstream::nProcs(comm))
+    {
+        FatalErrorInFunction
+            << "Size of container " << sendBufs.size()
+            << " does not equal the number of processors "
+            << UPstream::nProcs(comm)
+            << Foam::abort(FatalError);
+    }
+
+    labelList sendSizes(sendBufs.size());
+    forAll(sendBufs, procI)
+    {
+        sendSizes[procI] = sendBufs[procI].size();
+    }
+    recvSizes.setSize(sendSizes.size());
+    allToAll(sendSizes, recvSizes, comm);
+}
+
+
+template<class Container, class T>
+void Foam::Pstream::exchange
+(
+    const UList<Container>& sendBufs,
+    List<Container>& recvBufs,
+    const int tag,
+    const label comm,
+    const bool block
+)
+{
+    labelList recvSizes;
+    exchangeSizes(sendBufs, recvSizes, comm);
+
+    exchange<Container, T>(sendBufs, recvSizes, recvBufs, tag, comm, block);
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
index 3a250c7ab8dca21c743bb5f95237de2b604f5fa7..270c08fee57580256aaf48587cc4df6d6739ae2a 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,7 @@ void Pstream::gather
 }
 
 
-template <class T, class BinaryOp>
+template<class T, class BinaryOp>
 void Pstream::gather
 (
     T& Value,
@@ -185,8 +185,10 @@ void Pstream::scatter
             }
         }
 
-        // Send to my downstairs neighbours
-        forAll(myComm.below(), belowI)
+        // Send to my downstairs neighbours. Note reverse order (compared to
+        // receiving). This is to make sure to send to the critical path
+        // (only when using a tree schedule!) first.
+        forAllReverse(myComm.below(), belowI)
         {
             if (contiguous<T>())
             {
@@ -217,7 +219,7 @@ void Pstream::scatter
 }
 
 
-template <class T>
+template<class T>
 void Pstream::scatter(T& Value, const int tag, const label comm)
 {
     if (UPstream::nProcs(comm) < UPstream::nProcsSimpleSum)
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
index a1330b6b6b0f8226fc93ab19b478dd38fb3f65fa..85db6d134a5523aafe422fb7c1e1edae76908289 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/gatherScatterList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -186,7 +186,7 @@ void Pstream::gatherList
 }
 
 
-template <class T>
+template<class T>
 void Pstream::gatherList(List<T>& Values, const int tag, const label comm)
 {
     if (UPstream::nProcs(comm) < UPstream::nProcsSimpleSum)
@@ -274,7 +274,7 @@ void Pstream::scatterList
         }
 
         // Send to my downstairs neighbours
-        forAll(myComm.below(), belowI)
+        forAllReverse(myComm.below(), belowI)
         {
             label belowID = myComm.below()[belowI];
             const labelList& notBelowLeaves = comms[belowID].allNotBelow();
@@ -321,7 +321,7 @@ void Pstream::scatterList
 }
 
 
-template <class T>
+template<class T>
 void Pstream::scatterList(List<T>& Values, const int tag, const label comm)
 {
     if (UPstream::nProcs(comm) < UPstream::nProcsSimpleSum)
diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
index 1cfabe128c10b0beabda496bbf2866c23e26d73e..94cf60f4fb25151d105b00ea6d5ef085c3a2ab07 100644
--- a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
+++ b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -579,7 +579,6 @@ Foam::Istream& Foam::ISstream::read(string& str)
 }
 
 
-// Special handling of '{' in variables
 Foam::Istream& Foam::ISstream::readVariable(string& str)
 {
     static const int maxLen = 1024;
diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C
index 2d35ae119394817ba332724d30f7baa7d6e6e4c2..0feb8353408fcdd80c6f71b98ec9da6ea0d333dc 100644
--- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C
+++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -249,7 +249,6 @@ void Foam::OSstream::flush()
 }
 
 
-// Add carriage return and flush stream
 void Foam::OSstream::endl()
 {
     write('\n');
@@ -257,14 +256,12 @@ void Foam::OSstream::endl()
 }
 
 
-// Get flags of output stream
 std::ios_base::fmtflags Foam::OSstream::flags() const
 {
     return os_.flags();
 }
 
 
-// Set flags of output stream
 std::ios_base::fmtflags Foam::OSstream::flags(const ios_base::fmtflags f)
 {
     return os_.flags(f);
@@ -273,26 +270,24 @@ std::ios_base::fmtflags Foam::OSstream::flags(const ios_base::fmtflags f)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
-// Get width of output field
 int Foam::OSstream::width() const
 {
     return os_.width();
 }
 
-// Set width of output field (and return old width)
+
 int Foam::OSstream::width(const int w)
 {
     return os_.width(w);
 }
 
-// Get precision of output field
+
 int Foam::OSstream::precision() const
 {
     return os_.precision();
 }
 
-// Set precision of output field (and return old precision)
+
 int Foam::OSstream::precision(const int p)
 {
     return os_.precision(p);
diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.H b/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.H
index 72b38e5ec321306acfffa18e0dffa62101383138..b4188f75fc76c0d53182b9ded7c7f14f5a7511a7 100644
--- a/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.H
+++ b/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ T ReadHex(ISstream&);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReadHex.C"
+    #include "ReadHex.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H
index 55c04d0d94d719609ec4113c89e27073f3ba7dc9..9a179e2d078f079f1fa687c83da395c07c3bda26 100644
--- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H
+++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
         ITstream
         (
             const string& name,
-            const Xfer<List<token> >& tokens,
+            const Xfer<List<token>>& tokens,
             streamFormat format=ASCII,
             versionNumber version=currentVersion
         )
diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C
index 857d4f6b48283b1188011ec852a7baa9a2c7d042..59c551b6f83b4099923ecb5a532dba612e66e0aa 100644
--- a/src/OpenFOAM/db/IOstreams/token/token.C
+++ b/src/OpenFOAM/db/IOstreams/token/token.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,12 +29,12 @@ License
 
 namespace Foam
 {
-const char* const token::typeName = "token";
-token token::undefinedToken;
+    const char* const token::typeName = "token";
+    token token::undefinedToken;
 
-typedef token::compound tokenCompound;
-defineTypeNameAndDebug(tokenCompound, 0);
-defineRunTimeSelectionTable(tokenCompound, Istream);
+    typedef token::compound tokenCompound;
+    defineTypeNameAndDebug(tokenCompound, 0);
+    defineRunTimeSelectionTable(tokenCompound, Istream);
 }
 
 
diff --git a/src/OpenFOAM/db/IOstreams/token/token.H b/src/OpenFOAM/db/IOstreams/token/token.H
index 3b5775b9553310e8e71c57d92285a01e8de08ac0..23a04d1d305bf80a105f9c5120efe8fff5752bf1 100644
--- a/src/OpenFOAM/db/IOstreams/token/token.H
+++ b/src/OpenFOAM/db/IOstreams/token/token.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -440,11 +440,11 @@ ostream& operator<<(ostream&, const InfoProxy<token>&);
 template<>
 Ostream& operator<<(Ostream& os, const InfoProxy<token>& ip);
 
-#define defineCompoundTypeName(Type, Name)                                    \
+#define defineCompoundTypeName(Type, Name)                                     \
     defineTemplateTypeNameAndDebugWithName(token::Compound<Type>, #Type, 0);
 
-#define addCompoundToRunTimeSelectionTable(Type, Name)                        \
-    token::compound::addIstreamConstructorToTable<token::Compound<Type> >     \
+#define addCompoundToRunTimeSelectionTable(Type, Name)                         \
+    token::compound::addIstreamConstructorToTable<token::Compound<Type>>       \
         add##Name##IstreamConstructorToTable_;
 
 
diff --git a/src/OpenFOAM/db/IOstreams/token/tokenI.H b/src/OpenFOAM/db/IOstreams/token/tokenI.H
index 6d34249a6133dd924d02d66e64c0c6808f7958f5..2f0383c9b25fd686e5a5c176a93f850ddd6c59b1 100644
--- a/src/OpenFOAM/db/IOstreams/token/tokenI.H
+++ b/src/OpenFOAM/db/IOstreams/token/tokenI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,9 @@ License
 
 #include <iostream>
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Clear any allocated storage (word or string)
-inline void token::clear()
+inline void Foam::token::clear()
 {
     if (type_ == WORD)
     {
@@ -45,7 +39,7 @@ inline void token::clear()
     }
     else if (type_ == COMPOUND)
     {
-        if (compoundTokenPtr_->okToDelete())
+        if (compoundTokenPtr_->unique())
         {
             delete compoundTokenPtr_;
         }
@@ -61,15 +55,14 @@ inline void token::clear()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct null
-inline token::token()
+inline Foam::token::token()
 :
     type_(UNDEFINED),
     lineNumber_(0)
 {}
 
-// Construct as copy
-inline token::token(const token& t)
+
+inline Foam::token::token(const token& t)
 :
     type_(t.type_),
     lineNumber_(t.lineNumber_)
@@ -115,48 +108,48 @@ inline token::token(const token& t)
     }
 }
 
-// Construct punctuation character token
-inline token::token(punctuationToken p, label lineNumber)
+
+inline Foam::token::token(punctuationToken p, label lineNumber)
 :
     type_(PUNCTUATION),
     punctuationToken_(p),
     lineNumber_(lineNumber)
 {}
 
-// Construct word token
-inline token::token(const word& w, label lineNumber)
+
+inline Foam::token::token(const word& w, label lineNumber)
 :
     type_(WORD),
     wordTokenPtr_(new word(w)),
     lineNumber_(lineNumber)
 {}
 
-// Construct string token
-inline token::token(const string& s, label lineNumber)
+
+inline Foam::token::token(const string& s, label lineNumber)
 :
     type_(STRING),
     stringTokenPtr_(new string(s)),
     lineNumber_(lineNumber)
 {}
 
-// Construct label token
-inline token::token(const label l, label lineNumber)
+
+inline Foam::token::token(const label l, label lineNumber)
 :
     type_(LABEL),
     labelToken_(l),
     lineNumber_(lineNumber)
 {}
 
-// Construct floatScalar token
-inline token::token(const floatScalar s, label lineNumber)
+
+inline Foam::token::token(const floatScalar s, label lineNumber)
 :
     type_(FLOAT_SCALAR),
     floatScalarToken_(s),
     lineNumber_(lineNumber)
 {}
 
-// Construct doubleScalar token
-inline token::token(const doubleScalar s, label lineNumber)
+
+inline Foam::token::token(const doubleScalar s, label lineNumber)
 :
     type_(DOUBLE_SCALAR),
     doubleScalarToken_(s),
@@ -166,8 +159,7 @@ inline token::token(const doubleScalar s, label lineNumber)
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
-// Delete token clearing the storage used by word or string
-inline token::~token()
+inline Foam::token::~token()
 {
     clear();
 }
@@ -175,37 +167,37 @@ inline token::~token()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-inline token::tokenType token::type() const
+inline Foam::token::tokenType  Foam::token::type() const
 {
     return type_;
 }
 
-inline token::tokenType& token::type()
+inline Foam::token::tokenType&  Foam::token::type()
 {
     return type_;
 }
 
-inline bool token::good() const
+inline bool Foam::token::good() const
 {
     return (type_ != ERROR && type_ != UNDEFINED);
 }
 
-inline bool token::undefined() const
+inline bool Foam::token::undefined() const
 {
     return (type_ == UNDEFINED);
 }
 
-inline bool token::error() const
+inline bool Foam::token::error() const
 {
     return (type_ == ERROR);
 }
 
-inline bool token::isPunctuation() const
+inline bool Foam::token::isPunctuation() const
 {
     return (type_ == PUNCTUATION);
 }
 
-inline token::punctuationToken token::pToken() const
+inline Foam::token::punctuationToken  Foam::token::pToken() const
 {
     if (type_ == PUNCTUATION)
     {
@@ -218,12 +210,12 @@ inline token::punctuationToken token::pToken() const
     }
 }
 
-inline bool token::isWord() const
+inline bool Foam::token::isWord() const
 {
     return (type_ == WORD);
 }
 
-inline const word& token::wordToken() const
+inline const Foam::word& Foam::token::wordToken() const
 {
     if (type_ == WORD)
     {
@@ -236,17 +228,17 @@ inline const word& token::wordToken() const
     }
 }
 
-inline bool token::isVariable() const
+inline bool Foam::token::isVariable() const
 {
     return (type_ == VARIABLE);
 }
 
-inline bool token::isString() const
+inline bool Foam::token::isString() const
 {
     return (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING);
 }
 
-inline const string& token::stringToken() const
+inline const Foam::string& Foam::token::stringToken() const
 {
     if (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING)
     {
@@ -259,12 +251,12 @@ inline const string& token::stringToken() const
     }
 }
 
-inline bool token::isLabel() const
+inline bool Foam::token::isLabel() const
 {
     return (type_ == LABEL);
 }
 
-inline label token::labelToken() const
+inline Foam::label Foam::token::labelToken() const
 {
     if (type_ == LABEL)
     {
@@ -277,12 +269,12 @@ inline label token::labelToken() const
     }
 }
 
-inline bool token::isFloatScalar() const
+inline bool Foam::token::isFloatScalar() const
 {
     return (type_ == FLOAT_SCALAR);
 }
 
-inline floatScalar token::floatScalarToken() const
+inline Foam::floatScalar Foam::token::floatScalarToken() const
 {
     if (type_ == FLOAT_SCALAR)
     {
@@ -296,12 +288,12 @@ inline floatScalar token::floatScalarToken() const
 }
 
 
-inline bool token::isDoubleScalar() const
+inline bool Foam::token::isDoubleScalar() const
 {
     return (type_ == DOUBLE_SCALAR);
 }
 
-inline doubleScalar token::doubleScalarToken() const
+inline Foam::doubleScalar Foam::token::doubleScalarToken() const
 {
     if (type_ == DOUBLE_SCALAR)
     {
@@ -315,12 +307,12 @@ inline doubleScalar token::doubleScalarToken() const
 }
 
 
-inline bool token::isScalar() const
+inline bool Foam::token::isScalar() const
 {
     return (type_ == FLOAT_SCALAR || type_ == DOUBLE_SCALAR);
 }
 
-inline scalar token::scalarToken() const
+inline Foam::scalar Foam::token::scalarToken() const
 {
     if (type_ == FLOAT_SCALAR)
     {
@@ -337,12 +329,12 @@ inline scalar token::scalarToken() const
     }
 }
 
-inline bool token::isNumber() const
+inline bool Foam::token::isNumber() const
 {
     return (type_ == LABEL || isScalar());
 }
 
-inline scalar token::number() const
+inline Foam::scalar Foam::token::number() const
 {
     if (type_ == LABEL)
     {
@@ -359,12 +351,12 @@ inline scalar token::number() const
     }
 }
 
-inline bool token::isCompound() const
+inline bool Foam::token::isCompound() const
 {
     return (type_ == COMPOUND);
 }
 
-inline const token::compound& token::compoundToken() const
+inline const Foam::token::compound& Foam::token::compoundToken() const
 {
     if (type_ == COMPOUND)
     {
@@ -378,18 +370,18 @@ inline const token::compound& token::compoundToken() const
 }
 
 
-inline label token::lineNumber() const
+inline Foam::label Foam::token::lineNumber() const
 {
     return lineNumber_;
 }
 
-inline label& token::lineNumber()
+inline Foam::label& Foam::token::lineNumber()
 {
     return lineNumber_;
 }
 
 
-inline void token::setBad()
+inline void Foam::token::setBad()
 {
     clear();
     type_ = ERROR;
@@ -398,7 +390,7 @@ inline void token::setBad()
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-inline void token::operator=(const token& t)
+inline void Foam::token::operator=(const token& t)
 {
     clear();
     type_ = t.type_;
@@ -446,59 +438,59 @@ inline void token::operator=(const token& t)
     lineNumber_ = t.lineNumber_;
 }
 
-inline void token::operator=(const punctuationToken p)
+inline void Foam::token::operator=(const punctuationToken p)
 {
     clear();
     type_ = PUNCTUATION;
     punctuationToken_ = p;
 }
 
-inline void token::operator=(word* wPtr)
+inline void Foam::token::operator=(word* wPtr)
 {
     clear();
     type_ = WORD;
     wordTokenPtr_ = wPtr;
 }
 
-inline void token::operator=(const word& w)
+inline void Foam::token::operator=(const word& w)
 {
     operator=(new word(w));
 }
 
-inline void token::operator=(string* sPtr)
+inline void Foam::token::operator=(string* sPtr)
 {
     clear();
     type_ = STRING;
     stringTokenPtr_ = sPtr;
 }
 
-inline void token::operator=(const string& s)
+inline void Foam::token::operator=(const string& s)
 {
     operator=(new string(s));
 }
 
-inline void token::operator=(const label l)
+inline void Foam::token::operator=(const label l)
 {
     clear();
     type_ = LABEL;
     labelToken_ = l;
 }
 
-inline void token::operator=(const floatScalar s)
+inline void Foam::token::operator=(const floatScalar s)
 {
     clear();
     type_ = FLOAT_SCALAR;
     floatScalarToken_ = s;
 }
 
-inline void token::operator=(const doubleScalar s)
+inline void Foam::token::operator=(const doubleScalar s)
 {
     clear();
     type_ = DOUBLE_SCALAR;
     doubleScalarToken_ = s;
 }
 
-inline void token::operator=(token::compound* cPtr)
+inline void Foam::token::operator=(Foam::token::compound* cPtr)
 {
     clear();
     type_ = COMPOUND;
@@ -506,7 +498,7 @@ inline void token::operator=(token::compound* cPtr)
 }
 
 
-inline bool token::operator==(const token& t) const
+inline bool Foam::token::operator==(const token& t) const
 {
     if (type_ != t.type_)
     {
@@ -548,17 +540,17 @@ inline bool token::operator==(const token& t) const
     return false;
 }
 
-inline bool token::operator==(const punctuationToken p) const
+inline bool Foam::token::operator==(const punctuationToken p) const
 {
     return (type_ == PUNCTUATION && punctuationToken_ == p);
 }
 
-inline bool token::operator==(const word& w) const
+inline bool Foam::token::operator==(const word& w) const
 {
     return (type_ == WORD && wordToken() == w);
 }
 
-inline bool token::operator==(const string& s) const
+inline bool Foam::token::operator==(const string& s) const
 {
     return
     (
@@ -567,59 +559,55 @@ inline bool token::operator==(const string& s) const
     );
 }
 
-inline bool token::operator==(const label l) const
+inline bool Foam::token::operator==(const label l) const
 {
     return (type_ == LABEL && labelToken_ == l);
 }
 
-inline bool token::operator==(const floatScalar s) const
+inline bool Foam::token::operator==(const floatScalar s) const
 {
     return (type_ == FLOAT_SCALAR && equal(floatScalarToken_, s));
 }
 
-inline bool token::operator==(const doubleScalar s) const
+inline bool Foam::token::operator==(const doubleScalar s) const
 {
     return (type_ == DOUBLE_SCALAR && equal(doubleScalarToken_, s));
 }
 
-inline bool token::operator!=(const token& t) const
+inline bool Foam::token::operator!=(const token& t) const
 {
     return !operator==(t);
 }
 
-inline bool token::operator!=(const punctuationToken p) const
+inline bool Foam::token::operator!=(const punctuationToken p) const
 {
     return !operator==(p);
 }
 
-inline bool token::operator!=(const word& w) const
+inline bool Foam::token::operator!=(const word& w) const
 {
     return !operator==(w);
 }
 
-inline bool token::operator!=(const string& s) const
+inline bool Foam::token::operator!=(const string& s) const
 {
     return !operator==(s);
 }
 
-inline bool token::operator!=(const floatScalar s) const
+inline bool Foam::token::operator!=(const floatScalar s) const
 {
     return !operator==(s);
 }
 
-inline bool token::operator!=(const doubleScalar s) const
+inline bool Foam::token::operator!=(const doubleScalar s) const
 {
     return !operator==(s);
 }
 
-inline bool token::operator!=(const label l) const
+inline bool Foam::token::operator!=(const label l) const
 {
     return !operator==(l);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/db/IOstreams/token/tokenList.H b/src/OpenFOAM/db/IOstreams/token/tokenList.H
index a6f165cbbbd966645aa0a0131066168e93bbbf8d..5ee815ea781a40f20b9dcd78b25a7e965e107ce2 100644
--- a/src/OpenFOAM/db/IOstreams/token/tokenList.H
+++ b/src/OpenFOAM/db/IOstreams/token/tokenList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,11 +39,9 @@ Description
 
 namespace Foam
 {
-
     typedef List<token> tokenList;
     typedef List<token::tokenType> tokenTypeList;
-
-} // End namespace Foam
+}
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C
index 289cff5ed5d09365a4788c4bd5ca1e31590791b7..4153ec823aefec24b28d2cbebff4f38094c8bd88 100644
--- a/src/OpenFOAM/db/Time/Time.C
+++ b/src/OpenFOAM/db/Time/Time.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -785,7 +785,6 @@ Foam::word Foam::Time::timeName() const
 }
 
 
-// Search the construction path for times
 Foam::instantList Foam::Time::times() const
 {
     return findTimes(path(), constant());
@@ -835,7 +834,7 @@ Foam::instant Foam::Time::findClosestTime(const scalar t) const
 {
     instantList timeDirs = findTimes(path(), constant());
 
-    // there is only one time (likely "constant") so return it
+    // There is only one time (likely "constant") so return it
     if (timeDirs.size() == 1)
     {
         return timeDirs[0];
@@ -867,16 +866,6 @@ Foam::instant Foam::Time::findClosestTime(const scalar t) const
 }
 
 
-// This should work too,
-// if we don't worry about checking "constant" explicitly
-//
-// Foam::instant Foam::Time::findClosestTime(const scalar t) const
-// {
-//     instantList timeDirs = findTimes(path(), constant());
-//     label timeIndex = min(findClosestTimeIndex(timeDirs, t), 0, constant());
-//     return timeDirs[timeIndex];
-// }
-
 Foam::label Foam::Time::findClosestTimeIndex
 (
     const instantList& timeDirs,
diff --git a/src/OpenFOAM/db/Time/findInstance.C b/src/OpenFOAM/db/Time/findInstance.C
index 8b1d2d3a574d14ef4922317d8214facdd1c34c0a..ab24791b7fe4e6752f4087df02d63302b1b64eb4 100644
--- a/src/OpenFOAM/db/Time/findInstance.C
+++ b/src/OpenFOAM/db/Time/findInstance.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -64,16 +64,14 @@ Foam::word Foam::Time::findInstance
                 timeName(),
                 dir,
                 *this
-            ).typeHeaderOk<IOList<label> >(false) // use object with local scope
+            ).typeHeaderOk<IOList<label>>(false) // use object with local scope
         )
     )
     {
         if (debug)
         {
-            Info<< "Time::findInstance"
-                "(const fileName&, const word&"
-                ", const IOobject::readOption, const word&)"
-                << " : found \"" << name
+            InfoInFunction
+                << "Found \"" << name
                 << "\" in " << timeName()/dir
                 << endl;
         }
@@ -111,16 +109,14 @@ Foam::word Foam::Time::findInstance
                     ts[instanceI].name(),
                     dir,
                     *this
-                ).typeHeaderOk<IOList<label> >(false)
+                ).typeHeaderOk<IOList<label>>(false)
             )
         )
         {
             if (debug)
             {
-                Info<< "Time::findInstance"
-                    "(const fileName&, const word&"
-                    ", const IOobject::readOption, const word&)"
-                    << " : found \"" << name
+                InfoInFunction
+                    << "Found \"" << name
                     << "\" in " << ts[instanceI].name()/dir
                     << endl;
             }
@@ -133,10 +129,8 @@ Foam::word Foam::Time::findInstance
         {
             if (debug)
             {
-                Info<< "Time::findInstance"
-                    "(const fileName&, const word&"
-                    ", const IOobject::readOption, const word&)"
-                    << " : hit stopInstance " << stopInstance
+                InfoInFunction
+                    << "Hit stopInstance " << stopInstance
                     << endl;
             }
 
@@ -188,16 +182,14 @@ Foam::word Foam::Time::findInstance
                 constant(),
                 dir,
                 *this
-            ).typeHeaderOk<IOList<label> >(false)
+            ).typeHeaderOk<IOList<label>>(false)
         )
     )
     {
         if (debug)
         {
-            Info<< "Time::findInstance"
-                "(const fileName&, const word&"
-                ", const IOobject::readOption, const word&)"
-                << " : found \"" << name
+            InfoInFunction
+                << "Found \"" << name
                 << "\" in " << constant()/dir
                 << endl;
         }
diff --git a/src/OpenFOAM/db/Time/findTimes.C b/src/OpenFOAM/db/Time/findTimes.C
index 3384916737a8374d012ad20c9c529ac3742cb570..ccd7312a2bc4dd877c23dcc96bb359c78f8ae0b7 100644
--- a/src/OpenFOAM/db/Time/findTimes.C
+++ b/src/OpenFOAM/db/Time/findTimes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,8 +42,7 @@ Foam::instantList Foam::Time::findTimes
 {
     if (debug)
     {
-        Info<< "Time::findTimes(const fileName&): finding times in directory "
-            << directory << endl;
+        InfoInFunction << "Finding times in directory " << directory << endl;
     }
 
     // Read directory entries into a list
diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C
index d46f95cd0e4e6e3e20fbc53864235dba21800f74..4865b838fcd316d00d453a1ad24bea760b8c99af 100644
--- a/src/OpenFOAM/db/dictionary/dictionary.C
+++ b/src/OpenFOAM/db/dictionary/dictionary.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ bool Foam::dictionary::findInPatterns
     const bool patternMatch,
     const word& Keyword,
     DLList<entry*>::const_iterator& wcLink,
-    DLList<autoPtr<regExp> >::const_iterator& reLink
+    DLList<autoPtr<regExp>>::const_iterator& reLink
 ) const
 {
     if (patternEntries_.size())
@@ -82,7 +82,7 @@ bool Foam::dictionary::findInPatterns
     const bool patternMatch,
     const word& Keyword,
     DLList<entry*>::iterator& wcLink,
-    DLList<autoPtr<regExp> >::iterator& reLink
+    DLList<autoPtr<regExp>>::iterator& reLink
 )
 {
     if (patternEntries_.size())
@@ -271,7 +271,7 @@ Foam::SHA1Digest Foam::dictionary::digest() const
 {
     OSHA1stream os;
 
-    // process entries
+    // Process entries
     forAllConstIter(IDLList<entry>, *this, iter)
     {
         os << *iter;
@@ -283,12 +283,12 @@ Foam::SHA1Digest Foam::dictionary::digest() const
 
 Foam::tokenList Foam::dictionary::tokens() const
 {
-    // linearise dictionary into a string
+    // Serialize dictionary into a string
     OStringStream os;
     write(os, false);
     IStringStream is(os.str());
 
-    // parse string as tokens
+    // Parse string as tokens
     DynamicList<token> tokens;
     token t;
     while (is.read(t))
@@ -317,7 +317,7 @@ bool Foam::dictionary::found
         {
             DLList<entry*>::const_iterator wcLink =
                 patternEntries_.begin();
-            DLList<autoPtr<regExp> >::const_iterator reLink =
+            DLList<autoPtr<regExp>>::const_iterator reLink =
                 patternRegexps_.begin();
 
             // Find in patterns using regular expressions only
@@ -354,7 +354,7 @@ const Foam::entry* Foam::dictionary::lookupEntryPtr
         {
             DLList<entry*>::const_iterator wcLink =
                 patternEntries_.begin();
-            DLList<autoPtr<regExp> >::const_iterator reLink =
+            DLList<autoPtr<regExp>>::const_iterator reLink =
                 patternRegexps_.begin();
 
             // Find in patterns using regular expressions only
@@ -393,7 +393,7 @@ Foam::entry* Foam::dictionary::lookupEntryPtr
         {
             DLList<entry*>::iterator wcLink =
                 patternEntries_.begin();
-            DLList<autoPtr<regExp> >::iterator reLink =
+            DLList<autoPtr<regExp>>::iterator reLink =
                 patternRegexps_.begin();
 
             // Find in patterns using regular expressions only
@@ -577,10 +577,10 @@ bool Foam::dictionary::substituteScopedKeyword(const word& keyword)
 {
     word varName = keyword(1, keyword.size()-1);
 
-    // lookup the variable name in the given dictionary
+    // Lookup the variable name in the given dictionary
     const entry* ePtr = lookupScopedEntryPtr(varName, true, true);
 
-    // if defined insert its entries into this dictionary
+    // If defined insert its entries into this dictionary
     if (ePtr != NULL)
     {
         const dictionary& addDict = ePtr->dict();
@@ -735,7 +735,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
 
     if (mergeEntry && iter != hashedEntries_.end())
     {
-        // merge dictionary with dictionary
+        // Merge dictionary with dictionary
         if (iter()->isDict() && entryPtr->isDict())
         {
             iter()->dict().merge(entryPtr->dict());
@@ -745,7 +745,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
         }
         else
         {
-            // replace existing dictionary with entry or vice versa
+            // Replace existing dictionary with entry or vice versa
             IDLList<entry>::replace(iter(), entryPtr);
             delete iter();
             hashedEntries_.erase(iter);
@@ -857,7 +857,7 @@ void Foam::dictionary::set(entry* entryPtr)
 {
     entry* existingPtr = lookupEntryPtr(entryPtr->keyword(), false, true);
 
-    // clear dictionary so merge acts like overwrite
+    // Clear dictionary so merge acts like overwrite
     if (existingPtr && existingPtr->isDict())
     {
         existingPtr->dict().clear();
@@ -887,7 +887,7 @@ bool Foam::dictionary::remove(const word& Keyword)
         // Delete from patterns first
         DLList<entry*>::iterator wcLink =
             patternEntries_.begin();
-        DLList<autoPtr<regExp> >::iterator reLink =
+        DLList<autoPtr<regExp>>::iterator reLink =
             patternRegexps_.begin();
 
         // Find in pattern using exact match only
@@ -917,7 +917,7 @@ bool Foam::dictionary::changeKeyword
     bool forceOverwrite
 )
 {
-    // no change
+    // No change
     if (oldKeyword == newKeyword)
     {
         return false;
@@ -955,7 +955,7 @@ bool Foam::dictionary::changeKeyword
                 // Delete from patterns first
                 DLList<entry*>::iterator wcLink =
                     patternEntries_.begin();
-                DLList<autoPtr<regExp> >::iterator reLink =
+                DLList<autoPtr<regExp>>::iterator reLink =
                     patternRegexps_.begin();
 
                 // Find in patterns using exact match only
@@ -983,7 +983,7 @@ bool Foam::dictionary::changeKeyword
         }
     }
 
-    // change name and HashTable, but leave DL-List untouched
+    // Change name and HashTable, but leave DL-List untouched
     iter()->keyword() = newKeyword;
     iter()->name() = name() + '.' + newKeyword;
     hashedEntries_.erase(oldKeyword);
@@ -1037,7 +1037,7 @@ bool Foam::dictionary::merge(const dictionary& dict)
         }
         else
         {
-            // not found - just add
+            // Not found - just add
             add(iter().clone(*this).ptr());
             changed = true;
         }
@@ -1058,7 +1058,7 @@ void Foam::dictionary::clear()
 
 void Foam::dictionary::transfer(dictionary& dict)
 {
-    // changing parents probably doesn't make much sense,
+    // Changing parents probably doesn't make much sense,
     // but what about the names?
     name() = dict.name();
 
diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H
index 7e8d5830ca3c2bcd6e20d3b06d6a83d6d7d91d63..bc8450ec0367f5c0e608e8a87ac2910465422391 100644
--- a/src/OpenFOAM/db/dictionary/dictionary.H
+++ b/src/OpenFOAM/db/dictionary/dictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,7 +156,7 @@ class dictionary
         DLList<entry*> patternEntries_;
 
         //- Patterns as precompiled regular expressions
-        DLList<autoPtr<regExp> > patternRegexps_;
+        DLList<autoPtr<regExp>> patternRegexps_;
 
 
    // Private Member Functions
@@ -167,7 +167,7 @@ class dictionary
             const bool patternMatch,
             const word& Keyword,
             DLList<entry*>::const_iterator& wcLink,
-            DLList<autoPtr<regExp> >::const_iterator& reLink
+            DLList<autoPtr<regExp>>::const_iterator& reLink
         ) const;
 
         //- Search patterns table for exact match or regular expression match
@@ -176,7 +176,7 @@ class dictionary
             const bool patternMatch,
             const word& Keyword,
             DLList<entry*>::iterator& wcLink,
-            DLList<autoPtr<regExp> >::iterator& reLink
+            DLList<autoPtr<regExp>>::iterator& reLink
         );
 
 
@@ -554,7 +554,7 @@ dictionary operator|(const dictionary& dict1, const dictionary& dict2);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dictionaryTemplates.C"
+    #include "dictionaryTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C
index f6beeb1e91633f58d41a7643a138f70940d2a447..f27d326d8c6fb1ce4089d31a1bbdb7525d3d3ea9 100644
--- a/src/OpenFOAM/db/dictionary/dictionaryIO.C
+++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,7 +112,7 @@ bool Foam::dictionary::read(Istream& is, const bool keepHeader)
 
     if (is.bad())
     {
-        Info<< "dictionary::read(Istream&, bool) : "
+        InfoInFunction
             << "Istream not OK after reading dictionary " << name()
             << endl;
 
diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C
index 5e4d15eb0899700c9eb1bdfd6a74617fc55b192e..9bc12364b43cb9844d33ab8ed6fbeeb7d2f12404 100644
--- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C
+++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -136,7 +136,7 @@ Foam::primitiveEntry::primitiveEntry
 Foam::primitiveEntry::primitiveEntry
 (
     const keyType& key,
-    const Xfer<List<token> >& tokens
+    const Xfer<List<token>>& tokens
 )
 :
     entry(key),
diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H
index 2930e5f1213acf768656af3991bc9808ecfc5cba..74392ebda7fc186571ef423b56497a975f20984f 100644
--- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H
+++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,7 +113,7 @@ public:
         primitiveEntry(const keyType&, const UList<token>&);
 
         //- Construct from keyword and by transferring a list of tokens
-        primitiveEntry(const keyType&, const Xfer<List<token> >&);
+        primitiveEntry(const keyType&, const Xfer<List<token>>&);
 
         //- Construct from keyword and a T
         template<class T>
@@ -194,7 +194,7 @@ Ostream& operator<<(Ostream&, const InfoProxy<primitiveEntry>&);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "primitiveEntryTemplates.C"
+    #include "primitiveEntryTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C
index a052289eb6fdeca1f84c09b403ee87ebf61cc26a..83a4658108af4bcdfe660bb8950d7f89f7907be9 100644
--- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C
+++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,8 +61,8 @@ Foam::dlLibraryTable::~dlLibraryTable()
         {
             if (debug)
             {
-                Info<< "dlLibraryTable::~dlLibraryTable() : closing "
-                    << libNames_[i]
+                InfoInFunction
+                    << "Closing " << libNames_[i]
                     << " with handle " << uintptr_t(libPtrs_[i]) << endl;
             }
             dlClose(libPtrs_[i]);
@@ -85,7 +85,8 @@ bool Foam::dlLibraryTable::open
 
         if (debug)
         {
-            Info<< "dlLibraryTable::open : opened " << functionLibName
+            InfoInFunction
+                << "Opened " << functionLibName
                 << " resulting in handle " << uintptr_t(functionLibPtr) << endl;
         }
 
@@ -134,7 +135,8 @@ bool Foam::dlLibraryTable::close
     {
         if (debug)
         {
-            Info<< "dlLibraryTable::close : closing " << functionLibName
+            InfoInFunction
+                << "Closing " << functionLibName
                 << " with handle " << uintptr_t(libPtrs_[index]) << endl;
         }
 
diff --git a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.H b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.H
index 6def8c4580c1584d5ae19120c1a4b238cab2c4c1..1f3936c579890c3ad53dd5bdc2ef49bb7d11ad2e 100644
--- a/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.H
+++ b/src/OpenFOAM/db/dynamicLibrary/dlLibraryTable/dlLibraryTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dlLibraryTableTemplates.C"
+    #include "dlLibraryTableTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/error/CocoParserErrors.H b/src/OpenFOAM/db/error/CocoParserErrors.H
deleted file mode 100644
index d693f4efdeef0ce59c2c3263cb90921950a347e5..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/db/error/CocoParserErrors.H
+++ /dev/null
@@ -1,140 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Class
-    Foam::CocoParserErrors
-
-Description
-    Templated class to shadow the error handling for Coco/R parsers
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef CocoParserErrors_H
-#define CocoParserErrors_H
-
-#include "error.H"
-#include "wchar.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
-                      Class CocoParserErrors Declaration
-\*---------------------------------------------------------------------------*/
-
-template<class BaseClass, class StringClass=std::wstring>
-class CocoParserErrors
-:
-    public BaseClass
-{
-    // Private data
-
-        //- The name issued in warnings and errors
-        word   name_;
-
-public:
-
-    // Constructors
-
-        //- Construct with given name
-        CocoParserErrors(const word& name)
-        :
-            BaseClass(),
-            name_(name)
-        {}
-
-
-    //- Destructor
-    virtual ~CocoParserErrors()
-    {}
-
-
-    // Member functions
-
-        //- Return the name issued for warnings
-        virtual const word& name() const
-        {
-            return name_;
-        }
-
-        //- Return the name issued for warnings
-        virtual word& name()
-        {
-            return name_;
-        }
-
-
-    // Error Handling
-
-        //- Handle a general warning 'msg'
-        virtual void Warning(const StringClass& msg)
-        {
-            WarningInFunction
-                << msg << endl;
-        }
-
-        //- Handle a general warning 'msg'
-        virtual void Warning(int line, int col, const StringClass& msg)
-        {
-            WarningInFunction
-                <<"line " << line << " col " << col << ": "
-                << msg << endl;
-        }
-
-        //- Handle general error 'msg' (eg, a semantic error)
-        virtual void Error(int line, int col, const StringClass& msg)
-        {
-            FatalErrorInFunction
-                << "line " << line << " col " << col <<": " << msg << endl
-                << exit(FatalError);
-        }
-
-        //- Handle general error 'msg' (eg, a semantic error)
-        virtual void Error(const StringClass& msg)
-        {
-            FatalErrorInFunction
-                << msg << endl
-                << exit(FatalError);
-        }
-
-        //- Handle a general exception 'msg'
-        virtual void Exception(const StringClass& msg)
-        {
-            this->Error(msg);
-        }
-
-};
-
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/db/error/StaticAssert.H b/src/OpenFOAM/db/error/StaticAssert.H
index bfebf929e345051003581d80c8979a649daf54e9..58fa86c170d0e34a5c677db17dc315089ac7fd97 100644
--- a/src/OpenFOAM/db/error/StaticAssert.H
+++ b/src/OpenFOAM/db/error/StaticAssert.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,23 +62,23 @@ class StaticAssertionTest {};
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Internal use:
-// ~~~~~~~~~~~~~
-
 // Paste together strings, even if an argument is itself a macro
 #define StaticAssertMacro(X,Y)  StaticAssertMacro1(X,Y)
 #define StaticAssertMacro1(X,Y) StaticAssertMacro2(X,Y)
 #define StaticAssertMacro2(X,Y) X##Y
 
-// External use:
-// ~~~~~~~~~~~~~
+#ifdef __GNUC__
+    #define StaticAssertUnusedTypedef __attribute__((unused))
+#else
+    #define StaticAssertUnusedTypedef
+#endif
 
 //- Assert that some test is true at compile-time
-#define StaticAssert(Test)                                                   \
-    typedef ::Foam::StaticAssertionTest                                      \
-    <                                                                        \
-        sizeof( ::Foam::StaticAssertionFailed< ((Test) ? true : false) > )   \
-    > StaticAssertMacro(StaticAssertionTest, __LINE__)
+#define StaticAssert(Test)                                                     \
+    typedef ::Foam::StaticAssertionTest                                        \
+    <                                                                          \
+        sizeof( ::Foam::StaticAssertionFailed<((Test) ? true : false)>)        \
+    > StaticAssertMacro(StaticAssertionTest, __LINE__) StaticAssertUnusedTypedef
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/db/error/messageStream.C b/src/OpenFOAM/db/error/messageStream.C
index 90d196ac6ef6736d5fb977baa1c4b97993138553..7ca86cc7aab991c5dc4fd773c4a9dc9aa8f2b77d 100644
--- a/src/OpenFOAM/db/error/messageStream.C
+++ b/src/OpenFOAM/db/error/messageStream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,6 @@ License
 
 int Foam::messageStream::level(Foam::debug::debugSwitch("level", 2));
 
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 Foam::messageStream::messageStream
@@ -239,7 +238,6 @@ Foam::messageStream::operator Foam::OSstream&()
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-// Global messageStream definitions
 
 Foam::messageStream Foam::SeriousError
 (
diff --git a/src/OpenFOAM/db/error/messageStream.H b/src/OpenFOAM/db/error/messageStream.H
index c16e811d48070c6d58e48b31c44fb286a6244efa..cb14af1aa307463ba3b0ba13c480a253a346ca11 100644
--- a/src/OpenFOAM/db/error/messageStream.H
+++ b/src/OpenFOAM/db/error/messageStream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -272,12 +272,12 @@ extern messageStream Info;
 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
 
 
-//- Report a information message using Foam::Info
+//- Report an information message using Foam::Info
 //  for functionName in file __FILE__ at line __LINE__
 #define InfoIn(functionName)                                                   \
     ::Foam::Info((functionName), __FILE__, __LINE__)
 
-//- Report a information message using Foam::Info
+//- Report an information message using Foam::Info
 //  for FUNCTION_NAME in file __FILE__ at line __LINE__
 #define InfoInFunction InfoIn(FUNCTION_NAME)
 
@@ -294,9 +294,21 @@ extern messageStream Info;
 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
 
 
+//- Report an information message using Foam::Info
+//  if the local debug switch is true
+#define DebugInfo                                                              \
+    if (debug) Info
+
+//- Report an information message using Foam::Info
+//  for FUNCTION_NAME in file __FILE__ at line __LINE__
+//  if the local debug switch is true
+#define DebugInFunction                                                        \
+    if (debug) InfoInFunction
+
+
 //- Report a variable name and value
 //  using Foam::Pout in file __FILE__ at line __LINE__
-#define Debug(var)                                                             \
+#define DebugVar(var)                                                          \
     ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "                   \
     << #var " " << var << ::Foam::endl
 
diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H
index f466832690b3669086e93313203a1c952587a56d..77b248f7e86f4aa4c8616ff8b78f718547f426b8 100644
--- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H
+++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -154,7 +154,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IOOutputFilter.C"
+    #include "IOOutputFilter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H
index 3b54ebc779ea666741fa44adf7ab6511616f0c3f..6d4c92d229d7429a205cb586c740a0cd60fb2a65 100644
--- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H
+++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -241,7 +241,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "OutputFilterFunctionObject.C"
+    #include "OutputFilterFunctionObject.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
index 7845c5fbc6b76e28f281cd0c992e348a45dbce85..a66ef2893bcf7cd007f714c799d4518218970ac5 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
+++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -66,7 +66,7 @@ Foam::functionObject* Foam::functionObjectList::remove
     {
         oldIndex = fnd();
 
-        // retrieve the pointer and remove it from the old list
+        // Retrieve the pointer and remove it from the old list
         ptr = this->set(oldIndex, 0).ptr();
         indices_.erase(fnd);
     }
@@ -124,6 +124,14 @@ Foam::functionObjectList::~functionObjectList()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+void Foam::functionObjectList::resetState()
+{
+    // Reset (re-read) the state dictionary
+    stateDictPtr_.clear();
+    createStateDict();
+}
+
+
 Foam::IOdictionary& Foam::functionObjectList::stateDict()
 {
     if (!stateDictPtr_.valid())
@@ -177,7 +185,7 @@ void Foam::functionObjectList::on()
 
 void Foam::functionObjectList::off()
 {
-    // for safety, also force a read() when execution is turned back on
+    // For safety, also force a read() when execution is turned back on
     updated_ = execution_ = false;
 }
 
@@ -200,6 +208,11 @@ bool Foam::functionObjectList::execute(const bool forceWrite)
 
     if (execution_)
     {
+        if (forceWrite)
+        {
+            resetState();
+        }
+
         if (!updated_)
         {
             read();
@@ -304,7 +317,7 @@ bool Foam::functionObjectList::read()
     bool ok = true;
     updated_ = execution_;
 
-    // avoid reading/initializing if execution is off
+    // Avoid reading/initializing if execution is off
     if (!execution_)
     {
         return ok;
@@ -328,7 +341,7 @@ bool Foam::functionObjectList::read()
 
         if (entryPtr->isDict())
         {
-            // a dictionary of functionObjects
+            // A dictionary of functionObjects
             const dictionary& functionDicts = entryPtr->dict();
 
             newPtrs.setSize(functionDicts.size());
@@ -336,7 +349,7 @@ bool Foam::functionObjectList::read()
 
             forAllConstIter(dictionary, functionDicts, iter)
             {
-                // safety:
+                // Safety:
                 if (!iter().isDict())
                 {
                     continue;
@@ -350,7 +363,7 @@ bool Foam::functionObjectList::read()
                 functionObject* objPtr = remove(key, oldIndex);
                 if (objPtr)
                 {
-                    // an existing functionObject, and dictionary changed
+                    // An existing functionObject, and dictionary changed
                     if (newDigs[nFunc] != digests_[oldIndex])
                     {
                         ok = objPtr->read(dict) && ok;
@@ -358,7 +371,7 @@ bool Foam::functionObjectList::read()
                 }
                 else
                 {
-                    // new functionObject
+                    // New functionObject
                     objPtr = functionObject::New(key, time_, dict).ptr();
                     ok = objPtr->start() && ok;
                 }
@@ -370,7 +383,7 @@ bool Foam::functionObjectList::read()
         }
         else
         {
-            // a list of functionObjects
+            // A list of functionObjects
             PtrList<entry> functionDicts(entryPtr->stream());
 
             newPtrs.setSize(functionDicts.size());
@@ -378,7 +391,7 @@ bool Foam::functionObjectList::read()
 
             forAllIter(PtrList<entry>, functionDicts, iter)
             {
-                // safety:
+                // Safety:
                 if (!iter().isDict())
                 {
                     continue;
@@ -392,7 +405,7 @@ bool Foam::functionObjectList::read()
                 functionObject* objPtr = remove(key, oldIndex);
                 if (objPtr)
                 {
-                    // an existing functionObject, and dictionary changed
+                    // An existing functionObject, and dictionary changed
                     if (newDigs[nFunc] != digests_[oldIndex])
                     {
                         ok = objPtr->read(dict) && ok;
@@ -400,7 +413,7 @@ bool Foam::functionObjectList::read()
                 }
                 else
                 {
-                    // new functionObject
+                    // New functionObject
                     objPtr = functionObject::New(key, time_, dict).ptr();
                     ok = objPtr->start() && ok;
                 }
@@ -411,11 +424,11 @@ bool Foam::functionObjectList::read()
             }
         }
 
-        // safety:
+        // Safety:
         newPtrs.setSize(nFunc);
         newDigs.setSize(nFunc);
 
-        // updating the PtrList of functionObjects also deletes any existing,
+        // Updating the PtrList of functionObjects also deletes any existing,
         // but unused functionObjects
         PtrList<functionObject>::transfer(newPtrs);
         digests_.transfer(newDigs);
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H
index 6a46de60631636634af2179d070e15d8e90064b6..1ccdf0aa23262bc59d5d13b72dec24aa4e9a26bc 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H
+++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -117,12 +117,15 @@ public:
 
         //- Construct from Time, a dictionary with "functions" entry
         //  and the execution setting.
+        //  \param[in]  t - the other Time instance to construct from
         //  \param[in]  parentDict - the parent dictionary containing
         //    a "functions" entry, which can either be a list or a dictionary
         //    of functionObject specifications.
+        //  \param[in]  execution - whether the function objects should execute
+        //    or not. Default: true.
         functionObjectList
         (
-            const Time&,
+            const Time& t,
             const dictionary& parentDict,
             const bool execution=true
         );
@@ -143,11 +146,14 @@ public:
         //- Access to the functionObjects
         using PtrList<functionObject>::operator[];
 
+        //- Reset/read state dictionary for current time
+        virtual void resetState();
+
         //- Return the state dictionary
-        IOdictionary& stateDict();
+        virtual IOdictionary& stateDict();
 
         //- Return const access to the state dictionary
-        const IOdictionary& stateDict() const;
+        virtual const IOdictionary& stateDict() const;
 
         //- Clear the list of function objects
         virtual void clear();
@@ -164,7 +170,6 @@ public:
         //- Return the execution status (on/off) of the function objects
         virtual bool status() const;
 
-
         //- Called at the start of the time-loop
         virtual bool start();
 
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C
index ce0b1c850f76ca76cdba7e066c8f756e60fbcb76..3dc191cefe7edbc550f3c1961a78c6b3c54cddf0 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C
+++ b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -28,6 +28,19 @@ License
 
 const Foam::word Foam::functionObjectState::resultsName_ = "results";
 
+// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
+
+const Foam::IOdictionary& Foam::functionObjectState::stateDict() const
+{
+    return obr_.time().functionObjects().stateDict();
+}
+
+
+Foam::IOdictionary& Foam::functionObjectState::stateDict()
+{
+    return const_cast<IOdictionary&>(obr_.time().functionObjects().stateDict());
+}
+
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -39,11 +52,7 @@ Foam::functionObjectState::functionObjectState
 :
     obr_(obr),
     name_(name),
-    active_(true),
-    stateDict_
-    (
-        const_cast<IOdictionary&>(obr.time().functionObjects().stateDict())
-    )
+    active_(true)
 {}
 
 
@@ -67,28 +76,26 @@ bool Foam::functionObjectState::active() const
 }
 
 
-const Foam::IOdictionary& Foam::functionObjectState::stateDict() const
-{
-    return stateDict_;
-}
-
-
 Foam::dictionary& Foam::functionObjectState::propertyDict()
 {
-    if (!stateDict_.found(name_))
+    IOdictionary& stateDict = this->stateDict();
+
+    if (!stateDict.found(name_))
     {
-        stateDict_.add(name_, dictionary());
+        stateDict.add(name_, dictionary());
     }
 
-    return stateDict_.subDict(name_);
+    return stateDict.subDict(name_);
 }
 
 
 bool Foam::functionObjectState::foundProperty(const word& entryName) const
 {
-    if (stateDict_.found(name_))
+    const IOdictionary& stateDict = this->stateDict();
+
+    if (stateDict.found(name_))
     {
-        const dictionary& baseDict = stateDict_.subDict(name_);
+        const dictionary& baseDict = stateDict.subDict(name_);
         return baseDict.found(entryName);
     }
 
@@ -109,10 +116,11 @@ Foam::word Foam::functionObjectState::objectResultType
 ) const
 {
     word result = word::null;
+    const IOdictionary& stateDict = this->stateDict();
 
-    if (stateDict_.found(resultsName_))
+    if (stateDict.found(resultsName_))
     {
-        const dictionary& resultsDict = stateDict_.subDict(resultsName_);
+        const dictionary& resultsDict = stateDict.subDict(resultsName_);
 
         if (resultsDict.found(objectName))
         {
@@ -147,9 +155,11 @@ Foam::List<Foam::word> Foam::functionObjectState::objectResultEntries
 {
     DynamicList<word> result(2);
 
-    if (stateDict_.found(resultsName_))
+    const IOdictionary& stateDict = this->stateDict();
+
+    if (stateDict.found(resultsName_))
     {
-        const dictionary& resultsDict = stateDict_.subDict(resultsName_);
+        const dictionary& resultsDict = stateDict.subDict(resultsName_);
 
         if (resultsDict.found(objectName))
         {
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H
index c945451dac0a82f10beedb3d2d45dc18164ad4f2..f17b051affdc6ea0ac5ed64dc5bc2155a2b3059e 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H
+++ b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectState.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -65,6 +65,15 @@ private:
         const objectRegistry& obr_;
 
 
+    // Private Member Functions
+
+        //- Disallow default bitwise copy construct
+        functionObjectState(const functionObjectState&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const functionObjectState&);
+
+
 protected:
 
     // Protected data
@@ -75,19 +84,15 @@ protected:
         //- Flag to indicate whether the object is active
         bool active_;
 
-        //- Reference to the state dictionary
-        IOdictionary& stateDict_;
 
+    // Protacted Member Functions
 
-protected:
-
-    // Protected Member Functions
+        //- Return a const reference to the state dictionary
+        const IOdictionary& stateDict() const;
 
-        //- Disallow default bitwise copy construct
-        functionObjectState(const functionObjectState&);
+        //- Return non-const access to the state dictionary
+        IOdictionary& stateDict();
 
-        //- Disallow default bitwise assignment
-        void operator=(const functionObjectState&);
 
 
 public:
@@ -95,11 +100,7 @@ public:
     // Constructors
 
         //- Construct from components
-        functionObjectState
-        (
-            const objectRegistry& obr,
-            const word& name
-        );
+        functionObjectState(const objectRegistry& obr, const word& name);
 
 
     //- Destructor
@@ -114,9 +115,6 @@ public:
         //- Return the active flag
         bool active() const;
 
-        //- Return access to the state dictionary
-        const IOdictionary& stateDict() const;
-
         //- Return access to the property dictionary
         dictionary& propertyDict();
 
@@ -136,7 +134,7 @@ public:
             Type getProperty
             (
                 const word& entryName,
-                const Type& defaultValue = pTraits<Type>::zero
+                const Type& defaultValue = Type(Zero)
             ) const;
 
             //- Retrieve generic property
@@ -153,7 +151,7 @@ public:
             (
                 const word& objectName,
                 const word& entryName,
-                const Type& defaultValue = pTraits<Type>::zero
+                const Type& defaultValue = Type(Zero)
             ) const;
 
             //- Retrieve generic property from named object
@@ -199,7 +197,7 @@ public:
             Type getResult
             (
                 const word& entryName,
-                const Type& defaultValue = pTraits<Type>::zero
+                const Type& defaultValue = Type(Zero)
             ) const;
 
             //- Retrieve result from named object
@@ -208,7 +206,7 @@ public:
             (
                 const word& objectName,
                 const word& entryName,
-                const Type& defaultValue = pTraits<Type>::zero
+                const Type& defaultValue = Type(Zero)
             ) const;
 
             //- Retrieve result from named object
diff --git a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C
index f102eb0a4c2d93822fe36313ecf1b9de80c15da1..ef791f3547b404100fce60a9158e3616dcd36ed2 100644
--- a/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C
+++ b/src/OpenFOAM/db/functionObjects/functionObjectState/functionObjectStateTemplates.C
@@ -100,9 +100,11 @@ void Foam::functionObjectState::getObjectProperty
     Type& value
 ) const
 {
-    if (stateDict_.found(objectName))
+    const IOdictionary& stateDict = this->stateDict();
+
+    if (stateDict.found(objectName))
     {
-        const dictionary& baseDict = stateDict_.subDict(objectName);
+        const dictionary& baseDict = stateDict.subDict(objectName);
         if (baseDict.found(entryName))
         {
             if (baseDict.isDict(entryName))
@@ -126,12 +128,14 @@ void Foam::functionObjectState::setObjectProperty
     const Type& value
 )
 {
-    if (!stateDict_.found(objectName))
+    IOdictionary& stateDict = this->stateDict();
+
+    if (!stateDict.found(objectName))
     {
-        stateDict_.add(objectName, dictionary());
+        stateDict.add(objectName, dictionary());
     }
 
-    dictionary& baseDict = stateDict_.subDict(objectName);
+    dictionary& baseDict = stateDict.subDict(objectName);
     baseDict.add(entryName, value, true);
 }
 
@@ -155,12 +159,14 @@ void Foam::functionObjectState::setObjectResult
     const Type& value
 )
 {
-    if (!stateDict_.found(resultsName_))
+    IOdictionary& stateDict = this->stateDict();
+
+    if (!stateDict.found(resultsName_))
     {
-        stateDict_.add(resultsName_, dictionary());
+        stateDict.add(resultsName_, dictionary());
     }
 
-    dictionary& resultsDict = stateDict_.subDict(resultsName_);
+    dictionary& resultsDict = stateDict.subDict(resultsName_);
 
     if (!resultsDict.found(objectName))
     {
@@ -215,9 +221,11 @@ void Foam::functionObjectState::getObjectResult
     Type& value
 ) const
 {
-    if (stateDict_.found(resultsName_))
+    const IOdictionary& stateDict = this->stateDict();
+
+    if (stateDict.found(resultsName_))
     {
-        const dictionary& resultsDict = stateDict_.subDict(resultsName_);
+        const dictionary& resultsDict = stateDict.subDict(resultsName_);
 
         if (resultsDict.found(objectName))
         {
diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.C b/src/OpenFOAM/db/objectRegistry/objectRegistry.C
index b592d7f7ee3f08dde7f3f7018fd63628ae22506e..84df1a647023255b17fb86b0d6a5f819390cc19a 100644
--- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C
+++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ Foam::objectRegistry::objectRegistry
         IOobject
         (
             string::validate<word>(t.caseName()),
-            "",
+            t.path(),
             t,
             IOobject::NO_READ,
             IOobject::AUTO_WRITE,
diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.H b/src/OpenFOAM/db/objectRegistry/objectRegistry.H
index 2352b3a3bdebbabd9223489fe972e000aad7cb71..bae145b04196885c76a128cdffa3e4a4cd77fe10 100644
--- a/src/OpenFOAM/db/objectRegistry/objectRegistry.H
+++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -235,7 +235,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "objectRegistryTemplates.C"
+    #include "objectRegistryTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C
index 5a0532bd441465d50491137a5866c9920ef62f96..5daf5b1660c750f2cc7b1ae55665b16f2eb00011 100644
--- a/src/OpenFOAM/db/regIOobject/regIOobject.C
+++ b/src/OpenFOAM/db/regIOobject/regIOobject.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,6 @@ registerOptSwitch
     Foam::regIOobject::fileModificationSkew
 );
 
-
 bool Foam::regIOobject::masterOnlyReading = false;
 
 
diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C
index 808f46865c8ad361065e7edc70ce3ad54469337f..d9488544d57dc6605ea99a3880d33ec4393ef104 100644
--- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C
+++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -184,7 +184,6 @@ bool Foam::regIOobject::readHeaderOk
     }
 }
 
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 Foam::Istream& Foam::regIOobject::readStream()
@@ -406,13 +405,13 @@ bool Foam::regIOobject::readIfModified()
 
         if (modified == watchIndices_.last())
         {
-            Info<< "regIOobject::readIfModified() : " << nl
+            InfoInFunction
                 << "    Re-reading object " << name()
                 << " from file " << fName << endl;
         }
         else
         {
-            Info<< "regIOobject::readIfModified() : " << nl
+            InfoInFunction
                 << "    Re-reading object " << name()
                 << " from file " << fName
                 << " because of modified file " << time().getFile(modified)
diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C
index 2ca876f4985522069b1be0e9653656f908d7ea6c..733bd47ccc0850eb8b419957e3e6de31e406fb16 100644
--- a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C
+++ b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/OpenFOAM/db/runTimeSelection/construction/addToRunTimeSelectionTable.H b/src/OpenFOAM/db/runTimeSelection/construction/addToRunTimeSelectionTable.H
index 2a02143f4a8e8e583ee39d8446acdd969c592cd1..2c23754e8ab06eb6ecc6215d396ce31d8366106e 100644
--- a/src/OpenFOAM/db/runTimeSelection/construction/addToRunTimeSelectionTable.H
+++ b/src/OpenFOAM/db/runTimeSelection/construction/addToRunTimeSelectionTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,39 +34,39 @@ Description
 
 // add to hash-table of functions with typename as the key
 #define addToRunTimeSelectionTable\
-(baseType,thisType,argNames)                                                  \
-                                                                              \
-    /* Add the thisType constructor function to the table */                  \
-    baseType::add##argNames##ConstructorToTable< thisType >                   \
+(baseType,thisType,argNames)                                                   \
+                                                                               \
+    /* Add the thisType constructor function to the table */                   \
+    baseType::add##argNames##ConstructorToTable<thisType>                      \
         add##thisType##argNames##ConstructorTo##baseType##Table_
 
 
 // add to hash-table of functions with 'lookup' as the key
 #define addNamedToRunTimeSelectionTable\
-(baseType,thisType,argNames,lookup)                                           \
-                                                                              \
-    /* Add the thisType constructor function to the table, find by lookup */  \
-    baseType::add##argNames##ConstructorToTable< thisType >                   \
-        add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_  \
+(baseType,thisType,argNames,lookup)                                            \
+                                                                               \
+    /* Add the thisType constructor function to the table, find by lookup */   \
+    baseType::add##argNames##ConstructorToTable<thisType>                      \
+        add_##lookup##_##thisType##argNames##ConstructorTo##baseType##Table_   \
         (#lookup)
 
 
 // add to hash-table of functions with typename as the key
 #define addRemovableToRunTimeSelectionTable\
-(baseType,thisType,argNames)                                                  \
-                                                                              \
-    /* Add the thisType constructor function to the table */                  \
-    baseType::addRemovable##argNames##ConstructorToTable< thisType >          \
+(baseType,thisType,argNames)                                                   \
+                                                                               \
+    /* Add the thisType constructor function to the table */                   \
+    baseType::addRemovable##argNames##ConstructorToTable<thisType>             \
         addRemovable##thisType##argNames##ConstructorTo##baseType##Table_
 
 
 // add to hash-table of functions with 'lookup' as the key
 #define addRemovableNamedToRunTimeSelectionTable\
-(baseType,thisType,argNames,lookup)                                           \
-                                                                              \
-    /* Add the thisType constructor function to the table, find by lookup */  \
-    baseType::addRemovable##argNames##ConstructorToTable< thisType >          \
-        addRemovable_##lookup##_##thisType##argNames##ConstructorTo           \
+(baseType,thisType,argNames,lookup)                                            \
+                                                                               \
+    /* Add the thisType constructor function to the table, find by lookup */   \
+    baseType::addRemovable##argNames##ConstructorToTable<thisType>             \
+        addRemovable_##lookup##_##thisType##argNames##ConstructorTo            \
         ##baseType##Table_(#lookup)
 
 
@@ -76,21 +76,21 @@ Description
 // add to hash-table of functions with typename as the key
 // use when baseType doesn't need a template argument (eg, is a typedef)
 #define addTemplateToRunTimeSelectionTable\
-(baseType,thisType,Targ,argNames)                                             \
-                                                                              \
-    /* Add the thisType constructor function to the table */                  \
-    baseType::add##argNames##ConstructorToTable< thisType< Targ > >           \
+(baseType,thisType,Targ,argNames)                                              \
+                                                                               \
+    /* Add the thisType constructor function to the table */                   \
+    baseType::add##argNames##ConstructorToTable<thisType<Targ>>                \
         add##thisType##Targ##argNames##ConstructorTo##baseType##Table_
 
 
 // add to hash-table of functions with 'lookup' as the key
 // use when baseType doesn't need a template argument (eg, is a typedef)
 #define addNamedTemplateToRunTimeSelectionTable\
-(baseType,thisType,Targ,argNames,lookup)                                      \
-                                                                              \
-    /* Add the thisType constructor function to the table, find by lookup */  \
-    baseType::add##argNames##ConstructorToTable< thisType< Targ > >           \
-        add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType    \
+(baseType,thisType,Targ,argNames,lookup)                                       \
+                                                                               \
+    /* Add the thisType constructor function to the table, find by lookup */   \
+    baseType::add##argNames##ConstructorToTable<thisType<Targ>>                \
+        add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType     \
         ##Table_(#lookup)
 
 
@@ -100,21 +100,21 @@ Description
 // add to hash-table of functions with typename as the key
 // use when baseType requires the Targ template argument as well
 #define addTemplatedToRunTimeSelectionTable\
-(baseType,thisType,Targ,argNames)                                             \
-                                                                              \
-    /* Add the thisType constructor function to the table */                  \
-    baseType< Targ >::add##argNames##ConstructorToTable< thisType< Targ > >   \
+(baseType,thisType,Targ,argNames)                                              \
+                                                                               \
+    /* Add the thisType constructor function to the table */                   \
+    baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ>>          \
         add##thisType##Targ##argNames##ConstructorTo##baseType##Targ##Table_
 
 
 // add to hash-table of functions with 'lookup' as the key
 // use when baseType requires the Targ template argument as well
 #define addNamedTemplatedToRunTimeSelectionTable\
-(baseType,thisType,Targ,argNames,lookup)                                      \
-                                                                              \
-    /* Add the thisType constructor function to the table, find by lookup */  \
-    baseType< Targ >::add##argNames##ConstructorToTable< thisType< Targ > >   \
-        add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType##  \
+(baseType,thisType,Targ,argNames,lookup)                                       \
+                                                                               \
+    /* Add the thisType constructor function to the table, find by lookup */   \
+    baseType<Targ>::add##argNames##ConstructorToTable<thisType<Targ>>          \
+        add_##lookup##_##thisType##Targ##argNames##ConstructorTo##baseType##   \
         Targ##Table_(#lookup)
 
 
diff --git a/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H
index b49ab8ccb91997908781aa88254c8700c620c3d0..6386c460fb86a195f01ea64451b0cdbf54f097c6 100644
--- a/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H
+++ b/src/OpenFOAM/db/runTimeSelection/construction/runTimeSelectionTables.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,341 +42,303 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
-// external use:
-// ~~~~~~~~~~~~~
-// declare a run-time selection:
-#define declareRunTimeSelectionTable\
-(autoPtr,baseType,argNames,argList,parList)                                   \
-                                                                              \
-    /* Construct from argList function pointer type */                        \
-    typedef autoPtr< baseType > (*argNames##ConstructorPtr)argList;           \
-                                                                              \
-    /* Construct from argList function table type */                          \
-    typedef HashTable< argNames##ConstructorPtr, word, string::hash >         \
-        argNames##ConstructorTable;                                           \
-                                                                              \
-    /* Construct from argList function pointer table pointer */               \
-    static argNames##ConstructorTable* argNames##ConstructorTablePtr_;        \
-                                                                              \
-    /* Table constructor called from the table add function */                \
-    static void construct##argNames##ConstructorTables();                     \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    static void destroy##argNames##ConstructorTables();                       \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    template< class baseType##Type >                                          \
-    class add##argNames##ConstructorToTable                                   \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        static autoPtr< baseType > New argList                                \
-        {                                                                     \
-            return autoPtr< baseType >(new baseType##Type parList);           \
-        }                                                                     \
-                                                                              \
-        add##argNames##ConstructorToTable                                     \
-        (                                                                     \
-            const word& lookup = baseType##Type::typeName                     \
-        )                                                                     \
-        {                                                                     \
-            construct##argNames##ConstructorTables();                         \
-            if (!argNames##ConstructorTablePtr_->insert(lookup, New))         \
-            {                                                                 \
-                std::cerr<< "Duplicate entry " << lookup                      \
-                    << " in runtime selection table " << #baseType            \
-                    << std::endl;                                             \
-                error::safePrintStack(std::cerr);                             \
-            }                                                                 \
-        }                                                                     \
-                                                                              \
-        ~add##argNames##ConstructorToTable()                                  \
-        {                                                                     \
-            destroy##argNames##ConstructorTables();                           \
-        }                                                                     \
-    };                                                                        \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    /* Remove only the entry (not the table) upon destruction */              \
-    template< class baseType##Type >                                          \
-    class addRemovable##argNames##ConstructorToTable                          \
-    {                                                                         \
-        /* retain lookup name for later removal */                            \
-        const word& lookup_;                                                  \
-                                                                              \
-    public:                                                                   \
-                                                                              \
-        static autoPtr< baseType > New argList                                \
-        {                                                                     \
-            return autoPtr< baseType >(new baseType##Type parList);           \
-        }                                                                     \
-                                                                              \
-        addRemovable##argNames##ConstructorToTable                            \
-        (                                                                     \
-            const word& lookup = baseType##Type::typeName                     \
-        )                                                                     \
-        :                                                                     \
-            lookup_(lookup)                                                   \
-        {                                                                     \
-            construct##argNames##ConstructorTables();                         \
-            argNames##ConstructorTablePtr_->set(lookup, New);                 \
-        }                                                                     \
-                                                                              \
-        ~addRemovable##argNames##ConstructorToTable()                         \
-        {                                                                     \
-            if (argNames##ConstructorTablePtr_)                               \
-            {                                                                 \
-                argNames##ConstructorTablePtr_->erase(lookup_);               \
-            }                                                                 \
-        }                                                                     \
+//- Declare a run-time selection
+#define declareRunTimeSelectionTable(autoPtr,baseType,argNames,argList,parList)\
+                                                                               \
+    /* Construct from argList function pointer type */                         \
+    typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList;              \
+                                                                               \
+    /* Construct from argList function table type */                           \
+    typedef HashTable<argNames##ConstructorPtr, word, string::hash>            \
+        argNames##ConstructorTable;                                            \
+                                                                               \
+    /* Construct from argList function pointer table pointer */                \
+    static argNames##ConstructorTable* argNames##ConstructorTablePtr_;         \
+                                                                               \
+    /* Table constructor called from the table add function */                 \
+    static void construct##argNames##ConstructorTables();                      \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
+    static void destroy##argNames##ConstructorTables();                        \
+                                                                               \
+    /* Class to add constructor from argList to table */                       \
+    template<class baseType##Type>                                             \
+    class add##argNames##ConstructorToTable                                    \
+    {                                                                          \
+    public:                                                                    \
+                                                                               \
+        static autoPtr<baseType> New argList                                   \
+        {                                                                      \
+            return autoPtr<baseType>(new baseType##Type parList);              \
+        }                                                                      \
+                                                                               \
+        add##argNames##ConstructorToTable                                      \
+        (                                                                      \
+            const word& lookup = baseType##Type::typeName                      \
+        )                                                                      \
+        {                                                                      \
+            construct##argNames##ConstructorTables();                          \
+            if (!argNames##ConstructorTablePtr_->insert(lookup, New))          \
+            {                                                                  \
+                std::cerr<< "Duplicate entry " << lookup                       \
+                    << " in runtime selection table " << #baseType             \
+                    << std::endl;                                              \
+                error::safePrintStack(std::cerr);                              \
+            }                                                                  \
+        }                                                                      \
+                                                                               \
+        ~add##argNames##ConstructorToTable()                                   \
+        {                                                                      \
+            destroy##argNames##ConstructorTables();                            \
+        }                                                                      \
+    };                                                                         \
+                                                                               \
+    /* Class to add constructor from argList to table */                       \
+    /* Remove only the entry (not the table) upon destruction */               \
+    template<class baseType##Type>                                             \
+    class addRemovable##argNames##ConstructorToTable                           \
+    {                                                                          \
+        /* retain lookup name for later removal */                             \
+        const word& lookup_;                                                   \
+                                                                               \
+    public:                                                                    \
+                                                                               \
+        static autoPtr<baseType> New argList                                   \
+        {                                                                      \
+            return autoPtr<baseType>(new baseType##Type parList);              \
+        }                                                                      \
+                                                                               \
+        addRemovable##argNames##ConstructorToTable                             \
+        (                                                                      \
+            const word& lookup = baseType##Type::typeName                      \
+        )                                                                      \
+        :                                                                      \
+            lookup_(lookup)                                                    \
+        {                                                                      \
+            construct##argNames##ConstructorTables();                          \
+            argNames##ConstructorTablePtr_->set(lookup, New);                  \
+        }                                                                      \
+                                                                               \
+        ~addRemovable##argNames##ConstructorToTable()                          \
+        {                                                                      \
+            if (argNames##ConstructorTablePtr_)                                \
+            {                                                                  \
+                argNames##ConstructorTablePtr_->erase(lookup_);                \
+            }                                                                  \
+        }                                                                      \
     };
 
 
 
-// external use:
-// ~~~~~~~~~~~~~
-// declare a run-time selection for derived classes:
-#define declareRunTimeNewSelectionTable\
-(autoPtr,baseType,argNames,argList,parList)                                   \
-                                                                              \
-    /* Construct from argList function pointer type */                        \
-    typedef autoPtr< baseType > (*argNames##ConstructorPtr)argList;           \
-                                                                              \
-    /* Construct from argList function table type */                          \
-    typedef HashTable< argNames##ConstructorPtr, word, string::hash >         \
-        argNames##ConstructorTable;                                           \
-                                                                              \
-    /* Construct from argList function pointer table pointer */               \
-    static argNames##ConstructorTable* argNames##ConstructorTablePtr_;        \
-                                                                              \
-    /* Table constructor called from the table add function */                \
-    static void construct##argNames##ConstructorTables();                     \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    static void destroy##argNames##ConstructorTables();                       \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    template< class baseType##Type >                                          \
-    class add##argNames##ConstructorToTable                                   \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        static autoPtr< baseType > New##baseType argList                      \
-        {                                                                     \
-            return autoPtr< baseType >(baseType##Type::New parList.ptr());    \
-        }                                                                     \
-                                                                              \
-        add##argNames##ConstructorToTable                                     \
-        (                                                                     \
-            const word& lookup = baseType##Type::typeName                     \
-        )                                                                     \
-        {                                                                     \
-            construct##argNames##ConstructorTables();                         \
-            if                                                                \
-            (                                                                 \
-               !argNames##ConstructorTablePtr_->insert                        \
-                (                                                             \
-                    lookup,                                                   \
-                    New##baseType                                             \
-                )                                                             \
-            )                                                                 \
-            {                                                                 \
-                std::cerr<< "Duplicate entry " << lookup                      \
-                    << " in runtime selection table " << #baseType            \
-                    << std::endl;                                             \
-                error::safePrintStack(std::cerr);                             \
-            }                                                                 \
-        }                                                                     \
-                                                                              \
-        ~add##argNames##ConstructorToTable()                                  \
-        {                                                                     \
-            destroy##argNames##ConstructorTables();                           \
-        }                                                                     \
-    };                                                                        \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    template< class baseType##Type >                                          \
-    class addRemovable##argNames##ConstructorToTable                          \
-    {                                                                         \
-        /* retain lookup name for later removal */                            \
-        const word& lookup_;                                                  \
-                                                                              \
-    public:                                                                   \
-                                                                              \
-        static autoPtr< baseType > New##baseType argList                      \
-        {                                                                     \
-            return autoPtr< baseType >(baseType##Type::New parList.ptr());    \
-        }                                                                     \
-                                                                              \
-        addRemovable##argNames##ConstructorToTable                            \
-        (                                                                     \
-            const word& lookup = baseType##Type::typeName                     \
-        )                                                                     \
-        :                                                                     \
-            lookup_(lookup)                                                   \
-        {                                                                     \
-            construct##argNames##ConstructorTables();                         \
-            argNames##ConstructorTablePtr_->set                               \
-            (                                                                 \
-                lookup,                                                       \
-                New##baseType                                                 \
-            );                                                                \
-        }                                                                     \
-                                                                              \
-        ~addRemovable##argNames##ConstructorToTable()                         \
-        {                                                                     \
-            if (argNames##ConstructorTablePtr_)                               \
-            {                                                                 \
-                argNames##ConstructorTablePtr_->erase(lookup_);               \
-            }                                                                 \
-        }                                                                     \
+//- Declare a run-time selection for derived classes
+#define declareRunTimeNewSelectionTable(                                       \
+    autoPtr,baseType,argNames,argList,parList)                                 \
+                                                                               \
+    /* Construct from argList function pointer type */                         \
+    typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList;              \
+                                                                               \
+    /* Construct from argList function table type */                           \
+    typedef HashTable<argNames##ConstructorPtr, word, string::hash>            \
+        argNames##ConstructorTable;                                            \
+                                                                               \
+    /* Construct from argList function pointer table pointer */                \
+    static argNames##ConstructorTable* argNames##ConstructorTablePtr_;         \
+                                                                               \
+    /* Table constructor called from the table add function */                 \
+    static void construct##argNames##ConstructorTables();                      \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
+    static void destroy##argNames##ConstructorTables();                        \
+                                                                               \
+    /* Class to add constructor from argList to table */                       \
+    template<class baseType##Type>                                             \
+    class add##argNames##ConstructorToTable                                    \
+    {                                                                          \
+    public:                                                                    \
+                                                                               \
+        static autoPtr<baseType> New##baseType argList                         \
+        {                                                                      \
+            return autoPtr<baseType>(baseType##Type::New parList.ptr());       \
+        }                                                                      \
+                                                                               \
+        add##argNames##ConstructorToTable                                      \
+        (                                                                      \
+            const word& lookup = baseType##Type::typeName                      \
+        )                                                                      \
+        {                                                                      \
+            construct##argNames##ConstructorTables();                          \
+            if                                                                 \
+            (                                                                  \
+               !argNames##ConstructorTablePtr_->insert                         \
+                (                                                              \
+                    lookup,                                                    \
+                    New##baseType                                              \
+                )                                                              \
+            )                                                                  \
+            {                                                                  \
+                std::cerr<< "Duplicate entry " << lookup                       \
+                    << " in runtime selection table " << #baseType             \
+                    << std::endl;                                              \
+                error::safePrintStack(std::cerr);                              \
+            }                                                                  \
+        }                                                                      \
+                                                                               \
+        ~add##argNames##ConstructorToTable()                                   \
+        {                                                                      \
+            destroy##argNames##ConstructorTables();                            \
+        }                                                                      \
+    };                                                                         \
+                                                                               \
+    /* Class to add constructor from argList to table */                       \
+    template<class baseType##Type>                                             \
+    class addRemovable##argNames##ConstructorToTable                           \
+    {                                                                          \
+        /* retain lookup name for later removal */                             \
+        const word& lookup_;                                                   \
+                                                                               \
+    public:                                                                    \
+                                                                               \
+        static autoPtr<baseType> New##baseType argList                         \
+        {                                                                      \
+            return autoPtr<baseType>(baseType##Type::New parList.ptr());       \
+        }                                                                      \
+                                                                               \
+        addRemovable##argNames##ConstructorToTable                             \
+        (                                                                      \
+            const word& lookup = baseType##Type::typeName                      \
+        )                                                                      \
+        :                                                                      \
+            lookup_(lookup)                                                    \
+        {                                                                      \
+            construct##argNames##ConstructorTables();                          \
+            argNames##ConstructorTablePtr_->set                                \
+            (                                                                  \
+                lookup,                                                        \
+                New##baseType                                                  \
+            );                                                                 \
+        }                                                                      \
+                                                                               \
+        ~addRemovable##argNames##ConstructorToTable()                          \
+        {                                                                      \
+            if (argNames##ConstructorTablePtr_)                                \
+            {                                                                  \
+                argNames##ConstructorTablePtr_->erase(lookup_);                \
+            }                                                                  \
+        }                                                                      \
     };
 
 
-// internal use:
-// constructor aid
-#define defineRunTimeSelectionTableConstructor\
-(baseType,argNames)                                                           \
-                                                                              \
-    /* Table constructor called from the table add function */                \
-    void baseType::construct##argNames##ConstructorTables()                   \
-    {                                                                         \
-        static bool constructed = false;                                      \
-        if (!constructed)                                                     \
-        {                                                                     \
-            constructed = true;                                               \
-            baseType::argNames##ConstructorTablePtr_                          \
-                = new baseType::argNames##ConstructorTable;                   \
-        }                                                                     \
+// Constructor aid
+#define defineRunTimeSelectionTableConstructor(baseType,argNames)              \
+                                                                               \
+    /* Table constructor called from the table add function */                 \
+    void baseType::construct##argNames##ConstructorTables()                    \
+    {                                                                          \
+        static bool constructed = false;                                       \
+        if (!constructed)                                                      \
+        {                                                                      \
+            constructed = true;                                                \
+            baseType::argNames##ConstructorTablePtr_                           \
+                = new baseType::argNames##ConstructorTable;                    \
+        }                                                                      \
     }
 
 
-// internal use:
-// destructor aid
-#define defineRunTimeSelectionTableDestructor\
-(baseType,argNames)                                                           \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void baseType::destroy##argNames##ConstructorTables()                     \
-    {                                                                         \
-        if (baseType::argNames##ConstructorTablePtr_)                         \
-        {                                                                     \
-            delete baseType::argNames##ConstructorTablePtr_;                  \
-            baseType::argNames##ConstructorTablePtr_ = NULL;                  \
-        }                                                                     \
+// Destructor aid
+#define defineRunTimeSelectionTableDestructor(baseType,argNames)               \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
+    void baseType::destroy##argNames##ConstructorTables()                      \
+    {                                                                          \
+        if (baseType::argNames##ConstructorTablePtr_)                          \
+        {                                                                      \
+            delete baseType::argNames##ConstructorTablePtr_;                   \
+            baseType::argNames##ConstructorTablePtr_ = NULL;                   \
+        }                                                                      \
     }
 
 
-// internal use:
-// create pointer to hash-table of functions
-#define defineRunTimeSelectionTablePtr\
-(baseType,argNames)                                                           \
-                                                                              \
-    /* Define the constructor function table */                               \
-    baseType::argNames##ConstructorTable*                                     \
+// Create pointer to hash-table of functions
+#define defineRunTimeSelectionTablePtr(baseType,argNames)                      \
+                                                                               \
+    /* Define the constructor function table */                                \
+    baseType::argNames##ConstructorTable*                                      \
         baseType::argNames##ConstructorTablePtr_ = NULL
 
 
-// not much in use:
-#define defineTemplateRunTimeSelectionTablePtr(baseType,argNames)             \
-                                                                              \
-    /* Define the constructor function table */                               \
-    typename baseType::argNames##ConstructorTable*                            \
-        baseType::argNames##ConstructorTablePtr_ = NULL
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table
-#define defineRunTimeSelectionTable\
-(baseType,argNames)                                                           \
-                                                                              \
-    defineRunTimeSelectionTablePtr(baseType,argNames);                        \
-    defineRunTimeSelectionTableConstructor(baseType,argNames);                \
+//- Define run-time selection table
+#define defineRunTimeSelectionTable(baseType,argNames)                         \
+                                                                               \
+    defineRunTimeSelectionTablePtr(baseType,argNames);                         \
+    defineRunTimeSelectionTableConstructor(baseType,argNames);                 \
     defineRunTimeSelectionTableDestructor(baseType,argNames)
 
 
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table for template classes
-// use when baseType doesn't need a template argument (eg, is a typedef)
-#define defineTemplateRunTimeSelectionTable\
-(baseType,argNames)                                                           \
-                                                                              \
-    template<>                                                                \
-    defineRunTimeSelectionTablePtr(baseType,argNames);                        \
-    template<>                                                                \
-    defineRunTimeSelectionTableConstructor(baseType,argNames);                \
-    template<>                                                                \
+//- Define run-time selection table for template classes
+//  use when baseType doesn't need a template argument (eg, is a typedef)
+#define defineTemplateRunTimeSelectionTable(baseType,argNames)                 \
+                                                                               \
+    template<>                                                                 \
+    defineRunTimeSelectionTablePtr(baseType,argNames);                         \
+    template<>                                                                 \
+    defineRunTimeSelectionTableConstructor(baseType,argNames);                 \
+    template<>                                                                 \
     defineRunTimeSelectionTableDestructor(baseType,argNames)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
-// internal use:
-// constructor aid
-// use when baseType requires the Targ template argument
-#define defineTemplatedRunTimeSelectionTableConstructor\
-(baseType,argNames,Targ)                                                      \
-                                                                              \
-    /* Table constructor called from the table add function */                \
-    void baseType< Targ >::construct##argNames##ConstructorTables()           \
-    {                                                                         \
-        static bool constructed = false;                                      \
-        if (!constructed)                                                     \
-        {                                                                     \
-            constructed = true;                                               \
-            baseType< Targ >::argNames##ConstructorTablePtr_                  \
-                = new baseType< Targ >::argNames##ConstructorTable;           \
-        }                                                                     \
+// Constructor aid: use when baseType requires the Targ template argument
+#define defineTemplatedRunTimeSelectionTableConstructor(baseType,argNames,Targ)\
+                                                                               \
+    /* Table constructor called from the table add function */                 \
+    void baseType<Targ>::construct##argNames##ConstructorTables()              \
+    {                                                                          \
+        static bool constructed = false;                                       \
+        if (!constructed)                                                      \
+        {                                                                      \
+            constructed = true;                                                \
+            baseType<Targ>::argNames##ConstructorTablePtr_                     \
+                = new baseType<Targ>::argNames##ConstructorTable;              \
+        }                                                                      \
     }
 
 
-// internal use:
-// destructor aid
-// use when baseType requires the Targ template argument
-#define defineTemplatedRunTimeSelectionTableDestructor\
-(baseType,argNames,Targ)                                                      \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void baseType< Targ >::destroy##argNames##ConstructorTables()             \
-    {                                                                         \
-        if (baseType< Targ >::argNames##ConstructorTablePtr_)                 \
-        {                                                                     \
-            delete baseType< Targ >::argNames##ConstructorTablePtr_;          \
-            baseType< Targ >::argNames##ConstructorTablePtr_ = NULL;          \
-        }                                                                     \
+// Destructor aid: use when baseType requires the Targ template argument
+#define defineTemplatedRunTimeSelectionTableDestructor(baseType,argNames,Targ) \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
+    void baseType<Targ>::destroy##argNames##ConstructorTables()                \
+    {                                                                          \
+        if (baseType<Targ>::argNames##ConstructorTablePtr_)                    \
+        {                                                                      \
+            delete baseType<Targ>::argNames##ConstructorTablePtr_;             \
+            baseType<Targ>::argNames##ConstructorTablePtr_ = NULL;             \
+        }                                                                      \
     }
 
 
-// internal use:
-// create pointer to hash-table of functions
-// use when baseType requires the Targ template argument
-#define defineTemplatedRunTimeSelectionTablePtr\
-(baseType,argNames,Targ)                                                      \
-                                                                              \
-    /* Define the constructor function table */                               \
-    baseType< Targ >::argNames##ConstructorTable*                             \
-        baseType< Targ >::argNames##ConstructorTablePtr_ = NULL
-
-
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table for template classes
-// use when baseType requires the Targ template argument
-#define defineTemplatedRunTimeSelectionTable\
-(baseType,argNames,Targ)                                                      \
-                                                                              \
-    template<>                                                                \
-    defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ);          \
-    template<>                                                                \
-    defineTemplatedRunTimeSelectionTableConstructor(baseType,argNames,Targ);  \
-    template<>                                                                \
+//- Create pointer to hash-table of functions
+//  use when baseType requires the Targ template argument
+#define defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ)        \
+                                                                               \
+    /* Define the constructor function table */                                \
+    baseType<Targ>::argNames##ConstructorTable*                                \
+        baseType<Targ>::argNames##ConstructorTablePtr_ = NULL
+
+
+//- Define run-time selection table for template classes
+//  use when baseType requires the Targ template argument
+#define defineTemplatedRunTimeSelectionTable(baseType,argNames,Targ)           \
+                                                                               \
+    template<>                                                                 \
+    defineTemplatedRunTimeSelectionTablePtr(baseType,argNames,Targ);           \
+    template<>                                                                 \
+    defineTemplatedRunTimeSelectionTableConstructor(baseType,argNames,Targ);   \
+    template<>                                                                 \
     defineTemplatedRunTimeSelectionTableDestructor(baseType,argNames,Targ)
 
 
diff --git a/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H
deleted file mode 100644
index 64a8d639c3b4421dbf37fc39080d850fe9be9d56..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/db/runTimeSelection/globalFunctions/globalFunctionSelectionTables.H
+++ /dev/null
@@ -1,144 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Global
-    Foam::globalFunctionSelectionTables
-
-Description
-    Macros to enable the easy declaration of global function selection tables.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef globalMemberFunctionSelectionTables_H
-#define globalMemberFunctionSelectionTables_H
-
-#include "memberFunctionSelectionTables.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// external use:
-// ~~~~~~~~~~~~~
-// declare a run-time selection:
-#define declareGlobalFunctionSelectionTable\
-(returnType,memberFunction,argNames,argList,parList)                          \
-                                                                              \
-    /* Construct from argList function pointer type */                        \
-    typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
-                                                                              \
-    /* Construct from argList function table type */                          \
-    typedef HashTable                                                         \
-        <memberFunction##argNames##MemberFunctionPtr, word, string::hash>     \
-        memberFunction##argNames##MemberFunctionTable;                        \
-                                                                              \
-    /* Construct from argList function pointer table pointer */               \
-    extern memberFunction##argNames##MemberFunctionTable*                     \
-        memberFunction##argNames##MemberFunctionTablePtr_;                    \
-                                                                              \
-    /* Table memberFunction called from the table add function */             \
-    void construct##memberFunction##argNames##MemberFunctionTables();         \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void destroy##memberFunction##argNames##MemberFunctionTables();           \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    class add##memberFunction##argNames##GlobalMemberFunctionToTable          \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        add##memberFunction##argNames##GlobalMemberFunctionToTable            \
-        (                                                                     \
-            const word& lookup,                                               \
-            memberFunction##argNames##MemberFunctionPtr function              \
-        )                                                                     \
-        {                                                                     \
-            construct##memberFunction##argNames##MemberFunctionTables();      \
-            memberFunction##argNames##MemberFunctionTablePtr_->insert         \
-            (                                                                 \
-                lookup,                                                       \
-                function                                                      \
-            );                                                                \
-        }                                                                     \
-                                                                              \
-        ~add##memberFunction##argNames##GlobalMemberFunctionToTable()         \
-        {                                                                     \
-            destroy##memberFunction##argNames##MemberFunctionTables();        \
-        }                                                                     \
-    }
-
-
-// internal use:
-// constructor/destructor aid
-#define defineGlobalFunctionSelectionTableConstructDestruct\
-(memberFunction,argNames)                                                     \
-                                                                              \
-    /* Table constructor called from the table add function */                \
-    void construct##memberFunction##argNames##MemberFunctionTables()          \
-    {                                                                         \
-        static bool constructed = false;                                      \
-        if (!constructed)                                                     \
-        {                                                                     \
-            constructed = true;                                               \
-            memberFunction##argNames##MemberFunctionTablePtr_                 \
-                = new memberFunction##argNames##MemberFunctionTable;          \
-        }                                                                     \
-    }                                                                         \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void destroy##memberFunction##argNames##MemberFunctionTables()            \
-    {                                                                         \
-        if (memberFunction##argNames##MemberFunctionTablePtr_)                \
-        {                                                                     \
-            delete memberFunction##argNames##MemberFunctionTablePtr_;         \
-            memberFunction##argNames##MemberFunctionTablePtr_ = NULL;         \
-        }                                                                     \
-    }
-
-
-// internal use:
-// create pointer to hash-table of functions
-#define defineGlobalFunctionSelectionTablePtr\
-(memberFunction,argNames)                                                     \
-                                                                              \
-    /* Define the memberFunction table */                                     \
-    memberFunction##argNames##MemberFunctionTable*                            \
-        memberFunction##argNames##MemberFunctionTablePtr_ = NULL
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table
-#define defineGlobalFunctionSelectionTable\
-(memberFunction,argNames)                                                     \
-                                                                              \
-    defineGlobalFunctionSelectionTablePtr                                     \
-        (memberFunction,argNames);                                            \
-    defineGlobalFunctionSelectionTableConstructDestruct                       \
-        (memberFunction,argNames)
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/db/runTimeSelection/memberFunctions/addToMemberFunctionSelectionTable.H b/src/OpenFOAM/db/runTimeSelection/memberFunctions/addToMemberFunctionSelectionTable.H
index e2c1eab272fe9140dbece9fee58a19a583580202..69aa8c46dcba78abf7f389cbbf3fddfa2c874169 100644
--- a/src/OpenFOAM/db/runTimeSelection/memberFunctions/addToMemberFunctionSelectionTable.H
+++ b/src/OpenFOAM/db/runTimeSelection/memberFunctions/addToMemberFunctionSelectionTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,21 +37,21 @@ Description
 
 // add to hash-table of functions with typename as the key
 #define addToMemberFunctionSelectionTable\
-(baseType,thisType,memberFunction,argNames)                                   \
-                                                                              \
-    /* Add the thisType memberFunction to the table */                        \
-    baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType>  \
+(baseType,thisType,memberFunction,argNames)                                    \
+                                                                               \
+    /* Add the thisType memberFunction to the table */                         \
+    baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType>   \
     add##thisType##memberFunction##argNames##MemberFunctionTo##baseType##Table_
 
 
 
 // add to hash-table of functions with 'lookup' as the key
 #define addNamedToMemberFunctionSelectionTable\
-(baseType,thisType,memberFunction,argNames,lookup)                            \
-                                                                              \
-    /* Add the thisType memberFunction to the table, find by lookup name */   \
-    baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType>  \
-    add_##lookup##_##thisType##memberFunction##argNames##MemberFunctionTo##   \
+(baseType,thisType,memberFunction,argNames,lookup)                             \
+                                                                               \
+    /* Add the thisType memberFunction to the table, find by lookup name */    \
+    baseType::add##memberFunction##argNames##MemberFunctionToTable<thisType>   \
+    add_##lookup##_##thisType##memberFunction##argNames##MemberFunctionTo##    \
     baseType##Table_(#lookup)
 
 
@@ -61,44 +61,44 @@ Description
 // add to hash-table of functions with typename as the key
 // use when baseType doesn't need a template argument (eg, is a typedef)
 #define addTemplateToMemberFunctionSelectionTable\
-(baseType,thisType,Targ,memberFunction,argNames)                              \
-                                                                              \
-    /* Add the thisType memberFunction to the table */                        \
-    baseType::add##memberFunction##argNames##                                 \
-    MemberFunctionToTable<thisType<Targ> >                                    \
-    add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##         \
+(baseType,thisType,Targ,memberFunction,argNames)                               \
+                                                                               \
+    /* Add the thisType memberFunction to the table */                         \
+    baseType::add##memberFunction##argNames##                                  \
+    MemberFunctionToTable<thisType<Targ>>                                      \
+    add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##          \
     baseType##Table_
 
 
 // add to hash-table of functions with 'lookup' as the key
 // use when baseType doesn't need a template argument (eg, is a typedef)
 #define addNamedTemplateToMemberFunctionSelectionTable\
-(baseType,thisType,Targ,memberFunction,argNames,lookup)                       \
-                                                                              \
-    /* Add the thisType memberFunction to the table, find by lookup name */   \
-    baseType::add##memberFunction##argNames##                                 \
-    MemberFunctionToTable<thisType<Targ> >                                    \
-    add_##lookup##_##thisType##Targ##memberFunction##argNames##               \
+(baseType,thisType,Targ,memberFunction,argNames,lookup)                        \
+                                                                               \
+    /* Add the thisType memberFunction to the table, find by lookup name */    \
+    baseType::add##memberFunction##argNames##                                  \
+    MemberFunctionToTable<thisType<Targ>>                                      \
+    add_##lookup##_##thisType##Targ##memberFunction##argNames##                \
     MemberFunctionTo##baseType##Table_(#lookup)
 
 // use when baseType requires the Targ template argument as well
 #define addTemplatedToMemberFunctionSelectionTable\
-(baseType,thisType,Targ,memberFunction,argNames)                              \
-                                                                              \
-    /* Add the thisType memberFunction to the table */                        \
-    baseType<Targ>::add##memberFunction##argNames##                           \
-    MemberFunctionToTable<thisType<Targ> >                                    \
-    add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##         \
+(baseType,thisType,Targ,memberFunction,argNames)                               \
+                                                                               \
+    /* Add the thisType memberFunction to the table */                         \
+    baseType<Targ>::add##memberFunction##argNames##                            \
+    MemberFunctionToTable<thisType<Targ>>                                      \
+    add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##          \
     baseType##Targ##Table_
 
 // use when baseType requires the Targ template argument as well
 #define addNamedTemplatedToMemberFunctionSelectionTable\
-(baseType,thisType,Targ,memberFunction,argNames,lookup)                       \
-                                                                              \
-    /* Add the thisType memberFunction to the table, find by lookup name */   \
-    baseType<Targ>::add##memberFunction##argNames##                           \
-    MemberFunctionToTable<thisType<Targ> >                                    \
-    add_##lookup##_##thisType##Targ##memberFunction##argNames##               \
+(baseType,thisType,Targ,memberFunction,argNames,lookup)                        \
+                                                                               \
+    /* Add the thisType memberFunction to the table, find by lookup name */    \
+    baseType<Targ>::add##memberFunction##argNames##                            \
+    MemberFunctionToTable<thisType<Targ>>                                      \
+    add_##lookup##_##thisType##Targ##memberFunction##argNames##                \
     MemberFunctionTo##baseType##Targ##Table_(#lookup)
 
 
@@ -108,24 +108,24 @@ Description
 // add to hash-table of functions with typename as the key
 // use when baseType requires the Targ template argument as well
 #define addTemplatedToMemberFunctionSelectionTable\
-(baseType,thisType,Targ,memberFunction,argNames)                              \
-                                                                              \
-    /* Add the thisType memberFunction to the table */                        \
-    baseType<Targ>::add##memberFunction##argNames##                           \
-    MemberFunctionToTable<thisType<Targ> >                                    \
-    add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##         \
+(baseType,thisType,Targ,memberFunction,argNames)                               \
+                                                                               \
+    /* Add the thisType memberFunction to the table */                         \
+    baseType<Targ>::add##memberFunction##argNames##                            \
+    MemberFunctionToTable<thisType<Targ>>                                      \
+    add##thisType##Targ##memberFunction##argNames##MemberFunctionTo##          \
     baseType##Targ##Table_
 
 
 // add to hash-table of functions with 'lookup' as the key
 // use when baseType requires the Targ template argument as well
 #define addNamedTemplatedToMemberFunctionSelectionTable\
-(baseType,thisType,Targ,memberFunction,argNames,lookup)                       \
-                                                                              \
-    /* Add the thisType memberFunction to the table, find by lookup name */   \
-    baseType<Targ>::add##memberFunction##argNames##                           \
-    MemberFunctionToTable<thisType<Targ> >                                    \
-    add_##lookup##_##thisType##Targ##memberFunction##argNames##               \
+(baseType,thisType,Targ,memberFunction,argNames,lookup)                        \
+                                                                               \
+    /* Add the thisType memberFunction to the table, find by lookup name */    \
+    baseType<Targ>::add##memberFunction##argNames##                            \
+    MemberFunctionToTable<thisType<Targ>>                                      \
+    add_##lookup##_##thisType##Targ##memberFunction##argNames##                \
     MemberFunctionTo##baseType##Targ##Table_(#lookup)
 
 
diff --git a/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H
index 44ac58773e5866b7c78aa64aaf89e0f00d36b324..ebf1d79b6b7d0562e28481cc8dde3a15811aa71c 100644
--- a/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H
+++ b/src/OpenFOAM/db/runTimeSelection/memberFunctions/memberFunctionSelectionTables.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,216 +38,190 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
-// external use:
-// ~~~~~~~~~~~~~
-// declare a run-time selection:
-#define declareMemberFunctionSelectionTable\
-(returnType,baseType,memberFunction,argNames,argList,parList)                 \
-                                                                              \
-    /* Construct from argList function pointer type */                        \
-    typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
-                                                                              \
-    /* Construct from argList function table type */                          \
-    typedef HashTable                                                         \
-        <memberFunction##argNames##MemberFunctionPtr, word, string::hash>     \
-        memberFunction##argNames##MemberFunctionTable;                        \
-                                                                              \
-    /* Construct from argList function pointer table pointer */               \
-    static memberFunction##argNames##MemberFunctionTable*                     \
-        memberFunction##argNames##MemberFunctionTablePtr_;                    \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    template<class baseType##Type>                                            \
-    class add##memberFunction##argNames##MemberFunctionToTable                \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        add##memberFunction##argNames##MemberFunctionToTable                  \
-        (                                                                     \
-            const word& lookup = baseType##Type::typeName                     \
-        )                                                                     \
-        {                                                                     \
-            construct##memberFunction##argNames##MemberFunctionTables();      \
-            memberFunction##argNames##MemberFunctionTablePtr_->insert         \
-            (                                                                 \
-                lookup,                                                       \
-                baseType##Type::memberFunction                                \
-            );                                                                \
-        }                                                                     \
-                                                                              \
-        ~add##memberFunction##argNames##MemberFunctionToTable()               \
-        {                                                                     \
-            destroy##memberFunction##argNames##MemberFunctionTables();        \
-        }                                                                     \
-    };                                                                        \
-                                                                              \
-    /* Table memberFunction called from the table add function */             \
-    static void construct##memberFunction##argNames##MemberFunctionTables();  \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
+//- Declare a run-time selection:
+#define declareMemberFunctionSelectionTable(                                   \
+    returnType,baseType,memberFunction,argNames,argList,parList)               \
+                                                                               \
+    /* Construct from argList function pointer type */                         \
+    typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList;  \
+                                                                               \
+    /* Construct from argList function table type */                           \
+    typedef HashTable                                                          \
+        <memberFunction##argNames##MemberFunctionPtr, word, string::hash>      \
+        memberFunction##argNames##MemberFunctionTable;                         \
+                                                                               \
+    /* Construct from argList function pointer table pointer */                \
+    static memberFunction##argNames##MemberFunctionTable*                      \
+        memberFunction##argNames##MemberFunctionTablePtr_;                     \
+                                                                               \
+    /* Class to add constructor from argList to table */                       \
+    template<class baseType##Type>                                             \
+    class add##memberFunction##argNames##MemberFunctionToTable                 \
+    {                                                                          \
+    public:                                                                    \
+                                                                               \
+        add##memberFunction##argNames##MemberFunctionToTable                   \
+        (                                                                      \
+            const word& lookup = baseType##Type::typeName                      \
+        )                                                                      \
+        {                                                                      \
+            construct##memberFunction##argNames##MemberFunctionTables();       \
+            memberFunction##argNames##MemberFunctionTablePtr_->insert          \
+            (                                                                  \
+                lookup,                                                        \
+                baseType##Type::memberFunction                                 \
+            );                                                                 \
+        }                                                                      \
+                                                                               \
+        ~add##memberFunction##argNames##MemberFunctionToTable()                \
+        {                                                                      \
+            destroy##memberFunction##argNames##MemberFunctionTables();         \
+        }                                                                      \
+    };                                                                         \
+                                                                               \
+    /* Table memberFunction called from the table add function */              \
+    static void construct##memberFunction##argNames##MemberFunctionTables();   \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
     static void destroy##memberFunction##argNames##MemberFunctionTables()
 
 
-// internal use:
-// constructor aid
-#define defineMemberFunctionSelectionTableMemberFunction\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    /* Table memberFunction called from the table add function */             \
-    void baseType::construct##memberFunction##argNames##MemberFunctionTables()\
-    {                                                                         \
-        static bool constructed = false;                                      \
-        if (!constructed)                                                     \
-        {                                                                     \
-            constructed = true;                                               \
-            baseType::memberFunction##argNames##MemberFunctionTablePtr_       \
-                = new baseType::memberFunction##argNames##MemberFunctionTable;\
-        }                                                                     \
+// Constructor aid
+#define defineMemberFunctionSelectionTableMemberFunction(                      \
+    baseType,memberFunction,argNames)                                          \
+                                                                               \
+    /* Table memberFunction called from the table add function */              \
+    void baseType::construct##memberFunction##argNames##MemberFunctionTables() \
+    {                                                                          \
+        static bool constructed = false;                                       \
+        if (!constructed)                                                      \
+        {                                                                      \
+            constructed = true;                                                \
+            baseType::memberFunction##argNames##MemberFunctionTablePtr_        \
+                = new baseType::memberFunction##argNames##MemberFunctionTable; \
+        }                                                                      \
     }
 
 
-// internal use:
-// destructor aid
-#define defineMemberFunctionSelectionTableDestructor\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void baseType::destroy##memberFunction##argNames##MemberFunctionTables()  \
-    {                                                                         \
-        if (baseType::memberFunction##argNames##MemberFunctionTablePtr_)      \
-        {                                                                     \
+// Destructor aid
+#define defineMemberFunctionSelectionTableDestructor(                          \
+    baseType,memberFunction,argNames)                                          \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
+    void baseType::destroy##memberFunction##argNames##MemberFunctionTables()   \
+    {                                                                          \
+        if (baseType::memberFunction##argNames##MemberFunctionTablePtr_)       \
+        {                                                                      \
             delete baseType::memberFunction##argNames##MemberFunctionTablePtr_;\
             baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL;\
-        }                                                                     \
+        }                                                                      \
     }
 
 
-// internal use:
-// create pointer to hash-table of functions
-#define defineMemberFunctionSelectionTablePtr\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    /* Define the memberFunction table */                                     \
-    baseType::memberFunction##argNames##MemberFunctionTable*                  \
+// Create pointer to hash-table of functions
+#define defineMemberFunctionSelectionTablePtr(baseType,memberFunction,argNames)\
+                                                                               \
+    /* Define the memberFunction table */                                      \
+    baseType::memberFunction##argNames##MemberFunctionTable*                   \
         baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
 
 
-// not much in use:
-#define defineTemplateMemberFunctionSelectionTablePtr\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    /* Define the memberFunction table */                                     \
-    typename baseType::memberFunction##argNames##MemberFunctionTable*         \
-        baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
-
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table
-#define defineMemberFunctionSelectionTable\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    defineMemberFunctionSelectionTablePtr                                     \
-        (baseType,memberFunction,argNames);                                   \
-    defineMemberFunctionSelectionTableMemberFunction                          \
-        (baseType,memberFunction,argNames)                                    \
-    defineMemberFunctionSelectionTableDestructor                              \
+//- Define run-time selection table
+#define defineMemberFunctionSelectionTable(baseType,memberFunction,argNames)   \
+                                                                               \
+    defineMemberFunctionSelectionTablePtr                                      \
+        (baseType,memberFunction,argNames);                                    \
+    defineMemberFunctionSelectionTableMemberFunction                           \
+        (baseType,memberFunction,argNames)                                     \
+    defineMemberFunctionSelectionTableDestructor                               \
         (baseType,memberFunction,argNames)
 
 
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table for template classes
-// use when baseType doesn't need a template argument (eg, is a typedef)
-#define defineTemplateMemberFunctionSelectionTable\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    template<>                                                                \
-    defineMemberFunctionSelectionTablePtr                                     \
-        (baseType,memberFunction,argNames);                                   \
-    template<>                                                                \
-    defineMemberFunctionSelectionTableMemberFunction                          \
-        (baseType,memberFunction,argNames)                                    \
-    template<>                                                                \
-    defineMemberFunctionSelectionTableDestructor                              \
+//- Define run-time selection table for template classes
+//  use when baseType doesn't need a template argument (eg, is a typedef)
+#define defineTemplateMemberFunctionSelectionTable(                            \
+    baseType,memberFunction,argNames)                                          \
+                                                                               \
+    template<>                                                                 \
+    defineMemberFunctionSelectionTablePtr                                      \
+        (baseType,memberFunction,argNames);                                    \
+    template<>                                                                 \
+    defineMemberFunctionSelectionTableMemberFunction                           \
+        (baseType,memberFunction,argNames)                                     \
+    template<>                                                                 \
+    defineMemberFunctionSelectionTableDestructor                               \
         (baseType,memberFunction,argNames)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// internal use:
-// constructor aid
-// use when baseType requires the Targ template argument
-#define defineTemplatedMemberFunctionSelectionTableMemberFunction\
-(baseType,memberFunction,argNames,Targ)                                       \
-                                                                              \
-    /* Table memberFunction called from the table add function */             \
-    void baseType<Targ>::construct##memberFunction##argNames##                \
-    MemberFunctionTables()                                                    \
-    {                                                                         \
-        static bool constructed = false;                                      \
-        if (!constructed)                                                     \
-        {                                                                     \
-            constructed = true;                                               \
-            baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ \
-                = new baseType<Targ>::memberFunction##argNames##              \
-                  MemberFunctionTable;                                        \
-        }                                                                     \
+// Constructor aid: use when baseType requires the Targ template argument
+#define defineTemplatedMemberFunctionSelectionTableMemberFunction(             \
+    baseType,memberFunction,argNames,Targ)                                     \
+                                                                               \
+    /* Table memberFunction called from the table add function */              \
+    void baseType<Targ>::construct##memberFunction##argNames##                 \
+    MemberFunctionTables()                                                     \
+    {                                                                          \
+        static bool constructed = false;                                       \
+        if (!constructed)                                                      \
+        {                                                                      \
+            constructed = true;                                                \
+            baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_  \
+                = new baseType<Targ>::memberFunction##argNames##               \
+                  MemberFunctionTable;                                         \
+        }                                                                      \
     }
 
 
-// internal use:
-// destructor aid
+// Destructor aid
 // use when baseType requires the Targ template argument
-#define defineTemplatedMemberFunctionSelectionTableDestructor\
-(baseType,memberFunction,argNames,Targ)                                       \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void baseType<Targ>::destroy##memberFunction##argNames##                  \
-    MemberFunctionTables()                                                    \
-    {                                                                         \
-        if                                                                    \
-        (                                                                     \
-            baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ \
-        )                                                                     \
-        {                                                                     \
-            delete baseType<Targ>::memberFunction##argNames##                 \
-                MemberFunctionTablePtr_;                                      \
-            baseType<Targ>::memberFunction##argNames##                        \
-                MemberFunctionTablePtr_ = NULL;                               \
-        }                                                                     \
+#define defineTemplatedMemberFunctionSelectionTableDestructor(                 \
+    baseType,memberFunction,argNames,Targ)                                     \
+                                                                               \
+    /* Table destructor called from the table add function destructor */       \
+    void baseType<Targ>::destroy##memberFunction##argNames##                   \
+    MemberFunctionTables()                                                     \
+    {                                                                          \
+        if                                                                     \
+        (                                                                      \
+            baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_  \
+        )                                                                      \
+        {                                                                      \
+            delete baseType<Targ>::memberFunction##argNames##                  \
+                MemberFunctionTablePtr_;                                       \
+            baseType<Targ>::memberFunction##argNames##                         \
+                MemberFunctionTablePtr_ = NULL;                                \
+        }                                                                      \
     }
 
 
-// internal use:
-// create pointer to hash-table of functions
+// Create pointer to hash-table of functions
 // use when baseType requires the Targ template argument
-#define defineTemplatedMemberFunctionSelectionTablePtr\
-(baseType,memberFunction,argNames,Targ)                                       \
-                                                                              \
-    /* Define the memberFunction table */                                     \
-    baseType<Targ>::memberFunction##argNames##MemberFunctionTable*            \
+#define defineTemplatedMemberFunctionSelectionTablePtr(                        \
+    baseType,memberFunction,argNames,Targ)                                     \
+                                                                               \
+    /* Define the memberFunction table */                                      \
+    baseType<Targ>::memberFunction##argNames##MemberFunctionTable*             \
         baseType<Targ>::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
 
 
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table for template classes
-// use when baseType requires the Targ template argument
-#define defineTemplatedMemberFunctionSelectionTable\
-(baseType,memberFunction,argNames,Targ)                                       \
-                                                                              \
-    template<>                                                                \
-    defineTemplatedMemberFunctionSelectionTablePtr                            \
-        (baseType,memberFunction,argNames,Targ);                              \
-    template<>                                                                \
-    defineTemplatedMemberFunctionSelectionTableMemberFunction                 \
-        (baseType,memberFunction,argNames,Targ)                               \
-    template<>                                                                \
-    defineTemplatedMemberFunctionSelectionTableDestructor                     \
+//- Define run-time selection table for template classes
+//  use when baseType requires the Targ template argument
+#define defineTemplatedMemberFunctionSelectionTable(                           \
+    baseType,memberFunction,argNames,Targ)                                     \
+                                                                               \
+    template<>                                                                 \
+    defineTemplatedMemberFunctionSelectionTablePtr                             \
+        (baseType,memberFunction,argNames,Targ);                               \
+    template<>                                                                 \
+    defineTemplatedMemberFunctionSelectionTableMemberFunction                  \
+        (baseType,memberFunction,argNames,Targ)                                \
+    template<>                                                                 \
+    defineTemplatedMemberFunctionSelectionTableDestructor                      \
         (baseType,memberFunction,argNames,Targ)
 
 
diff --git a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H b/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H
deleted file mode 100644
index 7d30af8df985ebd374c932040efd5567203eccbd..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/addToStaticMemberFunctionSelectionTable.H
+++ /dev/null
@@ -1,53 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Global
-    Foam::addToStaticMemberFunctionSelectionTable
-
-Description
-    Macros for easy insertion into member function selection tables
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef addToStaticMemberFunctionSelectionTable_H
-#define addToStaticMemberFunctionSelectionTable_H
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-
-// add to hash-table of functions with 'lookup' as the key
-#define addNamedToStaticMemberFunctionSelectionTable\
-(baseType,thisType,memberFunction,argNames,lookup,functionPtr)                \
-                                                                              \
-    /* Add the thisType memberFunction to the table, find by lookup name */   \
-    baseType::add##memberFunction##argNames##                                 \
-    StaticMemberFunctionToTable<thisType>                                     \
-    add_##lookup##_##thisType##memberFunction##argNames##                     \
-    StaticMemberFunctionTo##baseType##Table_(#lookup, functionPtr)
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H b/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H
deleted file mode 100644
index 51de6fca43a20bd8c593d64320cd86145994f8f1..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/db/runTimeSelection/staticMemberFunctions/staticMemberFunctionSelectionTables.H
+++ /dev/null
@@ -1,145 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Global
-    Foam::staticMemberFunctionSelectionTables
-
-Description
-    Macros to enable the easy declaration of member function selection tables.
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef staticMemberFunctionSelectionTables_H
-#define staticMemberFunctionSelectionTables_H
-
-#include "memberFunctionSelectionTables.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// external use:
-// ~~~~~~~~~~~~~
-// declare a run-time selection:
-#define declareStaticMemberFunctionSelectionTable\
-(returnType,baseType,memberFunction,argNames,argList,parList)                 \
-                                                                              \
-    /* Construct from argList function pointer type */                        \
-    typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
-                                                                              \
-    /* Construct from argList function table type */                          \
-    typedef HashTable                                                         \
-        <memberFunction##argNames##MemberFunctionPtr, word, string::hash>     \
-        memberFunction##argNames##MemberFunctionTable;                        \
-                                                                              \
-    /* Construct from argList function pointer table pointer */               \
-    static memberFunction##argNames##MemberFunctionTable*                     \
-        memberFunction##argNames##MemberFunctionTablePtr_;                    \
-                                                                              \
-    /* Table memberFunction called from the table add function */             \
-    static void construct##memberFunction##argNames##MemberFunctionTables();  \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    static void destroy##memberFunction##argNames##MemberFunctionTables();    \
-                                                                              \
-    /* Class to add constructor from argList to table */                      \
-    template<class baseType##Type>                                            \
-    class add##memberFunction##argNames##StaticMemberFunctionToTable          \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        add##memberFunction##argNames##StaticMemberFunctionToTable            \
-        (                                                                     \
-            const word& lookup,                                               \
-            memberFunction##argNames##MemberFunctionPtr function              \
-        )                                                                     \
-        {                                                                     \
-            construct##memberFunction##argNames##MemberFunctionTables();      \
-            memberFunction##argNames##MemberFunctionTablePtr_->insert         \
-            (                                                                 \
-                lookup,                                                       \
-                function                                                      \
-            );                                                                \
-        }                                                                     \
-                                                                              \
-        ~add##memberFunction##argNames##StaticMemberFunctionToTable()         \
-        {                                                                     \
-            destroy##memberFunction##argNames##MemberFunctionTables();        \
-        }                                                                     \
-    }
-
-
-// internal use:
-// constructor/destructor aid
-#define defineStaticMemberFunctionSelectionTableConstructDestruct\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    /* Table constructor called from the table add function constructor */    \
-    void baseType::construct##memberFunction##argNames##MemberFunctionTables()\
-    {                                                                         \
-        static bool constructed = false;                                      \
-        if (!constructed)                                                     \
-        {                                                                     \
-            constructed = true;                                               \
-            baseType::memberFunction##argNames##MemberFunctionTablePtr_       \
-                = new baseType::memberFunction##argNames##MemberFunctionTable;\
-        }                                                                     \
-    };                                                                        \
-                                                                              \
-    /* Table destructor called from the table add function destructor */      \
-    void baseType::destroy##memberFunction##argNames##MemberFunctionTables()  \
-    {                                                                         \
-        if (baseType::memberFunction##argNames##MemberFunctionTablePtr_)      \
-        {                                                                     \
-            delete baseType::memberFunction##argNames##MemberFunctionTablePtr_;\
-            baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL;\
-        }                                                                     \
-    }
-
-
-// internal use:
-// create pointer to hash-table of functions
-#define defineStaticMemberFunctionSelectionTablePtr\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    /* Define the memberFunction table */                                     \
-    baseType::memberFunction##argNames##MemberFunctionTable*                  \
-        baseType::memberFunction##argNames##MemberFunctionTablePtr_ = NULL
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// external use:
-// ~~~~~~~~~~~~~
-// define run-time selection table
-#define defineStaticMemberFunctionSelectionTable\
-(baseType,memberFunction,argNames)                                            \
-                                                                              \
-    defineStaticMemberFunctionSelectionTablePtr                               \
-        (baseType,memberFunction,argNames);                                   \
-    defineStaticMemberFunctionSelectionTableConstructDestruct                 \
-        (baseType,memberFunction,argNames)                                    \
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/db/typeInfo/className.H b/src/OpenFOAM/db/typeInfo/className.H
index e70e3c85dd88647e180bcc37f8bb16ad61f0e39f..23813ecfcd7c64bd019530a61918d70028969e6d 100644
--- a/src/OpenFOAM/db/typeInfo/className.H
+++ b/src/OpenFOAM/db/typeInfo/className.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,125 +32,121 @@ Description
 #include "defineDebugSwitch.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// declarations (without debug information)
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Declarations (without debug information)
 
 //- Add typeName information from argument \a TypeNameString to a class.
 //  Without debug information
-#define ClassNameNoDebug(TypeNameString)                                      \
-    static const char* typeName_() { return TypeNameString; }                 \
+#define ClassNameNoDebug(TypeNameString)                                       \
+    static const char* typeName_() { return TypeNameString; }                  \
     static const ::Foam::word typeName
 
 //- Add typeName information from argument \a TypeNameString to a namespace.
 //  Without debug information.
-#define NamespaceNameNoDebug(TypeNameString)                                  \
-    inline const char* typeName_() { return TypeNameString; }                 \
+#define NamespaceNameNoDebug(TypeNameString)                                   \
+    inline const char* typeName_() { return TypeNameString; }                  \
     extern const ::Foam::word typeName
 
 //- Add typeName information from argument \a TemplateNameString to a
 //  template class.  Without debug information.
-#define TemplateNameNoDebug(TemplateNameString)                               \
-class TemplateNameString##Name                                                \
-{                                                                             \
-public:                                                                       \
-    TemplateNameString##Name() {}                                             \
-    ClassNameNoDebug(#TemplateNameString);                                    \
+#define TemplateNameNoDebug(TemplateNameString)                                \
+class TemplateNameString##Name                                                 \
+{                                                                              \
+public:                                                                        \
+    TemplateNameString##Name() {}                                              \
+    ClassNameNoDebug(#TemplateNameString);                                     \
 }
 
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// declarations (with debug information)
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// Declarations (with debug information)
 
 //- Add typeName information from argument \a TypeNameString to a class.
 //  Also declares debug information.
-#define ClassName(TypeNameString)                                             \
-    ClassNameNoDebug(TypeNameString);                                         \
+#define ClassName(TypeNameString)                                              \
+    ClassNameNoDebug(TypeNameString);                                          \
     static int debug
 
 //- Add typeName information from argument \a TypeNameString to a namespace.
 //  Also declares debug information.
-#define NamespaceName(TypeNameString)                                         \
-    NamespaceNameNoDebug(TypeNameString);                                     \
+#define NamespaceName(TypeNameString)                                          \
+    NamespaceNameNoDebug(TypeNameString);                                      \
     extern int debug
 
 //- Add typeName information from argument \a TypeNameString to a
 //  template class.  Also declares debug information.
-#define TemplateName(TemplateNameString)                                      \
-class TemplateNameString##Name                                                \
-{                                                                             \
-public:                                                                       \
-    TemplateNameString##Name() {}                                             \
-    ClassName(#TemplateNameString);                                           \
+#define TemplateName(TemplateNameString)                                       \
+class TemplateNameString##Name                                                 \
+{                                                                              \
+public:                                                                        \
+    TemplateNameString##Name() {}                                              \
+    ClassName(#TemplateNameString);                                            \
 }
 
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// definitions (without debug information)
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// Definitions (without debug information)
 
 //- Define the typeName, with alternative lookup as \a Name
-#define defineTypeNameWithName(Type, Name)                                    \
+#define defineTypeNameWithName(Type, Name)                                     \
     const ::Foam::word Type::typeName(Name)
 
 //- Define the typeName
-#define defineTypeName(Type)                                                  \
+#define defineTypeName(Type)                                                   \
     defineTypeNameWithName(Type, Type::typeName_())
 
 //- Define the typeName as \a Name for template classes
-# define defineTemplateTypeNameWithName(Type, Name)                           \
-    template<>                                                                \
+#define defineTemplateTypeNameWithName(Type, Name)                             \
+    template<>                                                                 \
     defineTypeNameWithName(Type, Name)
 //- Define the typeName as \a Name for template sub-classes
-# define defineTemplate2TypeNameWithName(Type, Name)                          \
-    template<>                                                                \
+#define defineTemplate2TypeNameWithName(Type, Name)                            \
+    template<>                                                                 \
     defineTypeNameWithName(Type, Name)
 
 //- Define the typeName for template classes, useful with typedefs
-#define defineTemplateTypeName(Type)                                          \
+#define defineTemplateTypeName(Type)                                           \
     defineTemplateTypeNameWithName(Type, #Type)
 
 //- Define the typeName directly for template classes
-#define defineNamedTemplateTypeName(Type)                                     \
+#define defineNamedTemplateTypeName(Type)                                      \
     defineTemplateTypeNameWithName(Type, Type::typeName_())
 
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// definitions (with debug information)
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// Definitions (with debug information)
 
 //- Define the typeName and debug information
-#define defineTypeNameAndDebug(Type, DebugSwitch)                             \
-    defineTypeName(Type);                                                     \
+#define defineTypeNameAndDebug(Type, DebugSwitch)                              \
+    defineTypeName(Type);                                                      \
     defineDebugSwitch(Type, DebugSwitch)
 
 //- Define the typeName and debug information, lookup as \a Name
-#define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch)       \
-    defineTemplateTypeNameWithName(Type, Name);                               \
+#define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch)        \
+    defineTemplateTypeNameWithName(Type, Name);                                \
     defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)
 
 //- Define the typeName and debug information for templates, useful
 //  with typedefs
-#define defineTemplateTypeNameAndDebug(Type, DebugSwitch)                     \
+#define defineTemplateTypeNameAndDebug(Type, DebugSwitch)                      \
     defineTemplateTypeNameAndDebugWithName(Type, #Type, DebugSwitch)
 
 //- Define the typeName and debug information for templates
-#define defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch)                \
-    defineNamedTemplateTypeName(Type);                                        \
+#define defineNamedTemplateTypeNameAndDebug(Type, DebugSwitch)                 \
+    defineNamedTemplateTypeName(Type);                                         \
     defineNamedTemplateDebugSwitch(Type, DebugSwitch)
 
-// for templated sub-classes
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// For templated sub-classes
 
 //- Define the typeName and debug information, lookup as \a Name
-#define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch)      \
-    defineTemplate2TypeNameWithName(Type, Name);                              \
+#define defineTemplate2TypeNameAndDebugWithName(Type, Name, DebugSwitch)       \
+    defineTemplate2TypeNameWithName(Type, Name);                               \
     defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch)
 
 //- Define the typeName and debug information for templates, useful
 //  with typedefs
-#define defineTemplate2TypeNameAndDebug(Type, DebugSwitch)                    \
+#define defineTemplate2TypeNameAndDebug(Type, DebugSwitch)                     \
     defineTemplate2TypeNameAndDebugWithName(Type, #Type, DebugSwitch)
 
 
diff --git a/src/OpenFOAM/db/typeInfo/typeInfo.H b/src/OpenFOAM/db/typeInfo/typeInfo.H
index bd437b4d7998460e1610275cfe3e0a62320a5980..c4379036c2ac8eedcad46e5ef1e428bd91b75d2f 100644
--- a/src/OpenFOAM/db/typeInfo/typeInfo.H
+++ b/src/OpenFOAM/db/typeInfo/typeInfo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,13 +62,13 @@ Description
 // declarations (for use in header files)
 
 //- Declare a ClassNameNoDebug() with extra virtual type info
-#define TypeNameNoDebug(TypeNameString)                                       \
-    ClassNameNoDebug(TypeNameString);                                         \
+#define TypeNameNoDebug(TypeNameString)                                        \
+    ClassNameNoDebug(TypeNameString);                                          \
     virtual const word& type() const { return typeName; }
 
 //- Declare a ClassName() with extra virtual type info
-#define TypeName(TypeNameString)                                              \
-    ClassName(TypeNameString);                                                \
+#define TypeName(TypeNameString)                                               \
+    ClassName(TypeNameString);                                                 \
     virtual const word& type() const { return typeName; }
 
 
diff --git a/src/OpenFOAM/dimensionSet/dimensionSets.C b/src/OpenFOAM/dimensionSet/dimensionSets.C
index a2ad4482dd6418979b7c27697f2997682af50d21..85ccde69470b1df5279441a7ba7f95eb65a7092f 100644
--- a/src/OpenFOAM/dimensionSet/dimensionSets.C
+++ b/src/OpenFOAM/dimensionSet/dimensionSets.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,16 +35,16 @@ namespace Foam
 
 /* * * * * * * * * * * * * * * Static Member Data  * * * * * * * * * * * * * */
 
-//- Since dimensionSystems() can be reread we actually store a copy of
-//  the controlDict subDict (v.s. a reference to the subDict for e.g.
-//  dimensionedConstants)
+// Since dimensionSystems() can be reread we actually store a copy of
+// the controlDict subDict (v.s. a reference to the subDict for e.g.
+// dimensionedConstants)
 dictionary* dimensionSystemsPtr_(NULL);
 HashTable<dimensionedScalar>* unitSetPtr_(NULL);
 dimensionSets* writeUnitSetPtr_(NULL);
 
-//- Helper class to
-//  - register re-reader
-//  - deallocate demand-driven data
+// Helper class to
+//   register re-reader
+//   deallocate demand-driven data
 class addDimensionSetsToDebug
 :
     public ::Foam::simpleRegIOobject
@@ -234,17 +234,17 @@ Foam::dimensionSets::dimensionSets
         valid_ = true;
 
         // Determine conversion from basic units to write units
-        for (label rowI = 0; rowI < conversion_.n(); rowI++)
+        for (label rowI = 0; rowI < conversion_.m(); rowI++)
         {
             scalar* row = conversion_[rowI];
 
-            for (label columnI = 0; columnI < conversion_.m(); columnI++)
+            for (label columnI = 0; columnI < conversion_.n(); columnI++)
             {
                 const dimensionedScalar& dSet = units_[columnI];
                 row[columnI] = dSet.dimensions()[rowI];
             }
         }
-        conversionPivots_.setSize(conversion_.n());
+        conversionPivots_.setSize(conversion_.m());
         LUDecompose(conversion_, conversionPivots_);
     }
 }
diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C
index 57d9e6c450b9ad86a649f1a879bd81e1d1ae6ca9..a03d895bcf3c6198f6ff86294322bd6e2b09a63a 100644
--- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C
+++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -231,22 +231,22 @@ dimensionedScalar negPart(const dimensionedScalar& ds)
 }
 
 
-#define transFunc(func)                                                    \
-dimensionedScalar func(const dimensionedScalar& ds)                        \
-{                                                                          \
-    if (!ds.dimensions().dimensionless())                                  \
-    {                                                                      \
-        FatalErrorInFunction                                               \
-            << "ds not dimensionless"                                      \
-            << abort(FatalError);                                          \
-    }                                                                      \
-                                                                           \
-    return dimensionedScalar                                               \
-    (                                                                      \
-        #func "(" + ds.name() + ')',                                       \
-        dimless,                                                           \
-        ::func(ds.value())                                                 \
-    );                                                                     \
+#define transFunc(func)                                                        \
+dimensionedScalar func(const dimensionedScalar& ds)                            \
+{                                                                              \
+    if (!ds.dimensions().dimensionless())                                      \
+    {                                                                          \
+        FatalErrorInFunction                                                   \
+            << "ds not dimensionless"                                          \
+            << abort(FatalError);                                              \
+    }                                                                          \
+                                                                               \
+    return dimensionedScalar                                                   \
+    (                                                                          \
+        #func "(" + ds.name() + ')',                                           \
+        dimless,                                                               \
+        ::func(ds.value())                                                     \
+    );                                                                         \
 }
 
 transFunc(exp)
@@ -275,22 +275,22 @@ transFunc(y1)
 #undef transFunc
 
 
-#define transFunc(func)                                                    \
-dimensionedScalar func(const int n, const dimensionedScalar& ds)           \
-{                                                                          \
-    if (!ds.dimensions().dimensionless())                                  \
-    {                                                                      \
-        FatalErrorInFunction                                               \
-            << "ds not dimensionless"                                      \
-            << abort(FatalError);                                          \
-    }                                                                      \
-                                                                           \
-    return dimensionedScalar                                               \
-    (                                                                      \
-        #func "(" + name(n) + ',' + ds.name() + ')',                       \
-        dimless,                                                           \
-        ::func(n, ds.value())                                              \
-    );                                                                     \
+#define transFunc(func)                                                        \
+dimensionedScalar func(const int n, const dimensionedScalar& ds)               \
+{                                                                              \
+    if (!ds.dimensions().dimensionless())                                      \
+    {                                                                          \
+        FatalErrorInFunction                                                   \
+            << "ds not dimensionless"                                          \
+            << abort(FatalError);                                              \
+    }                                                                          \
+                                                                               \
+    return dimensionedScalar                                                   \
+    (                                                                          \
+        #func "(" + name(n) + ',' + ds.name() + ')',                           \
+        dimless,                                                               \
+        ::func(n, ds.value())                                                  \
+    );                                                                         \
 }
 
 transFunc(jn)
diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C
index 03ee76d7c98e97786ecbcb510ca83048be09cb2a..f5381ef91e05712331a226d15542f99f301508d8 100644
--- a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C
+++ b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -137,7 +137,7 @@ Foam::dimensioned<Type>::dimensioned
 :
     name_(name),
     dimensions_(dimSet),
-    value_(pTraits<Type>::zero)
+    value_(Zero)
 {
     initialize(is);
 }
@@ -153,7 +153,7 @@ Foam::dimensioned<Type>::dimensioned
 :
     name_(name),
     dimensions_(dimSet),
-    value_(pTraits<Type>::zero)
+    value_(Zero)
 {
     initialize(dict.lookup(name));
 }
@@ -165,7 +165,7 @@ Foam::dimensioned<Type>::dimensioned
 :
     name_("undefined"),
     dimensions_(dimless),
-    value_(pTraits<Type>::zero)
+    value_(Zero)
 {}
 
 
@@ -447,7 +447,7 @@ void Foam::dimensioned<Type>::operator/=
 
 // * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
 
-template<class Type, int r>
+template<class Type, Foam::direction r>
 Foam::dimensioned<typename Foam::powProduct<Type, r>::type>
 Foam::pow(const dimensioned<Type>& dt, typename powProduct<Type, r>::type)
 {
@@ -729,57 +729,54 @@ Foam::dimensioned<Type> Foam::operator/
 }
 
 
-// Products
-// ~~~~~~~~
-
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template<class Type1, class Type2>                                            \
-Foam::dimensioned<typename Foam::product<Type1, Type2>::type>                 \
-Foam::operator op                                                             \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    return dimensioned<typename product<Type1, Type2>::type>                  \
-    (                                                                         \
-        '(' + dt1.name() + #op + dt2.name() + ')',                            \
-        dt1.dimensions() op dt2.dimensions(),                                 \
-        dt1.value() op dt2.value()                                            \
-    );                                                                        \
-}                                                                             \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-Foam::dimensioned<typename Foam::product<Type, Form>::type>                   \
-Foam::operator op                                                             \
-(                                                                             \
-    const dimensioned<Type>& dt1,                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& t2                                    \
-)                                                                             \
-{                                                                             \
-    return dimensioned<typename product<Type, Form>::type>                    \
-    (                                                                         \
-        '(' + dt1.name() + #op + name(t2) + ')',                              \
-        dt1.dimensions(),                                                     \
-        dt1.value() op static_cast<const Form&>(t2)                           \
-    );                                                                        \
-}                                                                             \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-Foam::dimensioned<typename Foam::product<Form, Type>::type>                   \
-Foam::operator op                                                             \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& t1,                                   \
-    const dimensioned<Type>& dt2                                              \
-)                                                                             \
-{                                                                             \
-    return dimensioned<typename product<Form, Type>::type>                    \
-    (                                                                         \
-        '(' + name(t1) + #op + dt2.name() + ')',                              \
-        dt2.dimensions(),                                                     \
-        static_cast<const Form&>(t1) op dt2.value()                           \
-    );                                                                        \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template<class Type1, class Type2>                                             \
+Foam::dimensioned<typename Foam::product<Type1, Type2>::type>                  \
+Foam::operator op                                                              \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    return dimensioned<typename product<Type1, Type2>::type>                   \
+    (                                                                          \
+        '(' + dt1.name() + #op + dt2.name() + ')',                             \
+        dt1.dimensions() op dt2.dimensions(),                                  \
+        dt1.value() op dt2.value()                                             \
+    );                                                                         \
+}                                                                              \
+                                                                               \
+template<class Type, class Form, class Cmpt, Foam::direction nCmpt>            \
+Foam::dimensioned<typename Foam::product<Type, Form>::type>                    \
+Foam::operator op                                                              \
+(                                                                              \
+    const dimensioned<Type>& dt1,                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& t2                                     \
+)                                                                              \
+{                                                                              \
+    return dimensioned<typename product<Type, Form>::type>                     \
+    (                                                                          \
+        '(' + dt1.name() + #op + name(t2) + ')',                               \
+        dt1.dimensions(),                                                      \
+        dt1.value() op static_cast<const Form&>(t2)                            \
+    );                                                                         \
+}                                                                              \
+                                                                               \
+template<class Type, class Form, class Cmpt, Foam::direction nCmpt>            \
+Foam::dimensioned<typename Foam::product<Form, Type>::type>                    \
+Foam::operator op                                                              \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& t1,                                    \
+    const dimensioned<Type>& dt2                                               \
+)                                                                              \
+{                                                                              \
+    return dimensioned<typename product<Form, Type>::type>                     \
+    (                                                                          \
+        '(' + name(t1) + #op + dt2.name() + ')',                               \
+        dt2.dimensions(),                                                      \
+        static_cast<const Form&>(t1) op dt2.value()                            \
+    );                                                                         \
 }
 
 
diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H
index 40baca77f6ae2efee6a2f5e604d0aa99c8f3c67b..fe817e4afec8bbdf6a67bd6599be20fb06a8ed87 100644
--- a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H
+++ b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,7 +129,7 @@ public:
             const word&,
             const dictionary&,
             const dimensionSet& dims = dimless,
-            const Type& defaultValue = pTraits<Type>::zero
+            const Type& defaultValue = Type(Zero)
         );
 
         //- Construct from dictionary dimensionless with value.
@@ -137,7 +137,7 @@ public:
         (
             const word&,
             const dictionary&,
-            const Type& defaultValue = pTraits<Type>::zero
+            const Type& defaultValue = Type(Zero)
         );
 
         //- Construct from dictionary, with default value.
@@ -147,7 +147,7 @@ public:
             const word&,
             dictionary&,
             const dimensionSet& dims = dimless,
-            const Type& defaultValue = pTraits<Type>::zero
+            const Type& defaultValue = Type(Zero)
         );
 
         //- Construct from dictionary, dimensionless with default value.
@@ -156,7 +156,7 @@ public:
         (
             const word&,
             dictionary&,
-            const Type& defaultValue = pTraits<Type>::zero
+            const Type& defaultValue = Type(Zero)
         );
 
 
@@ -231,7 +231,7 @@ public:
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
-template<class Type, int r>
+template<class Type, direction r>
 dimensioned<typename powProduct<Type, r>::type>
 pow
 (
@@ -300,29 +300,26 @@ dimensioned<Type> operator/
 );
 
 
-// Products
-// ~~~~~~~~
-
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template<class Type1, class Type2>                                            \
-dimensioned<typename product<Type1, Type2>::type>                             \
-operator op(const dimensioned<Type1>&, const dimensioned<Type2>&);            \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-dimensioned<typename product<Type, Form>::type>                               \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Type>&,                                                 \
-    const VectorSpace<Form,Cmpt,nCmpt>&                                       \
-);                                                                            \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-dimensioned<typename product<Form, Type>::type>                               \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>&,                                      \
-    const dimensioned<Type>&                                                  \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template<class Type1, class Type2>                                             \
+dimensioned<typename product<Type1, Type2>::type>                              \
+operator op(const dimensioned<Type1>&, const dimensioned<Type2>&);             \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+dimensioned<typename product<Type, Form>::type>                                \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Type>&,                                                  \
+    const VectorSpace<Form,Cmpt,nCmpt>&                                        \
+);                                                                             \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+dimensioned<typename product<Form, Type>::type>                                \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>&,                                       \
+    const dimensioned<Type>&                                                   \
 );
 
 PRODUCT_OPERATOR(outerProduct, *, outer)
@@ -340,7 +337,7 @@ PRODUCT_OPERATOR(scalarProduct, &&, dotdot)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dimensionedType.C"
+    #include "dimensionedType.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C
index 354805a77fa47366d768e7f080c880424779899a..3a2fd8da74038628673dffebc8b022df15b9c5c3 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -131,11 +131,11 @@ template<class Type, class GeoMesh>
 DimensionedField<Type, GeoMesh>::DimensionedField
 (
     DimensionedField<Type, GeoMesh>& df,
-    bool reUse
+    bool reuse
 )
 :
-    regIOobject(df, reUse),
-    Field<Type>(df, reUse),
+    regIOobject(df, reuse),
+    Field<Type>(df, reuse),
     mesh_(df.mesh_),
     dimensions_(df.dimensions_)
 {}
@@ -144,7 +144,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
 template<class Type, class GeoMesh>
 DimensionedField<Type, GeoMesh>::DimensionedField
 (
-    const Xfer<DimensionedField<Type, GeoMesh> >& df
+    const Xfer<DimensionedField<Type, GeoMesh>>& df
 )
 :
     regIOobject(df(), true),
@@ -158,7 +158,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField
 template<class Type, class GeoMesh>
 DimensionedField<Type, GeoMesh>::DimensionedField
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 )
 :
     regIOobject(tdf(), tdf.isTmp()),
@@ -194,11 +194,11 @@ DimensionedField<Type, GeoMesh>::DimensionedField
 (
     const IOobject& io,
     DimensionedField<Type, GeoMesh>& df,
-    bool reUse
+    bool reuse
 )
 :
     regIOobject(io, df),
-    Field<Type>(df, reUse),
+    Field<Type>(df, reuse),
     mesh_(df.mesh_),
     dimensions_(df.dimensions_)
 {}
@@ -223,11 +223,11 @@ DimensionedField<Type, GeoMesh>::DimensionedField
 (
     const word& newName,
     DimensionedField<Type, GeoMesh>& df,
-    bool reUse
+    bool reuse
 )
 :
     regIOobject(newName, df, true),
-    Field<Type>(df, reUse),
+    Field<Type>(df, reuse),
     mesh_(df.mesh_),
     dimensions_(df.dimensions_)
 {}
@@ -237,7 +237,7 @@ template<class Type, class GeoMesh>
 DimensionedField<Type, GeoMesh>::DimensionedField
 (
     const word& newName,
-    const Xfer<DimensionedField<Type, GeoMesh> >& df
+    const Xfer<DimensionedField<Type, GeoMesh>>& df
 )
 :
     regIOobject(newName, df, true),
@@ -252,7 +252,7 @@ template<class Type, class GeoMesh>
 DimensionedField<Type, GeoMesh>::DimensionedField
 (
     const word& newName,
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 )
 :
     regIOobject(newName, tdf(), true),
@@ -270,10 +270,10 @@ DimensionedField<Type, GeoMesh>::DimensionedField
 
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<Type, GeoMesh> >
+tmp<DimensionedField<Type, GeoMesh>>
 DimensionedField<Type, GeoMesh>::clone() const
 {
-    return tmp<DimensionedField<Type, GeoMesh> >
+    return tmp<DimensionedField<Type, GeoMesh>>
     (
         new DimensionedField<Type, GeoMesh>(*this)
     );
@@ -300,7 +300,7 @@ DimensionedField<Type, GeoMesh>::component
     const direction d
 ) const
 {
-    tmp<DimensionedField<cmptType, GeoMesh> > result
+    tmp<DimensionedField<cmptType, GeoMesh>> result
     (
         new DimensionedField<cmptType, GeoMesh>
         (
@@ -350,10 +350,10 @@ void DimensionedField<Type, GeoMesh>::replace
 
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<Type, GeoMesh> >
+tmp<DimensionedField<Type, GeoMesh>>
 DimensionedField<Type, GeoMesh>::T() const
 {
-    tmp<DimensionedField<Type, GeoMesh> > result
+    tmp<DimensionedField<Type, GeoMesh>> result
     (
         new DimensionedField<Type, GeoMesh>
         (
@@ -409,7 +409,7 @@ dimensioned<Type> DimensionedField<Type, GeoMesh>::weightedAverage
 template<class Type, class GeoMesh>
 dimensioned<Type> DimensionedField<Type, GeoMesh>::weightedAverage
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tweightField
+    const tmp<DimensionedField<scalar, GeoMesh>>& tweightField
 ) const
 {
     dimensioned<Type> wa = weightedAverage(tweightField());
@@ -444,7 +444,7 @@ void DimensionedField<Type, GeoMesh>::operator=
 template<class Type, class GeoMesh>
 void DimensionedField<Type, GeoMesh>::operator=
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 )
 {
     const DimensionedField<Type, GeoMesh>& df = tdf();
@@ -476,38 +476,38 @@ void DimensionedField<Type, GeoMesh>::operator=
 }
 
 
-#define COMPUTED_ASSIGNMENT(TYPE, op)                                         \
-                                                                              \
-template<class Type, class GeoMesh>                                           \
-void DimensionedField<Type, GeoMesh>::operator op                             \
-(                                                                             \
-    const DimensionedField<TYPE, GeoMesh>& df                                 \
-)                                                                             \
-{                                                                             \
-    checkField(*this, df, #op);                                               \
-                                                                              \
-    dimensions_ op df.dimensions();                                           \
-    Field<Type>::operator op(df);                                             \
-}                                                                             \
-                                                                              \
-template<class Type, class GeoMesh>                                           \
-void DimensionedField<Type, GeoMesh>::operator op                             \
-(                                                                             \
-    const tmp<DimensionedField<TYPE, GeoMesh> >& tdf                          \
-)                                                                             \
-{                                                                             \
-    operator op(tdf());                                                       \
-    tdf.clear();                                                              \
-}                                                                             \
-                                                                              \
-template<class Type, class GeoMesh>                                           \
-void DimensionedField<Type, GeoMesh>::operator op                             \
-(                                                                             \
-    const dimensioned<TYPE>& dt                                               \
-)                                                                             \
-{                                                                             \
-    dimensions_ op dt.dimensions();                                           \
-    Field<Type>::operator op(dt.value());                                     \
+#define COMPUTED_ASSIGNMENT(TYPE, op)                                          \
+                                                                               \
+template<class Type, class GeoMesh>                                            \
+void DimensionedField<Type, GeoMesh>::operator op                              \
+(                                                                              \
+    const DimensionedField<TYPE, GeoMesh>& df                                  \
+)                                                                              \
+{                                                                              \
+    checkField(*this, df, #op);                                                \
+                                                                               \
+    dimensions_ op df.dimensions();                                            \
+    Field<Type>::operator op(df);                                              \
+}                                                                              \
+                                                                               \
+template<class Type, class GeoMesh>                                            \
+void DimensionedField<Type, GeoMesh>::operator op                              \
+(                                                                              \
+    const tmp<DimensionedField<TYPE, GeoMesh>>& tdf                            \
+)                                                                              \
+{                                                                              \
+    operator op(tdf());                                                        \
+    tdf.clear();                                                               \
+}                                                                              \
+                                                                               \
+template<class Type, class GeoMesh>                                            \
+void DimensionedField<Type, GeoMesh>::operator op                              \
+(                                                                              \
+    const dimensioned<TYPE>& dt                                                \
+)                                                                              \
+{                                                                              \
+    dimensions_ op dt.dimensions();                                            \
+    Field<Type>::operator op(dt.value());                                      \
 }
 
 COMPUTED_ASSIGNMENT(Type, +=)
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H
index 6b86f17c4617a03e8db887093ca816f9449603f8..febff7c337eb0f03521b3d92583982c34639e104 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ template<class Type, class GeoMesh> Ostream& operator<<
 template<class Type, class GeoMesh> Ostream& operator<<
 (
     Ostream&,
-    const tmp<DimensionedField<Type, GeoMesh> >&
+    const tmp<DimensionedField<Type, GeoMesh>>&
 );
 
 
@@ -168,20 +168,20 @@ public:
         DimensionedField
         (
             DimensionedField<Type, GeoMesh>&,
-            bool reUse
+            bool reuse
         );
 
         //- Construct by transferring the DimensionedField
         DimensionedField
         (
-            const Xfer<DimensionedField<Type, GeoMesh> >&
+            const Xfer<DimensionedField<Type, GeoMesh>>&
         );
 
         //- Construct as copy of tmp<DimensionedField> deleting argument
         #ifndef NoConstructFromTmp
         DimensionedField
         (
-            const tmp<DimensionedField<Type, GeoMesh> >&
+            const tmp<DimensionedField<Type, GeoMesh>>&
         );
         #endif
 
@@ -197,7 +197,7 @@ public:
         (
             const IOobject&,
             DimensionedField<Type, GeoMesh>&,
-            bool reUse
+            bool reuse
         );
 
         //- Construct as copy resetting name
@@ -212,14 +212,14 @@ public:
         (
             const word& newName,
             DimensionedField<Type, GeoMesh>&,
-            bool reUse
+            bool reuse
         );
 
         //- Construct by transferring the DimensionedField with a new name
         DimensionedField
         (
             const word& newName,
-            const Xfer<DimensionedField<Type, GeoMesh> >&
+            const Xfer<DimensionedField<Type, GeoMesh>>&
         );
 
         //- Construct as copy resetting name
@@ -227,12 +227,12 @@ public:
         DimensionedField
         (
             const word& newName,
-            const tmp<DimensionedField<Type, GeoMesh> >&
+            const tmp<DimensionedField<Type, GeoMesh>>&
         );
         #endif
 
         //- Clone
-        tmp<DimensionedField<Type, GeoMesh> > clone() const;
+        tmp<DimensionedField<Type, GeoMesh>> clone() const;
 
 
     //- Destructor
@@ -261,7 +261,7 @@ public:
         inline Field<Type>& field();
 
         //- Return a component field of the field
-        tmp<DimensionedField<cmptType, GeoMesh> > component
+        tmp<DimensionedField<cmptType, GeoMesh>> component
         (
             const direction
         ) const;
@@ -277,11 +277,11 @@ public:
         void replace
         (
             const direction,
-            const tmp<DimensionedField<cmptType, GeoMesh> >&
+            const tmp<DimensionedField<cmptType, GeoMesh>>&
         );
 
         //- Return the field transpose (only defined for second rank tensors)
-        tmp<DimensionedField<Type, GeoMesh> > T() const;
+        tmp<DimensionedField<Type, GeoMesh>> T() const;
 
         //- Calculate and return arithmetic average
         dimensioned<Type> average() const;
@@ -295,7 +295,7 @@ public:
         //- Calculate and return weighted average
         dimensioned<Type> weightedAverage
         (
-            const tmp<DimensionedField<scalar, GeoMesh> >&
+            const tmp<DimensionedField<scalar, GeoMesh>>&
         ) const;
 
 
@@ -309,20 +309,20 @@ public:
     // Member Operators
 
         void operator=(const DimensionedField<Type, GeoMesh>&);
-        void operator=(const tmp<DimensionedField<Type, GeoMesh> >&);
+        void operator=(const tmp<DimensionedField<Type, GeoMesh>>&);
         void operator=(const dimensioned<Type>&);
 
         void operator+=(const DimensionedField<Type, GeoMesh>&);
-        void operator+=(const tmp<DimensionedField<Type, GeoMesh> >&);
+        void operator+=(const tmp<DimensionedField<Type, GeoMesh>>&);
 
         void operator-=(const DimensionedField<Type, GeoMesh>&);
-        void operator-=(const tmp<DimensionedField<Type, GeoMesh> >&);
+        void operator-=(const tmp<DimensionedField<Type, GeoMesh>>&);
 
         void operator*=(const DimensionedField<scalar, GeoMesh>&);
-        void operator*=(const tmp<DimensionedField<scalar, GeoMesh> >&);
+        void operator*=(const tmp<DimensionedField<scalar, GeoMesh>>&);
 
         void operator/=(const DimensionedField<scalar, GeoMesh>&);
-        void operator/=(const tmp<DimensionedField<scalar, GeoMesh> >&);
+        void operator/=(const tmp<DimensionedField<scalar, GeoMesh>>&);
 
         void operator+=(const dimensioned<Type>&);
         void operator-=(const dimensioned<Type>&);
@@ -342,7 +342,7 @@ public:
         friend Ostream& operator<< <Type, GeoMesh>
         (
             Ostream&,
-            const tmp<DimensionedField<Type, GeoMesh> >&
+            const tmp<DimensionedField<Type, GeoMesh>>&
         );
 };
 
@@ -357,7 +357,7 @@ public:
 #include "DimensionedFieldFunctions.H"
 
 #ifdef NoRepository
-#   include "DimensionedField.C"
+    #include "DimensionedField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C
index 66f6c7bee1e0fbc843c0e6dcce1c3bebe9d92f82..f1bd35b9d2971478e4ddcd596e86163aa478c873 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,8 +35,8 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * Global functions  * * * * * * * * * * * * * //
 
-template<class Type, class GeoMesh, int r>
-tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh> >
+template<class Type, class GeoMesh, direction r>
+tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
 pow
 (
     const DimensionedField<Type, GeoMesh>& df,
@@ -45,7 +45,7 @@ pow
 {
     typedef typename powProduct<Type, r>::type powProductType;
 
-    tmp<DimensionedField<powProductType, GeoMesh> > tPow
+    tmp<DimensionedField<powProductType, GeoMesh>> tPow
     (
         new DimensionedField<powProductType, GeoMesh>
         (
@@ -60,17 +60,17 @@ pow
         )
     );
 
-    pow<Type, r, GeoMesh>(tPow().field(), df.field());
+    pow<Type, r, GeoMesh>(tPow.ref().field(), df.field());
 
     return tPow;
 }
 
 
-template<class Type, class GeoMesh, int r>
-tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh> >
+template<class Type, class GeoMesh, direction r>
+tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
 pow
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf,
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf,
     typename powProduct<Type, r>::type
 )
 {
@@ -78,7 +78,7 @@ pow
 
     const DimensionedField<Type, GeoMesh>& df = tdf();
 
-    tmp<DimensionedField<powProductType, GeoMesh> > tPow =
+    tmp<DimensionedField<powProductType, GeoMesh>> tPow =
         reuseTmpDimensionedField<powProductType, Type, GeoMesh>::New
         (
             tdf,
@@ -86,20 +86,20 @@ pow
             pow(df.dimensions(), r)
         );
 
-    pow<Type, r, GeoMesh>(tPow().field(), df.field());
+    pow<Type, r, GeoMesh>(tPow.ref().field(), df.field());
 
-    reuseTmpDimensionedField<powProductType, Type, GeoMesh>::clear(tdf);
+    tdf.clear();
 
     return tPow;
 }
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh> >
+tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh>>
 sqr(const DimensionedField<Type, GeoMesh>& df)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
 
-    tmp<DimensionedField<outerProductType, GeoMesh> > tSqr
+    tmp<DimensionedField<outerProductType, GeoMesh>> tSqr
     (
         new DimensionedField<outerProductType, GeoMesh>
         (
@@ -114,20 +114,20 @@ sqr(const DimensionedField<Type, GeoMesh>& df)
         )
     );
 
-    sqr(tSqr().field(), df.field());
+    sqr(tSqr.ref().field(), df.field());
 
     return tSqr;
 }
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh> >
-sqr(const tmp<DimensionedField<Type, GeoMesh> >& tdf)
+tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh>>
+sqr(const tmp<DimensionedField<Type, GeoMesh>>& tdf)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
 
     const DimensionedField<Type, GeoMesh>& df = tdf();
 
-    tmp<DimensionedField<outerProductType, GeoMesh> > tSqr =
+    tmp<DimensionedField<outerProductType, GeoMesh>> tSqr =
         reuseTmpDimensionedField<outerProductType, Type, GeoMesh>::New
         (
             tdf,
@@ -135,21 +135,21 @@ sqr(const tmp<DimensionedField<Type, GeoMesh> >& tdf)
             sqr(df.dimensions())
         );
 
-    sqr(tSqr().field(), df.field());
+    sqr(tSqr.ref().field(), df.field());
 
-    reuseTmpDimensionedField<outerProductType, Type, GeoMesh>::clear(tdf);
+    tdf.clear();
 
     return tSqr;
 }
 
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > magSqr
+tmp<DimensionedField<scalar, GeoMesh>> magSqr
 (
     const DimensionedField<Type, GeoMesh>& df
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tMagSqr
+    tmp<DimensionedField<scalar, GeoMesh>> tMagSqr
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -164,20 +164,20 @@ tmp<DimensionedField<scalar, GeoMesh> > magSqr
         )
     );
 
-    magSqr(tMagSqr().field(), df.field());
+    magSqr(tMagSqr.ref().field(), df.field());
 
     return tMagSqr;
 }
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > magSqr
+tmp<DimensionedField<scalar, GeoMesh>> magSqr
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 )
 {
     const DimensionedField<Type, GeoMesh>& df = tdf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tMagSqr =
+    tmp<DimensionedField<scalar, GeoMesh>> tMagSqr =
         reuseTmpDimensionedField<scalar, Type, GeoMesh>::New
         (
             tdf,
@@ -185,21 +185,21 @@ tmp<DimensionedField<scalar, GeoMesh> > magSqr
             sqr(df.dimensions())
         );
 
-    magSqr(tMagSqr().field(), df.field());
+    magSqr(tMagSqr.ref().field(), df.field());
 
-    reuseTmpDimensionedField<scalar, Type, GeoMesh>::clear(tdf);
+    tdf.clear();
 
     return tMagSqr;
 }
 
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > mag
+tmp<DimensionedField<scalar, GeoMesh>> mag
 (
     const DimensionedField<Type, GeoMesh>& df
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tMag
+    tmp<DimensionedField<scalar, GeoMesh>> tMag
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -214,20 +214,20 @@ tmp<DimensionedField<scalar, GeoMesh> > mag
         )
     );
 
-    mag(tMag().field(), df.field());
+    mag(tMag.ref().field(), df.field());
 
     return tMag;
 }
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > mag
+tmp<DimensionedField<scalar, GeoMesh>> mag
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 )
 {
     const DimensionedField<Type, GeoMesh>& df = tdf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tMag =
+    tmp<DimensionedField<scalar, GeoMesh>> tMag =
         reuseTmpDimensionedField<scalar, Type, GeoMesh>::New
         (
             tdf,
@@ -235,9 +235,9 @@ tmp<DimensionedField<scalar, GeoMesh> > mag
             df.dimensions()
         );
 
-    mag(tMag().field(), df.field());
+    mag(tMag.ref().field(), df.field());
 
-    reuseTmpDimensionedField<scalar, Type, GeoMesh>::clear(tdf);
+    tdf.clear();
 
     return tMag;
 }
@@ -253,7 +253,7 @@ cmptAv(const DimensionedField<Type, GeoMesh>& df)
 {
     typedef typename DimensionedField<Type, GeoMesh>::cmptType cmptType;
 
-    tmp<DimensionedField<cmptType, GeoMesh> > CmptAv
+    tmp<DimensionedField<cmptType, GeoMesh>> CmptAv
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -268,7 +268,7 @@ cmptAv(const DimensionedField<Type, GeoMesh>& df)
         )
     );
 
-    cmptAv(CmptAv().field(), df.field());
+    cmptAv(CmptAv.ref().field(), df.field());
 
     return CmptAv;
 }
@@ -279,14 +279,14 @@ tmp
     DimensionedField
         <typename DimensionedField<Type, GeoMesh>::cmptType, GeoMesh>
 >
-cmptAv(const tmp<DimensionedField<Type, GeoMesh> >& tdf)
+cmptAv(const tmp<DimensionedField<Type, GeoMesh>>& tdf)
 {
     typedef typename DimensionedField<Type, GeoMesh>::cmptType
         cmptType;
 
     const DimensionedField<Type, GeoMesh>& df = tdf();
 
-    tmp<DimensionedField<cmptType, GeoMesh> > CmptAv =
+    tmp<DimensionedField<cmptType, GeoMesh>> CmptAv =
         reuseTmpDimensionedField<cmptType, Type, GeoMesh>::New
         (
             tdf,
@@ -294,38 +294,38 @@ cmptAv(const tmp<DimensionedField<Type, GeoMesh> >& tdf)
             df.dimensions()
         );
 
-    cmptAv(CmptAv().field(), df.field());
+    cmptAv(CmptAv.ref().field(), df.field());
 
-    reuseTmpDimensionedField<cmptType, Type, GeoMesh>::clear(tdf);
+    tdf.clear();
 
     return CmptAv;
 }
 
-#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)                     \
-                                                                              \
-template<class Type, class GeoMesh>                                           \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const DimensionedField<Type, GeoMesh>& df                                 \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type>                                                  \
-    (                                                                         \
-        #func "(" + df.name() + ')',                                          \
-        df.dimensions(),                                                      \
-        dfunc(df.field())                                                     \
-    );                                                                        \
-}                                                                             \
-                                                                              \
-template<class Type, class GeoMesh>                                           \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1                         \
-)                                                                             \
-{                                                                             \
-    dimensioned<returnType> res = func(tdf1());                               \
-    tdf1.clear();                                                             \
-    return res;                                                               \
+#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)                      \
+                                                                               \
+template<class Type, class GeoMesh>                                            \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const DimensionedField<Type, GeoMesh>& df                                  \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type>                                                   \
+    (                                                                          \
+        #func "(" + df.name() + ')',                                           \
+        df.dimensions(),                                                       \
+        dfunc(df.field())                                                      \
+    );                                                                         \
+}                                                                              \
+                                                                               \
+template<class Type, class GeoMesh>                                            \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1                           \
+)                                                                              \
+{                                                                              \
+    dimensioned<returnType> res = func(tdf1());                                \
+    tdf1.clear();                                                              \
+    return res;                                                                \
 }
 
 UNARY_REDUCTION_FUNCTION(Type, max, gMax)
@@ -364,279 +364,279 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, '|', divide)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    tmp<DimensionedField<productType, GeoMesh> > tRes                         \
-    (                                                                         \
-        new DimensionedField<productType, GeoMesh>                            \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + df1.name() + #op + df2.name() + ')',                    \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            df1.dimensions() op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::opFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-                                                                              \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<productType, GeoMesh> > tRes =                       \
-        reuseTmpDimensionedField<productType, Type2, GeoMesh>::New            \
-        (                                                                     \
-            tdf2,                                                             \
-            '(' + df1.name() + #op + df2.name() + ')',                        \
-            df1.dimensions() op df2.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    reuseTmpDimensionedField<productType, Type2, GeoMesh>::clear(tdf2);       \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-                                                                              \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<productType, GeoMesh> > tRes =                       \
-        reuseTmpDimensionedField<productType, Type1, GeoMesh>::New            \
-        (                                                                     \
-            tdf1,                                                             \
-            '(' + df1.name() + #op + df2.name() + ')',                        \
-            df1.dimensions() op df2.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    reuseTmpDimensionedField<productType, Type1, GeoMesh>::clear(tdf1);       \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-                                                                              \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<productType, GeoMesh> > tRes =                       \
-        reuseTmpTmpDimensionedField                                           \
-        <productType, Type1, Type1, Type2, GeoMesh>::New                      \
-        (                                                                     \
-            tdf1,                                                             \
-            tdf2,                                                             \
-            '(' + df1.name() + #op + df2.name() + ')',                        \
-            df1.dimensions() op df2.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    reuseTmpTmpDimensionedField                                               \
-        <productType, Type1, Type1, Type2, GeoMesh>::clear(tdf1, tdf2);       \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type, GeoMesh>& df1,                               \
-    const dimensioned<Form>& dvs                                              \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-                                                                              \
-    tmp<DimensionedField<productType, GeoMesh> > tRes                         \
-    (                                                                         \
-        new DimensionedField<productType, GeoMesh>                            \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + df1.name() + #op + dvs.name() + ')',                    \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            df1.dimensions() op dvs.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::opFunc(tRes().field(), df1.field(), dvs.value());                   \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type, GeoMesh>& df1,                               \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{                                                                             \
-    return df1 op dimensioned<Form>(static_cast<const Form&>(vs));            \
-}                                                                             \
-                                                                              \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1,                        \
-    const dimensioned<Form>& dvs                                              \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-                                                                              \
-    const DimensionedField<Type, GeoMesh>& df1 = tdf1();                      \
-                                                                              \
-    tmp<DimensionedField<productType, GeoMesh> > tRes =                       \
-        reuseTmpDimensionedField<productType, Type, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            '(' + df1.name() + #op + dvs.name() + ')',                        \
-            df1.dimensions() op dvs.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes().field(), df1.field(), dvs.value());                   \
-                                                                              \
-    reuseTmpDimensionedField<productType, Type, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1,                        \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{                                                                             \
-    return tdf1 op dimensioned<Form>(static_cast<const Form&>(vs));           \
-}                                                                             \
-                                                                              \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const DimensionedField<Type, GeoMesh>& df1                                \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-    tmp<DimensionedField<productType, GeoMesh> > tRes                         \
-    (                                                                         \
-        new DimensionedField<productType, GeoMesh>                            \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + dvs.name() + #op + df1.name() + ')',                    \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            dvs.dimensions() op df1.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::opFunc(tRes().field(), dvs.value(), df1.field());                   \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const DimensionedField<Type, GeoMesh>& df1                                \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Form>(static_cast<const Form&>(vs)) op df1;            \
-}                                                                             \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1                         \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-                                                                              \
-    const DimensionedField<Type, GeoMesh>& df1 = tdf1();                      \
-                                                                              \
-    tmp<DimensionedField<productType, GeoMesh> > tRes =                       \
-        reuseTmpDimensionedField<productType, Type, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            '(' + dvs.name() + #op + df1.name() + ')',                        \
-            dvs.dimensions() op df1.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes().field(), dvs.value(), df1.field());                   \
-                                                                              \
-    reuseTmpDimensionedField<productType, Type, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1                         \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Form>(static_cast<const Form&>(vs)) op tdf1;           \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    tmp<DimensionedField<productType, GeoMesh>> tRes                           \
+    (                                                                          \
+        new DimensionedField<productType, GeoMesh>                             \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + df1.name() + #op + df2.name() + ')',                     \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            df1.dimensions() op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+                                                                               \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<productType, GeoMesh>> tRes =                         \
+        reuseTmpDimensionedField<productType, Type2, GeoMesh>::New             \
+        (                                                                      \
+            tdf2,                                                              \
+            '(' + df1.name() + #op + df2.name() + ')',                         \
+            df1.dimensions() op df2.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+                                                                               \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<productType, GeoMesh>> tRes =                         \
+        reuseTmpDimensionedField<productType, Type1, GeoMesh>::New             \
+        (                                                                      \
+            tdf1,                                                              \
+            '(' + df1.name() + #op + df2.name() + ')',                         \
+            df1.dimensions() op df2.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+                                                                               \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<productType, GeoMesh>> tRes =                         \
+        reuseTmpTmpDimensionedField                                            \
+        <productType, Type1, Type1, Type2, GeoMesh>::New                       \
+        (                                                                      \
+            tdf1,                                                              \
+            tdf2,                                                              \
+            '(' + df1.name() + #op + df2.name() + ')',                         \
+            df1.dimensions() op df2.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    tdf1.clear();                                                              \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type, GeoMesh>& df1,                                \
+    const dimensioned<Form>& dvs                                               \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+                                                                               \
+    tmp<DimensionedField<productType, GeoMesh>> tRes                           \
+    (                                                                          \
+        new DimensionedField<productType, GeoMesh>                             \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + df1.name() + #op + dvs.name() + ')',                     \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            df1.dimensions() op dvs.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), df1.field(), dvs.value());                \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type, GeoMesh>& df1,                                \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{                                                                              \
+    return df1 op dimensioned<Form>(static_cast<const Form&>(vs));             \
+}                                                                              \
+                                                                               \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1,                          \
+    const dimensioned<Form>& dvs                                               \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+                                                                               \
+    const DimensionedField<Type, GeoMesh>& df1 = tdf1();                       \
+                                                                               \
+    tmp<DimensionedField<productType, GeoMesh>> tRes =                         \
+        reuseTmpDimensionedField<productType, Type, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            '(' + df1.name() + #op + dvs.name() + ')',                         \
+            df1.dimensions() op dvs.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), df1.field(), dvs.value());                \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1,                          \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{                                                                              \
+    return tdf1 op dimensioned<Form>(static_cast<const Form&>(vs));            \
+}                                                                              \
+                                                                               \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const DimensionedField<Type, GeoMesh>& df1                                 \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+    tmp<DimensionedField<productType, GeoMesh>> tRes                           \
+    (                                                                          \
+        new DimensionedField<productType, GeoMesh>                             \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + dvs.name() + #op + df1.name() + ')',                     \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            dvs.dimensions() op df1.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), dvs.value(), df1.field());                \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const DimensionedField<Type, GeoMesh>& df1                                 \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Form>(static_cast<const Form&>(vs)) op df1;             \
+}                                                                              \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1                           \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+                                                                               \
+    const DimensionedField<Type, GeoMesh>& df1 = tdf1();                       \
+                                                                               \
+    tmp<DimensionedField<productType, GeoMesh>> tRes =                         \
+        reuseTmpDimensionedField<productType, Type, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            '(' + dvs.name() + #op + df1.name() + ')',                         \
+            dvs.dimensions() op df1.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref().field(), dvs.value(), df1.field());                \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1                           \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Form>(static_cast<const Form&>(vs)) op tdf1;            \
 }
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.H
index df4efeb8ea991f5533b0440ec3d55e8270467215..f39dff925d931aab88686e928c7e2941803beea6 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,52 +35,52 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * Global functions  * * * * * * * * * * * * * //
 
-template<class Type, class GeoMesh, int r>
-tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh> >
+template<class Type, class GeoMesh, direction r>
+tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
 pow
 (
     const DimensionedField<Type, GeoMesh>& df,
     typename powProduct<Type, r>::type
 );
 
-template<class Type, class GeoMesh, int r>
-tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh> >
+template<class Type, class GeoMesh, direction r>
+tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh>>
 pow
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf,
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf,
     typename powProduct<Type, r>::type
 );
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh> >
+tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh>>
 sqr(const DimensionedField<Type, GeoMesh>& df);
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh> >
-sqr(const tmp<DimensionedField<Type, GeoMesh> >& tdf);
+tmp<DimensionedField<typename outerProduct<Type, Type>::type, GeoMesh>>
+sqr(const tmp<DimensionedField<Type, GeoMesh>>& tdf);
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > magSqr
+tmp<DimensionedField<scalar, GeoMesh>> magSqr
 (
     const DimensionedField<Type, GeoMesh>& df
 );
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > magSqr
+tmp<DimensionedField<scalar, GeoMesh>> magSqr
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 );
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > mag
+tmp<DimensionedField<scalar, GeoMesh>> mag
 (
     const DimensionedField<Type, GeoMesh>& df
 );
 
 template<class Type, class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > mag
+tmp<DimensionedField<scalar, GeoMesh>> mag
 (
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 );
 
 template<class Type, class GeoMesh>
@@ -97,20 +97,20 @@ tmp
     DimensionedField
         <typename DimensionedField<Type, GeoMesh>::cmptType, GeoMesh>
 >
-cmptAv(const tmp<DimensionedField<Type, GeoMesh> >& tdf);
-
-
-#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)                     \
-                                                                              \
-template<class Type, class GeoMesh>                                           \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const DimensionedField<Type, GeoMesh>& df                                 \
-);                                                                            \
-template<class Type, class GeoMesh>                                           \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1                         \
+cmptAv(const tmp<DimensionedField<Type, GeoMesh>>& tdf);
+
+
+#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)                      \
+                                                                               \
+template<class Type, class GeoMesh>                                            \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const DimensionedField<Type, GeoMesh>& df                                  \
+);                                                                             \
+template<class Type, class GeoMesh>                                            \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1                           \
 );
 
 UNARY_REDUCTION_FUNCTION(Type, max, gMax)
@@ -149,102 +149,102 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, '|', divide)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-);                                                                            \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-template<class Type1, class Type2, class GeoMesh>                             \
-tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> >         \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-);                                                                            \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type, GeoMesh>& df1,                               \
-    const dimensioned<Form>& dvs                                              \
-);                                                                            \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const DimensionedField<Type, GeoMesh>& df1,                               \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-);                                                                            \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1,                        \
-    const dimensioned<Form>& dvs                                              \
-);                                                                            \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1,                        \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-);                                                                            \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const DimensionedField<Type, GeoMesh>& df1                                \
-);                                                                            \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const DimensionedField<Type, GeoMesh>& df1                                \
-);                                                                            \
-                                                                              \
-template<class Form, class Type, class GeoMesh>                               \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1                         \
-);                                                                            \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh>        \
-tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> >           \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf1                         \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+);                                                                             \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+template<class Type1, class Type2, class GeoMesh>                              \
+tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>>           \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+);                                                                             \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type, GeoMesh>& df1,                                \
+    const dimensioned<Form>& dvs                                               \
+);                                                                             \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const DimensionedField<Type, GeoMesh>& df1,                                \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+);                                                                             \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1,                          \
+    const dimensioned<Form>& dvs                                               \
+);                                                                             \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1,                          \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+);                                                                             \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const DimensionedField<Type, GeoMesh>& df1                                 \
+);                                                                             \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const DimensionedField<Type, GeoMesh>& df1                                 \
+);                                                                             \
+                                                                               \
+template<class Form, class Type, class GeoMesh>                                \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1                           \
+);                                                                             \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh>   \
+tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>>             \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf1                           \
 );
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.C
index 85310c12fc1a8d33f4f4bda002ee18a05d2b82bb..6da09d945c4afbdddffaf9d023134f39a0e2f9a6 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.C
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,662 +27,662 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                        \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1                               \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + df1.name() + ')',                                 \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            Dfunc(df1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field());                                        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            #Func "(" + df1.name() + ')',                                     \
-            Dfunc(df1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field());                                        \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
+#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                         \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1                                \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + df1.name() + ')',                                  \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            Dfunc(df1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field());                                     \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            #Func "(" + df1.name() + ')',                                      \
+            Dfunc(df1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field());                                     \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)                  \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1                               \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Op + df1.name(),                                             \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            Dfunc(df1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field());                                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            #Op + df1.name(),                                                 \
-            Dfunc(df1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field());                                \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
+#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)                   \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1                                \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Op + df1.name(),                                              \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            Dfunc(df1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field());                             \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            #Op + df1.name(),                                                  \
+            Dfunc(df1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field());                             \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + df1.name() + ',' + df2.name() + ')',              \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            Func(df1.dimensions(), df2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field(), df2.field());                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New             \
-        (                                                                     \
-            tdf2,                                                             \
-            #Func "(" + df1.name() + ',' + df2.name() + ')',                  \
-            Func(df1.dimensions(), df2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field(), df2.field());                           \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::clear(tdf2);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            #Func "(" + df1.name() + ',' + df2.name() + ')',                  \
-            Func(df1.dimensions(), df2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field(), df2.field());                           \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpTmpDimensionedField                                           \
-            <ReturnType, Type1, Type1, Type2, GeoMesh>::New                   \
-        (                                                                     \
-            tdf1,                                                             \
-            tdf2,                                                             \
-            #Func "(" + df1.name() + ',' + df2.name() + ')',                  \
-            Func(df1.dimensions(), df2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field(), df2.field());                           \
-                                                                              \
-    reuseTmpTmpDimensionedField<ReturnType, Type1, Type1, Type2, GeoMesh>     \
-    ::clear(tdf1, tdf2);                                                      \
-                                                                              \
-    return tRes;                                                              \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + df1.name() + ',' + df2.name() + ')',               \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            Func(df1.dimensions(), df2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field(), df2.field());                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New              \
+        (                                                                      \
+            tdf2,                                                              \
+            #Func "(" + df1.name() + ',' + df2.name() + ')',                   \
+            Func(df1.dimensions(), df2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field(), df2.field());                        \
+                                                                               \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            #Func "(" + df1.name() + ',' + df2.name() + ')',                   \
+            Func(df1.dimensions(), df2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field(), df2.field());                        \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpTmpDimensionedField                                            \
+            <ReturnType, Type1, Type1, Type2, GeoMesh>::New                    \
+        (                                                                      \
+            tdf1,                                                              \
+            tdf2,                                                              \
+            #Func "(" + df1.name() + ',' + df2.name() + ')',                   \
+            Func(df1.dimensions(), df2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field(), df2.field());                        \
+                                                                               \
+    tdf1.clear();                                                              \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + dt1.name() + ',' + df2.name() + ')',              \
-                df2.instance(),                                               \
-                df2.db()                                                      \
-            ),                                                                \
-            df2.mesh(),                                                       \
-            Func(dt1.dimensions(), df2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), dt1.value(), df2.field());                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    return Func(dimensioned<Type1>(t1), df2);                                 \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New             \
-        (                                                                     \
-            tdf2,                                                             \
-            #Func "(" + dt1.name() + ',' + df2.name() + ')',                  \
-            Func(dt1.dimensions(), df2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), dt1.value(), df2.field());                           \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::clear(tdf2);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    return Func(dimensioned<Type2>(t1), tdf2);                                \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + dt1.name() + ',' + df2.name() + ')',               \
+                df2.instance(),                                                \
+                df2.db()                                                       \
+            ),                                                                 \
+            df2.mesh(),                                                        \
+            Func(dt1.dimensions(), df2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), dt1.value(), df2.field());                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    return Func(dimensioned<Type1>(t1), df2);                                  \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New              \
+        (                                                                      \
+            tdf2,                                                              \
+            #Func "(" + dt1.name() + ',' + df2.name() + ')',                   \
+            Func(dt1.dimensions(), df2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), dt1.value(), df2.field());                        \
+                                                                               \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    return Func(dimensioned<Type2>(t1), tdf2);                                 \
 }
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + df1.name() + ',' + dt2.name() + ')',              \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            Func(df1.dimensions(), dt2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field(), dt2.value());                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return Func(df1, dimensioned<Type2>(t2));                                 \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            #Func "(" + df1.name() + ',' + dt2.name() + ')',                  \
-            Func(df1.dimensions(), dt2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Func(tRes().field(), df1.field(), dt2.value());                           \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return Func(tdf1, dimensioned<Type2>(t2));                                \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + df1.name() + ',' + dt2.name() + ')',               \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            Func(df1.dimensions(), dt2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field(), dt2.value());                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return Func(df1, dimensioned<Type2>(t2));                                  \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            #Func "(" + df1.name() + ',' + dt2.name() + ')',                   \
+            Func(df1.dimensions(), dt2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Func(tRes.ref().field(), df1.field(), dt2.value());                        \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return Func(tdf1, dimensioned<Type2>(t2));                                 \
 }
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + df1.name() + OpName + df2.name() + ')',                 \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            df1.dimensions() Op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New             \
-        (                                                                     \
-            tdf2,                                                             \
-            '(' + df1.name() + OpName + df2.name() + ')',                     \
-            df1.dimensions() Op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::clear(tdf2);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            '(' + df1.name() + OpName + df2.name() + ')',                     \
-            df1.dimensions() Op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpTmpDimensionedField                                           \
-            <ReturnType, Type1, Type1, Type2, GeoMesh>::New                   \
-        (                                                                     \
-            tdf1,                                                             \
-            tdf2,                                                             \
-            '(' + df1.name() + OpName + df2.name() + ')',                     \
-            df1.dimensions() Op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field(), df2.field());                   \
-                                                                              \
-    reuseTmpTmpDimensionedField<ReturnType, Type1, Type1, Type2, GeoMesh>::   \
-        clear(tdf1, tdf2);                                                    \
-                                                                              \
-    return tRes;                                                              \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + df1.name() + OpName + df2.name() + ')',                  \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            df1.dimensions() Op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New              \
+        (                                                                      \
+            tdf2,                                                              \
+            '(' + df1.name() + OpName + df2.name() + ')',                      \
+            df1.dimensions() Op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            '(' + df1.name() + OpName + df2.name() + ')',                      \
+            df1.dimensions() Op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpTmpDimensionedField                                            \
+            <ReturnType, Type1, Type1, Type2, GeoMesh>::New                    \
+        (                                                                      \
+            tdf1,                                                              \
+            tdf2,                                                              \
+            '(' + df1.name() + OpName + df2.name() + ')',                      \
+            df1.dimensions() Op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field(), df2.field());                \
+                                                                               \
+    tdf1.clear();                                                              \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + dt1.name() + OpName + df2.name() + ')',                 \
-                df2.instance(),                                               \
-                df2.db()                                                      \
-            ),                                                                \
-            df2.mesh(),                                                       \
-            dt1.dimensions() Op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), dt1.value(), df2.field());                   \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type1>(t1) Op df2;                                     \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New             \
-        (                                                                     \
-            tdf2,                                                             \
-            '(' + dt1.name() + OpName + df2.name() + ')',                     \
-            dt1.dimensions() Op df2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), dt1.value(), tdf2().field());                \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::clear(tdf2);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type1>(t1) Op tdf2;                                    \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + dt1.name() + OpName + df2.name() + ')',                  \
+                df2.instance(),                                                \
+                df2.db()                                                       \
+            ),                                                                 \
+            df2.mesh(),                                                        \
+            dt1.dimensions() Op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), dt1.value(), df2.field());                \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type1>(t1) Op df2;                                      \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type2, GeoMesh>& df2 = tdf2();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type2, GeoMesh>::New              \
+        (                                                                      \
+            tdf2,                                                              \
+            '(' + dt1.name() + OpName + df2.name() + ')',                      \
+            dt1.dimensions() Op df2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), dt1.value(), tdf2().field());             \
+                                                                               \
+    tdf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type1>(t1) Op tdf2;                                     \
 }
 
 
 #define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        new DimensionedField<ReturnType, GeoMesh>                             \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + df1.name() + OpName + dt2.name() + ')',                 \
-                df1.instance(),                                               \
-                df1.db()                                                      \
-            ),                                                                \
-            df1.mesh(),                                                       \
-            df1.dimensions() Op dt2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), df1.field(), dt2.value());                   \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return df1 Op dimensioned<Type2>(t2);                                     \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                     \
-                                                                              \
-    tmp<DimensionedField<ReturnType, GeoMesh> > tRes                          \
-    (                                                                         \
-        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New             \
-        (                                                                     \
-            tdf1,                                                             \
-            '(' + df1.name() + OpName + dt2.name() + ')',                     \
-            df1.dimensions() Op dt2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes().field(), tdf1().field(), dt2.value());                \
-                                                                              \
-    reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::clear(tdf1);        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return tdf1 Op dimensioned<Type2>(t2);                                    \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        new DimensionedField<ReturnType, GeoMesh>                              \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + df1.name() + OpName + dt2.name() + ')',                  \
+                df1.instance(),                                                \
+                df1.db()                                                       \
+            ),                                                                 \
+            df1.mesh(),                                                        \
+            df1.dimensions() Op dt2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), df1.field(), dt2.value());                \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return df1 Op dimensioned<Type2>(t2);                                      \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1 = tdf1();                      \
+                                                                               \
+    tmp<DimensionedField<ReturnType, GeoMesh>> tRes                            \
+    (                                                                          \
+        reuseTmpDimensionedField<ReturnType, Type1, GeoMesh>::New              \
+        (                                                                      \
+            tdf1,                                                              \
+            '(' + df1.name() + OpName + dt2.name() + ')',                      \
+            df1.dimensions() Op dt2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref().field(), tdf1().field(), dt2.value());             \
+                                                                               \
+    tdf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return tdf1 Op dimensioned<Type2>(t2);                                     \
 }
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)    \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)      \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.H
index 66b2ada8fe4672a3eff2ab5050fe7ed5c6f46aa6..444192f399af9f316cd8041a99eb9a80545d497a 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctionsM.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,239 +25,239 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                        \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df                                \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1                        \
+#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                         \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df                                 \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1                          \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type1, Op, opFunc, Dfunc)                  \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1                        \
+#define UNARY_OPERATOR(ReturnType, Type1, Op, opFunc, Dfunc)                   \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1                          \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
 );
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const Type2& t2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > Func                              \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf2,                       \
-    const Type2& t2                                                           \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const Type2& t2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> Func                                \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf2,                         \
+    const Type2& t2                                                            \
 );
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const DimensionedField<Type2, GeoMesh>& df2                               \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<DimensionedField<Type2, GeoMesh> >& tdf2                        \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const DimensionedField<Type2, GeoMesh>& df2                                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<DimensionedField<Type2, GeoMesh>>& tdf2                          \
 );
 
 
 #define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const DimensionedField<Type1, GeoMesh>& df1,                              \
-    const Type2& t2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<DimensionedField<ReturnType, GeoMesh> > operator Op                       \
-(                                                                             \
-    const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,                       \
-    const Type2& t2                                                           \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const DimensionedField<Type1, GeoMesh>& df1,                               \
+    const Type2& t2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<DimensionedField<ReturnType, GeoMesh>> operator Op                         \
+(                                                                              \
+    const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,                         \
+    const Type2& t2                                                            \
 );
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)    \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)      \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldI.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldI.H
index f2aa000604bd14e22239a649849774bb570db4ae..64cfd315895bc29de04ac1b18ceb88dc4e2b8fd3 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldI.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ template<class Type, class GeoMesh>
 inline const Foam::DimensionedField<Type, GeoMesh>&
 Foam::DimensionedField<Type, GeoMesh>::null()
 {
-    return NullObjectRef<DimensionedField<Type, GeoMesh> >();
+    return NullObjectRef<DimensionedField<Type, GeoMesh>>();
 }
 
 
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C
index 43dea85a72ab249fb6080c2c1e9a6238c78f1a7b..74da71025c3122c36fe03cdb041c232f742a9b6f 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -149,7 +149,7 @@ template<class Type, class GeoMesh>
 Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
-    const tmp<DimensionedField<Type, GeoMesh> >& tdf
+    const tmp<DimensionedField<Type, GeoMesh>>& tdf
 )
 {
     tdf().writeData(os);
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldReuseFunctions.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldReuseFunctions.H
index 806745808f2451c37115f2edb2edb32cf9cb9497..513efc44e50e948c97e44dfec9817939c4585be9 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldReuseFunctions.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldReuseFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,21 +33,58 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+template<class TypeR, class GeoMesh>
+tmp<DimensionedField<TypeR, GeoMesh>> New
+(
+    const tmp<DimensionedField<TypeR, GeoMesh>>& tdf1,
+    const word& name,
+    const dimensionSet& dimensions
+)
+{
+    DimensionedField<TypeR, GeoMesh>& df1 =
+        const_cast<DimensionedField<TypeR, GeoMesh>& >(tdf1());
+
+    if (tdf1.isTmp())
+    {
+        df1.rename(name);
+        df1.dimensions().reset(dimensions);
+        return tdf1;
+    }
+    else
+    {
+        return tmp<DimensionedField<TypeR, GeoMesh>>
+        (
+            new DimensionedField<TypeR, GeoMesh>
+            (
+                IOobject
+                (
+                    name,
+                    df1.instance(),
+                    df1.db()
+                ),
+                df1.mesh(),
+                dimensions
+            )
+        );
+    }
+}
+
+
 template<class TypeR, class Type1, class GeoMesh>
 class reuseTmpDimensionedField
 {
 public:
 
-    static tmp<DimensionedField<TypeR, GeoMesh> > New
+    static tmp<DimensionedField<TypeR, GeoMesh>> New
     (
-        const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,
+        const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,
         const word& name,
         const dimensionSet& dimensions
     )
     {
         const DimensionedField<Type1, GeoMesh>& df1 = tdf1();
 
-        return tmp<DimensionedField<TypeR, GeoMesh> >
+        return tmp<DimensionedField<TypeR, GeoMesh>>
         (
             new DimensionedField<TypeR, GeoMesh>
             (
@@ -62,11 +99,6 @@ public:
             )
         );
     }
-
-    static void clear(const tmp<DimensionedField<Type1, GeoMesh> >& tdf1)
-    {
-        tdf1.clear();
-    }
 };
 
 
@@ -75,9 +107,9 @@ class reuseTmpDimensionedField<TypeR, TypeR, GeoMesh>
 {
 public:
 
-    static tmp<DimensionedField<TypeR, GeoMesh> > New
+    static tmp<DimensionedField<TypeR, GeoMesh>> New
     (
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf1,
+        const tmp<DimensionedField<TypeR, GeoMesh>>& tdf1,
         const word& name,
         const dimensionSet& dimensions
     )
@@ -93,7 +125,7 @@ public:
         }
         else
         {
-            return tmp<DimensionedField<TypeR, GeoMesh> >
+            return tmp<DimensionedField<TypeR, GeoMesh>>
             (
                 new DimensionedField<TypeR, GeoMesh>
                 (
@@ -109,14 +141,6 @@ public:
             );
         }
     }
-
-    static void clear(const tmp<DimensionedField<TypeR, GeoMesh> >& tdf1)
-    {
-        if (tdf1.isTmp())
-        {
-            tdf1.ptr();
-        }
-    }
 };
 
 
@@ -125,17 +149,17 @@ class reuseTmpTmpDimensionedField
 {
 public:
 
-    static tmp<DimensionedField<TypeR, GeoMesh> > New
+    static tmp<DimensionedField<TypeR, GeoMesh>> New
     (
-        const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<Type2, GeoMesh> >& tdf2,
+        const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,
+        const tmp<DimensionedField<Type2, GeoMesh>>& tdf2,
         const word& name,
         const dimensionSet& dimensions
     )
     {
         const DimensionedField<Type1, GeoMesh>& df1 = tdf1();
 
-        return tmp<DimensionedField<TypeR, GeoMesh> >
+        return tmp<DimensionedField<TypeR, GeoMesh>>
         (
             new DimensionedField<TypeR, GeoMesh>
             (
@@ -150,16 +174,6 @@ public:
             )
         );
     }
-
-    static void clear
-    (
-        const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<Type2, GeoMesh> >& tdf2
-    )
-    {
-        tdf1.clear();
-        tdf2.clear();
-    }
 };
 
 
@@ -168,10 +182,10 @@ class reuseTmpTmpDimensionedField<TypeR, Type1, Type12, TypeR, GeoMesh>
 {
 public:
 
-    static tmp<DimensionedField<TypeR, GeoMesh> > New
+    static tmp<DimensionedField<TypeR, GeoMesh>> New
     (
-        const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf2,
+        const tmp<DimensionedField<Type1, GeoMesh>>& tdf1,
+        const tmp<DimensionedField<TypeR, GeoMesh>>& tdf2,
         const word& name,
         const dimensionSet& dimensions
     )
@@ -188,7 +202,7 @@ public:
         }
         else
         {
-            return tmp<DimensionedField<TypeR, GeoMesh> >
+            return tmp<DimensionedField<TypeR, GeoMesh>>
             (
                 new DimensionedField<TypeR, GeoMesh>
                 (
@@ -204,19 +218,6 @@ public:
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<DimensionedField<Type1, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf2
-    )
-    {
-        tdf1.clear();
-        if (tdf2.isTmp())
-        {
-            tdf2.ptr();
-        }
-    }
 };
 
 
@@ -225,10 +226,10 @@ class reuseTmpTmpDimensionedField<TypeR, TypeR, TypeR, Type2, GeoMesh>
 {
 public:
 
-    static tmp<DimensionedField<TypeR, GeoMesh> > New
+    static tmp<DimensionedField<TypeR, GeoMesh>> New
     (
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<Type2, GeoMesh> >& tdf2,
+        const tmp<DimensionedField<TypeR, GeoMesh>>& tdf1,
+        const tmp<DimensionedField<Type2, GeoMesh>>& tdf2,
         const word& name,
         const dimensionSet& dimensions
     )
@@ -244,7 +245,7 @@ public:
         }
         else
         {
-            return tmp<DimensionedField<TypeR, GeoMesh> >
+            return tmp<DimensionedField<TypeR, GeoMesh>>
             (
                 new DimensionedField<TypeR, GeoMesh>
                 (
@@ -260,19 +261,6 @@ public:
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<Type2, GeoMesh> >& tdf2
-    )
-    {
-        if (tdf1.isTmp())
-        {
-            tdf1.ptr();
-        }
-        tdf2.clear();
-    }
 };
 
 
@@ -281,10 +269,10 @@ class reuseTmpTmpDimensionedField<TypeR, TypeR, TypeR, TypeR, GeoMesh>
 {
 public:
 
-    static tmp<DimensionedField<TypeR, GeoMesh> > New
+    static tmp<DimensionedField<TypeR, GeoMesh>> New
     (
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf2,
+        const tmp<DimensionedField<TypeR, GeoMesh>>& tdf1,
+        const tmp<DimensionedField<TypeR, GeoMesh>>& tdf2,
         const word& name,
         const dimensionSet& dimensions
     )
@@ -308,7 +296,7 @@ public:
         }
         else
         {
-            return tmp<DimensionedField<TypeR, GeoMesh> >
+            return tmp<DimensionedField<TypeR, GeoMesh>>
             (
                 new DimensionedField<TypeR, GeoMesh>
                 (
@@ -324,24 +312,6 @@ public:
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf1,
-        const tmp<DimensionedField<TypeR, GeoMesh> >& tdf2
-    )
-    {
-        if (tdf1.isTmp())
-        {
-            tdf1.ptr();
-            tdf2.clear();
-        }
-        else if (tdf2.isTmp())
-        {
-            tdf1.clear();
-            tdf2.ptr();
-        }
-    }
 };
 
 
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H
index e4f69802b8f2b84fec25f429824b45e6d6902e81..e0e4282fb4f0757a7eafda10c4532d9968c2c118 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,13 +103,13 @@ public:
         static inline const SubDimensionedField<Type, GeoMesh>& null();
 
         //- Return a component field of the field
-        inline tmp<DimensionedField<cmptType, GeoMesh> > component
+        inline tmp<DimensionedField<cmptType, GeoMesh>> component
         (
             const direction
         ) const;
 
         //- Return the field transpose (only defined for second rank tensors)
-        tmp<DimensionedField<Type, GeoMesh> > T() const;
+        tmp<DimensionedField<Type, GeoMesh>> T() const;
 
 
     // Member operators
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H
index ecddcc04ba5b9e54c925c10abe3594e702f7eb2b..93147ece1d12c8d8a0e639d4ec847bbe3f11a267 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ inline Foam::SubDimensionedField<Type, GeoMesh>::SubDimensionedField
     const SubDimensionedField<Type, GeoMesh>& sfield
 )
 :
-    refCount(),
+    tmp<SubDimensionedField<Type, GeoMesh>>::refCount(),
     SubField<Type>(sfield)
 {}
 
@@ -74,7 +74,7 @@ template<class Type, class GeoMesh>
 inline const Foam::SubDimensionedField<Type, GeoMesh>&
 Foam::SubDimensionedField<Type, GeoMesh>::null()
 {
-    return NullObjectRef<SubDimensionedField<Type, GeoMesh> >();
+    return NullObjectRef<SubDimensionedField<Type, GeoMesh>>();
 }
 
 
@@ -97,7 +97,7 @@ Foam::SubDimensionedField<Type, GeoMesh>::component
 
 
 template<class Type, class GeoMesh>
-inline Foam::tmp<Foam::DimensionedField<Type, GeoMesh> >
+inline Foam::tmp<Foam::DimensionedField<Type, GeoMesh>>
 Foam::SubDimensionedField<Type, GeoMesh>::T() const
 {
     return
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C
index 8d1429f5005985532c76ef31d530fb2d0914539c..9eb3fcf53fbdc54b86956452fe2c12fa2ccba00d 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,13 +36,13 @@ namespace Foam
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > stabilise
+tmp<DimensionedField<scalar, GeoMesh>> stabilise
 (
     const DimensionedField<scalar, GeoMesh>& dsf,
     const dimensioned<scalar>& ds
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tRes
+    tmp<DimensionedField<scalar, GeoMesh>> tRes
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -57,32 +57,31 @@ tmp<DimensionedField<scalar, GeoMesh> > stabilise
         )
     );
 
-    stabilise(tRes().field(), dsf.field(), ds.value());
+    stabilise(tRes.ref().field(), dsf.field(), ds.value());
 
     return tRes;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > stabilise
+tmp<DimensionedField<scalar, GeoMesh>> stabilise
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf,
     const dimensioned<scalar>& ds
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tRes =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf,
-            "stabilise(" + dsf.name() + ',' + ds.name() + ')',
-            dsf.dimensions() + ds.dimensions()
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tRes = New
+    (
+        tdsf,
+        "stabilise(" + dsf.name() + ',' + ds.name() + ')',
+        dsf.dimensions() + ds.dimensions()
+    );
 
-    stabilise(tRes().field(), dsf.field(), ds.value());
+    stabilise(tRes.ref().field(), dsf.field(), ds.value());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
+    tdsf.clear();
 
     return tRes;
 }
@@ -101,13 +100,13 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const DimensionedField<scalar, GeoMesh>& dsf1,
     const DimensionedField<scalar, GeoMesh>& dsf2
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tPow
+    tmp<DimensionedField<scalar, GeoMesh>> tPow
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -126,80 +125,78 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
         )
     );
 
-    pow(tPow().field(), dsf1.field(), dsf2.field());
+    pow(tPow.ref().field(), dsf1.field(), dsf2.field());
 
     return tPow;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf1,
     const DimensionedField<scalar, GeoMesh>& dsf2
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tPow =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
+    tmp<DimensionedField<scalar, GeoMesh>> tPow = New
+    (
+        tdsf1,
+        "pow(" + dsf1.name() + ',' + dsf2.name() + ')',
+        pow
         (
-            tdsf1,
-            "pow(" + dsf1.name() + ',' + dsf2.name() + ')',
-            pow
-            (
-                dsf1.dimensions(),
-                dimensionedScalar("1", 1.0, dsf2.dimensions())
-            )
-        );
+            dsf1.dimensions(),
+            dimensionedScalar("1", 1.0, dsf2.dimensions())
+        )
+    );
 
-    pow(tPow().field(), dsf1.field(), dsf2.field());
+    pow(tPow.ref().field(), dsf1.field(), dsf2.field());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf1);
+    tdsf1.clear();
 
     return tPow;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const DimensionedField<scalar, GeoMesh>& dsf1,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf2
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tPow =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
+    tmp<DimensionedField<scalar, GeoMesh>> tPow = New
+    (
+        tdsf2,
+        "pow(" + dsf1.name() + ',' + dsf2.name() + ')',
+        pow
         (
-            tdsf2,
-            "pow(" + dsf1.name() + ',' + dsf2.name() + ')',
-            pow
-            (
-                dsf1.dimensions(),
-                dimensionedScalar("1", 1.0, dsf2.dimensions())
-            )
-        );
+            dsf1.dimensions(),
+            dimensionedScalar("1", 1.0, dsf2.dimensions())
+        )
+    );
 
-    pow(tPow().field(), dsf1.field(), dsf2.field());
+    pow(tPow.ref().field(), dsf1.field(), dsf2.field());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf2);
+    tdsf2.clear();
 
     return tPow;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf1,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf2
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1();
     const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tPow =
+    tmp<DimensionedField<scalar, GeoMesh>> tPow =
         reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::
         New
         (
@@ -213,26 +210,23 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
             )
         );
 
-    pow(tPow().field(), dsf1.field(), dsf2.field());
+    pow(tPow.ref().field(), dsf1.field(), dsf2.field());
 
-    reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::clear
-    (
-        tdsf1,
-        tdsf2
-    );
+    tdsf1.clear();
+    tdsf2.clear();
 
     return tPow;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const DimensionedField<scalar, GeoMesh>& dsf,
     const dimensionedScalar& ds
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tPow
+    tmp<DimensionedField<scalar, GeoMesh>> tPow
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -247,37 +241,36 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
         )
     );
 
-    pow(tPow().field(), dsf.field(), ds.value());
+    pow(tPow.ref().field(), dsf.field(), ds.value());
 
     return tPow;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf,
     const dimensionedScalar& ds
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tPow =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf,
-            "pow(" + dsf.name() + ',' + ds.name() + ')',
-            pow(dsf.dimensions(), ds)
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tPow = New
+    (
+        tdsf,
+        "pow(" + dsf.name() + ',' + ds.name() + ')',
+        pow(dsf.dimensions(), ds)
+    );
 
-    pow(tPow().field(), dsf.field(), ds.value());
+    pow(tPow.ref().field(), dsf.field(), ds.value());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
+    tdsf.clear();
 
     return tPow;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const DimensionedField<scalar, GeoMesh>& dsf,
     const scalar& s
@@ -287,9 +280,9 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf,
     const scalar& s
 )
 {
@@ -298,13 +291,13 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const dimensionedScalar& ds,
     const DimensionedField<scalar, GeoMesh>& dsf
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tPow
+    tmp<DimensionedField<scalar, GeoMesh>> tPow
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -319,38 +312,37 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
         )
     );
 
-    pow(tPow().field(), ds.value(), dsf.field());
+    pow(tPow.ref().field(), ds.value(), dsf.field());
 
     return tPow;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const dimensionedScalar& ds,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tPow =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf,
-            "pow(" + ds.name() + ',' + dsf.name() + ')',
-            pow(ds, dsf.dimensions())
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tPow = New
+    (
+        tdsf,
+        "pow(" + ds.name() + ',' + dsf.name() + ')',
+        pow(ds, dsf.dimensions())
+    );
 
-    pow(tPow().field(), ds.value(), dsf.field());
+    pow(tPow.ref().field(), ds.value(), dsf.field());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
+    tdsf.clear();
 
     return tPow;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const scalar& s,
     const DimensionedField<scalar, GeoMesh>& dsf
@@ -360,10 +352,10 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > pow
+tmp<DimensionedField<scalar, GeoMesh>> pow
 (
     const scalar& s,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf
 )
 {
     return pow(dimensionedScalar(s), tdsf);
@@ -373,13 +365,13 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const DimensionedField<scalar, GeoMesh>& dsf1,
     const DimensionedField<scalar, GeoMesh>& dsf2
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -394,72 +386,70 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2().field(), dsf1.field(), dsf2.field());
+    atan2(tAtan2.ref().field(), dsf1.field(), dsf2.field());
 
     return tAtan2;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf1,
     const DimensionedField<scalar, GeoMesh>& dsf2
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf1,
-            "atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
-            atan2(dsf1.dimensions(), dsf2.dimensions())
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2 = New
+    (
+        tdsf1,
+        "atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
+        atan2(dsf1.dimensions(), dsf2.dimensions())
+    );
 
-    atan2(tAtan2().field(), dsf1.field(), dsf2.field());
+    atan2(tAtan2.ref().field(), dsf1.field(), dsf2.field());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf1);
+    tdsf1.clear();
 
     return tAtan2;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const DimensionedField<scalar, GeoMesh>& dsf1,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf2
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf2,
-            "atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
-            atan2(dsf1.dimensions(), dsf2.dimensions())
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2 = New
+    (
+        tdsf2,
+        "atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
+        atan2(dsf1.dimensions(), dsf2.dimensions())
+    );
 
-    atan2(tAtan2().field(), dsf1.field(), dsf2.field());
+    atan2(tAtan2.ref().field(), dsf1.field(), dsf2.field());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf2);
+    tdsf2.clear();
 
     return tAtan2;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf1,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf2
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1();
     const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2 =
         reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::
         New
         (
@@ -469,26 +459,23 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
             atan2(dsf1.dimensions(), dsf2.dimensions())
         );
 
-    atan2(tAtan2().field(), dsf1.field(), dsf2.field());
+    atan2(tAtan2.ref().field(), dsf1.field(), dsf2.field());
 
-    reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::clear
-    (
-        tdsf1,
-        tdsf2
-    );
+    tdsf1.clear();
+    tdsf2.clear();
 
     return tAtan2;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const DimensionedField<scalar, GeoMesh>& dsf,
     const dimensionedScalar& ds
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -503,37 +490,36 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2().field(), dsf.field(), ds.value());
+    atan2(tAtan2.ref().field(), dsf.field(), ds.value());
 
     return tAtan2;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf,
     const dimensionedScalar& ds
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf,
-            "atan2(" + dsf.name() + ',' + ds.name() + ')',
-            atan2(dsf.dimensions(), ds)
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2 = New
+    (
+        tdsf,
+        "atan2(" + dsf.name() + ',' + ds.name() + ')',
+        atan2(dsf.dimensions(), ds)
+    );
 
-    atan2(tAtan2().field(), dsf.field(), ds.value());
+    atan2(tAtan2.ref().field(), dsf.field(), ds.value());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
+    tdsf.clear();
 
     return tAtan2;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const DimensionedField<scalar, GeoMesh>& dsf,
     const scalar& s
@@ -543,9 +529,9 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf,
     const scalar& s
 )
 {
@@ -554,13 +540,13 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const dimensionedScalar& ds,
     const DimensionedField<scalar, GeoMesh>& dsf
 )
 {
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2
     (
         new DimensionedField<scalar, GeoMesh>
         (
@@ -575,38 +561,37 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2().field(), ds.value(), dsf.field());
+    atan2(tAtan2.ref().field(), ds.value(), dsf.field());
 
     return tAtan2;
 }
 
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const dimensionedScalar& ds,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf
 )
 {
     const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
 
-    tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
-        (
-            tdsf,
-            "atan2(" + ds.name() + ',' + dsf.name() + ')',
-            atan2(ds, dsf.dimensions())
-        );
+    tmp<DimensionedField<scalar, GeoMesh>> tAtan2 = New
+    (
+        tdsf,
+        "atan2(" + ds.name() + ',' + dsf.name() + ')',
+        atan2(ds, dsf.dimensions())
+    );
 
-    atan2(tAtan2().field(), ds.value(), dsf.field());
+    atan2(tAtan2.ref().field(), ds.value(), dsf.field());
 
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
+    tdsf.clear();
 
     return tAtan2;
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const scalar& s,
     const DimensionedField<scalar, GeoMesh>& dsf
@@ -616,10 +601,10 @@ tmp<DimensionedField<scalar, GeoMesh> > atan2
 }
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > atan2
+tmp<DimensionedField<scalar, GeoMesh>> atan2
 (
     const scalar& s,
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf
 )
 {
     return atan2(dimensionedScalar(s), tdsf);
@@ -667,73 +652,73 @@ UNARY_FUNCTION(scalar, scalar, y1, trans)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BesselFunc(func)                                                    \
-                                                                            \
-template<class GeoMesh>                                                     \
-tmp<DimensionedField<scalar, GeoMesh> > func                                \
-(                                                                           \
-    const int n,                                                            \
-    const DimensionedField<scalar, GeoMesh>& dsf                            \
-)                                                                           \
-{                                                                           \
-    if (!dsf.dimensions().dimensionless())                                  \
-    {                                                                       \
-        FatalErrorInFunction                                                \
-            << "dsf not dimensionless"                                      \
-            << abort(FatalError);                                           \
-    }                                                                       \
-                                                                            \
-    tmp<DimensionedField<scalar, GeoMesh> > tFunc                           \
-    (                                                                       \
-        new DimensionedField<scalar, GeoMesh>                               \
-        (                                                                   \
-            IOobject                                                        \
-            (                                                               \
-                #func "(" + name(n) + ',' + dsf.name() + ')',               \
-                dsf.instance(),                                             \
-                dsf.db()                                                    \
-            ),                                                              \
-            dsf.mesh(),                                                     \
-            dimless                                                         \
-        )                                                                   \
-    );                                                                      \
-                                                                            \
-    func(tFunc().field(), n, dsf.field());                                  \
-                                                                            \
-    return tFunc;                                                           \
-}                                                                           \
-                                                                            \
-template<class GeoMesh>                                                     \
-tmp<DimensionedField<scalar, GeoMesh> > func                                \
-(                                                                           \
-    const int n,                                                            \
-    const tmp<DimensionedField<scalar, GeoMesh> >& tdsf                     \
-)                                                                           \
-{                                                                           \
-    const DimensionedField<scalar, GeoMesh>& dsf = tdsf();                  \
-                                                                            \
-    if (!dsf.dimensions().dimensionless())                                  \
-    {                                                                       \
-        FatalErrorInFunction                                                \
-            << " : dsf not dimensionless"                                   \
-            << abort(FatalError);                                           \
-    }                                                                       \
-                                                                            \
-    tmp<DimensionedField<scalar, GeoMesh> > tFunc                           \
-    (                                                                       \
-        reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New              \
-        (                                                                   \
-            tdsf,                                                           \
-            #func "(" + name(n) + ',' + dsf.name() + ')',                   \
-            dimless                                                         \
-        )                                                                   \
-    );                                                                      \
-                                                                            \
-    func(tFunc().field(), n, dsf.field());                                  \
-                                                                            \
-    reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);         \
-                                                                            \
-    return tFunc;                                                           \
+#define BesselFunc(func)                                                       \
+                                                                               \
+template<class GeoMesh>                                                        \
+tmp<DimensionedField<scalar, GeoMesh>> func                                    \
+(                                                                              \
+    const int n,                                                               \
+    const DimensionedField<scalar, GeoMesh>& dsf                               \
+)                                                                              \
+{                                                                              \
+    if (!dsf.dimensions().dimensionless())                                     \
+    {                                                                          \
+        FatalErrorInFunction                                                   \
+            << "dsf not dimensionless"                                         \
+            << abort(FatalError);                                              \
+    }                                                                          \
+                                                                               \
+    tmp<DimensionedField<scalar, GeoMesh>> tFunc                               \
+    (                                                                          \
+        new DimensionedField<scalar, GeoMesh>                                  \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #func "(" + name(n) + ',' + dsf.name() + ')',                  \
+                dsf.instance(),                                                \
+                dsf.db()                                                       \
+            ),                                                                 \
+            dsf.mesh(),                                                        \
+            dimless                                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    func(tFunc.ref().field(), n, dsf.field());                                 \
+                                                                               \
+    return tFunc;                                                              \
+}                                                                              \
+                                                                               \
+template<class GeoMesh>                                                        \
+tmp<DimensionedField<scalar, GeoMesh>> func                                    \
+(                                                                              \
+    const int n,                                                               \
+    const tmp<DimensionedField<scalar, GeoMesh>>& tdsf                         \
+)                                                                              \
+{                                                                              \
+    const DimensionedField<scalar, GeoMesh>& dsf = tdsf();                     \
+                                                                               \
+    if (!dsf.dimensions().dimensionless())                                     \
+    {                                                                          \
+        FatalErrorInFunction                                                   \
+            << " : dsf not dimensionless"                                      \
+            << abort(FatalError);                                              \
+    }                                                                          \
+                                                                               \
+    tmp<DimensionedField<scalar, GeoMesh>> tFunc                               \
+    (                                                                          \
+        New                                                                    \
+        (                                                                      \
+            tdsf,                                                              \
+            #func "(" + name(n) + ',' + dsf.name() + ')',                      \
+            dimless                                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    func(tFunc.ref().field(), n, dsf.field());                                 \
+                                                                               \
+    tdsf.clear();                                                              \
+                                                                               \
+    return tFunc;                                                              \
 }
 
 BesselFunc(jn)
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H
index 1734c9dde065d606d1da83cad21cf2cace54d7d2..0a9eeae38cf215cfa6c502519c79abd96083784a 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,16 +49,16 @@ namespace Foam
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > stabilise
+tmp<DimensionedField<scalar, GeoMesh>> stabilise
 (
     const DimensionedField<scalar, GeoMesh>&,
     const dimensioned<scalar>&
 );
 
 template<class GeoMesh>
-tmp<DimensionedField<scalar, GeoMesh> > stabilise
+tmp<DimensionedField<scalar, GeoMesh>> stabilise
 (
-    const tmp<DimensionedField<scalar, GeoMesh> >&,
+    const tmp<DimensionedField<scalar, GeoMesh>>&,
     const dimensioned<scalar>&
 );
 
@@ -124,17 +124,17 @@ UNARY_FUNCTION(scalar, scalar, y1, trans)
 #define BesselFunc(func)                                                       \
                                                                                \
 template<class GeoMesh>                                                        \
-tmp<DimensionedField<scalar, GeoMesh> > func                                   \
+tmp<DimensionedField<scalar, GeoMesh>> func                                    \
 (                                                                              \
     const int n,                                                               \
     const DimensionedField<scalar, GeoMesh>&                                   \
 );                                                                             \
                                                                                \
 template<class GeoMesh>                                                        \
-tmp<DimensionedField<scalar, GeoMesh> > func                                   \
+tmp<DimensionedField<scalar, GeoMesh>> func                                    \
 (                                                                              \
     const int n,                                                               \
-    const tmp<DimensionedField<scalar, GeoMesh> >&                             \
+    const tmp<DimensionedField<scalar, GeoMesh>>&                              \
 );
 
 BesselFunc(jn)
@@ -152,7 +152,7 @@ BesselFunc(yn)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "DimensionedScalarField.C"
+    #include "DimensionedScalarField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedSphericalTensorField/DimensionedSphericalTensorField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedSphericalTensorField/DimensionedSphericalTensorField.H
index 2b7cb73ef8537222c9c2f0f492c80961627ab8ca..6a94e7a398f0e025500175e029dddc679b041560 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedSphericalTensorField/DimensionedSphericalTensorField.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedSphericalTensorField/DimensionedSphericalTensorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,7 @@ BINARY_TYPE_OPERATOR(sphericalTensor, scalar, sphericalTensor, /, '|', divide)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "DimensionedSphericalTensorField.C"
+    #include "DimensionedSphericalTensorField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedSymmTensorField/DimensionedSymmTensorField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedSymmTensorField/DimensionedSymmTensorField.H
index 01f8c2a037033442f62ba6584def904d51d43591..b046816f2c79b4c24c2add5c7ad6b2c85f5a30c5 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedSymmTensorField/DimensionedSymmTensorField.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedSymmTensorField/DimensionedSymmTensorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ UNARY_OPERATOR(vector, symmTensor, *, hdual, transform)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "DimensionedSymmTensorField.C"
+    #include "DimensionedSymmTensorField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H
index d0a62746aa6b0fc6d3c316a99532ef5171647b01..8b20379d7667a04301e795f9985a14446f436457 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedTensorField/DimensionedTensorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ UNARY_OPERATOR(tensor, vector, *, hdual, transform)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "DimensionedTensorField.C"
+    #include "DimensionedTensorField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C
index 6042b204488e5f5ddf3e10ba287907b333c5688c..940afea59b47312667451318b77f789d1804a113 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,14 +107,14 @@ void checkFields
 template<template<class> class Field, class Type>
 FieldField<Field, Type>::FieldField()
 :
-    PtrList<Field<Type> >()
+    PtrList<Field<Type>>()
 {}
 
 
 template<template<class> class Field, class Type>
 FieldField<Field, Type>::FieldField(const label size)
 :
-    PtrList<Field<Type> >(size)
+    PtrList<Field<Type>>(size)
 {}
 
 
@@ -125,7 +125,7 @@ FieldField<Field, Type>::FieldField
     const FieldField<Field, Type>& ff
 )
 :
-    PtrList<Field<Type> >(ff.size())
+    PtrList<Field<Type>>(ff.size())
 {
     forAll(*this, i)
     {
@@ -137,38 +137,36 @@ FieldField<Field, Type>::FieldField
 template<template<class> class Field, class Type>
 FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f)
 :
-    refCount(),
-    PtrList<Field<Type> >(f)
+    tmp<FieldField<Field, Type>>::refCount(),
+    PtrList<Field<Type>>(f)
 {}
 
 
 template<template<class> class Field, class Type>
-FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reUse)
+FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reuse)
 :
-    refCount(),
-    PtrList<Field<Type> >(f, reUse)
+    PtrList<Field<Type>>(f, reuse)
 {}
 
 
 template<template<class> class Field, class Type>
-FieldField<Field, Type>::FieldField(const PtrList<Field<Type> >& tl)
+FieldField<Field, Type>::FieldField(const PtrList<Field<Type>>& tl)
 :
-    PtrList<Field<Type> >(tl)
+    PtrList<Field<Type>>(tl)
 {}
 
 
-// Construct as copy of tmp<FieldField>
 #ifndef NoConstructFromTmp
 template<template<class> class Field, class Type>
-FieldField<Field, Type>::FieldField(const tmp<FieldField<Field, Type> >& tf)
+FieldField<Field, Type>::FieldField(const tmp<FieldField<Field, Type>>& tf)
 :
-    PtrList<Field<Type> >
+    PtrList<Field<Type>>
     (
         const_cast<FieldField<Field, Type>&>(tf()),
         tf.isTmp()
     )
 {
-    const_cast<FieldField<Field, Type>&>(tf()).resetRefCount();
+    tf.clear();
 }
 #endif
 
@@ -176,20 +174,20 @@ FieldField<Field, Type>::FieldField(const tmp<FieldField<Field, Type> >& tf)
 template<template<class> class Field, class Type>
 FieldField<Field, Type>::FieldField(Istream& is)
 :
-    PtrList<Field<Type> >(is)
+    PtrList<Field<Type>>(is)
 {}
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > FieldField<Field, Type>::clone() const
+tmp<FieldField<Field, Type>> FieldField<Field, Type>::clone() const
 {
-    return tmp<FieldField<Field, Type> >(new FieldField<Field, Type>(*this));
+    return tmp<FieldField<Field, Type>>(new FieldField<Field, Type>(*this));
 }
 
 
 template<template<class> class Field, class Type>
 template<class Type2>
-tmp<FieldField<Field, Type> > FieldField<Field, Type>::NewCalculatedType
+tmp<FieldField<Field, Type>> FieldField<Field, Type>::NewCalculatedType
 (
     const FieldField<Field, Type2>& ff
 )
@@ -204,7 +202,7 @@ tmp<FieldField<Field, Type> > FieldField<Field, Type>::NewCalculatedType
         nffPtr->set(i, Field<Type>::NewCalculatedType(ff[i]).ptr());
     }
 
-    return tmp<FieldField<Field, Type> >(nffPtr);
+    return tmp<FieldField<Field, Type>>(nffPtr);
 }
 
 
@@ -221,19 +219,19 @@ void FieldField<Field, Type>::negate()
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> >
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
 FieldField<Field, Type>::component
 (
     const direction d
 ) const
 {
-    tmp<FieldField<Field, cmptType> > Component
+    tmp<FieldField<Field, cmptType>> Component
     (
         FieldField<Field, typename FieldField<Field, Type>::cmptType>::
             NewCalculatedType(*this)
     );
 
-    ::Foam::component(Component(), *this, d);
+    ::Foam::component(Component.ref(), *this, d);
 
     return Component;
 }
@@ -268,14 +266,14 @@ void FieldField<Field, Type>::replace
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > FieldField<Field, Type>::T() const
+tmp<FieldField<Field, Type>> FieldField<Field, Type>::T() const
 {
-    tmp<FieldField<Field, Type> > transpose
+    tmp<FieldField<Field, Type>> transpose
     (
         FieldField<Field, Type>::NewCalculatedType(*this)
     );
 
-    ::Foam::T(transpose(), *this);
+    ::Foam::T(transpose.ref(), *this);
     return transpose;
 }
 
@@ -311,7 +309,7 @@ void FieldField<Field, Type>::operator=(const tmp<FieldField>& tf)
 
     // This is dodgy stuff, don't try this at home.
     FieldField* fieldPtr = tf.ptr();
-    PtrList<Field<Type> >::transfer(*fieldPtr);
+    PtrList<Field<Type>>::transfer(*fieldPtr);
     delete fieldPtr;
 }
 
@@ -326,34 +324,34 @@ void FieldField<Field, Type>::operator=(const Type& t)
 }
 
 
-#define COMPUTED_ASSIGNMENT(TYPE, op)                                         \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f)   \
-{                                                                             \
-    forAll(*this, i)                                                          \
-    {                                                                         \
-        this->operator[](i) op f[i];                                          \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-void FieldField<Field, Type>::operator op                                     \
-(                                                                             \
-    const tmp<FieldField<Field, TYPE> >& tf                                   \
-)                                                                             \
-{                                                                             \
-    operator op(tf());                                                        \
-    tf.clear();                                                               \
-}                                                                             \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-void FieldField<Field, Type>::operator op(const TYPE& t)                      \
-{                                                                             \
-    forAll(*this, i)                                                          \
-    {                                                                         \
-        this->operator[](i) op t;                                             \
-    }                                                                         \
+#define COMPUTED_ASSIGNMENT(TYPE, op)                                          \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+void FieldField<Field, Type>::operator op(const FieldField<Field, TYPE>& f)    \
+{                                                                              \
+    forAll(*this, i)                                                           \
+    {                                                                          \
+        this->operator[](i) op f[i];                                           \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+void FieldField<Field, Type>::operator op                                      \
+(                                                                              \
+    const tmp<FieldField<Field, TYPE>>& tf                                     \
+)                                                                              \
+{                                                                              \
+    operator op(tf());                                                         \
+    tf.clear();                                                                \
+}                                                                              \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+void FieldField<Field, Type>::operator op(const TYPE& t)                       \
+{                                                                              \
+    forAll(*this, i)                                                           \
+    {                                                                          \
+        this->operator[](i) op t;                                              \
+    }                                                                          \
 }
 
 COMPUTED_ASSIGNMENT(Type, +=)
@@ -369,13 +367,13 @@ COMPUTED_ASSIGNMENT(scalar, /=)
 template<template<class> class Field, class Type>
 Ostream& operator<<(Ostream& os, const FieldField<Field, Type>& f)
 {
-    os << static_cast<const PtrList<Field<Type> >&>(f);
+    os << static_cast<const PtrList<Field<Type>>&>(f);
     return os;
 }
 
 
 template<template<class> class Field, class Type>
-Ostream& operator<<(Ostream& os, const tmp<FieldField<Field, Type> >& tf)
+Ostream& operator<<(Ostream& os, const tmp<FieldField<Field, Type>>& tf)
 {
     os << tf();
     tf.clear();
@@ -389,6 +387,6 @@ Ostream& operator<<(Ostream& os, const tmp<FieldField<Field, Type> >& tf)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "FieldFieldFunctions.C"
+    #include "FieldFieldFunctions.C"
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
index 94f89dbf6a38a987cc7e0a5b51f97594ec9e7778..2f2b27353580f2d6b8b1fa124583de7d1b9aad2c 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ template<template<class> class Field, class Type>
 Ostream& operator<<
 (
     Ostream&,
-    const tmp<FieldField<Field, Type> >&
+    const tmp<FieldField<Field, Type>>&
 );
 
 
@@ -73,8 +73,8 @@ Ostream& operator<<
 template<template<class> class Field, class Type>
 class FieldField
 :
-    public refCount,
-    public PtrList<Field<Type> >
+    public tmp<FieldField<Field, Type>>::refCount,
+    public PtrList<Field<Type>>
 {
 
 public:
@@ -102,26 +102,26 @@ public:
         FieldField(const FieldField<Field, Type>&);
 
         //- Construct as copy or re-use as specified.
-        FieldField(FieldField<Field, Type>&, bool reUse);
+        FieldField(FieldField<Field, Type>&, bool reuse);
 
         //- Construct as copy of a PtrList<Field, Type>
-        FieldField(const PtrList<Field<Type> >&);
+        FieldField(const PtrList<Field<Type>>&);
 
         //- Construct as copy of tmp<FieldField>
         #ifndef NoConstructFromTmp
-        FieldField(const tmp<FieldField<Field, Type> >&);
+        FieldField(const tmp<FieldField<Field, Type>>&);
         #endif
 
         //- Construct from Istream
         FieldField(Istream&);
 
         //- Clone
-        tmp<FieldField<Field, Type> > clone() const;
+        tmp<FieldField<Field, Type>> clone() const;
 
         //- Return a pointer to a new calculatedFvPatchFieldField created on
         //  freestore without setting patchField values
         template<class Type2>
-        static tmp<FieldField<Field, Type> > NewCalculatedType
+        static tmp<FieldField<Field, Type>> NewCalculatedType
         (
             const FieldField<Field, Type2>& ff
         );
@@ -133,7 +133,7 @@ public:
         void negate();
 
         //- Return a component field of the field
-        tmp<FieldField<Field, cmptType> > component(const direction) const;
+        tmp<FieldField<Field, cmptType>> component(const direction) const;
 
         //- Replace a component field of the field
         void replace(const direction, const FieldField<Field, cmptType>&);
@@ -142,26 +142,26 @@ public:
         void replace(const direction, const cmptType&);
 
         //- Return the field transpose (only defined for second rank tensors)
-        tmp<FieldField<Field, Type> > T() const;
+        tmp<FieldField<Field, Type>> T() const;
 
 
     // Member operators
 
         void operator=(const FieldField<Field, Type>&);
-        void operator=(const tmp<FieldField<Field, Type> >&);
+        void operator=(const tmp<FieldField<Field, Type>>&);
         void operator=(const Type&);
 
         void operator+=(const FieldField<Field, Type>&);
-        void operator+=(const tmp<FieldField<Field, Type> >&);
+        void operator+=(const tmp<FieldField<Field, Type>>&);
 
         void operator-=(const FieldField<Field, Type>&);
-        void operator-=(const tmp<FieldField<Field, Type> >&);
+        void operator-=(const tmp<FieldField<Field, Type>>&);
 
         void operator*=(const FieldField<Field, scalar>&);
-        void operator*=(const tmp<FieldField<Field, scalar> >&);
+        void operator*=(const tmp<FieldField<Field, scalar>>&);
 
         void operator/=(const FieldField<Field, scalar>&);
-        void operator/=(const tmp<FieldField<Field, scalar> >&);
+        void operator/=(const tmp<FieldField<Field, scalar>>&);
 
         void operator+=(const Type&);
         void operator-=(const Type&);
@@ -181,7 +181,7 @@ public:
         friend Ostream& operator<< <Field, Type>
         (
             Ostream&,
-            const tmp<FieldField<Field, Type> >&
+            const tmp<FieldField<Field, Type>>&
         );
 };
 
@@ -195,7 +195,7 @@ public:
 #include "FieldFieldFunctions.H"
 
 #ifdef NoRepository
-#   include "FieldField.C"
+    #include "FieldField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C
index 1c6a990f3586af0cece839111a2b454f438000e3..f30797a79363b6c122418c7972bf8f81c7bc468a 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ void T(FieldField<Field, Type>& f1, const FieldField<Field, Type>& f2)
 }
 
 
-template<template<class> class Field, class Type, int r>
+template<template<class> class Field, class Type, direction r>
 void pow
 (
     FieldField<Field, typename powProduct<Type, r>::type>& f,
@@ -74,36 +74,36 @@ void pow
     }
 }
 
-template<template<class> class Field, class Type, int r>
-tmp<FieldField<Field, typename powProduct<Type, r>::type> >
+template<template<class> class Field, class Type, direction r>
+tmp<FieldField<Field, typename powProduct<Type, r>::type>>
 pow
 (
     const FieldField<Field, Type>& f, typename powProduct<Type, r>::type
 )
 {
     typedef typename powProduct<Type, r>::type powProductType;
-    tmp<FieldField<Field, powProductType> > tRes
+    tmp<FieldField<Field, powProductType>> tRes
     (
         FieldField<Field, powProductType>::NewCalculatedType(f)
     );
-    pow<Type, r>(tRes(), f);
+    pow<Type, r>(tRes.ref(), f);
     return tRes;
 }
 
-template<template<class> class Field, class Type, int r>
-tmp<FieldField<Field, typename powProduct<Type, r>::type> >
+template<template<class> class Field, class Type, direction r>
+tmp<FieldField<Field, typename powProduct<Type, r>::type>>
 pow
 (
-    const tmp<FieldField<Field, Type> >& tf, typename powProduct<Type, r>::type
+    const tmp<FieldField<Field, Type>>& tf, typename powProduct<Type, r>::type
 )
 {
     typedef typename powProduct<Type, r>::type powProductType;
-    tmp<FieldField<Field, powProductType> > tRes
+    tmp<FieldField<Field, powProductType>> tRes
     (
         reuseTmpFieldField<Field, powProductType, Type>::New(tf)
     );
-    pow<Type, r>(tRes(), tf());
-    reuseTmpFieldField<Field, powProductType, Type>::clear(tf);
+    pow<Type, r>(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -122,29 +122,29 @@ void sqr
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename outerProduct<Type, Type>::type> >
+tmp<FieldField<Field, typename outerProduct<Type, Type>::type>>
 sqr(const FieldField<Field, Type>& f)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
-    tmp<FieldField<Field, outerProductType> > tRes
+    tmp<FieldField<Field, outerProductType>> tRes
     (
         FieldField<Field, outerProductType>::NewCalculatedType(f)
     );
-    sqr(tRes(), f);
+    sqr(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename outerProduct<Type, Type>::type> >
-sqr(const tmp<FieldField<Field, Type> >& tf)
+tmp<FieldField<Field, typename outerProduct<Type, Type>::type>>
+sqr(const tmp<FieldField<Field, Type>>& tf)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
-    tmp<FieldField<Field, outerProductType> > tRes
+    tmp<FieldField<Field, outerProductType>> tRes
     (
         reuseTmpFieldField<Field, outerProductType, Type>::New(tf)
     );
-    sqr(tRes(), tf());
-    reuseTmpFieldField<Field, outerProductType, Type>::clear(tf);
+    sqr(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -159,27 +159,27 @@ void magSqr(FieldField<Field, scalar>& sf, const FieldField<Field, Type>& f)
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > magSqr(const FieldField<Field, Type>& f)
+tmp<FieldField<Field, scalar>> magSqr(const FieldField<Field, Type>& f)
 {
-    tmp<FieldField<Field, scalar> > tRes
+    tmp<FieldField<Field, scalar>> tRes
     (
         FieldField<Field, scalar>::NewCalculatedType(f)
     );
 
-    magSqr(tRes(), f);
+    magSqr(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > magSqr(const tmp<FieldField<Field, Type> >& tf)
+tmp<FieldField<Field, scalar>> magSqr(const tmp<FieldField<Field, Type>>& tf)
 {
-    tmp<FieldField<Field, scalar> > tRes
+    tmp<FieldField<Field, scalar>> tRes
     (
         reuseTmpFieldField<Field, scalar, Type>::New(tf)
     );
 
-    magSqr(tRes(), tf());
-    reuseTmpFieldField<Field, scalar, Type>::clear(tf);
+    magSqr(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -194,27 +194,27 @@ void mag(FieldField<Field, scalar>& sf, const FieldField<Field, Type>& f)
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > mag(const FieldField<Field, Type>& f)
+tmp<FieldField<Field, scalar>> mag(const FieldField<Field, Type>& f)
 {
-    tmp<FieldField<Field, scalar> > tRes
+    tmp<FieldField<Field, scalar>> tRes
     (
         FieldField<Field, scalar>::NewCalculatedType(f)
     );
 
-    mag(tRes(), f);
+    mag(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > mag(const tmp<FieldField<Field, Type> >& tf)
+tmp<FieldField<Field, scalar>> mag(const tmp<FieldField<Field, Type>>& tf)
 {
-    tmp<FieldField<Field, scalar> > tRes
+    tmp<FieldField<Field, scalar>> tRes
     (
         reuseTmpFieldField<Field, scalar, Type>::New(tf)
     );
 
-    mag(tRes(), tf());
-    reuseTmpFieldField<Field, scalar, Type>::clear(tf);
+    mag(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -233,33 +233,33 @@ void cmptMax
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMax
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMax
 (
     const FieldField<Field, Type>& f
 )
 {
     typedef typename FieldField<Field, Type>::cmptType cmptType;
-    tmp<FieldField<Field, cmptType> > tRes
+    tmp<FieldField<Field, cmptType>> tRes
     (
         FieldField<Field, cmptType>::NewCalculatedType(f)
     );
-    cmptMax(tRes(), f);
+    cmptMax(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMax
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMax
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 )
 {
     typedef typename FieldField<Field, Type>::cmptType cmptType;
-    tmp<FieldField<Field, cmptType> > tRes
+    tmp<FieldField<Field, cmptType>> tRes
     (
         reuseTmpFieldField<Field, cmptType, Type>::New(tf)
     );
-    cmptMax(tRes(), tf());
-    reuseTmpFieldField<Field, cmptType, Type>::clear(tf);
+    cmptMax(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -278,33 +278,33 @@ void cmptMin
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMin
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMin
 (
     const FieldField<Field, Type>& f
 )
 {
     typedef typename FieldField<Field, Type>::cmptType cmptType;
-    tmp<FieldField<Field, cmptType> > tRes
+    tmp<FieldField<Field, cmptType>> tRes
     (
         FieldField<Field, cmptType>::NewCalculatedType(f)
     );
-    cmptMin(tRes(), f);
+    cmptMin(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMin
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMin
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 )
 {
     typedef typename FieldField<Field, Type>::cmptType cmptType;
-    tmp<FieldField<Field, cmptType> > tRes
+    tmp<FieldField<Field, cmptType>> tRes
     (
         reuseTmpFieldField<Field, cmptType, Type>::New(tf)
     );
-    cmptMin(tRes(), tf());
-    reuseTmpFieldField<Field, cmptType, Type>::clear(tf);
+    cmptMin(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -323,33 +323,33 @@ void cmptAv
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptAv
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptAv
 (
     const FieldField<Field, Type>& f
 )
 {
     typedef typename FieldField<Field, Type>::cmptType cmptType;
-    tmp<FieldField<Field, cmptType> > tRes
+    tmp<FieldField<Field, cmptType>> tRes
     (
         FieldField<Field, cmptType>::NewCalculatedType(f)
     );
-    cmptAv(tRes(), f);
+    cmptAv(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptAv
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptAv
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 )
 {
     typedef typename FieldField<Field, Type>::cmptType cmptType;
-    tmp<FieldField<Field, cmptType> > tRes
+    tmp<FieldField<Field, cmptType>> tRes
     (
         reuseTmpFieldField<Field, cmptType, Type>::New(tf)
     );
-    cmptAv(tRes(), tf());
-    reuseTmpFieldField<Field, cmptType, Type>::clear(tf);
+    cmptAv(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -368,43 +368,40 @@ void cmptMag
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > cmptMag
+tmp<FieldField<Field, Type>> cmptMag
 (
     const FieldField<Field, Type>& f
 )
 {
-    tmp<FieldField<Field, Type> > tRes
+    tmp<FieldField<Field, Type>> tRes
     (
         FieldField<Field, Type>::NewCalculatedType(f)
     );
-    cmptMag(tRes(), f);
+    cmptMag(tRes.ref(), f);
     return tRes;
 }
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > cmptMag
+tmp<FieldField<Field, Type>> cmptMag
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 )
 {
-    tmp<FieldField<Field, Type> > tRes
-    (
-        reuseTmpFieldField<Field, Type, Type>::New(tf)
-    );
-    cmptMag(tRes(), tf());
-    reuseTmpFieldField<Field, Type, Type>::clear(tf);
+    tmp<FieldField<Field, Type>> tRes(New(tf));
+    cmptMag(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
 
-#define TMP_UNARY_FUNCTION(returnType, func)                                  \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-returnType func(const tmp<FieldField<Field, Type> >& tf1)                     \
-{                                                                             \
-    returnType res = func(tf1());                                             \
-    tf1.clear();                                                              \
-    return res;                                                               \
+#define TMP_UNARY_FUNCTION(returnType, func)                                   \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+returnType func(const tmp<FieldField<Field, Type>>& tf1)                       \
+{                                                                              \
+    returnType res = func(tf1());                                              \
+    tf1.clear();                                                               \
+    return res;                                                                \
 }
 
 template<template<class> class Field, class Type>
@@ -471,7 +468,7 @@ Type sum(const FieldField<Field, Type>& f)
 {
     if (f.size())
     {
-        Type Sum = pTraits<Type>::zero;
+        Type Sum = Zero;
 
         forAll(f, i)
         {
@@ -482,7 +479,7 @@ Type sum(const FieldField<Field, Type>& f)
     }
     else
     {
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -527,7 +524,7 @@ Type average(const FieldField<Field, Type>& f)
             WarningInFunction
                 << "empty fieldField, returning zero" << endl;
 
-            return pTraits<Type>::zero;
+            return Zero;
         }
 
         Type avrg = sum(f)/n;
@@ -539,24 +536,22 @@ Type average(const FieldField<Field, Type>& f)
         WarningInFunction
             << "empty fieldField, returning zero" << endl;
 
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
 TMP_UNARY_FUNCTION(Type, average)
 
 
-#include "PstreamReduceOps.H"
-
-#define G_UNARY_FUNCTION(returnType, gFunc, func, rFunc)                      \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-returnType gFunc(const FieldField<Field, Type>& f)                            \
-{                                                                             \
-    returnType res = func(f);                                                 \
-    reduce(res, rFunc##Op<Type>());                                           \
-    return res;                                                               \
-}                                                                             \
+#define G_UNARY_FUNCTION(returnType, gFunc, func, rFunc)                       \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+returnType gFunc(const FieldField<Field, Type>& f)                             \
+{                                                                              \
+    returnType res = func(f);                                                  \
+    reduce(res, rFunc##Op<Type>());                                            \
+    return res;                                                                \
+}                                                                              \
 TMP_UNARY_FUNCTION(returnType, gFunc)
 
 G_UNARY_FUNCTION(Type, gMax, max, max)
@@ -590,7 +585,7 @@ Type gAverage(const FieldField<Field, Type>& f)
         WarningInFunction
             << "empty fieldField, returning zero" << endl;
 
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -655,7 +650,7 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field1, Type1>& f1,                                       \
@@ -663,29 +658,29 @@ operator op                                                                    \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type1, Type2>::type productType;                  \
-    tmp<FieldField<Field1, productType> > tRes                                 \
+    tmp<FieldField<Field1, productType>> tRes                                  \
     (                                                                          \
         FieldField<Field1, productType>::NewCalculatedType(f1)                 \
     );                                                                         \
-    opFunc(tRes(), f1, f2);                                                    \
+    opFunc(tRes.ref(), f1, f2);                                                \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
 template<template<class> class Field, class Type1, class Type2>                \
-tmp<FieldField<Field, typename product<Type1, Type2>::type> >                  \
+tmp<FieldField<Field, typename product<Type1, Type2>::type>>                   \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field, Type1>& f1,                                        \
-    const tmp<FieldField<Field, Type2> >& tf2                                  \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type1, Type2>::type productType;                  \
-    tmp<FieldField<Field, productType> > tRes                                  \
+    tmp<FieldField<Field, productType>> tRes                                   \
     (                                                                          \
         reuseTmpFieldField<Field, productType, Type2>::New(tf2)                \
     );                                                                         \
-    opFunc(tRes(), f1, tf2());                                                 \
-    reuseTmpFieldField<Field, productType, Type2>::clear(tf2);                 \
+    opFunc(tRes.ref(), f1, tf2());                                             \
+    tf2.clear();                                                               \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
@@ -696,19 +691,19 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field, typename product<Type1, Type2>::type> >                  \
+tmp<FieldField<Field, typename product<Type1, Type2>::type>>                   \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field1, Type1>& f1,                                       \
-    const tmp<FieldField<Field2, Type2> >& tf2                                 \
+    const tmp<FieldField<Field2, Type2>>& tf2                                  \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type1, Type2>::type productType;                  \
-    tmp<FieldField<Field1, productType> > tRes                                 \
+    tmp<FieldField<Field1, productType>> tRes                                  \
     (                                                                          \
         FieldField<Field1, productType>::NewCalculatedType(f1)                 \
     );                                                                         \
-    opFunc(tRes(), f1, tf2());                                                 \
+    opFunc(tRes.ref(), f1, tf2());                                             \
     tf2.clear();                                                               \
     return tRes;                                                               \
 }                                                                              \
@@ -720,20 +715,20 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
-    const tmp<FieldField<Field1, Type1> >& tf1,                                \
+    const tmp<FieldField<Field1, Type1>>& tf1,                                 \
     const FieldField<Field2, Type2>& f2                                        \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type1, Type2>::type productType;                  \
-    tmp<FieldField<Field1, productType> > tRes                                 \
+    tmp<FieldField<Field1, productType>> tRes                                  \
     (                                                                          \
         reuseTmpFieldField<Field1, productType, Type1>::New(tf1)               \
     );                                                                         \
-    opFunc(tRes(), tf1(), f2);                                                 \
-    reuseTmpFieldField<Field1, productType, Type1>::clear(tf1);                \
+    opFunc(tRes.ref(), tf1(), f2);                                             \
+    tf1.clear();                                                               \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
@@ -744,27 +739,33 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
-    const tmp<FieldField<Field1, Type1> >& tf1,                                \
-    const tmp<FieldField<Field2, Type2> >& tf2                                 \
+    const tmp<FieldField<Field1, Type1>>& tf1,                                 \
+    const tmp<FieldField<Field2, Type2>>& tf2                                  \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type1, Type2>::type productType;                  \
-    tmp<FieldField<Field1, productType> > tRes                                 \
+    tmp<FieldField<Field1, productType>> tRes                                  \
     (                                                                          \
         reuseTmpTmpFieldField<Field1, productType, Type1, Type1, Type2>::New   \
         (tf1, tf2)                                                             \
     );                                                                         \
-    opFunc(tRes(), tf1(), tf2());                                              \
-    reuseTmpTmpFieldField<Field1, productType, Type1, Type1, Type2>::clear     \
-    (tf1, tf2);                                                                \
+    opFunc(tRes.ref(), tf1(), tf2());                                          \
+    tf1.clear();                                                               \
+    tf2.clear();                                                               \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt>   \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
 void opFunc                                                                    \
 (                                                                              \
     FieldField<Field, typename product<Type, Form>::type>& f,                  \
@@ -779,8 +780,14 @@ void opFunc                                                                    \
 }                                                                              \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt>   \
-tmp<FieldField<Field, typename product<Type, Form>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Type, Form>::type>>                     \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field, Type>& f1,                                         \
@@ -788,35 +795,47 @@ operator op                                                                    \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type, Form>::type productType;                    \
-    tmp<FieldField<Field, productType> > tRes                                  \
+    tmp<FieldField<Field, productType>> tRes                                   \
     (                                                                          \
         FieldField<Field, productType>::NewCalculatedType(f1)                  \
     );                                                                         \
-    opFunc(tRes(), f1, static_cast<const Form&>(vs));                          \
+    opFunc(tRes.ref(), f1, static_cast<const Form&>(vs));                      \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt>   \
-tmp<FieldField<Field, typename product<Type, Form>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Type, Form>::type>>                     \
 operator op                                                                    \
 (                                                                              \
-    const tmp<FieldField<Field, Type> >& tf1,                                  \
+    const tmp<FieldField<Field, Type>>& tf1,                                   \
     const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
 )                                                                              \
 {                                                                              \
     typedef typename product<Type, Form>::type productType;                    \
-    tmp<FieldField<Field, productType> > tRes                                  \
+    tmp<FieldField<Field, productType>> tRes                                   \
     (                                                                          \
         reuseTmpFieldField<Field, productType, Type>::New(tf1)                 \
     );                                                                         \
-    opFunc(tRes(), tf1(), static_cast<const Form&>(vs));                       \
-    reuseTmpFieldField<Field, productType, Type>::clear(tf1);                  \
+    opFunc(tRes.ref(), tf1(), static_cast<const Form&>(vs));                   \
+    tf1.clear();                                                               \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type>   \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
 void opFunc                                                                    \
 (                                                                              \
     FieldField<Field, typename product<Form, Type>::type>& f,                  \
@@ -831,8 +850,14 @@ void opFunc                                                                    \
 }                                                                              \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type>   \
-tmp<FieldField<Field, typename product<Form, Type>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Form, Type>::type>>                     \
 operator op                                                                    \
 (                                                                              \
     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
@@ -840,30 +865,36 @@ operator op                                                                    \
 )                                                                              \
 {                                                                              \
     typedef typename product<Form, Type>::type productType;                    \
-    tmp<FieldField<Field, productType> > tRes                                  \
+    tmp<FieldField<Field, productType>> tRes                                   \
     (                                                                          \
         FieldField<Field, productType>::NewCalculatedType(f1)                  \
     );                                                                         \
-    opFunc(tRes(), static_cast<const Form&>(vs), f1);                          \
+    opFunc(tRes.ref(), static_cast<const Form&>(vs), f1);                      \
     return tRes;                                                               \
 }                                                                              \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type>   \
-tmp<FieldField<Field, typename product<Form, Type>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Form, Type>::type>>                     \
 operator op                                                                    \
 (                                                                              \
     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
-    const tmp<FieldField<Field, Type> >& tf1                                   \
+    const tmp<FieldField<Field, Type>>& tf1                                    \
 )                                                                              \
 {                                                                              \
     typedef typename product<Form, Type>::type productType;                    \
-    tmp<FieldField<Field, productType> > tRes                                  \
+    tmp<FieldField<Field, productType>> tRes                                   \
     (                                                                          \
         reuseTmpFieldField<Field, productType, Type>::New(tf1)                 \
     );                                                                         \
-    opFunc(tRes(), static_cast<const Form&>(vs), tf1());                       \
-    reuseTmpFieldField<Field, productType, Type>::clear(tf1);                  \
+    opFunc(tRes.ref(), static_cast<const Form&>(vs), tf1());                   \
+    tf1.clear();                                                               \
     return tRes;                                                               \
 }
 
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H
index 97dccf45106b34b2d32676aa9eb1326849337d3e..7934f860921e47a9ce41594b0d664d0bbdd00445 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,26 +47,26 @@ template<template<class> class Field, class Type>
 void T(FieldField<Field, Type>& f1, const FieldField<Field, Type>& f2);
 
 
-template<template<class> class Field, class Type, int r>
+template<template<class> class Field, class Type, direction r>
 void pow
 (
     FieldField<Field, typename powProduct<Type, r>::type>& f,
     const FieldField<Field, Type>& vf
 );
 
-template<template<class> class Field, class Type, int r>
-tmp<FieldField<Field, typename powProduct<Type, r>::type> >
+template<template<class> class Field, class Type, direction r>
+tmp<FieldField<Field, typename powProduct<Type, r>::type>>
 pow
 (
     const FieldField<Field, Type>& f, typename powProduct<Type, r>::type
         = pTraits<typename powProduct<Type, r>::type>::zero
 );
 
-template<template<class> class Field, class Type, int r>
-tmp<FieldField<Field, typename powProduct<Type, r>::type> >
+template<template<class> class Field, class Type, direction r>
+tmp<FieldField<Field, typename powProduct<Type, r>::type>>
 pow
 (
-    const tmp<FieldField<Field, Type> >& tf, typename powProduct<Type, r>::type
+    const tmp<FieldField<Field, Type>>& tf, typename powProduct<Type, r>::type
         = pTraits<typename powProduct<Type, r>::type>::zero
 );
 
@@ -79,30 +79,30 @@ void sqr
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename outerProduct<Type, Type>::type> >
+tmp<FieldField<Field, typename outerProduct<Type, Type>::type>>
 sqr(const FieldField<Field, Type>& f);
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename outerProduct<Type, Type>::type> >
-sqr(const tmp<FieldField<Field, Type> >& tf);
+tmp<FieldField<Field, typename outerProduct<Type, Type>::type>>
+sqr(const tmp<FieldField<Field, Type>>& tf);
 
 template<template<class> class Field, class Type>
 void magSqr(FieldField<Field, scalar>& sf, const FieldField<Field, Type>& f);
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > magSqr(const FieldField<Field, Type>& f);
+tmp<FieldField<Field, scalar>> magSqr(const FieldField<Field, Type>& f);
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > magSqr(const tmp<FieldField<Field, Type> >& tf);
+tmp<FieldField<Field, scalar>> magSqr(const tmp<FieldField<Field, Type>>& tf);
 
 template<template<class> class Field, class Type>
 void mag(FieldField<Field, scalar>& sf, const FieldField<Field, Type>& f);
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > mag(const FieldField<Field, Type>& f);
+tmp<FieldField<Field, scalar>> mag(const FieldField<Field, Type>& f);
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, scalar> > mag(const tmp<FieldField<Field, Type> >& tf);
+tmp<FieldField<Field, scalar>> mag(const tmp<FieldField<Field, Type>>& tf);
 
 
 template<template<class> class Field, class Type>
@@ -113,15 +113,15 @@ void cmptMax
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMax
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMax
 (
     const FieldField<Field, Type>& f
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMax
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMax
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 );
 
 
@@ -133,15 +133,15 @@ void cmptMin
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMin
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMin
 (
     const FieldField<Field, Type>& f
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptMin
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptMin
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 );
 
 
@@ -153,15 +153,15 @@ void cmptAv
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptAv
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptAv
 (
     const FieldField<Field, Type>& f
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType> > cmptAv
+tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>> cmptAv
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 );
 
 
@@ -173,22 +173,22 @@ void cmptMag
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > cmptMag
+tmp<FieldField<Field, Type>> cmptMag
 (
     const FieldField<Field, Type>& f
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > cmptMag
+tmp<FieldField<Field, Type>> cmptMag
 (
-    const tmp<FieldField<Field, Type> >& tf
+    const tmp<FieldField<Field, Type>>& tf
 );
 
 
-#define TMP_UNARY_FUNCTION(returnType, func)                                  \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-returnType func(const tmp<FieldField<Field, Type> >& tf1);
+#define TMP_UNARY_FUNCTION(returnType, func)                                   \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+returnType func(const tmp<FieldField<Field, Type>>& tf1);
 
 template<template<class> class Field, class Type>
 Type max(const FieldField<Field, Type>& f);
@@ -216,10 +216,10 @@ Type average(const FieldField<Field, Type>& f);
 TMP_UNARY_FUNCTION(Type, average)
 
 
-#define G_UNARY_FUNCTION(returnType, gFunc, func, rFunc)                      \
-                                                                              \
-template<template<class> class Field, class Type>                             \
-returnType gFunc(const FieldField<Field, Type>& f);                           \
+#define G_UNARY_FUNCTION(returnType, gFunc, func, rFunc)                       \
+                                                                               \
+template<template<class> class Field, class Type>                              \
+returnType gFunc(const FieldField<Field, Type>& f);                            \
 TMP_UNARY_FUNCTION(returnType, gFunc)
 
 G_UNARY_FUNCTION(Type, gMax, max, max)
@@ -288,7 +288,7 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field1, Type1>& f1,                                       \
@@ -296,11 +296,11 @@ operator op                                                                    \
 );                                                                             \
                                                                                \
 template<template<class> class Field, class Type1, class Type2>                \
-tmp<FieldField<Field, typename product<Type1, Type2>::type> >                  \
+tmp<FieldField<Field, typename product<Type1, Type2>::type>>                   \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field, Type1>& f1,                                        \
-    const tmp<FieldField<Field, Type2> >& tf2                                  \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
 );                                                                             \
                                                                                \
 template                                                                       \
@@ -310,11 +310,11 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field1, Type1>& f1,                                       \
-    const tmp<FieldField<Field2, Type2> >& tf2                                 \
+    const tmp<FieldField<Field2, Type2>>& tf2                                  \
 );                                                                             \
                                                                                \
 template                                                                       \
@@ -324,10 +324,10 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
-    const tmp<FieldField<Field1, Type1> >& tf1,                                \
+    const tmp<FieldField<Field1, Type1>>& tf1,                                 \
     const FieldField<Field2, Type2>& f2                                        \
 );                                                                             \
                                                                                \
@@ -338,15 +338,21 @@ template                                                                       \
     class Type1,                                                               \
     class Type2                                                                \
 >                                                                              \
-tmp<FieldField<Field1, typename product<Type1, Type2>::type> >                 \
+tmp<FieldField<Field1, typename product<Type1, Type2>::type>>                  \
 operator op                                                                    \
 (                                                                              \
-    const tmp<FieldField<Field1, Type1> >& tf1,                                \
-    const tmp<FieldField<Field2, Type2> >& tf2                                 \
+    const tmp<FieldField<Field1, Type1>>& tf1,                                 \
+    const tmp<FieldField<Field2, Type2>>& tf2                                  \
 );                                                                             \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt>   \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
 void opFunc                                                                    \
 (                                                                              \
     FieldField<Field, typename product<Type, Form>::type>& f,                  \
@@ -355,8 +361,14 @@ void opFunc                                                                    \
 );                                                                             \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt>   \
-tmp<FieldField<Field, typename product<Type, Form>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Type, Form>::type>>                     \
 operator op                                                                    \
 (                                                                              \
     const FieldField<Field, Type>& f1,                                         \
@@ -364,16 +376,28 @@ operator op                                                                    \
 );                                                                             \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt>   \
-tmp<FieldField<Field, typename product<Type, Form>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Type, Form>::type>>                     \
 operator op                                                                    \
 (                                                                              \
-    const tmp<FieldField<Field, Type> >& tf1,                                  \
+    const tmp<FieldField<Field, Type>>& tf1,                                   \
     const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
 );                                                                             \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type>   \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
 void opFunc                                                                    \
 (                                                                              \
     FieldField<Field, typename product<Form, Type>::type>& f,                  \
@@ -382,8 +406,14 @@ void opFunc                                                                    \
 );                                                                             \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type>   \
-tmp<FieldField<Field, typename product<Form, Type>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Form, Type>::type>>                     \
 operator op                                                                    \
 (                                                                              \
     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
@@ -391,12 +421,18 @@ operator op                                                                    \
 );                                                                             \
                                                                                \
 template                                                                       \
-<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type>   \
-tmp<FieldField<Field, typename product<Form, Type>::type> >                    \
+<                                                                              \
+    template<class> class Field,                                               \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+tmp<FieldField<Field, typename product<Form, Type>::type>>                     \
 operator op                                                                    \
 (                                                                              \
     const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
-    const tmp<FieldField<Field, Type> >& tf1                                   \
+    const tmp<FieldField<Field, Type>>& tf1                                    \
 );
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.C
index 880d52ea5b73d2f425ae678c43a4d94ee122529d..a32972d21a13561fa1cd0318cda272cff1287a7a 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.C
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,469 +28,463 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type, Func)                                \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& res,                                       \
-    const FieldField<Field, Type>& f                                          \
-)                                                                             \
-{                                                                             \
-    forAll(res, i)                                                            \
-    {                                                                         \
-        Func(res[i], f[i]);                                                   \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const FieldField<Field, Type>& f                                          \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, ReturnType>::NewCalculatedType(f)                   \
-    );                                                                        \
-    Func(tRes(), f);                                                          \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type> >& tf                                   \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, Type, Type>::New(tf)                        \
-    );                                                                        \
-    Func(tRes(), tf());                                                       \
-    reuseTmpFieldField<Field, Type, Type>::clear(tf);                         \
-    return tRes;                                                              \
+#define UNARY_FUNCTION(ReturnType, Type, Func)                                 \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& res,                                        \
+    const FieldField<Field, Type>& f                                           \
+)                                                                              \
+{                                                                              \
+    forAll(res, i)                                                             \
+    {                                                                          \
+        Func(res[i], f[i]);                                                    \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const FieldField<Field, Type>& f                                           \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, ReturnType>::NewCalculatedType(f)                    \
+    );                                                                         \
+    Func(tRes.ref(), f);                                                       \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type>>& tf                                     \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes(New(tf));                          \
+    Func(tRes.ref(), tf());                                                    \
+    tf.clear();                                                                \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type, Op, OpFunc)                          \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& res,                                       \
-    const FieldField<Field, Type>& f                                          \
-)                                                                             \
-{                                                                             \
-    forAll(res, i)                                                            \
-    {                                                                         \
-        OpFunc(res[i], f[i]);                                                 \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type>& f                                          \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, Type>::NewCalculatedType(f)                         \
-    );                                                                        \
-    OpFunc(tRes(), f);                                                        \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type> >& tf                                   \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, Type, Type>::New(tf)                        \
-    );                                                                        \
-    OpFunc(tRes(), tf());                                                     \
-    reuseTmpFieldField<Field, Type, Type>::clear(tf);                         \
-    return tRes;                                                              \
+#define UNARY_OPERATOR(ReturnType, Type, Op, OpFunc)                           \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& res,                                        \
+    const FieldField<Field, Type>& f                                           \
+)                                                                              \
+{                                                                              \
+    forAll(res, i)                                                             \
+    {                                                                          \
+        OpFunc(res[i], f[i]);                                                  \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type>& f                                           \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, Type>::NewCalculatedType(f)                          \
+    );                                                                         \
+    OpFunc(tRes.ref(), f);                                                     \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type>>& tf                                     \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes(New(tf));                          \
+    OpFunc(tRes.ref(), tf());                                                  \
+    tf.clear();                                                                \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    forAll(f, i)                                                              \
-    {                                                                         \
-        Func(f[i], f1[i], f2[i]);                                             \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, Type1>::NewCalculatedType(f1)                       \
-    );                                                                        \
-    Func(tRes(), f1, f2);                                                     \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                \
-    );                                                                        \
-    Func(tRes(), f1, tf2());                                                  \
-    reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2);                 \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                \
-    );                                                                        \
-    Func(tRes(), tf1(), f2);                                                  \
-    reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1);                 \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>::       \
-            New(tf1, tf2)                                                     \
-    );                                                                        \
-    Func(tRes(), tf1(), tf2());                                               \
-    reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>::           \
-        clear(tf1, tf2);                                                      \
-    return tRes;                                                              \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    forAll(f, i)                                                               \
+    {                                                                          \
+        Func(f[i], f1[i], f2[i]);                                              \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, Type1>::NewCalculatedType(f1)                        \
+    );                                                                         \
+    Func(tRes.ref(), f1, f2);                                                  \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                 \
+    );                                                                         \
+    Func(tRes.ref(), f1, tf2());                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                 \
+    );                                                                         \
+    Func(tRes.ref(), tf1(), f2);                                               \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>::        \
+            New(tf1, tf2)                                                      \
+    );                                                                         \
+    Func(tRes.ref(), tf1(), tf2());                                            \
+    tf1.clear();                                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s                                                            \
-)                                                                             \
-{                                                                             \
-    forAll(f, i)                                                              \
-    {                                                                         \
-        Func(f[i], f1[i], s);                                                 \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s                                                            \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, Type1>::NewCalculatedType(f1)                       \
-    );                                                                        \
-    Func(tRes(), f1, s);                                                      \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const Type2& s                                                            \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                \
-    );                                                                        \
-    Func(tRes(), tf1(), s);                                                   \
-    reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1);                 \
-    return tRes;                                                              \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s                                                             \
+)                                                                              \
+{                                                                              \
+    forAll(f, i)                                                               \
+    {                                                                          \
+        Func(f[i], f1[i], s);                                                  \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s                                                             \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, Type1>::NewCalculatedType(f1)                        \
+    );                                                                         \
+    Func(tRes.ref(), f1, s);                                                   \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const Type2& s                                                             \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                 \
+    );                                                                         \
+    Func(tRes.ref(), tf1(), s);                                                \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const Type1& s,                                                           \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    forAll(f, i)                                                              \
-    {                                                                         \
-        Func(f[i], s, f2[i]);                                                 \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const Type1& s,                                                           \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, Type2>::NewCalculatedType(f2)                       \
-    );                                                                        \
-    Func(tRes(), s, f2);                                                      \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const Type1& s,                                                           \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                \
-    );                                                                        \
-    Func(tRes(), s, tf2());                                                   \
-    reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2);                 \
-    return tRes;                                                              \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const Type1& s,                                                            \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    forAll(f, i)                                                               \
+    {                                                                          \
+        Func(f[i], s, f2[i]);                                                  \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const Type1& s,                                                            \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, Type2>::NewCalculatedType(f2)                        \
+    );                                                                         \
+    Func(tRes.ref(), s, f2);                                                   \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const Type1& s,                                                            \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                 \
+    );                                                                         \
+    Func(tRes.ref(), s, tf2());                                                \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                 \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    forAll(f, i)                                                              \
-    {                                                                         \
-        OpFunc(f[i], f1[i], f2[i]);                                           \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, ReturnType>::NewCalculatedType(f1)                  \
-    );                                                                        \
-    OpFunc(tRes(), f1, f2);                                                   \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                \
-    );                                                                        \
-    OpFunc(tRes(), f1, tf2());                                                \
-    reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2);                 \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                \
-    );                                                                        \
-    OpFunc(tRes(), tf1(), f2);                                                \
-    reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1);                 \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>::       \
-            New(tf1, tf2)                                                     \
-    );                                                                        \
-    OpFunc(tRes(), tf1(), tf2());                                             \
-    reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>::           \
-        clear(tf1, tf2);                                                      \
-    return tRes;                                                              \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                  \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    forAll(f, i)                                                               \
+    {                                                                          \
+        OpFunc(f[i], f1[i], f2[i]);                                            \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, ReturnType>::NewCalculatedType(f1)                   \
+    );                                                                         \
+    OpFunc(tRes.ref(), f1, f2);                                                \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                 \
+    );                                                                         \
+    OpFunc(tRes.ref(), f1, tf2());                                             \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                 \
+    );                                                                         \
+    OpFunc(tRes.ref(), tf1(), f2);                                             \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>::        \
+            New(tf1, tf2)                                                      \
+    );                                                                         \
+    OpFunc(tRes.ref(), tf1(), tf2());                                          \
+    tf1.clear();                                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const Type1& s,                                                           \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    forAll(f, i)                                                              \
-    {                                                                         \
-        OpFunc(f[i], s, f2[i]);                                               \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const Type1& s,                                                           \
-    const FieldField<Field, Type2>& f2                                        \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, Type2>::NewCalculatedType(f2)                       \
-    );                                                                        \
-    OpFunc(tRes(), s, f2);                                                    \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const Type1& s,                                                           \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                \
-    );                                                                        \
-    OpFunc(tRes(), s, tf2());                                                 \
-    reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2);                 \
-    return tRes;                                                              \
+#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const Type1& s,                                                            \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    forAll(f, i)                                                               \
+    {                                                                          \
+        OpFunc(f[i], s, f2[i]);                                                \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const Type1& s,                                                            \
+    const FieldField<Field, Type2>& f2                                         \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, Type2>::NewCalculatedType(f2)                        \
+    );                                                                         \
+    OpFunc(tRes.ref(), s, f2);                                                 \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const Type1& s,                                                            \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2)                 \
+    );                                                                         \
+    OpFunc(tRes.ref(), s, tf2());                                              \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s                                                            \
-)                                                                             \
-{                                                                             \
-    forAll(f, i)                                                              \
-    {                                                                         \
-        OpFunc(f[i], f1[i], s);                                               \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s                                                            \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        FieldField<Field, Type1>::NewCalculatedType(f1)                       \
-    );                                                                        \
-    OpFunc(tRes(), f1, s);                                                    \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const Type2& s                                                            \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, ReturnType> > tRes                                  \
-    (                                                                         \
-        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                \
-    );                                                                        \
-    OpFunc(tRes(), tf1(), s);                                                 \
-    reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1);                 \
-    return tRes;                                                              \
+#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s                                                             \
+)                                                                              \
+{                                                                              \
+    forAll(f, i)                                                               \
+    {                                                                          \
+        OpFunc(f[i], f1[i], s);                                                \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s                                                             \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        FieldField<Field, Type1>::NewCalculatedType(f1)                        \
+    );                                                                         \
+    OpFunc(tRes.ref(), f1, s);                                                 \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const Type2& s                                                             \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, ReturnType>> tRes                                    \
+    (                                                                          \
+        reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1)                 \
+    );                                                                         \
+    OpFunc(tRes.ref(), tf1(), s);                                              \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)            \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)             \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)             \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)              \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.H
index aafc1fa7203b7658e399ab2fb0a298ff2d2661ef..d00ff6603c2ad4c3b9f651b27037bcc57a908fb9 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.H
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctionsM.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,245 +30,245 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type1, Func)                               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& res,                                       \
-    const FieldField<Field, Type1>& f                                         \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f                                         \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > Func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf                                  \
+#define UNARY_FUNCTION(ReturnType, Type1, Func)                                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& res,                                        \
+    const FieldField<Field, Type1>& f                                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f                                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> Func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf                                    \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc)                         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& res,                                       \
-    const FieldField<Field, Type1>& f                                         \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f                                         \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf                                  \
+#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc)                          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& res,                                        \
+    const FieldField<Field, Type1>& f                                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f                                          \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf                                    \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-void func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+void func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const Type1& s1,                                                          \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const FieldField<Field, Type1>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const tmp<FieldField<Field, Type1> >& tf2                                 \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const Type1& s1,                                                           \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const FieldField<Field, Type1>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const tmp<FieldField<Field, Type1>>& tf2                                   \
 );
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void func                                                                     \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s                                                            \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s                                                            \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > func                                      \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const Type2& s                                                            \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void func                                                                      \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s                                                             \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s                                                             \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> func                                        \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const Type2& s                                                             \
 );
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                 \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                  \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const Type1& s1,                                                          \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const FieldField<Field, Type2>& f2                                        \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const tmp<FieldField<Field, Type2> >& tf2                                 \
+#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const Type1& s1,                                                           \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const FieldField<Field, Type2>& f2                                         \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const tmp<FieldField<Field, Type2>>& tf2                                   \
 );
 
 
-#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    FieldField<Field, ReturnType>& f,                                         \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const FieldField<Field, Type1>& f1,                                       \
-    const Type2& s2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<FieldField<Field, ReturnType> > operator Op                               \
-(                                                                             \
-    const tmp<FieldField<Field, Type1> >& tf1,                                \
-    const Type2& s2                                                           \
+#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    FieldField<Field, ReturnType>& f,                                          \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const FieldField<Field, Type1>& f1,                                        \
+    const Type2& s2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<FieldField<Field, ReturnType>> operator Op                                 \
+(                                                                              \
+    const tmp<FieldField<Field, Type1>>& tf1,                                  \
+    const Type2& s2                                                            \
 );
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)            \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)             \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)             \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)              \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H
index 525a6d38b1be5c6c7ab5da74f92dc8955f635a8d..0006d9aa015b873186b0a00a253908b6390140c4 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldReuseFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,26 +33,49 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+template<template<class> class Field, class TypeR>
+tmp<FieldField<Field, TypeR>> New
+(
+    const tmp<FieldField<Field, TypeR>>& tf1,
+    const bool initRet = false
+)
+{
+    if (tf1.isTmp())
+    {
+        return tf1;
+    }
+    else
+    {
+        tmp<FieldField<Field, TypeR>> rtf
+        (
+            FieldField<Field, TypeR>::NewCalculatedType(tf1())
+        );
+
+        if (initRet)
+        {
+            rtf.ref() = tf1();
+        }
+
+        return rtf;
+    }
+}
+
+
 template<template<class> class Field, class TypeR, class Type1>
 class reuseTmpFieldField
 {
 public:
 
-    static tmp<FieldField<Field, TypeR> > New
+    static tmp<FieldField<Field, TypeR>> New
     (
-        const tmp<FieldField<Field, Type1> >& tf1
+        const tmp<FieldField<Field, Type1>>& tf1
     )
     {
-        return tmp<FieldField<Field, TypeR> >
+        return tmp<FieldField<Field, TypeR>>
         (
             FieldField<Field, TypeR>::NewCalculatedType(tf1())
         );
     }
-
-    static void clear(const tmp<FieldField<Field, Type1> >& tf1)
-    {
-        tf1.clear();
-    }
 };
 
 
@@ -61,9 +84,9 @@ class reuseTmpFieldField<Field, TypeR, TypeR>
 {
 public:
 
-    static tmp<FieldField<Field, TypeR> > New
+    static tmp<FieldField<Field, TypeR>> New
     (
-        const tmp<FieldField<Field, TypeR> >& tf1
+        const tmp<FieldField<Field, TypeR>>& tf1
     )
     {
         if (tf1.isTmp())
@@ -72,20 +95,12 @@ public:
         }
         else
         {
-            return tmp<FieldField<Field, TypeR> >
+            return tmp<FieldField<Field, TypeR>>
             (
                 FieldField<Field, TypeR>::NewCalculatedType(tf1())
             );
         }
     }
-
-    static void clear(const tmp<FieldField<Field, TypeR> >& tf1)
-    {
-        if (tf1.isTmp())
-        {
-            tf1.ptr();
-        }
-    }
 };
 
 
@@ -101,27 +116,17 @@ class reuseTmpTmpFieldField
 {
 public:
 
-    static tmp<FieldField<Field, TypeR> > New
+    static tmp<FieldField<Field, TypeR>> New
     (
-        const tmp<FieldField<Field, Type1> >& tf1,
-        const tmp<FieldField<Field, Type2> >& tf2
+        const tmp<FieldField<Field, Type1>>& tf1,
+        const tmp<FieldField<Field, Type2>>& tf2
     )
     {
-        return tmp<FieldField<Field, TypeR> >
+        return tmp<FieldField<Field, TypeR>>
         (
             FieldField<Field, TypeR>::NewCalculatedType(tf1())
         );
     }
-
-    static void clear
-    (
-        const tmp<FieldField<Field, Type1> >& tf1,
-        const tmp<FieldField<Field, Type2> >& tf2
-    )
-    {
-        tf1.clear();
-        tf2.clear();
-    }
 };
 
 
@@ -130,10 +135,10 @@ class reuseTmpTmpFieldField<Field, TypeR, Type1, Type12, TypeR>
 {
 public:
 
-    static tmp<FieldField<Field, TypeR> > New
+    static tmp<FieldField<Field, TypeR>> New
     (
-        const tmp<FieldField<Field, Type1> >& tf1,
-        const tmp<FieldField<Field, TypeR> >& tf2
+        const tmp<FieldField<Field, Type1>>& tf1,
+        const tmp<FieldField<Field, TypeR>>& tf2
     )
     {
         if (tf2.isTmp())
@@ -142,25 +147,12 @@ public:
         }
         else
         {
-            return tmp<FieldField<Field, TypeR> >
+            return tmp<FieldField<Field, TypeR>>
             (
                 FieldField<Field, TypeR>::NewCalculatedType(tf1())
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<FieldField<Field, Type1> >& tf1,
-        const tmp<FieldField<Field, TypeR> >& tf2
-    )
-    {
-        tf1.clear();
-        if (tf2.isTmp())
-        {
-            tf2.ptr();
-        }
-    }
 };
 
 
@@ -169,10 +161,10 @@ class reuseTmpTmpFieldField<Field, TypeR, TypeR, TypeR, Type2>
 {
 public:
 
-    static tmp<FieldField<Field, TypeR> > New
+    static tmp<FieldField<Field, TypeR>> New
     (
-        const tmp<FieldField<Field, TypeR> >& tf1,
-        const tmp<FieldField<Field, Type2> >& tf2
+        const tmp<FieldField<Field, TypeR>>& tf1,
+        const tmp<FieldField<Field, Type2>>& tf2
     )
     {
         if (tf1.isTmp())
@@ -181,25 +173,12 @@ public:
         }
         else
         {
-            return tmp<FieldField<Field, TypeR> >
+            return tmp<FieldField<Field, TypeR>>
             (
                 FieldField<Field, TypeR>::NewCalculatedType(tf1())
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<FieldField<Field, TypeR> >& tf1,
-        const tmp<FieldField<Field, Type2> >& tf2
-    )
-    {
-        if (tf1.isTmp())
-        {
-            tf1.ptr();
-        }
-        tf2.clear();
-    }
 };
 
 
@@ -208,10 +187,10 @@ class reuseTmpTmpFieldField<Field, TypeR, TypeR, TypeR, TypeR>
 {
 public:
 
-    static tmp<FieldField<Field, TypeR> > New
+    static tmp<FieldField<Field, TypeR>> New
     (
-        const tmp<FieldField<Field, TypeR> >& tf1,
-        const tmp<FieldField<Field, TypeR> >& tf2
+        const tmp<FieldField<Field, TypeR>>& tf1,
+        const tmp<FieldField<Field, TypeR>>& tf2
     )
     {
         if (tf1.isTmp())
@@ -224,30 +203,12 @@ public:
         }
         else
         {
-            return tmp<FieldField<Field, TypeR> >
+            return tmp<FieldField<Field, TypeR>>
             (
                 FieldField<Field, TypeR>::NewCalculatedType(tf1())
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<FieldField<Field, TypeR> >& tf1,
-        const tmp<FieldField<Field, TypeR> >& tf2
-    )
-    {
-        if (tf1.isTmp())
-        {
-            tf1.ptr();
-            tf2.clear();
-        }
-        else if (tf2.isTmp())
-        {
-            tf1.clear();
-            tf2.ptr();
-        }
-    }
 };
 
 
diff --git a/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H b/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H
index 3fb0e4763f2a2129fac5733ceaa11a4e5b44524e..4b1c9e084baf046cab961a35af95f1a0cf7caa67 100644
--- a/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "oneFieldFieldI.H"
+    #include "oneFieldFieldI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C
index 4f4ddcb429dd487710a8508b74ce9b95a202180d..3774f66c59db0b1ce812ccd6adb5884d104c8bbe 100644
--- a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C
+++ b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,13 +53,13 @@ void stabilise
 }
 
 template<template<class> class Field>
-tmp<FieldField<Field, scalar> > stabilise
+tmp<FieldField<Field, scalar>> stabilise
 (
     const FieldField<Field, scalar>& f1,
     const scalar s
 )
 {
-    tmp<FieldField<Field, scalar> > tf
+    tmp<FieldField<Field, scalar>> tf
     (
         FieldField<Field, scalar>::NewCalculatedType(f1)
     );
@@ -68,13 +68,13 @@ tmp<FieldField<Field, scalar> > stabilise
 }
 
 template<template<class> class Field>
-tmp<FieldField<Field, scalar> > stabilise
+tmp<FieldField<Field, scalar>> stabilise
 (
-    const tmp<FieldField<Field, scalar> >& tf1,
+    const tmp<FieldField<Field, scalar>>& tf1,
     const scalar s
 )
 {
-    tmp<FieldField<Field, scalar> > tf(tf1.ptr());
+    tmp<FieldField<Field, scalar>> tf(tf1.ptr());
     stabilise(tf(), tf(), s);
     return tf;
 }
@@ -135,51 +135,48 @@ UNARY_FUNCTION(scalar, scalar, y0)
 UNARY_FUNCTION(scalar, scalar, y1)
 
 
-#define BesselFunc(func)                                                      \
-                                                                              \
-template<template<class> class Field>                                         \
-void func                                                                     \
-(                                                                             \
-    FieldField<Field, scalar>& res,                                           \
-    const int n,                                                              \
-    const FieldField<Field, scalar>& sf                                       \
-)                                                                             \
-{                                                                             \
-    forAll(res, i)                                                            \
-    {                                                                         \
-        func(res[i], n, sf[i]);                                               \
-    }                                                                         \
-}                                                                             \
-                                                                              \
-template<template<class> class Field>                                         \
-tmp<FieldField<Field, scalar> > func                                          \
-(                                                                             \
-    const int n,                                                              \
-    const FieldField<Field, scalar>& sf                                       \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, scalar> > tRes                                      \
-    (                                                                         \
-        FieldField<Field, scalar>::NewCalculatedType(sf)                      \
-    );                                                                        \
-    func(tRes(), n, sf);                                                      \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<template<class> class Field>                                         \
-tmp<FieldField<Field, scalar> > func                                          \
-(                                                                             \
-    const int n,                                                              \
-    const tmp<FieldField<Field, scalar> >& tsf                                \
-)                                                                             \
-{                                                                             \
-    tmp<FieldField<Field, scalar> > tRes                                      \
-    (                                                                         \
-        reuseTmpFieldField<Field, scalar, scalar>::New(tsf)                   \
-    );                                                                        \
-    func(tRes(), n, tsf());                                                   \
-    reuseTmpFieldField<Field, scalar, scalar>::clear(tsf);                    \
-    return tRes;                                                              \
+#define BesselFunc(func)                                                       \
+                                                                               \
+template<template<class> class Field>                                          \
+void func                                                                      \
+(                                                                              \
+    FieldField<Field, scalar>& res,                                            \
+    const int n,                                                               \
+    const FieldField<Field, scalar>& sf                                        \
+)                                                                              \
+{                                                                              \
+    forAll(res, i)                                                             \
+    {                                                                          \
+        func(res[i], n, sf[i]);                                                \
+    }                                                                          \
+}                                                                              \
+                                                                               \
+template<template<class> class Field>                                          \
+tmp<FieldField<Field, scalar>> func                                            \
+(                                                                              \
+    const int n,                                                               \
+    const FieldField<Field, scalar>& sf                                        \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, scalar>> tRes                                        \
+    (                                                                          \
+        FieldField<Field, scalar>::NewCalculatedType(sf)                       \
+    );                                                                         \
+    func(tRes(), n, sf);                                                       \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<template<class> class Field>                                          \
+tmp<FieldField<Field, scalar>> func                                            \
+(                                                                              \
+    const int n,                                                               \
+    const tmp<FieldField<Field, scalar>>& tsf                                  \
+)                                                                              \
+{                                                                              \
+    tmp<FieldField<Field, scalar>> tRes(New(tsf));                             \
+    func(tRes(), n, tsf());                                                    \
+    tsf.clear();                                                               \
+    return tRes;                                                               \
 }
 
 BesselFunc(jn)
diff --git a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H
index 0af7ac39d43058c090d5a055e99941a513e5d9d1..43e6418914839899b59c08679e2ce35e60bb02a4 100644
--- a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ void stabilise
 
 
 template<template<class> class Field>
-tmp<FieldField<Field, scalar> > stabilise
+tmp<FieldField<Field, scalar>> stabilise
 (
     const FieldField<Field, scalar>&,
     const scalar s
@@ -66,9 +66,9 @@ tmp<FieldField<Field, scalar> > stabilise
 
 
 template<template<class> class Field>
-tmp<FieldField<Field, scalar> > stabilise
+tmp<FieldField<Field, scalar>> stabilise
 (
-    const tmp<FieldField<Field, scalar> >&,
+    const tmp<FieldField<Field, scalar>>&,
     const scalar s
 );
 
@@ -128,15 +128,15 @@ UNARY_FUNCTION(scalar, scalar, y0)
 UNARY_FUNCTION(scalar, scalar, y1)
 
 
-#define BesselFunc(func)                                                      \
-void func                                                                     \
-(                                                                             \
-    FieldField<Field, scalar>& Res,                                           \
-    const int n,                                                              \
-    const FieldField<Field, scalar>& sf                                       \
-);                                                                            \
-tmp<scalarField> func(const int n, const FieldField<Field, scalar>&);         \
-tmp<scalarField> func(const int n, const tmp<FieldField<Field, scalar> >&);
+#define BesselFunc(func)                                                       \
+void func                                                                      \
+(                                                                              \
+    FieldField<Field, scalar>& Res,                                            \
+    const int n,                                                               \
+    const FieldField<Field, scalar>& sf                                        \
+);                                                                             \
+tmp<scalarField> func(const int n, const FieldField<Field, scalar>&);          \
+tmp<scalarField> func(const int n, const tmp<FieldField<Field, scalar>>&);
 
 BesselFunc(jn)
 BesselFunc(yn)
@@ -153,7 +153,7 @@ BesselFunc(yn)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "scalarFieldField.C"
+    #include "scalarFieldField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/sphericalTensorFieldField/sphericalTensorFieldField.H b/src/OpenFOAM/fields/FieldFields/sphericalTensorFieldField/sphericalTensorFieldField.H
index b3b84d6a1d1a6ec6bf9f29e6a0650e75d879fbcb..cc88213139cc4ce63c6e9dfe6200fde9797c271a 100644
--- a/src/OpenFOAM/fields/FieldFields/sphericalTensorFieldField/sphericalTensorFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/sphericalTensorFieldField/sphericalTensorFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ BINARY_TYPE_OPERATOR(sphericalTensor, scalar, sphericalTensor, /, divide)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "sphericalTensorFieldField.C"
+    #include "sphericalTensorFieldField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/symmTensorFieldField/symmTensorFieldField.H b/src/OpenFOAM/fields/FieldFields/symmTensorFieldField/symmTensorFieldField.H
index 3e28101332269015f70a40b15b0bffbf6bde5af8..374257534502695f3a41f10d741a4c578f4f99ca 100644
--- a/src/OpenFOAM/fields/FieldFields/symmTensorFieldField/symmTensorFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/symmTensorFieldField/symmTensorFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,7 +79,7 @@ BINARY_TYPE_OPERATOR(tensor, symmTensor, symmTensor, &, dot)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "symmTensorFieldField.C"
+    #include "symmTensorFieldField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H b/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H
index ad6d7a5eae6637365593468a1d9756e68a9894f6..df227c129391c1f689b86cab5eb96bfeed77dbec 100644
--- a/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/tensorFieldField/tensorFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ BINARY_TYPE_OPERATOR(vector, vector, tensor, /, divide)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "tensorFieldField.C"
+    #include "tensorFieldField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.C b/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.C
index 7fdb90afec86407d1eccf3d44473aae7df9907ee..a1069a53fc0d20b178c3c0a904f08fef3e53d3ca 100644
--- a/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.C
+++ b/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,13 +51,13 @@ void transform
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const FieldField<Field, tensor>& trf,
     const FieldField<Field, Type>& tf
 )
 {
-    tmp<FieldField<Field, Type> > tranf
+    tmp<FieldField<Field, Type>> tranf
     (
         FieldField<Field, Type>::NewCalculatedType(tf)
     );
@@ -67,26 +67,26 @@ tmp<FieldField<Field, Type> > transform
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const FieldField<Field, tensor>& trf,
-    const tmp<FieldField<Field, Type> >& ttf
+    const tmp<FieldField<Field, Type>>& ttf
 )
 {
-    tmp<FieldField<Field, Type> > tranf(ttf.ptr());
+    tmp<FieldField<Field, Type>> tranf(ttf.ptr());
     transform(tranf(), trf, tranf());
     return tranf;
 }
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
-    const tmp<FieldField<Field, tensor> >& ttrf,
+    const tmp<FieldField<Field, tensor>>& ttrf,
     const FieldField<Field, Type>& tf
 )
 {
-    tmp<FieldField<Field, Type> > tranf
+    tmp<FieldField<Field, Type>> tranf
     (
         FieldField<Field, Type>::NewCalculatedType(tf)
     );
@@ -97,13 +97,13 @@ tmp<FieldField<Field, Type> > transform
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
-    const tmp<FieldField<Field, tensor> >& ttrf,
-    const tmp<FieldField<Field, Type> >& ttf
+    const tmp<FieldField<Field, tensor>>& ttrf,
+    const tmp<FieldField<Field, Type>>& ttf
 )
 {
-    tmp<FieldField<Field, Type> > tranf(ttf.ptr());
+    tmp<FieldField<Field, Type>> tranf(ttf.ptr());
     transform(tranf(), ttrf(), tranf());
     ttrf.clear();
     return tranf;
@@ -126,13 +126,13 @@ void transform
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const tensor& t,
     const FieldField<Field, Type>& tf
 )
 {
-    tmp<FieldField<Field, Type> > tranf
+    tmp<FieldField<Field, Type>> tranf
     (
         FieldField<Field, Type>::NewCalculatedType(tf)
     );
@@ -142,13 +142,13 @@ tmp<FieldField<Field, Type> > transform
 
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const tensor& t,
-    const tmp<FieldField<Field, Type> >& ttf
+    const tmp<FieldField<Field, Type>>& ttf
 )
 {
-    tmp<FieldField<Field, Type> > tranf(ttf.ptr());
+    tmp<FieldField<Field, Type>> tranf(ttf.ptr());
     transform(tranf(), t, tranf());
     return tranf;
 }
diff --git a/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.H b/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.H
index 3e11c098678f82ee865f4af2d520d7dd7e29b3f6..28cd31507769f1cab52ff764771fe78b6da021c0 100644
--- a/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/transformFieldField/transformFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,31 +55,31 @@ void transform
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const FieldField<Field, tensor>&,
     const FieldField<Field, Type>&
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const FieldField<Field, tensor>&,
-    const tmp<FieldField<Field, Type> >&
+    const tmp<FieldField<Field, Type>>&
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
-    const tmp<FieldField<Field, tensor> >&,
+    const tmp<FieldField<Field, tensor>>&,
     const FieldField<Field, Type>&
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
-    const tmp<FieldField<Field, tensor> >&,
-    const tmp<FieldField<Field, Type> >&
+    const tmp<FieldField<Field, tensor>>&,
+    const tmp<FieldField<Field, Type>>&
 );
 
 
@@ -92,17 +92,17 @@ void transform
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const tensor&,
     const FieldField<Field, Type>&
 );
 
 template<template<class> class Field, class Type>
-tmp<FieldField<Field, Type> > transform
+tmp<FieldField<Field, Type>> transform
 (
     const tensor&,
-    const tmp<FieldField<Field, Type> >&
+    const tmp<FieldField<Field, Type>>&
 );
 
 
@@ -113,7 +113,7 @@ tmp<FieldField<Field, Type> > transform
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "transformFieldField.C"
+    #include "transformFieldField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H b/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H
index a351a7cb40661de095c3b48c51b7fcb399696604..a48c83ffce9beb15fdc2a9eeff972ede9f47f6e8 100644
--- a/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H
+++ b/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "zeroFieldFieldI.H"
+    #include "zeroFieldFieldI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C
index 5696467d975cfdb9705af10d9145c63aa794ed1f..1626319fc0f94d502991996f65efe2220bf9dde9 100644
--- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C
+++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,10 +36,10 @@ Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::DynamicField(Istream& is)
 
 
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
-Foam::tmp<Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv> >
+Foam::tmp<Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>>
 Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::clone() const
 {
-    return tmp<DynamicField<T, SizeInc, SizeMult, SizeDiv> >
+    return tmp<DynamicField<T, SizeInc, SizeMult, SizeDiv>>
     (
         new DynamicField<T, SizeInc, SizeMult, SizeDiv>(*this)
     );
diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H
index 9df294a08fe355524cc05f15943be54613432639..60cff25b9461e1a9abf713c41896488b3b03724b 100644
--- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H
+++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,7 +109,7 @@ public:
         explicit inline DynamicField(const UList<T>&);
 
         //- Construct by transferring the parameter contents
-        explicit inline DynamicField(const Xfer<List<T> >&);
+        explicit inline DynamicField(const Xfer<List<T>>&);
 
         //- Construct by 1 to 1 mapping from the given field
         inline DynamicField
@@ -139,14 +139,14 @@ public:
         //- Construct by transferring the Field contents
         inline DynamicField
         (
-            const Xfer<DynamicField<T, SizeInc, SizeMult, SizeDiv> >&
+            const Xfer<DynamicField<T, SizeInc, SizeMult, SizeDiv>>&
         );
 
         //- Construct from Istream. Size set to size of list read.
         explicit DynamicField(Istream&);
 
         //- Clone
-        tmp<DynamicField<T, SizeInc, SizeMult, SizeDiv> > clone() const;
+        tmp<DynamicField<T, SizeInc, SizeMult, SizeDiv>> clone() const;
 
 
     // Member Functions
@@ -200,7 +200,7 @@ public:
             inline DynamicField<T, SizeInc, SizeMult, SizeDiv>& shrink();
 
             //- Transfer contents to the Xfer container as a plain List
-            inline Xfer<List<T> > xfer();
+            inline Xfer<List<T>> xfer();
 
 
         // Member Operators
@@ -249,7 +249,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DynamicField.C"
+    #include "DynamicField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H
index f185163e3a886cabd711898c8062c9bd03d5e851..8db855af5353f7f695d2599a4a76e049dd0a0394 100644
--- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H
+++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ inline Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::DynamicField
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
 inline Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::DynamicField
 (
-    const Xfer<List<T> >& lst
+    const Xfer<List<T>>& lst
 )
 :
     Field<T>(lst),
@@ -121,7 +121,7 @@ inline Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::DynamicField
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
 inline Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::DynamicField
 (
-    const Xfer<DynamicField<T, SizeInc, SizeMult, SizeDiv> >& lst
+    const Xfer<DynamicField<T, SizeInc, SizeMult, SizeDiv>>& lst
 )
 :
     Field<T>(lst),
@@ -308,10 +308,10 @@ Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::shrink()
 
 
 template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
-inline Foam::Xfer<Foam::List<T> >
+inline Foam::Xfer<Foam::List<T>>
 Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::xfer()
 {
-    return xferMoveTo< List<T> >(*this);
+    return xferMoveTo<List<T>>(*this);
 }
 
 
diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C
index 6da675ad8795b247e098de1130597f376b6a0530..dfd8a413e3842b99ffbfe7461389609fe85149fc 100644
--- a/src/OpenFOAM/fields/Fields/Field/Field.C
+++ b/src/OpenFOAM/fields/Fields/Field/Field.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -59,6 +59,13 @@ Foam::Field<Type>::Field(const label size, const Type& t)
 {}
 
 
+template<class Type>
+Foam::Field<Type>::Field(const label size, const zero)
+:
+    List<Type>(size, Zero)
+{}
+
+
 template<class Type>
 Foam::Field<Type>::Field
 (
@@ -75,7 +82,7 @@ Foam::Field<Type>::Field
 template<class Type>
 Foam::Field<Type>::Field
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const labelUList& mapAddressing
 )
 :
@@ -102,7 +109,7 @@ Foam::Field<Type>::Field
 template<class Type>
 Foam::Field<Type>::Field
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const labelListList& mapAddressing,
     const scalarListList& mapWeights
 )
@@ -160,7 +167,7 @@ Foam::Field<Type>::Field
 template<class Type>
 Foam::Field<Type>::Field
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const FieldMapper& mapper,
     const bool applyFlip
 )
@@ -174,7 +181,7 @@ Foam::Field<Type>::Field
 template<class Type>
 Foam::Field<Type>::Field
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const FieldMapper& mapper,
     const Type& defaultValue,
     const bool applyFlip
@@ -189,7 +196,7 @@ Foam::Field<Type>::Field
 template<class Type>
 Foam::Field<Type>::Field
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const FieldMapper& mapper,
     const UList<Type>& defaultValues,
     const bool applyFlip
@@ -204,27 +211,27 @@ Foam::Field<Type>::Field
 template<class Type>
 Foam::Field<Type>::Field(const Field<Type>& f)
 :
-    refCount(),
+    tmp<Field<Type>>::refCount(),
     List<Type>(f)
 {}
 
 
 template<class Type>
-Foam::Field<Type>::Field(Field<Type>& f, bool reUse)
+Foam::Field<Type>::Field(Field<Type>& f, bool reuse)
 :
-    List<Type>(f, reUse)
+    List<Type>(f, reuse)
 {}
 
 
 template<class Type>
-Foam::Field<Type>::Field(const Xfer<List<Type> >& f)
+Foam::Field<Type>::Field(const Xfer<List<Type>>& f)
 :
     List<Type>(f)
 {}
 
 
 template<class Type>
-Foam::Field<Type>::Field(const Xfer<Field<Type> >& f)
+Foam::Field<Type>::Field(const Xfer<Field<Type>>& f)
 :
     List<Type>(f)
 {}
@@ -237,14 +244,13 @@ Foam::Field<Type>::Field(const UList<Type>& list)
 {}
 
 
-// Construct as copy of tmp<Field>
 #ifndef NoConstructFromTmp
 template<class Type>
-Foam::Field<Type>::Field(const tmp<Field<Type> >& tf)
+Foam::Field<Type>::Field(const tmp<Field<Type>>& tf)
 :
     List<Type>(const_cast<Field<Type>&>(tf()), tf.isTmp())
 {
-    const_cast<Field<Type>&>(tf()).resetRefCount();
+    tf.clear();
 }
 #endif
 
@@ -332,9 +338,9 @@ Foam::Field<Type>::Field
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::Field<Type>::clone() const
+Foam::tmp<Foam::Field<Type>> Foam::Field<Type>::clone() const
 {
-    return tmp<Field<Type> >(new Field<Type>(*this));
+    return tmp<Field<Type>>(new Field<Type>(*this));
 }
 
 
@@ -372,7 +378,7 @@ void Foam::Field<Type>::map
 template<class Type>
 void Foam::Field<Type>::map
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const labelUList& mapAddressing
 )
 {
@@ -408,7 +414,7 @@ void Foam::Field<Type>::map
         const labelList&  localAddrs   = mapAddressing[i];
         const scalarList& localWeights = mapWeights[i];
 
-        f[i] = pTraits<Type>::zero;
+        f[i] = Zero;
 
         forAll(localAddrs, j)
         {
@@ -421,7 +427,7 @@ void Foam::Field<Type>::map
 template<class Type>
 void Foam::Field<Type>::map
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const labelListList& mapAddressing,
     const scalarListList& mapWeights
 )
@@ -493,7 +499,7 @@ void Foam::Field<Type>::map
 template<class Type>
 void Foam::Field<Type>::map
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const FieldMapper& mapper,
     const bool applyFlip
 )
@@ -590,7 +596,7 @@ void Foam::Field<Type>::rmap
 template<class Type>
 void Foam::Field<Type>::rmap
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const labelUList& mapAddressing
 )
 {
@@ -609,7 +615,7 @@ void Foam::Field<Type>::rmap
 {
     Field<Type>& f = *this;
 
-    f = pTraits<Type>::zero;
+    f = Zero;
 
     forAll(mapF, i)
     {
@@ -621,7 +627,7 @@ void Foam::Field<Type>::rmap
 template<class Type>
 void Foam::Field<Type>::rmap
 (
-    const tmp<Field<Type> >& tmapF,
+    const tmp<Field<Type>>& tmapF,
     const labelUList& mapAddressing,
     const UList<scalar>& mapWeights
 )
@@ -639,14 +645,14 @@ void Foam::Field<Type>::negate()
 
 
 template<class Type>
-Foam::tmp<Foam::Field<typename Foam::Field<Type>::cmptType> >
+Foam::tmp<Foam::Field<typename Foam::Field<Type>::cmptType>>
 Foam::Field<Type>::component
 (
     const direction d
 ) const
 {
-    tmp<Field<cmptType> > Component(new Field<cmptType>(this->size()));
-    ::Foam::component(Component(), *this, d);
+    tmp<Field<cmptType>> Component(new Field<cmptType>(this->size()));
+    ::Foam::component(Component.ref(), *this, d);
     return Component;
 }
 
@@ -667,7 +673,7 @@ template<class Type>
 void Foam::Field<Type>::replace
 (
     const direction d,
-    const tmp<Field<cmptType> >& tsf
+    const tmp<Field<cmptType>>& tsf
 )
 {
     replace(d, tsf());
@@ -688,10 +694,23 @@ void Foam::Field<Type>::replace
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::Field<Type>::T() const
+template<class VSForm>
+VSForm Foam::Field<Type>::block(const label start) const
+{
+    VSForm vs;
+    for (direction i=0; i<VSForm::nComponents; i++)
+    {
+        vs[i] = this->operator[](start + i);
+    }
+    return vs;
+}
+
+
+template<class Type>
+Foam::tmp<Foam::Field<Type>> Foam::Field<Type>::T() const
 {
-    tmp<Field<Type> > transpose(new Field<Type>(this->size()));
-    ::Foam::T(transpose(), *this);
+    tmp<Field<Type>> transpose(new Field<Type>(this->size()));
+    ::Foam::T(transpose.ref(), *this);
     return transpose;
 }
 
@@ -772,10 +791,7 @@ void Foam::Field<Type>::operator=(const tmp<Field>& rhs)
             << abort(FatalError);
     }
 
-    // This is dodgy stuff, don't try it at home.
-    Field* fieldPtr = rhs.ptr();
-    List<Type>::transfer(*fieldPtr);
-    delete fieldPtr;
+    List<Type>::operator=(rhs());
 }
 
 
@@ -787,32 +803,39 @@ void Foam::Field<Type>::operator=(const Type& t)
 
 
 template<class Type>
-template<class Form, class Cmpt, int nCmpt>
+void Foam::Field<Type>::operator=(const zero)
+{
+    List<Type>::operator=(Zero);
+}
+
+
+template<class Type>
+template<class Form, class Cmpt, Foam::direction nCmpt>
 void Foam::Field<Type>::operator=(const VectorSpace<Form,Cmpt,nCmpt>& vs)
 {
     TFOR_ALL_F_OP_S(Type, *this, =, VSType, vs)
 }
 
 
-#define COMPUTED_ASSIGNMENT(TYPE, op)                                         \
-                                                                              \
-template<class Type>                                                          \
-void Foam::Field<Type>::operator op(const UList<TYPE>& f)                     \
-{                                                                             \
-    TFOR_ALL_F_OP_F(Type, *this, op, TYPE, f)                                 \
-}                                                                             \
-                                                                              \
-template<class Type>                                                          \
-void Foam::Field<Type>::operator op(const tmp<Field<TYPE> >& tf)              \
-{                                                                             \
-    operator op(tf());                                                        \
-    tf.clear();                                                               \
-}                                                                             \
-                                                                              \
-template<class Type>                                                          \
-void Foam::Field<Type>::operator op(const TYPE& t)                            \
-{                                                                             \
-    TFOR_ALL_F_OP_S(Type, *this, op, TYPE, t)                                 \
+#define COMPUTED_ASSIGNMENT(TYPE, op)                                          \
+                                                                               \
+template<class Type>                                                           \
+void Foam::Field<Type>::operator op(const UList<TYPE>& f)                      \
+{                                                                              \
+    TFOR_ALL_F_OP_F(Type, *this, op, TYPE, f)                                  \
+}                                                                              \
+                                                                               \
+template<class Type>                                                           \
+void Foam::Field<Type>::operator op(const tmp<Field<TYPE>>& tf)                \
+{                                                                              \
+    operator op(tf());                                                         \
+    tf.clear();                                                                \
+}                                                                              \
+                                                                               \
+template<class Type>                                                           \
+void Foam::Field<Type>::operator op(const TYPE& t)                             \
+{                                                                              \
+    TFOR_ALL_F_OP_S(Type, *this, op, TYPE, t)                                  \
 }
 
 COMPUTED_ASSIGNMENT(Type, +=)
@@ -834,7 +857,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Field<Type>& f)
 
 
 template<class Type>
-Foam::Ostream& Foam::operator<<(Ostream& os, const tmp<Field<Type> >& tf)
+Foam::Ostream& Foam::operator<<(Ostream& os, const tmp<Field<Type>>& tf)
 {
     os  << tf();
     tf.clear();
diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H
index 8ea48c3f7d86573bb35ea452fdb7b49d262fbe82..edb788a1b39dda70fc85bded0fb5898d9bf1e671 100644
--- a/src/OpenFOAM/fields/Fields/Field/Field.H
+++ b/src/OpenFOAM/fields/Fields/Field/Field.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -65,7 +65,7 @@ template<class Type>
 Ostream& operator<<(Ostream&, const Field<Type>&);
 
 template<class Type>
-Ostream& operator<<(Ostream&, const tmp<Field<Type> >&);
+Ostream& operator<<(Ostream&, const tmp<Field<Type>>&);
 
 class FieldMapper;
 class dictionary;
@@ -77,7 +77,7 @@ class dictionary;
 template<class Type>
 class Field
 :
-    public refCount,
+    public tmp<Field<Type>>::refCount,
     public List<Type>
 {
 
@@ -100,7 +100,7 @@ public:
         //- Return a null field
         inline static const Field<Type>& null()
         {
-            return NullObjectRef<Field<Type> >();
+            return NullObjectRef<Field<Type>>();
         }
 
 
@@ -117,11 +117,14 @@ public:
         //- Construct given size and initial value
         Field(const label, const Type&);
 
+        //- Construct given size and initialed to zero
+        Field(const label, const zero);
+
         //- Construct as copy of a UList\<Type\>
         explicit Field(const UList<Type>&);
 
         //- Construct by transferring the List contents
-        explicit Field(const Xfer<List<Type> >&);
+        explicit Field(const Xfer<List<Type>>&);
 
         //- Construct by 1 to 1 mapping from the given field
         Field
@@ -133,7 +136,7 @@ public:
         //- Construct by 1 to 1 mapping from the given tmp field
         Field
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const labelUList& mapAddressing
         );
 
@@ -148,7 +151,7 @@ public:
         //- Construct by interpolative mapping from the given tmp field
         Field
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const labelListList& mapAddressing,
             const scalarListList& weights
         );
@@ -182,7 +185,7 @@ public:
         //- Construct by mapping from the given tmp field
         Field
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const FieldMapper& map,
             const bool applyFlip = true
         );
@@ -191,7 +194,7 @@ public:
         //  value for unmapped items
         Field
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const FieldMapper& map,
             const Type& defaultValue,
             const bool applyFlip = true
@@ -201,7 +204,7 @@ public:
         //  for unmapped items
         Field
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const FieldMapper& map,
             const UList<Type>& defaultValues,
             const bool applyFlip = true
@@ -211,14 +214,14 @@ public:
         Field(const Field<Type>&);
 
         //- Construct as copy or re-use as specified.
-        Field(Field<Type>&, bool reUse);
+        Field(Field<Type>&, bool reuse);
 
         //- Construct by transferring the Field contents
-        Field(const Xfer<Field<Type> >&);
+        Field(const Xfer<Field<Type>>&);
 
         //- Construct as copy of tmp<Field>
         #ifndef NoConstructFromTmp
-        Field(const tmp<Field<Type> >&);
+        Field(const tmp<Field<Type>>&);
         #endif
 
         //- Construct from Istream
@@ -228,14 +231,14 @@ public:
         Field(const word& keyword, const dictionary&, const label size);
 
         //- Clone
-        tmp<Field<Type> > clone() const;
+        tmp<Field<Type>> clone() const;
 
         //- Return a pointer to a new calculatedFvPatchFieldField created on
         //  freestore without setting patchField values
         template<class Type2>
-        static tmp<Field<Type> > NewCalculatedType(const Field<Type2>& f)
+        static tmp<Field<Type>> NewCalculatedType(const Field<Type2>& f)
         {
-            return tmp<Field<Type> >(new Field<Type>(f.size()));
+            return tmp<Field<Type>>(new Field<Type>(f.size()));
         }
 
 
@@ -251,7 +254,7 @@ public:
         //- 1 to 1 map from the given tmp field
         void map
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const labelUList& mapAddressing
         );
 
@@ -266,7 +269,7 @@ public:
         //- Interpolative map from the given tmp field
         void map
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const labelListList& mapAddressing,
             const scalarListList& weights
         );
@@ -282,7 +285,7 @@ public:
         //- Map from the given tmp field
         void map
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const FieldMapper& map,
             const bool applyFlip = true
         );
@@ -304,7 +307,7 @@ public:
         //- 1 to 1 reverse-map from the given tmp field
         void rmap
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const labelUList& mapAddressing
         );
 
@@ -319,7 +322,7 @@ public:
         //- Interpolative reverse map from the given tmp field
         void rmap
         (
-            const tmp<Field<Type> >& tmapF,
+            const tmp<Field<Type>>& tmapF,
             const labelUList& mapAddressing,
             const UList<scalar>& weights
         );
@@ -328,19 +331,22 @@ public:
         void negate();
 
         //- Return a component field of the field
-        tmp<Field<cmptType> > component(const direction) const;
+        tmp<Field<cmptType>> component(const direction) const;
 
         //- Replace a component field of the field
         void replace(const direction, const UList<cmptType>&);
 
         //- Replace a component field of the field
-        void replace(const direction, const tmp<Field<cmptType> >&);
+        void replace(const direction, const tmp<Field<cmptType>>&);
 
         //- Replace a component field of the field
         void replace(const direction, const cmptType&);
 
+        template<class VSForm>
+        VSForm block(const label start) const;
+
         //- Return the field transpose (only defined for second rank tensors)
-        tmp<Field<Type> > T() const;
+        tmp<Field<Type>> T() const;
 
         //- Write the field as a dictionary entry
         void writeEntry(const word& keyword, Ostream& os) const;
@@ -351,23 +357,24 @@ public:
         void operator=(const Field<Type>&);
         void operator=(const UList<Type>&);
         void operator=(const SubField<Type>&);
-        void operator=(const tmp<Field<Type> >&);
+        void operator=(const tmp<Field<Type>>&);
         void operator=(const Type&);
+        void operator=(const zero);
 
-        template<class Form, class Cmpt, int nCmpt>
+        template<class Form, class Cmpt, direction nCmpt>
         void operator=(const VectorSpace<Form,Cmpt,nCmpt>&);
 
         void operator+=(const UList<Type>&);
-        void operator+=(const tmp<Field<Type> >&);
+        void operator+=(const tmp<Field<Type>>&);
 
         void operator-=(const UList<Type>&);
-        void operator-=(const tmp<Field<Type> >&);
+        void operator-=(const tmp<Field<Type>>&);
 
         void operator*=(const UList<scalar>&);
-        void operator*=(const tmp<Field<scalar> >&);
+        void operator*=(const tmp<Field<scalar>>&);
 
         void operator/=(const UList<scalar>&);
-        void operator/=(const tmp<Field<scalar> >&);
+        void operator/=(const tmp<Field<scalar>>&);
 
         void operator+=(const Type&);
         void operator-=(const Type&);
@@ -382,7 +389,7 @@ public:
         (Ostream&, const Field<Type>&);
 
         friend Ostream& operator<< <Type>
-        (Ostream&, const tmp<Field<Type> >&);
+        (Ostream&, const tmp<Field<Type>>&);
 };
 
 
@@ -395,7 +402,7 @@ public:
 #include "FieldFunctions.H"
 
 #ifdef NoRepository
-#   include "Field.C"
+    #include "Field.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C b/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C
index f7bd17530874f87c7a2ca8d08c52cd719b62c6c0..65d2406470973edebb3787920e27579e7c5a8888 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C
+++ b/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ void T(Field<Type>& res, const UList<Type>& f)
 }
 
 
-template<class Type, int r>
+template<class Type, direction r>
 void pow
 (
     Field<typename powProduct<Type, r>::type>& res,
@@ -74,8 +74,8 @@ void pow
     )
 }
 
-template<class Type, int r>
-tmp<Field<typename powProduct<Type, r>::type> >
+template<class Type, direction r>
+tmp<Field<typename powProduct<Type, r>::type>>
 pow
 (
     const UList<Type>& f,
@@ -83,26 +83,26 @@ pow
 )
 {
     typedef typename powProduct<Type, r>::type powProductType;
-    tmp<Field<powProductType> > tRes
+    tmp<Field<powProductType>> tRes
     (
         new Field<powProductType>(f.size())
     );
-    pow<Type, r>(tRes(), f);
+    pow<Type, r>(tRes.ref(), f);
     return tRes;
 }
 
-template<class Type, int r>
-tmp<Field<typename powProduct<Type, r>::type> >
+template<class Type, direction r>
+tmp<Field<typename powProduct<Type, r>::type>>
 pow
 (
-    const tmp<Field<Type> >& tf,
+    const tmp<Field<Type>>& tf,
     typename powProduct<Type, r>::type
 )
 {
     typedef typename powProduct<Type, r>::type powProductType;
-    tmp<Field<powProductType> > tRes = reuseTmp<powProductType, Type>::New(tf);
-    pow<Type, r>(tRes(), tf());
-    reuseTmp<powProductType, Type>::clear(tf);
+    tmp<Field<powProductType>> tRes = reuseTmp<powProductType, Type>::New(tf);
+    pow<Type, r>(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -119,27 +119,27 @@ void sqr
 }
 
 template<class Type>
-tmp<Field<typename outerProduct<Type, Type>::type> >
+tmp<Field<typename outerProduct<Type, Type>::type>>
 sqr(const UList<Type>& f)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
-    tmp<Field<outerProductType> > tRes
+    tmp<Field<outerProductType>> tRes
     (
         new Field<outerProductType>(f.size())
     );
-    sqr(tRes(), f);
+    sqr(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<typename outerProduct<Type, Type>::type> >
-sqr(const tmp<Field<Type> >& tf)
+tmp<Field<typename outerProduct<Type, Type>::type>>
+sqr(const tmp<Field<Type>>& tf)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
-    tmp<Field<outerProductType> > tRes =
+    tmp<Field<outerProductType>> tRes =
         reuseTmp<outerProductType, Type>::New(tf);
-    sqr(tRes(), tf());
-    reuseTmp<outerProductType, Type>::clear(tf);
+    sqr(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -151,19 +151,19 @@ void magSqr(Field<scalar>& res, const UList<Type>& f)
 }
 
 template<class Type>
-tmp<Field<scalar> > magSqr(const UList<Type>& f)
+tmp<Field<scalar>> magSqr(const UList<Type>& f)
 {
-    tmp<Field<scalar> > tRes(new Field<scalar>(f.size()));
-    magSqr(tRes(), f);
+    tmp<Field<scalar>> tRes(new Field<scalar>(f.size()));
+    magSqr(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<scalar> > magSqr(const tmp<Field<Type> >& tf)
+tmp<Field<scalar>> magSqr(const tmp<Field<Type>>& tf)
 {
-    tmp<Field<scalar> > tRes = reuseTmp<scalar, Type>::New(tf);
-    magSqr(tRes(), tf());
-    reuseTmp<scalar, Type>::clear(tf);
+    tmp<Field<scalar>> tRes = reuseTmp<scalar, Type>::New(tf);
+    magSqr(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -175,19 +175,19 @@ void mag(Field<scalar>& res, const UList<Type>& f)
 }
 
 template<class Type>
-tmp<Field<scalar> > mag(const UList<Type>& f)
+tmp<Field<scalar>> mag(const UList<Type>& f)
 {
-    tmp<Field<scalar> > tRes(new Field<scalar>(f.size()));
-    mag(tRes(), f);
+    tmp<Field<scalar>> tRes(new Field<scalar>(f.size()));
+    mag(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<scalar> > mag(const tmp<Field<Type> >& tf)
+tmp<Field<scalar>> mag(const tmp<Field<Type>>& tf)
 {
-    tmp<Field<scalar> > tRes = reuseTmp<scalar, Type>::New(tf);
-    mag(tRes(), tf());
-    reuseTmp<scalar, Type>::clear(tf);
+    tmp<Field<scalar>> tRes = reuseTmp<scalar, Type>::New(tf);
+    mag(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -200,21 +200,21 @@ void cmptMax(Field<typename Field<Type>::cmptType>& res, const UList<Type>& f)
 }
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptMax(const UList<Type>& f)
+tmp<Field<typename Field<Type>::cmptType>> cmptMax(const UList<Type>& f)
 {
     typedef typename Field<Type>::cmptType cmptType;
-    tmp<Field<cmptType> > tRes(new Field<cmptType>(f.size()));
-    cmptMax(tRes(), f);
+    tmp<Field<cmptType>> tRes(new Field<cmptType>(f.size()));
+    cmptMax(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptMax(const tmp<Field<Type> >& tf)
+tmp<Field<typename Field<Type>::cmptType>> cmptMax(const tmp<Field<Type>>& tf)
 {
     typedef typename Field<Type>::cmptType cmptType;
-    tmp<Field<cmptType> > tRes = reuseTmp<cmptType, Type>::New(tf);
-    cmptMax(tRes(), tf());
-    reuseTmp<cmptType, Type>::clear(tf);
+    tmp<Field<cmptType>> tRes = reuseTmp<cmptType, Type>::New(tf);
+    cmptMax(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -227,21 +227,21 @@ void cmptMin(Field<typename Field<Type>::cmptType>& res, const UList<Type>& f)
 }
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptMin(const UList<Type>& f)
+tmp<Field<typename Field<Type>::cmptType>> cmptMin(const UList<Type>& f)
 {
     typedef typename Field<Type>::cmptType cmptType;
-    tmp<Field<cmptType> > tRes(new Field<cmptType>(f.size()));
-    cmptMin(tRes(), f);
+    tmp<Field<cmptType>> tRes(new Field<cmptType>(f.size()));
+    cmptMin(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptMin(const tmp<Field<Type> >& tf)
+tmp<Field<typename Field<Type>::cmptType>> cmptMin(const tmp<Field<Type>>& tf)
 {
     typedef typename Field<Type>::cmptType cmptType;
-    tmp<Field<cmptType> > tRes = reuseTmp<cmptType, Type>::New(tf);
-    cmptMin(tRes(), tf());
-    reuseTmp<cmptType, Type>::clear(tf);
+    tmp<Field<cmptType>> tRes = reuseTmp<cmptType, Type>::New(tf);
+    cmptMin(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -254,21 +254,21 @@ void cmptAv(Field<typename Field<Type>::cmptType>& res, const UList<Type>& f)
 }
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptAv(const UList<Type>& f)
+tmp<Field<typename Field<Type>::cmptType>> cmptAv(const UList<Type>& f)
 {
     typedef typename Field<Type>::cmptType cmptType;
-    tmp<Field<cmptType> > tRes(new Field<cmptType>(f.size()));
-    cmptAv(tRes(), f);
+    tmp<Field<cmptType>> tRes(new Field<cmptType>(f.size()));
+    cmptAv(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptAv(const tmp<Field<Type> >& tf)
+tmp<Field<typename Field<Type>::cmptType>> cmptAv(const tmp<Field<Type>>& tf)
 {
     typedef typename Field<Type>::cmptType cmptType;
-    tmp<Field<cmptType> > tRes = reuseTmp<cmptType, Type>::New(tf);
-    cmptAv(tRes(), tf());
-    reuseTmp<cmptType, Type>::clear(tf);
+    tmp<Field<cmptType>> tRes = reuseTmp<cmptType, Type>::New(tf);
+    cmptAv(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -280,31 +280,31 @@ void cmptMag(Field<Type>& res, const UList<Type>& f)
 }
 
 template<class Type>
-tmp<Field<Type> > cmptMag(const UList<Type>& f)
+tmp<Field<Type>> cmptMag(const UList<Type>& f)
 {
-    tmp<Field<Type> > tRes(new Field<Type>(f.size()));
-    cmptMag(tRes(), f);
+    tmp<Field<Type>> tRes(new Field<Type>(f.size()));
+    cmptMag(tRes.ref(), f);
     return tRes;
 }
 
 template<class Type>
-tmp<Field<Type> > cmptMag(const tmp<Field<Type> >& tf)
+tmp<Field<Type>> cmptMag(const tmp<Field<Type>>& tf)
 {
-    tmp<Field<Type> > tRes = reuseTmp<Type, Type>::New(tf);
-    cmptMag(tRes(), tf());
-    reuseTmp<Type, Type>::clear(tf);
+    tmp<Field<Type>> tRes = New(tf);
+    cmptMag(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
 
-#define TMP_UNARY_FUNCTION(ReturnType, Func)                                  \
-                                                                              \
-template<class Type>                                                          \
-ReturnType Func(const tmp<Field<Type> >& tf1)                                 \
-{                                                                             \
-    ReturnType res = Func(tf1());                                             \
-    tf1.clear();                                                              \
-    return res;                                                               \
+#define TMP_UNARY_FUNCTION(ReturnType, Func)                                   \
+                                                                               \
+template<class Type>                                                           \
+ReturnType Func(const tmp<Field<Type>>& tf1)                                   \
+{                                                                              \
+    ReturnType res = Func(tf1());                                              \
+    tf1.clear();                                                               \
+    return res;                                                                \
 }
 
 template<class Type>
@@ -346,13 +346,13 @@ Type sum(const UList<Type>& f)
 {
     if (f.size())
     {
-        Type Sum = pTraits<Type>::zero;
+        Type Sum = Zero;
         TFOR_ALL_S_OP_F(Type, Sum, +=, Type, f)
         return Sum;
     }
     else
     {
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -379,7 +379,7 @@ Type maxMagSqr(const UList<Type>& f)
     }
     else
     {
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -417,13 +417,13 @@ scalar sumProd(const UList<Type>& f1, const UList<Type>& f2)
 {
     if (f1.size() && (f1.size() == f2.size()))
     {
-        scalar SumProd = 0.0;
+        scalar SumProd = 0;
         TFOR_ALL_S_OP_F_OP_F(scalar, SumProd, +=, Type, f1, &&, Type, f2)
         return SumProd;
     }
     else
     {
-        return 0.0;
+        return 0;
     }
 }
 
@@ -433,7 +433,7 @@ Type sumCmptProd(const UList<Type>& f1, const UList<Type>& f2)
 {
     if (f1.size() && (f1.size() == f2.size()))
     {
-        Type SumProd = pTraits<Type>::zero;
+        Type SumProd = Zero;
         TFOR_ALL_S_OP_FUNC_F_F
         (
             Type,
@@ -449,7 +449,7 @@ Type sumCmptProd(const UList<Type>& f1, const UList<Type>& f2)
     }
     else
     {
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -459,13 +459,13 @@ scalar sumSqr(const UList<Type>& f)
 {
     if (f.size())
     {
-        scalar SumSqr = 0.0;
+        scalar SumSqr = 0;
         TFOR_ALL_S_OP_FUNC_F(scalar, SumSqr, +=, sqr, Type, f)
         return SumSqr;
     }
     else
     {
-        return 0.0;
+        return 0;
     }
 }
 
@@ -476,13 +476,13 @@ scalar sumMag(const UList<Type>& f)
 {
     if (f.size())
     {
-        scalar SumMag = 0.0;
+        scalar SumMag = 0;
         TFOR_ALL_S_OP_FUNC_F(scalar, SumMag, +=, mag, Type, f)
         return SumMag;
     }
     else
     {
-        return 0.0;
+        return 0;
     }
 }
 
@@ -494,13 +494,13 @@ Type sumCmptMag(const UList<Type>& f)
 {
     if (f.size())
     {
-        Type SumMag = pTraits<Type>::zero;
+        Type SumMag = Zero;
         TFOR_ALL_S_OP_FUNC_F(scalar, SumMag, +=, cmptMag, Type, f)
         return SumMag;
     }
     else
     {
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -520,22 +520,22 @@ Type average(const UList<Type>& f)
         WarningInFunction
             << "empty field, returning zero" << endl;
 
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
 TMP_UNARY_FUNCTION(Type, average)
 
 
-#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc)                      \
-                                                                              \
-template<class Type>                                                          \
-ReturnType gFunc(const UList<Type>& f, const label comm)                      \
-{                                                                             \
-    ReturnType res = Func(f);                                                 \
-    reduce(res, rFunc##Op<Type>(), Pstream::msgType(), comm);                 \
-    return res;                                                               \
-}                                                                             \
+#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc)                       \
+                                                                               \
+template<class Type>                                                           \
+ReturnType gFunc(const UList<Type>& f, const label comm)                       \
+{                                                                              \
+    ReturnType res = Func(f);                                                  \
+    reduce(res, rFunc##Op<Type>(), Pstream::msgType(), comm);                  \
+    return res;                                                                \
+}                                                                              \
 TMP_UNARY_FUNCTION(ReturnType, gFunc)
 
 G_UNARY_FUNCTION(Type, gMax, max, max)
@@ -597,7 +597,7 @@ Type gAverage
         WarningInFunction
             << "empty field, returning zero." << endl;
 
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
@@ -633,137 +633,138 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, divide)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define PRODUCT_OPERATOR(product, Op, OpFunc)                                 \
-                                                                              \
-template<class Type1, class Type2>                                            \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<typename product<Type1, Type2>::type>& res,                         \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    TFOR_ALL_F_OP_F_OP_F(productType, res, =, Type1, f1, Op, Type2, f2)       \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const UList<Type1>& f1, const UList<Type2>& f2)                   \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    tmp<Field<productType> > tRes(new Field<productType>(f1.size()));         \
-    OpFunc(tRes(), f1, f2);                                                   \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const UList<Type1>& f1, const tmp<Field<Type2> >& tf2)            \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    tmp<Field<productType> > tRes = reuseTmp<productType, Type2>::New(tf2);   \
-    OpFunc(tRes(), f1, tf2());                                                \
-    reuseTmp<productType, Type2>::clear(tf2);                                 \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const tmp<Field<Type1> >& tf1, const UList<Type2>& f2)            \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    tmp<Field<productType> > tRes = reuseTmp<productType, Type1>::New(tf1);   \
-    OpFunc(tRes(), tf1(), f2);                                                \
-    reuseTmp<productType, Type1>::clear(tf1);                                 \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const tmp<Field<Type1> >& tf1, const tmp<Field<Type2> >& tf2)     \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    tmp<Field<productType> > tRes =                                           \
-        reuseTmpTmp<productType, Type1, Type1, Type2>::New(tf1, tf2);         \
-    OpFunc(tRes(), tf1(), tf2());                                             \
-    reuseTmpTmp<productType, Type1, Type1, Type2>::clear(tf1, tf2);           \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<typename product<Type, Form>::type>& res,                           \
-    const UList<Type>& f1,                                                    \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-    TFOR_ALL_F_OP_F_OP_S                                                      \
-        (productType, res, =,Type, f1, Op, Form, static_cast<const Form&>(vs))\
-}                                                                             \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-tmp<Field<typename product<Type, Form>::type> >                               \
-operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs)    \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-    tmp<Field<productType> > tRes(new Field<productType>(f1.size()));         \
-    OpFunc(tRes(), f1, static_cast<const Form&>(vs));                         \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-tmp<Field<typename product<Type, Form>::type> >                               \
-operator Op                                                                   \
-(                                                                             \
-    const tmp<Field<Type> >& tf1,                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-    tmp<Field<productType> > tRes = reuseTmp<productType, Type>::New(tf1);    \
-    OpFunc(tRes(), tf1(), static_cast<const Form&>(vs));                      \
-    reuseTmp<productType, Type>::clear(tf1);                                  \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type>                       \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<typename product<Form, Type>::type>& res,                           \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const UList<Type>& f1                                                     \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-    TFOR_ALL_F_OP_S_OP_F                                                      \
-        (productType, res, =,Form,static_cast<const Form&>(vs), Op, Type, f1) \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type>                       \
-tmp<Field<typename product<Form, Type>::type> >                               \
-operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1)    \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-    tmp<Field<productType> > tRes(new Field<productType>(f1.size()));         \
-    OpFunc(tRes(), static_cast<const Form&>(vs), f1);                         \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type>                       \
-tmp<Field<typename product<Form, Type>::type> >                               \
-operator Op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs, const tmp<Field<Type> >& tf1      \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-    tmp<Field<productType> > tRes = reuseTmp<productType, Type>::New(tf1);    \
-    OpFunc(tRes(), static_cast<const Form&>(vs), tf1());                      \
-    reuseTmp<productType, Type>::clear(tf1);                                  \
-    return tRes;                                                              \
+#define PRODUCT_OPERATOR(product, Op, OpFunc)                                  \
+                                                                               \
+template<class Type1, class Type2>                                             \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<typename product<Type1, Type2>::type>& res,                          \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    TFOR_ALL_F_OP_F_OP_F(productType, res, =, Type1, f1, Op, Type2, f2)        \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const UList<Type1>& f1, const UList<Type2>& f2)                    \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    tmp<Field<productType>> tRes(new Field<productType>(f1.size()));           \
+    OpFunc(tRes.ref(), f1, f2);                                                \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const UList<Type1>& f1, const tmp<Field<Type2>>& tf2)              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    tmp<Field<productType>> tRes = reuseTmp<productType, Type2>::New(tf2);     \
+    OpFunc(tRes.ref(), f1, tf2());                                             \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const tmp<Field<Type1>>& tf1, const UList<Type2>& f2)              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    tmp<Field<productType>> tRes = reuseTmp<productType, Type1>::New(tf1);     \
+    OpFunc(tRes.ref(), tf1(), f2);                                             \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const tmp<Field<Type1>>& tf1, const tmp<Field<Type2>>& tf2)        \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    tmp<Field<productType>> tRes =                                             \
+        reuseTmpTmp<productType, Type1, Type1, Type2>::New(tf1, tf2);          \
+    OpFunc(tRes.ref(), tf1(), tf2());                                          \
+    tf1.clear();                                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<typename product<Type, Form>::type>& res,                            \
+    const UList<Type>& f1,                                                     \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+    TFOR_ALL_F_OP_F_OP_S                                                       \
+        (productType, res, =,Type, f1, Op, Form, static_cast<const Form&>(vs)) \
+}                                                                              \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+tmp<Field<typename product<Type, Form>::type>>                                 \
+operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs)     \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+    tmp<Field<productType>> tRes(new Field<productType>(f1.size()));           \
+    OpFunc(tRes.ref(), f1, static_cast<const Form&>(vs));                      \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+tmp<Field<typename product<Type, Form>::type>>                                 \
+operator Op                                                                    \
+(                                                                              \
+    const tmp<Field<Type>>& tf1,                                               \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+    tmp<Field<productType>> tRes = reuseTmp<productType, Type>::New(tf1);      \
+    OpFunc(tRes.ref(), tf1(), static_cast<const Form&>(vs));                   \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type>                  \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<typename product<Form, Type>::type>& res,                            \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const UList<Type>& f1                                                      \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+    TFOR_ALL_F_OP_S_OP_F                                                       \
+        (productType, res, =,Form,static_cast<const Form&>(vs), Op, Type, f1)  \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type>                  \
+tmp<Field<typename product<Form, Type>::type>>                                 \
+operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1)     \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+    tmp<Field<productType>> tRes(new Field<productType>(f1.size()));           \
+    OpFunc(tRes.ref(), static_cast<const Form&>(vs), f1);                      \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type>                  \
+tmp<Field<typename product<Form, Type>::type>>                                 \
+operator Op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs, const tmp<Field<Type>>& tf1        \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+    tmp<Field<productType>> tRes = reuseTmp<productType, Type>::New(tf1);      \
+    OpFunc(tRes.ref(), static_cast<const Form&>(vs), tf1());                   \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
 }
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldFunctions.H b/src/OpenFOAM/fields/Fields/Field/FieldFunctions.H
index 72a148f8e37b2ab123bbdcf6d91e6c7840e3dec7..29f52c49e0450bf5e35d6a9f82b7bca9d68ebb72 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldFunctions.H
+++ b/src/OpenFOAM/fields/Fields/Field/FieldFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ template<class Type>
 void T(Field<Type>& res, const UList<Type>& f);
 
 
-template<class Type, int r>
+template<class Type, direction r>
 void pow
 (
     Field<typename powProduct<Type, r>::type>& res,
@@ -55,8 +55,8 @@ void pow
 );
 
 
-template<class Type, int r>
-tmp<Field<typename powProduct<Type, r>::type> >
+template<class Type, direction r>
+tmp<Field<typename powProduct<Type, r>::type>>
 pow
 (
     const UList<Type>& f,
@@ -64,11 +64,11 @@ pow
       = pTraits<typename powProduct<Type, r>::type>::zero
 );
 
-template<class Type, int r>
-tmp<Field<typename powProduct<Type, r>::type> >
+template<class Type, direction r>
+tmp<Field<typename powProduct<Type, r>::type>>
 pow
 (
-    const tmp<Field<Type> >& tf,
+    const tmp<Field<Type>>& tf,
     typename powProduct<Type, r>::type
       = pTraits<typename powProduct<Type, r>::type>::zero
 );
@@ -82,79 +82,79 @@ void sqr
 );
 
 template<class Type>
-tmp<Field<typename outerProduct<Type, Type>::type> >
+tmp<Field<typename outerProduct<Type, Type>::type>>
 sqr(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename outerProduct<Type, Type>::type> >
-sqr(const tmp<Field<Type> >& tf);
+tmp<Field<typename outerProduct<Type, Type>::type>>
+sqr(const tmp<Field<Type>>& tf);
 
 
 template<class Type>
 void magSqr(Field<scalar>& res, const UList<Type>& f);
 
 template<class Type>
-tmp<Field<scalar> > magSqr(const UList<Type>& f);
+tmp<Field<scalar>> magSqr(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<scalar> > magSqr(const tmp<Field<Type> >& tf);
+tmp<Field<scalar>> magSqr(const tmp<Field<Type>>& tf);
 
 
 template<class Type>
 void mag(Field<scalar>& res, const UList<Type>& f);
 
 template<class Type>
-tmp<Field<scalar> > mag(const UList<Type>& f);
+tmp<Field<scalar>> mag(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<scalar> > mag(const tmp<Field<Type> >& tf);
+tmp<Field<scalar>> mag(const tmp<Field<Type>>& tf);
 
 
 template<class Type>
 void cmptMax(Field<typename Field<Type>::cmptType>& res, const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptMax(const UList<Type>& f);
+tmp<Field<typename Field<Type>::cmptType>> cmptMax(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> >
-cmptMax(const tmp<Field<Type> >& tf);
+tmp<Field<typename Field<Type>::cmptType>>
+cmptMax(const tmp<Field<Type>>& tf);
 
 
 template<class Type>
 void cmptMin(Field<typename Field<Type>::cmptType>& res, const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptMin(const UList<Type>& f);
+tmp<Field<typename Field<Type>::cmptType>> cmptMin(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> >
-cmptMin(const tmp<Field<Type> >& tf);
+tmp<Field<typename Field<Type>::cmptType>>
+cmptMin(const tmp<Field<Type>>& tf);
 
 
 template<class Type>
 void cmptAv(Field<typename Field<Type>::cmptType>& res, const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptAv(const UList<Type>& f);
+tmp<Field<typename Field<Type>::cmptType>> cmptAv(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<typename Field<Type>::cmptType> > cmptAv(const tmp<Field<Type> >& tf);
+tmp<Field<typename Field<Type>::cmptType>> cmptAv(const tmp<Field<Type>>& tf);
 
 
 template<class Type>
 void cmptMag(Field<Type>& res, const UList<Type>& f);
 
 template<class Type>
-tmp<Field<Type> > cmptMag(const UList<Type>& f);
+tmp<Field<Type>> cmptMag(const UList<Type>& f);
 
 template<class Type>
-tmp<Field<Type> > cmptMag(const tmp<Field<Type> >& tf);
+tmp<Field<Type>> cmptMag(const tmp<Field<Type>>& tf);
 
-#define TMP_UNARY_FUNCTION(ReturnType, Func)                                  \
-                                                                              \
-template<class Type>                                                          \
-ReturnType Func(const tmp<Field<Type> >& tf1);
+#define TMP_UNARY_FUNCTION(ReturnType, Func)                                   \
+                                                                               \
+template<class Type>                                                           \
+ReturnType Func(const tmp<Field<Type>>& tf1);
 
 template<class Type>
 Type max(const UList<Type>& f);
@@ -209,9 +209,9 @@ Type average(const UList<Type>& f);
 TMP_UNARY_FUNCTION(Type, average)
 
 
-#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc)                      \
-                                                                              \
-template<class Type>                                                          \
+#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc)                       \
+                                                                               \
+template<class Type>                                                           \
 ReturnType gFunc(const UList<Type>& f, const label comm = UPstream::worldComm);\
 TMP_UNARY_FUNCTION(ReturnType, gFunc)
 
@@ -281,63 +281,63 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, divide)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define PRODUCT_OPERATOR(product, Op, OpFunc)                                 \
-                                                                              \
-template<class Type1, class Type2>                                            \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<typename product<Type1, Type2>::type>& res,                         \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const UList<Type1>& f1, const UList<Type2>& f2);                  \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const UList<Type1>& f1, const tmp<Field<Type2> >& tf2);           \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const tmp<Field<Type1> >& tf1, const UList<Type2>& f2);           \
-                                                                              \
-template<class Type1, class Type2>                                            \
-tmp<Field<typename product<Type1, Type2>::type> >                             \
-operator Op(const tmp<Field<Type1> >& tf1, const tmp<Field<Type2> >& tf2);    \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<typename product<Type, Form>::type>& res,                           \
-    const UList<Type>& f1,                                                    \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-);                                                                            \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-tmp<Field<typename product<Type, Form>::type> >                               \
-operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs);   \
-                                                                              \
-template<class Type, class Form, class Cmpt, int nCmpt>                       \
-tmp<Field<typename product<Type, Form>::type> >                               \
-operator Op(const tmp<Field<Type> >&tf1,const VectorSpace<Form,Cmpt,nCmpt>&vs);\
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type>                       \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<typename product<Form, Type>::type>& res,                           \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const UList<Type>& f1                                                     \
-);                                                                            \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type>                       \
-tmp<Field<typename product<Form, Type>::type> >                               \
-operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1);   \
-                                                                              \
-template<class Form, class Cmpt, int nCmpt, class Type>                       \
-tmp<Field<typename product<Form, Type>::type> >                               \
-operator Op(const VectorSpace<Form,Cmpt,nCmpt>&vs,const tmp<Field<Type> >&tf1);
+#define PRODUCT_OPERATOR(product, Op, OpFunc)                                  \
+                                                                               \
+template<class Type1, class Type2>                                             \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<typename product<Type1, Type2>::type>& res,                          \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const UList<Type1>& f1, const UList<Type2>& f2);                   \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const UList<Type1>& f1, const tmp<Field<Type2>>& tf2);             \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const tmp<Field<Type1>>& tf1, const UList<Type2>& f2);             \
+                                                                               \
+template<class Type1, class Type2>                                             \
+tmp<Field<typename product<Type1, Type2>::type>>                               \
+operator Op(const tmp<Field<Type1>>& tf1, const tmp<Field<Type2>>& tf2);       \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<typename product<Type, Form>::type>& res,                            \
+    const UList<Type>& f1,                                                     \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+);                                                                             \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+tmp<Field<typename product<Type, Form>::type>>                                 \
+operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs);    \
+                                                                               \
+template<class Type, class Form, class Cmpt, direction nCmpt>                  \
+tmp<Field<typename product<Type, Form>::type>>                                 \
+operator Op(const tmp<Field<Type>>&tf1,const VectorSpace<Form,Cmpt,nCmpt>&vs); \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type>                  \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<typename product<Form, Type>::type>& res,                            \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const UList<Type>& f1                                                      \
+);                                                                             \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type>                  \
+tmp<Field<typename product<Form, Type>::type>>                                 \
+operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1);    \
+                                                                               \
+template<class Form, class Cmpt, direction nCmpt, class Type>                  \
+tmp<Field<typename product<Form, Type>::type>>                                 \
+operator Op(const VectorSpace<Form,Cmpt,nCmpt>&vs,const tmp<Field<Type>>&tf1);
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
 PRODUCT_OPERATOR(typeOfSum, -, subtract)
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.C b/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.C
index 4227d67df3ae4b66cfc5061dbdeff140711d0892..f286d319f0792eb711d0d2d7f121fc9c080547eb 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.C
+++ b/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,372 +28,374 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type, Func)                                \
-                                                                              \
-TEMPLATE                                                                      \
-void Func(Field<ReturnType>& res, const UList<Type>& f)                       \
-{                                                                             \
-    TFOR_ALL_F_OP_FUNC_F(ReturnType, res, =, ::Foam::Func, Type, f)           \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func(const UList<Type>& f)                            \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f.size()));            \
-    Func(tRes(), f);                                                          \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func(const tmp<Field<Type> >& tf)                     \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type>::New(tf);       \
-    Func(tRes(), tf());                                                       \
-    reuseTmp<ReturnType, Type>::clear(tf);                                    \
-    return tRes;                                                              \
+#define UNARY_FUNCTION(ReturnType, Type, Func)                                 \
+                                                                               \
+TEMPLATE                                                                       \
+void Func(Field<ReturnType>& res, const UList<Type>& f)                        \
+{                                                                              \
+    TFOR_ALL_F_OP_FUNC_F(ReturnType, res, =, ::Foam::Func, Type, f)            \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func(const UList<Type>& f)                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f.size()));              \
+    Func(tRes.ref(), f);                                                       \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func(const tmp<Field<Type>>& tf)                        \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type>::New(tf);         \
+    Func(tRes.ref(), tf());                                                    \
+    tf.clear();                                                                \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type, Op, OpFunc)                          \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc(Field<ReturnType>& res, const UList<Type>& f)                     \
-{                                                                             \
-    TFOR_ALL_F_OP_OP_F(ReturnType, res, =, Op, Type, f)                       \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op(const UList<Type>& f)                     \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f.size()));            \
-    OpFunc(tRes(), f);                                                        \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op(const tmp<Field<Type> >& tf)              \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type>::New(tf);       \
-    OpFunc(tRes(), tf());                                                     \
-    reuseTmp<ReturnType, Type>::clear(tf);                                    \
-    return tRes;                                                              \
+#define UNARY_OPERATOR(ReturnType, Type, Op, OpFunc)                           \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc(Field<ReturnType>& res, const UList<Type>& f)                      \
+{                                                                              \
+    TFOR_ALL_F_OP_OP_F(ReturnType, res, =, Op, Type, f)                        \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op(const UList<Type>& f)                       \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f.size()));              \
+    OpFunc(tRes.ref(), f);                                                     \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op(const tmp<Field<Type>>& tf)                 \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type>::New(tf);         \
+    OpFunc(tRes.ref(), tf());                                                  \
+    tf.clear();                                                                \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    Field<ReturnType>& res,                                                   \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    TFOR_ALL_F_OP_FUNC_F_F                                                    \
-    (                                                                         \
-        ReturnType, res, =, ::Foam::Func, Type1, f1, Type2, f2                \
-    )                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f1.size()));           \
-    Func(tRes(), f1, f2);                                                     \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const tmp<Field<Type2> >& tf2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type2>::New(tf2);     \
-    Func(tRes(), f1, tf2());                                                  \
-    reuseTmp<ReturnType, Type2>::clear(tf2);                                  \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type1>::New(tf1);     \
-    Func(tRes(), tf1(), f2);                                                  \
-    reuseTmp<ReturnType, Type1>::clear(tf1);                                  \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const tmp<Field<Type2> >& tf2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes =                                            \
-        reuseTmpTmp<ReturnType, Type1, Type1, Type2>::New(tf1, tf2);          \
-    Func(tRes(), tf1(), tf2());                                               \
-    reuseTmpTmp<ReturnType, Type1, Type1, Type2>::clear(tf1, tf2);            \
-    return tRes;                                                              \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    Field<ReturnType>& res,                                                    \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    TFOR_ALL_F_OP_FUNC_F_F                                                     \
+    (                                                                          \
+        ReturnType, res, =, ::Foam::Func, Type1, f1, Type2, f2                 \
+    )                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f1.size()));             \
+    Func(tRes.ref(), f1, f2);                                                  \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const tmp<Field<Type2>>& tf2                                               \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type2>::New(tf2);       \
+    Func(tRes.ref(), f1, tf2());                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type1>::New(tf1);       \
+    Func(tRes.ref(), tf1(), f2);                                               \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const tmp<Field<Type2>>& tf2                                               \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes =                                              \
+        reuseTmpTmp<ReturnType, Type1, Type1, Type2>::New(tf1, tf2);           \
+    Func(tRes.ref(), tf1(), tf2());                                            \
+    tf1.clear();                                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    Field<ReturnType>& res,                                                   \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    TFOR_ALL_F_OP_FUNC_S_F                                                    \
-    (                                                                         \
-        ReturnType, res, =, ::Foam::Func, Type1, s1, Type2, f2                \
-    )                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f2.size()));           \
-    Func(tRes(), s1, f2);                                                     \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const tmp<Field<Type2> >& tf2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type2>::New(tf2);     \
-    Func(tRes(), s1, tf2());                                                  \
-    reuseTmp<ReturnType, Type2>::clear(tf2);                                  \
-    return tRes;                                                              \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    Field<ReturnType>& res,                                                    \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    TFOR_ALL_F_OP_FUNC_S_F                                                     \
+    (                                                                          \
+        ReturnType, res, =, ::Foam::Func, Type1, s1, Type2, f2                 \
+    )                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f2.size()));             \
+    Func(tRes.ref(), s1, f2);                                                  \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const tmp<Field<Type2>>& tf2                                               \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type2>::New(tf2);       \
+    Func(tRes.ref(), s1, tf2());                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    Field<ReturnType>& res,                                                   \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-)                                                                             \
-{                                                                             \
-    TFOR_ALL_F_OP_FUNC_F_S                                                    \
-    (                                                                         \
-        ReturnType, res, =, ::Foam::Func, Type1, f1, Type2, s2                \
-    )                                                                         \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f1.size()));           \
-    Func(tRes(), f1, s2);                                                     \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const Type2& s2                                                           \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type1>::New(tf1);     \
-    Func(tRes(), tf1(), s2);                                                  \
-    reuseTmp<ReturnType, Type1>::clear(tf1);                                  \
-    return tRes;                                                              \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    Field<ReturnType>& res,                                                    \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+)                                                                              \
+{                                                                              \
+    TFOR_ALL_F_OP_FUNC_F_S                                                     \
+    (                                                                          \
+        ReturnType, res, =, ::Foam::Func, Type1, f1, Type2, s2                 \
+    )                                                                          \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f1.size()));             \
+    Func(tRes.ref(), f1, s2);                                                  \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const Type2& s2                                                            \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type1>::New(tf1);       \
+    Func(tRes.ref(), tf1(), s2);                                               \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                 \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<ReturnType>& res,                                                   \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    TFOR_ALL_F_OP_F_OP_F(ReturnType, res, =, Type1, f1, Op, Type2, f2)        \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f1.size()));           \
-    OpFunc(tRes(), f1, f2);                                                   \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const tmp<Field<Type2> >& tf2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type2>::New(tf2);     \
-    OpFunc(tRes(), f1, tf2());                                                \
-    reuseTmp<ReturnType, Type2>::clear(tf2);                                  \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type1>::New(tf1);     \
-    OpFunc(tRes(), tf1(), f2);                                                \
-    reuseTmp<ReturnType, Type1>::clear(tf1);                                  \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const tmp<Field<Type2> >& tf2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes =                                            \
-        reuseTmpTmp<ReturnType, Type1, Type1, Type2>::New(tf1, tf2);          \
-    OpFunc(tRes(), tf1(), tf2());                                             \
-    reuseTmpTmp<ReturnType, Type1, Type1, Type2>::clear(tf1, tf2);            \
-    return tRes;                                                              \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                  \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<ReturnType>& res,                                                    \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    TFOR_ALL_F_OP_F_OP_F(ReturnType, res, =, Type1, f1, Op, Type2, f2)         \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f1.size()));             \
+    OpFunc(tRes.ref(), f1, f2);                                                \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const tmp<Field<Type2>>& tf2                                               \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type2>::New(tf2);       \
+    OpFunc(tRes.ref(), f1, tf2());                                             \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type1>::New(tf1);       \
+    OpFunc(tRes.ref(), tf1(), f2);                                             \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const tmp<Field<Type2>>& tf2                                               \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes =                                              \
+        reuseTmpTmp<ReturnType, Type1, Type1, Type2>::New(tf1, tf2);           \
+    OpFunc(tRes.ref(), tf1(), tf2());                                          \
+    tf1.clear();                                                               \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<ReturnType>& res,                                                   \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    TFOR_ALL_F_OP_S_OP_F(ReturnType, res, =, Type1, s1, Op, Type2, f2)        \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f2.size()));           \
-    OpFunc(tRes(), s1, f2);                                                   \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const tmp<Field<Type2> >& tf2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type2>::New(tf2);     \
-    OpFunc(tRes(), s1, tf2());                                                \
-    reuseTmp<ReturnType, Type2>::clear(tf2);                                  \
-    return tRes;                                                              \
+#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<ReturnType>& res,                                                    \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    TFOR_ALL_F_OP_S_OP_F(ReturnType, res, =, Type1, s1, Op, Type2, f2)         \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f2.size()));             \
+    OpFunc(tRes.ref(), s1, f2);                                                \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const tmp<Field<Type2>>& tf2                                               \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type2>::New(tf2);       \
+    OpFunc(tRes.ref(), s1, tf2());                                             \
+    tf2.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<ReturnType>& res,                                                   \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-)                                                                             \
-{                                                                             \
-    TFOR_ALL_F_OP_F_OP_S(ReturnType, res, =, Type1, f1, Op, Type2, s2)        \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(f1.size()));           \
-    OpFunc(tRes(), f1, s2);                                                   \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const Type2& s2                                                           \
-)                                                                             \
-{                                                                             \
-    tmp<Field<ReturnType> > tRes = reuseTmp<ReturnType, Type1>::New(tf1);     \
-    OpFunc(tRes(), tf1(), s2);                                                \
-    reuseTmp<ReturnType, Type1>::clear(tf1);                                  \
-    return tRes;                                                              \
+#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<ReturnType>& res,                                                    \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+)                                                                              \
+{                                                                              \
+    TFOR_ALL_F_OP_F_OP_S(ReturnType, res, =, Type1, f1, Op, Type2, s2)         \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(f1.size()));             \
+    OpFunc(tRes.ref(), f1, s2);                                                \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const Type2& s2                                                            \
+)                                                                              \
+{                                                                              \
+    tmp<Field<ReturnType>> tRes = reuseTmp<ReturnType, Type1>::New(tf1);       \
+    OpFunc(tRes.ref(), tf1(), s2);                                             \
+    tf1.clear();                                                               \
+    return tRes;                                                               \
 }
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)            \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)             \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)             \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)              \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.H b/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.H
index 381a8d98727614e1653b1b47e2b0931fd0c93ae7..89fdfa40678d0b619f229bd52c0fe6ef4a6d3e00 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.H
+++ b/src/OpenFOAM/fields/Fields/Field/FieldFunctionsM.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,221 +30,221 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type1, Func)                               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func(Field<ReturnType>& res, const UList<Type1>& f);                     \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func(const UList<Type1>& f);                          \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func(const tmp<Field<Type1> >& tf);
+#define UNARY_FUNCTION(ReturnType, Type1, Func)                                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func(Field<ReturnType>& res, const UList<Type1>& f);                      \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func(const UList<Type1>& f);                            \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func(const tmp<Field<Type1>>& tf);
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc)                         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc(Field<ReturnType>& res, const UList<Type1>& f);                   \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op(const UList<Type1>& f);                   \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op(const tmp<Field<Type1> >& tf);
+#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc)                          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc(Field<ReturnType>& res, const UList<Type1>& f);                    \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op(const UList<Type1>& f);                     \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op(const tmp<Field<Type1>>& tf);
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    Field<ReturnType>& f,                                                     \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const tmp<Field<Type2> >& tf2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const tmp<Field<Type2> >& tf2                                             \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    Field<ReturnType>& f,                                                      \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const tmp<Field<Type2>>& tf2                                               \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const tmp<Field<Type2>>& tf2                                               \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    Field<ReturnType>& f,                                                     \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const tmp<Field<Type2> >& tf2                                             \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    Field<ReturnType>& f,                                                      \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const tmp<Field<Type2>>& tf2                                               \
 );
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    Field<ReturnType>& f,                                                     \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > Func                                                  \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const Type2& s2                                                           \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    Field<ReturnType>& f,                                                      \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> Func                                                    \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const Type2& s2                                                            \
 );
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                 \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<ReturnType>& f,                                                     \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const tmp<Field<Type2> >& tf2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const tmp<Field<Type2> >& tf2                                             \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)                  \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<ReturnType>& f,                                                      \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const tmp<Field<Type2>>& tf2                                               \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const tmp<Field<Type2>>& tf2                                               \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<ReturnType>& f,                                                     \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const UList<Type2>& f2                                                    \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const Type1& s1,                                                          \
-    const tmp<Field<Type2> >& tf2                                             \
+#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<ReturnType>& f,                                                      \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const UList<Type2>& f2                                                     \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const Type1& s1,                                                           \
+    const tmp<Field<Type2>>& tf2                                               \
 );
 
 
-#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    Field<ReturnType>& f,                                                     \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const UList<Type1>& f1,                                                   \
-    const Type2& s2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<Field<ReturnType> > operator Op                                           \
-(                                                                             \
-    const tmp<Field<Type1> >& tf1,                                            \
-    const Type2& s2                                                           \
+#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    Field<ReturnType>& f,                                                      \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const UList<Type1>& f1,                                                    \
+    const Type2& s2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<Field<ReturnType>> operator Op                                             \
+(                                                                              \
+    const tmp<Field<Type1>>& tf1,                                              \
+    const Type2& s2                                                            \
 );
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)            \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)             \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc)             \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc)              \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldM.H b/src/OpenFOAM/fields/Fields/Field/FieldM.H
index ff3861d4e7c0d54766f3da00b16c5757aa9ee3ba..28d4788c1764b58ce4aa49545629ce486fe15a54 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldM.H
+++ b/src/OpenFOAM/fields/Fields/Field/FieldM.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,250 +109,250 @@ void checkFields
 
 // member function : this f1 OP fUNC f2
 
-#define TFOR_ALL_F_OP_FUNC_F(typeF1, f1, OP, FUNC, typeF2, f2)              \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP " " #FUNC "(f2)");                        \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP FUNC(List_ELEM(f2, f2P, i));               \
-    List_END_FOR_ALL                                                        \
-
-
-#define TFOR_ALL_F_OP_F_FUNC(typeF1, f1, OP, typeF2, f2, FUNC)              \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP " f2" #FUNC);                             \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i).FUNC();              \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_FUNC_F(typeF1, f1, OP, FUNC, typeF2, f2)                 \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP " " #FUNC "(f2)");                           \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP FUNC(List_ELEM(f2, f2P, i));                  \
+    List_END_FOR_ALL                                                           \
+
+
+#define TFOR_ALL_F_OP_F_FUNC(typeF1, f1, OP, typeF2, f2, FUNC)                 \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP " f2" #FUNC);                                \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i).FUNC();                 \
+    List_END_FOR_ALL                                                           \
 
 
 // member function : this field f1 OP fUNC f2, f3
 
 #define TFOR_ALL_F_OP_FUNC_F_F(typeF1, f1, OP, FUNC, typeF2, f2, typeF3, f3)\
-                                                                            \
-    /* check the three fields have same Field<Type> mesh */                 \
-    checkFields(f1, f2, f3, "f1 " #OP " " #FUNC "(f2, f3)");                \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-    List_CONST_ACCESS(typeF3, f3, f3P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i)                                               \
-        OP FUNC(List_ELEM(f2, f2P, i), List_ELEM(f3, f3P, i));              \
-    List_END_FOR_ALL                                                        \
+                                                                               \
+    /* check the three fields have same Field<Type> mesh */                    \
+    checkFields(f1, f2, f3, "f1 " #OP " " #FUNC "(f2, f3)");                   \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+    List_CONST_ACCESS(typeF3, f3, f3P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i)                                                  \
+        OP FUNC(List_ELEM(f2, f2P, i), List_ELEM(f3, f3P, i));                 \
+    List_END_FOR_ALL                                                           \
 
 
 // member function : this field f1 OP fUNC f2, f3
 
-#define TFOR_ALL_S_OP_FUNC_F_F(typeS, s, OP, FUNC, typeF1, f1, typeF2, f2)  \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "s " #OP " " #FUNC "(f1, f2)");                     \
-                                                                            \
-    /* set access to f1 and f2 at end of each field */                      \
-    List_CONST_ACCESS(typeF1, f1, f1P);                                     \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing s OP FUNC(f1, f2) */                  \
-    List_FOR_ALL(f1, i)                                                     \
-        (s) OP FUNC(List_ELEM(f1, f1P, i), List_ELEM(f2, f2P, i));          \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_S_OP_FUNC_F_F(typeS, s, OP, FUNC, typeF1, f1, typeF2, f2)     \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "s " #OP " " #FUNC "(f1, f2)");                        \
+                                                                               \
+    /* set access to f1 and f2 at end of each field */                         \
+    List_CONST_ACCESS(typeF1, f1, f1P);                                        \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing s OP FUNC(f1, f2) */                     \
+    List_FOR_ALL(f1, i)                                                        \
+        (s) OP FUNC(List_ELEM(f1, f1P, i), List_ELEM(f2, f2P, i));             \
+    List_END_FOR_ALL                                                           \
 
 
 // member function : this f1 OP fUNC f2, s
 
-#define TFOR_ALL_F_OP_FUNC_F_S(typeF1, f1, OP, FUNC, typeF2, f2, typeS, s)  \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP " " #FUNC "(f2, s)");                     \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP FUNC(List_ELEM(f2, f2P, i), (s));          \
+#define TFOR_ALL_F_OP_FUNC_F_S(typeF1, f1, OP, FUNC, typeF2, f2, typeS, s)     \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP " " #FUNC "(f2, s)");                        \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP FUNC(List_ELEM(f2, f2P, i), (s));             \
     List_END_FOR_ALL
 
 
 // member function : s1 OP fUNC f, s2
 
-#define TFOR_ALL_S_OP_FUNC_F_S(typeS1, s1, OP, FUNC, typeF, f, typeS2, s2)  \
-                                                                            \
-    /* set access to f at end of field */                                   \
-    List_CONST_ACCESS(typeF, f, fP);                                        \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f, i)                                                      \
-        (s1) OP FUNC(List_ELEM(f, fP, i), (s2));                            \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_S_OP_FUNC_F_S(typeS1, s1, OP, FUNC, typeF, f, typeS2, s2)     \
+                                                                               \
+    /* set access to f at end of field */                                      \
+    List_CONST_ACCESS(typeF, f, fP);                                           \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f, i)                                                         \
+        (s1) OP FUNC(List_ELEM(f, fP, i), (s2));                               \
+    List_END_FOR_ALL                                                           \
 
 
 // member function : this f1 OP fUNC s, f2
 
-#define TFOR_ALL_F_OP_FUNC_S_F(typeF1, f1, OP, FUNC, typeS, s, typeF2, f2)  \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP " " #FUNC "(s, f2)");                     \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP FUNC((s), List_ELEM(f2, f2P, i));          \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_FUNC_S_F(typeF1, f1, OP, FUNC, typeS, s, typeF2, f2)     \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP " " #FUNC "(s, f2)");                        \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP FUNC((s), List_ELEM(f2, f2P, i));             \
+    List_END_FOR_ALL                                                           \
 
 
 // member function : this f1 OP fUNC s, f2
 
 #define TFOR_ALL_F_OP_FUNC_S_S(typeF1, f1, OP, FUNC, typeS1, s1, typeS2, s2)\
-                                                                            \
-    /* set access to f1 at end of field */                                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-                                                                            \
-    /* loop through fields performing f1 OP1 FUNC(s1, s2) */                \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP FUNC((s1), (s2));                          \
-    List_END_FOR_ALL                                                        \
+                                                                               \
+    /* set access to f1 at end of field */                                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+                                                                               \
+    /* loop through fields performing f1 OP1 FUNC(s1, s2) */                   \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP FUNC((s1), (s2));                             \
+    List_END_FOR_ALL                                                           \
 
 
 // member function : this f1 OP1 f2 OP2 FUNC s
 
-#define TFOR_ALL_F_OP_F_FUNC_S(typeF1, f1, OP, typeF2, f2, FUNC, typeS, s)  \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP " f2 " #FUNC "(s)");                      \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i) FUNC((s));           \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_F_FUNC_S(typeF1, f1, OP, typeF2, f2, FUNC, typeS, s)     \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP " f2 " #FUNC "(s)");                         \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i) FUNC((s));              \
+    List_END_FOR_ALL                                                           \
 
 
 // define high performance macro functions for Field<Type> operations
 
 // member operator : this field f1 OP1 f2 OP2 f3
 
-#define TFOR_ALL_F_OP_F_OP_F(typeF1, f1, OP1, typeF2, f2, OP2, typeF3, f3)  \
-                                                                            \
-    /* check the three fields have same Field<Type> mesh */                 \
-    checkFields(f1, f2, f3, "f1 " #OP1 " f2 " #OP2 " f3");                  \
-                                                                            \
-    /* set access to f1, f2 and f3 at end of each field */                  \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-    List_CONST_ACCESS(typeF3, f3, f3P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 f2 OP2 f3 */                   \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP1 List_ELEM(f2, f2P, i)                     \
-                              OP2 List_ELEM(f3, f3P, i);                    \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_F_OP_F(typeF1, f1, OP1, typeF2, f2, OP2, typeF3, f3)     \
+                                                                               \
+    /* check the three fields have same Field<Type> mesh */                    \
+    checkFields(f1, f2, f3, "f1 " #OP1 " f2 " #OP2 " f3");                     \
+                                                                               \
+    /* set access to f1, f2 and f3 at end of each field */                     \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+    List_CONST_ACCESS(typeF3, f3, f3P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 f2 OP2 f3 */                      \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP1 List_ELEM(f2, f2P, i)                        \
+                              OP2 List_ELEM(f3, f3P, i);                       \
+    List_END_FOR_ALL                                                           \
 
 
 // member operator : this field f1 OP1 s OP2 f2
 
-#define TFOR_ALL_F_OP_S_OP_F(typeF1, f1, OP1, typeS, s, OP2, typeF2, f2)    \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP1 " s " #OP2 " f2");                       \
-                                                                            \
-    /* set access to f1 and f2 at end of each field */                      \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 s OP2 f2 */                    \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP1 (s) OP2 List_ELEM(f2, f2P, i);            \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_S_OP_F(typeF1, f1, OP1, typeS, s, OP2, typeF2, f2)       \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP1 " s " #OP2 " f2");                          \
+                                                                               \
+    /* set access to f1 and f2 at end of each field */                         \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 s OP2 f2 */                       \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP1 (s) OP2 List_ELEM(f2, f2P, i);               \
+    List_END_FOR_ALL                                                           \
 
 
 // member operator : this field f1 OP1 f2 OP2 s
 
-#define TFOR_ALL_F_OP_F_OP_S(typeF1, f1, OP1, typeF2, f2, OP2, typeS, s)    \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP1 " f2 " #OP2 " s");                       \
-                                                                            \
-    /* set access to f1 and f2 at end of each field */                      \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 s OP2 f2 */                    \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP1 List_ELEM(f2, f2P, i) OP2 (s);            \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_F_OP_S(typeF1, f1, OP1, typeF2, f2, OP2, typeS, s)       \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP1 " f2 " #OP2 " s");                          \
+                                                                               \
+    /* set access to f1 and f2 at end of each field */                         \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 s OP2 f2 */                       \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP1 List_ELEM(f2, f2P, i) OP2 (s);               \
+    List_END_FOR_ALL                                                           \
 
 
 // member operator : this field f1 OP f2
 
-#define TFOR_ALL_F_OP_F(typeF1, f1, OP, typeF2, f2)                         \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, "f1 " #OP " f2");                                   \
-                                                                            \
-    /* set pointer to f1P at end of f1 and */                               \
-    /* f2.p at end of f2 */                                                 \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP f2 */                           \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i);                     \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_F(typeF1, f1, OP, typeF2, f2)                            \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, "f1 " #OP " f2");                                      \
+                                                                               \
+    /* set pointer to f1P at end of f1 and */                                  \
+    /* f2.p at end of f2 */                                                    \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP f2 */                              \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP List_ELEM(f2, f2P, i);                        \
+    List_END_FOR_ALL                                                           \
 
 // member operator : this field f1 OP1 OP2 f2
 
-#define TFOR_ALL_F_OP_OP_F(typeF1, f1, OP1, OP2, typeF2, f2)                \
-                                                                            \
-    /* check the two fields have same Field<Type> mesh */                   \
-    checkFields(f1, f2, #OP1 " " #OP2 " f2");                               \
-                                                                            \
-    /* set pointer to f1P at end of f1 and */                               \
-    /* f2.p at end of f2 */                                                 \
-    List_ACCESS(typeF1, f1, f1P);                                           \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through fields performing f1 OP1 OP2 f2 */                      \
-    List_FOR_ALL(f1, i)                                                     \
-        List_ELEM(f1, f1P, i) OP1 OP2 List_ELEM(f2, f2P, i);                \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_OP_F(typeF1, f1, OP1, OP2, typeF2, f2)                   \
+                                                                               \
+    /* check the two fields have same Field<Type> mesh */                      \
+    checkFields(f1, f2, #OP1 " " #OP2 " f2");                                  \
+                                                                               \
+    /* set pointer to f1P at end of f1 and */                                  \
+    /* f2.p at end of f2 */                                                    \
+    List_ACCESS(typeF1, f1, f1P);                                              \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through fields performing f1 OP1 OP2 f2 */                         \
+    List_FOR_ALL(f1, i)                                                        \
+        List_ELEM(f1, f1P, i) OP1 OP2 List_ELEM(f2, f2P, i);                   \
+    List_END_FOR_ALL                                                           \
 
 
 // member operator : this field f OP s
 
-#define TFOR_ALL_F_OP_S(typeF, f, OP, typeS, s)                             \
-                                                                            \
-    /* set access to f at end of field */                                   \
-    List_ACCESS(typeF, f, fP);                                              \
-                                                                            \
-    /* loop through field performing f OP s */                              \
-    List_FOR_ALL(f, i)                                                      \
-        List_ELEM(f, fP, i) OP (s);                                         \
-    List_END_FOR_ALL                                                        \
+#define TFOR_ALL_F_OP_S(typeF, f, OP, typeS, s)                                \
+                                                                               \
+    /* set access to f at end of field */                                      \
+    List_ACCESS(typeF, f, fP);                                                 \
+                                                                               \
+    /* loop through field performing f OP s */                                 \
+    List_FOR_ALL(f, i)                                                         \
+        List_ELEM(f, fP, i) OP (s);                                            \
+    List_END_FOR_ALL                                                           \
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -360,41 +360,41 @@ void checkFields
 
 // friend operator function : s OP f, allocates storage for s
 
-#define TFOR_ALL_S_OP_F(typeS, s, OP, typeF, f)                             \
-                                                                            \
-    /* set access to f at end of field */                                   \
-    List_CONST_ACCESS(typeF, f, fP);                                        \
-                                                                            \
-    /* loop through field performing s OP f */                              \
-    List_FOR_ALL(f, i)                                                      \
-        (s) OP List_ELEM(f, fP, i);                                         \
+#define TFOR_ALL_S_OP_F(typeS, s, OP, typeF, f)                                \
+                                                                               \
+    /* set access to f at end of field */                                      \
+    List_CONST_ACCESS(typeF, f, fP);                                           \
+                                                                               \
+    /* loop through field performing s OP f */                                 \
+    List_FOR_ALL(f, i)                                                         \
+        (s) OP List_ELEM(f, fP, i);                                            \
     List_END_FOR_ALL
 
 
 // friend operator function : s OP1 f1 OP2 f2, allocates storage for s
 
-#define TFOR_ALL_S_OP_F_OP_F(typeS, s, OP1, typeF1, f1, OP2, typeF2, f2)    \
-                                                                            \
-    /* set access to f1 and f2 at end of each field */                      \
-    List_CONST_ACCESS(typeF1, f1, f1P);                                     \
-    List_CONST_ACCESS(typeF2, f2, f2P);                                     \
-                                                                            \
-    /* loop through field performing s OP f */                              \
-    List_FOR_ALL(f1, i)                                                     \
-        (s) OP1 List_ELEM(f1, f1P, i) OP2 List_ELEM(f2, f2P, i);            \
+#define TFOR_ALL_S_OP_F_OP_F(typeS, s, OP1, typeF1, f1, OP2, typeF2, f2)       \
+                                                                               \
+    /* set access to f1 and f2 at end of each field */                         \
+    List_CONST_ACCESS(typeF1, f1, f1P);                                        \
+    List_CONST_ACCESS(typeF2, f2, f2P);                                        \
+                                                                               \
+    /* loop through field performing s OP f */                                 \
+    List_FOR_ALL(f1, i)                                                        \
+        (s) OP1 List_ELEM(f1, f1P, i) OP2 List_ELEM(f2, f2P, i);               \
     List_END_FOR_ALL
 
 
 // friend operator function : s OP FUNC(f), allocates storage for s
 
-#define TFOR_ALL_S_OP_FUNC_F(typeS, s, OP, FUNC, typeF, f)                  \
-                                                                            \
-    /* set access to f at end of field */                                   \
-    List_CONST_ACCESS(typeF, f, fP);                                        \
-                                                                            \
-    /* loop through field performing s OP f */                              \
-    List_FOR_ALL(f, i)                                                      \
-        (s) OP FUNC(List_ELEM(f, fP, i));                                   \
+#define TFOR_ALL_S_OP_FUNC_F(typeS, s, OP, FUNC, typeF, f)                     \
+                                                                               \
+    /* set access to f at end of field */                                      \
+    List_CONST_ACCESS(typeF, f, fP);                                           \
+                                                                               \
+    /* loop through field performing s OP f */                                 \
+    List_FOR_ALL(f, i)                                                         \
+        (s) OP FUNC(List_ELEM(f, fP, i));                                      \
     List_END_FOR_ALL
 
 
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H
index 32f446cbae052c4c0db5782c935c037051203b49..254cc4bab23bb839f7382d739ed1bc144351bf69 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldMapper.H
+++ b/src/OpenFOAM/fields/Fields/Field/FieldMapper.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -114,9 +114,9 @@ public:
     // Member Operators
 
         template<class Type>
-        tmp<Field<Type> > operator()(const Field<Type>& f) const
+        tmp<Field<Type>> operator()(const Field<Type>& f) const
         {
-            return tmp<Field<Type> >(new Field<Type>(f, *this));
+            return tmp<Field<Type>>(new Field<Type>(f, *this));
         }
 };
 
diff --git a/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H b/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H
index 099994919a11e3b62146f4ac9080270f9fbc37fe..fac9e9a51c7fce0087861ac377844a0329999a51 100644
--- a/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H
+++ b/src/OpenFOAM/fields/Fields/Field/FieldReuseFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,19 +33,39 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+template<class TypeR>
+tmp<Field<TypeR>> New
+(
+    const tmp<Field<TypeR>>& tf1,
+    const bool initRet = false
+)
+{
+    if (tf1.isTmp())
+    {
+        return tf1;
+    }
+    else
+    {
+        tmp<Field<TypeR>> rtf(new Field<TypeR>(tf1().size()));
+
+        if (initRet)
+        {
+            rtf.ref() = tf1();
+        }
+
+        return rtf;
+    }
+}
+
+
 template<class TypeR, class Type1>
 class reuseTmp
 {
 public:
 
-    static tmp<Field<TypeR> > New(const tmp<Field<Type1> >& tf1)
+    static tmp<Field<TypeR>> New(const tmp<Field<Type1>>& tf1)
     {
-        return tmp<Field<TypeR> >(new Field<TypeR>(tf1().size()));
-    }
-
-    static void clear(const tmp<Field<Type1> >& tf1)
-    {
-        tf1.clear();
+        return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
     }
 };
 
@@ -55,7 +75,7 @@ class reuseTmp<TypeR, TypeR>
 {
 public:
 
-    static tmp<Field<TypeR> > New(const tmp<Field<TypeR> >& tf1)
+    static tmp<Field<TypeR>> New(const tmp<Field<TypeR>>& tf1)
     {
         if (tf1.isTmp())
         {
@@ -63,15 +83,7 @@ public:
         }
         else
         {
-            return tmp<Field<TypeR> >(new Field<TypeR>(tf1().size()));
-        }
-    }
-
-    static void clear(const tmp<Field<TypeR> >& tf1)
-    {
-        if (tf1.isTmp())
-        {
-            tf1.ptr();
+            return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
         }
     }
 };
@@ -82,23 +94,13 @@ class reuseTmpTmp
 {
 public:
 
-    static tmp<Field<TypeR> > New
+    static tmp<Field<TypeR>> New
     (
-        const tmp<Field<Type1> >& tf1,
-        const tmp<Field<Type2> >& tf2
+        const tmp<Field<Type1>>& tf1,
+        const tmp<Field<Type2>>& tf2
     )
     {
-        return tmp<Field<TypeR> >(new Field<TypeR>(tf1().size()));
-    }
-
-    static void clear
-    (
-        const tmp<Field<Type1> >& tf1,
-        const tmp<Field<Type2> >& tf2
-    )
-    {
-        tf1.clear();
-        tf2.clear();
+        return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
     }
 };
 
@@ -108,10 +110,10 @@ class reuseTmpTmp<TypeR, Type1, Type12, TypeR>
 {
 public:
 
-    static tmp<Field<TypeR> > New
+    static tmp<Field<TypeR>> New
     (
-        const tmp<Field<Type1> >& tf1,
-        const tmp<Field<TypeR> >& tf2
+        const tmp<Field<Type1>>& tf1,
+        const tmp<Field<TypeR>>& tf2
     )
     {
         if (tf2.isTmp())
@@ -120,20 +122,7 @@ public:
         }
         else
         {
-            return tmp<Field<TypeR> >(new Field<TypeR>(tf1().size()));
-        }
-    }
-
-    static void clear
-    (
-        const tmp<Field<Type1> >& tf1,
-        const tmp<Field<TypeR> >& tf2
-    )
-    {
-        tf1.clear();
-        if (tf2.isTmp())
-        {
-            tf2.ptr();
+            return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
         }
     }
 };
@@ -144,10 +133,10 @@ class reuseTmpTmp<TypeR, TypeR, TypeR, Type2>
 {
 public:
 
-    static tmp<Field<TypeR> > New
+    static tmp<Field<TypeR>> New
     (
-        const tmp<Field<TypeR> >& tf1,
-        const tmp<Field<Type2> >& tf2
+        const tmp<Field<TypeR>>& tf1,
+        const tmp<Field<Type2>>& tf2
     )
     {
         if (tf1.isTmp())
@@ -156,21 +145,8 @@ public:
         }
         else
         {
-            return tmp<Field<TypeR> >(new Field<TypeR>(tf1().size()));
-        }
-    }
-
-    static void clear
-    (
-        const tmp<Field<TypeR> >& tf1,
-        const tmp<Field<Type2> >& tf2
-    )
-    {
-        if (tf1.isTmp())
-        {
-            tf1.ptr();
+            return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
         }
-        tf2.clear();
     }
 };
 
@@ -180,10 +156,10 @@ class reuseTmpTmp<TypeR, TypeR, TypeR, TypeR>
 {
 public:
 
-    static tmp<Field<TypeR> > New
+    static tmp<Field<TypeR>> New
     (
-        const tmp<Field<TypeR> >& tf1,
-        const tmp<Field<TypeR> >& tf2
+        const tmp<Field<TypeR>>& tf1,
+        const tmp<Field<TypeR>>& tf2
     )
     {
         if (tf1.isTmp())
@@ -196,25 +172,7 @@ public:
         }
         else
         {
-            return tmp<Field<TypeR> >(new Field<TypeR>(tf1().size()));
-        }
-    }
-
-    static void clear
-    (
-        const tmp<Field<TypeR> >& tf1,
-        const tmp<Field<TypeR> >& tf2
-    )
-    {
-        if (tf1.isTmp())
-        {
-            tf1.ptr();
-            tf2.clear();
-        }
-        else if (tf2.isTmp())
-        {
-            tf1.clear();
-            tf2.ptr();
+            return tmp<Field<TypeR>>(new Field<TypeR>(tf1().size()));
         }
     }
 };
diff --git a/src/OpenFOAM/fields/Fields/Field/SubField.H b/src/OpenFOAM/fields/Fields/Field/SubField.H
index a615d40f889af2c1840bbd1e1ee75841596ce1cf..07ecd1443fc936d10ba1815ed075def3b580ee89 100644
--- a/src/OpenFOAM/fields/Fields/Field/SubField.H
+++ b/src/OpenFOAM/fields/Fields/Field/SubField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,6 +41,7 @@ SourceFiles
 
 #include "SubList.H"
 #include "Field.H"
+#include "VectorSpace.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -58,7 +59,7 @@ template<class Type> class SubField;
 template<class Type>
 class SubField
 :
-    public refCount,
+    public tmp<SubField<Type>>::refCount,
     public SubList<Type>
 {
 
@@ -101,10 +102,10 @@ public:
         static inline const SubField<Type>& null();
 
         //- Return a component field of the field
-        inline tmp<Field<cmptType> > component(const direction) const;
+        inline tmp<Field<cmptType>> component(const direction) const;
 
         //- Return the field transpose (only defined for second rank tensors)
-        tmp<Field<Type> > T() const;
+        tmp<Field<Type>> T() const;
 
 
     // Member operators
@@ -112,6 +113,13 @@ public:
         //- Assignment via UList operator. Takes linear time.
         inline void operator=(const SubField<Type>&);
 
+        //- Assignment via UList operator. Takes linear time.
+        inline void operator=(const Field<Type>&);
+
+        //- Assignment via UList operator. Takes linear time.
+        template<class Form, direction Ncmpts>
+        inline void operator=(const VectorSpace<Form, Type, Ncmpts>&);
+
         //- Allow cast to a const Field\<Type\>&
         inline operator const Field<Type>&() const;
 };
diff --git a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H
index d2d5aabe9c6301d54c463cf2a0c5c08c42f626e1..67aa4c4adb7caad44f4d00ff0b3746b99f5b34f8 100644
--- a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H
+++ b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ inline Foam::SubField<Type>::SubField
     const SubField<Type>& sfield
 )
 :
-    refCount(),
+    tmp<SubField<Type>>::refCount(),
     SubList<Type>(sfield)
 {}
 
@@ -84,12 +84,12 @@ inline Foam::SubField<Type>::SubField
 template<class Type>
 inline const Foam::SubField<Type>& Foam::SubField<Type>::null()
 {
-    return NullObjectRef<SubField<Type> >();
+    return NullObjectRef<SubField<Type>>();
 }
 
 
 template<class Type>
-inline Foam::tmp<Foam::Field<typename Foam::SubField<Type>::cmptType> >
+inline Foam::tmp<Foam::Field<typename Foam::SubField<Type>::cmptType>>
 Foam::SubField<Type>::component
 (
     const direction d
@@ -100,7 +100,7 @@ Foam::SubField<Type>::component
 
 
 template<class Type>
-inline Foam::tmp<Foam::Field<Type> > Foam::SubField<Type>::T() const
+inline Foam::tmp<Foam::Field<Type>> Foam::SubField<Type>::T() const
 {
     return (reinterpret_cast<const Field<Type>&>(*this)).T();
 }
@@ -111,14 +111,35 @@ inline Foam::tmp<Foam::Field<Type> > Foam::SubField<Type>::T() const
 template<class Type>
 inline void Foam::SubField<Type>::operator=(const SubField<Type>& rhs)
 {
-    UList<Type>::operator=(rhs);
+    SubList<Type>::operator=(rhs);
+}
+
+
+template<class Type>
+inline void Foam::SubField<Type>::operator=(const Field<Type>& rhs)
+{
+    SubList<Type>::operator=(rhs);
+}
+
+
+template<class Type>
+template<class Form, Foam::direction Ncmpts>
+inline void Foam::SubField<Type>::operator=
+(
+    const VectorSpace<Form, Type, Ncmpts>& rhs
+)
+{
+    forAll(rhs, i)
+    {
+        this->operator[](i) = rhs[i];
+    }
 }
 
 
 template<class Type>
 inline Foam::SubField<Type>::operator const Foam::Field<Type>&() const
 {
-    return *reinterpret_cast< const Field<Type>* >(this);
+    return *reinterpret_cast<const Field<Type>* >(this);
 }
 
 
diff --git a/src/OpenFOAM/fields/Fields/oneField/oneField.H b/src/OpenFOAM/fields/Fields/oneField/oneField.H
index 7512ee14f00def9b7acf5e4ef74e1a3f35a4029d..8c6fb16b7a47b167b0830007f4c505bf6c38b9f7 100644
--- a/src/OpenFOAM/fields/Fields/oneField/oneField.H
+++ b/src/OpenFOAM/fields/Fields/oneField/oneField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ public:
 
     // Member Operators
 
-        inline scalar operator[](const label) const;
+        inline one operator[](const label) const;
 
         inline oneField field() const;
 };
@@ -76,7 +76,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "oneFieldI.H"
+    #include "oneFieldI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/fields/Fields/oneField/oneFieldI.H b/src/OpenFOAM/fields/Fields/oneField/oneFieldI.H
index 3fe8085a2fafb33d9f375f20e5a9916226fa5958..bcd8edf663468b5f49f30d44cc32010472525fc6 100644
--- a/src/OpenFOAM/fields/Fields/oneField/oneFieldI.H
+++ b/src/OpenFOAM/fields/Fields/oneField/oneFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,9 +27,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-inline Foam::scalar Foam::oneField::operator[](const label) const
+inline Foam::one Foam::oneField::operator[](const label) const
 {
-    return scalar(1);
+    return one();
 }
 
 
diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarField.C b/src/OpenFOAM/fields/Fields/scalarField/scalarField.C
index e7400669af482f43e6421cb9ca1089e8bbd1c428..0aac998c8dfcca8b97adb86e5d6c3f29f91727b3 100644
--- a/src/OpenFOAM/fields/Fields/scalarField/scalarField.C
+++ b/src/OpenFOAM/fields/Fields/scalarField/scalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,15 +74,15 @@ void stabilise(scalarField& res, const UList<scalar>& sf, const scalar s)
 tmp<scalarField> stabilise(const UList<scalar>& sf, const scalar s)
 {
     tmp<scalarField> tRes(new scalarField(sf.size()));
-    stabilise(tRes(), sf, s);
+    stabilise(tRes.ref(), sf, s);
     return tRes;
 }
 
 tmp<scalarField> stabilise(const tmp<scalarField>& tsf, const scalar s)
 {
-    tmp<scalarField> tRes = reuseTmp<scalar, scalar>::New(tsf);
-    stabilise(tRes(), tsf(), s);
-    reuseTmp<scalar, scalar>::clear(tsf);
+    tmp<scalarField> tRes = New(tsf);
+    stabilise(tRes.ref(), tsf(), s);
+    tsf.clear();
     return tRes;
 }
 
@@ -164,25 +164,25 @@ UNARY_FUNCTION(scalar, scalar, atmToPa)
 UNARY_FUNCTION(scalar, scalar, paToAtm)
 
 
-#define BesselFunc(func)                                                      \
-void func(scalarField& res, const int n, const UList<scalar>& sf)             \
-{                                                                             \
-    TFOR_ALL_F_OP_FUNC_S_F(scalar, res, =, ::Foam::func, int, n, scalar, sf)  \
-}                                                                             \
-                                                                              \
-tmp<scalarField> func(const int n, const UList<scalar>& sf)                   \
-{                                                                             \
-    tmp<scalarField> tRes(new scalarField(sf.size()));                        \
-    func(tRes(), n, sf);                                                      \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-tmp<scalarField> func(const int n, const tmp<scalarField>& tsf)               \
-{                                                                             \
-    tmp<scalarField> tRes = reuseTmp<scalar, scalar>::New(tsf);               \
-    func(tRes(), n, tsf());                                                   \
-    reuseTmp<scalar, scalar>::clear(tsf);                                     \
-    return tRes;                                                              \
+#define BesselFunc(func)                                                       \
+void func(scalarField& res, const int n, const UList<scalar>& sf)              \
+{                                                                              \
+    TFOR_ALL_F_OP_FUNC_S_F(scalar, res, =, ::Foam::func, int, n, scalar, sf)   \
+}                                                                              \
+                                                                               \
+tmp<scalarField> func(const int n, const UList<scalar>& sf)                    \
+{                                                                              \
+    tmp<scalarField> tRes(new scalarField(sf.size()));                         \
+    func(tRes.ref(), n, sf);                                                   \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+tmp<scalarField> func(const int n, const tmp<scalarField>& tsf)                \
+{                                                                              \
+    tmp<scalarField> tRes = New(tsf);                                          \
+    func(tRes.ref(), n, tsf());                                                \
+    tsf.clear();                                                               \
+    return tRes;                                                               \
 }
 
 BesselFunc(jn)
diff --git a/src/OpenFOAM/fields/Fields/sphericalTensorField/sphericalTensorField.C b/src/OpenFOAM/fields/Fields/sphericalTensorField/sphericalTensorField.C
index a6d186f291d071b2865577e564120fdc96c1dce3..805b47cbad1c68aafa17a2a7d61066c42fd40625 100644
--- a/src/OpenFOAM/fields/Fields/sphericalTensorField/sphericalTensorField.C
+++ b/src/OpenFOAM/fields/Fields/sphericalTensorField/sphericalTensorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ BINARY_TYPE_OPERATOR(sphericalTensor, scalar, sphericalTensor, /, divide)
 
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const tensorField& tf
 )
@@ -55,12 +55,12 @@ tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
 }
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const tmp<tensorField>& ttf
 )
 {
-    tmp<Field<sphericalTensor> > ret =
+    tmp<Field<sphericalTensor>> ret =
         transformFieldMask<sphericalTensor>(ttf());
     ttf.clear();
     return ret;
@@ -68,7 +68,7 @@ tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
 
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const symmTensorField& stf
 )
@@ -77,12 +77,12 @@ tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
 }
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const tmp<symmTensorField>& tstf
 )
 {
-    tmp<Field<sphericalTensor> > ret =
+    tmp<Field<sphericalTensor>> ret =
         transformFieldMask<sphericalTensor>(tstf());
     tstf.clear();
     return ret;
diff --git a/src/OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C b/src/OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C
index 5aec204e24211c9d5c50cf27a5e4cd002f3f97d0..c50ab3daa45292c2ceaf311040a95beb46789117 100644
--- a/src/OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C
+++ b/src/OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,21 +108,21 @@ void inv(Field<symmTensor>& tf, const UList<symmTensor>& tf1)
 tmp<symmTensorField> inv(const UList<symmTensor>& tf)
 {
     tmp<symmTensorField> result(new symmTensorField(tf.size()));
-    inv(result(), tf);
+    inv(result.ref(), tf);
     return result;
 }
 
 tmp<symmTensorField> inv(const tmp<symmTensorField>& tf)
 {
-    tmp<symmTensorField> tRes = reuseTmp<symmTensor, symmTensor>::New(tf);
-    inv(tRes(), tf());
-    reuseTmp<symmTensor, symmTensor>::clear(tf);
+    tmp<symmTensorField> tRes = New(tf);
+    inv(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const tensorField& tf
 )
@@ -131,19 +131,19 @@ tmp<Field<symmTensor> > transformFieldMask<symmTensor>
 }
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const tmp<tensorField>& ttf
 )
 {
-    tmp<Field<symmTensor> > ret = transformFieldMask<symmTensor>(ttf());
+    tmp<Field<symmTensor>> ret = transformFieldMask<symmTensor>(ttf());
     ttf.clear();
     return ret;
 }
 
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const symmTensorField& stf
 )
@@ -152,7 +152,7 @@ tmp<Field<symmTensor> > transformFieldMask<symmTensor>
 }
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const tmp<symmTensorField>& tstf
 )
diff --git a/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C b/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C
index 47a22217b9c07fd0839b7854983fdda3215f6839..e1b19cf8df7f3c6c07fd02d35778152eb8599f3a 100644
--- a/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C
+++ b/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,56 +56,56 @@ void transform
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const symmTensorField& trf,
     const Field<Type>& tf
 )
 {
-    tmp<Field<Type> > tranf(new Field<Type> (tf.size()));
-    transform(tranf(), trf, tf);
+    tmp<Field<Type>> tranf(new Field<Type> (tf.size()));
+    transform(tranf.ref(), trf, tf);
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const symmTensorField& trf,
-    const tmp<Field<Type> >& ttf
+    const tmp<Field<Type>>& ttf
 )
 {
-    tmp<Field<Type> > tranf = reuseTmp<Type, Type>::New(ttf);
-    transform(tranf(), trf, ttf());
-    reuseTmp<Type, Type>::clear(ttf);
+    tmp<Field<Type>> tranf = New(ttf);
+    transform(tranf.ref(), trf, ttf());
+    ttf.clear();
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tmp<symmTensorField>& ttrf,
     const Field<Type>& tf
 )
 {
-    tmp<Field<Type> > tranf(new Field<Type> (tf.size()));
-    transform(tranf(), ttrf(), tf);
+    tmp<Field<Type>> tranf(new Field<Type> (tf.size()));
+    transform(tranf.ref(), ttrf(), tf);
     ttrf.clear();
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tmp<symmTensorField>& ttrf,
-    const tmp<Field<Type> >& ttf
+    const tmp<Field<Type>>& ttf
 )
 {
-    tmp<Field<Type> > tranf = reuseTmp<Type, Type>::New(ttf);
-    transform(tranf(), ttrf(), ttf());
-    reuseTmp<Type, Type>::clear(ttf);
+    tmp<Field<Type>> tranf = New(ttf);
+    transform(tranf.ref(), ttrf(), ttf());
+    ttf.clear();
     ttrf.clear();
     return tranf;
 }
@@ -124,28 +124,28 @@ void transform
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const symmTensor& t,
     const Field<Type>& tf
 )
 {
-    tmp<Field<Type> > tranf(new Field<Type>(tf.size()));
-    transform(tranf(), t, tf);
+    tmp<Field<Type>> tranf(new Field<Type>(tf.size()));
+    transform(tranf.ref(), t, tf);
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const symmTensor& t,
-    const tmp<Field<Type> >& ttf
+    const tmp<Field<Type>>& ttf
 )
 {
-    tmp<Field<Type> > tranf = reuseTmp<Type, Type>::New(ttf);
-    transform(tranf(), t, ttf());
-    reuseTmp<Type, Type>::clear(ttf);
+    tmp<Field<Type>> tranf = New(ttf);
+    transform(tranf.ref(), t, ttf());
+    ttf.clear();
     return tranf;
 }
 
diff --git a/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.H b/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.H
index 0ae6755f37514dc734e255b9877942b7a7293646..3b09762d2d0a92dd12ac476aecb78be2b4f080b4 100644
--- a/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.H
+++ b/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,19 +50,19 @@ template<class Type>
 void transform(Field<Type>&, const symmTensorField&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const symmTensorField&, const Field<Type>&);
+tmp<Field<Type>> transform(const symmTensorField&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const symmTensorField&, const tmp<Field<Type> >&);
+tmp<Field<Type>> transform(const symmTensorField&, const tmp<Field<Type>>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tmp<symmTensorField>&, const Field<Type>&);
+tmp<Field<Type>> transform(const tmp<symmTensorField>&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tmp<symmTensorField>&,
-    const tmp<Field<Type> >&
+    const tmp<Field<Type>>&
 );
 
 
@@ -70,46 +70,46 @@ template<class Type>
 void transform(Field<Type>&, const tensor&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tensor&, const Field<Type>&);
+tmp<Field<Type>> transform(const tensor&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tensor&, const tmp<Field<Type> >&);
+tmp<Field<Type>> transform(const tensor&, const tmp<Field<Type>>&);
 
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const symmTensorField&
 );
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const tmp<symmTensorField>&
 );
 
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const symmTensorField&
 );
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const tmp<symmTensorField>&
 );
 
 
 template<>
-tmp<Field<tensor> > transformFieldMask<tensor>
+tmp<Field<tensor>> transformFieldMask<tensor>
 (
     const symmTensorField&
 );
 
 template<>
-tmp<Field<tensor> > transformFieldMask<tensor>
+tmp<Field<tensor>> transformFieldMask<tensor>
 (
     const tmp<symmTensorField>&
 );
@@ -122,7 +122,7 @@ tmp<Field<tensor> > transformFieldMask<tensor>
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "symmTransformField.C"
+    #include "symmTransformField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/Fields/tensorField/tensorField.C b/src/OpenFOAM/fields/Fields/tensorField/tensorField.C
index b373dbf2e7c04bdffe1eff43fc173b8d16c68cdb..45ea27e12c510d29ee0aaa55db3d3c4f66e3814d 100644
--- a/src/OpenFOAM/fields/Fields/tensorField/tensorField.C
+++ b/src/OpenFOAM/fields/Fields/tensorField/tensorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,15 +106,15 @@ void inv(Field<tensor>& tf, const UList<tensor>& tf1)
 tmp<tensorField> inv(const UList<tensor>& tf)
 {
     tmp<tensorField> result(new tensorField(tf.size()));
-    inv(result(), tf);
+    inv(result.ref(), tf);
     return result;
 }
 
 tmp<tensorField> inv(const tmp<tensorField>& tf)
 {
-    tmp<tensorField> tRes = reuseTmp<tensor, tensor>::New(tf);
-    inv(tRes(), tf());
-    reuseTmp<tensor, tensor>::clear(tf);
+    tmp<tensorField> tRes = New(tf);
+    inv(tRes.ref(), tf());
+    tf.clear();
     return tRes;
 }
 
@@ -126,24 +126,24 @@ UNARY_FUNCTION(tensor, symmTensor, eigenVectors)
 
 
 template<>
-tmp<Field<tensor> > transformFieldMask<tensor>
+tmp<Field<tensor>> transformFieldMask<tensor>
 (
     const symmTensorField& stf
 )
 {
     tmp<tensorField> tRes(new tensorField(stf.size()));
-    tensorField& res = tRes();
+    tensorField& res = tRes.ref();
     TFOR_ALL_F_OP_F(tensor, res, =, symmTensor, stf)
     return tRes;
 }
 
 template<>
-tmp<Field<tensor> > transformFieldMask<tensor>
+tmp<Field<tensor>> transformFieldMask<tensor>
 (
     const tmp<symmTensorField>& tstf
 )
 {
-    tmp<Field<tensor> > ret = transformFieldMask<tensor>(tstf());
+    tmp<Field<tensor>> ret = transformFieldMask<tensor>(tstf());
     tstf.clear();
     return ret;
 }
diff --git a/src/OpenFOAM/fields/Fields/transformField/transformField.C b/src/OpenFOAM/fields/Fields/transformField/transformField.C
index 362ef156ca105b9a189a263bb5a8cff6b1aa76d4..564632e1c13905f9a50ba2565ba65a69c0df1c2a 100644
--- a/src/OpenFOAM/fields/Fields/transformField/transformField.C
+++ b/src/OpenFOAM/fields/Fields/transformField/transformField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ Foam::tmp<Foam::vectorField> Foam::transform
 )
 {
     tmp<vectorField > tranf(new vectorField(tf.size()));
-    transform(tranf(), q, tf);
+    transform(tranf.ref(), q, tf);
     return tranf;
 }
 
@@ -59,14 +59,14 @@ Foam::tmp<Foam::vectorField> Foam::transform
     const tmp<vectorField>& ttf
 )
 {
-    tmp<vectorField > tranf = reuseTmp<vector, vector>::New(ttf);
-    transform(tranf(), q, ttf());
-    reuseTmp<vector, vector>::clear(ttf);
+    tmp<vectorField > tranf = New(ttf);
+    transform(tranf.ref(), q, ttf());
+    ttf.clear();
     return tranf;
 }
 
 
-void Foam::transform
+void Foam::transformPoints
 (
     vectorField& rtf,
     const septernion& tr,
@@ -75,51 +75,45 @@ void Foam::transform
 {
     vector T = tr.t();
 
-    // Check if any rotation
-    if (mag(tr.r().R() - I) > SMALL)
+    // Check if any translation
+    if (mag(T) > VSMALL)
     {
-        transform(rtf, tr.r(), tf);
-
-        if (mag(T) > VSMALL)
-        {
-            rtf += T;
-        }
+        TFOR_ALL_F_OP_F_OP_S(vector, rtf, =, vector, tf, -, vector, T);
     }
     else
     {
-        if (mag(T) > VSMALL)
-        {
-            TFOR_ALL_F_OP_S_OP_F(vector, rtf, =, vector, T, +, vector, tf);
-        }
-        else
-        {
-            rtf = tf;
-        }
+        rtf = tf;
+    }
+
+    // Check if any rotation
+    if (mag(tr.r().R() - I) > SMALL)
+    {
+        transform(rtf, tr.r(), rtf);
     }
 }
 
 
-Foam::tmp<Foam::vectorField> Foam::transform
+Foam::tmp<Foam::vectorField> Foam::transformPoints
 (
     const septernion& tr,
     const vectorField& tf
 )
 {
     tmp<vectorField > tranf(new vectorField(tf.size()));
-    transform(tranf(), tr, tf);
+    transformPoints(tranf.ref(), tr, tf);
     return tranf;
 }
 
 
-Foam::tmp<Foam::vectorField> Foam::transform
+Foam::tmp<Foam::vectorField> Foam::transformPoints
 (
     const septernion& tr,
     const tmp<vectorField>& ttf
 )
 {
-    tmp<vectorField > tranf = reuseTmp<vector, vector>::New(ttf);
-    transform(tranf(), tr, ttf());
-    reuseTmp<vector, vector>::clear(ttf);
+    tmp<vectorField > tranf = New(ttf);
+    transformPoints(tranf.ref(), tr, ttf());
+    ttf.clear();
     return tranf;
 }
 
diff --git a/src/OpenFOAM/fields/Fields/transformField/transformField.H b/src/OpenFOAM/fields/Fields/transformField/transformField.H
index ec881641b7f5738309706524edbc72e61f1599a3..e466ab2021966f06093ff9779a88a0639eda558e 100644
--- a/src/OpenFOAM/fields/Fields/transformField/transformField.H
+++ b/src/OpenFOAM/fields/Fields/transformField/transformField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,56 +52,56 @@ template<class Type>
 void transform(Field<Type>&, const tensorField&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tensorField&, const Field<Type>&);
+tmp<Field<Type>> transform(const tensorField&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tensorField&, const tmp<Field<Type> >&);
+tmp<Field<Type>> transform(const tensorField&, const tmp<Field<Type>>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tmp<tensorField>&, const Field<Type>&);
+tmp<Field<Type>> transform(const tmp<tensorField>&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tmp<tensorField>&, const tmp<Field<Type> >&);
+tmp<Field<Type>> transform(const tmp<tensorField>&, const tmp<Field<Type>>&);
 
 
 template<class Type>
 void transform(Field<Type>&, const tensor&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tensor&, const Field<Type>&);
+tmp<Field<Type>> transform(const tensor&, const Field<Type>&);
 
 template<class Type>
-tmp<Field<Type> > transform(const tensor&, const tmp<Field<Type> >&);
+tmp<Field<Type>> transform(const tensor&, const tmp<Field<Type>>&);
 
 
 template<class Type1, class Type2>
-tmp<Field<Type1> > transformFieldMask(const Field<Type2>&);
+tmp<Field<Type1>> transformFieldMask(const Field<Type2>&);
 
 template<class Type1, class Type2>
-tmp<Field<Type1> > transformFieldMask(const tmp<Field<Type2> >&);
+tmp<Field<Type1>> transformFieldMask(const tmp<Field<Type2>>&);
 
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const tensorField&
 );
 
 template<>
-tmp<Field<symmTensor> > transformFieldMask<symmTensor>
+tmp<Field<symmTensor>> transformFieldMask<symmTensor>
 (
     const tmp<tensorField>&
 );
 
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const tensorField&
 );
 
 template<>
-tmp<Field<sphericalTensor> > transformFieldMask<sphericalTensor>
+tmp<Field<sphericalTensor>> transformFieldMask<sphericalTensor>
 (
     const tmp<tensorField>&
 );
@@ -117,14 +117,14 @@ tmp<vectorField> transform(const quaternion&, const vectorField&);
 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
 
 
-//- Transform given vectorField with the given septernion
-void transform(vectorField&, const septernion&, const vectorField&);
+//- Transform given vectorField of coordinates with the given septernion
+void transformPoints(vectorField&, const septernion&, const vectorField&);
 
-//- Transform given vectorField with the given septernion
-tmp<vectorField> transform(const septernion&, const vectorField&);
+//- Transform given vectorField of coordinates with the given septernion
+tmp<vectorField> transformPoints(const septernion&, const vectorField&);
 
-//- Transform given tmp<vectorField> with the given septernion
-tmp<vectorField> transform(const septernion&, const tmp<vectorField>&);
+//- Transform given tmp<vectorField> of coordinates with the given septernion
+tmp<vectorField> transformPoints(const septernion&, const tmp<vectorField>&);
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -134,7 +134,7 @@ tmp<vectorField> transform(const septernion&, const tmp<vectorField>&);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "transformFieldTemplates.C"
+    #include "transformFieldTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/Fields/transformField/transformFieldTemplates.C b/src/OpenFOAM/fields/Fields/transformField/transformFieldTemplates.C
index 658fdd3aef409c8d391e1c741b7c0042664b103c..7e87d7af92d90c7035e2b9d75c349caa3f027b84 100644
--- a/src/OpenFOAM/fields/Fields/transformField/transformFieldTemplates.C
+++ b/src/OpenFOAM/fields/Fields/transformField/transformFieldTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,56 +56,56 @@ void transform
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tensorField& trf,
     const Field<Type>& tf
 )
 {
-    tmp<Field<Type> > tranf(new Field<Type> (tf.size()));
-    transform(tranf(), trf, tf);
+    tmp<Field<Type>> tranf(new Field<Type> (tf.size()));
+    transform(tranf.ref(), trf, tf);
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tensorField& trf,
-    const tmp<Field<Type> >& ttf
+    const tmp<Field<Type>>& ttf
 )
 {
-    tmp<Field<Type> > tranf = reuseTmp<Type, Type>::New(ttf);
-    transform(tranf(), trf, ttf());
-    reuseTmp<Type, Type>::clear(ttf);
+    tmp<Field<Type>> tranf = New(ttf);
+    transform(tranf.ref(), trf, ttf());
+    ttf.clear();
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tmp<tensorField>& ttrf,
     const Field<Type>& tf
 )
 {
-    tmp<Field<Type> > tranf(new Field<Type> (tf.size()));
-    transform(tranf(), ttrf(), tf);
+    tmp<Field<Type>> tranf(new Field<Type> (tf.size()));
+    transform(tranf.ref(), ttrf(), tf);
     ttrf.clear();
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tmp<tensorField>& ttrf,
-    const tmp<Field<Type> >& ttf
+    const tmp<Field<Type>>& ttf
 )
 {
-    tmp<Field<Type> > tranf = reuseTmp<Type, Type>::New(ttf);
-    transform(tranf(), ttrf(), ttf());
-    reuseTmp<Type, Type>::clear(ttf);
+    tmp<Field<Type>> tranf = New(ttf);
+    transform(tranf.ref(), ttrf(), ttf());
+    ttf.clear();
     ttrf.clear();
     return tranf;
 }
@@ -124,42 +124,42 @@ void transform
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tensor& t,
     const Field<Type>& tf
 )
 {
-    tmp<Field<Type> > tranf(new Field<Type>(tf.size()));
-    transform(tranf(), t, tf);
+    tmp<Field<Type>> tranf(new Field<Type>(tf.size()));
+    transform(tranf.ref(), t, tf);
     return tranf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > transform
+tmp<Field<Type>> transform
 (
     const tensor& t,
-    const tmp<Field<Type> >& ttf
+    const tmp<Field<Type>>& ttf
 )
 {
-    tmp<Field<Type> > tranf = reuseTmp<Type, Type>::New(ttf);
-    transform(tranf(), t, ttf());
-    reuseTmp<Type, Type>::clear(ttf);
+    tmp<Field<Type>> tranf = New(ttf);
+    transform(tranf.ref(), t, ttf());
+    ttf.clear();
     return tranf;
 }
 
 
 template<class Type1, class Type2>
-tmp<Field<Type1> > transformFieldMask(const Field<Type2>& f)
+tmp<Field<Type1>> transformFieldMask(const Field<Type2>& f)
 {
     return f;
 }
 
 template<class Type1, class Type2>
-tmp<Field<Type1> > transformFieldMask(const tmp<Field<Type2> >& tf)
+tmp<Field<Type1>> transformFieldMask(const tmp<Field<Type2>>& tf)
 {
-    return tmp<Field<Type1> >(tf.ptr());
+    return tmp<Field<Type1>>(tf.ptr());
 }
 
 
diff --git a/src/OpenFOAM/fields/Fields/transformList/transformList.H b/src/OpenFOAM/fields/Fields/transformList/transformList.H
index 2da8e3947740d6ba836c58c8ec8f8ea52b02a79f..1d082006346907b57d514ceb8216d589ac6cd4c1 100644
--- a/src/OpenFOAM/fields/Fields/transformList/transformList.H
+++ b/src/OpenFOAM/fields/Fields/transformList/transformList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -145,7 +145,7 @@ inline void transformList(const tensorField&, EdgeMap<scalar>&)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "transformList.C"
+    #include "transformList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C
index da522ae42640bd310000490cc204d389ce3fdfab..717f7d609f3166b083cc2600e9fb2f32b5ff1ee7 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,13 +43,7 @@ readField
 
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::readField"
-               "("
-                   "const DimensionedField<Type, GeoMesh>&, "
-                   "const dictionary&"
-                ")"
-            << endl;
+        InfoInFunction << endl;
     }
 
 
@@ -230,11 +224,7 @@ GeometricBoundaryField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "GeometricBoundaryField(const BoundaryMesh&, "
-               "const DimensionedField<Type>&, const word&)"
-            << endl;
+        InfoInFunction << endl;
     }
 
     forAll(bmesh_, patchi)
@@ -268,16 +258,7 @@ GeometricBoundaryField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "GeometricBoundaryField"
-               "("
-                    "const BoundaryMesh&, "
-                    "const DimensionedField<Type>&, "
-                    "const wordList&, "
-                    "const wordList&"
-                ")"
-            << endl;
+        InfoInFunction << endl;
     }
 
     if
@@ -336,7 +317,7 @@ GeometricBoundaryField
 (
     const BoundaryMesh& bmesh,
     const DimensionedField<Type, GeoMesh>& field,
-    const PtrList<PatchField<Type> >& ptfl
+    const PtrList<PatchField<Type>>& ptfl
 )
 :
     FieldField<PatchField, Type>(bmesh.size()),
@@ -344,15 +325,7 @@ GeometricBoundaryField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "GeometricBoundaryField"
-               "("
-                    "const BoundaryMesh&, "
-                    "const DimensionedField<Type, GeoMesh>&, "
-                    "const PtrLIst<PatchField<Type> >&"
-               ")"
-            << endl;
+        InfoInFunction << endl;
     }
 
     forAll(bmesh_, patchi)
@@ -376,15 +349,7 @@ GeometricBoundaryField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "GeometricBoundaryField"
-               "("
-                   "const DimensionedField<Type, GeoMesh>&, "
-                   "const typename GeometricField<Type, PatchField, GeoMesh>::"
-                   "GeometricBoundaryField&"
-               ")"
-            << endl;
+        InfoInFunction << endl;
     }
 
     forAll(bmesh_, patchi)
@@ -394,11 +359,6 @@ GeometricBoundaryField
 }
 
 
-// Construct as copy
-// Dangerous because Field may be set to a field which gets deleted.
-// Need new type of GeometricBoundaryField, one which IS part of a geometric
-// field for which snGrad etc. may be called and a free standing
-// GeometricBoundaryField for which such operations are unavailable.
 template<class Type, template<class> class PatchField, class GeoMesh>
 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
 GeometricBoundaryField
@@ -412,14 +372,7 @@ GeometricBoundaryField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "GeometricBoundaryField"
-               "("
-                   "const GeometricField<Type, PatchField, GeoMesh>::"
-                   "GeometricBoundaryField&"
-               ")"
-            << endl;
+        InfoInFunction << endl;
     }
 }
 
@@ -448,9 +401,7 @@ updateCoeffs()
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "updateCoeffs()" << endl;
+        InfoInFunction << endl;
     }
 
     forAll(*this, patchi)
@@ -466,9 +417,7 @@ evaluate()
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::"
-               "GeometricBoundaryField::"
-               "evaluate()" << endl;
+        InfoInFunction << endl;
     }
 
     if
@@ -573,12 +522,12 @@ interfaces() const
 
     forAll(interfaces, patchi)
     {
-        if (isA<LduInterfaceField<Type> >(this->operator[](patchi)))
+        if (isA<LduInterfaceField<Type>>(this->operator[](patchi)))
         {
             interfaces.set
             (
                 patchi,
-                &refCast<const LduInterfaceField<Type> >
+                &refCast<const LduInterfaceField<Type>>
                 (
                     this->operator[](patchi)
                 )
@@ -677,7 +626,6 @@ operator=
 }
 
 
-// Forced assignments
 template<class Type, template<class> class PatchField, class GeoMesh>
 void Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
 operator==
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C
index b3e9375971ccd85eac7d5055008a72554b06331c..2a7390940c200206d6e64c2fc1fa35a112968fdf 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -31,14 +31,14 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define checkField(gf1, gf2, op)                                    \
-if ((gf1).mesh() != (gf2).mesh())                                   \
-{                                                                   \
-    FatalErrorInFunction                                            \
-        << "different mesh for fields "                             \
-        << (gf1).name() << " and " << (gf2).name()                  \
-        << " during operation " <<  op                              \
-        << abort(FatalError);                                       \
+#define checkField(gf1, gf2, op)                                               \
+if ((gf1).mesh() != (gf2).mesh())                                              \
+{                                                                              \
+    FatalErrorInFunction                                                       \
+        << "different mesh for fields "                                        \
+        << (gf1).name() << " and " << (gf2).name()                             \
+        << " during operation " <<  op                                         \
+        << abort(FatalError);                                                  \
 }
 
 
@@ -108,7 +108,7 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
     else if
     (
         this->readOpt() == IOobject::READ_IF_PRESENT
-     && this->template typeHeaderOk<GeometricField<Type, PatchField, GeoMesh> >
+     && this->template typeHeaderOk<GeometricField<Type, PatchField, GeoMesh>>
         (
             true
         )
@@ -151,7 +151,7 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readOldTimeIfPresent()
 
     if
     (
-        field0.template typeHeaderOk<GeometricField<Type, PatchField, GeoMesh> >
+        field0.template typeHeaderOk<GeometricField<Type, PatchField, GeoMesh>>
         (
             true
         )
@@ -159,7 +159,7 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readOldTimeIfPresent()
     {
         if (debug)
         {
-            Info<< "Reading old time level for field"
+            InfoInFunction << "Reading old time level for field"
                 << endl << this->info() << endl;
         }
 
@@ -202,9 +202,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "creating temporary"
-            << endl << this->info() << endl;
+        InfoInFunction << "Creating temporary" << endl << this->info() << endl;
     }
 
     readIfPresent();
@@ -229,9 +227,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "creating temporary"
-            << endl << this->info() << endl;
+        InfoInFunction << "Creating temporary" << endl << this->info() << endl;
     }
 
     readIfPresent();
@@ -255,9 +251,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "creating temporary"
-            << endl << this->info() << endl;
+        InfoInFunction << "Creating temporary" << endl << this->info() << endl;
     }
 
     boundaryField_ == dt.value();
@@ -284,9 +278,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "creating temporary"
-            << endl << this->info() << endl;
+        InfoInFunction << "Creating temporary" << endl << this->info() << endl;
     }
 
     boundaryField_ == dt.value();
@@ -302,7 +294,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
     const Mesh& mesh,
     const dimensionSet& ds,
     const Field<Type>& iField,
-    const PtrList<PatchField<Type> >& ptfl
+    const PtrList<PatchField<Type>>& ptfl
 )
 :
     DimensionedField<Type, GeoMesh>(io, mesh, ds, iField),
@@ -313,9 +305,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing from components"
-            << endl << this->info() << endl;
+        InfoInFunction
+            << "Constructing from components" << endl << this->info() << endl;
     }
 
     readIfPresent();
@@ -355,9 +346,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 
     if (debug)
     {
-        Info<< "Finishing read-construct of "
-               "GeometricField<Type, PatchField, GeoMesh>"
-            << endl << this->info() << endl;
+        InfoInFunction
+            << "Finishing read-construction of" << endl << this->info() << endl;
     }
 }
 
@@ -390,8 +380,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 
     if (debug)
     {
-        Info<< "Finishing dictionary-construct of "
-               "GeometricField<Type, PatchField, GeoMesh>"
+        InfoInFunction
+            << "Finishing dictionary-construct of "
             << endl << this->info() << endl;
     }
 }
@@ -411,9 +401,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing as copy"
-            << endl << this->info() << endl;
+        InfoInFunction
+            << "Constructing as copy" << endl << this->info() << endl;
     }
 
     if (gf.field0Ptr_)
@@ -432,7 +421,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 template<class Type, template<class> class PatchField, class GeoMesh>
 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 :
     DimensionedField<Type, GeoMesh>
@@ -447,9 +436,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing as copy"
-            << endl << this->info() << endl;
+        InfoInFunction
+            << "Constructing from tmp" << endl << this->info() << endl;
     }
 
     this->writeOpt() = IOobject::NO_WRITE;
@@ -474,8 +462,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing as copy resetting IO params"
+        InfoInFunction
+            << "Constructing as copy resetting IO params"
             << endl << this->info() << endl;
     }
 
@@ -495,7 +483,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 (
     const IOobject& io,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 :
     DimensionedField<Type, GeoMesh>
@@ -511,8 +499,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing from tmp resetting IO params"
+        InfoInFunction
+            << "Constructing from tmp resetting IO params"
             << endl << this->info() << endl;
     }
 
@@ -538,8 +526,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing as copy resetting name"
+        InfoInFunction
+            << "Constructing as copy resetting name"
             << endl << this->info() << endl;
     }
 
@@ -559,7 +547,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 (
     const word& newName,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 :
     DimensionedField<Type, GeoMesh>
@@ -575,8 +563,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing from tmp resetting name"
+        InfoInFunction
+            << "Constructing from tmp resetting name"
             << endl << this->info() << endl;
     }
 
@@ -601,8 +589,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing as copy resetting IO params and patch type"
+        InfoInFunction
+            << "Constructing as copy resetting IO params"
             << endl << this->info() << endl;
     }
 
@@ -643,8 +631,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 {
     if (debug)
     {
-        Info<< "GeometricField<Type, PatchField, GeoMesh>::GeometricField : "
-               "constructing as copy resetting IO params and patch types"
+        InfoInFunction
+            << "Constructing as copy resetting IO params and patch types"
             << endl << this->info() << endl;
     }
 
@@ -661,6 +649,47 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 }
 
 
+#ifndef NoConstructFromTmp
+template<class Type, template<class> class PatchField, class GeoMesh>
+Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
+(
+    const IOobject& io,
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf,
+    const wordList& patchFieldTypes,
+    const wordList& actualPatchTypes
+)
+:
+    DimensionedField<Type, GeoMesh>
+    (
+        io,
+        const_cast<GeometricField<Type, PatchField, GeoMesh>&>(tgf()),
+        tgf.isTmp()
+    ),
+    timeIndex_(tgf().timeIndex()),
+    field0Ptr_(NULL),
+    fieldPrevIterPtr_(NULL),
+    boundaryField_
+    (
+        this->mesh().boundary(),
+        *this,
+        patchFieldTypes,
+        actualPatchTypes
+    )
+{
+    if (debug)
+    {
+        InfoInFunction
+            << "Constructing from tmp resetting IO params and patch types"
+            << endl << this->info() << endl;
+    }
+
+    boundaryField_ == tgf().boundaryField_;
+
+    tgf.clear();
+}
+#endif
+
+
 // * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * * //
 
 template<class Type, template<class> class PatchField, class GeoMesh>
@@ -736,7 +765,8 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::storeOldTime() const
 
         if (debug)
         {
-            Info<< "Storing old time field for field" << endl
+            InfoInFunction
+                << "Storing old time field for field" << endl
                 << this->info() << endl;
         }
 
@@ -812,7 +842,8 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::storePrevIter() const
     {
         if (debug)
         {
-            Info<< "Allocating previous iteration field" << endl
+            InfoInFunction
+                << "Allocating previous iteration field" << endl
                 << this->info() << endl;
         }
 
@@ -958,10 +989,10 @@ writeData(Ostream& os) const
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >
+Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
 Foam::GeometricField<Type, PatchField, GeoMesh>::T() const
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > result
+    tmp<GeometricField<Type, PatchField, GeoMesh>> result
     (
         new GeometricField<Type, PatchField, GeoMesh>
         (
@@ -976,8 +1007,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::T() const
         )
     );
 
-    Foam::T(result().internalField(), internalField());
-    Foam::T(result().boundaryField(), boundaryField());
+    Foam::T(result.ref().internalField(), internalField());
+    Foam::T(result.ref().boundaryField(), boundaryField());
 
     return result;
 }
@@ -998,7 +1029,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::component
     const direction d
 ) const
 {
-    tmp<GeometricField<cmptType, PatchField, GeoMesh> > Component
+    tmp<GeometricField<cmptType, PatchField, GeoMesh>> Component
     (
         new GeometricField<cmptType, PatchField, GeoMesh>
         (
@@ -1013,8 +1044,8 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::component
         )
     );
 
-    Foam::component(Component().internalField(), internalField(), d);
-    Foam::component(Component().boundaryField(), boundaryField(), d);
+    Foam::component(Component.ref().internalField(), internalField(), d);
+    Foam::component(Component.ref().boundaryField(), boundaryField(), d);
 
     return Component;
 }
@@ -1106,7 +1137,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
 template<class Type, template<class> class PatchField, class GeoMesh>
 void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 {
     if (this == &(tgf()))
@@ -1150,7 +1181,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
 template<class Type, template<class> class PatchField, class GeoMesh>
 void Foam::GeometricField<Type, PatchField, GeoMesh>::operator==
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 {
     const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
@@ -1177,38 +1208,38 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator==
 }
 
 
-#define COMPUTED_ASSIGNMENT(TYPE, op)                                         \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op             \
-(                                                                             \
-    const GeometricField<TYPE, PatchField, GeoMesh>& gf                       \
-)                                                                             \
-{                                                                             \
-    checkField(*this, gf, #op);                                               \
-                                                                              \
-    dimensionedInternalField() op gf.dimensionedInternalField();              \
-    boundaryField() op gf.boundaryField();                                    \
-}                                                                             \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op             \
-(                                                                             \
-    const tmp<GeometricField<TYPE, PatchField, GeoMesh> >& tgf                \
-)                                                                             \
-{                                                                             \
-    operator op(tgf());                                                       \
-    tgf.clear();                                                              \
-}                                                                             \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op             \
-(                                                                             \
-    const dimensioned<TYPE>& dt                                               \
-)                                                                             \
-{                                                                             \
-    dimensionedInternalField() op dt;                                         \
-    boundaryField() op dt.value();                                            \
+#define COMPUTED_ASSIGNMENT(TYPE, op)                                          \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op              \
+(                                                                              \
+    const GeometricField<TYPE, PatchField, GeoMesh>& gf                        \
+)                                                                              \
+{                                                                              \
+    checkField(*this, gf, #op);                                                \
+                                                                               \
+    dimensionedInternalField() op gf.dimensionedInternalField();               \
+    boundaryField() op gf.boundaryField();                                     \
+}                                                                              \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op              \
+(                                                                              \
+    const tmp<GeometricField<TYPE, PatchField, GeoMesh>>& tgf                  \
+)                                                                              \
+{                                                                              \
+    operator op(tgf());                                                        \
+    tgf.clear();                                                               \
+}                                                                              \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op              \
+(                                                                              \
+    const dimensioned<TYPE>& dt                                                \
+)                                                                              \
+{                                                                              \
+    dimensionedInternalField() op dt;                                          \
+    boundaryField() op dt.value();                                             \
 }
 
 COMPUTED_ASSIGNMENT(Type, +=)
@@ -1247,7 +1278,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
 Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 {
     os << tgf();
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H
index 18c5c37b2d1cb4164470379bc01bafed0021a402..27daf8d4313852f66975097e7417ccf1d21c9c76 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
 Ostream& operator<<
 (
     Ostream&,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>&
 );
 
 
@@ -144,12 +144,12 @@ public:
 
             //- Construct from a BoundaryMesh,
             //  reference to the internal field
-            //  and a PtrList<PatchField<Type> >
+            //  and a PtrList<PatchField<Type>>
             GeometricBoundaryField
             (
                 const BoundaryMesh&,
                 const DimensionedInternalField&,
-                const PtrList<PatchField<Type> >&
+                const PtrList<PatchField<Type>>&
             );
 
             //- Construct as copy setting the reference to the internal field
@@ -330,7 +330,7 @@ public:
             const Mesh&,
             const dimensionSet&,
             const Field<Type>&,
-            const PtrList<PatchField<Type> >&
+            const PtrList<PatchField<Type>>&
         );
 
         //- Construct and read given IOobject
@@ -359,7 +359,7 @@ public:
         #ifndef NoConstructFromTmp
         GeometricField
         (
-            const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+            const tmp<GeometricField<Type, PatchField, GeoMesh>>&
         );
         #endif
 
@@ -375,7 +375,7 @@ public:
         GeometricField
         (
             const IOobject&,
-            const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+            const tmp<GeometricField<Type, PatchField, GeoMesh>>&
         );
         #endif
 
@@ -391,7 +391,7 @@ public:
         GeometricField
         (
             const word& newName,
-            const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+            const tmp<GeometricField<Type, PatchField, GeoMesh>>&
         );
         #endif
 
@@ -412,6 +412,17 @@ public:
             const wordList& actualPatchTypes = wordList()
         );
 
+        //- Construct as copy resetting IO parameters and boundary types
+        #ifndef NoConstructFromTmp
+        GeometricField
+        (
+            const IOobject&,
+            const tmp<GeometricField<Type, PatchField, GeoMesh>>&,
+            const wordList& patchFieldTypes,
+            const wordList& actualPatchTypes = wordList()
+        );
+        #endif
+
 
     //- Destructor
     virtual ~GeometricField();
@@ -472,7 +483,7 @@ public:
         bool needReference() const;
 
         //- Return a component of the field
-        tmp<GeometricField<cmptType, PatchField, GeoMesh> > component
+        tmp<GeometricField<cmptType, PatchField, GeoMesh>> component
         (
             const direction
         ) const;
@@ -481,7 +492,7 @@ public:
         bool writeData(Ostream&) const;
 
         //- Return transpose (only if it is a tensor field)
-        tmp<GeometricField<Type, PatchField, GeoMesh> > T() const;
+        tmp<GeometricField<Type, PatchField, GeoMesh>> T() const;
 
         //- Relax field (for steady-state solution).
         //  alpha = 1 : no relaxation
@@ -549,23 +560,23 @@ public:
     // Member operators
 
         void operator=(const GeometricField<Type, PatchField, GeoMesh>&);
-        void operator=(const tmp<GeometricField<Type, PatchField, GeoMesh> >&);
+        void operator=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
         void operator=(const dimensioned<Type>&);
 
-        void operator==(const tmp<GeometricField<Type, PatchField, GeoMesh> >&);
+        void operator==(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
         void operator==(const dimensioned<Type>&);
 
         void operator+=(const GeometricField<Type, PatchField, GeoMesh>&);
-        void operator+=(const tmp<GeometricField<Type, PatchField, GeoMesh> >&);
+        void operator+=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
 
         void operator-=(const GeometricField<Type, PatchField, GeoMesh>&);
-        void operator-=(const tmp<GeometricField<Type, PatchField, GeoMesh> >&);
+        void operator-=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
 
         void operator*=(const GeometricField<scalar, PatchField, GeoMesh>&);
-        void operator*=(const tmp<GeometricField<scalar,PatchField,GeoMesh> >&);
+        void operator*=(const tmp<GeometricField<scalar,PatchField,GeoMesh>>&);
 
         void operator/=(const GeometricField<scalar, PatchField, GeoMesh>&);
-        void operator/=(const tmp<GeometricField<scalar,PatchField,GeoMesh> >&);
+        void operator/=(const tmp<GeometricField<scalar,PatchField,GeoMesh>>&);
 
         void operator+=(const dimensioned<Type>&);
         void operator-=(const dimensioned<Type>&);
@@ -585,7 +596,7 @@ public:
         friend Ostream& operator<< <Type, PatchField, GeoMesh>
         (
             Ostream&,
-            const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+            const tmp<GeometricField<Type, PatchField, GeoMesh>>&
         );
 };
 
@@ -608,7 +619,7 @@ Ostream& operator<<
 #include "GeometricFieldI.H"
 
 #ifdef NoRepository
-#   include "GeometricField.C"
+    #include "GeometricField.C"
 #endif
 
 #include "GeometricFieldFunctions.H"
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C
index bdd619e359219fb4f6b8b025c8ba1f8afc1d3f18..e04a1588b569d6ab6ac777d26df11fe05b0137a7 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,13 @@ void T
 }
 
 
-template<class Type, template<class> class PatchField, class GeoMesh, int r>
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh,
+    direction r
+>
 void pow
 (
     GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>& gf,
@@ -77,8 +83,14 @@ void pow
     pow(gf.boundaryField(), gf1.boundaryField(), r);
 }
 
-template<class Type, template<class> class PatchField, class GeoMesh, int r>
-tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh> >
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh,
+    direction r
+>
+tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>>
 pow
 (
     const GeometricField<Type, PatchField, GeoMesh>& gf,
@@ -87,7 +99,7 @@ pow
 {
     typedef typename powProduct<Type, r>::type powProductType;
 
-    tmp<GeometricField<powProductType, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<powProductType, PatchField, GeoMesh>> tPow
     (
         new GeometricField<powProductType, PatchField, GeoMesh>
         (
@@ -104,17 +116,23 @@ pow
         )
     );
 
-    pow<Type, r, PatchField, GeoMesh>(tPow(), gf);
+    pow<Type, r, PatchField, GeoMesh>(tPow.ref(), gf);
 
     return tPow;
 }
 
 
-template<class Type, template<class> class PatchField, class GeoMesh, int r>
-tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh> >
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh,
+    direction r
+>
+tmp<GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>>
 pow
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf,
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf,
     typename powProduct<Type, r>::type
 )
 {
@@ -122,7 +140,7 @@ pow
 
     const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
 
-    tmp<GeometricField<powProductType, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<powProductType, PatchField, GeoMesh>> tPow
     (
         new GeometricField<powProductType, PatchField, GeoMesh>
         (
@@ -139,7 +157,7 @@ pow
         )
     );
 
-    pow<Type, r, PatchField, GeoMesh>(tPow(), gf);
+    pow<Type, r, PatchField, GeoMesh>(tPow.ref(), gf);
 
     tgf.clear();
 
@@ -173,7 +191,7 @@ sqr(const GeometricField<Type, PatchField, GeoMesh>& gf)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
 
-    tmp<GeometricField<outerProductType, PatchField, GeoMesh> > tSqr
+    tmp<GeometricField<outerProductType, PatchField, GeoMesh>> tSqr
     (
         new GeometricField<outerProductType, PatchField, GeoMesh>
         (
@@ -190,7 +208,7 @@ sqr(const GeometricField<Type, PatchField, GeoMesh>& gf)
         )
     );
 
-    sqr(tSqr(), gf);
+    sqr(tSqr.ref(), gf);
 
     return tSqr;
 }
@@ -205,13 +223,13 @@ tmp
         GeoMesh
     >
 >
-sqr(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf)
+sqr(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf)
 {
     typedef typename outerProduct<Type, Type>::type outerProductType;
 
     const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
 
-    tmp<GeometricField<outerProductType, PatchField, GeoMesh> > tSqr
+    tmp<GeometricField<outerProductType, PatchField, GeoMesh>> tSqr
     (
         new GeometricField<outerProductType, PatchField, GeoMesh>
         (
@@ -228,7 +246,7 @@ sqr(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf)
         )
     );
 
-    sqr(tSqr(), gf);
+    sqr(tSqr.ref(), gf);
 
     tgf.clear();
 
@@ -248,12 +266,12 @@ void magSqr
 }
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
+tmp<GeometricField<scalar, PatchField, GeoMesh>> magSqr
 (
     const GeometricField<Type, PatchField, GeoMesh>& gf
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tMagSqr
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tMagSqr
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -270,20 +288,20 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
         )
     );
 
-    magSqr(tMagSqr(), gf);
+    magSqr(tMagSqr.ref(), gf);
 
     return tMagSqr;
 }
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
+tmp<GeometricField<scalar, PatchField, GeoMesh>> magSqr
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 {
     const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tMagSqr
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tMagSqr
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -300,7 +318,7 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
         )
     );
 
-    magSqr(tMagSqr(), gf);
+    magSqr(tMagSqr.ref(), gf);
 
     tgf.clear();
 
@@ -320,12 +338,12 @@ void mag
 }
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
+tmp<GeometricField<scalar, PatchField, GeoMesh>> mag
 (
     const GeometricField<Type, PatchField, GeoMesh>& gf
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tMag
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tMag
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -342,20 +360,20 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
         )
     );
 
-    mag(tMag(), gf);
+    mag(tMag.ref(), gf);
 
     return tMag;
 }
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
+tmp<GeometricField<scalar, PatchField, GeoMesh>> mag
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 )
 {
     const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tMag
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tMag
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -372,7 +390,7 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
         )
     );
 
-    mag(tMag(), gf);
+    mag(tMag.ref(), gf);
 
     tgf.clear();
 
@@ -411,7 +429,7 @@ cmptAv(const GeometricField<Type, PatchField, GeoMesh>& gf)
     typedef typename GeometricField<Type, PatchField, GeoMesh>::cmptType
         cmptType;
 
-    tmp<GeometricField<cmptType, PatchField, GeoMesh> > CmptAv
+    tmp<GeometricField<cmptType, PatchField, GeoMesh>> CmptAv
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -428,7 +446,7 @@ cmptAv(const GeometricField<Type, PatchField, GeoMesh>& gf)
         )
     );
 
-    cmptAv(CmptAv(), gf);
+    cmptAv(CmptAv.ref(), gf);
 
     return CmptAv;
 }
@@ -443,14 +461,14 @@ tmp
         GeoMesh
     >
 >
-cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf)
+cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf)
 {
     typedef typename GeometricField<Type, PatchField, GeoMesh>::cmptType
         cmptType;
 
     const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
 
-    tmp<GeometricField<cmptType, PatchField, GeoMesh> > CmptAv
+    tmp<GeometricField<cmptType, PatchField, GeoMesh>> CmptAv
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -467,7 +485,7 @@ cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf)
         )
     );
 
-    cmptAv(CmptAv(), gf);
+    cmptAv(CmptAv.ref(), gf);
 
     tgf.clear();
 
@@ -475,31 +493,31 @@ cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf)
 }
 
 
-#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc)       \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf                       \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type>                                                  \
-    (                                                                         \
-        #func "(" + gf.name() + ')',                                          \
-        gf.dimensions(),                                                      \
-        Foam::func(gFunc(gf.internalField()), gFunc(gf.boundaryField()))      \
-    );                                                                        \
-}                                                                             \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
-)                                                                             \
-{                                                                             \
-    dimensioned<returnType> res = func(tgf1());                               \
-    tgf1.clear();                                                             \
-    return res;                                                               \
+#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc)        \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf                        \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type>                                                   \
+    (                                                                          \
+        #func "(" + gf.name() + ')',                                           \
+        gf.dimensions(),                                                       \
+        Foam::func(gFunc(gf.internalField()), gFunc(gf.boundaryField()))       \
+    );                                                                         \
+}                                                                              \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
+)                                                                              \
+{                                                                              \
+    dimensioned<returnType> res = func(tgf1());                                \
+    tgf1.clear();                                                              \
+    return res;                                                                \
 }
 
 UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, gMax)
@@ -508,31 +526,31 @@ UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, gMin)
 #undef UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY
 
 
-#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc)                     \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf                       \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type>                                                  \
-    (                                                                         \
-        #func "(" + gf.name() + ')',                                          \
-        gf.dimensions(),                                                      \
-        gFunc(gf.internalField())                                             \
-    );                                                                        \
-}                                                                             \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
-)                                                                             \
-{                                                                             \
-    dimensioned<returnType> res = func(tgf1());                               \
-    tgf1.clear();                                                             \
-    return res;                                                               \
+#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc)                      \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf                        \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type>                                                   \
+    (                                                                          \
+        #func "(" + gf.name() + ')',                                           \
+        gf.dimensions(),                                                       \
+        gFunc(gf.internalField())                                              \
+    );                                                                         \
+}                                                                              \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
+)                                                                              \
+{                                                                              \
+    dimensioned<returnType> res = func(tgf1());                                \
+    tgf1.clear();                                                              \
+    return res;                                                                \
 }
 
 UNARY_REDUCTION_FUNCTION(Type, sum, gSum)
@@ -569,380 +587,375 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, '|', divide)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-void opFunc                                                                   \
-(                                                                             \
-    GeometricField                                                            \
-    <typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf,          \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+void opFunc                                                                    \
+(                                                                              \
+    GeometricField                                                             \
+    <typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf,           \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
     Foam::opFunc(gf.internalField(), gf1.internalField(), gf2.internalField());\
     Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), gf2.boundaryField());\
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes               \
-    (                                                                         \
-        new GeometricField<productType, PatchField, GeoMesh>                  \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + gf1.name() + #op + gf2.name() + ')',                    \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            gf1.dimensions() op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::opFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-                                                                              \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes =             \
-        reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh>::New  \
-        (                                                                     \
-            tgf2,                                                             \
-            '(' + gf1.name() + #op + gf2.name() + ')',                        \
-            gf1.dimensions() op gf2.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh>           \
-    ::clear(tgf2);                                                            \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-                                                                              \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes =             \
-        reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh>::New  \
-        (                                                                     \
-            tgf1,                                                             \
-            '(' + gf1.name() + #op + gf2.name() + ')',                        \
-            gf1.dimensions() op gf2.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh>           \
-    ::clear(tgf1);                                                            \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type1, Type2>::type productType;                 \
-                                                                              \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes =             \
-        reuseTmpTmpGeometricField                                             \
-        <productType, Type1, Type1, Type2, PatchField, GeoMesh>::New          \
-        (                                                                     \
-            tgf1,                                                             \
-            tgf2,                                                             \
-            '(' + gf1.name() + #op + gf2.name() + ')',                        \
-            gf1.dimensions() op gf2.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    reuseTmpTmpGeometricField                                                 \
-        <productType, Type1, Type1, Type2, PatchField, GeoMesh>               \
-    ::clear(tgf1, tgf2);                                                      \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-void opFunc                                                                   \
-(                                                                             \
-    GeometricField                                                            \
-    <typename product<Type, Form>::type, PatchField, GeoMesh>& gf,            \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
-    const dimensioned<Form>& dvs                                              \
-)                                                                             \
-{                                                                             \
-    Foam::opFunc(gf.internalField(), gf1.internalField(), dvs.value());       \
-    Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), dvs.value());       \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
-    const dimensioned<Form>& dvs                                              \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-                                                                              \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes               \
-    (                                                                         \
-        new GeometricField<productType, PatchField, GeoMesh>                  \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + gf1.name() + #op + dvs.name() + ')',                    \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            gf1.dimensions() op dvs.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::opFunc(tRes(), gf1, dvs);                                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{                                                                             \
-    return gf1 op dimensioned<Form>(static_cast<const Form&>(vs));            \
-}                                                                             \
-                                                                              \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
-    const dimensioned<Form>& dvs                                              \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Type, Form>::type productType;                   \
-                                                                              \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1();            \
-                                                                              \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes =             \
-        reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            '(' + gf1.name() + #op + dvs.name() + ')',                        \
-            gf1.dimensions() op dvs.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes(), gf1, dvs);                                           \
-                                                                              \
-    reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>            \
-    ::clear(tgf1);                                                            \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{                                                                             \
-    return tgf1 op dimensioned<Form>(static_cast<const Form&>(vs));           \
-}                                                                             \
-                                                                              \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-void opFunc                                                                   \
-(                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>& gf,            \
-    const dimensioned<Form>& dvs,                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
-)                                                                             \
-{                                                                             \
-    Foam::opFunc(gf.internalField(), dvs.value(), gf1.internalField());       \
-    Foam::opFunc(gf.boundaryField(), dvs.value(), gf1.boundaryField());       \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes               \
-    (                                                                         \
-        new GeometricField<productType, PatchField, GeoMesh>                  \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + dvs.name() + #op + gf1.name() + ')',                    \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            dvs.dimensions() op gf1.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::opFunc(tRes(), dvs, gf1);                                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Form>(static_cast<const Form&>(vs)) op gf1;            \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
-)                                                                             \
-{                                                                             \
-    typedef typename product<Form, Type>::type productType;                   \
-                                                                              \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1();            \
-                                                                              \
-    tmp<GeometricField<productType, PatchField, GeoMesh> > tRes =             \
-        reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            '(' + dvs.name() + #op + gf1.name() + ')',                        \
-            dvs.dimensions() op gf1.dimensions()                              \
-        );                                                                    \
-                                                                              \
-    Foam::opFunc(tRes(), dvs, gf1);                                           \
-                                                                              \
-    reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>            \
-    ::clear(tgf1);                                                            \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Form>(static_cast<const Form&>(vs)) op tgf1;           \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh>  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes                 \
+    (                                                                          \
+        new GeometricField<productType, PatchField, GeoMesh>                   \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + gf1.name() + #op + gf2.name() + ')',                     \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            gf1.dimensions() op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::opFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh>  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+                                                                               \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes =               \
+        reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh>::New   \
+        (                                                                      \
+            tgf2,                                                              \
+            '(' + gf1.name() + #op + gf2.name() + ')',                         \
+            gf1.dimensions() op gf2.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh>  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+                                                                               \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes =               \
+        reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh>::New   \
+        (                                                                      \
+            tgf1,                                                              \
+            '(' + gf1.name() + #op + gf2.name() + ')',                         \
+            gf1.dimensions() op gf2.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh>  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type1, Type2>::type productType;                  \
+                                                                               \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes =               \
+        reuseTmpTmpGeometricField                                              \
+        <productType, Type1, Type1, Type2, PatchField, GeoMesh>::New           \
+        (                                                                      \
+            tgf1,                                                              \
+            tgf2,                                                              \
+            '(' + gf1.name() + #op + gf2.name() + ')',                         \
+            gf1.dimensions() op gf2.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+void opFunc                                                                    \
+(                                                                              \
+    GeometricField                                                             \
+    <typename product<Type, Form>::type, PatchField, GeoMesh>& gf,             \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1,                      \
+    const dimensioned<Form>& dvs                                               \
+)                                                                              \
+{                                                                              \
+    Foam::opFunc(gf.internalField(), gf1.internalField(), dvs.value());        \
+    Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), dvs.value());        \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1,                      \
+    const dimensioned<Form>& dvs                                               \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+                                                                               \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes                 \
+    (                                                                          \
+        new GeometricField<productType, PatchField, GeoMesh>                   \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + gf1.name() + #op + dvs.name() + ')',                     \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            gf1.dimensions() op dvs.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::opFunc(tRes.ref(), gf1, dvs);                                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1,                      \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{                                                                              \
+    return gf1 op dimensioned<Form>(static_cast<const Form&>(vs));             \
+}                                                                              \
+                                                                               \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1,                \
+    const dimensioned<Form>& dvs                                               \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Type, Form>::type productType;                    \
+                                                                               \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1();             \
+                                                                               \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes =               \
+        reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            '(' + gf1.name() + #op + dvs.name() + ')',                         \
+            gf1.dimensions() op dvs.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref(), gf1, dvs);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1,                \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{                                                                              \
+    return tgf1 op dimensioned<Form>(static_cast<const Form&>(vs));            \
+}                                                                              \
+                                                                               \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+void opFunc                                                                    \
+(                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>& gf,             \
+    const dimensioned<Form>& dvs,                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1                       \
+)                                                                              \
+{                                                                              \
+    Foam::opFunc(gf.internalField(), dvs.value(), gf1.internalField());        \
+    Foam::opFunc(gf.boundaryField(), dvs.value(), gf1.boundaryField());        \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1                       \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes                 \
+    (                                                                          \
+        new GeometricField<productType, PatchField, GeoMesh>                   \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + dvs.name() + #op + gf1.name() + ')',                     \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            dvs.dimensions() op gf1.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::opFunc(tRes.ref(), dvs, gf1);                                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1                       \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Form>(static_cast<const Form&>(vs)) op gf1;             \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
+)                                                                              \
+{                                                                              \
+    typedef typename product<Form, Type>::type productType;                    \
+                                                                               \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1();             \
+                                                                               \
+    tmp<GeometricField<productType, PatchField, GeoMesh>> tRes =               \
+        reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            '(' + dvs.name() + #op + gf1.name() + ')',                         \
+            dvs.dimensions() op gf1.dimensions()                               \
+        );                                                                     \
+                                                                               \
+    Foam::opFunc(tRes.ref(), dvs, gf1);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh>>   \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Form>(static_cast<const Form&>(vs)) op tgf1;            \
 }
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H
index 459bb7b7b74b954e3143db88254bea9ed684272e..a98f4a608340a11f99079f1d24f9424686f21fa2 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,14 +56,26 @@ void T
      const GeometricField<Type, PatchField, GeoMesh>& gf1
 );
 
-template<class Type, template<class> class PatchField, class GeoMesh, int r>
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh,
+    direction r
+>
 void pow
 (
     GeometricField<typename powProduct<Type, r>::type, PatchField, GeoMesh>& gf,
     const GeometricField<Type, PatchField, GeoMesh>& gf1
 );
 
-template<class Type, template<class> class PatchField, class GeoMesh, int r>
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh,
+    direction r
+>
 tmp
 <
     GeometricField
@@ -75,7 +87,13 @@ pow
     typename powProduct<Type, r>::type
 );
 
-template<class Type, template<class> class PatchField, class GeoMesh, int r>
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh,
+    direction r
+>
 tmp
 <
     GeometricField
@@ -83,7 +101,7 @@ tmp
 >
 pow
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf,
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf,
     typename powProduct<Type, r>::type
 );
 
@@ -117,7 +135,7 @@ tmp
         GeoMesh
     >
 >
-sqr(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf);
+sqr(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf);
 
 template<class Type, template<class> class PatchField, class GeoMesh>
 void magSqr
@@ -127,15 +145,15 @@ void magSqr
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
+tmp<GeometricField<scalar, PatchField, GeoMesh>> magSqr
 (
     const GeometricField<Type, PatchField, GeoMesh>& gf
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > magSqr
+tmp<GeometricField<scalar, PatchField, GeoMesh>> magSqr
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
@@ -146,15 +164,15 @@ void mag
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
+tmp<GeometricField<scalar, PatchField, GeoMesh>> mag
 (
     const GeometricField<Type, PatchField, GeoMesh>& gf
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > mag
+tmp<GeometricField<scalar, PatchField, GeoMesh>> mag
 (
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
@@ -191,21 +209,21 @@ tmp
         GeoMesh
     >
 >
-cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf);
-
-
-#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc)       \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf                       \
-);                                                                            \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
+cmptAv(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf);
+
+
+#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc)        \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf                        \
+);                                                                             \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
 );
 
 UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, max, gMax)
@@ -214,18 +232,18 @@ UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(Type, min, gMin)
 #undef UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY
 
 
-#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc)                     \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf                       \
-);                                                                            \
-                                                                              \
-template<class Type, template<class> class PatchField, class GeoMesh>         \
-dimensioned<returnType> func                                                  \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
+#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc)                      \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf                        \
+);                                                                             \
+                                                                               \
+template<class Type, template<class> class PatchField, class GeoMesh>          \
+dimensioned<returnType> func                                                   \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
 );
 
 UNARY_REDUCTION_FUNCTION(Type, sum, gSum)
@@ -262,216 +280,216 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, '|', divide)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-void opFunc                                                                   \
-(                                                                             \
-    GeometricField                                                            \
-    <typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf,          \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-        <typename product<Type1, Type2>::type, PatchField, GeoMesh>           \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Type1, Type2>::type, PatchField, GeoMesh>               \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Type1, Type2>::type, PatchField, GeoMesh>               \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Type1, class Type2, template<class> class PatchField, class GeoMesh>   \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Type1, Type2>::type, PatchField, GeoMesh>               \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-void opFunc                                                                   \
-(                                                                             \
-    GeometricField                                                            \
-    <typename product<Type, Form>::type, PatchField, GeoMesh>& gf,            \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
-    const dimensioned<Form>& dvs                                              \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Type, Form>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
-    const dimensioned<Form>& dvs                                              \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1,                     \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Type, Form>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
-    const dimensioned<Form>& dvs                                              \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1,              \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-void opFunc                                                                   \
-(                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>& gf,            \
-    const dimensioned<Form>& dvs,                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const GeometricField<Type, PatchField, GeoMesh>& gf1                      \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<class Form, class Type, template<class> class PatchField, class GeoMesh>     \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const dimensioned<Form>& dvs,                                             \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
-);                                                                            \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type, template<class> class PatchField,                             \
-    class GeoMesh                                                             \
->                                                                             \
-tmp                                                                           \
-<                                                                             \
-    GeometricField                                                            \
-    <typename product<Form, Type>::type, PatchField, GeoMesh>                 \
->                                                                             \
-operator op                                                                   \
-(                                                                             \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1               \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+void opFunc                                                                    \
+(                                                                              \
+    GeometricField                                                             \
+    <typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf,           \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+        <typename product<Type1, Type2>::type, PatchField, GeoMesh>            \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Type1, Type2>::type, PatchField, GeoMesh>                \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Type1, Type2>::type, PatchField, GeoMesh>                \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Type1, class Type2, template<class> class PatchField, class GeoMesh>    \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Type1, Type2>::type, PatchField, GeoMesh>                \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+void opFunc                                                                    \
+(                                                                              \
+    GeometricField                                                             \
+    <typename product<Type, Form>::type, PatchField, GeoMesh>& gf,             \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1,                      \
+    const dimensioned<Form>& dvs                                               \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Type, Form>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1,                      \
+    const dimensioned<Form>& dvs                                               \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1,                      \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Type, Form>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1,                \
+    const dimensioned<Form>& dvs                                               \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1,                \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+void opFunc                                                                    \
+(                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>& gf,             \
+    const dimensioned<Form>& dvs,                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1                       \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1                       \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const GeometricField<Type, PatchField, GeoMesh>& gf1                       \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<class Form, class Type, template<class> class PatchField, class GeoMesh>      \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const dimensioned<Form>& dvs,                                              \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
+);                                                                             \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type, template<class> class PatchField,                              \
+    class GeoMesh                                                              \
+>                                                                              \
+tmp                                                                            \
+<                                                                              \
+    GeometricField                                                             \
+    <typename product<Form, Type>::type, PatchField, GeoMesh>                  \
+>                                                                              \
+operator op                                                                    \
+(                                                                              \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf1                 \
 );
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.C
index 9b598d5bc3a448714cc0be2092e0a03f722a3ca9..2d0b007c27b83ac80b0ec015d27e1ef2e1a28488 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,787 +32,775 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                        \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1                     \
-)                                                                             \
-{                                                                             \
-    Foam::Func(res.internalField(), gf1.internalField());                     \
-    Foam::Func(res.boundaryField(), gf1.boundaryField());                     \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1                     \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + gf1.name() + ')',                                 \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            Dfunc(gf1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1);                                                  \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            #Func "(" + gf1.name() + ')',                                     \
-            Dfunc(gf1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1);                                                  \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1);                \
-                                                                              \
-    return tRes;                                                              \
+#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                         \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1                      \
+)                                                                              \
+{                                                                              \
+    Foam::Func(res.internalField(), gf1.internalField());                      \
+    Foam::Func(res.boundaryField(), gf1.boundaryField());                      \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1                      \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + gf1.name() + ')',                                  \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            Dfunc(gf1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1);                                               \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            #Func "(" + gf1.name() + ')',                                      \
+            Dfunc(gf1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1);                                               \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)                  \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1                     \
-)                                                                             \
-{                                                                             \
-    Foam::OpFunc(res.internalField(), gf1.internalField());                   \
-    Foam::OpFunc(res.boundaryField(), gf1.boundaryField());                   \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1                     \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Op + gf1.name(),                                             \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            Dfunc(gf1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1);                                                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            #Op + gf1.name(),                                                 \
-            Dfunc(gf1.dimensions())                                           \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1);                                                \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1);                \
-                                                                              \
-    return tRes;                                                              \
+#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)                   \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1                      \
+)                                                                              \
+{                                                                              \
+    Foam::OpFunc(res.internalField(), gf1.internalField());                    \
+    Foam::OpFunc(res.boundaryField(), gf1.boundaryField());                    \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1                      \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Op + gf1.name(),                                              \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            Dfunc(gf1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1);                                             \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            #Op + gf1.name(),                                                  \
+            Dfunc(gf1.dimensions())                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1);                                             \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
     Foam::Func(res.internalField(), gf1.internalField(), gf2.internalField());\
     Foam::Func(res.boundaryField(), gf1.boundaryField(), gf2.boundaryField());\
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + gf1.name() + ',' + gf2.name() + ')',              \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            Func(gf1.dimensions(), gf2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1, gf2);                                             \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf2,                                                             \
-            #Func "(" + gf1.name() + ',' + gf2.name() + ')',                  \
-            Func(gf1.dimensions(), gf2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1, gf2);                                             \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type2, PatchField, GeoMesh>::clear(tgf2);                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            #Func "(" + gf1.name() + ',' + gf2.name() + ')',                  \
-            Func(gf1.dimensions(), gf2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1, gf2);                                             \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1);                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpTmpGeometricField                                             \
-            <ReturnType, Type1, Type1, Type2, PatchField, GeoMesh>            \
-        ::New                                                                 \
-        (                                                                     \
-            tgf1,                                                             \
-            tgf2,                                                             \
-            #Func "(" + gf1.name() + ',' + gf2.name() + ')',                  \
-            Func(gf1.dimensions(), gf2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1, gf2);                                             \
-                                                                              \
-    reuseTmpTmpGeometricField                                                 \
-        <ReturnType, Type1, Type1, Type2, PatchField, GeoMesh>                \
-        ::clear(tgf1, tgf2);                                                  \
-                                                                              \
-    return tRes;                                                              \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + gf1.name() + ',' + gf2.name() + ')',               \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            Func(gf1.dimensions(), gf2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1, gf2);                                          \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf2,                                                              \
+            #Func "(" + gf1.name() + ',' + gf2.name() + ')',                   \
+            Func(gf1.dimensions(), gf2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1, gf2);                                          \
+                                                                               \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            #Func "(" + gf1.name() + ',' + gf2.name() + ')',                   \
+            Func(gf1.dimensions(), gf2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1, gf2);                                          \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpTmpGeometricField                                              \
+            <ReturnType, Type1, Type1, Type2, PatchField, GeoMesh>             \
+        ::New                                                                  \
+        (                                                                      \
+            tgf1,                                                              \
+            tgf2,                                                              \
+            #Func "(" + gf1.name() + ',' + gf2.name() + ')',                   \
+            Func(gf1.dimensions(), gf2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1, gf2);                                          \
+                                                                               \
+    tgf1.clear();                                                              \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const dimensioned<Type1>& dt1,                                            \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    Foam::Func(res.internalField(), dt1.value(), gf2.internalField());        \
-    Foam::Func(res.boundaryField(), dt1.value(), gf2.boundaryField());        \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + dt1.name() + ',' + gf2.name() + ')',              \
-                gf2.instance(),                                               \
-                gf2.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf2.mesh(),                                                       \
-            Func(dt1.dimensions(), gf2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), dt1, gf2);                                             \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    return Func(dimensioned<Type1>(t1), gf2);                                 \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf2,                                                             \
-            #Func "(" + dt1.name() + gf2.name() + ',' + ')',                  \
-            Func(dt1.dimensions(), gf2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), dt1, gf2);                                             \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type2, PatchField, GeoMesh>::clear(tgf2);                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    return Func(dimensioned<Type1>(t1), tgf2);                                \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const dimensioned<Type1>& dt1,                                             \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    Foam::Func(res.internalField(), dt1.value(), gf2.internalField());         \
+    Foam::Func(res.boundaryField(), dt1.value(), gf2.boundaryField());         \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + dt1.name() + ',' + gf2.name() + ')',               \
+                gf2.instance(),                                                \
+                gf2.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf2.mesh(),                                                        \
+            Func(dt1.dimensions(), gf2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), dt1, gf2);                                          \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    return Func(dimensioned<Type1>(t1), gf2);                                  \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf2,                                                              \
+            #Func "(" + dt1.name() + gf2.name() + ',' + ')',                   \
+            Func(dt1.dimensions(), gf2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), dt1, gf2);                                          \
+                                                                               \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    return Func(dimensioned<Type1>(t1), tgf2);                                 \
 }
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-void Func                                                                     \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    Foam::Func(res.internalField(), gf1.internalField(), dt2.value());        \
-    Foam::Func(res.boundaryField(), gf1.boundaryField(), dt2.value());        \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                #Func "(" + gf1.name() + ',' + dt2.name() + ')',              \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            Func(gf1.dimensions(), dt2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1, dt2);                                             \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return Func(gf1, dimensioned<Type2>(t2));                                 \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            #Func "(" + gf1.name() + ',' + dt2.name() + ')',                  \
-            Func(gf1.dimensions(), dt2.dimensions())                          \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::Func(tRes(), gf1, dt2);                                             \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1);                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return Func(tgf1, dimensioned<Type2>(t2));                                \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+void Func                                                                      \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    Foam::Func(res.internalField(), gf1.internalField(), dt2.value());         \
+    Foam::Func(res.boundaryField(), gf1.boundaryField(), dt2.value());         \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #Func "(" + gf1.name() + ',' + dt2.name() + ')',               \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            Func(gf1.dimensions(), dt2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1, dt2);                                          \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return Func(gf1, dimensioned<Type2>(t2));                                  \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            #Func "(" + gf1.name() + ',' + dt2.name() + ')',                   \
+            Func(gf1.dimensions(), dt2.dimensions())                           \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::Func(tRes.ref(), gf1, dt2);                                          \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return Func(tgf1, dimensioned<Type2>(t2));                                 \
 }
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    Foam::OpFunc                                                              \
-        (res.internalField(), gf1.internalField(), gf2.internalField());      \
-    Foam::OpFunc                                                              \
-        (res.boundaryField(), gf1.boundaryField(), gf2.boundaryField());      \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + gf1.name() + OpName + gf2.name() + ')',                 \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            gf1.dimensions() Op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf2,                                                             \
-            '(' + gf1.name() + OpName + gf2.name() + ')',                     \
-            gf1.dimensions() Op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type2, PatchField, GeoMesh>::clear(tgf2);                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            '(' + gf1.name() + OpName + gf2.name() + ')',                     \
-            gf1.dimensions() Op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    reuseTmpGeometricField                                                    \
-        <ReturnType, Type1, PatchField, GeoMesh>::clear(tgf1);                \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpTmpGeometricField                                             \
-            <ReturnType, Type1, Type1, Type2, PatchField, GeoMesh>::New       \
-        (                                                                     \
-            tgf1,                                                             \
-            tgf2,                                                             \
-            '(' + gf1.name() + OpName + gf2.name() + ')',                     \
-            gf1.dimensions() Op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1, gf2);                                           \
-                                                                              \
-    reuseTmpTmpGeometricField                                                 \
-        <ReturnType, Type1, Type1, Type2, PatchField, GeoMesh>                \
-        ::clear(tgf1, tgf2);                                                  \
-                                                                              \
-    return tRes;                                                              \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    Foam::OpFunc                                                               \
+        (res.internalField(), gf1.internalField(), gf2.internalField());       \
+    Foam::OpFunc                                                               \
+        (res.boundaryField(), gf1.boundaryField(), gf2.boundaryField());       \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + gf1.name() + OpName + gf2.name() + ')',                  \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            gf1.dimensions() Op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf2,                                                              \
+            '(' + gf1.name() + OpName + gf2.name() + ')',                      \
+            gf1.dimensions() Op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            '(' + gf1.name() + OpName + gf2.name() + ')',                      \
+            gf1.dimensions() Op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpTmpGeometricField                                              \
+            <ReturnType, Type1, Type1, Type2, PatchField, GeoMesh>::New        \
+        (                                                                      \
+            tgf1,                                                              \
+            tgf2,                                                              \
+            '(' + gf1.name() + OpName + gf2.name() + ')',                      \
+            gf1.dimensions() Op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1, gf2);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
 }
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const dimensioned<Type1>& dt1,                                            \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    Foam::OpFunc(res.internalField(), dt1.value(), gf2.internalField());      \
-    Foam::OpFunc(res.boundaryField(), dt1.value(), gf2.boundaryField());      \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + dt1.name() + OpName + gf2.name() + ')',                 \
-                gf2.instance(),                                               \
-                gf2.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf2.mesh(),                                                       \
-            dt1.dimensions() Op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), dt1, gf2);                                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2                     \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type1>(t1) Op gf2;                                     \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf2,                                                             \
-            '(' + dt1.name() + OpName + gf2.name() + ')',                     \
-            dt1.dimensions() Op gf2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), dt1, gf2);                                           \
-                                                                              \
-    reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>            \
-        ::clear(tgf2);                                                        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2              \
-)                                                                             \
-{                                                                             \
-    return dimensioned<Type1>(t1) Op tgf2;                                    \
+#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)  \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const dimensioned<Type1>& dt1,                                             \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    Foam::OpFunc(res.internalField(), dt1.value(), gf2.internalField());       \
+    Foam::OpFunc(res.boundaryField(), dt1.value(), gf2.boundaryField());       \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + dt1.name() + OpName + gf2.name() + ')',                  \
+                gf2.instance(),                                                \
+                gf2.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf2.mesh(),                                                        \
+            dt1.dimensions() Op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), dt1, gf2);                                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2                      \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type1>(t1) Op gf2;                                      \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type2, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf2,                                                              \
+            '(' + dt1.name() + OpName + gf2.name() + ')',                      \
+            dt1.dimensions() Op gf2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), dt1, gf2);                                        \
+                                                                               \
+    tgf2.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2                \
+)                                                                              \
+{                                                                              \
+    return dimensioned<Type1>(t1) Op tgf2;                                     \
 }
 
 
-#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-void OpFunc                                                                   \
-(                                                                             \
-    GeometricField<ReturnType, PatchField, GeoMesh>& res,                     \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    Foam::OpFunc(res.internalField(), gf1.internalField(), dt2.value());      \
-    Foam::OpFunc(res.boundaryField(), gf1.boundaryField(), dt2.value());      \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        new GeometricField<ReturnType, PatchField, GeoMesh>                   \
-        (                                                                     \
-            IOobject                                                          \
-            (                                                                 \
-                '(' + gf1.name() + OpName + dt2.name() + ')',                 \
-                gf1.instance(),                                               \
-                gf1.db(),                                                     \
-                IOobject::NO_READ,                                            \
-                IOobject::NO_WRITE                                            \
-            ),                                                                \
-            gf1.mesh(),                                                       \
-            gf1.dimensions() Op dt2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1, dt2);                                           \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                    \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return gf1 Op dimensioned<Type2>(t2);                                     \
-}                                                                             \
-                                                                              \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const dimensioned<Type2>& dt2                                             \
-)                                                                             \
-{                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();           \
-                                                                              \
-    tmp<GeometricField<ReturnType, PatchField, GeoMesh> > tRes                \
-    (                                                                         \
-        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New   \
-        (                                                                     \
-            tgf1,                                                             \
-            '(' + gf1.name() + OpName + dt2.name() + ')',                     \
-            gf1.dimensions() Op dt2.dimensions()                              \
-        )                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::OpFunc(tRes(), gf1, dt2);                                           \
-                                                                              \
-    reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>            \
-        ::clear(tgf1);                                                        \
-                                                                              \
-    return tRes;                                                              \
-}                                                                             \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1,             \
-    const Type2& t2                                                           \
-)                                                                             \
-{                                                                             \
-    return tgf1 Op dimensioned<Type2>(t2);                                    \
+#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)  \
+                                                                               \
+TEMPLATE                                                                       \
+void OpFunc                                                                    \
+(                                                                              \
+    GeometricField<ReturnType, PatchField, GeoMesh>& res,                      \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    Foam::OpFunc(res.internalField(), gf1.internalField(), dt2.value());       \
+    Foam::OpFunc(res.boundaryField(), gf1.boundaryField(), dt2.value());       \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        new GeometricField<ReturnType, PatchField, GeoMesh>                    \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                '(' + gf1.name() + OpName + dt2.name() + ')',                  \
+                gf1.instance(),                                                \
+                gf1.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gf1.mesh(),                                                        \
+            gf1.dimensions() Op dt2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1, dt2);                                        \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1,                     \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return gf1 Op dimensioned<Type2>(t2);                                      \
+}                                                                              \
+                                                                               \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const dimensioned<Type2>& dt2                                              \
+)                                                                              \
+{                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();            \
+                                                                               \
+    tmp<GeometricField<ReturnType, PatchField, GeoMesh>> tRes                  \
+    (                                                                          \
+        reuseTmpGeometricField<ReturnType, Type1, PatchField, GeoMesh>::New    \
+        (                                                                      \
+            tgf1,                                                              \
+            '(' + gf1.name() + OpName + dt2.name() + ')',                      \
+            gf1.dimensions() Op dt2.dimensions()                               \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::OpFunc(tRes.ref(), gf1, dt2);                                        \
+                                                                               \
+    tgf1.clear();                                                              \
+                                                                               \
+    return tRes;                                                               \
+}                                                                              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,               \
+    const Type2& t2                                                            \
+)                                                                              \
+{                                                                              \
+    return tgf1 Op dimensioned<Type2>(t2);                                     \
 }
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)    \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)      \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.H
index 417b06ba440e5b74cf26a1edda68e0151ef89eb1..3f0bbfdb64b30ed71b9abf690e042232041aeebb 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldFunctionsM.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,239 +25,239 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                        \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df                      \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1              \
+#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)                         \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df                       \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1                \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define UNARY_OPERATOR(ReturnType, Type1, Op, opFunc, Dfunc)                  \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1              \
+#define UNARY_OPERATOR(ReturnType, Type1, Op, opFunc, Dfunc)                   \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1                \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                       \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
+#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)                        \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
+#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
 );
 
 
-#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)               \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const Type2& t2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > Func                    \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf2,             \
-    const Type2& t2                                                           \
+#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)                \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const Type2& t2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> Func                      \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf2,               \
+    const Type2& t2                                                            \
 );
 
 
-#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                  \
-    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                   \
+#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)                   \
+    BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func)                    \
     BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)         \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
+#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)          \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
 );
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const GeometricField<Type2, PatchField, GeoMesh>& df2                     \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const dimensioned<Type1>& dt1,                                            \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const Type1& t1,                                                          \
-    const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2              \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const GeometricField<Type2, PatchField, GeoMesh>& df2                      \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const dimensioned<Type1>& dt1,                                             \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const Type1& t1,                                                           \
+    const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tdf2                \
 );
 
 
 #define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc) \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const GeometricField<Type1, PatchField, GeoMesh>& df1,                    \
-    const Type2& t2                                                           \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const dimensioned<Type2>& dt2                                             \
-);                                                                            \
-                                                                              \
-TEMPLATE                                                                      \
-tmp<GeometricField<ReturnType, PatchField, GeoMesh> > operator Op             \
-(                                                                             \
-    const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,             \
-    const Type2& t2                                                           \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const GeometricField<Type1, PatchField, GeoMesh>& df1,                     \
+    const Type2& t2                                                            \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const dimensioned<Type2>& dt2                                              \
+);                                                                             \
+                                                                               \
+TEMPLATE                                                                       \
+tmp<GeometricField<ReturnType, PatchField, GeoMesh>> operator Op               \
+(                                                                              \
+    const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tdf1,               \
+    const Type2& t2                                                            \
 );
 
 
-#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)    \
-    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)     \
+    BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)      \
     BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
 
 
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H
index 35885d523f27c24367725ee33150e49ae700591b..aeda9e37fe49dbf856a86e74c9e2206d84011ca6 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
 inline const Foam::GeometricField<Type, PatchField, GeoMesh>&
 Foam::GeometricField<Type, PatchField, GeoMesh>::null()
 {
-    return NullObjectRef<GeometricField<Type, PatchField, GeoMesh> >();
+    return NullObjectRef<GeometricField<Type, PatchField, GeoMesh>>();
 }
 
 
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H
index 5861a2efddc46834e3f099ee84e588b14c71367e..3cb442163dc933ab3ae2e564d2c0e647b66bba93 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldReuseFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,6 +33,93 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+template
+<
+    class Type,
+    template<class> class PatchField,
+    class GeoMesh
+>
+bool reusable(const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf)
+{
+    if (tgf.isTmp())
+    {
+        if (GeometricField<Type, PatchField, GeoMesh>::debug)
+        {
+            const GeometricField<Type, PatchField, GeoMesh>& gf = tgf();
+            const typename GeometricField<Type, PatchField, GeoMesh>::
+                GeometricBoundaryField& gbf = gf.boundaryField();
+
+            forAll(gbf, patchi)
+            {
+                if
+                (
+                    !polyPatch::constraintType(gbf[patchi].patch().type())
+                 && !isA<typename PatchField<Type>::Calculated>(gbf[patchi])
+                )
+                {
+                    WarningInFunction
+                        << "Attempt to reuse temporary with non-reusable BC "
+                        << gbf[patchi].type() << endl;
+
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+    else
+    {
+        return false;
+    }
+}
+
+
+template<class TypeR, template<class> class PatchField, class GeoMesh>
+tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
+(
+    const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
+    const word& name,
+    const dimensionSet& dimensions,
+    const bool initRet = false
+)
+{
+    GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
+        const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
+
+    if (reusable(tgf1))
+    {
+        gf1.rename(name);
+        gf1.dimensions().reset(dimensions);
+        return tgf1;
+    }
+    else
+    {
+        tmp<GeometricField<TypeR, PatchField, GeoMesh>> rtgf
+        (
+            new GeometricField<TypeR, PatchField, GeoMesh>
+            (
+                IOobject
+                (
+                    name,
+                    gf1.instance(),
+                    gf1.db()
+                ),
+                gf1.mesh(),
+                dimensions
+            )
+        );
+
+        if (initRet)
+        {
+            rtgf.ref() == tgf1();
+        }
+
+        return rtgf;
+    }
+}
+
+
 template
 <
     class TypeR,
@@ -44,38 +131,30 @@ class reuseTmpGeometricField
 {
 public:
 
-    static tmp<GeometricField<TypeR, PatchField, GeoMesh> > New
+    static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
     (
-        const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,
+        const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
         const word& name,
         const dimensionSet& dimensions
     )
     {
-        const GeometricField<Type1, PatchField, GeoMesh>& df1 = tdf1();
+        const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();
 
-        return tmp<GeometricField<TypeR, PatchField, GeoMesh> >
+        return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
         (
             new GeometricField<TypeR, PatchField, GeoMesh>
             (
                 IOobject
                 (
                     name,
-                    df1.instance(),
-                    df1.db()
+                    gf1.instance(),
+                    gf1.db()
                 ),
-                df1.mesh(),
+                gf1.mesh(),
                 dimensions
             )
         );
     }
-
-    static void clear
-    (
-        const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1
-    )
-    {
-        tdf1.clear();
-    }
 };
 
 
@@ -84,51 +163,40 @@ class reuseTmpGeometricField<TypeR, TypeR, PatchField, GeoMesh>
 {
 public:
 
-    static tmp<GeometricField<TypeR, PatchField, GeoMesh> > New
+    static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
     (
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf1,
+        const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
         const word& name,
         const dimensionSet& dimensions
     )
     {
-        GeometricField<TypeR, PatchField, GeoMesh>& df1 =
-            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf1());
+        GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
+            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
 
-        if (tdf1.isTmp())
+        if (reusable(tgf1))
         {
-            df1.rename(name);
-            df1.dimensions().reset(dimensions);
-            return tdf1;
+            gf1.rename(name);
+            gf1.dimensions().reset(dimensions);
+            return tgf1;
         }
         else
         {
-            return tmp<GeometricField<TypeR, PatchField, GeoMesh> >
+            return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
             (
                 new GeometricField<TypeR, PatchField, GeoMesh>
                 (
                     IOobject
                     (
                         name,
-                        df1.instance(),
-                        df1.db()
+                        gf1.instance(),
+                        gf1.db()
                     ),
-                    df1.mesh(),
+                    gf1.mesh(),
                     dimensions
                 )
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf1
-    )
-    {
-        if (tdf1.isTmp())
-        {
-            tdf1.ptr();
-        }
-    }
 };
 
 
@@ -145,41 +213,31 @@ class reuseTmpTmpGeometricField
 {
 public:
 
-    static tmp<GeometricField<TypeR, PatchField, GeoMesh> > New
+    static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
     (
-        const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2,
+        const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
+        const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2,
         const word& name,
         const dimensionSet& dimensions
     )
     {
-        const GeometricField<Type1, PatchField, GeoMesh>& df1 = tdf1();
+        const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();
 
-        return tmp<GeometricField<TypeR, PatchField, GeoMesh> >
+        return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
         (
             new GeometricField<TypeR, PatchField, GeoMesh>
             (
                 IOobject
                 (
                     name,
-                    df1.instance(),
-                    df1.db()
+                    gf1.instance(),
+                    gf1.db()
                 ),
-                df1.mesh(),
+                gf1.mesh(),
                 dimensions
             )
         );
     }
-
-    static void clear
-    (
-        const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2
-    )
-    {
-        tdf1.clear();
-        tdf2.clear();
-    }
 };
 
 
@@ -196,55 +254,42 @@ class reuseTmpTmpGeometricField
 {
 public:
 
-    static tmp<GeometricField<TypeR, PatchField, GeoMesh> > New
+    static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
     (
-        const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf2,
+        const tmp<GeometricField<Type1, PatchField, GeoMesh>>& tgf1,
+        const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf2,
         const word& name,
         const dimensionSet& dimensions
     )
     {
-        const GeometricField<Type1, PatchField, GeoMesh>& df1 = tdf1();
-        GeometricField<TypeR, PatchField, GeoMesh>& df2 =
-            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf2());
+        const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1();
+        GeometricField<TypeR, PatchField, GeoMesh>& gf2 =
+            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf2());
 
-        if (tdf2.isTmp())
+        if (reusable(tgf2))
         {
-            df2.rename(name);
-            df2.dimensions().reset(dimensions);
-            return tdf2;
+            gf2.rename(name);
+            gf2.dimensions().reset(dimensions);
+            return tgf2;
         }
         else
         {
-            return tmp<GeometricField<TypeR, PatchField, GeoMesh> >
+            return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
             (
                 new GeometricField<TypeR, PatchField, GeoMesh>
                 (
                     IOobject
                     (
                         name,
-                        df1.instance(),
-                        df1.db()
+                        gf1.instance(),
+                        gf1.db()
                     ),
-                    df1.mesh(),
+                    gf1.mesh(),
                     dimensions
                 )
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf2
-    )
-    {
-        tdf1.clear();
-        if (tdf2.isTmp())
-        {
-            tdf2.ptr();
-        }
-    }
 };
 
 
@@ -259,54 +304,41 @@ class reuseTmpTmpGeometricField<TypeR, TypeR, TypeR, Type2, PatchField, GeoMesh>
 {
 public:
 
-    static tmp<GeometricField<TypeR, PatchField, GeoMesh> > New
+    static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
     (
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2,
+        const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
+        const tmp<GeometricField<Type2, PatchField, GeoMesh>>& tgf2,
         const word& name,
         const dimensionSet& dimensions
     )
     {
-        GeometricField<TypeR, PatchField, GeoMesh>& df1 =
-            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf1());
+        GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
+            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
 
-        if (tdf1.isTmp())
+        if (reusable(tgf1))
         {
-            df1.rename(name);
-            df1.dimensions().reset(dimensions);
-            return tdf1;
+            gf1.rename(name);
+            gf1.dimensions().reset(dimensions);
+            return tgf1;
         }
         else
         {
-            return tmp<GeometricField<TypeR, PatchField, GeoMesh> >
+            return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
             (
                 new GeometricField<TypeR, PatchField, GeoMesh>
                 (
                     IOobject
                     (
                         name,
-                        df1.instance(),
-                        df1.db()
+                        gf1.instance(),
+                        gf1.db()
                     ),
-                    df1.mesh(),
+                    gf1.mesh(),
                     dimensions
                 )
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tdf2
-    )
-    {
-        if (tdf1.isTmp())
-        {
-            tdf1.ptr();
-        }
-        tdf2.clear();
-    }
 };
 
 
@@ -315,67 +347,49 @@ class reuseTmpTmpGeometricField<TypeR, TypeR, TypeR, TypeR, PatchField, GeoMesh>
 {
 public:
 
-    static tmp<GeometricField<TypeR, PatchField, GeoMesh> > New
+    static tmp<GeometricField<TypeR, PatchField, GeoMesh>> New
     (
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf2,
+        const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf1,
+        const tmp<GeometricField<TypeR, PatchField, GeoMesh>>& tgf2,
         const word& name,
         const dimensionSet& dimensions
     )
     {
-        GeometricField<TypeR, PatchField, GeoMesh>& df1 =
-            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf1());
-        GeometricField<TypeR, PatchField, GeoMesh>& df2 =
-            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tdf2());
+        GeometricField<TypeR, PatchField, GeoMesh>& gf1 =
+            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf1());
+        GeometricField<TypeR, PatchField, GeoMesh>& gf2 =
+            const_cast<GeometricField<TypeR, PatchField, GeoMesh>& >(tgf2());
 
-        if (tdf1.isTmp())
+        if (reusable(tgf1))
         {
-            df1.rename(name);
-            df1.dimensions().reset(dimensions);
-            return tdf1;
+            gf1.rename(name);
+            gf1.dimensions().reset(dimensions);
+            return tgf1;
         }
-        else if (tdf2.isTmp())
+        else if (reusable(tgf2))
         {
-            df2.rename(name);
-            df2.dimensions().reset(dimensions);
-            return tdf2;
+            gf2.rename(name);
+            gf2.dimensions().reset(dimensions);
+            return tgf2;
         }
         else
         {
-            return tmp<GeometricField<TypeR, PatchField, GeoMesh> >
+            return tmp<GeometricField<TypeR, PatchField, GeoMesh>>
             (
                 new GeometricField<TypeR, PatchField, GeoMesh>
                 (
                     IOobject
                     (
                         name,
-                        df1.instance(),
-                        df1.db()
+                        gf1.instance(),
+                        gf1.db()
                     ),
-                    df1.mesh(),
+                    gf1.mesh(),
                     dimensions
                 )
             );
         }
     }
-
-    static void clear
-    (
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf1,
-        const tmp<GeometricField<TypeR, PatchField, GeoMesh> >& tdf2
-    )
-    {
-        if (tdf1.isTmp())
-        {
-            tdf1.ptr();
-            tdf2.clear();
-        }
-        else if (tdf2.isTmp())
-        {
-            tdf1.clear();
-            tdf2.ptr();
-        }
-    }
 };
 
 
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H
index 10150f7a64b3f363a28d23244f5f3f0be914609c..637e4314f3915a5daad22a4bf34716a18ea3a47f 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/MapGeometricFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ void MapGeometricFields
     HashTable<const GeometricField<Type, PatchField, GeoMesh>*> fields
     (
         mapper.thisDb().objectRegistry::template
-            lookupClass<GeometricField<Type, PatchField, GeoMesh> >()
+            lookupClass<GeometricField<Type, PatchField, GeoMesh>>()
     );
 
     // It is necessary to enforce that all old-time fields are stored
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.C
index 968f5f4c0f0529d5dce4d573359b0b524c53761c..a70abece0ffd6fea1d21a481989c36a91527f8f3 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 template<class GeoField>
 Foam::tmp<GeoField> Foam::uniformInterpolate
 (
-    const HashPtrTable<GeoField, label, Hash<label> >& fields,
+    const HashPtrTable<GeoField, label, Hash<label>>& fields,
     const labelList& indices,
     const scalarField& weights
 )
@@ -92,7 +92,7 @@ Foam::tmp<GeoField> Foam::uniformInterpolate
 
     // Interpolate
     tmp<GeoField> tfld(new GeoField(fieldIO, weights[0]*field0));
-    GeoField& fld = tfld();
+    GeoField& fld = tfld.ref();
 
     for (label i = 1; i < times.size(); ++i)
     {
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.H
index f196f71c192e64e4bae65f268a2e57396b048d42..5174d91fd96b2640c98a93f21b04fdfc1960c0c4 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/uniformInterpolate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ namespace Foam
 template<class GeoField>
 tmp<GeoField> uniformInterpolate
 (
-    const HashPtrTable<GeoField, label, Hash<label> >& fields,
+    const HashPtrTable<GeoField, label, Hash<label>>& fields,
     const labelList& indices,
     const scalarField& weights
 );
@@ -77,7 +77,7 @@ tmp<GeoField> uniformInterpolate
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uniformInterpolate.C"
+    #include "uniformInterpolate.C"
 #endif
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C
index cb34740ca3e4c78a197a2eaa0a02c76a1b76935c..41bbe8178fd045dd635b9bf923c4783bf7b39e47 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,13 +49,13 @@ void stabilise
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
+tmp<GeometricField<scalar, PatchField, GeoMesh>> stabilise
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf,
     const dimensioned<scalar>& ds
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tRes
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tRes
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -72,24 +72,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
         )
     );
 
-    stabilise(tRes(), gsf, ds);
+    stabilise(tRes.ref(), gsf, ds);
 
     return tRes;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
+tmp<GeometricField<scalar, PatchField, GeoMesh>> stabilise
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf,
     const dimensioned<scalar>& ds
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tRes
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tRes
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf,
             "stabilise(" + gsf.name() + ',' + ds.name() + ')',
@@ -97,9 +97,9 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
         )
     );
 
-    stabilise(tRes(), gsf, ds);
+    stabilise(tRes.ref(), gsf, ds);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
+    tgsf.clear();
 
     return tRes;
 }
@@ -132,13 +132,13 @@ void pow
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -159,24 +159,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), gsf1, gsf2);
+    pow(tPow.ref(), gsf1, gsf2);
 
     return tPow;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf1,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf1,
             "pow(" + gsf1.name() + ',' + gsf2.name() + ')',
@@ -188,26 +188,26 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), gsf1, gsf2);
+    pow(tPow.ref(), gsf1, gsf2);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf1);
+    tgsf1.clear();
 
     return tPow;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf2
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf2,
             "pow(" + gsf1.name() + ',' + gsf2.name() + ')',
@@ -219,24 +219,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), gsf1, gsf2);
+    pow(tPow.ref(), gsf1, gsf2);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf2);
+    tgsf2.clear();
 
     return tPow;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf1,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf2
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1();
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
         reuseTmpTmpGeometricField
             <scalar, scalar, scalar, scalar, PatchField, GeoMesh>::New
@@ -252,11 +252,10 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), gsf1, gsf2);
+    pow(tPow.ref(), gsf1, gsf2);
 
-    reuseTmpTmpGeometricField
-        <scalar, scalar, scalar, scalar, PatchField, GeoMesh>
-        ::clear(tgsf1, tgsf2);
+    tgsf1.clear();
+    tgsf2.clear();
 
     return tPow;
 }
@@ -276,13 +275,13 @@ void pow
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf,
     const dimensionedScalar& ds
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -299,23 +298,23 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), gsf, ds);
+    pow(tPow.ref(), gsf, ds);
 
     return tPow;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf,
     const dimensionedScalar& ds
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf,
             "pow(" + gsf.name() + ',' + ds.name() + ')',
@@ -323,15 +322,15 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), gsf, ds);
+    pow(tPow.ref(), gsf, ds);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
+    tgsf.clear();
 
     return tPow;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf,
     const scalar& s
@@ -341,9 +340,9 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf,
     const scalar& s
 )
 {
@@ -365,13 +364,13 @@ void pow
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const dimensionedScalar& ds,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -388,24 +387,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), ds, gsf);
+    pow(tPow.ref(), ds, gsf);
 
     return tPow;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const dimensionedScalar& ds,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tPow
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tPow
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf,
             "pow(" + ds.name() + ',' + gsf.name() + ')',
@@ -413,15 +412,15 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
         )
     );
 
-    pow(tPow(), ds, gsf);
+    pow(tPow.ref(), ds, gsf);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
+    tgsf.clear();
 
     return tPow;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const scalar& s,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf
@@ -431,10 +430,10 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
+tmp<GeometricField<scalar, PatchField, GeoMesh>> pow
 (
     const scalar& s,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf
 )
 {
     return pow(dimensionedScalar(s), tgsf);
@@ -457,13 +456,13 @@ void atan2
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -480,24 +479,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), gsf1, gsf2);
+    atan2(tAtan2.ref(), gsf1, gsf2);
 
     return tAtan2;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf1,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf1,
             "atan2(" + gsf1.name() + ',' + gsf2.name() + ')',
@@ -505,26 +504,26 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), gsf1, gsf2);
+    atan2(tAtan2.ref(), gsf1, gsf2);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf1);
+    tgsf1.clear();
 
     return tAtan2;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf2
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf2,
             "atan2(" + gsf1.name() + ',' + gsf2.name() + ')',
@@ -532,24 +531,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), gsf1, gsf2);
+    atan2(tAtan2.ref(), gsf1, gsf2);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf2);
+    tgsf2.clear();
 
     return tAtan2;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf1,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf2
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1();
     const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
         reuseTmpTmpGeometricField
             <scalar, scalar, scalar, scalar, PatchField, GeoMesh>::New
@@ -561,11 +560,10 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), gsf1, gsf2);
+    atan2(tAtan2.ref(), gsf1, gsf2);
 
-    reuseTmpTmpGeometricField
-        <scalar, scalar, scalar, scalar, PatchField, GeoMesh>
-        ::clear(tgsf1, tgsf2);
+    tgsf1.clear();
+    tgsf2.clear();
 
     return tAtan2;
 }
@@ -585,13 +583,13 @@ void atan2
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf,
     const dimensionedScalar& ds
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -608,23 +606,23 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), gsf, ds);
+    atan2(tAtan2.ref(), gsf, ds);
 
     return tAtan2;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf,
     const dimensionedScalar& ds
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf,
             "atan2(" + gsf.name() + ',' + ds.name() + ')',
@@ -632,15 +630,15 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), gsf, ds);
+    atan2(tAtan2.ref(), gsf, ds);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
+    tgsf.clear();
 
     return tAtan2;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const GeometricField<scalar, PatchField, GeoMesh>& gsf,
     const scalar& s
@@ -650,9 +648,9 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf,
     const scalar& s
 )
 {
@@ -674,13 +672,13 @@ void atan2
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const dimensionedScalar& ds,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf
 )
 {
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
         new GeometricField<scalar, PatchField, GeoMesh>
         (
@@ -697,24 +695,24 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), ds, gsf);
+    atan2(tAtan2.ref(), ds, gsf);
 
     return tAtan2;
 }
 
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const dimensionedScalar& ds,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf
 )
 {
     const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
 
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tAtan2
     (
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
+        New
         (
             tgsf,
             "atan2(" + ds.name() + ',' + gsf.name() + ')',
@@ -722,15 +720,15 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
         )
     );
 
-    atan2(tAtan2(), ds, gsf);
+    atan2(tAtan2.ref(), ds, gsf);
 
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
+    tgsf.clear();
 
     return tAtan2;
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const scalar& s,
     const GeometricField<scalar, PatchField, GeoMesh>& gsf
@@ -740,10 +738,10 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
 }
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
+tmp<GeometricField<scalar, PatchField, GeoMesh>> atan2
 (
     const scalar& s,
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf
 )
 {
     return atan2(dimensionedScalar(s), tgsf);
@@ -791,88 +789,87 @@ UNARY_FUNCTION(scalar, scalar, y1, trans)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define BesselFunc(func)                                                     \
-                                                                            \
-template<template<class> class PatchField, class GeoMesh>                   \
-void func                                                                   \
-(                                                                           \
-    GeometricField<scalar, PatchField, GeoMesh>& gsf,                       \
-    const int n,                                                            \
-    const GeometricField<scalar, PatchField, GeoMesh>& gsf1                 \
-)                                                                           \
-{                                                                           \
-    func(gsf.internalField(), n, gsf1.internalField());                     \
-    func(gsf.boundaryField(), n, gsf1.boundaryField());                     \
-}                                                                           \
-                                                                            \
-template<template<class> class PatchField, class GeoMesh>                   \
-tmp<GeometricField<scalar, PatchField, GeoMesh> > func                      \
-(                                                                           \
-    const int n,                                                            \
-    const GeometricField<scalar, PatchField, GeoMesh>& gsf                  \
-)                                                                           \
-{                                                                           \
-    if (!gsf.dimensions().dimensionless())                                  \
-    {                                                                       \
-        FatalErrorInFunction                                                \
-            << "gsf not dimensionless"                                      \
-            << abort(FatalError);                                           \
-    }                                                                       \
-                                                                            \
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tFunc                 \
-    (                                                                       \
-        new GeometricField<scalar, PatchField, GeoMesh>                     \
-        (                                                                   \
-            IOobject                                                        \
-            (                                                               \
-                #func "(" + gsf.name() + ')',                               \
-                gsf.instance(),                                             \
-                gsf.db(),                                                   \
-                IOobject::NO_READ,                                          \
-                IOobject::NO_WRITE                                          \
-            ),                                                              \
-            gsf.mesh(),                                                     \
-            dimless                                                         \
-        )                                                                   \
-    );                                                                      \
-                                                                            \
-    func(tFunc(), n, gsf);                                                  \
-                                                                            \
-    return tFunc;                                                           \
-}                                                                           \
-                                                                            \
-template<template<class> class PatchField, class GeoMesh>                   \
-tmp<GeometricField<scalar, PatchField, GeoMesh> > func                      \
-(                                                                           \
-    const int n,                                                            \
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf           \
-)                                                                           \
-{                                                                           \
-    const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();        \
-                                                                            \
-    if (!gsf.dimensions().dimensionless())                                  \
-    {                                                                       \
-        FatalErrorInFunction                                                \
-            << " : gsf not dimensionless"                                   \
-            << abort(FatalError);                                           \
-    }                                                                       \
-                                                                            \
-    tmp<GeometricField<scalar, PatchField, GeoMesh> > tFunc                 \
-    (                                                                       \
-        reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New    \
-        (                                                                   \
-            tgsf,                                                           \
-            #func "(" + gsf.name() + ')',                                   \
-            dimless                                                         \
-        )                                                                   \
-    );                                                                      \
-                                                                            \
-    func(tFunc(), n, gsf);                                                  \
-                                                                            \
-    reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>             \
-    ::clear(tgsf);                                                          \
-                                                                            \
-    return tFunc;                                                           \
+#define BesselFunc(func)                                                       \
+                                                                               \
+template<template<class> class PatchField, class GeoMesh>                      \
+void func                                                                      \
+(                                                                              \
+    GeometricField<scalar, PatchField, GeoMesh>& gsf,                          \
+    const int n,                                                               \
+    const GeometricField<scalar, PatchField, GeoMesh>& gsf1                    \
+)                                                                              \
+{                                                                              \
+    func(gsf.internalField(), n, gsf1.internalField());                        \
+    func(gsf.boundaryField(), n, gsf1.boundaryField());                        \
+}                                                                              \
+                                                                               \
+template<template<class> class PatchField, class GeoMesh>                      \
+tmp<GeometricField<scalar, PatchField, GeoMesh>> func                          \
+(                                                                              \
+    const int n,                                                               \
+    const GeometricField<scalar, PatchField, GeoMesh>& gsf                     \
+)                                                                              \
+{                                                                              \
+    if (!gsf.dimensions().dimensionless())                                     \
+    {                                                                          \
+        FatalErrorInFunction                                                   \
+            << "gsf not dimensionless"                                         \
+            << abort(FatalError);                                              \
+    }                                                                          \
+                                                                               \
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tFunc                     \
+    (                                                                          \
+        new GeometricField<scalar, PatchField, GeoMesh>                        \
+        (                                                                      \
+            IOobject                                                           \
+            (                                                                  \
+                #func "(" + gsf.name() + ')',                                  \
+                gsf.instance(),                                                \
+                gsf.db(),                                                      \
+                IOobject::NO_READ,                                             \
+                IOobject::NO_WRITE                                             \
+            ),                                                                 \
+            gsf.mesh(),                                                        \
+            dimless                                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    func(tFunc.ref(), n, gsf);                                                 \
+                                                                               \
+    return tFunc;                                                              \
+}                                                                              \
+                                                                               \
+template<template<class> class PatchField, class GeoMesh>                      \
+tmp<GeometricField<scalar, PatchField, GeoMesh>> func                          \
+(                                                                              \
+    const int n,                                                               \
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf               \
+)                                                                              \
+{                                                                              \
+    const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();           \
+                                                                               \
+    if (!gsf.dimensions().dimensionless())                                     \
+    {                                                                          \
+        FatalErrorInFunction                                                   \
+            << " : gsf not dimensionless"                                      \
+            << abort(FatalError);                                              \
+    }                                                                          \
+                                                                               \
+    tmp<GeometricField<scalar, PatchField, GeoMesh>> tFunc                     \
+    (                                                                          \
+        New                                                                    \
+        (                                                                      \
+            tgsf,                                                              \
+            #func "(" + gsf.name() + ')',                                      \
+            dimless                                                            \
+        )                                                                      \
+    );                                                                         \
+                                                                               \
+    func(tFunc.ref(), n, gsf);                                                 \
+                                                                               \
+    tgsf.clear();                                                              \
+                                                                               \
+    return tFunc;                                                              \
 }
 
 BesselFunc(jn)
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H
index 78dc2e1d30e0f0124ecb7539606ef5d21c56ffa5..950b526796e5b19b36b7c2515d3e1f897452a8ed 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,16 +57,16 @@ void stabilise
 );
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
+tmp<GeometricField<scalar, PatchField, GeoMesh>> stabilise
 (
     const GeometricField<scalar, PatchField, GeoMesh>&,
     const dimensioned<scalar>&
 );
 
 template<template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<scalar, PatchField, GeoMesh> > stabilise
+tmp<GeometricField<scalar, PatchField, GeoMesh>> stabilise
 (
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >&,
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>&,
     const dimensioned<scalar>&
 );
 
@@ -140,17 +140,17 @@ void func                                                                      \
 );                                                                             \
                                                                                \
 template<template<class> class PatchField, class GeoMesh>                      \
-tmp<GeometricField<scalar, PatchField, GeoMesh> > func                         \
+tmp<GeometricField<scalar, PatchField, GeoMesh>> func                          \
 (                                                                              \
     const int n,                                                               \
     const GeometricField<scalar, PatchField, GeoMesh>&                         \
 );                                                                             \
                                                                                \
 template<template<class> class PatchField, class GeoMesh>                      \
-tmp<GeometricField<scalar, PatchField, GeoMesh> > func                         \
+tmp<GeometricField<scalar, PatchField, GeoMesh>> func                          \
 (                                                                              \
     const int n,                                                               \
-    const tmp<GeometricField<scalar, PatchField, GeoMesh> >&                   \
+    const tmp<GeometricField<scalar, PatchField, GeoMesh>>&                    \
 );
 
 BesselFunc(jn)
@@ -168,7 +168,7 @@ BesselFunc(yn)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "GeometricScalarField.C"
+    #include "GeometricScalarField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricSphericalTensorField/GeometricSphericalTensorField.H b/src/OpenFOAM/fields/GeometricFields/GeometricSphericalTensorField/GeometricSphericalTensorField.H
index 94a48d134d4d08b8c949b85bdd1af53c543d4d7b..e2a49fb04c003a894c96062d866fe5c87decbf58 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricSphericalTensorField/GeometricSphericalTensorField.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricSphericalTensorField/GeometricSphericalTensorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,7 @@ BINARY_TYPE_OPERATOR(sphericalTensor, scalar, sphericalTensor, /, '|', divide)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "GeometricSphericalTensorField.C"
+    #include "GeometricSphericalTensorField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricSymmTensorField/GeometricSymmTensorField.H b/src/OpenFOAM/fields/GeometricFields/GeometricSymmTensorField/GeometricSymmTensorField.H
index 5706894bbebeb7bc748c5f15d9340bb970afff36..53a4245619a1fab41dd3b2794afdf3a3f3763a07 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricSymmTensorField/GeometricSymmTensorField.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricSymmTensorField/GeometricSymmTensorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,7 +79,7 @@ BINARY_TYPE_OPERATOR(tensor, symmTensor, symmTensor, &, '&', dot)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "GeometricSymmTensorField.C"
+    #include "GeometricSymmTensorField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H
index e88d0e6cb40d3280e923f6e3f713aa00766c400d..0479e636e9968ccccdc0f73d65f9cc2e4807a449 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricTensorField/GeometricTensorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ BINARY_TYPE_OPERATOR(vector, vector, tensor, /, '|', divide)
 #include "undefFieldFunctionsM.H"
 
 #ifdef NoRepository
-#   include "GeometricTensorField.C"
+    #include "GeometricTensorField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C
index 1ea9ae6e115ebf9d28fd9a502001f450ffd4c9aa..601e1041c0f9ad2d70ed072720d61aaa81916f82 100644
--- a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C
+++ b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ template
     template<class> class SlicedPatchField,
     class GeoMesh
 >
-Foam::tmp<Foam::FieldField<PatchField, Type> >
+Foam::tmp<Foam::FieldField<PatchField, Type>>
 Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
 slicedBoundaryField
 (
@@ -45,12 +45,11 @@ slicedBoundaryField
     const bool preserveProcessorOnly
 )
 {
-    tmp<FieldField<PatchField, Type> > tbf
+    tmp<FieldField<PatchField, Type>> tbf
     (
         new FieldField<PatchField, Type>(mesh.boundary().size())
     );
-
-    FieldField<PatchField, Type>& bf = tbf();
+    FieldField<PatchField, Type>& bf = tbf.ref();
 
     forAll(mesh.boundary(), patchi)
     {
@@ -113,7 +112,7 @@ template
     template<class> class SlicedPatchField,
     class GeoMesh
 >
-Foam::tmp<Foam::FieldField<PatchField, Type> >
+Foam::tmp<Foam::FieldField<PatchField, Type>>
 Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
 slicedBoundaryField
 (
@@ -122,12 +121,11 @@ slicedBoundaryField
     const bool preserveCouples
 )
 {
-    tmp<FieldField<PatchField, Type> > tbf
+    tmp<FieldField<PatchField, Type>> tbf
     (
         new FieldField<PatchField, Type>(mesh.boundary().size())
     );
-
-    FieldField<PatchField, Type>& bf = tbf();
+    FieldField<PatchField, Type>& bf = tbf.ref();
 
     forAll(mesh.boundary(), patchi)
     {
@@ -160,7 +158,7 @@ slicedBoundaryField
                     DimensionedField<Type, GeoMesh>::null()
                 )
             );
-            bf[patchi].UList<Type>::operator=(bField[patchi]);
+            bf[patchi].UList<Type>::shallowCopy(bField[patchi]);
         }
     }
 
@@ -195,7 +193,7 @@ DimensionedInternalField::DimensionedInternalField
     )
 {
     // Set the internalField to the slice of the complete field
-    UList<Type>::operator=
+    UList<Type>::shallowCopy
     (
         typename Field<Type>::subField(iField, GeoMesh::size(mesh))
     );
@@ -229,7 +227,7 @@ SlicedGeometricField
     )
 {
     // Set the internalField to the slice of the complete field
-    UList<Type>::operator=
+    UList<Type>::shallowCopy
     (
         typename Field<Type>::subField(completeField, GeoMesh::size(mesh))
     );
@@ -273,7 +271,7 @@ SlicedGeometricField
     )
 {
     // Set the internalField to the slice of the complete field
-    UList<Type>::operator=
+    UList<Type>::shallowCopy
     (
         typename Field<Type>::subField(completeIField, GeoMesh::size(mesh))
     );
@@ -307,7 +305,7 @@ SlicedGeometricField
     )
 {
     // Set the internalField to the supplied internal field
-    UList<Type>::operator=(gf.internalField());
+    UList<Type>::shallowCopy(gf.internalField());
 
     correctBoundaryConditions();
 }
@@ -336,7 +334,7 @@ SlicedGeometricField
     )
 {
     // Set the internalField to the supplied internal field
-    UList<Type>::operator=(gf.internalField());
+    UList<Type>::shallowCopy(gf.internalField());
 }
 
 
@@ -354,7 +352,7 @@ Foam::SlicedGeometricField<Type, PatchField, SlicedPatchField, GeoMesh>::
 {
     // Set the internalField storage pointer to NULL before its destruction
     // to protect the field it a slice of.
-    UList<Type>::operator=(UList<Type>(NULL, 0));
+    UList<Type>::shallowCopy(UList<Type>(NULL, 0));
 }
 
 
@@ -370,7 +368,7 @@ DimensionedInternalField::~DimensionedInternalField()
 {
     // Set the internalField storage pointer to NULL before its destruction
     // to protect the field it a slice of.
-    UList<Type>::operator=(UList<Type>(NULL, 0));
+    UList<Type>::shallowCopy(UList<Type>(NULL, 0));
 }
 
 
diff --git a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H
index dd23712e6748586c8a919e384c628b301c6d58ba..716225e3fb3a42f050ea3db833f06221593c722e 100644
--- a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H
+++ b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,7 +79,7 @@ private:
 
         //- Slice the given field and a create a PtrList of SlicedPatchField
         //  from which the boundary field is built
-        tmp<FieldField<PatchField, Type> >  slicedBoundaryField
+        tmp<FieldField<PatchField, Type>>  slicedBoundaryField
         (
             const Mesh& mesh,
             const Field<Type>& completeField,
@@ -89,7 +89,7 @@ private:
 
         //- Slice the given field and a create a PtrList of SlicedPatchField
         //  from which the boundary field is built
-        tmp<FieldField<PatchField, Type> >  slicedBoundaryField
+        tmp<FieldField<PatchField, Type>>  slicedBoundaryField
         (
             const Mesh& mesh,
             const FieldField<PatchField, Type>& bField,
@@ -108,7 +108,7 @@ private:
 
         //- Disallow standard assignment to tmp<GeometricField>,
         //  == assignment is allowed.
-        void operator=(const tmp<GeometricField<Type, PatchField, GeoMesh> >&);
+        void operator=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
 
 
 public:
@@ -215,7 +215,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SlicedGeometricField.C"
+    #include "SlicedGeometricField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H
index e83c2c0d58eca12d1fa8c6ae2dfb30e4c3b1081f..23c368b30082f8af7f6d11ef5ba499677b306660 100644
--- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H
+++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,6 +57,13 @@ class geometricOneField
 
 public:
 
+    // Public typedefs
+
+        typedef oneField InternalField;
+        typedef oneField PatchFieldType;
+        typedef oneFieldField GeometricBoundaryField;
+        typedef one cmptType;
+
     // Constructors
 
         //- Construct null
@@ -68,13 +75,15 @@ public:
 
         inline const dimensionSet& dimensions() const;
 
-        inline scalar operator[](const label) const;
+        inline one operator[](const label) const;
 
         inline oneField field() const;
 
         inline oneField oldTime() const;
 
-        inline oneFieldField boundaryField() const;
+        inline InternalField internalField() const;
+
+        inline GeometricBoundaryField boundaryField() const;
 };
 
 
@@ -97,7 +106,7 @@ inline const geometricOneField& operator/
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "geometricOneFieldI.H"
+    #include "geometricOneFieldI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H
index eafebe4b01c05ac085a27aefba5bbc1fd4d65bbd..7fdbd063ee61291a7c154959adbb004076f77063 100644
--- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H
+++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,9 @@ inline const Foam::dimensionSet& Foam::geometricOneField::dimensions() const
     return dimless;
 }
 
-inline Foam::scalar Foam::geometricOneField::operator[](const label) const
+inline Foam::one Foam::geometricOneField::operator[](const label) const
 {
-    return scalar(1);
+    return one();
 }
 
 inline Foam::oneField Foam::geometricOneField::field() const
@@ -47,9 +47,16 @@ inline Foam::oneField Foam::geometricOneField::oldTime() const
     return oneField();
 }
 
-inline Foam::oneFieldField Foam::geometricOneField::boundaryField() const
+inline Foam::geometricOneField::InternalField
+Foam::geometricOneField::internalField() const
 {
-    return oneFieldField();
+    return InternalField();
+}
+
+inline Foam::geometricOneField::GeometricBoundaryField
+Foam::geometricOneField::boundaryField() const
+{
+    return GeometricBoundaryField();
 }
 
 
diff --git a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H
index 7e5aa91024c1175c89ab11027f383d746a1b81de..0eb7c87235d0cfc6fb79e7d10599d8383ba18c30 100644
--- a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H
+++ b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "geometricZeroFieldI.H"
+    #include "geometricZeroFieldI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.C b/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.C
index 677f7a435840649ec50c8c16e3d875c462b6762b..e3b75000b40bad59adf80e14cbf12adc02904f5c 100644
--- a/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.C
+++ b/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,13 +51,13 @@ void transform
 
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const GeometricField<tensor, PatchField, GeoMesh>& trf,
     const GeometricField<Type, PatchField, GeoMesh>& tf
 )
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > tranf
+    tmp<GeometricField<Type, PatchField, GeoMesh>> tranf
     (
         new GeometricField<Type, PatchField, GeoMesh>
         (
@@ -81,13 +81,13 @@ tmp<GeometricField<Type, PatchField, GeoMesh> > transform
 
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const GeometricField<tensor, PatchField, GeoMesh>& trf,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& ttf
 )
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
+    tmp<GeometricField<Type, PatchField, GeoMesh>> tranf =
         transform(trf, ttf());
     ttf.clear();
     return tranf;
@@ -95,13 +95,13 @@ tmp<GeometricField<Type, PatchField, GeoMesh> > transform
 
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
-    const tmp<GeometricField<tensor, PatchField, GeoMesh> >& ttrf,
+    const tmp<GeometricField<tensor, PatchField, GeoMesh>>& ttrf,
     const GeometricField<Type, PatchField, GeoMesh>& tf
 )
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
+    tmp<GeometricField<Type, PatchField, GeoMesh>> tranf =
         transform(ttrf(), tf);
     ttrf.clear();
     return tranf;
@@ -109,13 +109,13 @@ tmp<GeometricField<Type, PatchField, GeoMesh> > transform
 
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
-    const tmp<GeometricField<tensor, PatchField, GeoMesh> >& ttrf,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
+    const tmp<GeometricField<tensor, PatchField, GeoMesh>>& ttrf,
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& ttf
 )
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
+    tmp<GeometricField<Type, PatchField, GeoMesh>> tranf =
         transform(ttrf(), ttf());
     ttf.clear();
     ttrf.clear();
@@ -137,13 +137,13 @@ void transform
 
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const dimensionedTensor& t,
     const GeometricField<Type, PatchField, GeoMesh>& tf
 )
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > tranf
+    tmp<GeometricField<Type, PatchField, GeoMesh>> tranf
     (
         new GeometricField<vector, PatchField, GeoMesh>
         (
@@ -167,13 +167,13 @@ tmp<GeometricField<Type, PatchField, GeoMesh> > transform
 
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const dimensionedTensor& t,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >& ttf
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>& ttf
 )
 {
-    tmp<GeometricField<Type, PatchField, GeoMesh> > tranf =
+    tmp<GeometricField<Type, PatchField, GeoMesh>> tranf =
         transform(t, ttf());
     ttf.clear();
     return tranf;
diff --git a/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.H b/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.H
index 5c0a582fe67919b6eb58b7f7245fba2ae13ce3d4..77c95e74225bb591741b1a3004b256d9d269555e 100644
--- a/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.H
+++ b/src/OpenFOAM/fields/GeometricFields/transformGeometricField/transformGeometricField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,31 +54,31 @@ void transform
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const GeometricField<tensor, PatchField, GeoMesh>&,
     const GeometricField<Type, PatchField, GeoMesh>&
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const GeometricField<tensor, PatchField, GeoMesh>&,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>&
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
-    const tmp<GeometricField<tensor, PatchField, GeoMesh> >&,
+    const tmp<GeometricField<tensor, PatchField, GeoMesh>>&,
     const GeometricField<Type, PatchField, GeoMesh>&
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
-    const tmp<GeometricField<tensor, PatchField, GeoMesh> >&,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+    const tmp<GeometricField<tensor, PatchField, GeoMesh>>&,
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>&
 );
 
 
@@ -91,17 +91,17 @@ void transform
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const dimensionedTensor&,
     const GeometricField<Type, PatchField, GeoMesh>&
 );
 
 template<class Type, template<class> class PatchField, class GeoMesh>
-tmp<GeometricField<Type, PatchField, GeoMesh> > transform
+tmp<GeometricField<Type, PatchField, GeoMesh>> transform
 (
     const dimensionedTensor&,
-    const tmp<GeometricField<Type, PatchField, GeoMesh> >&
+    const tmp<GeometricField<Type, PatchField, GeoMesh>>&
 );
 
 
@@ -112,7 +112,7 @@ tmp<GeometricField<Type, PatchField, GeoMesh> > transform
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "transformGeometricField.C"
+    #include "transformGeometricField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/ReadFields/ReadFields.C b/src/OpenFOAM/fields/ReadFields/ReadFields.C
index fbaecb4c796f77d72a085053e9560ce46f8f1112..423b3120f83f541efdd52ec7d1819ce9952cf685 100644
--- a/src/OpenFOAM/fields/ReadFields/ReadFields.C
+++ b/src/OpenFOAM/fields/ReadFields/ReadFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/OpenFOAM/fields/ReadFields/ReadFields.H b/src/OpenFOAM/fields/ReadFields/ReadFields.H
index 95499aca649566f2ec5632cff5b242b02b9a80ba..636238176f46f67e7d6e0625835e6302c371acf4 100644
--- a/src/OpenFOAM/fields/ReadFields/ReadFields.H
+++ b/src/OpenFOAM/fields/ReadFields/ReadFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,6 @@ namespace Foam
 
 class IOobjectList;
 
-
 //- Get sorted names of fields of type. If syncPar and running in parallel
 //  check for identical names
 wordList fieldNames(const IOobjectList& objects, const bool syncPar);
@@ -58,12 +57,14 @@ wordList ReadFields
 (
     const typename GeoMesh::Mesh& mesh,
     const IOobjectList& objects,
-    PtrList<GeometricField<Type, PatchField, GeoMesh> >& fields,
+    PtrList<GeometricField<Type, PatchField, GeoMesh>>& fields,
     const bool syncPar = true,
     const bool readOldTime = false
 );
 
-//- Helper routine to read other mesh fields
+//- Helper routine to read fields
+//  Reads all fields of type. Returns names of fields read. Guarantees all
+//  processors to read fields in same order.
 template<class GeoField, class Mesh>
 wordList ReadFields
 (
@@ -110,7 +111,7 @@ static void ReadFields
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReadFieldsTemplates.C"
+    #include "ReadFieldsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C b/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C
index 7a7a02c038614ba8caa8384c0cfd6f338b16cdf5..5642213d43c6f95651e5d8b58411a1083fb9f105 100644
--- a/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C
+++ b/src/OpenFOAM/fields/ReadFields/ReadFieldsTemplates.C
@@ -36,7 +36,7 @@ Foam::wordList Foam::ReadFields
 (
     const typename GeoMesh::Mesh& mesh,
     const IOobjectList& objects,
-    PtrList<GeometricField<Type, PatchField, GeoMesh> >& fields,
+    PtrList<GeometricField<Type, PatchField, GeoMesh>>& fields,
     const bool syncPar,
     const bool readOldTime
 )
diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
index 11d9dde82d2f129e1494e21503d428842e6026c9..94bf0ca6c887dcf1c7b95a2106576bde262e6368 100644
--- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
+++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ Foam::UniformDimensionedField<Type>::UniformDimensionedField
 )
 :
     regIOobject(io),
-    dimensioned<Type>(regIOobject::name(), dimless, pTraits<Type>::zero)
+    dimensioned<Type>(regIOobject::name(), dimless, Zero)
 {
     // For if MUST_READ_IF_MODIFIED
     addWatch();
diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H
index f8fbe7d0e6f2b5b94ec13fc5a7630e4e34e2c532..f4223ec40a9ac96ceee9d200f571938bcd62abe4 100644
--- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H
+++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UniformDimensionedField.C"
+    #include "UniformDimensionedField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.C
index 85c718e7030313259849b17962c8b605ee3ee5e5..c4e7b18a0cc3a0331aca60e12b749dda3f468f99 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ void Foam::basicSymmetryPointPatchField<Type>::evaluate
 {
     const vectorField& nHat = this->patch().pointNormals();
 
-    tmp<Field<Type> > tvalues =
+    tmp<Field<Type>> tvalues =
     (
         (
             this->patchInternalField()
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H
index cb006fcda9cb17744fbf52bb7e364a288547a87a..3529c77b7d7bb784fa9c66e4dd189f5599400ff4 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/basicSymmetry/basicSymmetryPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,9 +82,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new basicSymmetryPointPatchField<Type>
                 (
@@ -101,12 +101,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new basicSymmetryPointPatchField<Type>
                 (
@@ -136,7 +136,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "basicSymmetryPointPatchField.C"
+    #include "basicSymmetryPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C
index 45f98495dbc6f46cba6f60d46658ab058cb20c2f..2d48607cce315a73ebbe4479a52f53b4a723612a 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,11 +27,8 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
 template<class Type>
-const word& pointPatchField<Type>::calculatedType()
+const Foam::word& Foam::pointPatchField<Type>::calculatedType()
 {
     return calculatedPointPatchField<Type>::typeName;
 }
@@ -40,7 +37,7 @@ const word& pointPatchField<Type>::calculatedType()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-calculatedPointPatchField<Type>::calculatedPointPatchField
+Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -51,7 +48,7 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
 
 
 template<class Type>
-calculatedPointPatchField<Type>::calculatedPointPatchField
+Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -63,7 +60,7 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
 
 
 template<class Type>
-calculatedPointPatchField<Type>::calculatedPointPatchField
+Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
 (
     const calculatedPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -76,7 +73,7 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
 
 
 template<class Type>
-calculatedPointPatchField<Type>::calculatedPointPatchField
+Foam::calculatedPointPatchField<Type>::calculatedPointPatchField
 (
     const calculatedPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -88,8 +85,8 @@ calculatedPointPatchField<Type>::calculatedPointPatchField
 
 template<class Type>
 template<class Type2>
-autoPtr<pointPatchField<Type> >
-pointPatchField<Type>::NewCalculatedType
+Foam::autoPtr<Foam::pointPatchField<Type>>
+Foam::pointPatchField<Type>::NewCalculatedType
 (
     const pointPatchField<Type2>& pf
 )
@@ -99,7 +96,7 @@ pointPatchField<Type>::NewCalculatedType
 
     if (patchTypeCstrIter != pointPatchConstructorTablePtr_->end())
     {
-        return autoPtr<pointPatchField<Type> >
+        return autoPtr<pointPatchField<Type>>
         (
             patchTypeCstrIter()
             (
@@ -110,7 +107,7 @@ pointPatchField<Type>::NewCalculatedType
     }
     else
     {
-        return autoPtr<pointPatchField<Type> >
+        return autoPtr<pointPatchField<Type>>
         (
             new calculatedPointPatchField<Type>
             (
@@ -122,8 +119,4 @@ pointPatchField<Type>::NewCalculatedType
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H
index 6e9bc9ca8e7c844b825f79fe390d38c9f441bf9e..afea0505b9990f5137f3b1e1b74b81ce2334c92a 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/calculated/calculatedPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,9 +85,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new calculatedPointPatchField<Type>
                 (
@@ -104,10 +104,10 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> >
+        virtual autoPtr<pointPatchField<Type>>
         clone(const DimensionedField<Type, pointMesh>& iF) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new calculatedPointPatchField<Type>
                 (
@@ -126,7 +126,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "calculatedPointPatchField.C"
+    #include "calculatedPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.C
index 434b6873f4b77ac71e5389a45587fd0e5abe3290..635f9b665e67274f1b287be1afe349eec46f77ad 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "coupledPointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
 
 template<class Type>
-coupledPointPatchField<Type>::coupledPointPatchField
+Foam::coupledPointPatchField<Type>::coupledPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -44,7 +39,7 @@ coupledPointPatchField<Type>::coupledPointPatchField
 
 
 template<class Type>
-coupledPointPatchField<Type>::coupledPointPatchField
+Foam::coupledPointPatchField<Type>::coupledPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -56,7 +51,7 @@ coupledPointPatchField<Type>::coupledPointPatchField
 
 
 template<class Type>
-coupledPointPatchField<Type>::coupledPointPatchField
+Foam::coupledPointPatchField<Type>::coupledPointPatchField
 (
     const coupledPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -69,7 +64,7 @@ coupledPointPatchField<Type>::coupledPointPatchField
 
 
 template<class Type>
-coupledPointPatchField<Type>::coupledPointPatchField
+Foam::coupledPointPatchField<Type>::coupledPointPatchField
 (
     const coupledPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -79,8 +74,4 @@ coupledPointPatchField<Type>::coupledPointPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H
index bd52d255f57692b79197484ce7d1d540262ece66..d9cac6941f4a689c091807750caa5ed5e366b4c3 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/coupled/coupledPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const = 0;
+        virtual autoPtr<pointPatchField<Type>> clone() const = 0;
 
         //- Construct as copy setting internal field reference
         coupledPointPatchField
@@ -96,7 +96,7 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const = 0;
@@ -143,7 +143,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "coupledPointPatchField.C"
+    #include "coupledPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.C
index 19bb6d8af55032b811e4a2e5ba316daa5cf27a21..2ef21cfdd2c3756969c14b82c113963c9e367d78 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "fixedValuePointPatchField.H"
 #include "boolList.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-fixedValuePointPatchField<Type>::fixedValuePointPatchField
+Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -45,7 +40,7 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
 
 
 template<class Type>
-fixedValuePointPatchField<Type>::fixedValuePointPatchField
+Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -58,7 +53,7 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
 
 
 template<class Type>
-fixedValuePointPatchField<Type>::fixedValuePointPatchField
+Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
 (
     const fixedValuePointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -71,7 +66,7 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
 
 
 template<class Type>
-fixedValuePointPatchField<Type>::fixedValuePointPatchField
+Foam::fixedValuePointPatchField<Type>::fixedValuePointPatchField
 (
     const fixedValuePointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -81,8 +76,4 @@ fixedValuePointPatchField<Type>::fixedValuePointPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H
index d739bc239f463fa9866698ff83e75aa89da3504a..7b3c15267904ff5954bfba065575cac49c6025b3 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/fixedValue/fixedValuePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new fixedValuePointPatchField<Type>
                 (
@@ -105,12 +105,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new fixedValuePointPatchField<Type>
                 (
@@ -136,11 +136,8 @@ public:
 
         // Disable assignment operators
 
-            virtual void operator=(const Field<Type>&)
-            {}
-
-            virtual void operator=(const Type&)
-            {}
+            virtual void operator=(const Field<Type>&){}
+            virtual void operator=(const Type&){}
 };
 
 
@@ -151,7 +148,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "fixedValuePointPatchField.C"
+    #include "fixedValuePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C
index 747e3daa7f5cbad2d93d290ff3dc7d8747876841..e7c7dacb85e8244ba264e33dca740c665d273602 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ Foam::valuePointPatchField<Type>::valuePointPatchField
     }
     else if (!valueRequired)
     {
-        Field<Type>::operator=(pTraits<Type>::zero);
+        Field<Type>::operator=(Zero);
     }
     else
     {
@@ -137,7 +137,7 @@ void Foam::valuePointPatchField<Type>::rmap
 {
     Field<Type>::rmap
     (
-        refCast<const valuePointPatchField<Type> >
+        refCast<const valuePointPatchField<Type>>
         (
             ptf
         ),
@@ -201,7 +201,7 @@ void Foam::valuePointPatchField<Type>::operator=
     const pointPatchField<Type>& ptf
 )
 {
-    Field<Type>::operator=(ptf.patchInternalField());
+    Field<Type>::operator=(this->patchInternalField());
 }
 
 
@@ -225,7 +225,6 @@ void Foam::valuePointPatchField<Type>::operator=
 }
 
 
-// Force an assignment
 template<class Type>
 void Foam::valuePointPatchField<Type>::operator==
 (
@@ -242,7 +241,7 @@ void Foam::valuePointPatchField<Type>::operator==
     const pointPatchField<Type>& ptf
 )
 {
-    Field<Type>::operator=(ptf.patchInternalField());
+    Field<Type>::operator=(this->patchInternalField());
 }
 
 
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H
index a98b2be40e4a14f0d05c0a66be1bc7b668f6e9a9..298eabeecb7084e4ee202f631d6ad616381b2cc8 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,9 +91,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new valuePointPatchField<Type>
                 (
@@ -110,12 +110,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new valuePointPatchField<Type>
                 (
@@ -209,7 +209,7 @@ public:
 // which enables simple backward compatability with verions using
 // referenceLevel in GeometicField
 template<class Type>
-tmp<Field<Type> > operator+
+tmp<Field<Type>> operator+
 (
     const valuePointPatchField<Type>& vsppf,
     const Type& t
@@ -226,7 +226,7 @@ tmp<Field<Type> > operator+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "valuePointPatchField.C"
+    #include "valuePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.C
index 754ba28d7544661b71e5646b1244c19df5a482e9..9ca14e2ca50f54eb8a9ccbcaaf9c99cbe9d9b487 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "zeroGradientPointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
+Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -44,7 +39,7 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 
 
 template<class Type>
-zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
+Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -56,7 +51,7 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 
 
 template<class Type>
-zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
+Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 (
     const zeroGradientPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -69,7 +64,7 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 
 
 template<class Type>
-zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
+Foam::zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 (
     const zeroGradientPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -79,8 +74,4 @@ zeroGradientPointPatchField<Type>::zeroGradientPointPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H
index c32c776a44c6d52adc99b0f3a1c56baa9574e4f3..26d34f8cbc4ada036843b56fbc73a0fe9758288b 100644
--- a/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/basic/zeroGradient/zeroGradientPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,9 +85,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new zeroGradientPointPatchField<Type>
                 (
@@ -104,12 +104,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new zeroGradientPointPatchField<Type>
                 (
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "zeroGradientPointPatchField.C"
+    #include "zeroGradientPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C
index 1ebadbb40cbe31e1e536859c76c9c87d57cd3122..ff745bf31578204fd6186f3ab82008f441706453 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,13 +121,13 @@ void Foam::cyclicPointPatchField<Type>::swapAddSeparated
 
         // Get neighbouring pointPatchField
         const GeometricField<Type, pointPatchField, pointMesh>& fld =
-            refCast<const GeometricField<Type, pointPatchField, pointMesh> >
+            refCast<const GeometricField<Type, pointPatchField, pointMesh>>
             (
                 this->dimensionedInternalField()
             );
 
         const cyclicPointPatchField<Type>& nbr =
-            refCast<const cyclicPointPatchField<Type> >
+            refCast<const cyclicPointPatchField<Type>>
             (
                 fld.boundaryField()[nbrPatch.index()]
             );
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H
index 4737062fbe57f6d4279ca5789fe397fe72db0c99..50b4afbe68ee6596b006b3f9941fcd2808dca94b 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,9 +91,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicPointPatchField<Type>
                 (
@@ -110,12 +110,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicPointPatchField<Type>
                 (
@@ -181,7 +181,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "cyclicPointPatchField.C"
+    #include "cyclicPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C
index 0b822b1a4300a16c9512026a1750bc7310b35cb8..8bceca0831afccd49c823f931a1e09f73af78b2b 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ void Foam::cyclicSlipPointPatchField<Type>::evaluate(const Pstream::commsTypes)
 {
     const vectorField& nHat = this->patch().pointNormals();
 
-    tmp<Field<Type> > tvalues =
+    tmp<Field<Type>> tvalues =
     (
         (
             this->patchInternalField()
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H
index 9c37aadada24fbb6460e26d8e4f1ea751906a0b3..22b39163eb4d7b592020c4f96984dd05b58fb3b8 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclicSlip/cyclicSlipPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicSlipPointPatchField<Type>
                 (
@@ -105,12 +105,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicSlipPointPatchField<Type>
                 (
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "cyclicSlipPointPatchField.C"
+    #include "cyclicSlipPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.C
index 6435a72c12d12c5166e8f7f671f3225ba279aa1d..8fbbaadd073806c8fa355070bc4311fa439db4cb 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "emptyPointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-emptyPointPatchField<Type>::emptyPointPatchField
+Foam::emptyPointPatchField<Type>::emptyPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -44,7 +39,7 @@ emptyPointPatchField<Type>::emptyPointPatchField
 
 
 template<class Type>
-emptyPointPatchField<Type>::emptyPointPatchField
+Foam::emptyPointPatchField<Type>::emptyPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -66,7 +61,7 @@ emptyPointPatchField<Type>::emptyPointPatchField
 
 
 template<class Type>
-emptyPointPatchField<Type>::emptyPointPatchField
+Foam::emptyPointPatchField<Type>::emptyPointPatchField
 (
     const emptyPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -89,7 +84,7 @@ emptyPointPatchField<Type>::emptyPointPatchField
 
 
 template<class Type>
-emptyPointPatchField<Type>::emptyPointPatchField
+Foam::emptyPointPatchField<Type>::emptyPointPatchField
 (
     const emptyPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -99,8 +94,4 @@ emptyPointPatchField<Type>::emptyPointPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H
index 042879c9c88ab5eaac6111522decfff772dde8a9..3cac7561d0f945cd16482dc1b4222616639a9aaf 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/empty/emptyPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new emptyPointPatchField<Type>
                 (
@@ -105,12 +105,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new emptyPointPatchField<Type>
                 (
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "emptyPointPatchField.C"
+    #include "emptyPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C
index 3f31c34d2e584534a1619262fd17b17950ab3840..f2d0ac7b2d4fc7e2841f1239d152cf313d6b2a41 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ void Foam::nonuniformTransformCyclicPointPatchField<Type>::evaluate
 {
     const vectorField& nHat = this->patch().pointNormals();
 
-    tmp<Field<Type> > tvalues =
+    tmp<Field<Type>> tvalues =
     (
         (
             this->patchInternalField()
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H
index c3f6792245b3b30f9b73971d16ff43b4d74fc971..b6ef3e2a8c9b583b38b57a6d1f66b846762e9982 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new nonuniformTransformCyclicPointPatchField<Type>
                 (
@@ -105,12 +105,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new nonuniformTransformCyclicPointPatchField<Type>
                 (
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "nonuniformTransformCyclicPointPatchField.C"
+    #include "nonuniformTransformCyclicPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C
index 8a647b6db0392dbfa6e450781600ce2cbc209fce..011129adc8d377507a8b9a15983df8b482c9567c 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "processorPointPatchField.H"
 #include "processorPolyPatch.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
 
 template<class Type>
-processorPointPatchField<Type>::processorPointPatchField
+Foam::processorPointPatchField<Type>::processorPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -46,7 +41,7 @@ processorPointPatchField<Type>::processorPointPatchField
 
 
 template<class Type>
-processorPointPatchField<Type>::processorPointPatchField
+Foam::processorPointPatchField<Type>::processorPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -59,7 +54,7 @@ processorPointPatchField<Type>::processorPointPatchField
 
 
 template<class Type>
-processorPointPatchField<Type>::processorPointPatchField
+Foam::processorPointPatchField<Type>::processorPointPatchField
 (
     const processorPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -73,7 +68,7 @@ processorPointPatchField<Type>::processorPointPatchField
 
 
 template<class Type>
-processorPointPatchField<Type>::processorPointPatchField
+Foam::processorPointPatchField<Type>::processorPointPatchField
 (
     const processorPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -87,12 +82,8 @@ processorPointPatchField<Type>::processorPointPatchField
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
 template<class Type>
-processorPointPatchField<Type>::~processorPointPatchField()
+Foam::processorPointPatchField<Type>::~processorPointPatchField()
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H
index 5dfceda2d118ee6195f58f816a4affb2ed292144..c8028b47107f512c6dfdf62b91ddd2451d7c569a 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,9 +90,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new processorPointPatchField<Type>
                 (
@@ -109,12 +109,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new processorPointPatchField<Type>
                 (
@@ -192,7 +192,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "processorPointPatchField.C"
+    #include "processorPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H
index ee1084541f24458eb63e3b18cc7c866629ba8f78..2859591bed104b156ab7b5f2a0ac03f36f99a346 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,9 +94,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new processorCyclicPointPatchField<Type>
                 (
@@ -113,12 +113,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new processorCyclicPointPatchField<Type>
                 (
@@ -193,7 +193,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "processorCyclicPointPatchField.C"
+    #include "processorCyclicPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.C
index 4e11109261ed92855e33191b47e692a808c49a68..250b438ff9441ba7696e7d94825aa535db77938a 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "symmetryPointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-symmetryPointPatchField<Type>::symmetryPointPatchField
+Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -44,7 +39,7 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
 
 
 template<class Type>
-symmetryPointPatchField<Type>::symmetryPointPatchField
+Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -66,7 +61,7 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
 
 
 template<class Type>
-symmetryPointPatchField<Type>::symmetryPointPatchField
+Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
 (
     const symmetryPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -89,7 +84,7 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
 
 
 template<class Type>
-symmetryPointPatchField<Type>::symmetryPointPatchField
+Foam::symmetryPointPatchField<Type>::symmetryPointPatchField
 (
     const symmetryPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -99,8 +94,4 @@ symmetryPointPatchField<Type>::symmetryPointPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H
index aa8aac7cee332d86d38916a6892519a9bc84095d..01278db9a8b29e28ace23bedf4efe4e6c4de3939 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetry/symmetryPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new symmetryPointPatchField<Type>
                 (
@@ -105,12 +105,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new symmetryPointPatchField<Type>
                 (
@@ -139,7 +139,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "symmetryPointPatchField.C"
+    #include "symmetryPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C
index c988248e2ea4ab6ebce26acae5582c10c5c86f32..e90c1454fdef697a0672ff98e08be0a7936cd828 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "symmetryPlanePointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
+Foam::symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -45,7 +40,7 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 
 
 template<class Type>
-symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
+Foam::symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -68,7 +63,7 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 
 
 template<class Type>
-symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
+Foam::symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 (
     const symmetryPlanePointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -92,7 +87,7 @@ symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 
 
 template<class Type>
-symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
+Foam::symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
 (
     const symmetryPlanePointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -113,7 +108,7 @@ void Foam::symmetryPlanePointPatchField<Type>::evaluate
 {
     vector nHat = symmetryPlanePatch_.n();
 
-    tmp<Field<Type> > tvalues =
+    tmp<Field<Type>> tvalues =
     (
         (
             this->patchInternalField()
@@ -128,8 +123,4 @@ void Foam::symmetryPlanePointPatchField<Type>::evaluate
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H
index c3774789d83324fbaa0e6e770f02066172d25596..acbba86d2102220f1e6895f0c61384f4bfd4c199 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,9 +91,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new symmetryPlanePointPatchField<Type>
                 (
@@ -110,12 +110,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new symmetryPlanePointPatchField<Type>
                 (
@@ -151,7 +151,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "symmetryPlanePointPatchField.C"
+    #include "symmetryPlanePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C
index 52e55ef0ccfff9444d94b67b4ce15f76bc3bedc7..8a5c7f2da22ac00927464ae4ceb6885688dec34a 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ void Foam::wedgePointPatchField<Type>::evaluate(const Pstream::commsTypes)
     // normal vector from the first point
     const vector& nHat = this->patch().pointNormals()[0];
 
-    tmp<Field<Type> > tvalues =
+    tmp<Field<Type>> tvalues =
         transform(I - nHat*nHat, this->patchInternalField());
 
     // Get internal field to insert values into
diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H
index f0ddee6d9e94bb2702868ad955365af07b3676f9..e14fb992e60a876512722b4cd6755cc43ca3ec86 100644
--- a/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/constraint/wedge/wedgePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new wedgePointPatchField<Type>
                 (
@@ -105,12 +105,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new wedgePointPatchField<Type>
                 (
@@ -147,7 +147,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "wedgePointPatchField.C"
+    #include "wedgePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H
index 71212ed4d971985de39a9eec87f150a3fa6da034..36ff3fdf95d0252ed85b3bc1916a1b09d008e6e8 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/codedFixedValue/codedFixedValuePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,34 +30,34 @@ Description
 
     Example:
     \verbatim
-        movingWall
-        {
-            type            codedFixedValue;
-            value           uniform 0;
-            redirectType    rampedFixedValue;   // name of generated bc
+    movingWall
+    {
+        type            codedFixedValue;
+        value           uniform 0;
+        redirectType    rampedFixedValue;   // name of generated bc
 
-            code
-            #{
-                operator==
-                (
-                    vector(0,0,1)
-                   *min(10, 0.1*this->db().time().value())
-                );
-            #};
-
-            //codeInclude
-            //#{
-            //    #include "fvCFD.H"
-            //#};
-
-            //codeOptions
-            //#{
-            //    -I$(LIB_SRC)/finiteVolume/lnInclude
-            //#};
-        }
+        code
+        #{
+            operator==
+            (
+                vector(0,0,1)
+                *min(10, 0.1*this->db().time().value())
+            );
+        #};
+
+        //codeInclude
+        //#{
+        //    #include "fvCFD.H"
+        //#};
+
+        //codeOptions
+        //#{
+        //    -I$(LIB_SRC)/finiteVolume/lnInclude
+        //#};
+    }
     \endverbatim
 
-    A special form is if the 'code' section is not supplied. In this case
+    A special form is if the \c code section is not supplied. In this case
     the code gets read from a (runTimeModifiable!) dictionary system/codeDict
     which would have a corresponding entry
 
@@ -112,7 +112,7 @@ class codedFixedValuePointPatchField
 
         const word redirectType_;
 
-        mutable autoPtr<pointPatchField<Type> > redirectPatchFieldPtr_;
+        mutable autoPtr<pointPatchField<Type>> redirectPatchFieldPtr_;
 
     // Private Member Functions
 
@@ -186,9 +186,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new codedFixedValuePointPatchField<Type>(*this)
             );
@@ -202,12 +202,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new codedFixedValuePointPatchField<Type>
                 (
@@ -245,7 +245,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "codedFixedValuePointPatchField.C"
+    #include "codedFixedValuePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
index 38975b2661eae394d95768e7c32374648c53005c..00454c22d87aad7861bceb75bd42b732aa020005 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ void Foam::fixedNormalSlipPointPatchField<Type>::evaluate
     const Pstream::commsTypes
 )
 {
-    tmp<Field<Type> > tvalues =
+    tmp<Field<Type>> tvalues =
         transform(I - n_*n_, this->patchInternalField());
 
     // Get internal field to insert values into
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H
index 669b66bdfa2ebe9ed0e14cf2d27b78cca6d4a25d..cff5af3d6e7ed3381a45f8f5dbb58b18e0550b73 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/fixedNormalSlip/fixedNormalSlipPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,9 +103,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new fixedNormalSlipPointPatchField<Type>
                 (
@@ -122,12 +122,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new fixedNormalSlipPointPatchField<Type>
                 (
@@ -160,7 +160,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "fixedNormalSlipPointPatchField.C"
+    #include "fixedNormalSlipPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.C
index 62f95b4eb53ffbea135441721023f52cd63f5711..902e73f6f7724a28e55c8f170babc975778948df 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "slipPointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-slipPointPatchField<Type>::slipPointPatchField
+Foam::slipPointPatchField<Type>::slipPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -44,7 +39,7 @@ slipPointPatchField<Type>::slipPointPatchField
 
 
 template<class Type>
-slipPointPatchField<Type>::slipPointPatchField
+Foam::slipPointPatchField<Type>::slipPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -56,7 +51,7 @@ slipPointPatchField<Type>::slipPointPatchField
 
 
 template<class Type>
-slipPointPatchField<Type>::slipPointPatchField
+Foam::slipPointPatchField<Type>::slipPointPatchField
 (
     const slipPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -69,7 +64,7 @@ slipPointPatchField<Type>::slipPointPatchField
 
 
 template<class Type>
-slipPointPatchField<Type>::slipPointPatchField
+Foam::slipPointPatchField<Type>::slipPointPatchField
 (
     const slipPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -79,8 +74,4 @@ slipPointPatchField<Type>::slipPointPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H
index f2b0c726ec0e6aa27c7a2fc49f6927f046ac30e6..4847b73675c8dd1d477cab7a3adb637d35087375 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/slip/slipPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,9 +85,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new slipPointPatchField<Type>
                 (
@@ -104,12 +104,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new slipPointPatchField<Type>
                 (
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "slipPointPatchField.C"
+    #include "slipPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H
index e1509c88ea97a010e526a042a58f173411170c01..2880afa4c414524c118bfe8bee558caace93c07b 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValuePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,9 +100,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new timeVaryingUniformFixedValuePointPatchField<Type>(*this)
             );
@@ -116,12 +116,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new timeVaryingUniformFixedValuePointPatchField<Type>(*this, iF)
             );
@@ -157,7 +157,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "timeVaryingUniformFixedValuePointPatchField.C"
+    #include "timeVaryingUniformFixedValuePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.C
index 0b626d888c4f2aefb4bf1bbdd06c594d817cb18c..520f28e6ab9a77f1b43892be29ebd8650a3f786c 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "uniformFixedValuePointPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
 
 template<class Type>
-uniformFixedValuePointPatchField<Type>::
+Foam::uniformFixedValuePointPatchField<Type>::
 uniformFixedValuePointPatchField
 (
     const pointPatch& p,
@@ -46,7 +41,7 @@ uniformFixedValuePointPatchField
 
 
 template<class Type>
-uniformFixedValuePointPatchField<Type>::
+Foam::uniformFixedValuePointPatchField<Type>::
 uniformFixedValuePointPatchField
 (
     const pointPatch& p,
@@ -55,7 +50,7 @@ uniformFixedValuePointPatchField
 )
 :
     fixedValuePointPatchField<Type>(p, iF, dict, false),
-    uniformValue_(DataEntry<Type>::New("uniformValue", dict))
+    uniformValue_(Function1<Type>::New("uniformValue", dict))
 {
     if (dict.found("value"))
     {
@@ -73,7 +68,7 @@ uniformFixedValuePointPatchField
 
 
 template<class Type>
-uniformFixedValuePointPatchField<Type>::
+Foam::uniformFixedValuePointPatchField<Type>::
 uniformFixedValuePointPatchField
 (
     const uniformFixedValuePointPatchField<Type>& ptf,
@@ -83,7 +78,7 @@ uniformFixedValuePointPatchField
 )
 :
     fixedValuePointPatchField<Type>(ptf, p, iF, mapper),
-    uniformValue_(ptf.uniformValue_().clone().ptr())
+    uniformValue_(ptf.uniformValue_, false)
 {
     // For safety re-evaluate
     const scalar t = this->db().time().timeOutputValue();
@@ -92,19 +87,19 @@ uniformFixedValuePointPatchField
 
 
 template<class Type>
-uniformFixedValuePointPatchField<Type>::
+Foam::uniformFixedValuePointPatchField<Type>::
 uniformFixedValuePointPatchField
 (
     const uniformFixedValuePointPatchField<Type>& ptf
 )
 :
     fixedValuePointPatchField<Type>(ptf),
-    uniformValue_(ptf.uniformValue_().clone().ptr())
+    uniformValue_(ptf.uniformValue_, false)
 {}
 
 
 template<class Type>
-uniformFixedValuePointPatchField<Type>::
+Foam::uniformFixedValuePointPatchField<Type>::
 uniformFixedValuePointPatchField
 (
     const uniformFixedValuePointPatchField<Type>& ptf,
@@ -112,7 +107,7 @@ uniformFixedValuePointPatchField
 )
 :
     fixedValuePointPatchField<Type>(ptf, iF),
-    uniformValue_(ptf.uniformValue_().clone().ptr())
+    uniformValue_(ptf.uniformValue_, false)
 {
     // For safety re-evaluate
     const scalar t = this->db().time().timeOutputValue();
@@ -123,7 +118,7 @@ uniformFixedValuePointPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void uniformFixedValuePointPatchField<Type>::updateCoeffs()
+void Foam::uniformFixedValuePointPatchField<Type>::updateCoeffs()
 {
     if (this->updated())
     {
@@ -138,7 +133,7 @@ void uniformFixedValuePointPatchField<Type>::updateCoeffs()
 
 
 template<class Type>
-void uniformFixedValuePointPatchField<Type>::
+void Foam::uniformFixedValuePointPatchField<Type>::
 write(Ostream& os) const
 {
     // Note: write value
@@ -147,8 +142,4 @@ write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.H
index 0a9ca5c1c9596f4795851516eefd907a9e4e419d..2309131132a930b9d0fa195641177bfe423216d3 100644
--- a/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/derived/uniformFixedValue/uniformFixedValuePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ Description
     }
     \endverbatim
 
-    The uniformValue entry is a DataEntry type, able to describe time
+    The uniformValue entry is a Function1 type, able to describe time
     varying functions.  The example above gives the usage for supplying a
     constant value.
 
@@ -49,7 +49,7 @@ SourceFiles
 #define uniformFixedValuePointPatchField_H
 
 #include "fixedValuePointPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -67,7 +67,7 @@ class uniformFixedValuePointPatchField
 {
     // Private data
 
-        autoPtr<DataEntry<Type> > uniformValue_;
+        autoPtr<Function1<Type>> uniformValue_;
 
 
 public:
@@ -109,9 +109,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new uniformFixedValuePointPatchField<Type>
                 (
@@ -129,12 +129,12 @@ public:
 
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new uniformFixedValuePointPatchField<Type>
                 (
@@ -150,7 +150,7 @@ public:
         // Access
 
             //- Return the uniform value
-            const DataEntry<Type>& uniformValue() const
+            const Function1<Type>& uniformValue() const
             {
                 return uniformValue_;
             }
@@ -173,7 +173,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "uniformFixedValuePointPatchField.C"
+    #include "uniformFixedValuePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraintI.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraintI.H
index 82c1957c3b2ff8a69418d3136739e8c3f7e572dd..27aa1debf411b77b5cfe902d57fd0123fad0d57e 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraintI.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointConstraint/pointConstraintI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,7 +27,7 @@ License
 
 inline Foam::pointConstraint::pointConstraint()
 :
-    Tuple2<label, vector>(0, vector::zero)
+    Tuple2<label, vector>(0, Zero)
 {}
 
 
@@ -68,7 +68,7 @@ void Foam::pointConstraint::applyConstraint(const vector& cd)
         if (mag(cd & second()) > 1e-3)
         {
             first() = 3;
-            second() = vector::zero;
+            second() = Zero;
         }
     }
 }
@@ -103,13 +103,13 @@ void Foam::pointConstraint::combine(const pointConstraint& pc)
             {
                 // Different directions
                 first() = 3;
-                second() = vector::zero;
+                second() = Zero;
             }
         }
         else
         {
             first() = 3;
-            second() = vector::zero;
+            second() = Zero;
         }
     }
 }
@@ -131,7 +131,7 @@ Foam::tensor Foam::pointConstraint::constraintTransformation() const
     }
     else
     {
-        return tensor::zero;
+        return Zero;
     }
 }
 
@@ -172,7 +172,7 @@ const
     // Knock out remaining vectors
     for (direction dir = n; dir < vecs.size(); dir++)
     {
-        vecs[dir] = vector::zero;
+        vecs[dir] = Zero;
     }
 
     tt = tensor(vecs[0], vecs[1], vecs[2]);
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
index 64daf799fd1801521cd08dc5c837610985ff2b72..fdd069525d7126449823589bdeb5c9b4259d8e21 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,15 +27,10 @@ License
 #include "pointMesh.H"
 #include "dictionary.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-pointPatchField<Type>::pointPatchField
+Foam::pointPatchField<Type>::pointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -49,7 +44,7 @@ pointPatchField<Type>::pointPatchField
 
 
 template<class Type>
-pointPatchField<Type>::pointPatchField
+Foam::pointPatchField<Type>::pointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -80,7 +75,7 @@ Foam::pointPatchField<Type>::pointPatchField
 
 
 template<class Type>
-pointPatchField<Type>::pointPatchField
+Foam::pointPatchField<Type>::pointPatchField
 (
     const pointPatchField<Type>& ptf
 )
@@ -93,7 +88,7 @@ pointPatchField<Type>::pointPatchField
 
 
 template<class Type>
-pointPatchField<Type>::pointPatchField
+Foam::pointPatchField<Type>::pointPatchField
 (
     const pointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -109,14 +104,14 @@ pointPatchField<Type>::pointPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-const objectRegistry& pointPatchField<Type>::db() const
+const Foam::objectRegistry& Foam::pointPatchField<Type>::db() const
 {
     return patch_.boundaryMesh().mesh()();
 }
 
 
 template<class Type>
-void pointPatchField<Type>::write(Ostream& os) const
+void Foam::pointPatchField<Type>::write(Ostream& os) const
 {
     os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
 
@@ -129,7 +124,8 @@ void pointPatchField<Type>::write(Ostream& os) const
 
 
 template<class Type>
-tmp<Field<Type> > pointPatchField<Type>::patchInternalField() const
+Foam::tmp<Foam::Field<Type>>
+Foam::pointPatchField<Type>::patchInternalField() const
 {
     return patchInternalField(internalField());
 }
@@ -137,7 +133,8 @@ tmp<Field<Type> > pointPatchField<Type>::patchInternalField() const
 
 template<class Type>
 template<class Type1>
-tmp<Field<Type1> > pointPatchField<Type>::patchInternalField
+Foam::tmp<Foam::Field<Type1>>
+Foam::pointPatchField<Type>::patchInternalField
 (
     const Field<Type1>& iF,
     const labelList& meshPoints
@@ -153,13 +150,14 @@ tmp<Field<Type1> > pointPatchField<Type>::patchInternalField
             << abort(FatalError);
     }
 
-    return tmp<Field<Type1> >(new Field<Type1>(iF, meshPoints));
+    return tmp<Field<Type1>>(new Field<Type1>(iF, meshPoints));
 }
 
 
 template<class Type>
 template<class Type1>
-tmp<Field<Type1> > pointPatchField<Type>::patchInternalField
+Foam::tmp<Foam::Field<Type1>>
+Foam::pointPatchField<Type>::patchInternalField
 (
     const Field<Type1>& iF
 ) const
@@ -170,7 +168,7 @@ tmp<Field<Type1> > pointPatchField<Type>::patchInternalField
 
 template<class Type>
 template<class Type1>
-void pointPatchField<Type>::addToInternalField
+void Foam::pointPatchField<Type>::addToInternalField
 (
     Field<Type1>& iF,
     const Field<Type1>& pF
@@ -207,7 +205,7 @@ void pointPatchField<Type>::addToInternalField
 
 template<class Type>
 template<class Type1>
-void pointPatchField<Type>::addToInternalField
+void Foam::pointPatchField<Type>::addToInternalField
 (
     Field<Type1>& iF,
     const Field<Type1>& pF,
@@ -246,7 +244,7 @@ void pointPatchField<Type>::addToInternalField
 
 template<class Type>
 template<class Type1>
-void pointPatchField<Type>::setInInternalField
+void Foam::pointPatchField<Type>::setInInternalField
 (
     Field<Type1>& iF,
     const Field<Type1>& pF,
@@ -281,7 +279,7 @@ void pointPatchField<Type>::setInInternalField
 
 template<class Type>
 template<class Type1>
-void pointPatchField<Type>::setInInternalField
+void Foam::pointPatchField<Type>::setInInternalField
 (
     Field<Type1>& iF,
     const Field<Type1>& pF
@@ -292,7 +290,7 @@ void pointPatchField<Type>::setInInternalField
 
 
 template<class Type>
-void pointPatchField<Type>::evaluate(const Pstream::commsTypes)
+void Foam::pointPatchField<Type>::evaluate(const Pstream::commsTypes)
 {
     if (!updated_)
     {
@@ -306,7 +304,7 @@ void pointPatchField<Type>::evaluate(const Pstream::commsTypes)
 // * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
 
 template<class Type>
-Ostream& operator<<
+Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
     const pointPatchField<Type>& ptf
@@ -320,10 +318,6 @@ Ostream& operator<<
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #include "pointPatchFieldNew.C"
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
index 88e6bfecfe652d19a5d89e1cc6501facdf2bb8f3..d69b75f37f217fa86dd71571224cb6e9c20d6510 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,6 +63,9 @@ class pointMesh;
 template<class Type>
 class pointPatchField;
 
+template<class Type>
+class calculatedPointPatchField;
+
 template<class Type>
 Ostream& operator<<
 (
@@ -99,6 +102,7 @@ class pointPatchField
 public:
 
     typedef pointPatch Patch;
+    typedef calculatedPointPatchField<Type> Calculated;
 
 
     //- Runtime type information
@@ -180,7 +184,7 @@ public:
         pointPatchField(const pointPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const = 0;
+        virtual autoPtr<pointPatchField<Type>> clone() const = 0;
 
         //- Construct as copy setting internal field reference
         pointPatchField
@@ -190,7 +194,7 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const = 0;
@@ -201,7 +205,7 @@ public:
         //- Return a pointer to a new patchField created on freestore given
         //  patch and internal field
         //  (does not set the patch field values)
-        static autoPtr<pointPatchField<Type> > New
+        static autoPtr<pointPatchField<Type>> New
         (
             const word&,
             const pointPatch&,
@@ -212,7 +216,7 @@ public:
         //  patch and internal field
         //  (does not set the patch field values).
         //  Allows override of constraint type
-        static autoPtr<pointPatchField<Type> > New
+        static autoPtr<pointPatchField<Type>> New
         (
             const word&,
             const word& actualPatchType,
@@ -222,7 +226,7 @@ public:
 
         //- Return a pointer to a new patchField created on freestore from
         //  a given pointPatchField mapped onto a new patch
-        static autoPtr<pointPatchField<Type> > New
+        static autoPtr<pointPatchField<Type>> New
         (
             const pointPatchField<Type>&,
             const pointPatch&,
@@ -232,18 +236,17 @@ public:
 
         //- Return a pointer to a new patchField created on freestore
         //  from dictionary
-        static autoPtr<pointPatchField<Type> > New
+        static autoPtr<pointPatchField<Type>> New
         (
             const pointPatch&,
             const DimensionedField<Type, pointMesh>&,
             const dictionary&
         );
 
-
-        //- Return a pointer to a new CalculatedpointPatchField created on
+        //- Return a pointer to a new calculatedPointPatchField created on
         //  freestore without setting patchField values
         template<class Type2>
-        static autoPtr<pointPatchField<Type> >
+        static autoPtr<pointPatchField<Type>>
         NewCalculatedType
         (
             const pointPatchField<Type2>&
@@ -318,12 +321,12 @@ public:
             }
 
             //- Return field created from appropriate internal field values
-            tmp<Field<Type> > patchInternalField() const;
+            tmp<Field<Type>> patchInternalField() const;
 
             //- Return field created from appropriate internal field values
             //  given internal field reference
             template<class Type1>
-            tmp<Field<Type1> > patchInternalField
+            tmp<Field<Type1>> patchInternalField
             (
                 const Field<Type1>& iF
             ) const;
@@ -331,7 +334,7 @@ public:
             //- Return field created from selected internal field values
             //  given internal field reference
             template<class Type1>
-            tmp<Field<Type1> > patchInternalField
+            tmp<Field<Type1>> patchInternalField
             (
                 const Field<Type1>& iF,
                 const labelList& meshPoints
@@ -432,35 +435,11 @@ public:
 
     // Member operators
 
-        virtual void operator=
-        (
-            const pointPatchField<Type>&
-        )
-        {}
-
-        virtual void operator+=
-        (
-            const pointPatchField<Type>&
-        )
-        {}
-
-        virtual void operator-=
-        (
-            const pointPatchField<Type>&
-        )
-        {}
-
-        virtual void operator*=
-        (
-            const pointPatchField<scalar>&
-        )
-        {}
-
-        virtual void operator/=
-        (
-            const pointPatchField<scalar>&
-        )
-        {}
+        virtual void operator=(const pointPatchField<Type>&){}
+        virtual void operator+=(const pointPatchField<Type>&){}
+        virtual void operator-=(const pointPatchField<Type>&){}
+        virtual void operator*=(const pointPatchField<scalar>&){}
+        virtual void operator/=(const pointPatchField<scalar>&){}
 
         virtual void operator=(const Field<Type>&){}
         virtual void operator+=(const Field<Type>&){}
@@ -480,12 +459,7 @@ public:
         // By generic these do nothing unless the patch actually has boundary
         // values
 
-            virtual void operator==
-            (
-                const pointPatchField<Type>&
-            )
-            {}
-
+            virtual void operator==(const pointPatchField<Type>&){}
             virtual void operator==(const Field<Type>&){}
             virtual void operator==(const Type&){}
 
@@ -522,88 +496,88 @@ const pointPatchField<Type>& operator+
 #include "pointPatchFieldFunctions.H"
 
 #ifdef NoRepository
-#   include "pointPatchField.C"
-#   include "calculatedPointPatchField.H"
+    #include "pointPatchField.C"
+    #include "calculatedPointPatchField.H"
 #endif
 
 
-#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)      \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        pointPatch                                                            \
-    );                                                                        \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        patchMapper                                                           \
-    );                                                                        \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        dictionary                                                            \
+#define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        pointPatch                                                             \
+    );                                                                         \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        patchMapper                                                            \
+    );                                                                         \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        dictionary                                                             \
     );
 
 
 // for non-templated patch fields
-#define makePointPatchTypeField(PatchTypeField,typePatchTypeField)            \
-    defineTypeNameAndDebug(typePatchTypeField, 0);                            \
+#define makePointPatchTypeField(PatchTypeField,typePatchTypeField)             \
+    defineTypeNameAndDebug(typePatchTypeField, 0);                             \
     addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
 
 
 // for templated patch fields
-#define makeTemplatePointPatchTypeField(PatchTypeField, typePatchTypeField)   \
-    defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);               \
+#define makeTemplatePointPatchTypeField(PatchTypeField, typePatchTypeField)    \
+    defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);                \
     addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
 
 
-#define makePointPatchFields(type)                                            \
-    makeTemplatePointPatchTypeField                                           \
-    (                                                                         \
-        pointPatchScalarField,                                                \
-        type##PointPatchScalarField                                           \
-    );                                                                        \
-    makeTemplatePointPatchTypeField                                           \
-    (                                                                         \
-        pointPatchVectorField,                                                \
-        type##PointPatchVectorField                                           \
-    );                                                                        \
-    makeTemplatePointPatchTypeField                                           \
-    (                                                                         \
-        pointPatchSphericalTensorField,                                       \
-        type##PointPatchSphericalTensorField                                  \
-    );                                                                        \
-    makeTemplatePointPatchTypeField                                           \
-    (                                                                         \
-        pointPatchSymmTensorField,                                            \
-        type##PointPatchSymmTensorField                                       \
-    );                                                                        \
-    makeTemplatePointPatchTypeField                                           \
-    (                                                                         \
-        pointPatchTensorField,                                                \
-        type##PointPatchTensorField                                           \
+#define makePointPatchFields(type)                                             \
+    makeTemplatePointPatchTypeField                                            \
+    (                                                                          \
+        pointPatchScalarField,                                                 \
+        type##PointPatchScalarField                                            \
+    );                                                                         \
+    makeTemplatePointPatchTypeField                                            \
+    (                                                                          \
+        pointPatchVectorField,                                                 \
+        type##PointPatchVectorField                                            \
+    );                                                                         \
+    makeTemplatePointPatchTypeField                                            \
+    (                                                                          \
+        pointPatchSphericalTensorField,                                        \
+        type##PointPatchSphericalTensorField                                   \
+    );                                                                         \
+    makeTemplatePointPatchTypeField                                            \
+    (                                                                          \
+        pointPatchSymmTensorField,                                             \
+        type##PointPatchSymmTensorField                                        \
+    );                                                                         \
+    makeTemplatePointPatchTypeField                                            \
+    (                                                                          \
+        pointPatchTensorField,                                                 \
+        type##PointPatchTensorField                                            \
 );
 
 
-#define makePointPatchFieldsTypeName(type)                                    \
-    defineNamedTemplateTypeNameAndDebug(type##PointPatchScalarField, 0);      \
-    defineNamedTemplateTypeNameAndDebug(type##PointPatchVectorField, 0);      \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        type##PointPatchSphericalTensorField, 0                               \
-    );                                                                        \
-    defineNamedTemplateTypeNameAndDebug(type##PointPatchSymmTensorField, 0);  \
+#define makePointPatchFieldsTypeName(type)                                     \
+    defineNamedTemplateTypeNameAndDebug(type##PointPatchScalarField, 0);       \
+    defineNamedTemplateTypeNameAndDebug(type##PointPatchVectorField, 0);       \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        type##PointPatchSphericalTensorField, 0                                \
+    );                                                                         \
+    defineNamedTemplateTypeNameAndDebug(type##PointPatchSymmTensorField, 0);   \
     defineNamedTemplateTypeNameAndDebug(type##PointPatchTensorField, 0)
 
 
-#define makePointPatchFieldTypedefs(type)                                     \
-    typedef type##PointPatchField<scalar> type##PointPatchScalarField;        \
-    typedef type##PointPatchField<vector> type##PointPatchVectorField;        \
-    typedef type##PointPatchField<sphericalTensor>                            \
-        type##PointPatchSphericalTensorField;                                 \
+#define makePointPatchFieldTypedefs(type)                                      \
+    typedef type##PointPatchField<scalar> type##PointPatchScalarField;         \
+    typedef type##PointPatchField<vector> type##PointPatchVectorField;         \
+    typedef type##PointPatchField<sphericalTensor>                             \
+        type##PointPatchSphericalTensorField;                                  \
     typedef type##PointPatchField<symmTensor> type##PointPatchSymmTensorField;\
     typedef type##PointPatchField<tensor> type##PointPatchTensorField;
 
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H
index 9331774db25ce229fb95625c140bba0f512456be..f52163554683b852d21d8dcdc8716338aeb4c659 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ inline void T
 {}
 
 
-template<class Type, int r>
+template<class Type, direction r>
 inline void pow
 (
     Field<typename powProduct<Type, r>::type>& f,
@@ -101,24 +101,24 @@ inline void cmptMag
 {}
 
 
-#define BINARY_FUNCTION(func)                                                 \
-                                                                              \
-template<class Type>                                                          \
-inline void func                                                              \
-(                                                                             \
-    pointPatchField<Type>& f,                                                 \
-    const pointPatchField<Type>& f1,                                          \
-    const pointPatchField<Type>& f2                                           \
-)                                                                             \
-{}                                                                            \
-                                                                              \
-template<class Type>                                                          \
-inline void func                                                              \
-(                                                                             \
-    pointPatchField<Type>& f,                                                 \
-    const pointPatchField<Type>& f1,                                          \
-    const Type& s                                                             \
-)                                                                             \
+#define BINARY_FUNCTION(func)                                                  \
+                                                                               \
+template<class Type>                                                           \
+inline void func                                                               \
+(                                                                              \
+    pointPatchField<Type>& f,                                                  \
+    const pointPatchField<Type>& f1,                                           \
+    const pointPatchField<Type>& f2                                            \
+)                                                                              \
+{}                                                                             \
+                                                                               \
+template<class Type>                                                           \
+inline void func                                                               \
+(                                                                              \
+    pointPatchField<Type>& f,                                                  \
+    const pointPatchField<Type>& f1,                                           \
+    const Type& s                                                              \
+)                                                                              \
 {}
 
 BINARY_FUNCTION(max)
@@ -129,54 +129,54 @@ BINARY_FUNCTION(cmptDivide)
 
 /* * * * * * * * * * * * * * * * Global operators  * * * * * * * * * * * * * */
 
-#define UNARY_OPERATOR(op, opFunc)                                            \
-                                                                              \
-template<class Type>                                                          \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField<Type>& f,                                                 \
-    const pointPatchField<Type>& f1                                           \
-)                                                                             \
+#define UNARY_OPERATOR(op, opFunc)                                             \
+                                                                               \
+template<class Type>                                                           \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField<Type>& f,                                                  \
+    const pointPatchField<Type>& f1                                            \
+)                                                                              \
 {}
 
 UNARY_OPERATOR(-, negate)
 
-#define BINARY_OPERATOR(Type1, Type2, op, opFunc)                             \
-                                                                              \
-template<class Type>                                                          \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField<Type>& f,                                                 \
-    const pointPatchField<Type1>& f1,                                         \
-    const pointPatchField<Type2>& f2                                          \
-)                                                                             \
+#define BINARY_OPERATOR(Type1, Type2, op, opFunc)                              \
+                                                                               \
+template<class Type>                                                           \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField<Type>& f,                                                  \
+    const pointPatchField<Type1>& f1,                                          \
+    const pointPatchField<Type2>& f2                                           \
+)                                                                              \
 {}
 
 BINARY_OPERATOR(scalar, Type, *, multiply)
 BINARY_OPERATOR(Type, scalar, *, multiply)
 BINARY_OPERATOR(Type, scalar, /, divide)
 
-#define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc)                             \
-                                                                              \
-template<class Type>                                                          \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField<Type>& f,                                                 \
-    const TYPE& s,                                                            \
-    const pointPatchField<Type>& f1                                           \
-)                                                                             \
+#define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc)                              \
+                                                                               \
+template<class Type>                                                           \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField<Type>& f,                                                  \
+    const TYPE& s,                                                             \
+    const pointPatchField<Type>& f1                                            \
+)                                                                              \
 {}
 
 
-#define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc)                             \
-                                                                              \
-template<class Type>                                                          \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField<Type>& f,                                                 \
-    const pointPatchField<Type>& f1,                                          \
-    const TYPE& s                                                             \
-)                                                                             \
+#define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc)                              \
+                                                                               \
+template<class Type>                                                           \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField<Type>& f,                                                  \
+    const pointPatchField<Type>& f1,                                           \
+    const TYPE& s                                                              \
+)                                                                              \
 {}
 
 
@@ -185,52 +185,52 @@ BINARY_TYPE_OPERATOR_FS(scalar, *, multiply)
 BINARY_TYPE_OPERATOR_FS(scalar, /, divide)
 
 
-#define PRODUCT_OPERATOR(product, op, opFunc)                                 \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Type1,                                                              \
-    class Type2                                                               \
->                                                                             \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField                                                           \
-    <typename product<Type1, Type2>::type>& f,                                \
-    const pointPatchField<Type1>& f1,                                         \
-    const pointPatchField<Type2>& f2                                          \
-)                                                                             \
-{}                                                                            \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Type,                                                               \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt                                                                 \
->                                                                             \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField                                                           \
-    <typename product<Type, Form>::type>& f,                                  \
-    const pointPatchField<Type>& f1,                                          \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
-)                                                                             \
-{}                                                                            \
-                                                                              \
-template                                                                      \
-<                                                                             \
-    class Form,                                                               \
-    class Cmpt,                                                               \
-    int nCmpt,                                                                \
-    class Type                                                                \
->                                                                             \
-inline void opFunc                                                            \
-(                                                                             \
-    pointPatchField                                                           \
-    <typename product<Form, Type>::type>& f,                                  \
-    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                   \
-    const pointPatchField<Type>& f1                                           \
-)                                                                             \
+#define PRODUCT_OPERATOR(product, op, opFunc)                                  \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Type1,                                                               \
+    class Type2                                                                \
+>                                                                              \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField                                                            \
+    <typename product<Type1, Type2>::type>& f,                                 \
+    const pointPatchField<Type1>& f1,                                          \
+    const pointPatchField<Type2>& f2                                           \
+)                                                                              \
+{}                                                                             \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Type,                                                                \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt                                                            \
+>                                                                              \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField                                                            \
+    <typename product<Type, Form>::type>& f,                                   \
+    const pointPatchField<Type>& f1,                                           \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs                                     \
+)                                                                              \
+{}                                                                             \
+                                                                               \
+template                                                                       \
+<                                                                              \
+    class Form,                                                                \
+    class Cmpt,                                                                \
+    direction nCmpt,                                                           \
+    class Type                                                                 \
+>                                                                              \
+inline void opFunc                                                             \
+(                                                                              \
+    pointPatchField                                                            \
+    <typename product<Form, Type>::type>& f,                                   \
+    const VectorSpace<Form,Cmpt,nCmpt>& vs,                                    \
+    const pointPatchField<Type>& f1                                            \
+)                                                                              \
 {}
 
 PRODUCT_OPERATOR(typeOfSum, +, add)
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C
index 25f955bbceaad05960f2570416d11101b5067f40..277f4c540719f70ae085edd13bd31ec5b6111681 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         |2011 OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
+Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
 (
     const word& patchFieldType,
     const word& actualPatchType,
@@ -36,11 +36,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "PointPatchField<Type>::"
-               "New(const word&, const word&"
-                ", const pointPatch&, const Field<Type>&) : "
-               "constructing pointPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing pointPatchField<Type>" << endl;
     }
 
     typename pointPatchConstructorTable::iterator cstrIter =
@@ -56,7 +52,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
             << exit(FatalError);
     }
 
-    autoPtr<pointPatchField<Type> > pfPtr(cstrIter()(p, iF));
+    autoPtr<pointPatchField<Type>> pfPtr(cstrIter()(p, iF));
 
     if
     (
@@ -95,7 +91,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
 
 
 template<class Type>
-Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
+Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
 (
     const word& patchFieldType,
     const pointPatch& p,
@@ -107,7 +103,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
 
 
 template<class Type>
-Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
+Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -116,10 +112,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "PointPatchField<Type>::"
-               "New(const pointPatch&, const Field<Type>&, const dictionary&)"
-               " : constructing pointPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing pointPatchField<Type>" << endl;
     }
 
     word patchFieldType(dict.lookup("type"));
@@ -148,7 +141,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
     }
 
     // Construct (but not necesarily returned)
-    autoPtr<pointPatchField<Type> > pfPtr(cstrIter()(p, iF, dict));
+    autoPtr<pointPatchField<Type>> pfPtr(cstrIter()(p, iF, dict));
 
     if
     (
@@ -186,10 +179,8 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
 }
 
 
-// Return a pointer to a new patch created on freestore from
-// a given pointPatchField<Type> mapped onto a new patch
 template<class Type>
-Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
+Foam::autoPtr<Foam::pointPatchField<Type>> Foam::pointPatchField<Type>::New
 (
     const pointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -199,12 +190,7 @@ Foam::autoPtr<Foam::pointPatchField<Type> > Foam::pointPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "PointPatchField<Type>::"
-               "New(const pointPatchField<Type>&,"
-               " const pointPatch&, const Field<Type>&, "
-               "const pointPatchFieldMapper&) : "
-               "constructing pointPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing pointPatchField<Type>" << endl;
     }
 
     typename patchMapperConstructorTable::iterator cstrIter =
diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFields.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFields.C
index 7ed9f70e6d18dae38ce616a9a76bc02100e43e13..0d2dd56830d779953c6f2856f576fa73e4271702 100644
--- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFields.C
+++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,16 +32,16 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define makePointPatchField(pointPatchTypeField)                              \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(pointPatchTypeField, 0);                  \
-template<>                                                                    \
-int pointPatchTypeField::disallowGenericPointPatchField                       \
-(                                                                             \
-    debug::debugSwitch("disallowGenericPointPatchField", 0)                   \
-);                                                                            \
-defineTemplateRunTimeSelectionTable(pointPatchTypeField, pointPatch);         \
-defineTemplateRunTimeSelectionTable(pointPatchTypeField, patchMapper);        \
+#define makePointPatchField(pointPatchTypeField)                               \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(pointPatchTypeField, 0);                   \
+template<>                                                                     \
+int pointPatchTypeField::disallowGenericPointPatchField                        \
+(                                                                              \
+    debug::debugSwitch("disallowGenericPointPatchField", 0)                    \
+);                                                                             \
+defineTemplateRunTimeSelectionTable(pointPatchTypeField, pointPatch);          \
+defineTemplateRunTimeSelectionTable(pointPatchTypeField, patchMapper);         \
 defineTemplateRunTimeSelectionTable(pointPatchTypeField, dictionary);
 
 makePointPatchField(pointPatchScalarField)
diff --git a/src/OpenFOAM/global/JobInfo/JobInfo.C b/src/OpenFOAM/global/JobInfo/JobInfo.C
index a37ae7613af49aabf713aff20372f98fe8d9227b..7d17218841fc67b5226a97c7c1bd17264a0d7953 100644
--- a/src/OpenFOAM/global/JobInfo/JobInfo.C
+++ b/src/OpenFOAM/global/JobInfo/JobInfo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,6 @@ Foam::JobInfo Foam::jobInfo;
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Null constructor
 Foam::JobInfo::JobInfo()
 :
     runningJobPath_(),
diff --git a/src/OpenFOAM/global/constants/dimensionedConstants.H b/src/OpenFOAM/global/constants/dimensionedConstants.H
index 188f755cac36b183653cdbec3718578bfd026e90..3863e645903d5fc0bea13816293583067e9b4e60 100644
--- a/src/OpenFOAM/global/constants/dimensionedConstants.H
+++ b/src/OpenFOAM/global/constants/dimensionedConstants.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,100 +93,100 @@ T dimensionedConstant
 
 
 //- Defined dimensioned constant , lookup as \a Name
-#define defineDimensionedConstant(Group,Switch,Tag,Name)                      \
-    const Foam::dimensionedScalar Switch;                                     \
-    class add##Tag##ToDimensionedConstant                                     \
-    :                                                                         \
-        public Foam::simpleRegIOobject                                        \
-    {                                                                         \
-    public:                                                                   \
-        add##Tag##ToDimensionedConstant(const char* name)                     \
-        :                                                                     \
-            Foam::simpleRegIOobject                                           \
-            (Foam::debug::addDimensionedConstantObject,name)                  \
-        {                                                                     \
-            Foam::dimensionedScalar ds                                        \
-            (                                                                 \
-                Foam::dimensionedConstant                                     \
-                (                                                             \
-                    Group,                                                    \
-                    Name                                                      \
-                )                                                             \
-            );                                                                \
+#define defineDimensionedConstant(Group,Switch,Tag,Name)                       \
+    const Foam::dimensionedScalar Switch;                                      \
+    class add##Tag##ToDimensionedConstant                                      \
+    :                                                                          \
+        public Foam::simpleRegIOobject                                         \
+    {                                                                          \
+    public:                                                                    \
+        add##Tag##ToDimensionedConstant(const char* name)                      \
+        :                                                                      \
+            Foam::simpleRegIOobject                                            \
+            (Foam::debug::addDimensionedConstantObject,name)                   \
+        {                                                                      \
+            Foam::dimensionedScalar ds                                         \
+            (                                                                  \
+                Foam::dimensionedConstant                                      \
+                (                                                              \
+                    Group,                                                     \
+                    Name                                                       \
+                )                                                              \
+            );                                                                 \
             Foam::dimensionedScalar& s = const_cast<Foam::dimensionedScalar&> \
-            (                                                                 \
-                Switch                                                        \
-            );                                                                \
-            s.dimensions().reset(ds.dimensions());                            \
-            s = ds;                                                           \
-        }                                                                     \
-        virtual ~add##Tag##ToDimensionedConstant()                            \
-        {}                                                                    \
-        virtual void readData(Foam::Istream& is)                              \
-        {                                                                     \
-            const_cast<Foam::dimensionedScalar&>(Switch) =                    \
-                Foam::dimensionedConstant                                     \
-                (                                                             \
-                    Group,                                                    \
-                    Name                                                      \
-                );                                                            \
-        }                                                                     \
-        virtual void writeData(Foam::Ostream& os) const                       \
-        {                                                                     \
-            os << Switch;                                                     \
-        }                                                                     \
-    };                                                                        \
+            (                                                                  \
+                Switch                                                         \
+            );                                                                 \
+            s.dimensions().reset(ds.dimensions());                             \
+            s = ds;                                                            \
+        }                                                                      \
+        virtual ~add##Tag##ToDimensionedConstant()                             \
+        {}                                                                     \
+        virtual void readData(Foam::Istream& is)                               \
+        {                                                                      \
+            const_cast<Foam::dimensionedScalar&>(Switch) =                     \
+                Foam::dimensionedConstant                                      \
+                (                                                              \
+                    Group,                                                     \
+                    Name                                                       \
+                );                                                             \
+        }                                                                      \
+        virtual void writeData(Foam::Ostream& os) const                        \
+        {                                                                      \
+            os << Switch;                                                      \
+        }                                                                      \
+    };                                                                         \
     add##Tag##ToDimensionedConstant add##Tag##ToDimensionedConstant_(Name)
 
 
 //- Defined dimensioned constant with default , lookup as \a Name
 #define defineDimensionedConstantWithDefault\
-(Group,Switch,DefaultExpr,Tag,Name)                                           \
-    const Foam::dimensionedScalar Switch;                                     \
-    class add##Tag##ToDimensionedConstantWithDefault                          \
-    :                                                                         \
-        public Foam::simpleRegIOobject                                        \
-    {                                                                         \
-    public:                                                                   \
-        add##Tag##ToDimensionedConstantWithDefault(const char* name)          \
-        :                                                                     \
-            Foam::simpleRegIOobject                                           \
-            (Foam::debug::addDimensionedConstantObject,name)                  \
-        {                                                                     \
-            Foam::dimensionedScalar ds                                        \
-            (                                                                 \
-                Foam::dimensionedConstant                                     \
-                (                                                             \
-                    Group,                                                    \
-                    Name,                                                     \
-                    Foam::dimensionedScalar(Name,DefaultExpr)                 \
-                )                                                             \
-            );                                                                \
+(Group,Switch,DefaultExpr,Tag,Name)                                            \
+    const Foam::dimensionedScalar Switch;                                      \
+    class add##Tag##ToDimensionedConstantWithDefault                           \
+    :                                                                          \
+        public Foam::simpleRegIOobject                                         \
+    {                                                                          \
+    public:                                                                    \
+        add##Tag##ToDimensionedConstantWithDefault(const char* name)           \
+        :                                                                      \
+            Foam::simpleRegIOobject                                            \
+            (Foam::debug::addDimensionedConstantObject,name)                   \
+        {                                                                      \
+            Foam::dimensionedScalar ds                                         \
+            (                                                                  \
+                Foam::dimensionedConstant                                      \
+                (                                                              \
+                    Group,                                                     \
+                    Name,                                                      \
+                    Foam::dimensionedScalar(Name,DefaultExpr)                  \
+                )                                                              \
+            );                                                                 \
             Foam::dimensionedScalar& s = const_cast<Foam::dimensionedScalar&> \
-            (                                                                 \
-                Switch                                                        \
-            );                                                                \
-            s.dimensions().reset(ds.dimensions());                            \
-            s = ds;                                                           \
-        }                                                                     \
-        virtual ~add##Tag##ToDimensionedConstantWithDefault()                 \
-        {}                                                                    \
-        virtual void readData(Foam::Istream& is)                              \
-        {                                                                     \
-            const_cast<Foam::dimensionedScalar&>(Switch) =                    \
-                Foam::dimensionedConstant                                     \
-                (                                                             \
-                    Group,                                                    \
-                    Name,                                                     \
-                    Foam::dimensionedScalar(Name,DefaultExpr)                 \
-                );                                                            \
-        }                                                                     \
-        virtual void writeData(Foam::Ostream& os) const                       \
-        {                                                                     \
-            os << Switch;                                                     \
-        }                                                                     \
-    };                                                                        \
-    add##Tag##ToDimensionedConstantWithDefault                                \
+            (                                                                  \
+                Switch                                                         \
+            );                                                                 \
+            s.dimensions().reset(ds.dimensions());                             \
+            s = ds;                                                            \
+        }                                                                      \
+        virtual ~add##Tag##ToDimensionedConstantWithDefault()                  \
+        {}                                                                     \
+        virtual void readData(Foam::Istream& is)                               \
+        {                                                                      \
+            const_cast<Foam::dimensionedScalar&>(Switch) =                     \
+                Foam::dimensionedConstant                                      \
+                (                                                              \
+                    Group,                                                     \
+                    Name,                                                      \
+                    Foam::dimensionedScalar(Name,DefaultExpr)                  \
+                );                                                             \
+        }                                                                      \
+        virtual void writeData(Foam::Ostream& os) const                        \
+        {                                                                      \
+            os << Switch;                                                      \
+        }                                                                      \
+    };                                                                         \
+    add##Tag##ToDimensionedConstantWithDefault                                 \
         add##Tag##ToDimensionedConstantWithDefault_(Name)
 
 
diff --git a/src/OpenFOAM/global/debug/debug.C b/src/OpenFOAM/global/debug/debug.C
index d7517922c0b07167996fe97a07203476228b54c6..b2f0dfd2fb0bcb07b58032aef647f41d7ee3a395 100644
--- a/src/OpenFOAM/global/debug/debug.C
+++ b/src/OpenFOAM/global/debug/debug.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,9 @@ namespace Foam
 namespace debug
 {
 
-//! \cond ignoreDocumentation - local scope
+//! \cond ignoreDocumentation
+//- Skip documentation : local scope only
+
 dictionary* controlDictPtr_(NULL);
 dictionary* debugSwitchesPtr_(NULL);
 dictionary* infoSwitchesPtr_(NULL);
@@ -55,7 +57,7 @@ simpleObjectRegistry* dimensionSetObjectsPtr_(NULL);
 simpleObjectRegistry* dimensionedConstantObjectsPtr_(NULL);
 
 
-// to ensure controlDictPtr_ is deleted at the end of the run
+// To ensure controlDictPtr_ is deleted at the end of the run
 class deleteControlDictPtr
 {
 public:
diff --git a/src/OpenFOAM/global/debug/defineDebugSwitch.H b/src/OpenFOAM/global/debug/defineDebugSwitch.H
index 54731a1b6efa0caaa3d5c7d0b081234ed4998dee..c61e7180b3ddb5bdf4ddb4449f79c58a21eea47e 100644
--- a/src/OpenFOAM/global/debug/defineDebugSwitch.H
+++ b/src/OpenFOAM/global/debug/defineDebugSwitch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,10 +35,6 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// definitions (debug information only)
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 namespace Foam
 {
 
@@ -74,76 +70,77 @@ public:
 
 } // End namespace Foam
 
-#define registerTemplateDebugSwitchWithName(Type,Name)                        \
-    template<>                                                                \
-    const Foam::RegisterDebugSwitch<Type>                                     \
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#define registerTemplateDebugSwitchWithName(Type,Name)                         \
+    template<>                                                                 \
+    const Foam::RegisterDebugSwitch<Type>                                      \
         Foam::RegisterDebugSwitch<Type>::registerDebugSwitch(Name)
 
 
 //- Define the debug information, lookup as \a Name
-#define registerDebugSwitchWithName(Type,Tag,Name)                            \
-    class add##Tag##ToDebug                                                   \
-    :                                                                         \
-        public ::Foam::simpleRegIOobject                                      \
-    {                                                                         \
-    public:                                                                   \
-        add##Tag##ToDebug(const char* name)                                   \
-        :                                                                     \
-            ::Foam::simpleRegIOobject(Foam::debug::addDebugObject, name)      \
-        {}                                                                    \
-        virtual ~add##Tag##ToDebug()                                          \
-        {}                                                                    \
-        virtual void readData(Foam::Istream& is)                              \
-        {                                                                     \
-            Type::debug = readLabel(is);                                      \
-        }                                                                     \
-        virtual void writeData(Foam::Ostream& os) const                       \
-        {                                                                     \
-            os << Type::debug;                                                \
-        }                                                                     \
-    };                                                                        \
+#define registerDebugSwitchWithName(Type,Tag,Name)                             \
+    class add##Tag##ToDebug                                                    \
+    :                                                                          \
+        public ::Foam::simpleRegIOobject                                       \
+    {                                                                          \
+    public:                                                                    \
+        add##Tag##ToDebug(const char* name)                                    \
+        :                                                                      \
+            ::Foam::simpleRegIOobject(Foam::debug::addDebugObject, name)       \
+        {}                                                                     \
+        virtual ~add##Tag##ToDebug()                                           \
+        {}                                                                     \
+        virtual void readData(Foam::Istream& is)                               \
+        {                                                                      \
+            Type::debug = readLabel(is);                                       \
+        }                                                                      \
+        virtual void writeData(Foam::Ostream& os) const                        \
+        {                                                                      \
+            os << Type::debug;                                                 \
+        }                                                                      \
+    };                                                                         \
     add##Tag##ToDebug add##Tag##ToDebug_(Name)
 
 
 //- Define the debug information, lookup as \a Name
-#define defineDebugSwitchWithName(Type, Name, DebugSwitch)                    \
+#define defineDebugSwitchWithName(Type, Name, DebugSwitch)                     \
     int Type::debug(::Foam::debug::debugSwitch(Name, DebugSwitch))
 
 //- Define the debug information
-#define defineDebugSwitch(Type, DebugSwitch)                                  \
-    defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch);          \
+#define defineDebugSwitch(Type, DebugSwitch)                                   \
+    defineDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch);           \
     registerDebugSwitchWithName(Type, Type, Type::typeName_())
 
 //- Define the debug information for templates, lookup as \a Name
-# define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)           \
-    template<>                                                                \
-    defineDebugSwitchWithName(Type, Name, DebugSwitch);                       \
+#define defineTemplateDebugSwitchWithName(Type, Name, DebugSwitch)             \
+    template<>                                                                 \
+    defineDebugSwitchWithName(Type, Name, DebugSwitch);                        \
     registerTemplateDebugSwitchWithName(Type, Name)
+
 //- Define the debug information for templates sub-classes, lookup as \a Name
-# define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch)          \
-    template<>                                                                \
-    defineDebugSwitchWithName(Type, Name, DebugSwitch);                       \
+#define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch)            \
+    template<>                                                                 \
+    defineDebugSwitchWithName(Type, Name, DebugSwitch);                        \
     registerTemplateDebugSwitchWithName(Type, Name)
 
 //- Define the debug information for templates
 //  Useful with typedefs
-#define defineTemplateDebugSwitch(Type, DebugSwitch)                          \
+#define defineTemplateDebugSwitch(Type, DebugSwitch)                           \
     defineTemplateDebugSwitchWithName(Type, #Type, DebugSwitch)
 
 //- Define the debug information directly for templates
-#define defineNamedTemplateDebugSwitch(Type, DebugSwitch)                     \
+#define defineNamedTemplateDebugSwitch(Type, DebugSwitch)                      \
     defineTemplateDebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
 
 
-// For templated sub-classes
-
 //- Define the debug information for templates
 //  Useful with typedefs
-#define defineTemplate2DebugSwitch(Type, DebugSwitch)                         \
+#define defineTemplate2DebugSwitch(Type, DebugSwitch)                          \
     defineTemplate2DebugSwitchWithName(Type, #Type, DebugSwitch)
 
 //- Define the debug information directly for templates
-#define defineNamedTemplate2DebugSwitch(Type, DebugSwitch)                    \
+#define defineNamedTemplate2DebugSwitch(Type, DebugSwitch)                     \
     defineTemplate2DebugSwitchWithName(Type, Type::typeName_(), DebugSwitch)
 
 
diff --git a/src/OpenFOAM/graph/curve/curve.C b/src/OpenFOAM/graph/curve/curve.C
index 738179a77792937704d9843125f163773c95c2a8..aadff19fce167ec6241625446f8015d5bb444fc4 100644
--- a/src/OpenFOAM/graph/curve/curve.C
+++ b/src/OpenFOAM/graph/curve/curve.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,76 +24,11 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "curve.H"
-//#include "curveTools.H"
 #include "Ostream.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// construct as interpolation
-/*
-curve::curve(const curve& Curve, const label nFacets)
-:
-    Name("Interpolated" + Curve.Name),
-    Style(Curve.Style),
-    X(2*nFacets),
-    Y(2*nFacets)
-{
-    // Calculate curve length
-    scalar curveLength=0;
-    label i;
-    for (i=0; i<Curve.size()-1; i++)
-    {
-        curveLength += distance(Curve[i], Curve[i+1]);
-    }
-
-    scalar stepLength = curveLength/nFacets;
-    label nPoints = 0;
-    label previous=0, next=1;
-    bool endOfCurve;
-    vector presentPoint=Curve[0], nextPoint;
-
-    do
-    {
-        endOfCurve =
-        stepForwardsToNextPoint
-        (
-            presentPoint,
-            nextPoint,
-            previous,
-            next,
-            stepLength,
-            Curve
-        );
-
-        if (!endOfCurve)
-        {
-            if (nPoints >= size()-1)
-            {
-                setSize(label(1.5*size()));
-            }
-
-            presentPoint = nextPoint;
-
-            x()[nPoints] = nextPoint.x();
-            y()[nPoints] = nextPoint.y();
-
-            nPoints++;
-        }
-
-    } while (!endOfCurve);
-
-    setSize(nPoints);
-}
-*/
-
-
-// construct given name, style and size
-curve::curve
+Foam::curve::curve
 (
     const string& name,
     const curveStyle& style,
@@ -106,8 +41,7 @@ curve::curve
 {}
 
 
-// construct from the bits
-curve::curve
+Foam::curve::curve
 (
     const string& name,
     const curveStyle& style,
@@ -120,45 +54,9 @@ curve::curve
 {}
 
 
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-// Gradient operation
-/*
-curve grad(const curve& Curve)
-{
-    curve gradCurve(Curve);
-
-    label i;
-    for (i=1; i<Curve.size()-1; i++)
-    {
-        scalar deltaIm1 = Curve[i].x() - Curve[i-1].x();
-        scalar deltaI = Curve[i+1].x() - Curve[i].x();
-
-        scalar deltaAv = 1.0/deltaIm1 + 1.0/deltaI;
-
-        gradCurve.y()[i] =
-            (
-                (Curve[i+1].y() - Curve[i].y())/sqr(deltaI)
-              + (Curve[i].y() - Curve[i-1].y())/sqr(deltaIm1)
-            )/deltaAv;
-    }
-
-    gradCurve.y()[0] =
-        (Curve[1].y() - Curve[0].y())/(Curve[1].x() - Curve[0].x());
-
-    label n = Curve.size()-1;
-
-    gradCurve.y()[n] =
-        (Curve[n].y() - Curve[n-1].y())/(Curve[n].x() - Curve[n-1].x());
-
-    return gradCurve;
-}
-*/
-
-
 // * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
 
-Ostream& operator<<(Ostream& os, const curve& c)
+Foam::Ostream& Foam::operator<<(Ostream& os, const curve& c)
 {
     os  << nl
         << c.name_ << nl
@@ -171,8 +69,4 @@ Ostream& operator<<(Ostream& os, const curve& c)
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/graph/curve/curveTools.H b/src/OpenFOAM/graph/curve/curveTools.H
index 6b56d1faa9fcb5e410175f55e4332150970a6cb6..04787e4e800599e10eca7b0e260349686b559ce2 100644
--- a/src/OpenFOAM/graph/curve/curveTools.H
+++ b/src/OpenFOAM/graph/curve/curveTools.H
@@ -4,6 +4,8 @@
 #include "scalar.H"
 #include "vector.H"
 #include "curve.H"
+#include "char.H"
+#include "List.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -13,9 +15,6 @@ namespace Foam
 #define curveSmall 1.0e-8
 #define curveGreat 1.0e8
 
-#include "char.H"
-#include "List.H"
-
 typedef List<char> charList;
 typedef List<charList> charListList;
 
diff --git a/src/OpenFOAM/include/addDictOption.H b/src/OpenFOAM/include/addDictOption.H
index f538e572948c95a5e9e47f85f08bfcd4ab66b366..055983396acddd01ca4b78d28982527d62969922 100644
--- a/src/OpenFOAM/include/addDictOption.H
+++ b/src/OpenFOAM/include/addDictOption.H
@@ -1,10 +1,6 @@
-//
-// addDictOption.H
-// ~~~~~~~~~~~~~~~~~
-
-    Foam::argList::addOption
-    (
-        "dict",
-        "file",
-        "read control dictionary from specified location"
-    );
+Foam::argList::addOption
+(
+    "dict",
+    "file",
+    "read control dictionary from specified location"
+);
diff --git a/src/OpenFOAM/include/addOverwriteOption.H b/src/OpenFOAM/include/addOverwriteOption.H
index 0c05c01c9367fd4523f62a9b6f6747ec124382da..a1ac66992898c3be1a5e418c4689bd844c0c88ba 100644
--- a/src/OpenFOAM/include/addOverwriteOption.H
+++ b/src/OpenFOAM/include/addOverwriteOption.H
@@ -1,10 +1,5 @@
-//
-// addOverwriteOption.H
-// ~~~~~~~~~~~~~~~~~~~~
-
-    Foam::argList::addBoolOption
-    (
-        "overwrite",
-        "overwrite existing mesh/results files"
-    );
-
+Foam::argList::addBoolOption
+(
+    "overwrite",
+    "overwrite existing mesh/results files"
+);
diff --git a/src/OpenFOAM/include/addRegionOption.H b/src/OpenFOAM/include/addRegionOption.H
index d801dd0de60ed3b5607eb057a352027ecc422e6e..8aaca18e98107a6ef635e6912d69f8d641c543cd 100644
--- a/src/OpenFOAM/include/addRegionOption.H
+++ b/src/OpenFOAM/include/addRegionOption.H
@@ -1,11 +1,6 @@
-//
-// addRegionOption.H
-// ~~~~~~~~~~~~~~~~~
-
-    Foam::argList::addOption
-    (
-        "region",
-        "name",
-        "specify alternative mesh region"
-    );
-
+Foam::argList::addOption
+(
+    "region",
+    "name",
+    "specify alternative mesh region"
+);
diff --git a/src/OpenFOAM/include/addTimeOptions.H b/src/OpenFOAM/include/addTimeOptions.H
index 6110015c70f6fa6e749d5dd4a782cdf0d3049400..42d4543d8372b8645e80fc6f9081bcf70ae1c7a2 100644
--- a/src/OpenFOAM/include/addTimeOptions.H
+++ b/src/OpenFOAM/include/addTimeOptions.H
@@ -1,29 +1,24 @@
-//
-// addTimeOptions.H
-// ~~~~~~~~~~~~~~~~
+Foam::argList::addBoolOption
+(
+    "constant",
+    "include the 'constant/' dir in the times list"
+);
 
-    Foam::argList::addBoolOption
-    (
-        "constant",
-        "include the 'constant/' dir in the times list"
-    );
+Foam::argList::addBoolOption
+(
+    "latestTime",
+    "select the latest time"
+);
 
-    Foam::argList::addBoolOption
-    (
-        "latestTime",
-        "select the latest time"
-    );
-
-    Foam::argList::addBoolOption
-    (
-        "noZero",
-        "exclude the '0/' dir from the times list"
-    );
-
-    Foam::argList::addOption
-    (
-        "time",
-        "time",
-        "specify a single time value to select"
-    );
+Foam::argList::addBoolOption
+(
+    "noZero",
+    "exclude the '0/' dir from the times list"
+);
 
+Foam::argList::addOption
+(
+    "time",
+    "time",
+    "specify a single time value to select"
+);
diff --git a/src/OpenFOAM/include/checkConstantOption.H b/src/OpenFOAM/include/checkConstantOption.H
index 9f39ac65413c0f6bbb1b510993f3e122fea3955f..578df75350e89277fc3619bdaf5dd95da00b44ce 100644
--- a/src/OpenFOAM/include/checkConstantOption.H
+++ b/src/OpenFOAM/include/checkConstantOption.H
@@ -1,14 +1,11 @@
-//
-// checkConstantOption.H
-// ~~~~~~~~~~~~~~~~~~~~~
-// unless -constant is present, skip startTime if it is "constant"
+// Unless -constant is present, skip startTime if it is "constant"
 
-    if
-    (
-        !args.optionFound("constant")
-     && (startTime < Times.size()-1)
-     && (Times[startTime].name() == "constant")
-    )
-    {
-        startTime++;
-    }
+if
+(
+   !args.optionFound("constant")
+ && (startTime < Times.size()-1)
+ && (Times[startTime].name() == "constant")
+)
+{
+    startTime++;
+}
diff --git a/src/OpenFOAM/include/checkTimeOption.H b/src/OpenFOAM/include/checkTimeOption.H
index 412d44ef0e702944f2a15b38711e36ffb056eceb..b8b170a8221825f7059130dc192aa09726def77b 100644
--- a/src/OpenFOAM/include/checkTimeOption.H
+++ b/src/OpenFOAM/include/checkTimeOption.H
@@ -1,6 +1,3 @@
-//
-// checkTimeOption.H
-// ~~~~~~~~~~~~~~~~~
 // Check -time and -latestTime options
 
 if (args.optionFound("time"))
diff --git a/src/OpenFOAM/include/checkTimeOptions.H b/src/OpenFOAM/include/checkTimeOptions.H
index d0d2051ae43e1cab6a1d5ab0bcbdf40a4e7fc5cb..789135603533d2b00725e98531174f8439985e1c 100644
--- a/src/OpenFOAM/include/checkTimeOptions.H
+++ b/src/OpenFOAM/include/checkTimeOptions.H
@@ -1,7 +1,3 @@
-//
-// checkTimeOptions.H
-// ~~~~~~~~~~~~~~~~~~
-
 Foam::label startTime = 0;
 
 // Unless -constant is present, skip startTime if it is "constant"
diff --git a/src/OpenFOAM/include/checkTimeOptionsNoConstant.H b/src/OpenFOAM/include/checkTimeOptionsNoConstant.H
index 6b4e836f5af68cae5ef8de43d1b9eccfaf71ff58..02312375df2e46b5acc3a0bd674d3eb95f3a0cbe 100644
--- a/src/OpenFOAM/include/checkTimeOptionsNoConstant.H
+++ b/src/OpenFOAM/include/checkTimeOptionsNoConstant.H
@@ -1,7 +1,3 @@
-//
-// checkTimeOptionsNoConstant.H
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 Foam::label startTime = 0;
 
 // Check -time and -latestTime options
diff --git a/src/OpenFOAM/include/createMesh.H b/src/OpenFOAM/include/createMesh.H
index 630494649d5642631313e5226115de446a515e1d..8c3d989849a2cf651323d2e78d36d872f7361f51 100644
--- a/src/OpenFOAM/include/createMesh.H
+++ b/src/OpenFOAM/include/createMesh.H
@@ -1,18 +1,14 @@
-//
-// createMesh.H
-// ~~~~~~~~~~~~
+Foam::Info
+    << "Create mesh for time = "
+    << runTime.timeName() << Foam::nl << Foam::endl;
 
-    Foam::Info
-        << "Create mesh for time = "
-        << runTime.timeName() << Foam::nl << Foam::endl;
-
-    Foam::fvMesh mesh
+Foam::fvMesh mesh
+(
+    Foam::IOobject
     (
-        Foam::IOobject
-        (
-            Foam::fvMesh::defaultRegion,
-            runTime.timeName(),
-            runTime,
-            Foam::IOobject::MUST_READ
-        )
-    );
+        Foam::fvMesh::defaultRegion,
+        runTime.timeName(),
+        runTime,
+        Foam::IOobject::MUST_READ
+    )
+);
diff --git a/src/OpenFOAM/include/createMeshNoClear.H b/src/OpenFOAM/include/createMeshNoClear.H
index 8526a37be6ec2c42d0d3d6581e265676ec229ec1..ebdb3fc3bc5306291b3c96368882b4ff9c3b2435 100644
--- a/src/OpenFOAM/include/createMeshNoClear.H
+++ b/src/OpenFOAM/include/createMeshNoClear.H
@@ -1,19 +1,16 @@
-//
-// createMeshNoClear.H
-// ~~~~~~~~~~~~~~~~~~~
-// currently identical to createMesh.H
+// Currently identical to createMesh.H
 
-    Foam::Info
-        << "Create mesh, no clear-out for time = "
-        << runTime.timeName() << Foam::nl << Foam::endl;
+Foam::Info
+    << "Create mesh, no clear-out for time = "
+    << runTime.timeName() << Foam::nl << Foam::endl;
 
-    Foam::fvMesh mesh
+Foam::fvMesh mesh
+(
+    Foam::IOobject
     (
-        Foam::IOobject
-        (
-            Foam::fvMesh::defaultRegion,
-            runTime.timeName(),
-            runTime,
-            Foam::IOobject::MUST_READ
-        )
-    );
+        Foam::fvMesh::defaultRegion,
+        runTime.timeName(),
+        runTime,
+        Foam::IOobject::MUST_READ
+    )
+);
diff --git a/src/OpenFOAM/include/createNamedMesh.H b/src/OpenFOAM/include/createNamedMesh.H
index f61ec2bd6e8836d39d895b4a0604a69e26e2c4cb..bfaa243e1006aea1d1cc673b869cdf614197c3c1 100644
--- a/src/OpenFOAM/include/createNamedMesh.H
+++ b/src/OpenFOAM/include/createNamedMesh.H
@@ -1,30 +1,26 @@
-//
-// createNamedMesh.H
-// ~~~~~~~~~~~~~~~~~
+Foam::word regionName;
 
-    Foam::word regionName;
+if (args.optionReadIfPresent("region", regionName))
+{
+    Foam::Info
+        << "Create mesh " << regionName << " for time = "
+        << runTime.timeName() << Foam::nl << Foam::endl;
+}
+else
+{
+    regionName = Foam::fvMesh::defaultRegion;
+    Foam::Info
+        << "Create mesh for time = "
+        << runTime.timeName() << Foam::nl << Foam::endl;
+}
 
-    if (args.optionReadIfPresent("region", regionName))
-    {
-        Foam::Info
-            << "Create mesh " << regionName << " for time = "
-            << runTime.timeName() << Foam::nl << Foam::endl;
-    }
-    else
-    {
-        regionName = Foam::fvMesh::defaultRegion;
-        Foam::Info
-            << "Create mesh for time = "
-            << runTime.timeName() << Foam::nl << Foam::endl;
-    }
-
-    Foam::fvMesh mesh
+Foam::fvMesh mesh
+(
+    Foam::IOobject
     (
-        Foam::IOobject
-        (
-            regionName,
-            runTime.timeName(),
-            runTime,
-            Foam::IOobject::MUST_READ
-        )
-    );
+        regionName,
+        runTime.timeName(),
+        runTime,
+        Foam::IOobject::MUST_READ
+    )
+);
diff --git a/src/OpenFOAM/include/createNamedPolyMesh.H b/src/OpenFOAM/include/createNamedPolyMesh.H
index bee8601c743ee3547f154b9c800c9cb2f900e0e0..2413a427f2f64e1efc708ba06a30b1f7cc1b1e91 100644
--- a/src/OpenFOAM/include/createNamedPolyMesh.H
+++ b/src/OpenFOAM/include/createNamedPolyMesh.H
@@ -1,30 +1,26 @@
-//
-// createNamedPolyMesh.H
-// ~~~~~~~~~~~~~~~~~~~~~
+Foam::word regionName;
 
-    Foam::word regionName;
+if (args.optionReadIfPresent("region", regionName))
+{
+    Foam::Info
+        << "Create polyMesh " << regionName << " for time = "
+        << runTime.timeName() << Foam::nl << Foam::endl;
+}
+else
+{
+    regionName = Foam::polyMesh::defaultRegion;
+    Foam::Info
+        << "Create polyMesh for time = "
+        << runTime.timeName() << Foam::nl << Foam::endl;
+}
 
-    if (args.optionReadIfPresent("region", regionName))
-    {
-        Foam::Info
-            << "Create polyMesh " << regionName << " for time = "
-            << runTime.timeName() << Foam::nl << Foam::endl;
-    }
-    else
-    {
-        regionName = Foam::polyMesh::defaultRegion;
-        Foam::Info
-            << "Create polyMesh for time = "
-            << runTime.timeName() << Foam::nl << Foam::endl;
-    }
-
-    Foam::polyMesh mesh
+Foam::polyMesh mesh
+(
+    Foam::IOobject
     (
-        Foam::IOobject
-        (
-            regionName,
-            runTime.timeName(),
-            runTime,
-            Foam::IOobject::MUST_READ
-        )
-    );
+        regionName,
+        runTime.timeName(),
+        runTime,
+        Foam::IOobject::MUST_READ
+    )
+);
diff --git a/src/OpenFOAM/include/createPolyMesh.H b/src/OpenFOAM/include/createPolyMesh.H
index 02e25d1c519ab1a92fb56aa7d1e71baaf71b36e9..8563860ac4eb9f00f26fbaf990f2b20dd236616a 100644
--- a/src/OpenFOAM/include/createPolyMesh.H
+++ b/src/OpenFOAM/include/createPolyMesh.H
@@ -1,18 +1,14 @@
-//
-// createPolyMesh.H
-// ~~~~~~~~~~~~~~~~
+Foam::Info
+    << "Create polyMesh for time = "
+    << runTime.timeName() << Foam::nl << Foam::endl;
 
-    Foam::Info
-        << "Create polyMesh for time = "
-        << runTime.timeName() << Foam::nl << Foam::endl;
-
-    Foam::polyMesh mesh
+Foam::polyMesh mesh
+(
+    Foam::IOobject
     (
-        Foam::IOobject
-        (
-            Foam::polyMesh::defaultRegion,
-            runTime.timeName(),
-            runTime,
-            Foam::IOobject::MUST_READ
-        )
-    );
+        Foam::polyMesh::defaultRegion,
+        runTime.timeName(),
+        runTime,
+        Foam::IOobject::MUST_READ
+    )
+);
diff --git a/src/OpenFOAM/include/createTime.H b/src/OpenFOAM/include/createTime.H
index 36fc675dc36acf76061de0263f02eebb90567d2c..4ea4a6be69afda33ce28449e574a3772f73cc473 100644
--- a/src/OpenFOAM/include/createTime.H
+++ b/src/OpenFOAM/include/createTime.H
@@ -1,7 +1,3 @@
-//
-// createTime.H
-// ~~~~~~~~~~~~
+Foam::Info<< "Create time\n" << Foam::endl;
 
-    Foam::Info<< "Create time\n" << Foam::endl;
-
-    Foam::Time runTime(Foam::Time::controlDictName, args);
+Foam::Time runTime(Foam::Time::controlDictName, args);
diff --git a/src/OpenFOAM/include/setConstantMeshDictionaryIO.H b/src/OpenFOAM/include/setConstantMeshDictionaryIO.H
index 4f97cf16940800ddfcf6168f5584496e342edb64..aa5a68004c27c5e72b6e9d69fd8b795543e273fc 100644
--- a/src/OpenFOAM/include/setConstantMeshDictionaryIO.H
+++ b/src/OpenFOAM/include/setConstantMeshDictionaryIO.H
@@ -1,33 +1,29 @@
-//
-// setConstantMeshDictionaryIO.H
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    fileName dictPath = "";
-    if (args.optionFound("dict"))
+fileName dictPath = "";
+if (args.optionFound("dict"))
+{
+    dictPath = args["dict"];
+    if (isDir(dictPath))
     {
-        dictPath = args["dict"];
-        if (isDir(dictPath))
-        {
-            dictPath = dictPath / dictName;
-        }
+        dictPath = dictPath / dictName;
     }
+}
+
+IOobject dictIO
+(
+    dictName,
+    runTime.constant(),
+    mesh,
+    IOobject::MUST_READ_IF_MODIFIED,
+    IOobject::NO_WRITE
+);
 
-    IOobject dictIO
+if (dictPath.size())
+{
+    dictIO = IOobject
     (
-        dictName,
-        runTime.constant(),
+        dictPath,
         mesh,
         IOobject::MUST_READ_IF_MODIFIED,
         IOobject::NO_WRITE
     );
-
-    if (dictPath.size())
-    {
-        dictIO = IOobject
-        (
-            dictPath,
-            mesh,
-            IOobject::MUST_READ_IF_MODIFIED,
-            IOobject::NO_WRITE
-        );
-    }
+}
diff --git a/src/OpenFOAM/include/setRootCase.H b/src/OpenFOAM/include/setRootCase.H
index 587374d067c059aefd4dd78ce680e2eb20bbfd8f..e1b76cfe68c2454df1ade316913b5bc1fd5b00cc 100644
--- a/src/OpenFOAM/include/setRootCase.H
+++ b/src/OpenFOAM/include/setRootCase.H
@@ -1,9 +1,5 @@
-//
-// setRootCase.H
-// ~~~~~~~~~~~~~
-
-    Foam::argList args(argc, argv);
-    if (!args.checkRootCase())
-    {
-        Foam::FatalError.exit();
-    }
+Foam::argList args(argc, argv);
+if (!args.checkRootCase())
+{
+    Foam::FatalError.exit();
+}
diff --git a/src/OpenFOAM/include/setSystemMeshDictionaryIO.H b/src/OpenFOAM/include/setSystemMeshDictionaryIO.H
index 6e89f94c33fb2b1ec344d3c47a8bfcfc84369d87..4d5f2e68ec900c92f33af06385173fc1e487b35b 100644
--- a/src/OpenFOAM/include/setSystemMeshDictionaryIO.H
+++ b/src/OpenFOAM/include/setSystemMeshDictionaryIO.H
@@ -1,33 +1,29 @@
-//
-// setSystemMeshDictionaryIO.H
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    fileName dictPath = "";
-    if (args.optionFound("dict"))
+fileName dictPath = "";
+if (args.optionFound("dict"))
+{
+    dictPath = args["dict"];
+    if (isDir(dictPath))
     {
-        dictPath = args["dict"];
-        if (isDir(dictPath))
-        {
-            dictPath = dictPath / dictName;
-        }
+        dictPath = dictPath / dictName;
     }
+}
+
+IOobject dictIO
+(
+    dictName,
+    runTime.system(),
+    mesh,
+    IOobject::MUST_READ_IF_MODIFIED,
+    IOobject::NO_WRITE
+);
 
-    IOobject dictIO
+if (dictPath.size())
+{
+    dictIO = IOobject
     (
-        dictName,
-        runTime.system(),
+        dictPath,
         mesh,
         IOobject::MUST_READ_IF_MODIFIED,
         IOobject::NO_WRITE
     );
-
-    if (dictPath.size())
-    {
-        dictIO = IOobject
-        (
-            dictPath,
-            mesh,
-            IOobject::MUST_READ_IF_MODIFIED,
-            IOobject::NO_WRITE
-        );
-    }
+}
diff --git a/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H b/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H
index e594e83d960110735ddf042462655c2d46318756..ceebb43815ad0d230e221a5b858f74506fa51141 100644
--- a/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H
+++ b/src/OpenFOAM/include/setSystemRunTimeDictionaryIO.H
@@ -1,33 +1,29 @@
-//
-// setSystemRunTimeDictionaryIO.H
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    fileName dictPath = "";
-    if (args.optionFound("dict"))
+fileName dictPath = "";
+if (args.optionFound("dict"))
+{
+    dictPath = args["dict"];
+    if (isDir(dictPath))
     {
-        dictPath = args["dict"];
-        if (isDir(dictPath))
-        {
-            dictPath = dictPath / dictName;
-        }
+        dictPath = dictPath / dictName;
     }
+}
+
+IOobject dictIO
+(
+    dictName,
+    runTime.system(),
+    runTime,
+    IOobject::MUST_READ_IF_MODIFIED,
+    IOobject::NO_WRITE
+);
 
-    IOobject dictIO
+if (dictPath.size())
+{
+    dictIO = IOobject
     (
-        dictName,
-        runTime.system(),
+        dictPath,
         runTime,
         IOobject::MUST_READ_IF_MODIFIED,
         IOobject::NO_WRITE
     );
-
-    if (dictPath.size())
-    {
-        dictIO = IOobject
-        (
-            dictPath,
-            runTime,
-            IOobject::MUST_READ_IF_MODIFIED,
-            IOobject::NO_WRITE
-        );
-    }
+}
diff --git a/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C b/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C
index c0e7192d1591bf8270a6d0a319812b877056a88c..c5d2cc4257771b9e07200ae7402a56de35e1c0c6 100644
--- a/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C
+++ b/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ Type Foam::interpolatePointToCell
 
     labelHashSet pointHad(10*cFaces.size());
 
-    Type sum(pTraits<Type>::zero);
+    Type sum = Zero;
 
     forAll(cFaces, i)
     {
diff --git a/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.H b/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.H
index efb999078eb9e0d1d4ce3166141290db415fc83d..05194148fa6d433a796e46f769c8b0f390206362 100644
--- a/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.H
+++ b/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ Type interpolatePointToCell
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolatePointToCell.C"
+    #include "interpolatePointToCell.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H
index 57a49b4236d572af2f0434c0b3dc16b7dd55e4e2..d99af5575c1ba2deea90834c7016d959a484a70d 100644
--- a/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H
+++ b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ Type interpolateSplineXY
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolateSplineXY.C"
+    #include "interpolateSplineXY.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.H b/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.H
index cf4abd786d890e6c6aa093084b2b69a767ced4be..ea6d6e215f8fce160835098b97c6dab34f65528d 100644
--- a/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.H
+++ b/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ Type interpolateXY
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolateXY.C"
+    #include "interpolateXY.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C
index cfe912888bc49be14b0c8e8348ebf4eed4beea96..fe2e5bd51424408e024907aed0f57a76c4f223ce 100644
--- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C
+++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ void Foam::interpolation2DTable<Type>::readTable()
 template<class Type>
 Foam::interpolation2DTable<Type>::interpolation2DTable()
 :
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >(),
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
     boundsHandling_(interpolation2DTable::WARN),
     fileName_("fileNameIsUndefined"),
     reader_(NULL)
@@ -64,12 +64,12 @@ Foam::interpolation2DTable<Type>::interpolation2DTable()
 template<class Type>
 Foam::interpolation2DTable<Type>::interpolation2DTable
 (
-    const List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >& values,
+    const List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>& values,
     const boundsHandling bounds,
     const fileName& fName
 )
 :
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >(values),
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(values),
     boundsHandling_(bounds),
     fileName_(fName),
     reader_(NULL)
@@ -79,7 +79,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
 template<class Type>
 Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName)
 :
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >(),
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
     boundsHandling_(interpolation2DTable::WARN),
     fileName_(fName),
     reader_(new openFoamTableReader<Type>(dictionary()))
@@ -91,7 +91,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const fileName& fName)
 template<class Type>
 Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict)
 :
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >(),
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
     boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
     fileName_(dict.lookup("fileName")),
     reader_(tableReader<Type>::New(dict))
@@ -106,7 +106,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
      const interpolation2DTable& interpTable
 )
 :
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >(interpTable),
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(interpTable),
     boundsHandling_(interpTable.boundsHandling_),
     fileName_(interpTable.fileName_),
     reader_(interpTable.reader_)    // note: steals reader. Used in write().
@@ -119,7 +119,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable
 template<class Type>
 Type Foam::interpolation2DTable<Type>::interpolateValue
 (
-    const List<Tuple2<scalar, Type> >& data,
+    const List<Tuple2<scalar, Type>>& data,
     const scalar lookupValue
 ) const
 {
@@ -308,7 +308,7 @@ Type Foam::interpolation2DTable<Type>::operator()
         WarningInFunction
             << "cannot interpolate a zero-sized table - returning zero" << endl;
 
-        return pTraits<Type>::zero;
+        return Zero;
     }
     else if (nX == 1)
     {
diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H
index c34090c9852755ed28603d255d2bdea6993b3cf0..7555239bbc65a31f505c3aca8c690cc1bb48bc4e 100644
--- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H
+++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ namespace Foam
 template<class Type>
 class interpolation2DTable
 :
-    public List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >
+    public List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>
 {
 public:
 
@@ -67,7 +67,7 @@ public:
         };
 
         //- Cconvenience typedef
-        typedef List<Tuple2<scalar, List<Tuple2<scalar, Type> > > > table;
+        typedef List<Tuple2<scalar, List<Tuple2<scalar, Type>>>> table;
 
 
 private:
@@ -81,7 +81,7 @@ private:
         fileName fileName_;
 
         //- The actual reader
-        autoPtr<tableReader<Type> > reader_;
+        autoPtr<tableReader<Type>> reader_;
 
 
     // Private Member Functions
@@ -92,7 +92,7 @@ private:
         //- Return interpolated value in List
         Type interpolateValue
         (
-            const List<Tuple2<scalar, Type> >& data,
+            const List<Tuple2<scalar, Type>>& data,
             const scalar
         ) const;
 
@@ -116,7 +116,7 @@ public:
         //- Construct from components
         interpolation2DTable
         (
-            const List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >& values,
+            const List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>& values,
             const boundsHandling bounds,
             const fileName& fName
         );
@@ -153,7 +153,7 @@ public:
     // Member Operators
 
         //- Return an element of constant Tuple2<scalar, Type>
-        const List<Tuple2<scalar, Type> >& operator[](const label) const;
+        const List<Tuple2<scalar, Type>>& operator[](const label) const;
 
         //- Return an interpolated value
         Type operator()(const scalar, const scalar) const;
@@ -167,7 +167,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolation2DTable.C"
+    #include "interpolation2DTable.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.H b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.H
index e71f902d882761fc65d2b68e2e76e86641d75256..019c3738ed588f9faa4ff012723ea167bf032d4c 100644
--- a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.H
+++ b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -221,7 +221,7 @@ public:
 #include "interpolationLookUpTableI.H"
 
 #ifdef NoRepository
-#   include "interpolationLookUpTable.C"
+    #include "interpolationLookUpTable.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
index 4fd0b074832f12240269c1aad7c1e8c8126439ab..63b7bad3220fce63218bfcb8fccf3527a62c7e73 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ void Foam::interpolationTable<Type>::readTable()
 template<class Type>
 Foam::interpolationTable<Type>::interpolationTable()
 :
-    List<Tuple2<scalar, Type> >(),
+    List<Tuple2<scalar, Type>>(),
     boundsHandling_(interpolationTable::WARN),
     fileName_("fileNameIsUndefined"),
     reader_(NULL)
@@ -68,12 +68,12 @@ Foam::interpolationTable<Type>::interpolationTable()
 template<class Type>
 Foam::interpolationTable<Type>::interpolationTable
 (
-    const List<Tuple2<scalar, Type> >& values,
+    const List<Tuple2<scalar, Type>>& values,
     const boundsHandling bounds,
     const fileName& fName
 )
 :
-    List<Tuple2<scalar, Type> >(values),
+    List<Tuple2<scalar, Type>>(values),
     boundsHandling_(bounds),
     fileName_(fName),
     reader_(NULL)
@@ -83,7 +83,7 @@ Foam::interpolationTable<Type>::interpolationTable
 template<class Type>
 Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
 :
-    List<Tuple2<scalar, Type> >(),
+    List<Tuple2<scalar, Type>>(),
     boundsHandling_(interpolationTable::WARN),
     fileName_(fName),
     reader_(new openFoamTableReader<Type>(dictionary()))
@@ -95,7 +95,7 @@ Foam::interpolationTable<Type>::interpolationTable(const fileName& fName)
 template<class Type>
 Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
 :
-    List<Tuple2<scalar, Type> >(),
+    List<Tuple2<scalar, Type>>(),
     boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
     fileName_(dict.lookup("fileName")),
     reader_(tableReader<Type>::New(dict))
@@ -110,7 +110,7 @@ Foam::interpolationTable<Type>::interpolationTable
      const interpolationTable& interpTable
 )
 :
-    List<Tuple2<scalar, Type> >(interpTable),
+    List<Tuple2<scalar, Type>>(interpTable),
     boundsHandling_(interpTable.boundsHandling_),
     fileName_(interpTable.fileName_),
     reader_(interpTable.reader_)    // note: steals reader. Used in write().
@@ -206,12 +206,12 @@ template<class Type>
 void Foam::interpolationTable<Type>::check() const
 {
     label n = this->size();
-    scalar prevValue = List<Tuple2<scalar, Type> >::operator[](0).first();
+    scalar prevValue = List<Tuple2<scalar, Type>>::operator[](0).first();
 
     for (label i=1; i<n; ++i)
     {
         const scalar currValue =
-            List<Tuple2<scalar, Type> >::operator[](i).first();
+            List<Tuple2<scalar, Type>>::operator[](i).first();
 
         // avoid duplicate values (divide-by-zero error)
         if (currValue <= prevValue)
@@ -251,8 +251,8 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
         return 0;
     }
 
-    scalar minLimit = List<Tuple2<scalar, Type> >::operator[](0).first();
-    scalar maxLimit = List<Tuple2<scalar, Type> >::operator[](n-1).first();
+    scalar minLimit = List<Tuple2<scalar, Type>>::operator[](0).first();
+    scalar maxLimit = List<Tuple2<scalar, Type>>::operator[](n-1).first();
     scalar lookupValue = value;
 
     if (lookupValue < minLimit)
@@ -328,7 +328,7 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
     // look for the correct range
     for (label i = 0; i < n; ++i)
     {
-        if (lookupValue >= List<Tuple2<scalar, Type> >::operator[](i).first())
+        if (lookupValue >= List<Tuple2<scalar, Type>>::operator[](i).first())
         {
             lo = hi = i;
         }
@@ -356,13 +356,13 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
         return
         (
             (
-                List<Tuple2<scalar, Type> >::operator[](hi).second()
-              - List<Tuple2<scalar, Type> >::operator[](lo).second()
+                List<Tuple2<scalar, Type>>::operator[](hi).second()
+              - List<Tuple2<scalar, Type>>::operator[](lo).second()
             )
            /(
-               List<Tuple2<scalar, Type> >::operator[](hi).first()
+               List<Tuple2<scalar, Type>>::operator[](hi).first()
              + minLimit
-             - List<Tuple2<scalar, Type> >::operator[](lo).first()
+             - List<Tuple2<scalar, Type>>::operator[](lo).first()
             )
         );
     }
@@ -372,12 +372,12 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
         return
         (
             (
-                List<Tuple2<scalar, Type> >::operator[](hi).second()
-              - List<Tuple2<scalar, Type> >::operator[](lo).second()
+                List<Tuple2<scalar, Type>>::operator[](hi).second()
+              - List<Tuple2<scalar, Type>>::operator[](lo).second()
             )
            /(
-                List<Tuple2<scalar, Type> >::operator[](hi).first()
-              - List<Tuple2<scalar, Type> >::operator[](lo).first()
+                List<Tuple2<scalar, Type>>::operator[](hi).first()
+              - List<Tuple2<scalar, Type>>::operator[](lo).first()
             )
         );
     }
@@ -466,7 +466,7 @@ Foam::interpolationTable<Type>::operator[](const label i) const
         }
     }
 
-    return List<Tuple2<scalar, Type> >::operator[](ii);
+    return List<Tuple2<scalar, Type>>::operator[](ii);
 }
 
 
@@ -477,11 +477,11 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
 
     if (n <= 1)
     {
-        return List<Tuple2<scalar, Type> >::operator[](0).second();
+        return List<Tuple2<scalar, Type>>::operator[](0).second();
     }
 
-    scalar minLimit = List<Tuple2<scalar, Type> >::operator[](0).first();
-    scalar maxLimit = List<Tuple2<scalar, Type> >::operator[](n-1).first();
+    scalar minLimit = List<Tuple2<scalar, Type>>::operator[](0).first();
+    scalar maxLimit = List<Tuple2<scalar, Type>>::operator[](n-1).first();
     scalar lookupValue = value;
 
     if (lookupValue < minLimit)
@@ -505,7 +505,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
             }
             case interpolationTable::CLAMP:
             {
-                return List<Tuple2<scalar, Type> >::operator[](0).second();
+                return List<Tuple2<scalar, Type>>::operator[](0).second();
                 break;
             }
             case interpolationTable::REPEAT:
@@ -538,7 +538,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
             }
             case interpolationTable::CLAMP:
             {
-                return List<Tuple2<scalar, Type> >::operator[](n-1).second();
+                return List<Tuple2<scalar, Type>>::operator[](n-1).second();
                 break;
             }
             case interpolationTable::REPEAT:
@@ -557,7 +557,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
     // look for the correct range
     for (label i = 0; i < n; ++i)
     {
-        if (lookupValue >= List<Tuple2<scalar, Type> >::operator[](i).first())
+        if (lookupValue >= List<Tuple2<scalar, Type>>::operator[](i).first())
         {
             lo = hi = i;
         }
@@ -571,7 +571,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
     if (lo == hi)
     {
         // we are at the end of the table - or there is only a single entry
-        return List<Tuple2<scalar, Type> >::operator[](hi).second();
+        return List<Tuple2<scalar, Type>>::operator[](hi).second();
     }
     else if (hi == 0)
     {
@@ -584,10 +584,10 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
 
         return
         (
-            List<Tuple2<scalar, Type> >::operator[](lo).second()
+            List<Tuple2<scalar, Type>>::operator[](lo).second()
           + (
-                List<Tuple2<scalar, Type> >::operator[](hi).second()
-              - List<Tuple2<scalar, Type> >::operator[](lo).second()
+                List<Tuple2<scalar, Type>>::operator[](hi).second()
+              - List<Tuple2<scalar, Type>>::operator[](lo).second()
             )
            *(lookupValue / minLimit)
         );
@@ -597,18 +597,18 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
         // normal interpolation
         return
         (
-            List<Tuple2<scalar, Type> >::operator[](lo).second()
+            List<Tuple2<scalar, Type>>::operator[](lo).second()
           + (
-                List<Tuple2<scalar, Type> >::operator[](hi).second()
-              - List<Tuple2<scalar, Type> >::operator[](lo).second()
+                List<Tuple2<scalar, Type>>::operator[](hi).second()
+              - List<Tuple2<scalar, Type>>::operator[](lo).second()
             )
            *(
                 lookupValue
-              - List<Tuple2<scalar, Type> >::operator[](lo).first()
+              - List<Tuple2<scalar, Type>>::operator[](lo).first()
             )
            /(
-                List<Tuple2<scalar, Type> >::operator[](hi).first()
-              - List<Tuple2<scalar, Type> >::operator[](lo).first()
+                List<Tuple2<scalar, Type>>::operator[](hi).first()
+              - List<Tuple2<scalar, Type>>::operator[](lo).first()
             )
         );
     }
diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H
index 21523832e8676839c3e808da8f5a67ff60fef3f6..e76e6944aeb2f1a3b594429482885cfd8ca5e4c6 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H
+++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,9 +29,9 @@ Description
     The reference scalar values must be monotonically increasing.
 
     The handling of out-of-bounds values depends on the current setting
-    of \a outOfBounds.
+    of \c outOfBounds.
 
-    If \a REPEAT is chosen for the out-of-bounds handling, the final time
+    If \c repeat is chosen for the out-of-bounds handling, the final time
     value is treated as being equivalent to time=0 for the following periods.
 
 
@@ -40,11 +40,13 @@ Description
     other format is csv (comma separated values):
 
     Read csv format:
+    \verbatim
         readerType      csv;
         fileName        "$FOAM_CASE/constant/p0vsTime.csv";
         hasHeaderLine   true;   // skip first line
         timeColumn      0;      // time is in column 0
         valueColumns    (1);    // value starts in column 1
+    \endverbatim
 
 
 Note
@@ -77,7 +79,7 @@ namespace Foam
 template<class Type>
 class interpolationTable
 :
-    public List<Tuple2<scalar, Type> >
+    public List<Tuple2<scalar, Type>>
 {
 public:
 
@@ -104,7 +106,7 @@ private:
         fileName fileName_;
 
         //- The actual reader
-        autoPtr<tableReader<Type> > reader_;
+        autoPtr<tableReader<Type>> reader_;
 
     // Private Member Functions
 
@@ -122,7 +124,7 @@ public:
         //- Construct from components
         interpolationTable
         (
-            const List<Tuple2<scalar, Type> >& values,
+            const List<Tuple2<scalar, Type>>& values,
             const boundsHandling bounds,
             const fileName& fName
         );
@@ -179,7 +181,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationTable.C"
+    #include "interpolationTable.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
index 8f544c0709b892b177b6f44a5f48ccb6c857b9c1..130f5b9c932ed5f32e1cac43e5a0feb5fb34a416 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,12 +105,12 @@ template<class Type>
 void Foam::csvTableReader<Type>::operator()
 (
     const fileName& fName,
-    List<Tuple2<scalar, Type> >& data
+    List<Tuple2<scalar, Type>>& data
 )
 {
     IFstream in(fName);
 
-    DynamicList<Tuple2<scalar, Type> > values;
+    DynamicList<Tuple2<scalar, Type>> values;
 
     // Skip header
     if (headerLine_)
@@ -162,7 +162,7 @@ template<class Type>
 void Foam::csvTableReader<Type>::operator()
 (
     const fileName& fName,
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >& data
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>& data
 )
 {
     NotImplemented;
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H
index f3f067b0c4eaab426098870e4cd62e5922d3c34e..d1bc29c332d9636d0dfa9ae8a9895b4c857d2e58 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,9 +82,9 @@ public:
         csvTableReader(const dictionary& dict);
 
         //- Construct and return a copy
-        virtual autoPtr<tableReader<Type> > clone() const
+        virtual autoPtr<tableReader<Type>> clone() const
         {
-            return autoPtr<tableReader<Type> >
+            return autoPtr<tableReader<Type>>
             (
                 new csvTableReader<Type>
                 (
@@ -101,13 +101,13 @@ public:
     // Member Functions
 
         //- Read the table
-        virtual void operator()(const fileName&, List<Tuple2<scalar, Type> >&);
+        virtual void operator()(const fileName&, List<Tuple2<scalar, Type>>&);
 
         //- Read 2D table
         virtual void operator()
         (
             const fileName&,
-            List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >&
+            List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>&
         );
 
         //- Write the remaining parameters
@@ -122,7 +122,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "csvTableReader.C"
+    #include "csvTableReader.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C
index aa48da7b6879f105cf25b3bfa64fe42f81d2e68f..dc5451a5028cf2615bb9cd34a64879b99d6cb9a7 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ template<class Type>
 void Foam::openFoamTableReader<Type>::operator()
 (
     const fileName& fName,
-    List<Tuple2<scalar, Type> >& data
+    List<Tuple2<scalar, Type>>& data
 )
 {
     // Read data from file
@@ -60,7 +60,7 @@ template<class Type>
 void Foam::openFoamTableReader<Type>::operator()
 (
     const fileName& fName,
-    List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >& data
+    List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>& data
 )
 {
     // Read data from file
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H
index e40990cafdf146783099c95ff485649656840d0d..035c178877060806268bd6a0656a903b4c35d123 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,9 +64,9 @@ public:
         openFoamTableReader(const dictionary &dict);
 
         //- Construct and return a copy
-        virtual autoPtr<tableReader<Type> > clone() const
+        virtual autoPtr<tableReader<Type>> clone() const
         {
-            return autoPtr<tableReader<Type> >
+            return autoPtr<tableReader<Type>>
             (
                 new openFoamTableReader<Type>
                 (
@@ -83,13 +83,13 @@ public:
     // Member functions
 
         //- Read the table
-        virtual void operator()(const fileName&, List<Tuple2<scalar, Type> > &);
+        virtual void operator()(const fileName&, List<Tuple2<scalar, Type>> &);
 
         //- Read 2D table
         virtual void operator()
         (
             const fileName&,
-            List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >&
+            List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>&
         );
 };
 
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "openFoamTableReader.C"
+    #include "openFoamTableReader.C"
 #endif
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
index cd27159ec6407c11449211d78a84f8cab5a3974f..3955291941e6c51053acb6acd5f27093fc0dbd15 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr<Foam::tableReader<Type> > Foam::tableReader<Type>::New
+Foam::autoPtr<Foam::tableReader<Type>> Foam::tableReader<Type>::New
 (
     const dictionary& spec
 )
@@ -53,7 +53,7 @@ Foam::autoPtr<Foam::tableReader<Type> > Foam::tableReader<Type>::New
             << exit(FatalError);
     }
 
-    return autoPtr<tableReader<Type> >(cstrIter()(spec));
+    return autoPtr<tableReader<Type>>(cstrIter()(spec));
 }
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H
index d68ea92e7dc11b6bbd37437c77eb1787be725ccd..53cb930af41937e3314545f13afbb006470327ed 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ public:
         tableReader(const dictionary& dict);
 
         //- Construct and return a clone
-        virtual autoPtr<tableReader<Type> > clone() const = 0;
+        virtual autoPtr<tableReader<Type>> clone() const = 0;
 
 
     // Selectors
@@ -100,14 +100,14 @@ public:
         virtual void operator()
         (
             const fileName&,
-            List<Tuple2<scalar, Type> >&
+            List<Tuple2<scalar, Type>>&
         ) = 0;
 
         //- Read the 2D table
         virtual void operator()
         (
             const fileName&,
-            List<Tuple2<scalar, List<Tuple2<scalar, Type> > > >&
+            List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>&
         ) = 0;
 
         //- Write additional information
@@ -122,7 +122,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "tableReader.C"
+    #include "tableReader.C"
 #endif
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C
index 7d7c8b3cd7fc2d58459bad689685b6d02a92534d..b2bea3a1588fe257ecbaea3af54d117a36d88c7b 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,8 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define defineTableReaderType(dataType)                                       \
-    defineNamedTemplateTypeNameAndDebug(tableReader<dataType >, 0);           \
+#define defineTableReaderType(dataType)                                        \
+    defineNamedTemplateTypeNameAndDebug(tableReader<dataType >, 0);            \
     defineTemplatedRunTimeSelectionTable(tableReader, dictionary, dataType);
 
 defineTableReaderType(scalar);
diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H
index 0ac15a7cab0e1589bf60c60a885e7f1833c8ebef..6ac5d98a6107ac0119c0e0237383c09e3a4acef9 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H
+++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,36 +35,36 @@ SourceFiles
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Only used internally
-#define makeTypeTableReadersTypeName(typeTableReader, dataType)               \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(typeTableReader< dataType >, 0)
+#define makeTypeTableReadersTypeName(typeTableReader, dataType)                \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(typeTableReader<dataType>, 0)
 
 // Sometimes used externally
-#define makeTableReadersTypeName(typeTableReader)                             \
-                                                                              \
-    makeTypeTableReadersTypeName(typeTableReader, scalar);                    \
-    makeTypeTableReadersTypeName(typeTableReader, vector);                    \
-    makeTypeTableReadersTypeName(typeTableReader, sphericalTensor);           \
-    makeTypeTableReadersTypeName(typeTableReader, symmTensor);                \
+#define makeTableReadersTypeName(typeTableReader)                              \
+                                                                               \
+    makeTypeTableReadersTypeName(typeTableReader, scalar);                     \
+    makeTypeTableReadersTypeName(typeTableReader, vector);                     \
+    makeTypeTableReadersTypeName(typeTableReader, sphericalTensor);            \
+    makeTypeTableReadersTypeName(typeTableReader, symmTensor);                 \
     makeTypeTableReadersTypeName(typeTableReader, tensor)
 
 // Define type info for single dataType template instantiation (eg, vector)
-#define makeTableReaderType(typeTableReader, dataType)                        \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(typeTableReader< dataType >, 0);      \
-    addTemplatedToRunTimeSelectionTable                                       \
-    (                                                                         \
-        tableReader, typeTableReader, dataType, dictionary                    \
+#define makeTableReaderType(typeTableReader, dataType)                         \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(typeTableReader<dataType>, 0);         \
+    addTemplatedToRunTimeSelectionTable                                        \
+    (                                                                          \
+        tableReader, typeTableReader, dataType, dictionary                     \
     )
 
 
 // Define type info for scalar, vector etc. instantiations
-#define makeTableReaders(typeTableReader)                                     \
-                                                                              \
-    makeTableReaderType(typeTableReader, scalar);                             \
-    makeTableReaderType(typeTableReader, vector);                             \
-    makeTableReaderType(typeTableReader, sphericalTensor);                    \
-    makeTableReaderType(typeTableReader, symmTensor);                         \
+#define makeTableReaders(typeTableReader)                                      \
+                                                                               \
+    makeTableReaderType(typeTableReader, scalar);                              \
+    makeTableReaderType(typeTableReader, vector);                              \
+    makeTableReaderType(typeTableReader, sphericalTensor);                     \
+    makeTableReaderType(typeTableReader, symmTensor);                          \
     makeTableReaderType(typeTableReader, tensor)
 
 
diff --git a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.H b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.H
index 36e34728356902bd958b4958660cf1e68973f34f..131cfeb93fec0f8b078e5d73c4baa0cd61c3aedc 100644
--- a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.H
+++ b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeights.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -149,7 +149,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationWeightsTemplates.C"
+    #include "interpolationWeightsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C
index 9050921b9e59214a2d8cce18205faa645e2f0368..1f2038cb913d2a5ecc13fd4b9e58dc65811173f7 100644
--- a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C
+++ b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,7 +65,7 @@ Foam::interpolationWeights::weightedSum
     }
     else
     {
-        return pTraits<returnType>::zero;
+        return Zero;
     }
 }
 
diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C
index 6f9f1e85954a6abda32be4b30761a6f8eee8e84f..87c18a3127da003ed24570e28b03a2301d8583ce 100644
--- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C
+++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,7 +80,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
         const typename FromPatch::FaceType& hitFace =
             fromPatchFaces[proj[pointI].hitObject()];
 
-        point hitPoint = point::zero;
+        point hitPoint = Zero;
 
         if (proj[pointI].hit())
         {
diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C
index b4242b23056e7affd27b373487779efcd4f71ec6..621e9a75746189a5e184f16903135fa24997c937 100644
--- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C
+++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,10 +33,9 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-//- Interpolate point field
 template<class FromPatch, class ToPatch>
 template<class Type>
-tmp<Field<Type> >
+tmp<Field<Type>>
 PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
 (
     const Field<Type>& pf
@@ -50,13 +49,9 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
             << abort(FatalError);
     }
 
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
-        new Field<Type>
-        (
-            toPatch_.nPoints(),
-            pTraits<Type>::zero
-        )
+        new Field<Type>(toPatch_.nPoints(), Zero)
     );
 
     Field<Type>& result = tresult();
@@ -90,22 +85,21 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
 
 template<class FromPatch, class ToPatch>
 template<class Type>
-tmp<Field<Type> >
+tmp<Field<Type>>
 PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
 (
-    const tmp<Field<Type> >& tpf
+    const tmp<Field<Type>>& tpf
 ) const
 {
-    tmp<Field<Type> > tint = pointInterpolate<Type>(tpf());
+    tmp<Field<Type>> tint = pointInterpolate<Type>(tpf());
     tpf.clear();
     return tint;
 }
 
 
-//- Interpolate face field
 template<class FromPatch, class ToPatch>
 template<class Type>
-tmp<Field<Type> >
+tmp<Field<Type>>
 PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate
 (
     const Field<Type>& ff
@@ -119,13 +113,9 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate
             << abort(FatalError);
     }
 
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
-        new Field<Type>
-        (
-            toPatch_.size(),
-            pTraits<Type>::zero
-        )
+        new Field<Type>(toPatch_.size(), Zero)
     );
 
     Field<Type>& result = tresult();
@@ -161,13 +151,13 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate
 
 template<class FromPatch, class ToPatch>
 template<class Type>
-tmp<Field<Type> >
+tmp<Field<Type>>
 PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate
 (
-    const tmp<Field<Type> >& tff
+    const tmp<Field<Type>>& tff
 ) const
 {
-    tmp<Field<Type> > tint = faceInterpolate(tff());
+    tmp<Field<Type>> tint = faceInterpolate(tff());
     tff.clear();
     return tint;
 }
diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C
index 2cc2a88c1042d14316f4fd95da6f2eaf44a6fdcf..3324e9af3cd9fe3beddcd21f13628fac651c486b 100644
--- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C
+++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,6 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class FromPatch, class ToPatch>
 PatchToPatchInterpolation<FromPatch, ToPatch>::PatchToPatchInterpolation
 (
@@ -182,7 +181,7 @@ bool PatchToPatchInterpolation<FromPatch, ToPatch>::movePoints()
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "CalcPatchToPatchWeights.C"
-#   include "PatchToPatchInterpolate.C"
+    #include "CalcPatchToPatchWeights.C"
+    #include "PatchToPatchInterpolate.C"
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.H b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.H
index b8b282fa826b3f492ba5de4aa42a34ab4342ddd6..9af12426f05e8980a9eed438b603660ca5a475b0 100644
--- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.H
+++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -208,17 +208,17 @@ public:
 
         //- Interpolate point field
         template<class Type>
-        tmp<Field<Type> > pointInterpolate(const Field<Type>& pf) const;
+        tmp<Field<Type>> pointInterpolate(const Field<Type>& pf) const;
 
         template<class Type>
-        tmp<Field<Type> > pointInterpolate(const tmp<Field<Type> >& tpf) const;
+        tmp<Field<Type>> pointInterpolate(const tmp<Field<Type>>& tpf) const;
 
         //- Interpolate face field
         template<class Type>
-        tmp<Field<Type> > faceInterpolate(const Field<Type>& pf) const;
+        tmp<Field<Type>> faceInterpolate(const Field<Type>& pf) const;
 
         template<class Type>
-        tmp<Field<Type> > faceInterpolate(const tmp<Field<Type> >& tpf) const;
+        tmp<Field<Type>> faceInterpolate(const tmp<Field<Type>>& tpf) const;
 
 };
 
@@ -228,7 +228,7 @@ public:
 } // End namespace Foam
 
 #ifdef NoRepository
-#   include "PatchToPatchInterpolation.C"
+    #include "PatchToPatchInterpolation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C
index bfd3b4a6d6ddb3e49bc6f353d88aa7458e69bd58..30c5ec1e70aee818b615d4bf345028e2285263ab 100644
--- a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C
+++ b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -170,7 +170,7 @@ PrimitivePatchInterpolation<Patch>::~PrimitivePatchInterpolation()
 
 template<class Patch>
 template<class Type>
-tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
+tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
 (
     const Field<Type>& ff
 ) const
@@ -184,15 +184,15 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
             << abort(FatalError);
     }
 
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
         new Field<Type>
         (
-            patch_.nPoints(), pTraits<Type>::zero
+            patch_.nPoints(), Zero
         )
     );
 
-    Field<Type>& result = tresult();
+    Field<Type>& result = tresult.ref();
 
     const labelListList& pointFaces = patch_.pointFaces();
     const scalarListList& weights = faceToPointWeights();
@@ -214,12 +214,12 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
 
 template<class Patch>
 template<class Type>
-tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
+tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
 (
-    const tmp<Field<Type> >& tff
+    const tmp<Field<Type>>& tff
 ) const
 {
-    tmp<Field<Type> > tint = faceToPointInterpolate(tff());
+    tmp<Field<Type>> tint = faceToPointInterpolate(tff());
     tff.clear();
     return tint;
 }
@@ -227,7 +227,7 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
 
 template<class Patch>
 template<class Type>
-tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
+tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
 (
     const Field<Type>& pf
 ) const
@@ -240,16 +240,16 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
             << abort(FatalError);
     }
 
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
         new Field<Type>
         (
             patch_.size(),
-            pTraits<Type>::zero
+            Zero
         )
     );
 
-    Field<Type>& result = tresult();
+    Field<Type>& result = tresult.ref();
 
     const List<typename Patch::FaceType>& localFaces = patch_.localFaces();
 
@@ -271,12 +271,12 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
 
 template<class Patch>
 template<class Type>
-tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
+tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
 (
-    const tmp<Field<Type> >& tpf
+    const tmp<Field<Type>>& tpf
 ) const
 {
-    tmp<Field<Type> > tint = pointToFaceInterpolate(tpf());
+    tmp<Field<Type>> tint = pointToFaceInterpolate(tpf());
     tpf.clear();
     return tint;
 }
@@ -284,7 +284,7 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
 
 template<class Patch>
 template<class Type>
-tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
+tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
 (
     const Field<Type>& pf
 ) const
@@ -298,12 +298,12 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
             << abort(FatalError);
     }
 
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
-        new Field<Type>(patch_.nEdges(), pTraits<Type>::zero)
+        new Field<Type>(patch_.nEdges(), Zero)
     );
 
-    Field<Type>& result = tresult();
+    Field<Type>& result = tresult.ref();
 
     const edgeList& edges = patch_.edges();
     const labelListList& edgeFaces = patch_.edgeFaces();
@@ -328,12 +328,12 @@ tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
 
 template<class Patch>
 template<class Type>
-tmp<Field<Type> > PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
+tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
 (
-    const tmp<Field<Type> >& tpf
+    const tmp<Field<Type>>& tpf
 ) const
 {
-    tmp<Field<Type> > tint = faceToEdgeInterpolate(tpf());
+    tmp<Field<Type>> tint = faceToEdgeInterpolate(tpf());
     tpf.clear();
     return tint;
 }
diff --git a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.H b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.H
index ee61e2e42ee8603ae01eab464a20654cabc8ecf0..f0663606c5f25c9b620974dcd433237f23e706c2 100644
--- a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.H
+++ b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,41 +107,41 @@ public:
 
         //- Interpolate from faces to points
         template<class Type>
-        tmp<Field<Type> > faceToPointInterpolate
+        tmp<Field<Type>> faceToPointInterpolate
         (
             const Field<Type>& ff
         ) const;
 
         template<class Type>
-        tmp<Field<Type> > faceToPointInterpolate
+        tmp<Field<Type>> faceToPointInterpolate
         (
-            const tmp<Field<Type> >& tff
+            const tmp<Field<Type>>& tff
         ) const;
 
         //- Interpolate from points to faces
         template<class Type>
-        tmp<Field<Type> > pointToFaceInterpolate
+        tmp<Field<Type>> pointToFaceInterpolate
         (
             const Field<Type>& pf
         ) const;
 
         template<class Type>
-        tmp<Field<Type> > pointToFaceInterpolate
+        tmp<Field<Type>> pointToFaceInterpolate
         (
-            const tmp<Field<Type> >& tpf
+            const tmp<Field<Type>>& tpf
         ) const;
 
         //- Interpolate from faces to edges
         template<class Type>
-        tmp<Field<Type> > faceToEdgeInterpolate
+        tmp<Field<Type>> faceToEdgeInterpolate
         (
             const Field<Type>& ff
         ) const;
 
         template<class Type>
-        tmp<Field<Type> > faceToEdgeInterpolate
+        tmp<Field<Type>> faceToEdgeInterpolate
         (
-            const tmp<Field<Type> >& tff
+            const tmp<Field<Type>>& tff
         ) const;
 
         //- Do what is neccessary if the mesh has moved
@@ -156,7 +156,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PrimitivePatchInterpolation.C"
+    #include "PrimitivePatchInterpolation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C
index d6bc7f7b71a29f939ba50dbdc382368f91e590e3..4345ed24069dddd5c95db2df053f18d396b23baa 100644
--- a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C
+++ b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,11 +38,11 @@ template<class Type>
 template<class Form>
 Foam::DiagonalMatrix<Type>::DiagonalMatrix(const Matrix<Form, Type>& a)
 :
-    List<Type>(min(a.n(), a.m()))
+    List<Type>(min(a.m(), a.n()))
 {
     forAll(*this, i)
     {
-        this->operator[](i) = a[i][i];
+        this->operator[](i) = a(i, i);
     }
 }
 
diff --git a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H
index a065b3aec3b2f5f0b6f970eed9363429e513f8bb..8fdf3e972a658d6d606ea8ef52ea4a5b88ec5c6f 100644
--- a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H
+++ b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ DiagonalMatrix<Type> inv(const DiagonalMatrix<Type>&);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DiagonalMatrix.C"
+    #include "DiagonalMatrix.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LLTMatrix/LLTMatrix.C b/src/OpenFOAM/matrices/LLTMatrix/LLTMatrix.C
new file mode 100644
index 0000000000000000000000000000000000000000..d0f828d4f3342a21d16916a30b1a958997a15759
--- /dev/null
+++ b/src/OpenFOAM/matrices/LLTMatrix/LLTMatrix.C
@@ -0,0 +1,149 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "LLTMatrix.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::LLTMatrix<Type>::LLTMatrix()
+{}
+
+
+template<class Type>
+Foam::LLTMatrix<Type>::LLTMatrix(const SquareMatrix<Type>& M)
+{
+    decompose(M);
+}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::LLTMatrix<Type>::decompose(const SquareMatrix<Type>& M)
+{
+    SquareMatrix<Type>& LLT = *this;
+
+    // Initialize the LLT decomposition matrix to M
+    LLT = M;
+
+    const label m = LLT.m();
+
+    for (label i=0; i<m; i++)
+    {
+        for (label j=0; j<m; j++)
+        {
+            if (j > i)
+            {
+                LLT(i, j) = Zero;
+                continue;
+            }
+
+            Type sum = LLT(i, j);
+
+            for (label k=0; k<j; k++)
+            {
+                sum -= LLT(i, k)*LLT(j, k);
+            }
+
+            if (i > j)
+            {
+                LLT(i, j) = sum/LLT(j, j);
+            }
+            else if (sum > 0)
+            {
+                LLT(i, i) = sqrt(sum);
+            }
+            else
+            {
+                FatalErrorInFunction
+                    << "Cholesky decomposition failed, "
+                       "matrix is not symmetric positive definite"
+                    << abort(FatalError);
+            }
+        }
+    }
+}
+
+
+template<class Type>
+void Foam::LLTMatrix<Type>::solve
+(
+    Field<Type>& x,
+    const Field<Type>& source
+) const
+{
+    // If x and source are different initialize x = source
+    if (&x != &source)
+    {
+        x = source;
+    }
+
+    const SquareMatrix<Type>& LLT = *this;
+    const label m = LLT.m();
+
+    for (label i=0; i<m; i++)
+    {
+        Type sum = source[i];
+
+        for (label j=0; j<i; j++)
+        {
+            sum = sum - LLT(i, j)*x[j];
+        }
+
+        x[i] = sum/LLT(i, i);
+    }
+
+    for (int i=m - 1; i >= 0; i--)
+    {
+        Type sum = x[i];
+
+        for (label j=i + 1; j<m; j++)
+        {
+            sum = sum - LLT(j, i)*x[j];
+        }
+
+        x[i] = sum/LLT(i, i);
+    }
+
+}
+
+
+template<class Type>
+Foam::tmp<Foam::Field<Type>> Foam::LLTMatrix<Type>::solve
+(
+    const Field<Type>& source
+) const
+{
+    tmp<Field<Type>> tx(new Field<Type>(this->m()));
+    Field<Type>& x = tx.ref();
+
+    solve(x, source);
+
+    return tx;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/LLTMatrix/LLTMatrix.H b/src/OpenFOAM/matrices/LLTMatrix/LLTMatrix.H
new file mode 100644
index 0000000000000000000000000000000000000000..fa60845fa7375e489cd6591fd501817715bb562a
--- /dev/null
+++ b/src/OpenFOAM/matrices/LLTMatrix/LLTMatrix.H
@@ -0,0 +1,101 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::LLTMatrix
+
+Description
+    Templated class to perform the Cholesky decomposition on a
+    symmetric positive-definite matrix.
+
+    Member functions are provided to solve linear systems using the LLT
+    decomposition.
+
+SourceFiles
+    LLTMatrix.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef LLTMatrix_H
+#define LLTMatrix_H
+
+#include "SquareMatrix.H"
+#include "Field.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class LLTMatrix Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class LLTMatrix
+:
+    public SquareMatrix<Type>
+{
+
+public:
+
+    // Constructors
+
+        //- Construct null
+        LLTMatrix();
+
+        //- Construct from a square matrix and perform the decomposition
+        LLTMatrix(const SquareMatrix<Type>& M);
+
+
+    // Member Functions
+
+        //- Perform the Cholesky decomposition of the matrix
+        void decompose(const SquareMatrix<Type>& M);
+
+        //- Solve the linear system with the given source
+        //  and returning the solution in the Field argument x.
+        //  This function may be called with the same field for x and source.
+        void solve(Field<Type>& x, const Field<Type>& source) const;
+
+        //- Solve the linear system with the given source
+        //  returning the solution
+        tmp<Field<Type>> solve(const Field<Type>& source) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "LLTMatrix.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C
index b5e37d441baadb8879f4c3d97d9d42451709a95f..ecff7ea54c66b7ebee95bc0e9b54bce106fbf3d1 100644
--- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C
+++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,11 +39,17 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
+Foam::LUscalarMatrix::LUscalarMatrix()
+:
+    comm_(Pstream::worldComm)
+{}
+
+
 Foam::LUscalarMatrix::LUscalarMatrix(const scalarSquareMatrix& matrix)
 :
     scalarSquareMatrix(matrix),
     comm_(Pstream::worldComm),
-    pivotIndices_(n())
+    pivotIndices_(m())
 {
     LUDecompose(*this, pivotIndices_);
 }
@@ -129,7 +135,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
                 nCells += lduMatrices[i].size();
             }
 
-            scalarSquareMatrix m(nCells, nCells, 0.0);
+            scalarSquareMatrix m(nCells, 0.0);
             transfer(m);
             convert(lduMatrices);
         }
@@ -137,20 +143,20 @@ Foam::LUscalarMatrix::LUscalarMatrix
     else
     {
         label nCells = ldum.lduAddr().size();
-        scalarSquareMatrix m(nCells, nCells, 0.0);
+        scalarSquareMatrix m(nCells, 0.0);
         transfer(m);
         convert(ldum, interfaceCoeffs, interfaces);
     }
 
     if (Pstream::master(comm_))
     {
-        label nRows = n();
-        label nColumns = m();
+        label mRows = m();
+        label nColumns = n();
 
         if (debug)
         {
-            Pout<< "LUscalarMatrix : size:" << nRows << endl;
-            for (label rowI = 0; rowI < nRows; rowI++)
+            Pout<< "LUscalarMatrix : size:" << mRows << endl;
+            for (label rowI = 0; rowI < mRows; rowI++)
             {
                 const scalar* row = operator[](rowI);
 
@@ -180,7 +186,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
             Pout<< endl;
         }
 
-        pivotIndices_.setSize(n());
+        pivotIndices_.setSize(m());
         LUDecompose(*this, pivotIndices_);
     }
 }
@@ -249,8 +255,6 @@ void Foam::LUscalarMatrix::convert
             }
         }
     }
-
-    //printDiagonalDominance();
 }
 
 
@@ -380,17 +384,15 @@ void Foam::LUscalarMatrix::convert
             }
         }
     }
-
-    //printDiagonalDominance();
 }
 
 
 void Foam::LUscalarMatrix::printDiagonalDominance() const
 {
-    for (label i=0; i<n(); i++)
+    for (label i=0; i<m(); i++)
     {
         scalar sum = 0.0;
-        for (label j=0; j<n(); j++)
+        for (label j=0; j<m(); j++)
         {
             if (i != j)
             {
@@ -402,4 +404,12 @@ void Foam::LUscalarMatrix::printDiagonalDominance() const
 }
 
 
+void Foam::LUscalarMatrix::decompose(const scalarSquareMatrix& M)
+{
+    scalarSquareMatrix::operator=(M);
+    pivotIndices_.setSize(m());
+    LUDecompose(*this, pivotIndices_);
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.H b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.H
index 9c96d8dd23c30d19858b62f77f4ac6edf0c87e50..0e0bc010136c400a6f6d8ae17cf5756e6b9016aa 100644
--- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.H
+++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,7 @@ Class
     Foam::LUscalarMatrix
 
 Description
-    Foam::LUscalarMatrix
+    Class to perform the LU decomposition on a symmetric matrix.
 
 SourceFiles
     LUscalarMatrix.C
@@ -67,6 +67,9 @@ class LUscalarMatrix
         //- The pivot indices used in the LU decomposition
         labelList pivotIndices_;
 
+
+    // Private member functions
+
         //- Convert the given lduMatrix into this LUscalarMatrix
         void convert
         (
@@ -90,10 +93,14 @@ public:
     // Declare name of the class and its debug switch
     ClassName("LUscalarMatrix");
 
+
     // Constructors
 
-        //- Construct from scalarSquareMatrix and perform LU decomposition
-        LUscalarMatrix(const scalarSquareMatrix&);
+        //- Construct null
+        LUscalarMatrix();
+
+        //- Construct from and perform LU decomposition of the matrix M
+        LUscalarMatrix(const scalarSquareMatrix& M);
 
         //- Construct from lduMatrix and perform LU decomposition
         LUscalarMatrix
@@ -106,10 +113,19 @@ public:
 
     // Member Functions
 
-        //- Solve the matrix using the LU decomposition with pivoting
-        //  returning the solution in the source
-        template<class T>
-        void solve(Field<T>& source) const;
+        //- Perform the LU decomposition of the matrix M
+        void decompose(const scalarSquareMatrix& M);
+
+        //- Solve the linear system with the given source
+        //  and returning the solution in the Field argument x.
+        //  This function may be called with the same field for x and source.
+        template<class Type>
+        void solve(Field<Type>& x, const Field<Type>& source) const;
+
+        //- Solve the linear system with the given source
+        //  returning the solution
+        template<class Type>
+        tmp<Field<Type>> solve(const Field<Type>& source) const;
 };
 
 
@@ -120,7 +136,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LUscalarMatrixTemplates.C"
+    #include "LUscalarMatrixTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C
index 8948d37675089671a2343cddd6f0074ad5308888..432c39917c6f0f58aabd3e8a4e33cdbe8f00f40b 100644
--- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C
+++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrixTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,23 +24,34 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "LUscalarMatrix.H"
+#include "SubField.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
+void Foam::LUscalarMatrix::solve
+(
+    Field<Type>& x,
+    const Field<Type>& source
+) const
 {
+    // If x and source are different initialize x = source
+    if (&x != &source)
+    {
+        x = source;
+    }
+
     if (Pstream::parRun())
     {
-        Field<Type> completeSourceSol(n());
+        Field<Type> X(m());
 
         if (Pstream::master(comm_))
         {
             typename Field<Type>::subField
             (
-                completeSourceSol,
-                sourceSol.size()
-            ).assign(sourceSol);
+                X,
+                x.size()
+            ) = x;
 
             for
             (
@@ -55,7 +66,7 @@ void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
                     slave,
                     reinterpret_cast<char*>
                     (
-                        &(completeSourceSol[procOffsets_[slave]])
+                        &(X[procOffsets_[slave]])
                     ),
                     (procOffsets_[slave+1]-procOffsets_[slave])*sizeof(Type),
                     Pstream::msgType(),
@@ -69,8 +80,8 @@ void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
             (
                 Pstream::scheduled,
                 Pstream::masterNo(),
-                reinterpret_cast<const char*>(sourceSol.begin()),
-                sourceSol.byteSize(),
+                reinterpret_cast<const char*>(x.begin()),
+                x.byteSize(),
                 Pstream::msgType(),
                 comm_
             );
@@ -78,12 +89,12 @@ void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
 
         if (Pstream::master(comm_))
         {
-            LUBacksubstitute(*this, pivotIndices_, completeSourceSol);
+            LUBacksubstitute(*this, pivotIndices_, X);
 
-            sourceSol = typename Field<Type>::subField
+            x = typename Field<Type>::subField
             (
-                completeSourceSol,
-                sourceSol.size()
+                X,
+                x.size()
             );
 
             for
@@ -99,7 +110,7 @@ void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
                     slave,
                     reinterpret_cast<const char*>
                     (
-                        &(completeSourceSol[procOffsets_[slave]])
+                        &(X[procOffsets_[slave]])
                     ),
                     (procOffsets_[slave + 1]-procOffsets_[slave])*sizeof(Type),
                     Pstream::msgType(),
@@ -113,8 +124,8 @@ void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
             (
                 Pstream::scheduled,
                 Pstream::masterNo(),
-                reinterpret_cast<char*>(sourceSol.begin()),
-                sourceSol.byteSize(),
+                reinterpret_cast<char*>(x.begin()),
+                x.byteSize(),
                 Pstream::msgType(),
                 comm_
             );
@@ -122,9 +133,24 @@ void Foam::LUscalarMatrix::solve(Field<Type>& sourceSol) const
     }
     else
     {
-        LUBacksubstitute(*this, pivotIndices_, sourceSol);
+        LUBacksubstitute(*this, pivotIndices_, x);
     }
 }
 
 
+template<class Type>
+Foam::tmp<Foam::Field<Type>> Foam::LUscalarMatrix::solve
+(
+    const Field<Type>& source
+) const
+{
+    tmp<Field<Type>> tx(new Field<Type>(m()));
+    Field<Type>& x = tx.ref();
+
+    solve(x, source);
+
+    return tx;
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceField.H b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceField.H
index aa21af6b4302b563ba5588614f90e2500845b953..289649f2a9c40b2f26c622edfd79b007efe330c1 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceField.H
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LduInterfaceField.C"
+    #include "LduInterfaceField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceFieldPtrsList.H b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceFieldPtrsList.H
index b669a565d90b62c5b24ba9f3127f3c9df8744724..82761182825a4943e10a49317ffb49f61f3823c6 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceFieldPtrsList.H
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduInterfaceField/LduInterfaceFieldPtrsList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,13 +47,13 @@ namespace Foam
 template<class Type>
 class LduInterfaceFieldPtrsList
 :
-    public UPtrList<const LduInterfaceField<Type> >
+    public UPtrList<const LduInterfaceField<Type>>
 {
 public:
 
     LduInterfaceFieldPtrsList(label size)
     :
-        UPtrList<const LduInterfaceField<Type> >(size)
+        UPtrList<const LduInterfaceField<Type>>(size)
     {}
 };
 
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C
index 8c3d6a79c2a84074a87bc38b21736301c8f90ab8..a36b31137bf48950b6872e6e2044e5e900f19935 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ Foam::LduMatrix<Type, DType, LUType>::LduMatrix(const LduMatrix& A)
 
 
 template<class Type, class DType, class LUType>
-Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reUse)
+Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reuse)
 :
     lduMesh_(A.lduMesh_),
     diagPtr_(NULL),
@@ -88,7 +88,7 @@ Foam::LduMatrix<Type, DType, LUType>::LduMatrix(LduMatrix& A, bool reUse)
     interfacesUpper_(0),
     interfacesLower_(0)
 {
-    if (reUse)
+    if (reuse)
     {
         if (A.diagPtr_)
         {
@@ -191,7 +191,7 @@ Foam::Field<DType>& Foam::LduMatrix<Type, DType, LUType>::diag()
 {
     if (!diagPtr_)
     {
-        diagPtr_ = new Field<DType>(lduAddr().size(), pTraits<DType>::zero);
+        diagPtr_ = new Field<DType>(lduAddr().size(), Zero);
     }
 
     return *diagPtr_;
@@ -212,7 +212,7 @@ Foam::Field<LUType>& Foam::LduMatrix<Type, DType, LUType>::upper()
             upperPtr_ = new Field<LUType>
             (
                 lduAddr().lowerAddr().size(),
-                pTraits<LUType>::zero
+                Zero
             );
         }
     }
@@ -235,7 +235,7 @@ Foam::Field<LUType>& Foam::LduMatrix<Type, DType, LUType>::lower()
             lowerPtr_ = new Field<LUType>
             (
                 lduAddr().lowerAddr().size(),
-                pTraits<LUType>::zero
+                Zero
             );
         }
     }
@@ -249,7 +249,7 @@ Foam::Field<Type>& Foam::LduMatrix<Type, DType, LUType>::source()
 {
     if (!sourcePtr_)
     {
-        sourcePtr_ = new Field<Type>(lduAddr().size(), pTraits<Type>::zero);
+        sourcePtr_ = new Field<Type>(lduAddr().size(), Zero);
     }
 
     return *sourcePtr_;
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H
index d00069911d7ef699f60ce11698f6027ecf14787b..1da27f106b6fd6a7964403ae49e5b4cb16c2861c 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -470,7 +470,7 @@ public:
         LduMatrix(const LduMatrix<Type, DType, LUType>&);
 
         //- Construct as copy or re-use as specified.
-        LduMatrix(LduMatrix<Type, DType, LUType>&, bool reUse);
+        LduMatrix(LduMatrix<Type, DType, LUType>&, bool reuse);
 
         //- Construct given an LDU addressed mesh and an Istream
         //  from which the coefficients are read
@@ -595,10 +595,10 @@ public:
             void sumMagOffDiag(Field<LUType>& sumOff) const;
 
             //- Matrix multiplication
-            void Amul(Field<Type>&, const tmp<Field<Type> >&) const;
+            void Amul(Field<Type>&, const tmp<Field<Type>>&) const;
 
             //- Matrix transpose multiplication
-            void Tmul(Field<Type>&, const tmp<Field<Type> >&) const;
+            void Tmul(Field<Type>&, const tmp<Field<Type>>&) const;
 
 
             //- Sum the coefficients on each row of the matrix
@@ -607,7 +607,7 @@ public:
 
             void residual(Field<Type>& rA, const Field<Type>& psi) const;
 
-            tmp<Field<Type> > residual(const Field<Type>& psi) const;
+            tmp<Field<Type>> residual(const Field<Type>& psi) const;
 
 
             //- Initialise the update of interfaced interfaces
@@ -628,11 +628,11 @@ public:
             ) const;
 
 
-            tmp<Field<Type> > H(const Field<Type>&) const;
-            tmp<Field<Type> > H(const tmp<Field<Type> >&) const;
+            tmp<Field<Type>> H(const Field<Type>&) const;
+            tmp<Field<Type>> H(const tmp<Field<Type>>&) const;
 
-            tmp<Field<Type> > faceH(const Field<Type>&) const;
-            tmp<Field<Type> > faceH(const tmp<Field<Type> >&) const;
+            tmp<Field<Type>> faceH(const Field<Type>&) const;
+            tmp<Field<Type>> faceH(const tmp<Field<Type>>&) const;
 
 
     // Member operators
@@ -664,138 +664,138 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeLduMatrix(Type, DType, LUType)                                    \
-                                                                              \
-typedef Foam::LduMatrix<Type, DType, LUType>                                  \
-    ldu##Type##DType##LUType##Matrix;                                         \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(ldu##Type##DType##LUType##Matrix, 0);     \
-                                                                              \
-                                                                              \
-typedef LduMatrix<Type, DType, LUType>::smoother                              \
-    ldu##Type##DType##LUType##Smoother;                                       \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    ldu##Type##DType##LUType##Smoother,                                       \
-    symMatrix                                                                 \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    ldu##Type##DType##LUType##Smoother,                                       \
-    asymMatrix                                                                \
-);                                                                            \
-                                                                              \
-                                                                              \
-typedef LduMatrix<Type, DType, LUType>::preconditioner                        \
-    ldu##Type##DType##LUType##Preconditioner;                                 \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    ldu##Type##DType##LUType##Preconditioner,                                 \
-    symMatrix                                                                 \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    ldu##Type##DType##LUType##Preconditioner,                                 \
-    asymMatrix                                                                \
-);                                                                            \
-                                                                              \
-                                                                              \
-typedef LduMatrix<Type, DType, LUType>::solver                                \
-    ldu##Type##DType##LUType##Solver;                                         \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    ldu##Type##DType##LUType##Solver,                                         \
-    symMatrix                                                                 \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    ldu##Type##DType##LUType##Solver,                                         \
-    asymMatrix                                                                \
+#define makeLduMatrix(Type, DType, LUType)                                     \
+                                                                               \
+typedef Foam::LduMatrix<Type, DType, LUType>                                   \
+    ldu##Type##DType##LUType##Matrix;                                          \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(ldu##Type##DType##LUType##Matrix, 0);      \
+                                                                               \
+                                                                               \
+typedef LduMatrix<Type, DType, LUType>::smoother                               \
+    ldu##Type##DType##LUType##Smoother;                                        \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    ldu##Type##DType##LUType##Smoother,                                        \
+    symMatrix                                                                  \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    ldu##Type##DType##LUType##Smoother,                                        \
+    asymMatrix                                                                 \
+);                                                                             \
+                                                                               \
+                                                                               \
+typedef LduMatrix<Type, DType, LUType>::preconditioner                         \
+    ldu##Type##DType##LUType##Preconditioner;                                  \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    ldu##Type##DType##LUType##Preconditioner,                                  \
+    symMatrix                                                                  \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    ldu##Type##DType##LUType##Preconditioner,                                  \
+    asymMatrix                                                                 \
+);                                                                             \
+                                                                               \
+                                                                               \
+typedef LduMatrix<Type, DType, LUType>::solver                                 \
+    ldu##Type##DType##LUType##Solver;                                          \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    ldu##Type##DType##LUType##Solver,                                          \
+    symMatrix                                                                  \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    ldu##Type##DType##LUType##Solver,                                          \
+    asymMatrix                                                                 \
 );
 
 
-#define makeLduPreconditioner(Precon, Type, DType, LUType)                    \
-                                                                              \
-typedef Precon<Type, DType, LUType>                                           \
-    Precon##Type##DType##LUType##Preconditioner;                              \
-defineNamedTemplateTypeNameAndDebug                                           \
-(                                                                             \
-    Precon##Type##DType##LUType##Preconditioner,                              \
-    0                                                                         \
+#define makeLduPreconditioner(Precon, Type, DType, LUType)                     \
+                                                                               \
+typedef Precon<Type, DType, LUType>                                            \
+    Precon##Type##DType##LUType##Preconditioner;                               \
+defineNamedTemplateTypeNameAndDebug                                            \
+(                                                                              \
+    Precon##Type##DType##LUType##Preconditioner,                               \
+    0                                                                          \
 );
 
-#define makeLduSymPreconditioner(Precon, Type, DType, LUType)                 \
-                                                                              \
-LduMatrix<Type, DType, LUType>::preconditioner::                              \
-addsymMatrixConstructorToTable<Precon##Type##DType##LUType##Preconditioner>   \
+#define makeLduSymPreconditioner(Precon, Type, DType, LUType)                  \
+                                                                               \
+LduMatrix<Type, DType, LUType>::preconditioner::                               \
+addsymMatrixConstructorToTable<Precon##Type##DType##LUType##Preconditioner>    \
 add##Precon##Type##DType##LUType##PreconditionerSymMatrixConstructorToTable_;
 
-#define makeLduAsymPreconditioner(Precon, Type, DType, LUType)                \
-                                                                              \
-LduMatrix<Type, DType, LUType>::preconditioner::                              \
-addasymMatrixConstructorToTable<Precon##Type##DType##LUType##Preconditioner>  \
+#define makeLduAsymPreconditioner(Precon, Type, DType, LUType)                 \
+                                                                               \
+LduMatrix<Type, DType, LUType>::preconditioner::                               \
+addasymMatrixConstructorToTable<Precon##Type##DType##LUType##Preconditioner>   \
 add##Precon##Type##DType##LUType##PreconditionerAsymMatrixConstructorToTable_;
 
 
-#define makeLduSmoother(Smoother, Type, DType, LUType)                        \
-                                                                              \
-typedef Smoother<Type, DType, LUType>                                         \
-    Smoother##Type##DType##LUType##Smoother;                                  \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug                                           \
-(                                                                             \
-    Smoother##Type##DType##LUType##Smoother,                                  \
-    0                                                                         \
+#define makeLduSmoother(Smoother, Type, DType, LUType)                         \
+                                                                               \
+typedef Smoother<Type, DType, LUType>                                          \
+    Smoother##Type##DType##LUType##Smoother;                                   \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug                                            \
+(                                                                              \
+    Smoother##Type##DType##LUType##Smoother,                                   \
+    0                                                                          \
 );
 
-#define makeLduSymSmoother(Smoother, Type, DType, LUType)                     \
-                                                                              \
-LduMatrix<Type, DType, LUType>::smoother::                                    \
-    addsymMatrixConstructorToTable<Smoother##Type##DType##LUType##Smoother>   \
+#define makeLduSymSmoother(Smoother, Type, DType, LUType)                      \
+                                                                               \
+LduMatrix<Type, DType, LUType>::smoother::                                     \
+    addsymMatrixConstructorToTable<Smoother##Type##DType##LUType##Smoother>    \
     add##Smoother##Type##DType##LUType##SymMatrixConstructorToTable_;
 
-#define makeLduAsymSmoother(Smoother, Type, DType, LUType)                    \
-                                                                              \
-LduMatrix<Type, DType, LUType>::smoother::                                    \
-    addasymMatrixConstructorToTable<Smoother##Type##DType##LUType##Smoother>  \
+#define makeLduAsymSmoother(Smoother, Type, DType, LUType)                     \
+                                                                               \
+LduMatrix<Type, DType, LUType>::smoother::                                     \
+    addasymMatrixConstructorToTable<Smoother##Type##DType##LUType##Smoother>   \
     add##Smoother##Type##DType##LUType##AsymMatrixConstructorToTable_;
 
 
-#define makeLduSolver(Solver, Type, DType, LUType)                            \
-                                                                              \
-typedef Solver<Type, DType, LUType>                                           \
-    Solver##Type##DType##LUType##Solver;                                      \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug                                           \
-(                                                                             \
-    Solver##Type##DType##LUType##Solver,                                      \
-    0                                                                         \
+#define makeLduSolver(Solver, Type, DType, LUType)                             \
+                                                                               \
+typedef Solver<Type, DType, LUType>                                            \
+    Solver##Type##DType##LUType##Solver;                                       \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug                                            \
+(                                                                              \
+    Solver##Type##DType##LUType##Solver,                                       \
+    0                                                                          \
 );
 
-#define makeLduSymSolver(Solver, Type, DType, LUType)                         \
-                                                                              \
-LduMatrix<Type, DType, LUType>::solver::                                      \
-    addsymMatrixConstructorToTable<Solver##Type##DType##LUType##Solver>       \
+#define makeLduSymSolver(Solver, Type, DType, LUType)                          \
+                                                                               \
+LduMatrix<Type, DType, LUType>::solver::                                       \
+    addsymMatrixConstructorToTable<Solver##Type##DType##LUType##Solver>        \
     add##Solver##Type##DType##LUType##SymMatrixConstructorToTable_;
 
-#define makeLduAsymSolver(Solver, Type, DType, LUType)                        \
-                                                                              \
-LduMatrix<Type, DType, LUType>::solver::                                      \
-    addasymMatrixConstructorToTable<Solver##Type##DType##LUType##Solver>      \
+#define makeLduAsymSolver(Solver, Type, DType, LUType)                         \
+                                                                               \
+LduMatrix<Type, DType, LUType>::solver::                                       \
+    addasymMatrixConstructorToTable<Solver##Type##DType##LUType##Solver>       \
     add##Solver##Type##DType##LUType##AsymMatrixConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LduMatrixI.H"
-#   include "LduMatrix.C"
+    #include "LduMatrixI.H"
+    #include "LduMatrix.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C
index 805b133a3b3ec5508c847996e0342443ba11a468..4c06f84e21d6ad8296fb35c118dde7b3e7769ebe 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ template<class Type, class DType, class LUType>
 void Foam::LduMatrix<Type, DType, LUType>::Amul
 (
     Field<Type>& Apsi,
-    const tmp<Field<Type> >& tpsi
+    const tmp<Field<Type>>& tpsi
 ) const
 {
     Type* __restrict__ ApsiPtr = Apsi.begin();
@@ -117,7 +117,7 @@ template<class Type, class DType, class LUType>
 void Foam::LduMatrix<Type, DType, LUType>::Tmul
 (
     Field<Type>& Tpsi,
-    const tmp<Field<Type> >& tpsi
+    const tmp<Field<Type>>& tpsi
 ) const
 {
     Type* __restrict__ TpsiPtr = Tpsi.begin();
@@ -280,13 +280,13 @@ void Foam::LduMatrix<Type, DType, LUType>::residual
 
 
 template<class Type, class DType, class LUType>
-Foam::tmp<Foam::Field<Type> > Foam::LduMatrix<Type, DType, LUType>::residual
+Foam::tmp<Foam::Field<Type>> Foam::LduMatrix<Type, DType, LUType>::residual
 (
     const Field<Type>& psi
 ) const
 {
-    tmp<Field<Type> > trA(new Field<Type>(psi.size()));
-    residual(trA(), psi);
+    tmp<Field<Type>> trA(new Field<Type>(psi.size()));
+    residual(trA.ref(), psi);
     return trA;
 }
 
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C
index 3685bbe20d2f8c8cc83a1803dcd611787be0f5c7..8715b36752f67ec27b0c84d69647d650c16fa91f 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,12 +84,12 @@ void Foam::LduMatrix<Type, DType, LUType>::sumMagOffDiag
 
 
 template<class Type, class DType, class LUType>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::LduMatrix<Type, DType, LUType>::H(const Field<Type>& psi) const
 {
-    tmp<Field<Type> > tHpsi
+    tmp<Field<Type>> tHpsi
     (
-        new Field<Type>(lduAddr().size(), pTraits<Type>::zero)
+        new Field<Type>(lduAddr().size(), Zero)
     );
 
     if (lowerPtr_ || upperPtr_)
@@ -119,17 +119,17 @@ Foam::LduMatrix<Type, DType, LUType>::H(const Field<Type>& psi) const
 }
 
 template<class Type, class DType, class LUType>
-Foam::tmp<Foam::Field<Type> >
-Foam::LduMatrix<Type, DType, LUType>::H(const tmp<Field<Type> >& tpsi) const
+Foam::tmp<Foam::Field<Type>>
+Foam::LduMatrix<Type, DType, LUType>::H(const tmp<Field<Type>>& tpsi) const
 {
-    tmp<Field<Type> > tHpsi(H(tpsi()));
+    tmp<Field<Type>> tHpsi(H(tpsi()));
     tpsi.clear();
     return tHpsi;
 }
 
 
 template<class Type, class DType, class LUType>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::LduMatrix<Type, DType, LUType>::faceH(const Field<Type>& psi) const
 {
     const Field<LUType>& Lower = const_cast<const LduMatrix&>(*this).lower();
@@ -139,7 +139,7 @@ Foam::LduMatrix<Type, DType, LUType>::faceH(const Field<Type>& psi) const
     const unallocLabelList& l = lduAddr().lowerAddr();
     const unallocLabelList& u = lduAddr().upperAddr();
 
-    tmp<Field<Type> > tfaceHpsi(new Field<Type> (Lower.size()));
+    tmp<Field<Type>> tfaceHpsi(new Field<Type> (Lower.size()));
     Field<Type> & faceHpsi = tfaceHpsi();
 
     for (label face=0; face<l.size(); face++)
@@ -152,10 +152,10 @@ Foam::LduMatrix<Type, DType, LUType>::faceH(const Field<Type>& psi) const
 
 
 template<class Type, class DType, class LUType>
-Foam::tmp<Foam::Field<Type> >
-Foam::LduMatrix<Type, DType, LUType>::faceH(const tmp<Field<Type> >& tpsi) const
+Foam::tmp<Foam::Field<Type>>
+Foam::LduMatrix<Type, DType, LUType>::faceH(const tmp<Field<Type>>& tpsi) const
 {
-    tmp<Field<Type> > tfaceHpsi(faceH(tpsi()));
+    tmp<Field<Type>> tfaceHpsi(faceH(tpsi()));
     tpsi.clear();
     return tfaceHpsi;
 }
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C
index 8aed474b36a8d6e9ac9022d3605f2f3c60079979..157db46d7b99c506c34d04dd6cf622cb0d6f1893 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::solver
     maxIter_(1000),
     minIter_(0),
     tolerance_(1e-6*pTraits<Type>::one),
-    relTol_(pTraits<Type>::zero)
+    relTol_(Zero)
 {
     readControls();
 }
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C
index b068e47481570b54bcf6116e2b9dba8cb4d6098f..89c3f797eed1ffe1423c8c2add30f99563b9314c 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
      || Pstream::defaultCommsType == Pstream::nonBlocking
     )
     {
-        forAll (interfaces_, interfaceI)
+        forAll(interfaces_, interfaceI)
         {
             if (interfaces_.set(interfaceI))
             {
@@ -114,7 +114,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
             OPstream::waitRequests();
         }
 
-        forAll (interfaces_, interfaceI)
+        forAll(interfaces_, interfaceI)
         {
             if (interfaces_.set(interfaceI))
             {
@@ -134,7 +134,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
         const lduSchedule& patchSchedule = this->patchSchedule();
 
         // Loop over all the "normal" interfaces relating to standard patches
-        forAll (patchSchedule, i)
+        forAll(patchSchedule, i)
         {
             label interfaceI = patchSchedule[i].patch;
 
diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H
index c24fc9c793b2694e9a669ee4fa359b760d02a5c2..3c5d5ae9120319e1ab37c9a2ec4f1185669f4be3 100644
--- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H
+++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,8 +110,8 @@ public:
 
         SolverPerformance()
         :
-            initialResidual_(pTraits<Type>::zero),
-            finalResidual_(pTraits<Type>::zero),
+            initialResidual_(Zero),
+            finalResidual_(Zero),
             noIterations_(0),
             converged_(false),
             singular_(false)
@@ -122,8 +122,8 @@ public:
         (
             const word&  solverName,
             const word&  fieldName,
-            const Type&  iRes = pTraits<Type>::zero,
-            const Type&  fRes = pTraits<Type>::zero,
+            const Type&  iRes = Type(Zero),
+            const Type&  fRes = Type(Zero),
             const label  nIter = 0,
             const bool   converged = false,
             const bool   singular = false
@@ -271,27 +271,27 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSolverPerformance(Type)                                           \
-                                                                              \
-typedef Foam::SolverPerformance<Type>                                         \
-    solverPerformance##Type;                                                  \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(solverPerformance##Type, 0);              \
-                                                                              \
-template<>                                                                    \
-const scalar solverPerformance##Type::great_(1e20);                           \
-                                                                              \
-template<>                                                                    \
-const scalar solverPerformance##Type::small_(1e-20);                          \
-                                                                              \
-template<>                                                                    \
-const scalar solverPerformance##Type::vsmall_(VSMALL);                        \
+#define makeSolverPerformance(Type)                                            \
+                                                                               \
+typedef Foam::SolverPerformance<Type>                                          \
+    solverPerformance##Type;                                                   \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(solverPerformance##Type, 0);               \
+                                                                               \
+template<>                                                                     \
+const scalar solverPerformance##Type::great_(1e20);                            \
+                                                                               \
+template<>                                                                     \
+const scalar solverPerformance##Type::small_(1e-20);                           \
+                                                                               \
+template<>                                                                     \
+const scalar solverPerformance##Type::vsmall_(VSMALL);                         \
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SolverPerformance.C"
+    #include "SolverPerformance.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DILUPreconditioner/TDILUPreconditioner.H b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DILUPreconditioner/TDILUPreconditioner.H
index da46f8185813c0c3a0fcfae4641688effea45ec0..075f2087a6087937ee2758591663abdea6575b1c 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DILUPreconditioner/TDILUPreconditioner.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DILUPreconditioner/TDILUPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TDILUPreconditioner.C"
+    #include "TDILUPreconditioner.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.H b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.H
index 93eca754e0846637c8e564e853e1f6ddf30fed11..f35342aa8b9808f415d6e0dccaf7092d31a514b3 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DiagonalPreconditioner.C"
+    #include "DiagonalPreconditioner.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.H b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.H
index bf8b10d24b03dda4faa925b964484939c91d6dfb..856b4673f9724fe71a1a4cbc1022b05df635c733 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,7 +115,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoPreconditioner.C"
+    #include "NoPreconditioner.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/lduPreconditioners.C b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/lduPreconditioners.C
index 95f1483658ea502afa8cda23a20c870d98ab72f1..ace13865b712871a5c53ef3d761226a01b7853cd 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/lduPreconditioners.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/lduPreconditioners.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,17 +28,17 @@ License
 #include "TDILUPreconditioner.H"
 #include "fieldTypes.H"
 
-#define makeLduPreconditioners(Type, DType, LUType)                           \
-                                                                              \
-    makeLduPreconditioner(NoPreconditioner, Type, DType, LUType);             \
-    makeLduSymPreconditioner(NoPreconditioner, Type, DType, LUType);          \
-    makeLduAsymPreconditioner(NoPreconditioner, Type, DType, LUType);         \
-                                                                              \
-    makeLduPreconditioner(DiagonalPreconditioner, Type, DType, LUType);       \
-    makeLduSymPreconditioner(DiagonalPreconditioner, Type, DType, LUType);    \
-    makeLduAsymPreconditioner(DiagonalPreconditioner, Type, DType, LUType);   \
-                                                                              \
-    makeLduPreconditioner(TDILUPreconditioner, Type, DType, LUType);          \
+#define makeLduPreconditioners(Type, DType, LUType)                            \
+                                                                               \
+    makeLduPreconditioner(NoPreconditioner, Type, DType, LUType);              \
+    makeLduSymPreconditioner(NoPreconditioner, Type, DType, LUType);           \
+    makeLduAsymPreconditioner(NoPreconditioner, Type, DType, LUType);          \
+                                                                               \
+    makeLduPreconditioner(DiagonalPreconditioner, Type, DType, LUType);        \
+    makeLduSymPreconditioner(DiagonalPreconditioner, Type, DType, LUType);     \
+    makeLduAsymPreconditioner(DiagonalPreconditioner, Type, DType, LUType);    \
+                                                                               \
+    makeLduPreconditioner(TDILUPreconditioner, Type, DType, LUType);           \
     makeLduAsymPreconditioner(TDILUPreconditioner, Type, DType, LUType);
 
 namespace Foam
diff --git a/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.H b/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.H
index 2627592989ac3c5464056f836a74e3f586da56fc..839aff7a1ec15847930db1a63c3bb8d4bfc55fdc 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TGaussSeidelSmoother.C"
+    #include "TGaussSeidelSmoother.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Smoothers/lduSmoothers.C b/src/OpenFOAM/matrices/LduMatrix/Smoothers/lduSmoothers.C
index c40b0673f8c2e20f8a7978b6d39f741975b083c3..8ff1d4f65c02d7b44f2ca6c1833bee9dc483a2cc 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Smoothers/lduSmoothers.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Smoothers/lduSmoothers.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,10 +26,10 @@ License
 #include "TGaussSeidelSmoother.H"
 #include "fieldTypes.H"
 
-#define makeLduSmoothers(Type, DType, LUType)                                 \
-                                                                              \
-    makeLduSmoother(TGaussSeidelSmoother, Type, DType, LUType);               \
-    makeLduSymSmoother(TGaussSeidelSmoother, Type, DType, LUType);            \
+#define makeLduSmoothers(Type, DType, LUType)                                  \
+                                                                               \
+    makeLduSmoother(TGaussSeidelSmoother, Type, DType, LUType);                \
+    makeLduSymSmoother(TGaussSeidelSmoother, Type, DType, LUType);             \
     makeLduAsymSmoother(TGaussSeidelSmoother, Type, DType, LUType);
 
 namespace Foam
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C
index adbe9113a271c750af850a9443baf3190840d232..4c1cf19a2653a929cc85a87db18e4610f594fa5a 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,8 +67,8 @@ Foam::DiagonalSolver<Type, DType, LUType>::solve
     (
         typeName,
         this->fieldName_,
-        pTraits<Type>::zero,
-        pTraits<Type>::zero,
+        Zero,
+        Zero,
         0,
         true,
         false
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.H b/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.H
index b9dc537c08afaf1ea2a771046842f84dc776aa56..cd771ed8bac8f62ab94ffb74565c09328e3a4b7e 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DiagonalSolver.C"
+    #include "DiagonalSolver.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C
index b770bdf21fad4531598e06c35675ee441bec0809..11f7d52aa748309ff6a93950ca97e0d60a461cc0 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
     Field<Type> pA(nCells);
     Type* __restrict__ pAPtr = pA.begin();
 
-    Field<Type> pT(nCells, pTraits<Type>::zero);
+    Field<Type> pT(nCells, Zero);
     Type* __restrict__ pTPtr = pT.begin();
 
     Field<Type> wA(nCells);
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.H b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.H
index 39c0e56d44768d12e13879c872c6a97035db9fe9..7ebf51669abe8aba79bf770987d29613c0475bc3 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PBiCCCG.C"
+    #include "PBiCCCG.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C
index 3043a016737b383c9e2635fe7a421cf621c084a4..860765e4c1966b530b9d2c4003324f0bdc23ab38 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,7 @@ Foam::PBiCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
     Field<Type> pA(nCells);
     Type* __restrict__ pAPtr = pA.begin();
 
-    Field<Type> pT(nCells, pTraits<Type>::zero);
+    Field<Type> pT(nCells, Zero);
     Type* __restrict__ pTPtr = pT.begin();
 
     Field<Type> wA(nCells);
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.H b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.H
index 1265af2aac4b6197e9c7e2d7d0038ccb846a4a5a..6c848f418ade6770d19b682cd139bb2dfe019089 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PBiCICG.C"
+    #include "PBiCICG.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PCICG/PCICG.H b/src/OpenFOAM/matrices/LduMatrix/Solvers/PCICG/PCICG.H
index cafeb7f61d3a79ae55861e4dea79b68942f83c38..56764df9337ec55a9f04abea85a438e366f5e4f1 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PCICG/PCICG.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PCICG/PCICG.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PCICG.C"
+    #include "PCICG.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C
index 5dea9207d6c6fa619f609e154544f67485bec5df..76d3b4369ec471015a19753c5cbeecc525e66cdb 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ Foam::SmoothSolver<Type, DType, LUType>::solve(Field<Type>& psi) const
     }
     else
     {
-        Type normFactor = pTraits<Type>::zero;
+        Type normFactor = Zero;
 
         {
             Field<Type> Apsi(psi.size());
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.H b/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.H
index 54db11be8c569bc80530e486f9b7cada29806ff8..cc073477c746457b95332dae9edc766c03244540 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.H
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SmoothSolver.C"
+    #include "SmoothSolver.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/lduSolvers.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/lduSolvers.C
index 6e36e525b8044482dfd5a135c863af8226853b2a..c482ec843319ed91ee59199b23341c4a7d2410b6 100644
--- a/src/OpenFOAM/matrices/LduMatrix/Solvers/lduSolvers.C
+++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/lduSolvers.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,23 +29,23 @@ License
 #include "SmoothSolver.H"
 #include "fieldTypes.H"
 
-#define makeLduSolvers(Type, DType, LUType)                                   \
-                                                                              \
-    makeLduSolver(DiagonalSolver, Type, DType, LUType);                       \
-    makeLduSymSolver(DiagonalSolver, Type, DType, LUType);                    \
-    makeLduAsymSolver(DiagonalSolver, Type, DType, LUType);                   \
-                                                                              \
-    makeLduSolver(PCICG, Type, DType, LUType);                                \
-    makeLduSymSolver(PCICG, Type, DType, LUType);                             \
-                                                                              \
-    makeLduSolver(PBiCCCG, Type, DType, LUType);                              \
-    makeLduAsymSolver(PBiCCCG, Type, DType, LUType);                          \
-                                                                              \
-    makeLduSolver(PBiCICG, Type, DType, LUType);                              \
-    makeLduAsymSolver(PBiCICG, Type, DType, LUType);                          \
-                                                                              \
-    makeLduSolver(SmoothSolver, Type, DType, LUType);                         \
-    makeLduSymSolver(SmoothSolver, Type, DType, LUType);                      \
+#define makeLduSolvers(Type, DType, LUType)                                    \
+                                                                               \
+    makeLduSolver(DiagonalSolver, Type, DType, LUType);                        \
+    makeLduSymSolver(DiagonalSolver, Type, DType, LUType);                     \
+    makeLduAsymSolver(DiagonalSolver, Type, DType, LUType);                    \
+                                                                               \
+    makeLduSolver(PCICG, Type, DType, LUType);                                 \
+    makeLduSymSolver(PCICG, Type, DType, LUType);                              \
+                                                                               \
+    makeLduSolver(PBiCCCG, Type, DType, LUType);                               \
+    makeLduAsymSolver(PBiCCCG, Type, DType, LUType);                           \
+                                                                               \
+    makeLduSolver(PBiCICG, Type, DType, LUType);                               \
+    makeLduAsymSolver(PBiCICG, Type, DType, LUType);                           \
+                                                                               \
+    makeLduSolver(SmoothSolver, Type, DType, LUType);                          \
+    makeLduSymSolver(SmoothSolver, Type, DType, LUType);                       \
     makeLduAsymSolver(SmoothSolver, Type, DType, LUType);
 
 namespace Foam
diff --git a/src/OpenFOAM/matrices/Matrix/Matrix.C b/src/OpenFOAM/matrices/Matrix/Matrix.C
index ec6aba8a09ab772e658b7cbc40b3775169c4c1f1..46508d8e3f6353460191829fa5d60c48eba69962 100644
--- a/src/OpenFOAM/matrices/Matrix/Matrix.C
+++ b/src/OpenFOAM/matrices/Matrix/Matrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,63 +30,71 @@ License
 template<class Form, class Type>
 void Foam::Matrix<Form, Type>::allocate()
 {
-    if (n_ && m_)
+    if (mRows_ && nCols_)
     {
-        v_ = new Type*[n_];
-        v_[0] = new Type[n_*m_];
-
-        for (label i=1; i<n_; i++)
-        {
-            v_[i] = v_[i-1] + m_;
-        }
+        v_ = new Type[size()];
     }
 }
 
 
-// * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Form, class Type>
-Foam::Matrix<Form, Type>::~Matrix()
+Foam::Matrix<Form, Type>::Matrix(const label m, const label n)
+:
+    mRows_(m),
+    nCols_(n),
+    v_(NULL)
 {
-    if (v_)
+    if (mRows_ < 0 || nCols_ < 0)
     {
-        delete[] (v_[0]);
-        delete[] v_;
+        FatalErrorInFunction
+            << "Incorrect m, n " << mRows_ << ", " << nCols_
+            << abort(FatalError);
     }
-}
 
+    allocate();
+}
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Form, class Type>
-Foam::Matrix<Form, Type>::Matrix(const label n, const label m)
+Foam::Matrix<Form, Type>::Matrix(const label m, const label n, const zero)
 :
-    n_(n),
-    m_(m),
+    mRows_(m),
+    nCols_(n),
     v_(NULL)
 {
-    if (n_ < 0 || m_ < 0)
+    if (mRows_ < 0 || nCols_ < 0)
     {
         FatalErrorInFunction
-            << "bad n, m " << n_ << ", " << m_
+            << "Incorrect m, n " << mRows_ << ", " << nCols_
             << abort(FatalError);
     }
 
     allocate();
+
+    if (v_)
+    {
+        const label mn = size();
+        for (label i=0; i<mn; i++)
+        {
+            v_[i] = Zero;
+        }
+    }
 }
 
 
 template<class Form, class Type>
-Foam::Matrix<Form, Type>::Matrix(const label n, const label m, const Type& a)
+Foam::Matrix<Form, Type>::Matrix(const label m, const label n, const Type& s)
 :
-    n_(n),
-    m_(m),
+    mRows_(m),
+    nCols_(n),
     v_(NULL)
 {
-    if (n_ < 0 || m_ < 0)
+    if (mRows_ < 0 || nCols_ < 0)
     {
         FatalErrorInFunction
-            << "bad n, m " << n_ << ", " << m_
+            << "Incorrect m, n " << mRows_ << ", " << nCols_
             << abort(FatalError);
     }
 
@@ -94,67 +102,161 @@ Foam::Matrix<Form, Type>::Matrix(const label n, const label m, const Type& a)
 
     if (v_)
     {
-        Type* v = v_[0];
+        const label mn = size();
+        for (label i=0; i<mn; i++)
+        {
+            v_[i] = s;
+        }
+    }
+}
 
-        label nm = n_*m_;
 
-        for (label i=0; i<nm; i++)
+template<class Form, class Type>
+Foam::Matrix<Form, Type>::Matrix(const Matrix<Form, Type>& M)
+:
+    mRows_(M.mRows_),
+    nCols_(M.nCols_),
+    v_(NULL)
+{
+    if (M.v_)
+    {
+        allocate();
+
+        const label mn = size();
+        for (label i=0; i<mn; i++)
         {
-            v[i] = a;
+            v_[i] = M.v_[i];
         }
     }
 }
 
 
 template<class Form, class Type>
-Foam::Matrix<Form, Type>::Matrix(const Matrix<Form, Type>& a)
+template<class Form2>
+Foam::Matrix<Form, Type>::Matrix(const Matrix<Form2, Type>& M)
 :
-    n_(a.n_),
-    m_(a.m_),
+    mRows_(M.m()),
+    nCols_(M.n()),
     v_(NULL)
 {
-    if (a.v_)
+    if (M.v())
     {
         allocate();
-        Type* v = v_[0];
-        const Type* av = a.v_[0];
 
-        label nm = n_*m_;
-        for (label i=0; i<nm; i++)
+        const label mn = size();
+        for (label i=0; i<mn; i++)
         {
-            v[i] = av[i];
+            v_[i] = M.v()[i];
         }
     }
 }
 
 
+template<class Form, class Type>
+template<class MatrixType>
+inline Foam::Matrix<Form, Type>::Matrix
+(
+    const ConstMatrixBlock<MatrixType>& Mb
+)
+:
+    mRows_(Mb.m()),
+    nCols_(Mb.n())
+{
+    allocate();
+
+    for (label i=0; i<mRows_; i++)
+    {
+        for (label j=0; j<nCols_; j++)
+        {
+            (*this)(i,j) = Mb(i,j);
+        }
+    }
+}
+
+
+template<class Form, class Type>
+template<class MatrixType>
+inline Foam::Matrix<Form, Type>::Matrix
+(
+    const MatrixBlock<MatrixType>& Mb
+)
+:
+    mRows_(Mb.m()),
+    nCols_(Mb.n())
+{
+    allocate();
+
+    for (label i=0; i<mRows_; i++)
+    {
+        for (label j=0; j<nCols_; j++)
+        {
+            (*this)(i,j) = Mb(i,j);
+        }
+    }
+}
+
+
+// * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * * //
+
+template<class Form, class Type>
+Foam::Matrix<Form, Type>::~Matrix()
+{
+    if (v_)
+    {
+        delete[] v_;
+    }
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
 template<class Form, class Type>
 void Foam::Matrix<Form, Type>::clear()
 {
     if (v_)
     {
-        delete[] (v_[0]);
         delete[] v_;
+        v_ = NULL;
     }
-    n_ = 0;
-    m_ = 0;
-    v_ = NULL;
+
+    mRows_ = 0;
+    nCols_ = 0;
 }
 
 
 template<class Form, class Type>
-void Foam::Matrix<Form, Type>::transfer(Matrix<Form, Type>& a)
+void Foam::Matrix<Form, Type>::transfer(Matrix<Form, Type>& M)
 {
     clear();
 
-    n_ = a.n_;
-    a.n_ = 0;
+    mRows_ = M.mRows_;
+    M.mRows_ = 0;
+
+    nCols_ = M.nCols_;
+    M.nCols_ = 0;
+
+    v_ = M.v_;
+    M.v_ = NULL;
+}
+
+
+template<class Form, class Type>
+void Foam::Matrix<Form, Type>::setSize(const label m, const label n)
+{
+    mType newMatrix(m, n, Zero);
+
+    label minM = min(m, mRows_);
+    label minN = min(n, nCols_);
 
-    m_ = a.m_;
-    a.m_ = 0;
+    for (label i=0; i<minM; i++)
+    {
+        for (label j=0; j<minN; j++)
+        {
+            newMatrix(i, j) = (*this)(i, j);
+        }
+    }
 
-    v_ = a.v_;
-    a.v_ = NULL;
+    transfer(newMatrix);
 }
 
 
@@ -162,13 +264,13 @@ template<class Form, class Type>
 Form Foam::Matrix<Form, Type>::T() const
 {
     const Matrix<Form, Type>& A = *this;
-    Form At(m(), n());
+    Form At(n(), m());
 
-    for (label i=0; i<n(); i++)
+    for (label i=0; i<m(); i++)
     {
-        for (label j=0; j<m(); j++)
+        for (label j=0; j<n(); j++)
         {
-            At[j][i] = A[i][j];
+            At(j, i) = A(i, j);
         }
     }
 
@@ -179,49 +281,91 @@ Form Foam::Matrix<Form, Type>::T() const
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Form, class Type>
-void Foam::Matrix<Form, Type>::operator=(const Type& t)
+void Foam::Matrix<Form, Type>::operator=(const Matrix<Form, Type>& M)
 {
-    if (v_)
+    if (this == &M)
+    {
+        FatalErrorInFunction
+            << "Attempted assignment to self"
+            << abort(FatalError);
+    }
+
+    if (mRows_ != M.mRows_ || nCols_ != M.nCols_)
     {
-        Type* v = v_[0];
+        clear();
+        mRows_ = M.mRows_;
+        nCols_ = M.nCols_;
+        allocate();
+    }
 
-        label nm = n_*m_;
-        for (label i=0; i<nm; i++)
+    if (v_)
+    {
+        const label mn = size();
+        for (label i=0; i<mn; i++)
         {
-            v[i] = t;
+            v_[i] = M.v_[i];
         }
     }
 }
 
 
-// Assignment operator. Takes linear time.
 template<class Form, class Type>
-void Foam::Matrix<Form, Type>::operator=(const Matrix<Form, Type>& a)
+template<class MatrixType>
+void Foam::Matrix<Form, Type>::operator=
+(
+    const ConstMatrixBlock<MatrixType>& Mb
+)
 {
-    if (this == &a)
+    for (label i=0; i<mRows_; i++)
     {
-        FatalErrorInFunction
-            << "attempted assignment to self"
-            << abort(FatalError);
+        for (label j=0; j<nCols_; j++)
+        {
+            (*this)(i,j) = Mb(i,j);
+        }
     }
+}
 
-    if (n_ != a.n_ || m_ != a.m_)
+
+template<class Form, class Type>
+template<class MatrixType>
+void Foam::Matrix<Form, Type>::operator=
+(
+    const MatrixBlock<MatrixType>& Mb
+)
+{
+    for (label i=0; i<mRows_; i++)
     {
-        clear();
-        n_ = a.n_;
-        m_ = a.m_;
-        allocate();
+        for (label j=0; j<nCols_; j++)
+        {
+            (*this)(i,j) = Mb(i,j);
+        }
     }
+}
 
+
+template<class Form, class Type>
+void Foam::Matrix<Form, Type>::operator=(const Type& s)
+{
     if (v_)
     {
-        Type* v = v_[0];
-        const Type* av = a.v_[0];
+        const label mn = size();
+        for (label i=0; i<mn; i++)
+        {
+            v_[i] = s;
+        }
+    }
+}
 
-        label nm = n_*m_;
-        for (label i=0; i<nm; i++)
+
+template<class Form, class Type>
+void Foam::Matrix<Form, Type>::operator=(const zero)
+{
+    if (v_)
+    {
+        const label mn = size();
+        for (label i=0; i<mn; i++)
         {
-            v[i] = av[i];
+            v_[i] = Zero;
         }
     }
 }
@@ -230,65 +374,65 @@ void Foam::Matrix<Form, Type>::operator=(const Matrix<Form, Type>& a)
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 template<class Form, class Type>
-const Type& Foam::max(const Matrix<Form, Type>& a)
+const Type& Foam::max(const Matrix<Form, Type>& M)
 {
-    label nm = a.n()*a.m();
+    const label mn = M.size();
 
-    if (nm)
+    if (mn)
     {
         label curMaxI = 0;
-        const Type* v = a[0];
+        const Type* Mv = M.v();
 
-        for (label i=1; i<nm; i++)
+        for (label i=1; i<mn; i++)
         {
-            if (v[i] > v[curMaxI])
+            if (Mv[i] > Mv[curMaxI])
             {
                 curMaxI = i;
             }
         }
 
-        return v[curMaxI];
+        return Mv[curMaxI];
     }
     else
     {
         FatalErrorInFunction
-            << "matrix is empty"
+            << "Matrix is empty"
             << abort(FatalError);
 
         // Return in error to keep compiler happy
-        return a[0][0];
+        return M(0, 0);
     }
 }
 
 
 template<class Form, class Type>
-const Type& Foam::min(const Matrix<Form, Type>& a)
+const Type& Foam::min(const Matrix<Form, Type>& M)
 {
-    label nm = a.n()*a.m();
+    const label mn = M.size();
 
-    if (nm)
+    if (mn)
     {
         label curMinI = 0;
-        const Type* v = a[0];
+        const Type* Mv = M.v();
 
-        for (label i=1; i<nm; i++)
+        for (label i=1; i<mn; i++)
         {
-            if (v[i] < v[curMinI])
+            if (Mv[i] < Mv[curMinI])
             {
                 curMinI = i;
             }
         }
 
-        return v[curMinI];
+        return Mv[curMinI];
     }
     else
     {
         FatalErrorInFunction
-            << "matrix is empty"
+            << "Matrix is empty"
             << abort(FatalError);
 
         // Return in error to keep compiler happy
-        return a[0][0];
+        return M(0, 0);
     }
 }
 
@@ -296,145 +440,230 @@ const Type& Foam::min(const Matrix<Form, Type>& a)
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 template<class Form, class Type>
-Form Foam::operator-(const Matrix<Form, Type>& a)
+Form Foam::operator-(const Matrix<Form, Type>& M)
 {
-    Form na(a.n(), a.m());
+    Form nM(M.m(), M.n());
 
-    if (a.n() && a.m())
+    if (M.m() && M.n())
     {
-        Type* nav = na[0];
-        const Type* av = a[0];
+        Type* nMv = nM.v();
+        const Type* Mv = M.v();
 
-        label nm = a.n()*a.m();
-        for (label i=0; i<nm; i++)
+        const label mn = M.size();
+        for (label i=0; i<mn; i++)
         {
-            nav[i] = -av[i];
+            nMv[i] = -Mv[i];
         }
     }
 
-    return na;
+    return nM;
 }
 
 
 template<class Form, class Type>
-Form Foam::operator+(const Matrix<Form, Type>& a, const Matrix<Form, Type>& b)
+Form Foam::operator+(const Matrix<Form, Type>& A, const Matrix<Form, Type>& B)
 {
-    if (a.n() != b.n())
+    if (A.m() != B.m())
     {
         FatalErrorInFunction
-            << "attempted add matrices with different number of rows: "
-            << a.n() << ", " << b.n()
+            << "Attempt to add matrices with different numbers of rows: "
+            << A.m() << ", " << B.m()
             << abort(FatalError);
     }
 
-    if (a.m() != b.m())
+    if (A.n() != B.n())
     {
         FatalErrorInFunction
-            << "attempted add matrices with different number of columns: "
-            << a.m() << ", " << b.m()
+            << "Attempt to add matrices with different numbers of columns: "
+            << A.n() << ", " << B.n()
             << abort(FatalError);
     }
 
-    Form ab(a.n(), a.m());
+    Form AB(A.m(), A.n());
 
-    Type* abv = ab[0];
-    const Type* av = a[0];
-    const Type* bv = b[0];
+    Type* ABv = AB.v();
+    const Type* Av = A.v();
+    const Type* Bv = B.v();
 
-    label nm = a.n()*a.m();
-    for (label i=0; i<nm; i++)
+    const label mn = A.size();
+    for (label i=0; i<mn; i++)
     {
-        abv[i] = av[i] + bv[i];
+        ABv[i] = Av[i] + Bv[i];
     }
 
-    return ab;
+    return AB;
 }
 
 
 template<class Form, class Type>
-Form Foam::operator-(const Matrix<Form, Type>& a, const Matrix<Form, Type>& b)
+Form Foam::operator-(const Matrix<Form, Type>& A, const Matrix<Form, Type>& B)
 {
-    if (a.n() != b.n())
+    if (A.m() != B.m())
     {
         FatalErrorInFunction
-            << "attempted add matrices with different number of rows: "
-            << a.n() << ", " << b.n()
+            << "Attempt to add matrices with different numbers of rows: "
+            << A.m() << ", " << B.m()
             << abort(FatalError);
     }
 
-    if (a.m() != b.m())
+    if (A.n() != B.n())
     {
         FatalErrorInFunction
-            << "attempted add matrices with different number of columns: "
-            << a.m() << ", " << b.m()
+            << "Attempt to add matrices with different numbers of columns: "
+            << A.n() << ", " << B.n()
             << abort(FatalError);
     }
 
-    Form ab(a.n(), a.m());
+    Form AB(A.m(), A.n());
 
-    Type* abv = ab[0];
-    const Type* av = a[0];
-    const Type* bv = b[0];
+    Type* ABv = AB.v();
+    const Type* Av = A.v();
+    const Type* Bv = B.v();
 
-    label nm = a.n()*a.m();
-    for (label i=0; i<nm; i++)
+    const label mn = A.size();
+    for (label i=0; i<mn; i++)
     {
-        abv[i] = av[i] - bv[i];
+        ABv[i] = Av[i] - Bv[i];
     }
 
-    return ab;
+    return AB;
 }
 
 
 template<class Form, class Type>
-Form Foam::operator*(const scalar s, const Matrix<Form, Type>& a)
+Form Foam::operator*(const scalar s, const Matrix<Form, Type>& M)
 {
-    Form sa(a.n(), a.m());
+    Form sM(M.m(), M.n());
 
-    if (a.n() && a.m())
+    if (M.m() && M.n())
     {
-        Type* sav = sa[0];
-        const Type* av = a[0];
+        Type* sMv = sM.v();
+        const Type* Mv = M.v();
 
-        label nm = a.n()*a.m();
-        for (label i=0; i<nm; i++)
+        const label mn = M.size();
+        for (label i=0; i<mn; i++)
         {
-            sav[i] = s*av[i];
+            sMv[i] = s*Mv[i];
         }
     }
 
-    return sa;
+    return sM;
 }
 
 
 template<class Form, class Type>
-Form Foam::operator*(const Matrix<Form, Type>& a, const Matrix<Form, Type>& b)
+Form Foam::operator*(const Matrix<Form, Type>& M, const scalar s)
 {
-    if (a.m() != b.n())
+    Form sM(M.m(), M.n());
+
+    if (M.m() && M.n())
+    {
+        Type* sMv = sM.v();
+        const Type* Mv = M.v();
+
+        const label mn = M.size();
+        for (label i=0; i<mn; i++)
+        {
+            sMv[i] = Mv[i]*s;
+        }
+    }
+
+    return sM;
+}
+
+
+template<class Form, class Type>
+Form Foam::operator/(const Matrix<Form, Type>& M, const scalar s)
+{
+    Form sM(M.m(), M.n());
+
+    if (M.m() && M.n())
+    {
+        Type* sMv = sM.v();
+        const Type* Mv = M.v();
+
+        const label mn = M.size();
+        for (label i=0; i<mn; i++)
+        {
+            sMv[i] = Mv[i]/s;
+        }
+    }
+
+    return sM;
+}
+
+
+template<class Form1, class Form2, class Type>
+typename Foam::typeOfInnerProduct<Type, Form1, Form2>::type
+Foam::operator*
+(
+    const Matrix<Form1, Type>& A,
+    const Matrix<Form2, Type>& B
+)
+{
+    if (A.n() != B.m())
     {
         FatalErrorInFunction
-            << "attempted to multiply incompatible matrices:" << nl
-            << "Matrix A : " << a.n() << " rows, " << a.m() << " columns" << nl
-            << "Matrix B : " << b.n() << " rows, " << b.m() << " columns" << nl
+            << "Attempt to multiply incompatible matrices:" << nl
+            << "Matrix A : " << A.m() << " x " << A.n() << nl
+            << "Matrix B : " << B.m() << " x " << B.n() << nl
             << "In order to multiply matrices, columns of A must equal "
             << "rows of B"
             << abort(FatalError);
     }
 
-    Form ab(a.n(), b.m(), scalar(0));
+    typename typeOfInnerProduct<Type, Form1, Form2>::type AB
+    (
+        A.m(),
+        B.n(),
+        Zero
+    );
 
-    for (label i = 0; i < ab.n(); i++)
+    for (label i=0; i<AB.m(); i++)
     {
-        for (label j = 0; j < ab.m(); j++)
+        for (label j=0; j<AB.n(); j++)
         {
-            for (label l = 0; l < b.n(); l++)
+            for (label k=0; k<B.m(); k++)
             {
-                ab[i][j] += a[i][l]*b[l][j];
+                AB(i, j) += A(i, k)*B(k, j);
             }
         }
     }
 
-    return ab;
+    return AB;
+}
+
+
+template<class Form, class Type>
+inline Foam::tmp<Foam::Field<Type>> Foam::operator*
+(
+    const Matrix<Form, Type>& M,
+    const Field<Type>& f
+)
+{
+    if (M.n() != f.size())
+    {
+        FatalErrorInFunction
+            << "Attempt to multiply incompatible matrix and field:" << nl
+            << "Matrix : " << M.m() << " x " << M.n() << nl
+            << "Field : " << f.size() << " rows" << nl
+            << "In order to multiply a matrix M and field f, "
+               "columns of M must equal rows of f"
+            << abort(FatalError);
+    }
+
+    tmp<Field<Type>> tMf(new Field<Type>(f.size(), Zero));
+    Field<Type>& Mf = tMf.ref();
+
+    for (label i=0; i<M.m(); i++)
+    {
+        for (label j=0; j<M.n(); j++)
+        {
+            Mf[i] += M(i, j)*f[j];
+        }
+    }
+
+    return tMf;
 }
 
 
diff --git a/src/OpenFOAM/matrices/Matrix/Matrix.H b/src/OpenFOAM/matrices/Matrix/Matrix.H
index 005982d9e0052f6a3056631cda362523b15c80b9..22e289a689bf8aacbcb875a200b16ec814e527f7 100644
--- a/src/OpenFOAM/matrices/Matrix/Matrix.H
+++ b/src/OpenFOAM/matrices/Matrix/Matrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,8 +25,7 @@ Class
     Foam::Matrix
 
 Description
-    A templated 2D matrix of objects of \<T\>, where the n x m matrix
-    dimensions are known and used for subscript bounds checking, etc.
+    A templated (m x n) matrix of objects of \<T\>.
 
 SourceFiles
     Matrix.C
@@ -41,7 +40,8 @@ SourceFiles
 #include "bool.H"
 #include "label.H"
 #include "uLabel.H"
-#include "List.H"
+#include "Field.H"
+#include "zero.H"
 #include "autoPtr.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -65,6 +65,12 @@ template<class Form, class Type> Ostream& operator<<
     const Matrix<Form, Type>&
 );
 
+template<class MatrixType>
+class ConstMatrixBlock;
+
+template<class MatrixType>
+class MatrixBlock;
+
 
 /*---------------------------------------------------------------------------*\
                            Class Matrix Declaration
@@ -76,22 +82,28 @@ class Matrix
     // Private data
 
         //- Number of rows and columns in Matrix.
-        label n_, m_;
+        label mRows_, nCols_;
 
         //- Row pointers
-        Type** __restrict__ v_;
+        Type* __restrict__ v_;
 
-        //- Allocate the storage for the row-pointers and the data
-        //  and set the row pointers
+        //- Allocate the storage for the element vector
         void allocate();
 
 
 public:
 
+    //- Matrix type
+    typedef Matrix<Form, Type> mType;
+
+    //- Component type
+    typedef Type cmptType;
+
+
     // Static Member Functions
 
         //- Return a null Matrix
-        inline static const Matrix<Form, Type>& null();
+        inline static const mType& null();
 
 
     // Constructors
@@ -100,20 +112,36 @@ public:
         inline Matrix();
 
         //- Construct given number of rows and columns.
-        Matrix(const label n, const label m);
+        Matrix(const label m, const label n);
 
         //- Construct with given number of rows and columns
-        //  and value for all elements.
-        Matrix(const label n, const label m, const Type&);
+        //  initializing all elements to zero
+        Matrix(const label m, const label n, const zero);
+
+        //- Construct with given number of rows and columns
+        //  initializing all elements to the given value
+        Matrix(const label m, const label n, const Type&);
 
         //- Copy constructor.
-        Matrix(const Matrix<Form, Type>&);
+        Matrix(const mType&);
+
+        //- Copy constructor from matrix of a different form
+        template<class Form2>
+        explicit Matrix(const Matrix<Form2, Type>&);
+
+        //- Construct from a block of another matrix
+        template<class MatrixType>
+        Matrix(const ConstMatrixBlock<MatrixType>&);
+
+        //- Construct from a block of another matrix
+        template<class MatrixType>
+        Matrix(const MatrixBlock<MatrixType>&);
 
         //- Construct from Istream.
         Matrix(Istream&);
 
         //- Clone
-        inline autoPtr<Matrix<Form, Type> > clone() const;
+        inline autoPtr<mType> clone() const;
 
 
     //- Destructor
@@ -125,21 +153,87 @@ public:
         // Access
 
             //- Return the number of rows
-            inline label n() const;
+            inline label m() const;
 
             //- Return the number of columns
-            inline label m() const;
+            inline label n() const;
 
-            //- Return the number of elements in matrix (n*m)
+            //- Return the number of elements in matrix (m*n)
             inline label size() const;
 
+            //- Return element vector of the constant Matrix
+            inline const Type* v() const;
+
+            //- Return element vector of the Matrix
+            inline Type* v();
+
+
+        // Block access
+
+            inline ConstMatrixBlock<mType> block
+            (
+                const label m,
+                const label n,
+                const label mStart,
+                const label nStart
+            ) const;
+
+            template<class VectorSpace>
+            inline ConstMatrixBlock<mType> block
+            (
+                const label mStart,
+                const label nStart
+            ) const;
+
+            inline ConstMatrixBlock<mType> col
+            (
+                const label m,
+                const label rowStart
+            ) const;
+
+            inline ConstMatrixBlock<mType> col
+            (
+                const label m,
+                const label mStart,
+                const label nStart
+            ) const;
+
+
+            inline MatrixBlock<mType> block
+            (
+                const label m,
+                const label n,
+                const label mStart,
+                const label nStart
+            );
+
+            template<class VectorSpace>
+            inline MatrixBlock<mType> block
+            (
+                const label mStart,
+                const label nStart
+            );
+
+            inline MatrixBlock<mType> col
+            (
+                const label m,
+                const label rowStart
+            );
+
+            inline MatrixBlock<mType> col
+            (
+                const label m,
+                const label mStart,
+                const label nStart
+            );
+
 
         // Check
 
-            //- Check index i is within valid range (0 ... n-1).
+            //- Check index i is within valid range (0 ... m-1).
             inline void checki(const label i) const;
 
-            //- Check index j is within valid range (0 ... m-1).
+            //- Check index j is within valid range (0 ... n-1).
             inline void checkj(const label j) const;
 
 
@@ -150,7 +244,10 @@ public:
 
             //- Transfer the contents of the argument Matrix into this Matrix
             //  and annul the argument Matrix.
-            void transfer(Matrix<Form, Type>&);
+            void transfer(mType&);
+
+            //- Resize the matrix preserving the elements
+            void setSize(const label m, const label n);
 
 
         //- Return the transpose of the matrix
@@ -165,10 +262,27 @@ public:
         //- Return subscript-checked row of constant Matrix.
         inline const Type* operator[](const label) const;
 
+        //- (i, j) const element access operator
+        inline const Type& operator()(const label i, const label j) const;
+
+        //- (i, j) element access operator
+        inline Type& operator()(const label i, const label j);
+
         //- Assignment operator. Takes linear time.
-        void operator=(const Matrix<Form, Type>&);
+        void operator=(const mType&);
+
+        //- Assignment to a block of another matrix
+        template<class MatrixType>
+        void operator=(const ConstMatrixBlock<MatrixType>&);
+
+        //- Assignment to a block of another matrix
+        template<class MatrixType>
+        void operator=(const MatrixBlock<MatrixType>&);
 
-        //- Assignment of all entries to the given value
+        //- Assignment of all elements to zero
+        void operator=(const zero);
+
+        //- Assignment of all elements to the given value
         void operator=(const Type&);
 
 
@@ -178,61 +292,92 @@ public:
         friend Istream& operator>> <Form, Type>
         (
             Istream&,
-            Matrix<Form, Type>&
+            mType&
         );
 
         // Write Matrix to Ostream.
         friend Ostream& operator<< <Form, Type>
         (
             Ostream&,
-            const Matrix<Form, Type>&
+            const mType&
         );
 };
 
 
 // Global functions and operators
 
-template<class Form, class Type> const Type& max(const Matrix<Form, Type>&);
-template<class Form, class Type> const Type& min(const Matrix<Form, Type>&);
+template<class Form, class Type>
+const Type& max(const Matrix<Form, Type>&);
+
+template<class Form, class Type>
+const Type& min(const Matrix<Form, Type>&);
 
-template<class Form, class Type> Form operator-(const Matrix<Form, Type>&);
+template<class Form, class Type>
+Form operator-(const Matrix<Form, Type>&);
 
-template<class Form, class Type> Form operator+
+template<class Form, class Type>
+Form operator+
 (
     const Matrix<Form, Type>&,
     const Matrix<Form, Type>&
 );
 
-template<class Form, class Type> Form operator-
+template<class Form, class Type>
+Form operator-
 (
     const Matrix<Form, Type>&,
     const Matrix<Form, Type>&
 );
 
-template<class Form, class Type> Form operator*
+template<class Form, class Type>
+Form operator*
 (
     const scalar,
     const Matrix<Form, Type>&
 );
 
-template<class Form, class Type> Form operator*
+template<class Form, class Type>
+Form operator*
 (
     const Matrix<Form, Type>&,
-    const Matrix<Form, Type>&
+    const scalar
+);
+
+template<class Form, class Type>
+Form operator/
+(
+    const Matrix<Form, Type>&,
+    const scalar
+);
+
+template<class Form1, class Form2, class Type>
+typename typeOfInnerProduct<Type, Form1, Form2>::type
+operator*
+(
+    const Matrix<Form1, Type>& a,
+    const Matrix<Form2, Type>& b
 );
 
+template<class Form, class Type>
+tmp<Field<Type>> operator*
+(
+    const Matrix<Form, Type>&,
+    const Field<Type>&
+);
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "MatrixI.H"
+#include "MatrixI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Matrix.C"
+    #include "Matrix.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/Matrix/MatrixI.H b/src/OpenFOAM/matrices/Matrix/MatrixI.H
index ccffa5c3db57a6f316bc66a4104a1fd9358ff7c2..73992aac77b02d21d50ab1cda8eccc9affbae4fb 100644
--- a/src/OpenFOAM/matrices/Matrix/MatrixI.H
+++ b/src/OpenFOAM/matrices/Matrix/MatrixI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,22 +23,24 @@ License
 
 \*---------------------------------------------------------------------------*/
 
+#include "MatrixBlock.H"
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Form, class Type>
 inline Foam::Matrix<Form, Type>::Matrix()
 :
-    n_(0),
-    m_(0),
+    mRows_(0),
+    nCols_(0),
     v_(NULL)
 {}
 
 
 template<class Form, class Type>
-inline Foam::autoPtr<Foam::Matrix<Form, Type> > Foam::Matrix<Form, Type>::
+inline Foam::autoPtr<Foam::Matrix<Form, Type>> Foam::Matrix<Form, Type>::
 clone() const
 {
-    return autoPtr<Matrix<Form, Type> >(new Matrix<Form, Type>(*this));
+    return autoPtr<Matrix<Form, Type>>(new Matrix<Form, Type>(*this));
 }
 
 
@@ -47,87 +49,278 @@ clone() const
 template<class Form, class Type>
 inline const Foam::Matrix<Form, Type>& Foam::Matrix<Form, Type>::null()
 {
-    return NullObjectRef<Matrix<Form, Type> >();
+    return NullObjectRef<Matrix<Form, Type>>();
 }
 
 
-//- Return the number of rows
 template<class Form, class Type>
-inline Foam::label Foam::Matrix<Form, Type>::n() const
+inline Foam::label Foam::Matrix<Form, Type>::m() const
 {
-    return n_;
+    return mRows_;
 }
 
 
 template<class Form, class Type>
-inline Foam::label Foam::Matrix<Form, Type>::m() const
+inline Foam::label Foam::Matrix<Form, Type>::n() const
 {
-    return m_;
+    return nCols_;
 }
 
 
 template<class Form, class Type>
 inline Foam::label Foam::Matrix<Form, Type>::size() const
 {
-    return n_*m_;
+    return mRows_*nCols_;
 }
 
 
 template<class Form, class Type>
 inline void Foam::Matrix<Form, Type>::checki(const label i) const
 {
-    if (!n_)
+    #ifdef FULLDEBUG
+    if (!mRows_ || !nCols_)
     {
         FatalErrorInFunction
-            << "attempt to access element from zero sized row"
+            << "Attempt to access element from empty matrix"
             << abort(FatalError);
     }
-    else if (i<0 || i>=n_)
+    else if (i<0 || i>=mRows_)
     {
         FatalErrorInFunction
-            << "index " << i << " out of range 0 ... " << n_-1
+            << "Index " << i << " out of range 0 ... " << mRows_-1
             << abort(FatalError);
     }
+    #endif
 }
 
 
 template<class Form, class Type>
 inline void Foam::Matrix<Form, Type>::checkj(const label j) const
 {
-    if (!m_)
+    #ifdef FULLDEBUG
+    if (!mRows_ || !nCols_)
     {
         FatalErrorInFunction
-            << "attempt to access element from zero sized column"
+            << "Attempt to access element from empty matrix"
             << abort(FatalError);
     }
-    else if (j<0 || j>=m_)
+    else if (j<0 || j>=nCols_)
     {
         FatalErrorInFunction
-            << "index " << j << " out of range 0 ... " << m_-1
+            << "index " << j << " out of range 0 ... " << nCols_-1
             << abort(FatalError);
     }
+    #endif
+}
+
+
+template<class Form, class Type>
+inline const Type* Foam::Matrix<Form, Type>::v() const
+{
+    return v_;
+}
+
+
+template<class Form, class Type>
+inline Type* Foam::Matrix<Form, Type>::v()
+{
+    return v_;
+}
+
+
+template<class Form, class Type>
+inline Foam::ConstMatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::block
+(
+    const label m,
+    const label n,
+    const label mStart,
+    const label nStart
+) const
+{
+    return ConstMatrixBlock<mType>
+    (
+        *this,
+        m,
+        n,
+        mStart,
+        nStart
+    );
+}
+
+
+template<class Form, class Type>
+template<class VectorSpace>
+inline Foam::ConstMatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::block
+(
+    const label mStart,
+    const label nStart
+) const
+{
+    return ConstMatrixBlock<mType>
+    (
+        *this,
+        VectorSpace::mRows,
+        VectorSpace::nCols,
+        mStart,
+        nStart
+    );
+}
+
+
+template<class Form, class Type>
+inline Foam::ConstMatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::col
+(
+    const label m,
+    const label mStart
+) const
+{
+    return ConstMatrixBlock<mType>
+    (
+        *this,
+        m,
+        1,
+        mStart,
+        0
+    );
+}
+
+
+template<class Form, class Type>
+inline Foam::ConstMatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::col
+(
+    const label m,
+    const label mStart,
+    const label nStart
+) const
+{
+    return ConstMatrixBlock<mType>
+    (
+        *this,
+        m,
+        1,
+        mStart,
+        nStart
+    );
+}
+
+
+template<class Form, class Type>
+inline Foam::MatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::block
+(
+    const label m,
+    const label n,
+    const label mStart,
+    const label nStart
+)
+{
+    return MatrixBlock<mType>
+    (
+        *this,
+        m,
+        n,
+        mStart,
+        nStart
+    );
+}
+
+
+template<class Form, class Type>
+template<class VectorSpace>
+inline Foam::MatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::block(const label mStart, const label nStart)
+{
+    return MatrixBlock<mType>
+    (
+        *this,
+        VectorSpace::mRows,
+        VectorSpace::nCols,
+        mStart,
+        nStart
+    );
+}
+
+
+template<class Form, class Type>
+inline Foam::MatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::col(const label m, const label mStart)
+{
+    return MatrixBlock<mType>
+    (
+        *this,
+        m,
+        1,
+        mStart,
+        0
+    );
+}
+
+
+template<class Form, class Type>
+inline Foam::MatrixBlock<Foam::Matrix<Form, Type>>
+Foam::Matrix<Form, Type>::col
+(
+    const label m,
+    const label mStart,
+    const label nStart
+)
+{
+    return MatrixBlock<mType>
+    (
+        *this,
+        m,
+        1,
+        mStart,
+        nStart
+    );
 }
 
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Form, class Type>
-inline Type* Foam::Matrix<Form, Type>::operator[](const label i)
+inline const Type& Foam::Matrix<Form, Type>::operator()
+(
+    const label i,
+    const label j
+) const
 {
-#   ifdef FULLDEBUG
     checki(i);
-#   endif
-    return v_[i];
+    checkj(j);
+    return v_[i*nCols_ + j];
+}
+
+
+template<class Form, class Type>
+inline Type& Foam::Matrix<Form, Type>::operator()
+(
+    const label i,
+    const label j
+)
+{
+    checki(i);
+    checkj(j);
+    return v_[i*nCols_ + j];
 }
 
 
 template<class Form, class Type>
 inline const Type* Foam::Matrix<Form, Type>::operator[](const label i) const
 {
-#   ifdef FULLDEBUG
     checki(i);
-#   endif
-    return v_[i];
+    return v_ + i*nCols_;
+}
+
+
+template<class Form, class Type>
+inline Type* Foam::Matrix<Form, Type>::operator[](const label i)
+{
+    checki(i);
+    return v_ + i*nCols_;
 }
 
 
diff --git a/src/OpenFOAM/matrices/Matrix/MatrixIO.C b/src/OpenFOAM/matrices/Matrix/MatrixIO.C
index 8c52bdebc5d00d4535c803c3e592cde4ac0f9feb..13f613d74eb25ccae46434c6fce6514242f5074d 100644
--- a/src/OpenFOAM/matrices/Matrix/MatrixIO.C
+++ b/src/OpenFOAM/matrices/Matrix/MatrixIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,8 +34,8 @@ License
 template<class Form, class Type>
 Foam::Matrix<Form, Type>::Matrix(Istream& is)
 :
-    n_(0),
-    m_(0),
+    mRows_(0),
+    nCols_(0),
     v_(NULL)
 {
     operator>>(is, *this);
@@ -59,10 +59,10 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
 
     if (firstToken.isLabel())
     {
-        M.n_ = firstToken.labelToken();
-        M.m_ = readLabel(is);
+        M.mRows_ = firstToken.labelToken();
+        M.nCols_ = readLabel(is);
 
-        label nm = M.n_*M.m_;
+        label mn = M.mRows_*M.nCols_;
 
         // Read list contents depending on data format
         if (is.format() == IOstream::ASCII || !contiguous<Type>())
@@ -70,21 +70,21 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
             // Read beginning of contents
             char listDelimiter = is.readBeginList("Matrix");
 
-            if (nm)
+            if (mn)
             {
                 M.allocate();
-                Type* v = M.v_[0];
+                Type* v = M.v_;
 
                 if (listDelimiter == token::BEGIN_LIST)
                 {
                     label k = 0;
 
                     // loop over rows
-                    for (label i=0; i<M.n(); i++)
+                    for (label i=0; i<M.m(); i++)
                     {
                         listDelimiter = is.readBeginList("MatrixRow");
 
-                        for (label j=0; j<M.m(); j++)
+                        for (label j=0; j<M.n(); j++)
                         {
                             is >> v[k++];
 
@@ -109,7 +109,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
                         "reading the single entry"
                     );
 
-                    for (label i=0; i<nm; i++)
+                    for (label i=0; i<mn; i++)
                     {
                         v[i] = element;
                     }
@@ -121,12 +121,12 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
         }
         else
         {
-            if (nm)
+            if (mn)
             {
                 M.allocate();
-                Type* v = M.v_[0];
+                Type* v = M.v_;
 
-                is.read(reinterpret_cast<char*>(v), nm*sizeof(Type));
+                is.read(reinterpret_cast<char*>(v), mn*sizeof(Type));
 
                 is.fatalCheck
                 (
@@ -151,24 +151,24 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
 template<class Form, class Type>
 Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
 {
-    label nm = M.n_*M.m_;
+    label mn = M.mRows_*M.nCols_;
 
-    os  << M.n() << token::SPACE << M.m();
+    os  << M.m() << token::SPACE << M.n();
 
     // Write list contents depending on data format
     if (os.format() == IOstream::ASCII || !contiguous<Type>())
     {
-        if (nm)
+        if (mn)
         {
             bool uniform = false;
 
-            const Type* v = M.v_[0];
+            const Type* v = M.v_;
 
-            if (nm > 1 && contiguous<Type>())
+            if (mn > 1 && contiguous<Type>())
             {
                 uniform = true;
 
-                for (label i=0; i< nm; i++)
+                for (label i=0; i<mn; i++)
                 {
                     if (v[i] != v[0])
                     {
@@ -189,7 +189,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
                 // Write end of contents delimiter
                 os << token::END_BLOCK;
             }
-            else if (nm < 10 && contiguous<Type>())
+            else if (mn < 10 && contiguous<Type>())
             {
                 // Write size of list and start contents delimiter
                 os  << token::BEGIN_LIST;
@@ -197,12 +197,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
                 label k = 0;
 
                 // loop over rows
-                for (label i=0; i< M.n(); i++)
+                for (label i=0; i<M.m(); i++)
                 {
                     os  << token::BEGIN_LIST;
 
                     // Write row
-                    for (label j=0; j< M.m(); j++)
+                    for (label j=0; j< M.n(); j++)
                     {
                         if (j > 0) os << token::SPACE;
                         os << v[k++];
@@ -222,12 +222,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
                 label k = 0;
 
                 // loop over rows
-                for (label i=0; i< M.n(); i++)
+                for (label i=0; i<M.m(); i++)
                 {
                     os  << nl << token::BEGIN_LIST;
 
                     // Write row
-                    for (label j=0; j< M.m(); j++)
+                    for (label j=0; j< M.n(); j++)
                     {
                         os << nl << v[k++];
                     }
@@ -246,9 +246,9 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
     }
     else
     {
-        if (nm)
+        if (mn)
         {
-            os.write(reinterpret_cast<const char*>(M.v_[0]), nm*sizeof(Type));
+            os.write(reinterpret_cast<const char*>(M.v_), mn*sizeof(Type));
         }
     }
 
diff --git a/src/OpenFOAM/matrices/MatrixBlock/MatrixBlock.C b/src/OpenFOAM/matrices/MatrixBlock/MatrixBlock.C
new file mode 100644
index 0000000000000000000000000000000000000000..3aecbe8377d7f166184272081973669bf22a6fd1
--- /dev/null
+++ b/src/OpenFOAM/matrices/MatrixBlock/MatrixBlock.C
@@ -0,0 +1,342 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "MatrixBlock.H"
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class MatrixType>
+Foam::ConstMatrixBlock<MatrixType>::operator Field<cmptType>() const
+{
+    if (nCols_ != 1)
+    {
+        FatalErrorInFunction
+            << "Number of columns " << nCols_ << " != 1"
+            << abort(FatalError);
+    }
+
+    Field<cmptType> f(mRows_);
+
+    forAll(f, i)
+    {
+        f[i] = operator()(i, 0);
+    }
+
+    return f;
+}
+
+
+template<class MatrixType>
+Foam::MatrixBlock<MatrixType>::operator Field<cmptType>() const
+{
+    if (nCols_ != 1)
+    {
+        FatalErrorInFunction
+            << "Number of columns " << nCols_ << " != 1"
+            << abort(FatalError);
+    }
+
+    Field<cmptType> f(mRows_);
+
+    forAll(f, i)
+    {
+        f[i] = operator()(i, 0);
+    }
+
+    return f;
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class MatrixType>
+template<class Form>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const Matrix<Form, cmptType>& Mb
+)
+{
+    if (mRows_ != Mb.m() || nCols_ != Mb.n())
+    {
+        FatalErrorInFunction
+            << "Attempt to assign blocks of different sizes: "
+            << mRows_ << "x" << nCols_ << " != "
+            << Mb.m() << "x" << Mb.n()
+            << abort(FatalError);
+    }
+
+    for (label i=0; i<mRows_; i++)
+    {
+        for (label j=0; j<nCols_; j++)
+        {
+            (*this)(i, j) = Mb(i, j);
+        }
+    }
+}
+
+
+template<class MatrixType>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const ConstMatrixBlock<MatrixType>& Mb
+)
+{
+    if (this != &Mb)
+    {
+        if (mRows_ != Mb.m() || nCols_ != Mb.n())
+        {
+            FatalErrorInFunction
+                << "Attempt to assign blocks of different sizes: "
+                << mRows_ << "x" << nCols_ << " != "
+                << Mb.m() << "x" << Mb.n()
+                << abort(FatalError);
+        }
+
+        for (label i=0; i<mRows_; i++)
+        {
+            for (label j=0; j<nCols_; j++)
+            {
+                (*this)(i, j) = Mb(i, j);
+            }
+        }
+    }
+}
+
+
+template<class MatrixType>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const MatrixBlock<MatrixType>& Mb
+)
+{
+    if (this != &Mb)
+    {
+        if (mRows_ != Mb.m() || nCols_ != Mb.n())
+        {
+            FatalErrorInFunction
+                << "Attempt to assign blocks of different sizes: "
+                << mRows_ << "x" << nCols_ << " != "
+                << Mb.m() << "x" << Mb.n()
+                << abort(FatalError);
+        }
+
+        for (label i=0; i<mRows_; i++)
+        {
+            for (label j=0; j<nCols_; j++)
+            {
+                (*this)(i, j) = Mb(i, j);
+            }
+        }
+    }
+}
+
+
+template<class MatrixType>
+template<class MatrixType2>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const ConstMatrixBlock<MatrixType2>& Mb
+)
+{
+    if (this != &Mb)
+    {
+        if (mRows_ != Mb.m() || nCols_ != Mb.n())
+        {
+            FatalErrorInFunction
+                << "Attempt to assign blocks of different sizes: "
+                << mRows_ << "x" << nCols_ << " != "
+                << Mb.m() << "x" << Mb.n()
+                << abort(FatalError);
+        }
+
+        for (label i=0; i<mRows_; i++)
+        {
+            for (label j=0; j<nCols_; j++)
+            {
+                (*this)(i, j) = Mb(i, j);
+            }
+        }
+    }
+}
+
+
+template<class MatrixType>
+template<class MatrixType2>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const MatrixBlock<MatrixType2>& Mb
+)
+{
+    if (this != &Mb)
+    {
+        if (mRows_ != Mb.m() || nCols_ != Mb.n())
+        {
+            FatalErrorInFunction
+                << "Attempt to assign blocks of different sizes: "
+                << mRows_ << "x" << nCols_ << " != "
+                << Mb.m() << "x" << Mb.n()
+                << abort(FatalError);
+        }
+
+        for (label i=0; i<mRows_; i++)
+        {
+            for (label j=0; j<nCols_; j++)
+            {
+                (*this)(i, j) = Mb(i, j);
+            }
+        }
+    }
+}
+
+
+template<class MatrixType>
+template
+<
+    template<class, Foam::direction, Foam::direction> class MSBlock,
+    class SubTensor,
+    Foam::direction BRowStart,
+    Foam::direction BColStart
+>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const MSBlock<SubTensor, BRowStart, BColStart>& Mb
+)
+{
+    if (mRows_ != Mb.mRows || nCols_ != Mb.nCols)
+    {
+        FatalErrorInFunction
+            << "Attempt to assign blocks of different sizes: "
+            << mRows_ << "x" << nCols_ << " != "
+            << Mb.mRows << "x" << Mb.nCols
+            << abort(FatalError);
+    }
+
+    for (direction i=0; i<mRows_; ++i)
+    {
+        for (direction j=0; j<nCols_; ++j)
+        {
+            operator()(i, j) = Mb(i, j);
+        }
+    }
+}
+
+
+template<class MatrixType>
+template
+<
+    template<class, Foam::direction> class VSBlock,
+    class SubVector,
+    Foam::direction BStart
+>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const VSBlock<SubVector, BStart>& Mb
+)
+{
+    if (mRows_ != Mb.nComponents || nCols_ != 1)
+    {
+        FatalErrorInFunction
+            << "Attempt to assign blocks of different sizes: "
+            << mRows_ << "x" << nCols_ << " != "
+            << Mb.nComponents << "x" << 1
+            << abort(FatalError);
+    }
+
+    for (direction i=0; i<mRows_; ++i)
+    {
+        operator()(i, 0) = Mb[i];
+    }
+}
+
+
+template<class MatrixType>
+template<class MSForm, Foam::direction Nrows, Foam::direction Ncols>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const MatrixSpace<MSForm, cmptType, Nrows, Ncols>& ms
+)
+{
+    if (mRows_ != Nrows || nCols_ != Ncols)
+    {
+        FatalErrorInFunction
+            << "Attempt to assign blocks of different sizes: "
+            << mRows_ << "x" << nCols_ << " != "
+            << Nrows << "x" << Ncols
+            << abort(FatalError);
+    }
+
+    for (label i=0; i<mRows_; i++)
+    {
+        for (label j=0; j<nCols_; j++)
+        {
+            (*this)(i, j) = ms(i, j);
+        }
+    }
+}
+
+
+template<class MatrixType>
+template<class VSForm, Foam::direction Ncmpts>
+void Foam::MatrixBlock<MatrixType>::operator=
+(
+    const VectorSpace<VSForm, cmptType, Ncmpts>& ms
+)
+{
+    if (mRows_ != Ncmpts || nCols_ != 1)
+    {
+        FatalErrorInFunction
+            << "Attempt to assign blocks of different sizes: "
+            << mRows_ << "x" << nCols_ << " != "
+            << Ncmpts << "x" << 1
+            << abort(FatalError);
+    }
+
+    for (direction i=0; i<Ncmpts; ++i)
+    {
+        operator()(i, 0) = ms[i];
+    }
+}
+
+
+template<class MatrixType>
+void Foam::MatrixBlock<MatrixType>::operator=(const Field<cmptType>& f)
+{
+    if (mRows_ != f.size() || nCols_ != 1)
+    {
+        FatalErrorInFunction
+            << "Error: cannot assign blocks of different size (left is "
+            << mRows_ << "x" << nCols_ << " != "
+            << f.size() << "x" << 1
+            << abort(FatalError);
+    }
+
+    forAll(f, i)
+    {
+        operator()(i, 0) = f[i];
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/MatrixBlock/MatrixBlock.H b/src/OpenFOAM/matrices/MatrixBlock/MatrixBlock.H
new file mode 100644
index 0000000000000000000000000000000000000000..67ece198eed753163f70607948519885021b9480
--- /dev/null
+++ b/src/OpenFOAM/matrices/MatrixBlock/MatrixBlock.H
@@ -0,0 +1,240 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::MatrixBlock
+
+Description
+    A templated block of an (m x n) matrix of type \<MatrixType\>.
+
+        Foam::ConstMatrixBlock: block of a const matrix
+        Foam::MatrixBlock: block of a non-const matrix
+
+    The block may be assigned to a block of another matrix or to a VectorSpace
+    or MatrixSpace e.g. \c tensor.  Conversion of a column block to a \c
+    Field<T> is also provide.
+
+SourceFiles
+    MatrixBlock.C
+    MatrixBlockI.H
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef MatrixBlock_H
+#define MatrixBlock_H
+
+#include "Matrix.H"
+#include "MatrixSpace.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class ConstMatrixBlock Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class MatrixType>
+class ConstMatrixBlock
+{
+    // Private data
+
+        //- Const reference to the parent matrix
+        const MatrixType& matrix_;
+
+        // Block size
+        const label mRows_;
+        const label nCols_;
+
+        // Block location in parent matrix
+        const label rowStart_;
+        const label colStart_;
+
+public:
+
+    typedef typename MatrixType::cmptType cmptType;
+
+    // Constructors
+
+        //- Construct block for matrix, size and location
+        inline ConstMatrixBlock
+        (
+            const MatrixType& matrix,
+            const label m,
+            const label n,
+            const label mStart,
+            const label nStart
+        );
+
+
+    // Member Functions
+
+        //- Return the number of rows in the block
+        inline label m() const;
+
+        //- Return the number of columns in the block
+        inline label n() const;
+
+        //- (i, j) const element access operator
+        inline const cmptType& operator()
+        (
+            const label i,
+            const label j
+        ) const;
+
+        //- Convert a column of a matrix to a Field
+        operator Field<cmptType>() const;
+};
+
+
+/*---------------------------------------------------------------------------*\
+                          Class MatrixBlock Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class MatrixType>
+class MatrixBlock
+{
+    // Private data
+
+        //- Reference to the parent matrix
+        MatrixType& matrix_;
+
+        // Block size
+        const label mRows_;
+        const label nCols_;
+
+        // Block location in parent matrix
+        const label rowStart_;
+        const label colStart_;
+
+public:
+
+    typedef typename MatrixType::cmptType cmptType;
+
+    // Constructors
+
+        //- Construct block for matrix, size and location
+        inline MatrixBlock
+        (
+            MatrixType& matrix,
+            const label m,
+            const label n,
+            const label mStart,
+            const label nStart
+        );
+
+
+    // Member Functions
+
+        //- Return the number of rows in the block
+        inline label m() const;
+
+        //- Return the number of columns in the block
+        inline label n() const;
+
+        //- (i, j) const element access operator
+        inline const cmptType& operator()
+        (
+            const label i,
+            const label j
+        ) const;
+
+        //- (i, j) element access operator
+        inline cmptType& operator()(const label i, const label j);
+
+        //- Convert a column of a matrix to a Field
+        operator Field<cmptType>() const;
+
+
+    // Member operators
+
+        //- Assignment to a compatible matrix
+        template<class Form>
+        void operator=(const Matrix<Form, cmptType>&);
+
+        //- Assignment to a compatible const block
+        void operator=(const ConstMatrixBlock<MatrixType>&);
+
+        //- Assignment to a compatible block
+        void operator=(const MatrixBlock<MatrixType>&);
+
+        //- Assignment to a compatible const block
+        template<class MatrixType2>
+        void operator=(const ConstMatrixBlock<MatrixType2>&);
+
+        //- Assignment to a compatible block
+        template<class MatrixType2>
+        void operator=(const MatrixBlock<MatrixType2>&);
+
+        //- Assignment to a compatible MatrixSpace
+        template<class MSForm, direction Nrows, direction Ncols>
+        void operator=(const MatrixSpace<MSForm, cmptType, Nrows, Ncols>&);
+
+        //- Assignment to a compatible MatrixSpace block
+        template
+        <
+            template<class, direction, direction> class Block,
+            class SubTensor,
+            direction BRowStart,
+            direction BColStart
+        >
+        void operator=(const Block<SubTensor, BRowStart, BColStart>&);
+
+        //- Assignment to a compatible VectorSpace (column-vector)
+        template<class VSForm, direction Ncmpts>
+        void operator=(const VectorSpace<VSForm, cmptType, Ncmpts>&);
+
+        //- Assignment to a compatible VectorSpace (column-vector) block
+        template
+        <
+            template<class, direction> class Block,
+            class SubVector,
+            direction BStart
+        >
+        void operator=(const Block<SubVector, BStart>&);
+
+        //- Assignment to a Field (column-vector)
+        void operator=(const Field<cmptType>&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "MatrixBlockI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "MatrixBlock.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/MatrixBlock/MatrixBlockI.H b/src/OpenFOAM/matrices/MatrixBlock/MatrixBlockI.H
new file mode 100644
index 0000000000000000000000000000000000000000..e764dea03203dd094f7825e571b99eb5db63e629
--- /dev/null
+++ b/src/OpenFOAM/matrices/MatrixBlock/MatrixBlockI.H
@@ -0,0 +1,203 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class MatrixType>
+Foam::ConstMatrixBlock<MatrixType>::ConstMatrixBlock
+(
+    const MatrixType& matrix,
+    const label m,
+    const label n,
+    const label mStart,
+    const label nStart
+)
+:
+    matrix_(matrix),
+    mRows_(m),
+    nCols_(n),
+    rowStart_(mStart),
+    colStart_(nStart)
+{
+    #ifdef FULLDEBUG
+    if
+    (
+        rowStart_ + mRows_ > matrix.m()
+     || colStart_ + nCols_ > matrix.n()
+    )
+    {
+        FatalErrorInFunction
+            << "Block addresses outside matrix"
+            << abort(FatalError);
+    }
+    #endif
+}
+
+
+template<class MatrixType>
+Foam::MatrixBlock<MatrixType>::MatrixBlock
+(
+    MatrixType& matrix,
+    const label m,
+    const label n,
+    const label mStart,
+    const label nStart
+)
+:
+    matrix_(matrix),
+    mRows_(m),
+    nCols_(n),
+    rowStart_(mStart),
+    colStart_(nStart)
+{
+    #ifdef FULLDEBUG
+    if
+    (
+        rowStart_ + mRows_ > matrix.m()
+     || colStart_ + nCols_ > matrix.n()
+    )
+    {
+        FatalErrorInFunction
+            << "Block addresses outside matrix"
+            << abort(FatalError);
+    }
+    #endif
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class MatrixType>
+inline Foam::label Foam::ConstMatrixBlock<MatrixType>::m() const
+{
+    return mRows_;
+}
+
+
+template<class MatrixType>
+inline Foam::label Foam::ConstMatrixBlock<MatrixType>::n() const
+{
+    return nCols_;
+}
+
+
+template<class MatrixType>
+inline Foam::label Foam::MatrixBlock<MatrixType>::m() const
+{
+    return mRows_;
+}
+
+
+template<class MatrixType>
+inline Foam::label Foam::MatrixBlock<MatrixType>::n() const
+{
+    return nCols_;
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class MatrixType>
+inline const typename MatrixType::cmptType&
+Foam::ConstMatrixBlock<MatrixType>::operator()
+(
+    const label i,
+    const label j
+) const
+{
+    #ifdef FULLDEBUG
+    if (i<0 || i>=mRows_)
+    {
+        FatalErrorInFunction
+            << "Index " << i << " out of range 0 ... " << mRows_-1
+            << abort(FatalError);
+    }
+    if (j<0 || j>=nCols_)
+    {
+        FatalErrorInFunction
+            << "Index " << j << " out of range 0 ... " << nCols_-1
+            << abort(FatalError);
+    }
+    #endif
+
+    return matrix_(i + rowStart_, j + colStart_);
+}
+
+
+template<class MatrixType>
+inline const typename MatrixType::cmptType&
+Foam::MatrixBlock<MatrixType>::operator()
+(
+    const label i,
+    const label j
+) const
+{
+    #ifdef FULLDEBUG
+    if (i<0 || i>=mRows_)
+    {
+        FatalErrorInFunction
+            << "Index " << i << " out of range 0 ... " << mRows_-1
+            << abort(FatalError);
+    }
+    if (j<0 || j>=nCols_)
+    {
+        FatalErrorInFunction
+            << "Index " << j << " out of range 0 ... " << nCols_-1
+            << abort(FatalError);
+    }
+    #endif
+
+    return matrix_(i + rowStart_, j + colStart_);
+}
+
+
+template<class MatrixType>
+inline typename MatrixType::cmptType&
+Foam::MatrixBlock<MatrixType>::operator()
+(
+    const label i,
+    const label j
+)
+{
+    #ifdef FULLDEBUG
+    if (i<0 || i>=mRows_)
+    {
+        FatalErrorInFunction
+            << "Index " << i << " out of range 0 ... " << mRows_-1
+            << abort(FatalError);
+    }
+    if (j<0 || j>=nCols_)
+    {
+        FatalErrorInFunction
+            << "Index " << j << " out of range 0 ... " << nCols_-1
+            << abort(FatalError);
+    }
+    #endif
+
+    return matrix_(i + rowStart_, j + colStart_);
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/QRMatrix/QRMatrix.C b/src/OpenFOAM/matrices/QRMatrix/QRMatrix.C
new file mode 100644
index 0000000000000000000000000000000000000000..165056d68edd8466a5a5d96282d35b33aaa717f3
--- /dev/null
+++ b/src/OpenFOAM/matrices/QRMatrix/QRMatrix.C
@@ -0,0 +1,249 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "QRMatrix.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class MatrixType>
+Foam::QRMatrix<MatrixType>::QRMatrix(const MatrixType& M)
+{
+    decompose(M);
+}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+template<class MatrixType>
+void Foam::QRMatrix<MatrixType>::decompose(const MatrixType& M)
+{
+    const label m = M.m();
+    const label n = M.n();
+
+    // Initialize the R-matrix to M
+    R_ = M;
+
+    // Initialize the Q-matrix to I
+    Q_.setSize(m);
+    Q_ = I;
+
+    // Pre-allocate temporary storage for the Householder steps
+    QMatrixType Qk(m);
+    QMatrixType Rk(m);
+    Field<cmptType> uk(m);
+
+    for (label k=0; k<n; k++)
+    {
+        // alpha = -|column k of Rk|
+        cmptType alpha = Zero;
+        for (label bi=k; bi<m; bi++)
+        {
+            alpha += sqr(R_(bi, k));
+        }
+        alpha = sqrt(alpha);
+
+        if (R_(k, k) > 0)
+        {
+            alpha = -alpha;
+        }
+
+        // uk = column k of Rk - alpha*ek
+        // rSumSqrUk = 2/sum(sqr(uk))
+        uk[k] = R_(k, k) - alpha;
+        cmptType rSumSqrUk = sqr(uk[k]);
+        for (label bi=k+1; bi<m; bi++)
+        {
+            uk[bi] = R_(bi, k);
+            rSumSqrUk += sqr(uk[bi]);
+        }
+        rSumSqrUk = 2/rSumSqrUk;
+
+        // Qk = I - 2*u*uT/sum(sqr(uk))
+        for (label bi=k; bi<m; bi++)
+        {
+            for (label bj=k; bj<m; bj++)
+            {
+                Qk(bi, bj) = -rSumSqrUk*uk[bi]*uk[bj];
+            }
+            Qk(bi, bi) += 1;
+        }
+
+        // Rk = Qk*R
+        for (label bi=k; bi<m; bi++)
+        {
+            for (label bk=k; bk<n; bk++)
+            {
+                Rk(bi, bk) = Zero;
+                for (label bj=k; bj<n; bj++)
+                {
+                    Rk(bi, bk) += Qk(bi, bj)*R_(bj, bk);
+                }
+            }
+        }
+
+        // Ensure diagonal is positive
+        if (R_(k, k) < 0)
+        {
+            // R = -Rk
+            // Q = -Q
+            for (label bi=k; bi<m; bi++)
+            {
+                for (label bj=k; bj<n; bj++)
+                {
+                    R_(bi, bj) = -Rk(bi, bj);
+                }
+                for (label bj=k; bj<m; bj++)
+                {
+                    Q_(bi, bj) = -Q_(bi, bj);
+                }
+            }
+        }
+        else
+        {
+            // R = Rk
+            for (label bi=k; bi<m; bi++)
+            {
+                for (label bj=k; bj<n; bj++)
+                {
+                    R_(bi, bj) = Rk(bi, bj);
+                }
+            }
+        }
+
+        // Q = Q*Qk (using Rk as temporary storage)
+        for (label bi=0; bi<m; bi++)
+        {
+            for (label bk=k; bk<m; bk++)
+            {
+                Rk(bi, bk) = Zero;
+                for (label bj=k; bj<m; bj++)
+                {
+                    Rk(bi, bk) += Q_(bi, bj)*Qk(bj, bk);
+                }
+            }
+        }
+        for (label bi=0; bi<m; bi++)
+        {
+            for (label bj=k; bj<n; bj++)
+            {
+                Q_(bi, bj) = Rk(bi, bj);
+            }
+        }
+    }
+}
+
+
+template<class MatrixType>
+void Foam::QRMatrix<MatrixType>::solvex
+(
+    Field<cmptType>& x
+) const
+{
+    const label n = R_.n();
+
+    for (int i=n-1; i>=0; i--)
+    {
+        cmptType sum = x[i];
+
+        for (label j=i+1; j<n; j++)
+        {
+            sum -= x[j]*R_(i, j);
+        }
+
+        if (mag(R_(i, i)) < SMALL)
+        {
+            FatalErrorInFunction
+                << "Back-substitution failed due to small diagonal"
+                << abort(FatalError);
+        }
+
+        x[i] = sum/R_(i, i);
+    }
+}
+
+
+template<class MatrixType>
+void Foam::QRMatrix<MatrixType>::solve
+(
+    Field<cmptType>& x,
+    const Field<cmptType>& source
+) const
+{
+    const label m = Q_.m();
+
+    // x = Q_.T()*source;
+    for (label i=0; i<m; i++)
+    {
+        x[i] = 0;
+        for (label j=0; j<m; j++)
+        {
+            x[i] += Q_(j, i)*source[j];
+        }
+    }
+
+    solvex(x);
+}
+
+
+template<class MatrixType>
+Foam::tmp<Foam::Field<typename MatrixType::cmptType>>
+Foam::QRMatrix<MatrixType>::solve
+(
+    const Field<cmptType>& source
+) const
+{
+    tmp<Field<cmptType>> tx(new Field<cmptType>(Q_.m()));
+    Field<cmptType>& x = tx.ref();
+
+    solve(x, source);
+
+    return tx;
+}
+
+
+template<class MatrixType>
+typename Foam::QRMatrix<MatrixType>::QMatrixType
+Foam::QRMatrix<MatrixType>::inv() const
+{
+    const label m = Q_.m();
+
+    Field<cmptType> x(m);
+    QMatrixType inv(m);
+
+    for (label i=0; i<m; i++)
+    {
+        for (label j=0; j<m; j++)
+        {
+            x[j] = Q_(i, j);
+        }
+        solvex(x);
+        inv.block(m, 1, 0, i) = x;
+    }
+
+    return inv;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/QRMatrix/QRMatrix.H b/src/OpenFOAM/matrices/QRMatrix/QRMatrix.H
new file mode 100644
index 0000000000000000000000000000000000000000..e3dab46b4f2c61e0f7478265e3cb4038f72435d7
--- /dev/null
+++ b/src/OpenFOAM/matrices/QRMatrix/QRMatrix.H
@@ -0,0 +1,133 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::QRMatrix
+
+Description
+    Class templated on matrix type to perform the QR decomposition using
+    Householder reflections on a square or rectangular matrix.
+
+SourceFiles
+    QRMatrixI.H
+    QRMatrix.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef QRMatrix_H
+#define QRMatrix_H
+
+#include "SquareMatrix.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class QRMatrix Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class MatrixType>
+class QRMatrix
+{
+
+public:
+
+    typedef typename MatrixType::cmptType cmptType;
+    typedef SquareMatrix<cmptType> QMatrixType;
+    typedef MatrixType RMatrixType;
+
+private:
+
+    // Private data
+
+        //- The Q-matrix
+        QMatrixType Q_;
+
+        //- The R-matrix
+        RMatrixType R_;
+
+
+    // Private member functions
+
+        //- Solve the linear system with the Field argument x initialized to
+        //  the appropriate transformed source (e.g. Q.T()*source)
+        //  and return the solution in x
+        void solvex(Field<cmptType>& x) const;
+
+
+public:
+
+    // Constructors
+
+        //- Construct null
+        inline QRMatrix();
+
+        //- Construct decomposing given matrix
+        QRMatrix(const MatrixType& M);
+
+
+    // Member Functions
+
+        //- Return Q-matrix
+        inline const QMatrixType& Q() const;
+
+        //- Return R-matrix
+        inline const RMatrixType& R() const;
+
+        //- Decompose given matrix
+        void decompose(const MatrixType& M);
+
+        //- Solve the linear system with the given source
+        //  and returning the solution in the Field argument x
+        void solve(Field<cmptType>& x, const Field<cmptType>& source) const;
+
+        //- Solve the linear system with the given source
+        //  returning the solution
+        tmp<Field<cmptType>> solve(const Field<cmptType>& source) const;
+
+        //- Return the inverse of a square matrix
+        QMatrixType inv() const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "QRMatrixI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "QRMatrix.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/QRMatrix/QRMatrixI.H b/src/OpenFOAM/matrices/QRMatrix/QRMatrixI.H
new file mode 100644
index 0000000000000000000000000000000000000000..1d9ca4b620eb3bed47dd6255f2b20dffdde71deb
--- /dev/null
+++ b/src/OpenFOAM/matrices/QRMatrix/QRMatrixI.H
@@ -0,0 +1,51 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class MatrixType>
+inline Foam::QRMatrix<MatrixType>::QRMatrix()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class MatrixType>
+inline const typename Foam::QRMatrix<MatrixType>::QMatrixType&
+Foam::QRMatrix<MatrixType>::Q() const
+{
+    return Q_;
+}
+
+
+template<class MatrixType>
+inline const typename Foam::QRMatrix<MatrixType>::RMatrixType&
+Foam::QRMatrix<MatrixType>::R() const
+{
+    return R_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H
index ca91c9ca5b722d61a170eadd037a70d40e71a123..dd7b5bb8ca93a0179804327894ca4d80f342b8a7 100644
--- a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H
+++ b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,6 +39,7 @@ SourceFiles
 #define RectangularMatrix_H
 
 #include "Matrix.H"
+#include "SquareMatrix.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -65,17 +66,69 @@ public:
         //- Construct given number of rows and columns,
         inline RectangularMatrix(const label m, const label n);
 
+        //- Construct from a block of another matrix
+        template<class MatrixType>
+        inline RectangularMatrix(const ConstMatrixBlock<MatrixType>&);
+
+        //- Construct from a block of another matrix
+        template<class MatrixType>
+        inline RectangularMatrix(const MatrixBlock<MatrixType>&);
+
+        //- Construct with given number of rows and columns
+        //  initializing all elements to zero
+        inline RectangularMatrix(const label m, const label n, const zero);
+
         //- Construct with given number of rows and columns
         //  and value for all elements.
         inline RectangularMatrix(const label m, const label n, const Type&);
 
+        //- Construct as copy of a square matrix
+        inline RectangularMatrix(const SquareMatrix<Type>&);
+
         //- Construct from Istream.
         inline RectangularMatrix(Istream&);
 
         //- Clone
-        inline autoPtr<RectangularMatrix<Type> > clone() const;
+        inline autoPtr<RectangularMatrix<Type>> clone() const;
+
+
+    // Member operators
+
+        //- Assignment of all elements to zero
+        void operator=(const zero);
+};
+
+
+// Global functions and operators
+
+template<class Type>
+class typeOfInnerProduct<Type, RectangularMatrix<Type>, RectangularMatrix<Type>>
+{
+public:
+
+    typedef RectangularMatrix<Type> type;
 };
 
+template<class Type>
+class typeOfInnerProduct<Type, RectangularMatrix<Type>, SquareMatrix<Type>>
+{
+public:
+
+    typedef RectangularMatrix<Type> type;
+};
+
+template<class Type>
+class typeOfInnerProduct<Type, SquareMatrix<Type>, RectangularMatrix<Type>>
+{
+public:
+
+    typedef RectangularMatrix<Type> type;
+};
+
+
+template<class Type>
+RectangularMatrix<Type> outer(const Field<Type>& f1, const Field<Type>& f2);
+
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H
index 2319b778a1a9221e45dd711d3d711525fd7e7d22..e07888e25b220b672ad809dd04fcef960677dae1 100644
--- a/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H
+++ b/src/OpenFOAM/matrices/RectangularMatrix/RectangularMatrixI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,6 +31,7 @@ inline Foam::RectangularMatrix<Type>::RectangularMatrix()
     Matrix<RectangularMatrix<Type>, Type>()
 {}
 
+
 template<class Type>
 inline Foam::RectangularMatrix<Type>::RectangularMatrix
 (
@@ -41,6 +42,41 @@ inline Foam::RectangularMatrix<Type>::RectangularMatrix
     Matrix<RectangularMatrix<Type>, Type>(m, n)
 {}
 
+
+template<class Type>
+template<class MatrixType>
+inline Foam::RectangularMatrix<Type>::RectangularMatrix
+(
+    const ConstMatrixBlock<MatrixType>& block
+)
+:
+    Matrix<RectangularMatrix<Type>, Type>(block)
+{}
+
+
+template<class Type>
+template<class MatrixType>
+inline Foam::RectangularMatrix<Type>::RectangularMatrix
+(
+    const MatrixBlock<MatrixType>& block
+)
+:
+    Matrix<RectangularMatrix<Type>, Type>(block)
+{}
+
+
+template<class Type>
+inline Foam::RectangularMatrix<Type>::RectangularMatrix
+(
+    const label m,
+    const label n,
+    const zero
+)
+:
+    Matrix<RectangularMatrix<Type>, Type>(m, n, Zero)
+{}
+
+
 template<class Type>
 inline Foam::RectangularMatrix<Type>::RectangularMatrix
 (
@@ -52,21 +88,74 @@ inline Foam::RectangularMatrix<Type>::RectangularMatrix
     Matrix<RectangularMatrix<Type>, Type>(m, n, t)
 {}
 
+
+template<class Type>
+inline Foam::RectangularMatrix<Type>::RectangularMatrix
+(
+    const SquareMatrix<Type>& SM
+)
+:
+    Matrix<RectangularMatrix<Type>, Type>(SM)
+{}
+
+
 template<class Type>
 inline Foam::RectangularMatrix<Type>::RectangularMatrix(Istream& is)
 :
     Matrix<RectangularMatrix<Type>, Type>(is)
 {}
 
+
 template<class Type>
-inline Foam::autoPtr<Foam::RectangularMatrix<Type> >
+inline Foam::autoPtr<Foam::RectangularMatrix<Type>>
 Foam::RectangularMatrix<Type>::clone() const
 {
-    return autoPtr<RectangularMatrix<Type> >
+    return autoPtr<RectangularMatrix<Type>>
     (
         new RectangularMatrix<Type>(*this)
     );
 }
 
 
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::RectangularMatrix<Type>::operator=(const zero)
+{
+    Matrix<RectangularMatrix<Type>, Type>::operator=(Zero);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+inline Foam::RectangularMatrix<Type> outer
+(
+    const Field<Type>& f1,
+    const Field<Type>& f2
+)
+{
+    RectangularMatrix<Type> f1f2T(f1.size(), f2.size());
+
+    for (label i=0; i<f1f2T.m(); i++)
+    {
+        for (label j=0; j<f1f2T.n(); j++)
+        {
+            f1f2T(i, j) = f1[i]*f2[j];
+        }
+    }
+
+    return f1f2T;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C
index 439257fcb6a9f9b5ee28416558c058303c541c11..69683ce96d6f4cfebbc045f0d9de1aead58a9988 100644
--- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C
+++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,11 +35,11 @@ Foam::scalar Foam::detDecomposed
     const label sign
 )
 {
-    scalar diagProduct = 1.0;
+    Type diagProduct = pTraits<Type>::one;
 
-    for (label i = 0; i < matrix.n(); ++i)
+    for (label i=0; i<matrix.m(); i++)
     {
-        diagProduct *= matrix[i][i];
+        diagProduct *= matrix(i, i);
     }
 
     return sign*diagProduct;
@@ -51,7 +51,7 @@ Foam::scalar Foam::det(const SquareMatrix<Type>& matrix)
 {
     SquareMatrix<Type> matrixTmp = matrix;
 
-    labelList pivotIndices(matrix.n());
+    labelList pivotIndices(matrix.m());
     label sign;
     LUDecompose(matrixTmp, pivotIndices, sign);
 
@@ -62,7 +62,7 @@ Foam::scalar Foam::det(const SquareMatrix<Type>& matrix)
 template<class Type>
 Foam::scalar Foam::det(SquareMatrix<Type>& matrix)
 {
-    labelList pivotIndices(matrix.n());
+    labelList pivotIndices(matrix.m());
     label sign;
     LUDecompose(matrix, pivotIndices, sign);
 
diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H
index 531b649588b27286ea9f3316e0fbf429f8ff46cc..443ac00bd2b436a84a5607b7e460ad1244fe5766 100644
--- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H
+++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,12 +38,19 @@ SourceFiles
 #define SquareMatrix_H
 
 #include "Matrix.H"
+#include "Identity.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
+// Forward declaration of friend functions and operators
+
+template<class Type>
+class RectangularMatrix;
+
+
 /*---------------------------------------------------------------------------*\
                            Class Matrix Declaration
 \*---------------------------------------------------------------------------*/
@@ -64,24 +71,60 @@ public:
         //- Construct given number of rows/columns.
         inline SquareMatrix(const label n);
 
-        //- Construct given number of rows and columns,
-        //  It checks that m == n.
-        inline SquareMatrix(const label m, const label n);
+        //- Construct from a block of another matrix
+        template<class MatrixType>
+        inline SquareMatrix(const ConstMatrixBlock<MatrixType>&);
+
+        //- Construct from a block of another matrix
+        template<class MatrixType>
+        inline SquareMatrix(const MatrixBlock<MatrixType>&);
+
+        //- Construct given number of rows/columns
+        //  initializing all elements to zero
+        inline SquareMatrix(const label n, const zero);
+
+        //- Construct given number of rows and columns (checked to be equal)
+        //  initializing all elements to zero
+        inline SquareMatrix(const label m, const label n, const zero);
+
+        //- Construct given number of rows/columns
+        //  Initializing to the identity matrix
+        inline SquareMatrix(const label n, const Identity<Type>);
 
         //- Construct with given number of rows and rows
-        //  and value for all elements.
-        //  It checks that m == n.
-        inline SquareMatrix(const label m, const label n, const Type&);
+        //  initializing all elements to the given value
+        inline SquareMatrix(const label n, const Type&);
+
+        //- Construct as copy of a RectangularMatrix
+        //  which is checked to be square
+        inline explicit SquareMatrix(const RectangularMatrix<Type>&);
 
         //- Construct from Istream.
         inline SquareMatrix(Istream&);
 
         //- Clone
-        inline autoPtr<SquareMatrix<Type> > clone() const;
+        inline autoPtr<SquareMatrix<Type>> clone() const;
+
+
+    // Member Functions
+
+        // Edit
+
+            //- Resize the matrix preserving the elements
+            inline void setSize(const label m);
+
+
+    // Member operators
+
+        //- Assignment of all elements to zero
+        void operator=(const zero);
+
+        //- Assignment elements to the
+        void operator=(const Identity<Type>);
 };
 
 
-// Global functions
+// Global functions and operators
 
 //- Return the LU decomposed SquareMatrix det
 template<class Type>
@@ -95,6 +138,14 @@ scalar det(const SquareMatrix<Type>&);
 template<class Type>
 scalar det(SquareMatrix<Type>&);
 
+template<class Type>
+class typeOfInnerProduct<Type, SquareMatrix<Type>, SquareMatrix<Type>>
+{
+public:
+
+    typedef SquareMatrix<Type> type;
+};
+
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -102,12 +153,12 @@ scalar det(SquareMatrix<Type>&);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "SquareMatrixI.H"
+#include "SquareMatrixI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SquareMatrix.C"
+    #include "SquareMatrix.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H
index 243d31904e3bd620ea79760df6f2460608c57341..12ecd2530f854aef5df4453b1598c465376a0531 100644
--- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H
+++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrixI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,53 +31,186 @@ inline Foam::SquareMatrix<Type>::SquareMatrix()
     Matrix<SquareMatrix<Type>, Type>()
 {}
 
+
 template<class Type>
 inline Foam::SquareMatrix<Type>::SquareMatrix(const label n)
 :
     Matrix<SquareMatrix<Type>, Type>(n, n)
 {}
 
+
+template<class Type>
+template<class MatrixType>
+inline Foam::SquareMatrix<Type>::SquareMatrix
+(
+    const ConstMatrixBlock<MatrixType>& block
+)
+:
+    Matrix<SquareMatrix<Type>, Type>(block)
+{}
+
+
+template<class Type>
+template<class MatrixType>
+inline Foam::SquareMatrix<Type>::SquareMatrix
+(
+    const MatrixBlock<MatrixType>& block
+)
+:
+    Matrix<SquareMatrix<Type>, Type>(block)
+{}
+
+
 template<class Type>
-inline Foam::SquareMatrix<Type>::SquareMatrix(const label m, const label n)
+inline Foam::SquareMatrix<Type>::SquareMatrix
+(
+    const label n,
+    const zero
+)
 :
-    Matrix<SquareMatrix<Type>, Type>(m, n)
+    Matrix<SquareMatrix<Type>, Type>(n, n, Zero)
+{}
+
+
+template<class Type>
+inline Foam::SquareMatrix<Type>::SquareMatrix
+(
+    const label m,
+    const label n,
+    const zero
+)
+:
+    Matrix<SquareMatrix<Type>, Type>(m, n, Zero)
 {
     if (m != n)
     {
         FatalErrorInFunction
-          << "m != n for constructing a square matrix" << exit(FatalError);
+            << "Attempt to construct a square matrix "
+            << m << " x " << n << nl
+            << abort(FatalError);
     }
 }
 
+
+template<class Type>
+inline Foam::SquareMatrix<Type>::SquareMatrix
+(
+    const label n,
+    const Identity<Type>
+)
+:
+    Matrix<SquareMatrix<Type>, Type>(n, n, Zero)
+{
+    for (label i=0; i<n; i++)
+    {
+        this->operator()(i, i) = Type(I);
+    }
+}
+
+
 template<class Type>
 inline Foam::SquareMatrix<Type>::SquareMatrix
 (
-    const label m,
     const label n,
     const Type& t
 )
 :
-    Matrix<SquareMatrix<Type>, Type>(m, n, t)
+    Matrix<SquareMatrix<Type>, Type>(n, n, t)
+{}
+
+
+template<class Type>
+inline Foam::SquareMatrix<Type>::SquareMatrix
+(
+    const RectangularMatrix<Type>& RM
+)
+:
+    Matrix<SquareMatrix<Type>, Type>(RM)
 {
-    if (m != n)
+    if (this->m() != this->n())
     {
         FatalErrorInFunction
-          << "m != n for constructing a square matrix" << exit(FatalError);
+            << "Attempt to construct a square matrix from a rectangular matrix "
+            << this->m() << " x " << this->n() << nl
+            << abort(FatalError);
     }
 }
 
+
 template<class Type>
 inline Foam::SquareMatrix<Type>::SquareMatrix(Istream& is)
 :
     Matrix<SquareMatrix<Type>, Type>(is)
 {}
 
+
 template<class Type>
-inline Foam::autoPtr<Foam::SquareMatrix<Type> >
+inline Foam::autoPtr<Foam::SquareMatrix<Type>>
 Foam::SquareMatrix<Type>::clone() const
 {
-    return autoPtr<SquareMatrix<Type> >(new SquareMatrix<Type>(*this));
+    return autoPtr<SquareMatrix<Type>>(new SquareMatrix<Type>(*this));
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+inline void Foam::SquareMatrix<Type>::setSize(const label m)
+{
+    Matrix<SquareMatrix<Type>, Type>::setSize(m, m);
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::SquareMatrix<Type>::operator=(const zero)
+{
+    Matrix<SquareMatrix<Type>, Type>::operator=(Zero);
+}
+
+
+template<class Type>
+void Foam::SquareMatrix<Type>::operator=(const Identity<Type>)
+{
+    Matrix<SquareMatrix<Type>, Type>::operator=(Zero);
+    for (label i=0; i<this->n(); i++)
+    {
+        this->operator()(i, i) = Type(I);
+    }
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+inline Foam::SquareMatrix<Type> symmOuter
+(
+    const Field<Type>& f1,
+    const Field<Type>& f2
+)
+{
+    SquareMatrix<Type> f1f2T(f1.size());
+
+    for (label i=0; i<f1f2T.m(); i++)
+    {
+        for (label j=0; j<f1f2T.n(); j++)
+        {
+            f1f2T(i, j) = f1[i]*f2[j];
+        }
+    }
+
+    return f1f2T;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C
index bb6bea65c7a3a0cb0712752dca88ca0201b99af1..879f8ac7e12cd6d07abdae5fab4f5280479599e4 100644
--- a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C
+++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,26 +33,41 @@ Foam::SymmetricSquareMatrix<Type> Foam::invDecomposed
     const SymmetricSquareMatrix<Type>& matrix
 )
 {
-    SymmetricSquareMatrix<Type> inv(matrix.n(), matrix.n(), 0.0);
+    const label n = matrix.n();
 
-    for (label i = 0; i < matrix.n(); ++i)
+    SymmetricSquareMatrix<Type> inv(n, Zero);
+
+    for (label i=0; i<n; i++)
     {
-        inv[i][i] = 1.0/matrix[i][i];
+        inv(i, i) = 1.0/matrix(i, i);
 
-        for (label j = 0; j < i; ++j)
+        for (label j=0; j<i; j++)
         {
-            scalar sum = 0.0;
+            Type sum = Zero;
 
-            for (label k = j; k < i; k++)
+            for (label k=j; k<i; k++)
             {
-                sum -= matrix[i][k]*inv[k][j];
+                sum -= matrix(i, k)*inv(k, j);
             }
 
-            inv[i][j] = sum/matrix[i][i];
+            inv(i, j) = sum/matrix(i, i);
+        }
+    }
+
+    SymmetricSquareMatrix<Type> result(n, Zero);
+
+    for (label k=0; k<n; k++)
+    {
+        for (label i=0; i <= k; i++)
+        {
+            for (label j=0; j <= k; j++)
+            {
+                result(i, j) += inv(k, i)*inv(k, j);
+            }
         }
     }
 
-    return inv.T()*inv;
+    return result;
 }
 
 
@@ -63,7 +78,6 @@ Foam::SymmetricSquareMatrix<Type> Foam::inv
 )
 {
     SymmetricSquareMatrix<Type> matrixTmp(matrix);
-
     LUDecompose(matrixTmp);
 
     return invDecomposed(matrixTmp);
@@ -71,13 +85,13 @@ Foam::SymmetricSquareMatrix<Type> Foam::inv
 
 
 template<class Type>
-Foam::scalar Foam::detDecomposed(const SymmetricSquareMatrix<Type>& matrix)
+Type Foam::detDecomposed(const SymmetricSquareMatrix<Type>& matrix)
 {
-    scalar diagProduct = 1.0;
+    Type diagProduct = pTraits<Type>::one;
 
-    for (label i = 0; i < matrix.n(); ++i)
+    for (label i=0; i<matrix.m(); i++)
     {
-        diagProduct *= matrix[i][i];
+        diagProduct *= matrix(i, i);
     }
 
     return sqr(diagProduct);
@@ -85,10 +99,9 @@ Foam::scalar Foam::detDecomposed(const SymmetricSquareMatrix<Type>& matrix)
 
 
 template<class Type>
-Foam::scalar Foam::det(const SymmetricSquareMatrix<Type>& matrix)
+Type Foam::det(const SymmetricSquareMatrix<Type>& matrix)
 {
-    SymmetricSquareMatrix<Type> matrixTmp = matrix;
-
+    SymmetricSquareMatrix<Type> matrixTmp(matrix);
     LUDecompose(matrixTmp);
 
     return detDecomposed(matrixTmp);
diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H
index 69832500784a49cf54cbe845de2227025e62a14c..543d16b8482fe16846cd03a2e3dc12278a1ec367 100644
--- a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H
+++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,6 +38,7 @@ SourceFiles
 #define SymmetricSquareMatrix_H
 
 #include "SquareMatrix.H"
+#include "Identity.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -64,25 +65,21 @@ public:
         //- Construct given number of rows/columns.
         inline SymmetricSquareMatrix(const label n);
 
-        //- Construct with given number of rows/columns
-        inline SymmetricSquareMatrix(const label m, const label n);
+        //- Construct given number of rows/columns, initializing to zero
+        inline SymmetricSquareMatrix(const label n, const zero);
+
+        //- Construct given number of rows/columns,
+        inline SymmetricSquareMatrix(const label n, const Identity<Type>);
 
         //- Construct with given number of rows/columns
-        //  and value for all elements.
-        inline SymmetricSquareMatrix(const label m, const label n, const Type&);
+        //  initializing all elements to the given value
+        inline SymmetricSquareMatrix(const label n, const Type&);
 
         //- Construct from Istream.
         inline SymmetricSquareMatrix(Istream&);
 
         //- Clone
-        inline autoPtr<SymmetricSquareMatrix<Type> > clone() const;
-
-
-        //- Return subscript-checked row of Matrix.
-        inline Type& operator()(const label r, const label c);
-
-        //- Return subscript-checked row of constant Matrix.
-        inline const Type& operator()(const label r, const label c) const;
+        inline autoPtr<SymmetricSquareMatrix<Type>> clone() const;
 };
 
 
@@ -98,11 +95,11 @@ SymmetricSquareMatrix<Type> inv(const SymmetricSquareMatrix<Type>&);
 
 //- Return the LU decomposed SymmetricSquareMatrix det
 template<class Type>
-scalar detDecomposed(const SymmetricSquareMatrix<Type>&);
+Type detDecomposed(const SymmetricSquareMatrix<Type>&);
 
 //- Return the SymmetricSquareMatrix det
 template<class Type>
-scalar det(const SymmetricSquareMatrix<Type>&);
+Type det(const SymmetricSquareMatrix<Type>&);
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -111,12 +108,12 @@ scalar det(const SymmetricSquareMatrix<Type>&);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "SymmetricSquareMatrixI.H"
+    #include "SymmetricSquareMatrixI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SymmetricSquareMatrix.C"
+    #include "SymmetricSquareMatrix.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H
index b067cc2669b03a9c5625b951a675f29946947256..333da73f5d4a6139eede13f0953c478333c9903c 100644
--- a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H
+++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,17 +42,26 @@ inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix(const label n)
 template<class Type>
 inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix
 (
-    const label m,
-    const label n
+    const label n,
+    const zero
+)
+:
+    Matrix<SymmetricSquareMatrix<Type>, Type>(n, n, Zero)
+{}
+
+
+template<class Type>
+inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix
+(
+    const label n,
+    const Identity<Type>
 )
 :
-    Matrix<SymmetricSquareMatrix<Type>, Type>(m, n)
+    Matrix<SymmetricSquareMatrix<Type>, Type>(n, n, Zero)
 {
-    if (m != n)
+    for (label i=0; i<n; i++)
     {
-        FatalErrorInFunction
-            << "m != n for constructing a symmetric square matrix"
-            << exit(FatalError);
+        this->operator()(i, i) = pTraits<Type>::one;
     }
 }
 
@@ -60,20 +69,12 @@ inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix
 template<class Type>
 inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix
 (
-    const label m,
     const label n,
     const Type& t
 )
 :
-    Matrix<SymmetricSquareMatrix<Type>, Type>(m, n, t)
-{
-    if (m != n)
-    {
-        FatalErrorInFunction
-            << "m != n for constructing a symmetric square matrix"
-            << exit(FatalError);
-    }
-}
+    Matrix<SymmetricSquareMatrix<Type>, Type>(n, n, t)
+{}
 
 
 template<class Type>
@@ -84,50 +85,14 @@ inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix(Istream& is)
 
 
 template<class Type>
-inline Foam::autoPtr<Foam::SymmetricSquareMatrix<Type> >
+inline Foam::autoPtr<Foam::SymmetricSquareMatrix<Type>>
 Foam::SymmetricSquareMatrix<Type>::clone() const
 {
-    return autoPtr<SymmetricSquareMatrix<Type> >
+    return autoPtr<SymmetricSquareMatrix<Type>>
     (
         new SymmetricSquareMatrix<Type>(*this)
     );
 }
 
 
-template<class Type>
-inline Type& Foam::SymmetricSquareMatrix<Type>::operator()
-(
-    const label r,
-    const label c
-)
-{
-    if (r > c)
-    {
-        return this->operator[](r)[c];
-    }
-    else
-    {
-        return this->operator[](c)[r];
-    }
-}
-
-
-template<class Type>
-inline const Type& Foam::SymmetricSquareMatrix<Type>::operator()
-(
-    const label r,
-    const label c
-) const
-{
-    if (r > c)
-    {
-        return this->operator[](r)[c];
-    }
-    else
-    {
-        return this->operator[](c)[r];
-    }
-}
-
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C
index b7cb0153c501424666d66e5bb7765e5dfcebfeb2..269fc2150bff71927c363bf55c89c22abb24f45e 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -215,7 +215,6 @@ const Foam::labelUList& Foam::lduAddressing::losortStartAddr() const
 }
 
 
-// Return edge index given owner and neighbour label
 Foam::label Foam::lduAddressing::triIndex(const label a, const label b) const
 {
     label own = min(a, b);
@@ -228,7 +227,7 @@ Foam::label Foam::lduAddressing::triIndex(const label a, const label b) const
 
     const labelUList& neighbour = upperAddr();
 
-    for (label i = startLabel; i < endLabel; i++)
+    for (label i=startLabel; i<endLabel; i++)
     {
         if (neighbour[i] == nbr)
         {
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.H
index 2a4f156c8d7a158ce03db7a17b47c24dddf56331..9a9f9ddd8877c04bcc0fcd747309df6fb156310a 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,7 +119,7 @@ public:
 
             //- Raw field receive function returning field
             template<class Type>
-            tmp<Field<Type> > receive
+            tmp<Field<Type>> receive
             (
                 const Pstream::commsTypes commsType,
                 const label size
@@ -144,7 +144,7 @@ public:
 
             //- Raw field receive function with data compression returning field
             template<class Type>
-            tmp<Field<Type> > compressedReceive
+            tmp<Field<Type>> compressedReceive
             (
                 const Pstream::commsTypes commsType,
                 const label size
@@ -159,7 +159,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "processorLduInterfaceTemplates.C"
+    #include "processorLduInterfaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C
index 645c1de157e1211332052b8572c9ab1bf5387e20..8ba519430a6e70b5845f8b82e2dec5c703145c1f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,14 +119,14 @@ void Foam::processorLduInterface::receive
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::processorLduInterface::receive
+Foam::tmp<Foam::Field<Type>> Foam::processorLduInterface::receive
 (
     const Pstream::commsTypes commsType,
     const label size
 ) const
 {
-    tmp<Field<Type> > tf(new Field<Type>(size));
-    receive(commsType, tf());
+    tmp<Field<Type>> tf(new Field<Type>(size));
+    receive(commsType, tf.ref());
     return tf;
 }
 
@@ -261,14 +261,14 @@ void Foam::processorLduInterface::compressedReceive
 }
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::processorLduInterface::compressedReceive
+Foam::tmp<Foam::Field<Type>> Foam::processorLduInterface::compressedReceive
 (
     const Pstream::commsTypes commsType,
     const label size
 ) const
 {
-    tmp<Field<Type> > tf(new Field<Type>(size));
-    compressedReceive(commsType, tf());
+    tmp<Field<Type>> tf(new Field<Type>(size));
+    compressedReceive(commsType, tf.ref());
     return tf;
 }
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C
index 1f22e238e0b9033e3dabe4946ec90068f288e055..8de7395626370614961600ee53444fa77931f537 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,14 +70,14 @@ Foam::lduMatrix::lduMatrix(const lduMatrix& A)
 }
 
 
-Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reUse)
+Foam::lduMatrix::lduMatrix(lduMatrix& A, bool reuse)
 :
     lduMesh_(A.lduMesh_),
     lowerPtr_(NULL),
     diagPtr_(NULL),
     upperPtr_(NULL)
 {
-    if (reUse)
+    if (reuse)
     {
         if (A.lowerPtr_)
         {
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
index e9ae3af8894bb9347d62627e6cb76d8c2e5efe12..771317ed72dda943e621edbc176df15204db0f43 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -521,7 +521,7 @@ public:
         lduMatrix(const lduMatrix&);
 
         //- Construct as copy or re-use as specified.
-        lduMatrix(lduMatrix&, bool reUse);
+        lduMatrix(lduMatrix&, bool reuse);
 
         //- Construct given an LDU addressed mesh and an Istream
         //  from which the coefficients are read
@@ -684,18 +684,18 @@ public:
 
 
             template<class Type>
-            tmp<Field<Type> > H(const Field<Type>&) const;
+            tmp<Field<Type>> H(const Field<Type>&) const;
 
             template<class Type>
-            tmp<Field<Type> > H(const tmp<Field<Type> >&) const;
+            tmp<Field<Type>> H(const tmp<Field<Type>>&) const;
 
             tmp<scalarField> H1() const;
 
             template<class Type>
-            tmp<Field<Type> > faceH(const Field<Type>&) const;
+            tmp<Field<Type>> faceH(const Field<Type>&) const;
 
             template<class Type>
-            tmp<Field<Type> > faceH(const tmp<Field<Type> >&) const;
+            tmp<Field<Type>> faceH(const tmp<Field<Type>>&) const;
 
 
         // Info
@@ -735,7 +735,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "lduMatrixTemplates.C"
+    #include "lduMatrixTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C
index aa6230ca190b01796ce44aef3c855b4382d7102d..537746ed20a6a8c0f0136d012184a019274e710f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -290,7 +290,7 @@ Foam::tmp<Foam::scalarField> Foam::lduMatrix::residual
 ) const
 {
     tmp<scalarField> trA(new scalarField(psi.size()));
-    residual(trA(), psi, source, interfaceBouCoeffs, interfaces, cmpt);
+    residual(trA.ref(), psi, source, interfaceBouCoeffs, interfaces, cmpt);
     return trA;
 }
 
@@ -304,7 +304,7 @@ Foam::tmp<Foam::scalarField > Foam::lduMatrix::H1() const
 
     if (lowerPtr_ || upperPtr_)
     {
-        scalarField& H1_ = tH1();
+        scalarField& H1_ = tH1.ref();
 
         scalar* __restrict__ H1Ptr = H1_.begin();
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C
index a473b2d63714bcc4811ffbc411b45366bbfb8f03..7ac02d189f35dc172ad90815fc8dc959c6b400ae 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,16 +31,16 @@ Description
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::lduMatrix::H(const Field<Type>& psi) const
+Foam::tmp<Foam::Field<Type>> Foam::lduMatrix::H(const Field<Type>& psi) const
 {
-    tmp<Field<Type> > tHpsi
+    tmp<Field<Type>> tHpsi
     (
-        new Field<Type>(lduAddr().size(), pTraits<Type>::zero)
+        new Field<Type>(lduAddr().size(), Zero)
     );
 
     if (lowerPtr_ || upperPtr_)
     {
-        Field<Type> & Hpsi = tHpsi();
+        Field<Type> & Hpsi = tHpsi.ref();
 
         Type* __restrict__ HpsiPtr = Hpsi.begin();
 
@@ -65,17 +65,17 @@ Foam::tmp<Foam::Field<Type> > Foam::lduMatrix::H(const Field<Type>& psi) const
 }
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
-Foam::lduMatrix::H(const tmp<Field<Type> >& tpsi) const
+Foam::tmp<Foam::Field<Type>>
+Foam::lduMatrix::H(const tmp<Field<Type>>& tpsi) const
 {
-    tmp<Field<Type> > tHpsi(H(tpsi()));
+    tmp<Field<Type>> tHpsi(H(tpsi()));
     tpsi.clear();
     return tHpsi;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::lduMatrix::faceH(const Field<Type>& psi) const
 {
     if (lowerPtr_ || upperPtr_)
@@ -86,8 +86,8 @@ Foam::lduMatrix::faceH(const Field<Type>& psi) const
         const labelUList& l = lduAddr().lowerAddr();
         const labelUList& u = lduAddr().upperAddr();
 
-        tmp<Field<Type> > tfaceHpsi(new Field<Type> (Lower.size()));
-        Field<Type> & faceHpsi = tfaceHpsi();
+        tmp<Field<Type>> tfaceHpsi(new Field<Type> (Lower.size()));
+        Field<Type> & faceHpsi = tfaceHpsi.ref();
 
         for (label face=0; face<l.size(); face++)
         {
@@ -105,16 +105,16 @@ Foam::lduMatrix::faceH(const Field<Type>& psi) const
                " the matrix does not have any off-diagonal coefficients."
             << exit(FatalError);
 
-        return tmp<Field<Type> >(NULL);
+        return tmp<Field<Type>>(NULL);
     }
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
-Foam::lduMatrix::faceH(const tmp<Field<Type> >& tpsi) const
+Foam::tmp<Foam::Field<Type>>
+Foam::lduMatrix::faceH(const tmp<Field<Type>>& tpsi) const
 {
-    tmp<Field<Type> > tfaceHpsi(faceH(tpsi()));
+    tmp<Field<Type>> tfaceHpsi(faceH(tpsi()));
     tpsi.clear();
     return tfaceHpsi;
 }
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C
index 36db4b5f0fcc88f79ffe935c40e31d9d3fecffb2..481e5047342a328cc8f86a54f8d6fc2bb03ccd5c 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
         // Try and consume interfaces as they become available
         bool allUpdated = false;
 
-        for (label i = 0; i < UPstream::nPollProcInterfaces; i++)
+        for (label i=0; i<UPstream::nPollProcInterfaces; i++)
         {
             allUpdated = true;
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C
index eb640e2010093f735db95bd6f976622c2f939f44..9d41b183b98bad93e05ac2bfea6a796a21689225 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -640,7 +640,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel)
 //    {
 //        vals[0] = myVal;
 //
-//        for (label i = 1; i < procIDs.size(); i++)
+//        for (label i=1; i<procIDs.size(); i++)
 //        {
 //            label& slaveVal = vals[i];
 //            IPstream::read
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C
index 6092a56a67533ca5b318a2dcd8a01100202f2899..63bdd3a02185257d3d2aca34e1f905ce9125f49e 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -656,7 +656,7 @@ bool Foam::GAMGAgglomeration::checkRestriction
             labelList& newCoarse = coarseToNewCoarse[coarseI];
             newCoarse.setSize(masters.size());
             newCoarse[0] = coarseI;
-            for (label i = 1; i < newCoarse.size(); i++)
+            for (label i=1; i<newCoarse.size(); i++)
             {
                 newCoarse[i] = nNewCoarse++;
             }
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H
index edcc01d6eed668f13a87c4b5d090f2ecd312fce2..fd94b55760efbbba72dd8c0901725ae26c99d833 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -171,12 +171,13 @@ protected:
 
         // Processor agglomeration
 
-            //- Collect and combine processor meshes into allMesh.
-            //  - allMeshComm   : communicator for combined mesh.
-            //  - procAgglomMap : per processor the new agglomerated processor
-            //                    (rank in allMeshComm!). Global information.
-            //  - procIDs       : local information: same for all in
-            //                    agglomerated processor.
+            //- Collect and combine processor meshes into allMesh:
+            //
+            //    - allMeshComm   : communicator for combined mesh.
+            //    - procAgglomMap : per processor the new agglomerated
+            //        processor (rank in allMeshComm!). Global information.
+            //    - procIDs       : local information: same for all in
+            //        agglomerated processor.
             void procAgglomerateLduAddressing
             (
                 const label comm,
@@ -187,8 +188,9 @@ protected:
             );
 
             //- Collect and combine basic restriction addressing:
-            //      nCells_
-            //      restrictAddressing_
+            //
+            //    - nCells_
+            //    - restrictAddressing_
             void procAgglomerateRestrictAddressing
             (
                 const label comm,
@@ -426,10 +428,11 @@ public:
         // with GAMGSolver notation.
 
             //- Given fine to coarse processor map determine:
-            //  - for each coarse processor a master (minimum of the fine
-            //    processors)
-            //  - for each coarse processor the set of fine processors
-            //    (element 0 is the master processor)
+            //
+            //    - for each coarse processor a master (minimum of the fine
+            //        processors)
+            //    - for each coarse processor the set of fine processors
+            //        (element 0 is the master processor)
             static void calculateRegionMaster
             (
                 const label comm,
@@ -494,7 +497,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "GAMGAgglomerationTemplates.C"
+    #include "GAMGAgglomerationTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C
index 645fee617d2b3295569e04e09a40304a523915b7..372accc31bd3236b986948779babee60486c0a46 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ void Foam::GAMGAgglomeration::gatherList
         allVals.setSize(procIDs.size());
 
         allVals[0] = myVal;
-        for (label i = 1; i < procIDs.size(); i++)
+        for (label i=1; i<procIDs.size(); i++)
         {
             IPstream fromSlave
             (
@@ -81,7 +81,7 @@ void Foam::GAMGAgglomeration::restrictField
     const labelList& fineToCoarse
 ) const
 {
-    cf = pTraits<Type>::zero;
+    cf = Zero;
 
     forAll(ff, i)
     {
@@ -153,7 +153,7 @@ void Foam::GAMGAgglomeration::restrictFaceField
             << abort(FatalError);
     }
 
-    cf = pTraits<Type>::zero;
+    cf = Zero;
 
     forAll(fineToCoarse, ffacei)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C
index 508c0c3f946a2a6ef586194ea881cab8eb7ca485..bf4c695bdaed3630fa069487fff0453694c919c9 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -181,7 +181,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
     // go through the faces and create clusters
 
     tmp<labelField> tcoarseCellMap(new labelField(nFineCells, -1));
-    labelField& coarseCellMap = tcoarseCellMap();
+    labelField& coarseCellMap = tcoarseCellMap.ref();
 
     nCoarseCells = 0;
     label celli;
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C
index 9233d11cfc37d26562bcb5d537ca354a07c69234..6c219acacdab844b6fe438faa04cdba852ff7a09 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -358,10 +358,7 @@ Foam::autoPtr<Foam::GAMGProcAgglomeration> Foam::GAMGProcAgglomeration::New
 {
     if (debug)
     {
-        Info<< "GAMGProcAgglomeration::New(const word&, GAMGAgglomeration&"
-               ", const dictionary&) : "
-               "constructing GAMGProcAgglomeration"
-            << endl;
+        InfoInFunction << "Constructing GAMGProcAgglomeration" << endl;
     }
 
     GAMGAgglomerationConstructorTable::iterator cstrIter =
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H
index 1c93711dd3708422a4de80478ef85fd468fef06b..a7cdae8e4e6a7e2031fcf4eb061115895667bd51 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ class manualGAMGProcAgglomeration
     // Private data
 
         //- Per level the agglomeration map
-        const List<Tuple2<label, List<labelList> > > procAgglomMaps_;
+        const List<Tuple2<label, List<labelList>>> procAgglomMaps_;
 
         //- Any allocated communicators
         DynamicList<label> comms_;
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C
index 689ae4455c5e165e20a03c1d590955536cb20dcc..ddd79ad6ab003b4d5d18c3a6aa2a77cab7442d1a 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,6 @@ namespace Foam
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Create single cell mesh
 Foam::autoPtr<Foam::lduPrimitiveMesh>
 Foam::procFacesGAMGProcAgglomeration::singleCellMesh
 (
@@ -59,7 +58,7 @@ Foam::procFacesGAMGProcAgglomeration::singleCellMesh
 ) const
 {
     // Count number of faces per processor
-    List<Map<label> > procFaces(UPstream::nProcs(mesh.comm()));
+    List<Map<label>> procFaces(UPstream::nProcs(mesh.comm()));
     Map<label>& myNeighbours = procFaces[UPstream::myProcNo(mesh.comm())];
 
     {
@@ -166,7 +165,7 @@ Foam::procFacesGAMGProcAgglomeration::processorAgglomeration
     );
 
     tmp<labelField> tfineToCoarse(new labelField(0));
-    labelField& fineToCoarse = tfineToCoarse();
+    labelField& fineToCoarse = tfineToCoarse.ref();
 
     if (singleCellMeshPtr.valid())
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
index 2ced631e3911adc8ccffc481c9262ed1fbffdad0..9e220067d1726b99c0293f3b99b65d37320fa931 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,16 +116,16 @@ class GAMGSolver
         PtrList<lduMatrix> matrixLevels_;
 
         //- Hierarchy of interfaces.
-        PtrList<PtrList<lduInterfaceField> > primitiveInterfaceLevels_;
+        PtrList<PtrList<lduInterfaceField>> primitiveInterfaceLevels_;
 
         //- Hierarchy of interfaces in lduInterfaceFieldPtrs form
         PtrList<lduInterfaceFieldPtrsList> interfaceLevels_;
 
         //- Hierarchy of interface boundary coefficients
-        PtrList<FieldField<Field, scalar> > interfaceLevelsBouCoeffs_;
+        PtrList<FieldField<Field, scalar>> interfaceLevelsBouCoeffs_;
 
         //- Hierarchy of interface internal coefficients
-        PtrList<FieldField<Field, scalar> > interfaceLevelsIntCoeffs_;
+        PtrList<FieldField<Field, scalar>> interfaceLevelsIntCoeffs_;
 
         //- LU decompsed coarsest matrix
         autoPtr<LUscalarMatrix> coarsestLUMatrixPtr_;
@@ -191,10 +191,10 @@ class GAMGSolver
             const lduInterfaceFieldPtrsList& interfaces,
 
             PtrList<lduMatrix>& otherMats,
-            PtrList<FieldField<Field, scalar> >& otherBouCoeffs,
-            PtrList<FieldField<Field, scalar> >& otherIntCoeffs,
+            PtrList<FieldField<Field, scalar>>& otherBouCoeffs,
+            PtrList<FieldField<Field, scalar>>& otherIntCoeffs,
             List<boolList>& otherTransforms,
-            List<List<label> >& otherRanks
+            List<List<label>>& otherRanks
         ) const;
 
         //- Agglomerate processor matrices
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C
index d848394675ce79b54d312646f98c4f59f983ed84..d6df8be62922d7dd2e313efebfc0d1eaf3f1de19 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -193,7 +193,6 @@ void Foam::GAMGSolver::agglomerateMatrix
 }
 
 
-// Agglomerate only the interface coefficients.
 void Foam::GAMGSolver::agglomerateInterfaceCoefficients
 (
     const label fineLevelIndex,
@@ -279,8 +278,6 @@ void Foam::GAMGSolver::agglomerateInterfaceCoefficients
 }
 
 
-// Gather matrices.
-// Note: matrices get constructed with dummy mesh
 void Foam::GAMGSolver::gatherMatrices
 (
     const labelList& procIDs,
@@ -293,10 +290,10 @@ void Foam::GAMGSolver::gatherMatrices
     const lduInterfaceFieldPtrsList& interfaces,
 
     PtrList<lduMatrix>& otherMats,
-    PtrList<FieldField<Field, scalar> >& otherBouCoeffs,
-    PtrList<FieldField<Field, scalar> >& otherIntCoeffs,
+    PtrList<FieldField<Field, scalar>>& otherBouCoeffs,
+    PtrList<FieldField<Field, scalar>>& otherIntCoeffs,
     List<boolList>& otherTransforms,
-    List<List<label> >& otherRanks
+    List<List<label>>& otherRanks
 ) const
 {
     if (debug)
@@ -448,10 +445,10 @@ void Foam::GAMGSolver::procAgglomerateMatrix
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     PtrList<lduMatrix> otherMats;
-    PtrList<FieldField<Field, scalar> > otherBouCoeffs;
-    PtrList<FieldField<Field, scalar> > otherIntCoeffs;
+    PtrList<FieldField<Field, scalar>> otherBouCoeffs;
+    PtrList<FieldField<Field, scalar>> otherIntCoeffs;
     List<boolList> otherTransforms;
-    List<List<label> > otherRanks;
+    List<List<label>> otherRanks;
     gatherMatrices
     (
         agglomProcIDs,
@@ -500,14 +497,13 @@ void Foam::GAMGSolver::procAgglomerateMatrix
         if (coarsestMatrix.hasDiag())
         {
             scalarField& allDiag = allMatrix.diag();
+
             SubList<scalar>
             (
                 allDiag,
                 coarsestMatrix.diag().size()
-            ).assign
-            (
-                coarsestMatrix.diag()
-            );
+            ) = coarsestMatrix.diag();
+
             forAll(otherMats, i)
             {
                 SubList<scalar>
@@ -515,10 +511,7 @@ void Foam::GAMGSolver::procAgglomerateMatrix
                     allDiag,
                     otherMats[i].diag().size(),
                     cellOffsets[i+1]
-                ).assign
-                (
-                    otherMats[i].diag()
-                );
+                ) = otherMats[i].diag();
             }
         }
         if (coarsestMatrix.hasLower())
@@ -751,15 +744,15 @@ void Foam::GAMGSolver::procAgglomerateMatrix
 )
 {
     autoPtr<lduMatrix> allMatrixPtr;
-    autoPtr<FieldField<Field, scalar> > allInterfaceBouCoeffs
+    autoPtr<FieldField<Field, scalar>> allInterfaceBouCoeffs
     (
         new FieldField<Field, scalar>(0)
     );
-    autoPtr<FieldField<Field, scalar> > allInterfaceIntCoeffs
+    autoPtr<FieldField<Field, scalar>> allInterfaceIntCoeffs
     (
         new FieldField<Field, scalar>(0)
     );
-    autoPtr<PtrList<lduInterfaceField> > allPrimitiveInterfaces
+    autoPtr<PtrList<lduInterfaceField>> allPrimitiveInterfaces
     (
         new PtrList<lduInterfaceField>(0)
     );
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C
index 1a547204a741a5006272dfb0fb903662212b0018..03a6d111074e2cee10a8022e677489c9660f2dd4 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -295,7 +295,7 @@ void Foam::GAMGSolver::Vcycle
             // used
             if (nPreSweeps_)
             {
-                preSmoothedCoarseCorrField.assign(coarseCorrFields[leveli]);
+                preSmoothedCoarseCorrField = coarseCorrFields[leveli];
             }
 
             agglomeration_.prolongField
@@ -533,8 +533,7 @@ void Foam::GAMGSolver::solveCoarsestLevel
 
     if (directSolveCoarsest_)
     {
-        coarsestCorrField = coarsestSource;
-        coarsestLUMatrixPtr_->solve(coarsestCorrField);
+        coarsestLUMatrixPtr_->solve(coarsestCorrField, coarsestSource);
     }
     //else if
     //(
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C
index cd30d03c75dd87014cb40feaecdec9af07057eb8..2151fa3005cdb0e1f004c205507454ad39ce70b0 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ Foam::tmp<Foam::scalarField> Foam::GAMGInterface::agglomerateCoeffs
 ) const
 {
     tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0));
-    scalarField& coarseCoeffs = tcoarseCoeffs();
+    scalarField& coarseCoeffs = tcoarseCoeffs.ref();
 
     if (fineCoeffs.size() != faceRestrictAddressing_.size())
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H
index 66c1ab2f32d77dee8d9ed66f18c6c11d8541b2cc..c1b8009f29de001cff013a8e603da9889ba08d58 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -238,7 +238,7 @@ public:
 
             //- Return the interface internal field of the given field
             template<class Type>
-            tmp<Field<Type> > interfaceInternalField
+            tmp<Field<Type>> interfaceInternalField
             (
                 const UList<Type>& internalData
             ) const;
@@ -287,7 +287,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "GAMGInterfaceTemplates.C"
+    #include "GAMGInterfaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C
index 79e5f04259ed232a643fddbd2f0fbc71d016d3dc..bcf21c1dd3ad12431670c6e3f0315e6498e23d8a 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,13 +28,13 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::GAMGInterface::interfaceInternalField
+Foam::tmp<Foam::Field<Type>> Foam::GAMGInterface::interfaceInternalField
 (
     const UList<Type>& iF
 ) const
 {
-    tmp<Field<Type> > tresult(new Field<Type>(size()));
-    interfaceInternalField(iF, tresult());
+    tmp<Field<Type>> tresult(new Field<Type>(size()));
+    interfaceInternalField(iF, tresult.ref());
     return tresult;
 }
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C
index 4610c24c896b1c6f3e9bb46624d394cc2e015f08..7f884c205b72dda264da829ddae2bbd7985f10a0 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
     );
 
     // From coarse cell pair to coarse face
-    HashTable<label, labelPair, labelPair::Hash<> > cellsToCoarseFace
+    HashTable<label, labelPair, labelPair::Hash<>> cellsToCoarseFace
     (
         2*localRestrictAddressing.size()
     );
@@ -126,7 +126,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
             );
         }
 
-        HashTable<label, labelPair, labelPair::Hash<> >::const_iterator fnd =
+        HashTable<label, labelPair, labelPair::Hash<>>::const_iterator fnd =
             cellsToCoarseFace.find(cellPair);
 
         if (fnd == cellsToCoarseFace.end())
@@ -182,7 +182,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
     const labelUList& nbrFaceCells = nbr.faceCells();
 
     tmp<labelField> tpnf(new labelField(size()));
-    labelField& pnf = tpnf();
+    labelField& pnf = tpnf.ref();
 
     forAll(pnf, facei)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C
index d0cbc9ade6cceebe0d13deddef812769fb0a5442..f68e1a853b00ab21f40c25ffe8a9ed060bb843fc 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/processorGAMGInterface/processorGAMGInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
     );
 
     // From coarse cell pair to coarse face
-    HashTable<label, labelPair, labelPair::Hash<> > cellsToCoarseFace
+    HashTable<label, labelPair, labelPair::Hash<>> cellsToCoarseFace
     (
         2*localRestrictAddressing.size()
     );
@@ -114,7 +114,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
             );
         }
 
-        HashTable<label, labelPair, labelPair::Hash<> >::const_iterator fnd =
+        HashTable<label, labelPair, labelPair::Hash<>>::const_iterator fnd =
             cellsToCoarseFace.find(cellPair);
 
         if (fnd == cellsToCoarseFace.end())
@@ -213,7 +213,7 @@ Foam::tmp<Foam::labelField> Foam::processorGAMGInterface::internalFieldTransfer
     label oldWarn = UPstream::warnComm;
     UPstream::warnComm = comm();
 
-    tmp<Field<label> > tfld(receive<label>(commsType, this->size()));
+    tmp<Field<label>> tfld(receive<label>(commsType, this->size()));
 
     UPstream::warnComm = oldWarn;
 
diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C
index 3b3092f3a65c67478d25b7a62eb97396bd3c3572..4c833cd40ac949f2b30c5aa62c5e2aef65110aec 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C
+++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,67 +33,67 @@ License
 Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
 :
     U_(A),
-    V_(A.m(), A.m()),
-    S_(A.m()),
-    VSinvUt_(A.m(), A.n()),
+    V_(A.n(), A.n()),
+    S_(A.n()),
+    VSinvUt_(A.n(), A.m()),
     nZeros_(0)
 {
     // SVDcomp to find U_, V_ and S_ - the singular values
 
-    const label Um = U_.m();
     const label Un = U_.n();
+    const label Um = U_.m();
 
-    scalarList rv1(Um);
+    scalarList rv1(Un);
     scalar g = 0;
     scalar scale = 0;
     scalar s = 0;
     scalar anorm = 0;
-    label l = 0;
+    label l=0;
 
-    for (label i = 0; i < Um; i++)
+    for (label i=0; i<Un; i++)
     {
         l = i+2;
         rv1[i] = scale*g;
         g = s = scale = 0;
 
-        if (i < Un)
+        if (i < Um)
         {
-            for (label k = i; k < Un; k++)
+            for (label k=i; k<Um; k++)
             {
-                scale += mag(U_[k][i]);
+                scale += mag(U_(k, i));
             }
 
             if (scale != 0)
             {
-                for (label k = i; k < Un; k++)
+                for (label k=i; k<Um; k++)
                 {
-                    U_[k][i] /= scale;
-                    s += U_[k][i]*U_[k][i];
+                    U_(k, i) /= scale;
+                    s += U_(k, i)*U_(k, i);
                 }
 
-                scalar f = U_[i][i];
+                scalar f = U_(i, i);
                 g = -sign(Foam::sqrt(s), f);
                 scalar h = f*g - s;
-                U_[i][i] = f - g;
+                U_(i, i) = f - g;
 
-                for (label j = l-1; j < Um; j++)
+                for (label j=l-1; j<Un; j++)
                 {
                     s = 0;
-                    for (label k = i; k < Un; k++)
+                    for (label k=i; k<Um; k++)
                     {
-                        s += U_[k][i]*U_[k][j];
+                        s += U_(k, i)*U_(k, j);
                     }
 
                     f = s/h;
-                    for (label k = i; k < A.n(); k++)
+                    for (label k=i; k<A.m(); k++)
                     {
-                        U_[k][j] += f*U_[k][i];
+                        U_(k, j) += f*U_(k, i);
                     }
                 }
 
-                for (label k = i; k < Un; k++)
+                for (label k=i; k<Um; k++)
                 {
-                    U_[k][i] *= scale;
+                    U_(k, i) *= scale;
                 }
             }
         }
@@ -102,19 +102,19 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
 
         g = s = scale = 0;
 
-        if (i+1 <= Un && i != Um)
+        if (i+1 <= Um && i != Un)
         {
-            for (label k = l-1; k < Um; k++)
+            for (label k=l-1; k<Un; k++)
             {
-                scale += mag(U_[i][k]);
+                scale += mag(U_(i, k));
             }
 
             if (scale != 0)
             {
-                for (label k=l-1; k < Um; k++)
+                for (label k=l-1; k<Un; k++)
                 {
-                    U_[i][k] /= scale;
-                    s += U_[i][k]*U_[i][k];
+                    U_(i, k) /= scale;
+                    s += U_(i, k)*U_(i, k);
                 }
 
                 scalar f = U_[i][l-1];
@@ -122,27 +122,27 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
                 scalar h = f*g - s;
                 U_[i][l-1] = f - g;
 
-                for (label k = l-1; k < Um; k++)
+                for (label k=l-1; k<Un; k++)
                 {
-                    rv1[k] = U_[i][k]/h;
+                    rv1[k] = U_(i, k)/h;
                 }
 
-                for (label j = l-1; j < Un; j++)
+                for (label j=l-1; j<Um; j++)
                 {
                     s = 0;
-                    for (label k = l-1; k < Um; k++)
+                    for (label k=l-1; k<Un; k++)
                     {
-                        s += U_[j][k]*U_[i][k];
+                        s += U_(j, k)*U_(i, k);
                     }
 
-                    for (label k = l-1; k < Um; k++)
+                    for (label k=l-1; k<Un; k++)
                     {
-                        U_[j][k] += s*rv1[k];
+                        U_(j, k) += s*rv1[k];
                     }
                 }
-                for (label k = l-1; k < Um; k++)
+                for (label k=l-1; k<Un; k++)
                 {
-                    U_[i][k] *= scale;
+                    U_(i, k) *= scale;
                 }
             }
         }
@@ -150,112 +150,112 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
         anorm = max(anorm, mag(S_[i]) + mag(rv1[i]));
     }
 
-    for (label i = Um-1; i >= 0; i--)
+    for (label i=Un-1; i >= 0; i--)
     {
-        if (i < Um-1)
+        if (i < Un-1)
         {
             if (g != 0)
             {
-                for (label j = l; j < Um; j++)
+                for (label j=l; j<Un; j++)
                 {
-                    V_[j][i] = (U_[i][j]/U_[i][l])/g;
+                    V_(j, i) = (U_(i, j)/U_(i, l))/g;
                 }
 
-                for (label j=l; j < Um; j++)
+                for (label j=l; j<Un; j++)
                 {
                     s = 0;
-                    for (label k = l; k < Um; k++)
+                    for (label k=l; k<Un; k++)
                     {
-                        s += U_[i][k]*V_[k][j];
+                        s += U_(i, k)*V_(k, j);
                     }
 
-                    for (label k = l; k < Um; k++)
+                    for (label k=l; k<Un; k++)
                     {
-                        V_[k][j] += s*V_[k][i];
+                        V_(k, j) += s*V_(k, i);
                     }
                 }
             }
 
-            for (label j = l; j < Um;j++)
+            for (label j=l; j<Un;j++)
             {
-                V_[i][j] = V_[j][i] = 0.0;
+                V_(i, j) = V_(j, i) = 0.0;
             }
         }
 
-        V_[i][i] = 1;
+        V_(i, i) = 1;
         g = rv1[i];
         l = i;
     }
 
-    for (label i = min(Um, Un) - 1; i >= 0; i--)
+    for (label i=min(Un, Um) - 1; i>=0; i--)
     {
         l = i+1;
         g = S_[i];
 
-        for (label j = l; j < Um; j++)
+        for (label j=l; j<Un; j++)
         {
-            U_[i][j] = 0.0;
+            U_(i, j) = 0.0;
         }
 
         if (g != 0)
         {
             g = 1.0/g;
 
-            for (label j = l; j < Um; j++)
+            for (label j=l; j<Un; j++)
             {
                 s = 0;
-                for (label k = l; k < Un; k++)
+                for (label k=l; k<Um; k++)
                 {
-                    s += U_[k][i]*U_[k][j];
+                    s += U_(k, i)*U_(k, j);
                 }
 
-                scalar f = (s/U_[i][i])*g;
+                scalar f = (s/U_(i, i))*g;
 
-                for (label k = i; k < Un; k++)
+                for (label k=i; k<Um; k++)
                 {
-                    U_[k][j] += f*U_[k][i];
+                    U_(k, j) += f*U_(k, i);
                 }
             }
 
-            for (label j = i; j < Un; j++)
+            for (label j=i; j<Um; j++)
             {
-                U_[j][i] *= g;
+                U_(j, i) *= g;
             }
         }
         else
         {
-            for (label j = i; j < Un; j++)
+            for (label j=i; j<Um; j++)
             {
-                U_[j][i] = 0.0;
+                U_(j, i) = 0.0;
             }
         }
 
-        ++U_[i][i];
+        ++U_(i, i);
     }
 
-    for (label k = Um-1; k >= 0; k--)
+    for (label k=Un-1; k >= 0; k--)
     {
         for (label its = 0; its < 35; its++)
         {
             bool flag = true;
 
-            label nm;
+            label mn;
             for (l = k; l >= 0; l--)
             {
-                nm = l-1;
+                mn = l-1;
                 if (mag(rv1[l]) + anorm == anorm)
                 {
                     flag = false;
                     break;
                 }
-                if (mag(S_[nm]) + anorm == anorm) break;
+                if (mag(S_[mn]) + anorm == anorm) break;
             }
 
             if (flag)
             {
                 scalar c = 0.0;
                 s = 1.0;
-                for (label i = l; i < k+1; i++)
+                for (label i=l; i<k+1; i++)
                 {
                     scalar f = s*rv1[i];
                     rv1[i] = c*rv1[i];
@@ -269,12 +269,12 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
                     c = g*h;
                     s = -f*h;
 
-                    for (label j = 0; j < Un; j++)
+                    for (label j=0; j<Um; j++)
                     {
-                        scalar y = U_[j][nm];
-                        scalar z = U_[j][i];
-                        U_[j][nm] = y*c + z*s;
-                        U_[j][i] = z*c - y*s;
+                        scalar y = U_[j][mn];
+                        scalar z = U_(j, i);
+                        U_[j][mn] = y*c + z*s;
+                        U_(j, i) = z*c - y*s;
                     }
                 }
             }
@@ -287,21 +287,21 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
                 {
                     S_[k] = -z;
 
-                    for (label j = 0; j < Um; j++) V_[j][k] = -V_[j][k];
+                    for (label j=0; j<Un; j++) V_(j, k) = -V_(j, k);
                 }
                 break;
             }
             if (its == 34)
             {
                 WarningInFunction
-                    << "no convergence in 35 SVD iterations"
+                    << "No convergence in 35 SVD iterations"
                     << endl;
             }
 
             scalar x = S_[l];
-            nm = k-1;
-            scalar y = S_[nm];
-            g = rv1[nm];
+            mn = k-1;
+            scalar y = S_[mn];
+            g = rv1[mn];
             scalar h = rv1[k];
             scalar f = ((y - z)*(y + z) + (g - h)*(g + h))/(2.0*h*y);
             g = sqrtSumSqr(f, scalar(1));
@@ -309,9 +309,9 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
             scalar c = 1.0;
             s = 1.0;
 
-            for (label j = l; j <= nm; j++)
+            for (label j=l; j <= mn; j++)
             {
-                label i = j + 1;
+                label i=j + 1;
                 g = rv1[i];
                 y = S_[i];
                 h = s*g;
@@ -325,7 +325,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
                 h = y*s;
                 y *= c;
 
-                for (label jj = 0; jj < Um; jj++)
+                for (label jj = 0; jj < Un; jj++)
                 {
                     x = V_[jj][j];
                     z = V_[jj][i];
@@ -344,7 +344,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
                 f = c*g + s*y;
                 x = c*y - s*g;
 
-                for (label jj=0; jj < Un; jj++)
+                for (label jj=0; jj < Um; jj++)
                 {
                     y = U_[jj][j];
                     z = U_[jj][i];
@@ -358,7 +358,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
         }
     }
 
-    // zero singular values that are less than minCondition*maxS
+    // Zero singular values that are less than minCondition*maxS
     const scalar minS = minCondition*S_[findMax(S_)];
     forAll(S_, i)
     {
@@ -370,19 +370,20 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
         }
     }
 
-    // now multiply out to find the pseudo inverse of A, VSinvUt_
+    // Now multiply out to find the pseudo inverse of A, VSinvUt_
     multiply(VSinvUt_, V_, inv(S_), U_.T());
 
     // test SVD
-    /*scalarRectangularMatrix SVDA(A.n(), A.m());
+    /*
+    scalarRectangularMatrix SVDA(A.m(), A.n());
     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.m(); i++)
     {
-        for (label j = 0; j < A.m(); j++)
+        for (label j=0; j<A.n(); j++)
         {
-            diff = mag(A[i][j] - SVDA[i][j]);
+            diff = mag(A(i, j) - SVDA(i, j));
             if (diff > maxDiff) maxDiff = diff;
         }
     }
diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.H b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.H
index d1e38c9082e5d53a499dd39fc7e084019c864bd5..2f4a9dcb1984acfea2c99115ce183b257ba961c9 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.H
+++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,6 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-
 /*---------------------------------------------------------------------------*\
                       Class SVD Declaration
 \*---------------------------------------------------------------------------*/
diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H
index d35cb53c9dd2e40df824a99589d8a3bc2a130857..c3fdb9bb1a4b49c91e47eb3cdb347f397b059d6c 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H
+++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,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 46f4a3ee1d60bcb33245f703eba4ff111fbf3889..d96ffb903e39c20cf346cb160c6c2f07cd5ebc00 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C
+++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,17 +46,17 @@ void Foam::LUDecompose
     label& sign
 )
 {
-    label n = matrix.n();
-    scalar vv[n];
+    label m = matrix.m();
+    scalar vv[m];
     sign = 1;
 
-    for (label i=0; i<n; i++)
+    for (label i=0; i<m; i++)
     {
         scalar largestCoeff = 0.0;
         scalar temp;
         const scalar* __restrict__ matrixi = matrix[i];
 
-        for (label j=0; j<n; j++)
+        for (label j=0; j<m; j++)
         {
             if ((temp = mag(matrixi[j])) > largestCoeff)
             {
@@ -73,7 +73,7 @@ void Foam::LUDecompose
         vv[i] = 1.0/largestCoeff;
     }
 
-    for (label j=0; j<n; j++)
+    for (label j=0; j<m; j++)
     {
         scalar* __restrict__ matrixj = matrix[j];
 
@@ -84,7 +84,7 @@ void Foam::LUDecompose
             scalar sum = matrixi[j];
             for (label k=0; k<i; k++)
             {
-                sum -= matrixi[k]*matrix[k][j];
+                sum -= matrixi[k]*matrix(k, j);
             }
             matrixi[j] = sum;
         }
@@ -92,14 +92,14 @@ void Foam::LUDecompose
         label iMax = 0;
 
         scalar largestCoeff = 0.0;
-        for (label i=j; i<n; i++)
+        for (label i=j; i<m; i++)
         {
             scalar* __restrict__ matrixi = matrix[i];
             scalar sum = matrixi[j];
 
             for (label k=0; k<j; k++)
             {
-                sum -= matrixi[k]*matrix[k][j];
+                sum -= matrixi[k]*matrix(k, j);
             }
 
             matrixi[j] = sum;
@@ -118,7 +118,7 @@ void Foam::LUDecompose
         {
             scalar* __restrict__ matrixiMax = matrix[iMax];
 
-            for (label k=0; k<n; k++)
+            for (label k=0; k<m; k++)
             {
                 Swap(matrixj[k], matrixiMax[k]);
             }
@@ -132,13 +132,13 @@ void Foam::LUDecompose
             matrixj[j] = SMALL;
         }
 
-        if (j != n-1)
+        if (j != m-1)
         {
             scalar rDiag = 1.0/matrixj[j];
 
-            for (label i=j+1; i<n; i++)
+            for (label i=j+1; i<m; i++)
             {
-                matrix[i][j] *= rDiag;
+                matrix(i, j) *= rDiag;
             }
         }
     }
@@ -148,39 +148,39 @@ void Foam::LUDecompose
 void Foam::LUDecompose(scalarSymmetricSquareMatrix& matrix)
 {
     // Store result in upper triangular part of matrix
-    label size = matrix.n();
+    label size = matrix.m();
 
     // Set upper triangular parts to zero.
-    for (label j = 0; j < size; j++)
+    for (label j=0; j<size; j++)
     {
-        for (label k = j + 1; k < size; k++)
+        for (label k=j + 1; k<size; k++)
         {
-            matrix[j][k] = 0.0;
+            matrix(j, k) = 0.0;
         }
     }
 
-    for (label j = 0; j < size; j++)
+    for (label j=0; j<size; j++)
     {
         scalar d = 0.0;
 
-        for (label k = 0; k < j; k++)
+        for (label k=0; k<j; k++)
         {
             scalar s = 0.0;
 
-            for (label i = 0; i < k; i++)
+            for (label i=0; i<k; i++)
             {
-                s += matrix[i][k]*matrix[i][j];
+                s += matrix(i, k)*matrix(i, j);
             }
 
-            s = (matrix[j][k] - s)/matrix[k][k];
+            s = (matrix(j, k) - s)/matrix(k, k);
 
-            matrix[k][j] = s;
-            matrix[j][k] = s;
+            matrix(k, j) = s;
+            matrix(j, k) = s;
 
             d += sqr(s);
         }
 
-        d = matrix[j][j] - d;
+        d = matrix(j, j) - d;
 
         if (d < 0.0)
         {
@@ -190,7 +190,7 @@ void Foam::LUDecompose(scalarSymmetricSquareMatrix& matrix)
                 << abort(FatalError);
         }
 
-        matrix[j][j] = sqrt(d);
+        matrix(j, j) = sqrt(d);
     }
 }
 
@@ -205,36 +205,36 @@ void Foam::multiply
     const scalarRectangularMatrix& C
 )
 {
-    if (A.m() != B.n())
+    if (A.n() != B.m())
     {
         FatalErrorInFunction
-            << "A and B must have identical inner dimensions but A.m = "
-            << A.m() << " and B.n = " << B.n()
+            << "A and B must have identical inner dimensions but A.n = "
+            << A.n() << " and B.m = " << B.m()
             << abort(FatalError);
     }
 
-    if (B.m() != C.n())
+    if (B.n() != C.m())
     {
         FatalErrorInFunction
-            << "B and C must have identical inner dimensions but B.m = "
-            << B.m() << " and C.n = " << C.n()
+            << "B and C must have identical inner dimensions but B.n = "
+            << B.n() << " and C.m = " << C.m()
             << abort(FatalError);
     }
 
-    ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0));
+    ans = scalarRectangularMatrix(A.m(), C.n(), scalar(0));
 
-    for (label i = 0; i < A.n(); i++)
+    for (label i=0; i<A.m(); i++)
     {
-        for (label g = 0; g < C.m(); g++)
+        for (label g = 0; g < C.n(); g++)
         {
-            for (label l = 0; l < C.n(); l++)
+            for (label l=0; l<C.m(); l++)
             {
                 scalar ab = 0;
-                for (label j = 0; j < A.m(); j++)
+                for (label j=0; j<A.n(); j++)
                 {
-                    ab += A[i][j]*B[j][l];
+                    ab += A(i, j)*B(j, l);
                 }
-                ans[i][g] += C[l][g] * ab;
+                ans(i, g) += C(l, g) * ab;
             }
         }
     }
@@ -249,31 +249,31 @@ void Foam::multiply
     const scalarRectangularMatrix& C
 )
 {
-    if (A.m() != B.size())
+    if (A.n() != B.size())
     {
         FatalErrorInFunction
-            << "A and B must have identical inner dimensions but A.m = "
-            << A.m() << " and B.n = " << B.size()
+            << "A and B must have identical inner dimensions but A.n = "
+            << A.n() << " and B.m = " << B.size()
             << abort(FatalError);
     }
 
-    if (B.size() != C.n())
+    if (B.size() != C.m())
     {
         FatalErrorInFunction
-            << "B and C must have identical inner dimensions but B.m = "
-            << B.size() << " and C.n = " << C.n()
+            << "B and C must have identical inner dimensions but B.n = "
+            << B.size() << " and C.m = " << C.m()
             << abort(FatalError);
     }
 
-    ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0));
+    ans = scalarRectangularMatrix(A.m(), C.n(), scalar(0));
 
-    for (label i = 0; i < A.n(); i++)
+    for (label i=0; i<A.m(); i++)
     {
-        for (label g = 0; g < C.m(); g++)
+        for (label g = 0; g < C.n(); g++)
         {
-            for (label l = 0; l < C.n(); l++)
+            for (label l=0; l<C.m(); l++)
             {
-                ans[i][g] += C[l][g] * A[i][l]*B[l];
+                ans(i, g) += C(l, g) * A(i, l)*B[l];
             }
         }
     }
diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H
index f01a46f1e0b30f30974d99361b69bc961fab64a8..8cf58611d2cb153a58019683f67ab57797ae8673 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H
+++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -160,7 +160,7 @@ scalarRectangularMatrix SVDinv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "scalarMatricesTemplates.C"
+    #include "scalarMatricesTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C
index 5f70c83b91e08801d00b896ada858daff408df1d..943dff0f24f3ff3b3f14280767a07ff9ea22b0a3 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C
+++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,18 +36,18 @@ void Foam::solve
     List<Type>& sourceSol
 )
 {
-    label n = tmpMatrix.n();
+    label m = tmpMatrix.m();
 
     // Elimination
-    for (label i=0; i<n; i++)
+    for (label i=0; i<m; i++)
     {
         label iMax = i;
         scalar largestCoeff = mag(tmpMatrix[iMax][i]);
 
-        // Swap entries around to find a good pivot
-        for (label j=i+1; j<n; j++)
+        // Swap elements around to find a good pivot
+        for (label j=i+1; j<m; j++)
         {
-            if (mag(tmpMatrix[j][i]) > largestCoeff)
+            if (mag(tmpMatrix(j, i)) > largestCoeff)
             {
                 iMax = j;
                 largestCoeff = mag(tmpMatrix[iMax][i]);
@@ -56,17 +56,15 @@ void Foam::solve
 
         if (i != iMax)
         {
-            //Info<< "Pivoted on " << i << " " << iMax << endl;
-
-            for (label k=i; k<n; k++)
+            for (label k=i; k<m; k++)
             {
-                Swap(tmpMatrix[i][k], tmpMatrix[iMax][k]);
+                Swap(tmpMatrix(i, k), tmpMatrix[iMax][k]);
             }
             Swap(sourceSol[i], sourceSol[iMax]);
         }
 
         // Check that the system of equations isn't singular
-        if (mag(tmpMatrix[i][i]) < 1e-20)
+        if (mag(tmpMatrix(i, i)) < 1e-20)
         {
             FatalErrorInFunction
                 << "Singular Matrix"
@@ -74,29 +72,29 @@ void Foam::solve
         }
 
         // Reduce to upper triangular form
-        for (label j=i+1; j<n; j++)
+        for (label j=i+1; j<m; j++)
         {
-            sourceSol[j] -= sourceSol[i]*(tmpMatrix[j][i]/tmpMatrix[i][i]);
+            sourceSol[j] -= sourceSol[i]*(tmpMatrix(j, i)/tmpMatrix(i, i));
 
-            for (label k=n-1; k>=i; k--)
+            for (label k=m-1; k>=i; k--)
             {
-                tmpMatrix[j][k] -=
-                    tmpMatrix[i][k]*tmpMatrix[j][i]/tmpMatrix[i][i];
+                tmpMatrix(j, k) -=
+                    tmpMatrix(i, k)*tmpMatrix(j, i)/tmpMatrix(i, i);
             }
         }
     }
 
     // Back-substitution
-    for (label j=n-1; j>=0; j--)
+    for (label j=m-1; j>=0; j--)
     {
-        Type ntempvec = pTraits<Type>::zero;
+        Type ntempvec = Zero;
 
-        for (label k=j+1; k<n; k++)
+        for (label k=j+1; k<m; k++)
         {
-            ntempvec += tmpMatrix[j][k]*sourceSol[k];
+            ntempvec += tmpMatrix(j, k)*sourceSol[k];
         }
 
-        sourceSol[j] = (sourceSol[j] - ntempvec)/tmpMatrix[j][j];
+        sourceSol[j] = (sourceSol[j] - ntempvec)/tmpMatrix(j, j);
     }
 }
 
@@ -123,11 +121,11 @@ void Foam::LUBacksubstitute
     List<Type>& sourceSol
 )
 {
-    label n = luMatrix.n();
+    label m = luMatrix.m();
 
     label ii = 0;
 
-    for (label i=0; i<n; i++)
+    for (label i=0; i<m; i++)
     {
         label ip = pivotIndices[i];
         Type sum = sourceSol[ip];
@@ -141,7 +139,7 @@ void Foam::LUBacksubstitute
                 sum -= luMatrixi[j]*sourceSol[j];
             }
         }
-        else if (sum != pTraits<Type>::zero)
+        else if (sum != Type(Zero))
         {
             ii = i+1;
         }
@@ -149,12 +147,12 @@ void Foam::LUBacksubstitute
         sourceSol[i] = sum;
     }
 
-    for (label i=n-1; i>=0; i--)
+    for (label i=m-1; i>=0; i--)
     {
         Type sum = sourceSol[i];
         const scalar* __restrict__ luMatrixi = luMatrix[i];
 
-        for (label j=i+1; j<n; j++)
+        for (label j=i+1; j<m; j++)
         {
             sum -= luMatrixi[j]*sourceSol[j];
         }
@@ -171,11 +169,11 @@ void Foam::LUBacksubstitute
     List<Type>& sourceSol
 )
 {
-    label n = luMatrix.n();
+    label m = luMatrix.m();
 
     label ii = 0;
 
-    for (label i=0; i<n; i++)
+    for (label i=0; i<m; i++)
     {
         Type sum = sourceSol[i];
         const scalar* __restrict__ luMatrixi = luMatrix[i];
@@ -187,7 +185,7 @@ void Foam::LUBacksubstitute
                 sum -= luMatrixi[j]*sourceSol[j];
             }
         }
-        else if (sum != pTraits<Type>::zero)
+        else if (sum != Type(Zero))
         {
             ii = i+1;
         }
@@ -195,12 +193,12 @@ void Foam::LUBacksubstitute
         sourceSol[i] = sum/luMatrixi[i];
     }
 
-    for (label i=n-1; i>=0; i--)
+    for (label i=m-1; i>=0; i--)
     {
         Type sum = sourceSol[i];
         const scalar* __restrict__ luMatrixi = luMatrix[i];
 
-        for (label j=i+1; j<n; j++)
+        for (label j=i+1; j<m; j++)
         {
             sum -= luMatrixi[j]*sourceSol[j];
         }
@@ -217,7 +215,7 @@ void Foam::LUsolve
     List<Type>& sourceSol
 )
 {
-    labelList pivotIndices(matrix.n());
+    labelList pivotIndices(matrix.m());
     LUDecompose(matrix, pivotIndices);
     LUBacksubstitute(matrix, pivotIndices, sourceSol);
 }
@@ -243,23 +241,23 @@ void Foam::multiply
     const Matrix<Form, Type>& B
 )
 {
-    if (A.m() != B.n())
+    if (A.n() != B.m())
     {
         FatalErrorInFunction
-            << "A and B must have identical inner dimensions but A.m = "
-            << A.m() << " and B.n = " << B.n()
+            << "A and B must have identical inner dimensions but A.n = "
+            << A.n() << " and B.m = " << B.m()
             << abort(FatalError);
     }
 
-    ans = Matrix<Form, Type>(A.n(), B.m(), scalar(0));
+    ans = Matrix<Form, Type>(A.m(), B.n(), scalar(0));
 
-    for (label i = 0; i < A.n(); i++)
+    for (label i=0; i<A.m(); i++)
     {
-        for (label j = 0; j < B.m(); j++)
+        for (label j=0; j<B.n(); j++)
         {
-            for (label l = 0; l < B.n(); l++)
+            for (label l=0; l<B.m(); l++)
             {
-                ans[i][j] += A[i][l]*B[l][j];
+                ans(i, j) += A(i, l)*B(l, j);
             }
         }
     }
diff --git a/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C b/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C
index 727db535d5b61cc9ac13e4a981dce9feeb11caf4..0f1c6995b981bd1e9fc86d80e5824e73f767e17c 100644
--- a/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C
+++ b/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ Foam::simpleMatrix<Type>::simpleMatrix
     const Type& sourceVal
 )
 :
-    scalarSquareMatrix(mSize, mSize, coeffVal),
+    scalarSquareMatrix(mSize, coeffVal),
     source_(mSize, sourceVal)
 {}
 
@@ -106,7 +106,7 @@ void Foam::simpleMatrix<Type>::operator=(const simpleMatrix<Type>& m)
             << abort(FatalError);
     }
 
-    if (n() != m.n())
+    if (m() != m.m())
     {
         FatalErrorInFunction
             << "Different size matrices"
diff --git a/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H b/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H
index 62cefec4bc3f9fab784a807754f1e037ae515b22..ddf2e95089c92da5caa1959ca4b34702ea55dfa0 100644
--- a/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H
+++ b/src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -162,7 +162,7 @@ simpleMatrix<Type> operator*
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "simpleMatrix.C"
+    #include "simpleMatrix.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C
index 6ece7ccc89df91c3155e12e71167510dc3f9de2b..72725c9e99178d550be6eac94a1fcfd2656ee731 100644
--- a/src/OpenFOAM/matrices/solution/solution.C
+++ b/src/OpenFOAM/matrices/solution/solution.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,12 +39,10 @@ namespace Foam
 }
 
 // List of sub-dictionaries to rewrite
-//! \cond localScope
 static const Foam::List<Foam::word> subDictNames
 (
     Foam::IStringStream("(preconditioner smoother)")()
 );
-//! \endcond
 
 
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
@@ -108,7 +106,7 @@ void Foam::solution::read(const dictionary& dict)
 
         if (debug)
         {
-            Info<< "relaxation factors:" << nl
+            Info<< "Relaxation factors:" << nl
                 << "fields: " << fieldRelaxDict_ << nl
                 << "equations: " << eqnRelaxDict_ << endl;
         }
@@ -364,8 +362,7 @@ const Foam::dictionary& Foam::solution::solverDict(const word& name) const
 {
     if (debug)
     {
-        InfoInFunction
-            << "Lookup solver for " << name << endl;
+        Info<< "Lookup solver for " << name << endl;
     }
 
     return solvers_.subDict(name);
@@ -376,8 +373,7 @@ const Foam::dictionary& Foam::solution::solver(const word& name) const
 {
     if (debug)
     {
-        InfoInFunction
-            << "Lookup solver for " << name << endl;
+        Info<< "Lookup solver for " << name << endl;
     }
 
     return solvers_.subDict(name);
diff --git a/src/OpenFOAM/matrices/solution/solution.H b/src/OpenFOAM/matrices/solution/solution.H
index e6a8040c72dca78291bb546b74fb50623260b0c6..f106450b0f92f35ffa9f6f399f7d1cc3c4d47a7c 100644
--- a/src/OpenFOAM/matrices/solution/solution.H
+++ b/src/OpenFOAM/matrices/solution/solution.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -158,7 +158,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "solutionTemplates.C"
+    #include "solutionTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/memory/Xfer/XferI.H b/src/OpenFOAM/memory/Xfer/XferI.H
index d1127393dfab4da6b8edaac34e0cd1a2f97e26fd..eddfa5cd1838c48a63854c20e3dc3f1bc5ab849f 100644
--- a/src/OpenFOAM/memory/Xfer/XferI.H
+++ b/src/OpenFOAM/memory/Xfer/XferI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 template<class T>
 inline const Foam::Xfer<T>& Foam::Xfer<T>::null()
 {
-    return NullObjectRef<Xfer<T> >();
+    return NullObjectRef<Xfer<T>>();
 }
 
 
diff --git a/src/OpenFOAM/memory/autoPtr/autoPtr.H b/src/OpenFOAM/memory/autoPtr/autoPtr.H
index c3ea064fb11d207d0a49bc11b0228e945c71c8ad..748975b5cf33ed6e4bec94a6d8342fdde77e2e52 100644
--- a/src/OpenFOAM/memory/autoPtr/autoPtr.H
+++ b/src/OpenFOAM/memory/autoPtr/autoPtr.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ public:
 
         //- Construct either by transferring pointer or cloning. Should
         //  only be called with type that supports cloning.
-        inline autoPtr(const autoPtr<T>&, const bool reUse);
+        inline autoPtr(const autoPtr<T>&, const bool reuse);
 
 
     //- Destructor, delete object if pointer is not NULL
diff --git a/src/OpenFOAM/memory/autoPtr/autoPtrI.H b/src/OpenFOAM/memory/autoPtr/autoPtrI.H
index 961456e5b8981ec2e676091aee839b5cc2cbf3ad..ef199ca20c60ff4d2fde05e0f53af344091d38c1 100644
--- a/src/OpenFOAM/memory/autoPtr/autoPtrI.H
+++ b/src/OpenFOAM/memory/autoPtr/autoPtrI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,9 +45,9 @@ inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap)
 
 
 template<class T>
-inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reUse)
+inline Foam::autoPtr<T>::autoPtr(const autoPtr<T>& ap, const bool reuse)
 {
-    if (reUse)
+    if (reuse)
     {
         ptr_ = ap.ptr_;
         ap.ptr_ = 0;
diff --git a/src/OpenFOAM/memory/refCount/refCount.H b/src/OpenFOAM/memory/refCount/refCount.H
index 132e8b0b8328507cd3ae5b406d39b923dc4beae4..8eee3182f64db41424cc7ce720ddedbb48aea64e 100644
--- a/src/OpenFOAM/memory/refCount/refCount.H
+++ b/src/OpenFOAM/memory/refCount/refCount.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,6 +27,10 @@ Class
 Description
     Reference counter for various OpenFOAM components.
 
+SeeAlso
+    Foam::tmp
+    Foam::token::compound
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef refCount_H
@@ -49,6 +53,7 @@ class refCount
 
         int count_;
 
+
     // Private Member Functions
 
         //- Dissallow copy
@@ -58,37 +63,31 @@ class refCount
         void operator=(const refCount&);
 
 
-public:
+protected:
 
     // Constructors
 
-        //- Construct null with zero count
+        //- Construct null initializing count to 0
         refCount()
         :
             count_(0)
         {}
 
 
+public:
+
     // Member Functions
 
-        //- Return the reference count
+        //- Return the current reference count
         int count() const
         {
             return count_;
         }
 
-
         //- Return true if the reference count is zero
-        bool okToDelete() const
-        {
-            return !count_;
-        }
-
-
-        //- Reset the reference count to zero
-        void resetRefCount()
+        bool unique() const
         {
-            count_ = 0;
+            return count_ == 0;
         }
 
 
diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H
index 7ca3a13ca27752ba62954bae8586194e224adac0..bfa2e4abcff0a0a0c634d3647b95d6a83c31a809 100644
--- a/src/OpenFOAM/memory/tmp/tmp.H
+++ b/src/OpenFOAM/memory/tmp/tmp.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,13 +30,17 @@ Description
 SourceFiles
     tmpI.H
 
+SeeAlso
+    Foam::refCount
+    Foam::autoPtr
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef tmp_H
 #define tmp_H
 
 #include "refCount.H"
-#include <cstddef>
+#include "word.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -52,18 +56,30 @@ class tmp
 {
     // Private data
 
-        //- Flag for whether object is a temporary or a constant object
-        bool isTmp_;
+        //- Object types
+        enum type
+        {
+            TMP,
+            CONST_REF
+        };
+
+        //- Type of object
+        type type_;
 
-        //- Pointer to temporary object
+        //- Pointer to object
         mutable T* ptr_;
 
-        //- Const reference to constant object
-        const T& ref_;
+
+    // Private member operators
+
+        inline void operator++();
 
 
 public:
 
+    typedef Foam::refCount refCount;
+
+
     // Constructors
 
         //- Store object pointer
@@ -79,7 +95,7 @@ public:
         inline tmp(const tmp<T>&, bool allowTransfer);
 
 
-    //- Destructor, delete object when reference count == 0
+    //- Destructor: deletes temporary object when the reference count is 0
     inline ~tmp();
 
 
@@ -98,9 +114,19 @@ public:
             //  ie, it is a reference or a temporary that has been allocated
             inline bool valid() const;
 
+            //- Return the type name of the tmp
+            //  constructed from the type name of T
+            inline word typeName() const;
+
+
         // Edit
 
-            //- Return tmp pointer for reuse
+            //- Return non-const reference or generate a fatal error
+            //  if the object is const.
+            inline T& ref();
+
+            //- Return tmp pointer for reuse.
+            //  Returns a clone if the object is not a temporary
             inline T* ptr() const;
 
             //- If object pointer points to valid object:
@@ -110,8 +136,11 @@ public:
 
     // Member operators
 
-        //- Dereference operator
+        #ifdef NON_CONST_TMP
+        //- Deprecated non-const dereference operator.
+        //  Use ref() where non-const access is required
         inline T& operator()();
+        #endif
 
         //- Const dereference operator
         inline const T& operator()() const;
@@ -125,7 +154,10 @@ public:
         //- Return const object pointer
         inline const T* operator->() const;
 
-        //- Assignment operator
+        //- Assignment to pointer changing this tmp to a temporary T
+        inline void operator=(T*);
+
+        //- Assignment transfering the temporary T to this tmp
         inline void operator=(const tmp<T>&);
 };
 
diff --git a/src/OpenFOAM/memory/tmp/tmpI.H b/src/OpenFOAM/memory/tmp/tmpI.H
index e289a06ca026d8a00aeb79848aadab044df09737..b1add8e8c3afb9cad7cec960550c2c83cb46b04d 100644
--- a/src/OpenFOAM/memory/tmp/tmpI.H
+++ b/src/OpenFOAM/memory/tmp/tmpI.H
@@ -1,8 +1,8 @@
-/*---------------------------------------------------------------------------*\
+/*--------------------------------------------------------------------r-------*\
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,44 +26,65 @@ License
 #include "error.H"
 #include <typeinfo>
 
+// * * * * * * * * * * * * * Private Member Operators  * * * * * * * * * * * //
+
+template<class T>
+inline void Foam::tmp<T>::operator++()
+{
+    ptr_->operator++();
+
+    if (ptr_->count() > 1)
+    {
+        FatalErrorInFunction
+            << "Attempt to create more than 2 tmp's referring to"
+               " the same object of type " << typeName()
+            << abort(FatalError);
+    }
+}
+
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class T>
 inline Foam::tmp<T>::tmp(T* tPtr)
 :
-    isTmp_(true),
-    ptr_(tPtr),
-    ref_(*tPtr)
-{}
+    type_(TMP),
+    ptr_(tPtr)
+{
+    if (tPtr && !tPtr->unique())
+    {
+        FatalErrorInFunction
+            << "Attempted construction of a " << typeName()
+            << " from non-unique pointer"
+            << abort(FatalError);
+    }
+}
 
 
 template<class T>
 inline Foam::tmp<T>::tmp(const T& tRef)
 :
-    isTmp_(false),
-    ptr_(0),
-    ref_(tRef)
+    type_(CONST_REF),
+    ptr_(const_cast<T*>(&tRef))
 {}
 
 
 template<class T>
 inline Foam::tmp<T>::tmp(const tmp<T>& t)
 :
-    isTmp_(t.isTmp_),
-    ptr_(t.ptr_),
-    ref_(t.ref_)
+    type_(t.type_),
+    ptr_(t.ptr_)
 {
-    if (isTmp_)
+    if (isTmp())
     {
         if (ptr_)
         {
-            ptr_->operator++();
+            operator++();
         }
         else
         {
             FatalErrorInFunction
-                << "attempted copy of a deallocated temporary"
-                << " of type " << typeid(T).name()
+                << "Attempted copy of a deallocated " << typeName()
                 << abort(FatalError);
         }
     }
@@ -73,30 +94,28 @@ inline Foam::tmp<T>::tmp(const tmp<T>& t)
 template<class T>
 inline Foam::tmp<T>::tmp(const tmp<T>& t, bool allowTransfer)
 :
-    isTmp_(t.isTmp_),
-    ptr_(t.ptr_),
-    ref_(t.ref_)
+    type_(t.type_),
+    ptr_(t.ptr_)
 {
-    if (isTmp_)
+    if (isTmp())
     {
-        if (allowTransfer)
-        {
-            const_cast<tmp<T>&>(t).ptr_ = 0;
-        }
-        else
+        if (ptr_)
         {
-            if (ptr_)
+            if (allowTransfer)
             {
-                ptr_->operator++();
+                t.ptr_ = 0;
             }
             else
             {
-                FatalErrorInFunction
-                    << "attempted copy of a deallocated temporary"
-                    << " of type " << typeid(T).name()
-                    << abort(FatalError);
+                operator++();
             }
         }
+        else
+        {
+            FatalErrorInFunction
+                << "Attempted copy of a deallocated " << typeName()
+                << abort(FatalError);
+        }
     }
 }
 
@@ -104,18 +123,7 @@ inline Foam::tmp<T>::tmp(const tmp<T>& t, bool allowTransfer)
 template<class T>
 inline Foam::tmp<T>::~tmp()
 {
-    if (isTmp_ && ptr_)
-    {
-        if (ptr_->okToDelete())
-        {
-            delete ptr_;
-            ptr_ = 0;
-        }
-        else
-        {
-            ptr_->operator--();
-        }
-    }
+    clear();
 }
 
 
@@ -124,46 +132,83 @@ inline Foam::tmp<T>::~tmp()
 template<class T>
 inline bool Foam::tmp<T>::isTmp() const
 {
-    return isTmp_;
+    return type_ == TMP;
 }
 
 
 template<class T>
 inline bool Foam::tmp<T>::empty() const
 {
-    return (isTmp_ && !ptr_);
+    return (isTmp() && !ptr_);
 }
 
 
 template<class T>
 inline bool Foam::tmp<T>::valid() const
 {
-    return (!isTmp_ || (isTmp_ && ptr_));
+    return (!isTmp() || (isTmp() && ptr_));
+}
+
+
+template<class T>
+inline Foam::word Foam::tmp<T>::typeName() const
+{
+    return "tmp<" + word(typeid(T).name()) + '>';
+}
+
+
+template<class T>
+inline T& Foam::tmp<T>::ref()
+{
+    if (isTmp())
+    {
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
+    }
+    else
+    {
+        FatalErrorInFunction
+            << "Attempt to acquire non-const reference to const object"
+            << " from a " << typeName()
+            << abort(FatalError);
+    }
+
+    return *ptr_;
 }
 
 
 template<class T>
 inline T* Foam::tmp<T>::ptr() const
 {
-    if (isTmp_)
+    if (isTmp())
     {
-         if (!ptr_)
-         {
-             FatalErrorInFunction
-                 << "temporary of type " << typeid(T).name() << " deallocated"
-                 << abort(FatalError);
-         }
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
 
-         T* ptr = ptr_;
-         ptr_ = 0;
+        if (!ptr_->unique())
+        {
+            FatalErrorInFunction
+                << "Attempt to acquire pointer to object referred to"
+                << " by multiple temporaries of type " << typeName()
+                << abort(FatalError);
+        }
 
-         ptr->resetRefCount();
+        T* ptr = ptr_;
+        ptr_ = 0;
 
-         return ptr;
+        return ptr;
     }
     else
     {
-        return new T(ref_);
+        return new T(*ptr_);
     }
 }
 
@@ -171,63 +216,60 @@ inline T* Foam::tmp<T>::ptr() const
 template<class T>
 inline void Foam::tmp<T>::clear() const
 {
-    if (isTmp_ && ptr_)  // skip this bit:  && ptr_->okToDelete())
+    if (isTmp() && ptr_)
     {
-        delete ptr_;
-        ptr_ = 0;
+        if (ptr_->unique())
+        {
+            delete ptr_;
+            ptr_ = 0;
+        }
+        else
+        {
+            ptr_->operator--();
+            ptr_ = 0;
+        }
     }
 }
 
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
+#ifdef NON_CONST_TMP
 template<class T>
 inline T& Foam::tmp<T>::operator()()
 {
-    if (isTmp_)
+    if (isTmp())
     {
         if (!ptr_)
         {
             FatalErrorInFunction
-                << "temporary of type " << typeid(T).name() << " deallocated"
+                << typeName() << " deallocated"
                 << abort(FatalError);
         }
-
-        return *ptr_;
-    }
-    else
-    {
-        // Note: const is cast away!
-        // Perhaps there should be two refs, one for const and one for non const
-        // and if the ref is actually const then you cannot return it here.
-        //
-        // Another possibility would be to store a const ref and a flag to say
-        // whether the tmp was constructed with a const or a non-const argument.
-        //
-        // eg, enum refType { POINTER = 0, REF = 1, CONSTREF = 2 };
-        return const_cast<T&>(ref_);
     }
+
+    // Const-ness is automatically cast-away which is why this operator is
+    // deprecated.  Use ref() where non-const access is required.
+    return *ptr_;
 }
+#endif
 
 
 template<class T>
 inline const T& Foam::tmp<T>::operator()() const
 {
-    if (isTmp_)
+    if (isTmp())
     {
         if (!ptr_)
         {
             FatalErrorInFunction
-                << "temporary of type " << typeid(T).name() << " deallocated"
+                << typeName() << " deallocated"
                 << abort(FatalError);
         }
-
-        return *ptr_;
-    }
-    else
-    {
-        return ref_;
     }
+
+    // Return const reference
+    return *ptr_;
 }
 
 
@@ -241,72 +283,108 @@ inline Foam::tmp<T>::operator const T&() const
 template<class T>
 inline T* Foam::tmp<T>::operator->()
 {
-    if (isTmp_)
+    if (isTmp())
     {
-         if (!ptr_)
-         {
-             FatalErrorInFunction
-                 << "temporary of type " << typeid(T).name() << " deallocated"
-                 << abort(FatalError);
-         }
-
-         return ptr_;
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
     }
     else
     {
-        return &const_cast<T&>(ref_);
+        FatalErrorInFunction
+            << "Attempt to cast const object to non-const for a " << typeName()
+            << abort(FatalError);
     }
+
+    return ptr_;
 }
 
 
 template<class T>
 inline const T* Foam::tmp<T>::operator->() const
 {
-    return const_cast<tmp<T>&>(*this).operator->();
+    if (isTmp() && !ptr_)
+    {
+        FatalErrorInFunction
+            << typeName() << " deallocated"
+            << abort(FatalError);
+    }
+
+    return ptr_;
 }
 
 
 template<class T>
-inline void Foam::tmp<T>::operator=(const tmp<T>& t)
+inline void Foam::tmp<T>::operator=(T* tPtr)
 {
-    if (isTmp_ && ptr_)
+    clear();
+
+    if (!tPtr)
     {
-        if (ptr_->okToDelete())
-        {
-            delete ptr_;
-            ptr_ = 0;
-        }
-        else
-        {
-            ptr_->operator--();
-        }
+        FatalErrorInFunction
+            << "Attempted copy of a deallocated " << typeName()
+            << abort(FatalError);
     }
 
-    if (t.isTmp_)
+    if (tPtr && !tPtr->unique())
     {
-        isTmp_ = true;
-        ptr_ = t.ptr_;
+        FatalErrorInFunction
+            << "Attempted assignment of a " << typeName()
+            << " to non-unique pointer"
+            << abort(FatalError);
+    }
 
-        if (ptr_)
-        {
-            ptr_->operator++();
-        }
-        else
+    type_ = TMP;
+    ptr_ = tPtr;
+}
+
+
+template<class T>
+inline void Foam::tmp<T>::operator=(const tmp<T>& t)
+{
+    clear();
+
+    if (t.isTmp())
+    {
+        type_ = TMP;
+
+        if (!t.ptr_)
         {
             FatalErrorInFunction
-                << "attempted copy of a deallocated temporary"
-                << " of type " << typeid(T).name()
+                << "Attempted assignment to a deallocated " << typeName()
                 << abort(FatalError);
         }
+
+        ptr_ = t.ptr_;
+        t.ptr_ = 0;
     }
     else
     {
         FatalErrorInFunction
-            << "attempted to assign to a const reference to constant object"
+            << "Attempted assignment to a const reference to an object"
             << " of type " << typeid(T).name()
             << abort(FatalError);
     }
 }
 
 
+//- Return the const reference of the non-const reference argument
+template<class T>
+inline const T& Const(T& t)
+{
+    return t;
+}
+
+
+//- Return the const reference of the non-const rvalue reference argument
+template<class T>
+inline const T& Const(T&& t)
+{
+    return t;
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/memory/tmpNrc/tmpNrc.H b/src/OpenFOAM/memory/tmpNrc/tmpNrc.H
new file mode 100644
index 0000000000000000000000000000000000000000..8a8ae021e0da3a143c63e69ada332819906bf89c
--- /dev/null
+++ b/src/OpenFOAM/memory/tmpNrc/tmpNrc.H
@@ -0,0 +1,171 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::tmpNrc
+
+Description
+    A class for managing temporary objects without reference counting.
+
+SourceFiles
+    tmpNrcI.H
+
+SeeAlso
+    Foam::autoPtr
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef tmpNrc_H
+#define tmpNrc_H
+
+#include "word.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                             Class tmpNrc Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class T>
+class tmpNrc
+{
+    // Private data
+
+        //- Object types
+        enum type
+        {
+            TMP,
+            CONST_REF
+        };
+
+        //- Type of object
+        mutable type type_;
+
+        //- Pointer to object
+        mutable T* ptr_;
+
+
+public:
+
+    // Null reference counter class
+    class refCount
+    {
+    public:
+
+        refCount()
+        {}
+    };
+
+
+    // Constructors
+
+        //- Store object pointer
+        inline explicit tmpNrc(T* = 0);
+
+        //- Store object const reference
+        inline tmpNrc(const T&);
+
+        //- Construct copy and increment reference count
+        inline tmpNrc(const tmpNrc<T>&);
+
+        //- Construct copy transferring content of temporary if required
+        inline tmpNrc(const tmpNrc<T>&, bool allowTransfer);
+
+
+    //- Destructor: deletes temporary object when the reference count is 0
+    inline ~tmpNrc();
+
+
+    // Member Functions
+
+        // Access
+
+            //- Return true if this is really a temporary object
+            inline bool isTmp() const;
+
+            //- Return true if this temporary object empty,
+            //  ie, a temporary without allocation
+            inline bool empty() const;
+
+            //- Is this temporary object valid,
+            //  ie, it is a reference or a temporary that has been allocated
+            inline bool valid() const;
+
+            //- Return the type name of the tmpNrc
+            //  constructed from the type name of T
+            inline word typeName() const;
+
+
+        // Edit
+
+            //- Return non-const reference or generate a fatal error
+            //  if the object is const.
+            inline T& ref();
+
+            //- Return tmpNrc pointer for reuse.
+            //  Returns a clone if the object is not a temporary
+            inline T* ptr() const;
+
+            //- If object pointer points to valid object:
+            //  delete object and set pointer to NULL
+            inline void clear() const;
+
+
+    // Member operators
+
+        //- Const dereference operator
+        inline const T& operator()() const;
+
+        //- Const cast to the underlying type reference
+        inline operator const T&() const;
+
+        //- Return object pointer
+        inline T* operator->();
+
+        //- Return const object pointer
+        inline const T* operator->() const;
+
+        //- Assignment to pointer changing this tmpNrc to a temporary T
+        inline void operator=(T*);
+
+        //- Assignment transfering the temporary T to this tmpNrc
+        inline void operator=(const tmpNrc<T>&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "tmpNrcI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/memory/tmpNrc/tmpNrcI.H b/src/OpenFOAM/memory/tmpNrc/tmpNrcI.H
new file mode 100644
index 0000000000000000000000000000000000000000..75f66f44e8a5dd109e0f4ea1736c9ec29fe0170f
--- /dev/null
+++ b/src/OpenFOAM/memory/tmpNrc/tmpNrcI.H
@@ -0,0 +1,320 @@
+/*--------------------------------------------------------------------r-------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "error.H"
+#include <typeinfo>
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class T>
+inline Foam::tmpNrc<T>::tmpNrc(T* tPtr)
+:
+    type_(TMP),
+    ptr_(tPtr)
+{}
+
+
+template<class T>
+inline Foam::tmpNrc<T>::tmpNrc(const T& tRef)
+:
+    type_(CONST_REF),
+    ptr_(const_cast<T*>(&tRef))
+{}
+
+
+template<class T>
+inline Foam::tmpNrc<T>::tmpNrc(const tmpNrc<T>& t)
+:
+    type_(t.type_),
+    ptr_(t.ptr_)
+{
+    if (isTmp())
+    {
+        if (ptr_)
+        {
+            t.type_ = CONST_REF;
+        }
+        else
+        {
+            FatalErrorInFunction
+                << "Attempted copy of a deallocated " << typeName()
+                << abort(FatalError);
+        }
+    }
+}
+
+
+template<class T>
+inline Foam::tmpNrc<T>::tmpNrc(const tmpNrc<T>& t, bool allowTransfer)
+:
+    type_(t.type_),
+    ptr_(t.ptr_)
+{
+    if (isTmp())
+    {
+        if (ptr_)
+        {
+            if (allowTransfer)
+            {
+                t.ptr_ = 0;
+            }
+            else
+            {
+                t.type_ = CONST_REF;
+            }
+        }
+        else
+        {
+            FatalErrorInFunction
+                << "Attempted copy of a deallocated " << typeName()
+                << abort(FatalError);
+        }
+    }
+}
+
+
+template<class T>
+inline Foam::tmpNrc<T>::~tmpNrc()
+{
+    clear();
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class T>
+inline bool Foam::tmpNrc<T>::isTmp() const
+{
+    return type_ == TMP;
+}
+
+
+template<class T>
+inline bool Foam::tmpNrc<T>::empty() const
+{
+    return (isTmp() && !ptr_);
+}
+
+
+template<class T>
+inline bool Foam::tmpNrc<T>::valid() const
+{
+    return (!isTmp() || (isTmp() && ptr_));
+}
+
+
+template<class T>
+inline Foam::word Foam::tmpNrc<T>::typeName() const
+{
+    return "tmpNrc<" + word(typeid(T).name()) + '>';
+}
+
+
+template<class T>
+inline T& Foam::tmpNrc<T>::ref()
+{
+    if (isTmp())
+    {
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
+    }
+    else
+    {
+        FatalErrorInFunction
+            << "Attempt to acquire non-const reference to const object"
+            << " from a " << typeName()
+            << abort(FatalError);
+    }
+
+    return *ptr_;
+}
+
+
+template<class T>
+inline T* Foam::tmpNrc<T>::ptr() const
+{
+    if (isTmp())
+    {
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
+
+        T* ptr = ptr_;
+        ptr_ = 0;
+
+        return ptr;
+    }
+    else
+    {
+        return new T(*ptr_);
+    }
+}
+
+
+template<class T>
+inline void Foam::tmpNrc<T>::clear() const
+{
+    if (isTmp() && ptr_)
+    {
+        delete ptr_;
+        ptr_ = 0;
+    }
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class T>
+inline const T& Foam::tmpNrc<T>::operator()() const
+{
+    if (isTmp())
+    {
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
+    }
+
+    // Return const reference
+    return *ptr_;
+}
+
+
+template<class T>
+inline Foam::tmpNrc<T>::operator const T&() const
+{
+    return operator()();
+}
+
+
+template<class T>
+inline T* Foam::tmpNrc<T>::operator->()
+{
+    if (isTmp())
+    {
+        if (!ptr_)
+        {
+            FatalErrorInFunction
+                << typeName() << " deallocated"
+                << abort(FatalError);
+        }
+    }
+    else
+    {
+        FatalErrorInFunction
+            << "Attempt to cast const object to non-const for a " << typeName()
+            << abort(FatalError);
+    }
+
+    return ptr_;
+}
+
+
+template<class T>
+inline const T* Foam::tmpNrc<T>::operator->() const
+{
+    if (isTmp() && !ptr_)
+    {
+        FatalErrorInFunction
+            << typeName() << " deallocated"
+            << abort(FatalError);
+    }
+
+    return ptr_;
+}
+
+
+template<class T>
+inline void Foam::tmpNrc<T>::operator=(T* tPtr)
+{
+    clear();
+
+    if (!tPtr)
+    {
+        FatalErrorInFunction
+            << "Attempted copy of a deallocated " << typeName()
+            << abort(FatalError);
+    }
+
+    type_ = TMP;
+    ptr_ = tPtr;
+}
+
+
+template<class T>
+inline void Foam::tmpNrc<T>::operator=(const tmpNrc<T>& t)
+{
+    clear();
+
+    if (t.isTmp())
+    {
+        type_ = TMP;
+
+        if (!t.ptr_)
+        {
+            FatalErrorInFunction
+                << "Attempted assignment to a deallocated " << typeName()
+                << abort(FatalError);
+        }
+
+        ptr_ = t.ptr_;
+        t.ptr_ = 0;
+    }
+    else
+    {
+        FatalErrorInFunction
+            << "Attempted assignment to a const reference to an object"
+            << " of type " << typeid(T).name()
+            << abort(FatalError);
+    }
+}
+
+
+//- Return the const reference of the non-const reference argument
+template<class T>
+inline const T& Const(T& t)
+{
+    return t;
+}
+
+
+//- Return the const reference of the non-const rvalue reference argument
+template<class T>
+inline const T& Const(T&& t)
+{
+    return t;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.C b/src/OpenFOAM/meshes/MeshObject/MeshObject.C
index 53267d90aa85be6f47f7951f734ad2570c4a097a..f8fae85d411486b4a1223dfcdb82d017c21dbb54 100644
--- a/src/OpenFOAM/meshes/MeshObject/MeshObject.C
+++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -287,7 +287,7 @@ void Foam::meshObject::movePoints(objectRegistry& obr)
 {
     HashTable<GeometricMeshObject<Mesh>*> meshObjects
     (
-        obr.lookupClass<GeometricMeshObject<Mesh> >()
+        obr.lookupClass<GeometricMeshObject<Mesh>>()
     );
 
     if (meshObject::debug)
@@ -304,7 +304,7 @@ void Foam::meshObject::movePoints(objectRegistry& obr)
         iter
     )
     {
-        if (isA<MoveableMeshObject<Mesh> >(*iter()))
+        if (isA<MoveableMeshObject<Mesh>>(*iter()))
         {
             if (meshObject::debug)
             {
@@ -329,7 +329,7 @@ void Foam::meshObject::updateMesh(objectRegistry& obr, const mapPolyMesh& mpm)
 {
     HashTable<GeometricMeshObject<Mesh>*> meshObjects
     (
-        obr.lookupClass<GeometricMeshObject<Mesh> >()
+        obr.lookupClass<GeometricMeshObject<Mesh>>()
     );
 
     if (meshObject::debug)
@@ -346,7 +346,7 @@ void Foam::meshObject::updateMesh(objectRegistry& obr, const mapPolyMesh& mpm)
         iter
     )
     {
-        if (isA<UpdateableMeshObject<Mesh> >(*iter()))
+        if (isA<UpdateableMeshObject<Mesh>>(*iter()))
         {
             if (meshObject::debug)
             {
@@ -371,7 +371,7 @@ void Foam::meshObject::clear(objectRegistry& obr)
 {
     HashTable<MeshObjectType<Mesh>*> meshObjects
     (
-        obr.lookupClass<MeshObjectType<Mesh> >()
+        obr.lookupClass<MeshObjectType<Mesh>>()
     );
 
     if (meshObject::debug)
@@ -402,7 +402,7 @@ void Foam::meshObject::clearUpto(objectRegistry& obr)
 {
     HashTable<FromType<Mesh>*> meshObjects
     (
-        obr.lookupClass<FromType<Mesh> >()
+        obr.lookupClass<FromType<Mesh>>()
     );
 
     if (meshObject::debug)
@@ -414,7 +414,7 @@ void Foam::meshObject::clearUpto(objectRegistry& obr)
 
     forAllIter(typename HashTable<FromType<Mesh>*>, meshObjects, iter)
     {
-        if (!isA<ToType<Mesh> >(*iter()))
+        if (!isA<ToType<Mesh>>(*iter()))
         {
             if (meshObject::debug)
             {
diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.H b/src/OpenFOAM/meshes/MeshObject/MeshObject.H
index bc844bd1eb1c05203394eb61b24e0a1414792780..79c90a37e39dcd2aa9fa7199ed530979d199bd67 100644
--- a/src/OpenFOAM/meshes/MeshObject/MeshObject.H
+++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,6 +33,7 @@ Description
     MoveableMeshObject, UpdateableMeshObject) and the type of the actual object
     it is created for example:
 
+    \verbatim
     class leastSquaresVectors
     :
         public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors>
@@ -43,17 +44,20 @@ Description
         //- Delete the least square vectors when the mesh moves
         virtual bool movePoints();
     };
+    \endverbatim
 
     MeshObject types:
 
-    TopologicalMeshObject: mesh object to be deleted on topology change
-    GeometricMeshObject: mesh object to be deleted on geometry change
-    MoveableMeshObject: mesh object to be updated in movePoints
-    UpdateableMeshObject: mesh object to be updated in updateMesh or movePoints
+    - TopologicalMeshObject: mesh object to be deleted on topology change
+    - GeometricMeshObject: mesh object to be deleted on geometry change
+    - MoveableMeshObject: mesh object to be updated in movePoints
+    - UpdateableMeshObject: mesh object to be updated in updateMesh or
+        movePoints
 
-    Note that movePoints must be provided for MeshObjects of type
-    MoveableMeshObject and both movePoints and updateMesh functions must exist
-    provided for MeshObjects of type UpdateableMeshObject.
+Note
+    movePoints must be provided for MeshObjects of type MoveableMeshObject
+    and both movePoints and updateMesh functions must exist, provided for
+    MeshObjects of type UpdateableMeshObject.
 
 SourceFiles
     MeshObject.C
@@ -278,7 +282,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MeshObject.C"
+    #include "MeshObject.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C
index b6f3824543fd4f0fa7e991caf45ad1ed01a1a05c..678194dd24327bdb6e17d670bfafc6e5801540bd 100644
--- a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C
+++ b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,6 @@ Foam::labelList Foam::ProcessorTopology<Container, ProcPatch>::procNeighbours
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class Container, class ProcPatch>
 Foam::ProcessorTopology<Container, ProcPatch>::ProcessorTopology
 (
diff --git a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H
index ef1ad593dc09ee25702ab2474eec4fde0bad3cd7..90923a88c222c52a8fc2cbb679ae489a95cdbd91 100644
--- a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H
+++ b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,7 +115,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ProcessorTopology.C"
+    #include "ProcessorTopology.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C
index ca625a2a882e1fd0bceb76bac28666abb36704a3..67911ea21d734d107c729d9329a4814a4c7aa78a 100644
--- a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C
+++ b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(commSchedule, 0);
+    defineTypeNameAndDebug(commSchedule, 0);
 }
 
 
@@ -62,7 +62,6 @@ Foam::label Foam::commSchedule::outstandingComms
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from separate addressing
 Foam::commSchedule::commSchedule
 (
     const label nProcs,
@@ -73,7 +72,7 @@ Foam::commSchedule::commSchedule
     procSchedule_(nProcs)
 {
     // Determine comms per processor.
-    List<DynamicList<label> > procToComms(nProcs);
+    List<DynamicList<label>> procToComms(nProcs);
 
     forAll(comms, commI)
     {
diff --git a/src/OpenFOAM/meshes/bandCompression/bandCompression.C b/src/OpenFOAM/meshes/bandCompression/bandCompression.C
index 6a74fdf58a45b367fc0f5c73fae8e48bdde55d28..339938fb7c03ed2d9743ca9a36ffba956b08b913 100644
--- a/src/OpenFOAM/meshes/bandCompression/bandCompression.C
+++ b/src/OpenFOAM/meshes/bandCompression/bandCompression.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,6 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Constructor from components
 Foam::labelList Foam::bandCompression(const labelListList& cellCellAddressing)
 {
     labelList newOrder(cellCellAddressing.size());
diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.C b/src/OpenFOAM/meshes/boundBox/boundBox.C
index 168d43c3422b989d17313c5d27715b26defe4c73..6c3ec8036f9d508779de97754872cb484fc941fa 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBox.C
+++ b/src/OpenFOAM/meshes/boundBox/boundBox.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,8 +51,8 @@ void Foam::boundBox::calculate(const UList<point>& points, const bool doReduce)
 {
     if (points.empty())
     {
-        min_ = point::zero;
-        max_ = point::zero;
+        min_ = Zero;
+        max_ = Zero;
 
         if (doReduce && Pstream::parRun())
         {
@@ -87,8 +87,8 @@ void Foam::boundBox::calculate(const UList<point>& points, const bool doReduce)
 
 Foam::boundBox::boundBox(const UList<point>& points, const bool doReduce)
 :
-    min_(point::zero),
-    max_(point::zero)
+    min_(Zero),
+    max_(Zero)
 {
     calculate(points, doReduce);
 }
@@ -96,8 +96,8 @@ Foam::boundBox::boundBox(const UList<point>& points, const bool doReduce)
 
 Foam::boundBox::boundBox(const tmp<pointField>& points, const bool doReduce)
 :
-    min_(point::zero),
-    max_(point::zero)
+    min_(Zero),
+    max_(Zero)
 {
     calculate(points(), doReduce);
     points.clear();
@@ -111,8 +111,8 @@ Foam::boundBox::boundBox
     const bool doReduce
 )
 :
-    min_(point::zero),
-    max_(point::zero)
+    min_(Zero),
+    max_(Zero)
 {
     if (points.empty() || indices.empty())
     {
@@ -149,7 +149,7 @@ Foam::boundBox::boundBox
 Foam::tmp<Foam::pointField> Foam::boundBox::points() const
 {
     tmp<pointField> tPts = tmp<pointField>(new pointField(8));
-    pointField& pt = tPts();
+    pointField& pt = tPts.ref();
 
     pt[0] = min_;                                   // min-x, min-y, min-z
     pt[1] = point(max_.x(), min_.y(), min_.z());    // max-x, min-y, min-z
diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.H b/src/OpenFOAM/meshes/boundBox/boundBox.H
index 9a9821b5337034313782e808b98ed550a31bf5b9..a340a90c0421f999463d3dc27d2951e351b7244f 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBox.H
+++ b/src/OpenFOAM/meshes/boundBox/boundBox.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -256,7 +256,7 @@ inline bool contiguous<boundBox>() {return contiguous<point>();}
 #include "boundBoxI.H"
 
 #ifdef NoRepository
-#   include "boundBoxTemplates.C"
+    #include "boundBoxTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/boundBox/boundBoxI.H b/src/OpenFOAM/meshes/boundBox/boundBoxI.H
index 4c3fc062035f158c78892ab4714cd18bc9cdfd04..13af23e99cd3d4397c4de1d780f61696f05f46ff 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBoxI.H
+++ b/src/OpenFOAM/meshes/boundBox/boundBoxI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,8 +31,8 @@ License
 
 inline Foam::boundBox::boundBox()
 :
-    min_(point::zero),
-    max_(point::zero)
+    min_(Zero),
+    max_(Zero)
 {}
 
 
diff --git a/src/OpenFOAM/meshes/boundBox/boundBoxTemplates.C b/src/OpenFOAM/meshes/boundBox/boundBoxTemplates.C
index 68d62e7569d8a5deded6cb7a0710651659b6e7e6..81aa3f267b218d67e990ce6f0c4838079b14e27e 100644
--- a/src/OpenFOAM/meshes/boundBox/boundBoxTemplates.C
+++ b/src/OpenFOAM/meshes/boundBox/boundBoxTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,8 +38,8 @@ Foam::boundBox::boundBox
     const bool doReduce
 )
 :
-    min_(point::zero),
-    max_(point::zero)
+    min_(Zero),
+    max_(Zero)
 {
     // a FixedList is never empty
     if (points.empty())
diff --git a/src/OpenFOAM/meshes/data/data.H b/src/OpenFOAM/meshes/data/data.H
index c5b7758e93194433069fff83ad7284a4f75cc6c1..615834836445fc7a3f241a2507c43e941edc0d13 100644
--- a/src/OpenFOAM/meshes/data/data.H
+++ b/src/OpenFOAM/meshes/data/data.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dataTemplates.C"
+    #include "dataTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/data/dataTemplates.C b/src/OpenFOAM/meshes/data/dataTemplates.C
index 8929ee123c750fcd00b9b8b71b517b7bf91f01d9..536c433081e76205bf07080931e17b0c5f4f00a9 100644
--- a/src/OpenFOAM/meshes/data/dataTemplates.C
+++ b/src/OpenFOAM/meshes/data/dataTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ void Foam::data::setSolverPerformance
 {
     dictionary& dict = const_cast<dictionary&>(solverPerformanceDict());
 
-    List<SolverPerformance<Type> > perfs;
+    List<SolverPerformance<Type>> perfs;
 
     if (prevTimeIndex_ != this->time().timeIndex())
     {
diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.H b/src/OpenFOAM/meshes/lduMesh/lduMesh.H
index d8700b106a68c9f40ff14946a70d5a195fdca21a..f42413294bdecf13ad5af55d0bfef6b384da5774 100644
--- a/src/OpenFOAM/meshes/lduMesh/lduMesh.H
+++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,7 +112,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "lduMeshTemplates.C"
+    #include "lduMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C
index 1a73135c3ac3c6bc4a0ae741acd94e67e2a326cb..fa7fb2573b53f7d6260fee2648b106b44e9428a7 100644
--- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C
+++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -206,12 +206,12 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh
     labelList& l,
     labelList& u,
     const label comm,
-    bool reUse
+    bool reuse
 )
 :
     lduAddressing(nCells),
-    lowerAddr_(l, reUse),
-    upperAddr_(u, reUse),
+    lowerAddr_(l, reuse),
+    upperAddr_(u, reuse),
     comm_(comm)
 {}
 
diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H
index 5bd7901c8bba004f307aae09f4bc1b49238650e2..7561554b64be6f46323863a517428cae18647abc 100644
--- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H
+++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ public:
             labelList& l,
             labelList& u,
             const label comm,
-            bool reUse
+            bool reuse
         );
 
         //- Add interfaces to a mesh constructed without
@@ -271,7 +271,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "lduPrimitiveMeshTemplates.C"
+    #include "lduPrimitiveMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.C b/src/OpenFOAM/meshes/meshShapes/cell/cell.C
index 969b33784beb53fc458e7d2e9973278db6d88f96..aa2e0261419f755848b9f02f5aa6d97b89007b56 100644
--- a/src/OpenFOAM/meshes/meshShapes/cell/cell.C
+++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -192,7 +192,7 @@ Foam::point Foam::cell::centre
 
     // first calculate the aproximate cell centre as the average of all
     // face centres
-    vector cEst = vector::zero;
+    vector cEst = Zero;
     scalar sumArea = 0;
 
     const labelList& faces = *this;
@@ -208,7 +208,7 @@ Foam::point Foam::cell::centre
 
     // Calculate the centre by breaking the cell into pyramids and
     // volume-weighted averaging their centres
-    vector sumVc = vector::zero;
+    vector sumVc = Zero;
 
     scalar sumV = 0;
 
@@ -251,7 +251,7 @@ Foam::scalar Foam::cell::mag
 
     // first calculate the aproximate cell centre as the average of all
     // face centres
-    vector cEst = vector::zero;
+    vector cEst = Zero;
     scalar nCellFaces = 0;
 
     const labelList& faces = *this;
diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C
index 5d7ff59ba897d448404b3099191debe0cef8d70b..5a048dc0e345869d14a235e33e746a9ff82c5b60 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,7 +70,6 @@ Foam::cellMatcher::cellMatcher
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Create localFaces_ , pointMap_ , faceMap_
 Foam::label Foam::cellMatcher::calcLocalFaces
 (
     const faceList& faces,
@@ -136,7 +135,6 @@ Foam::label Foam::cellMatcher::calcLocalFaces
 }
 
 
-// Create edgeFaces_ : map from edge to two localFaces for single cell.
 void Foam::cellMatcher::calcEdgeAddressing(const label numVert)
 {
     edgeFaces_ = -1;
@@ -186,7 +184,6 @@ void Foam::cellMatcher::calcEdgeAddressing(const label numVert)
 }
 
 
-// Create pointFaceIndex_ : map from vertI, faceI to index of vertI on faceI.
 void Foam::cellMatcher::calcPointFaceIndex()
 {
     // Fill pointFaceIndex_ with -1
@@ -215,7 +212,6 @@ void Foam::cellMatcher::calcPointFaceIndex()
 }
 
 
-// Given edge(v0,v1) and (local)faceI return the other face
 Foam::label Foam::cellMatcher::otherFace
 (
     const label numVert,
diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C
index 55bf92e7c083f5cc176ae3628aa177a0bd906d9f..68278af08b9e41aaa84e5b2d38e6c0762cb7a4b1 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,6 @@ const Foam::label Foam::pyrMatcher::maxVertPerFace = 4;
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct null
 Foam::pyrMatcher::pyrMatcher()
 :
     cellMatcher
@@ -49,14 +48,15 @@ Foam::pyrMatcher::pyrMatcher()
         maxVertPerFace,
         "pyr"
     )
-{
-}
+{}
+
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::pyrMatcher::~pyrMatcher()
 {}
 
+
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 bool Foam::pyrMatcher::matchShape
diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C
index a8c014b3354e54901e40662238a1dae7d39b7fc1..a25c393310b42646c37fadba5b0d326a5b86e1f5 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Foam::vector Foam::cellModel::centre
 ) const
 {
     // Estimate centre of cell
-    vector cEst = vector::zero;
+    vector cEst = Zero;
 
     // Sum the points idicated by the label list
     forAll(pointLabels, i)
@@ -50,7 +50,7 @@ Foam::vector Foam::cellModel::centre
     // Calculate the centre by breaking the cell into pyramids and
     // volume-weighted averaging their centres
     scalar sumV = 0.0;
-    vector sumVc = vector::zero;
+    vector sumVc = Zero;
 
     const faceList cellFaces = faces(pointLabels);
 
@@ -92,7 +92,7 @@ Foam::scalar Foam::cellModel::mag
 ) const
 {
     // Estimate centre of cell
-    vector cEst = vector::zero;
+    vector cEst = Zero;
 
     // Sum the points idicated by the label list
     forAll(pointLabels, i)
diff --git a/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C b/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C
index c43aa0abaf6b2679ec28670266f457dda0440a61..1cfd988d7f6bfb1e0e75d6132664984173fee6d9 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellModeller/cellModeller.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,9 +85,6 @@ Foam::cellModeller::~cellModeller()
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-// Returns a pointer to a model which matches the string symbol
-// supplied. A null pointer is returned if there is no suitable match.
-
 const Foam::cellModel* Foam::cellModeller::lookup(const word& name)
 {
     HashTable<const cellModel*>::iterator iter = modelDictionary_.find(name);
@@ -102,7 +99,5 @@ const Foam::cellModel* Foam::cellModeller::lookup(const word& name)
     }
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/meshShapes/cellModeller/globalCellModeller.C b/src/OpenFOAM/meshes/meshShapes/cellModeller/globalCellModeller.C
index 02787472f6c8810ef310a395421ea6f5b283a34b..04652de8883ab989c4f5bfb47e02022698870b38 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellModeller/globalCellModeller.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellModeller/globalCellModeller.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,30 +32,23 @@ Description
 
 // * * * * * * * * * * * * * * * Static data * * * * * * * * * * * * * * * * //
 
-
-// PtrList of models
 Foam::PtrList<Foam::cellModel> Foam::cellModeller::models_
 (
     IFstream(findEtcFile("cellModels", true))()
 );
 
-// List of model pointers
 Foam::List<Foam::cellModel*> Foam::cellModeller::modelPtrs_;
 
-// HashTable of model pointers
 Foam::HashTable<const Foam::cellModel*> Foam::cellModeller::modelDictionary_;
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-// Construct a dummy cellModeller which reads the models and fills
-// the above tables
-cellModeller globalCellModeller_;
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
+    // Construct a dummy cellModeller which reads the models and fills
+    // the above tables
+    cellModeller globalCellModeller_;
+}
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.C b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.C
index 45165056fdc51b88cf3f485e312cb44970394b3c..cb328fe9838f9448ba6a84542e118be4f273898b 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShape.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,6 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Remove duplicate vertices and reset correct cell model
 void Foam::cellShape::collapse()
 {
     operator=(degenerateMatcher::match(*this));
diff --git a/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H b/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H
index 11596bc4eb14a4b7387cdd1fb676eda3db742a53..971202495c9bd81ca468307bb30c0dc8998627d9 100644
--- a/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H
+++ b/src/OpenFOAM/meshes/meshShapes/edge/EdgeMap.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ namespace Foam
 template<class T>
 class EdgeMap
 :
-    public HashTable<T, edge, Hash<edge> >
+    public HashTable<T, edge, Hash<edge>>
 {
 
 public:
@@ -57,19 +57,19 @@ public:
         //- Construct given initial map size
         EdgeMap(const label size = 128)
         :
-            HashTable<T, edge, Hash<edge> >(size)
+            HashTable<T, edge, Hash<edge>>(size)
         {}
 
         //- Construct from Istream
         EdgeMap(Istream& is)
         :
-            HashTable<T, edge, Hash<edge> >(is)
+            HashTable<T, edge, Hash<edge>>(is)
         {}
 
         //- Construct as copy
         EdgeMap(const EdgeMap<T>& map)
         :
-            HashTable<T, edge, Hash<edge> >(map)
+            HashTable<T, edge, Hash<edge>>(map)
         {}
 };
 
diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C
index b4dd451c90b8c02cdd5aa4aebf99f2efbe693ae7..6c65137162b6c909e064e4ed7a615115962c6225 100644
--- a/src/OpenFOAM/meshes/meshShapes/face/face.C
+++ b/src/OpenFOAM/meshes/meshShapes/face/face.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ Foam::tmp<Foam::vectorField>
 Foam::face::calcEdges(const pointField& points) const
 {
     tmp<vectorField> tedges(new vectorField(size()));
-    vectorField& edges = tedges();
+    vectorField& edges = tedges.ref();
 
     forAll(*this, i)
     {
@@ -505,7 +505,7 @@ Foam::point Foam::face::centre(const pointField& points) const
     }
 
 
-    point centrePoint = point::zero;
+    point centrePoint = Zero;
     for (label pI=0; pI<nPoints; ++pI)
     {
         centrePoint += points[operator[](pI)];
@@ -513,7 +513,7 @@ Foam::point Foam::face::centre(const pointField& points) const
     centrePoint /= nPoints;
 
     scalar sumA = 0;
-    vector sumAc = vector::zero;
+    vector sumAc = Zero;
 
     for (label pI=0; pI<nPoints; ++pI)
     {
@@ -572,14 +572,14 @@ Foam::vector Foam::face::normal(const pointField& p) const
 
     label pI;
 
-    point centrePoint = vector::zero;
+    point centrePoint = Zero;
     for (pI = 0; pI < nPoints; ++pI)
     {
         centrePoint += p[operator[](pI)];
     }
     centrePoint /= nPoints;
 
-    vector n = vector::zero;
+    vector n = Zero;
 
     point nextPoint = centrePoint;
 
@@ -742,7 +742,7 @@ Foam::tensor Foam::face::inertia
 
     const point ctr = centre(p);
 
-    tensor J = tensor::zero;
+    tensor J = Zero;
 
     forAll(*this, i)
     {
@@ -819,7 +819,6 @@ int Foam::face::edgeDirection(const edge& e) const
 }
 
 
-// Number of triangles directly known from number of vertices
 Foam::label Foam::face::nTriangles(const pointField&) const
 {
     return nTriangles();
diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H
index afb9b4549693935a3d8c56354a3480b3aaa5648e..ca5fd198aadc77954a6a6f6e2a772b316640041b 100644
--- a/src/OpenFOAM/meshes/meshShapes/face/face.H
+++ b/src/OpenFOAM/meshes/meshShapes/face/face.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -426,7 +426,7 @@ label longestEdge(const face& f, const pointField& pts);
 #include "faceI.H"
 
 #ifdef NoRepository
-#   include "faceTemplates.C"
+    #include "faceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceAreaInContact.C b/src/OpenFOAM/meshes/meshShapes/face/faceAreaInContact.C
index 504feb5cf274bf37afaed8e8eeba36c68501f978..b49ad74fe10aa14fc65d170c427e146be02a7903 100644
--- a/src/OpenFOAM/meshes/meshShapes/face/faceAreaInContact.C
+++ b/src/OpenFOAM/meshes/meshShapes/face/faceAreaInContact.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,15 +29,16 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Calculate area in contact given displacement of vertices relative to
-// the face plane. Positive displacement is above the face (no contact);
-// negative is in contact
 Foam::scalar Foam::face::areaInContact
 (
     const pointField& meshPoints,
     const scalarField& v
 ) const
 {
+    // Calculate area in contact given displacement of vertices relative to
+    // the face plane. Positive displacement is above the face (no contact);
+    // negative is in contact
+
     // Assemble the vertex values
     const labelList& labels = *this;
 
diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C b/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C
index cb850491429c070de2b88dd9c9ddcc0bbfe065f3..eb730e70b24b022763c9ac2320a856b6f3daafb6 100644
--- a/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C
+++ b/src/OpenFOAM/meshes/meshShapes/face/faceIntersection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,15 +30,6 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Return potential intersection with face with a ray starting
-// at p, direction n (does not need to be normalized)
-// Does face-center decomposition and returns triangle intersection
-// point closest to p.
-
-// In case of miss the point is the nearest point intersection of the
-// face plane and the ray and the distance is the distance between the
-// intersection point and the nearest point on the face
-
 Foam::pointHit Foam::face::ray
 (
     const point& p,
@@ -48,6 +39,15 @@ Foam::pointHit Foam::face::ray
     const intersection::direction dir
 ) const
 {
+    // Return potential intersection with face with a ray starting
+    // at p, direction n (does not need to be normalized)
+    // Does face-center decomposition and returns triangle intersection
+    // point closest to p.
+
+    // In case of miss the point is the nearest point intersection of the
+    // face plane and the ray and the distance is the distance between the
+    // intersection point and the nearest point on the face
+
     // If the face is a triangle, do a direct calculation
     if (size() == 3)
     {
diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C b/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C
index dcfda1d6995dda229e644edd9efee8a79d074b4a..6220d253cde254470df3a7c8e6dd3e44e7190b4b 100644
--- a/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C
+++ b/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,8 +70,8 @@ Type Foam::face::average
 
     label nPoints = size();
 
-    point centrePoint = point::zero;
-    Type cf = pTraits<Type>::zero;
+    point centrePoint = Zero;
+    Type cf = Zero;
 
     for (label pI=0; pI<nPoints; pI++)
     {
@@ -83,7 +83,7 @@ Type Foam::face::average
     cf /= nPoints;
 
     scalar sumA = 0;
-    Type sumAf = pTraits<Type>::zero;
+    Type sumAf = Zero;
 
     for (label pI=0; pI<nPoints; pI++)
     {
diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H
index 218fa12e9b813f7e88823b2cb20cb0a34224f652..d4f424b6cae663401d1f14b074f524d8ed1ef8d9 100644
--- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H
+++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,14 +70,14 @@ inline Foam::triFace Foam::tetCell::face(const label faceI) const
     static const label b[] = {2, 3, 1, 2};
     static const label c[] = {3, 2, 3, 1};
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (faceI >= 4)
     {
         FatalErrorInFunction
             << "index out of range 0 -> 3. faceI = " << faceI
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return triFace
     (
@@ -95,14 +95,14 @@ inline Foam::label Foam::tetCell::edgeFace(const label edgeI) const
     //static const label edgeFaces[6] = {2, 1, 1, 0, 0, 0};
     static const label edgeFaces[6] = {2, 3, 1, 0, 0, 1};
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (edgeI >= 6)
     {
         FatalErrorInFunction
             << "edge index out of range 0 -> 5. edgeI = " << edgeI
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return edgeFaces[edgeI];
 }
@@ -126,7 +126,7 @@ inline Foam::label Foam::tetCell::edgeAdjacentFace
         {1, 0, -1, -1}
     };
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (faceI >= 4)
     {
         FatalErrorInFunction
@@ -140,7 +140,7 @@ inline Foam::label Foam::tetCell::edgeAdjacentFace
             << "edge index out of range 0 -> 5. edgeI = " << edgeI
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return adjacentFace[edgeI][faceI];
 }
@@ -154,14 +154,14 @@ inline Foam::edge Foam::tetCell::tetEdge(const label edgeI) const
     static const label start[] = {0, 0, 0, 3, 1, 3};
     static const label end[] = {1, 2, 3, 1, 2, 2};
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     if (edgeI >= 6)
     {
         FatalErrorInFunction
             << "index out of range 0 -> 5. edgeI = " << edgeI
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return edge(operator[](start[edgeI]), operator[](end[edgeI]));
 }
diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
index 892fd6d480277e1b9c0b69b22e7f5176a167b1d6..2a66556d22323a903fc2447cf60db2ef0a505b26 100644
--- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
+++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -293,7 +293,7 @@ public:
 #include "triFaceI.H"
 
 #ifdef NoRepository
-#   include "triFaceTemplates.C"
+    #include "triFaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/meshTools/mergePoints.H b/src/OpenFOAM/meshes/meshTools/mergePoints.H
index 92f1f1071f3eea0c7ef134b1ba8180cac66a0364..37d41f3e7b3226aa3691095f5342d5acdecf627e 100644
--- a/src/OpenFOAM/meshes/meshTools/mergePoints.H
+++ b/src/OpenFOAM/meshes/meshTools/mergePoints.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ bool mergePoints
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mergePoints.C"
+    #include "mergePoints.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C
index 51eaab0d25b37429af4e25a84a635ed5e5fb8e7f..2610376a34fc3b91c1c7851fa43ba66daa7c5509 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,9 +28,6 @@ License
 #include "pointMesh.H"
 #include "mapPolyMesh.H"
 
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 void Foam::pointMapper::calcAddressing() const
@@ -161,7 +158,6 @@ void Foam::pointMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm)
 :
     pMesh_(pMesh),
diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C
index 1732a7ba0c043abd7cf7e3db69ea8dfa026a287d..b157ecbc2d2c035f6c0efa2639148ea025964e38 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,7 +109,6 @@ void Foam::pointPatchMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::pointPatchMapper::pointPatchMapper
 (
     const pointPatch& patch,
diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclicSlip/cyclicSlipPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclicSlip/cyclicSlipPointPatch.C
index 2700e7fea93c845d2376f08c3218f33d30ff03a2..3a2200aa96dd258c752bdf7ad4c2e7568ddb419d 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclicSlip/cyclicSlipPointPatch.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclicSlip/cyclicSlipPointPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,6 @@ namespace Foam
 
 defineTypeNameAndDebug(cyclicSlipPointPatch, 0);
 
-// Add the patch constructor functions to the hash tables
 addToRunTimeSelectionTable
 (
     facePointPatch,
diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C
index 085df988048288779f630b664d6f1844060cf6c0..3979ef17c0b1afc461a4046f17c93cc9f72dfb47 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,6 @@ namespace Foam
 
 defineTypeNameAndDebug(nonuniformTransformCyclicPointPatch, 0);
 
-// Add the patch constructor functions to the hash tables
 addToRunTimeSelectionTable
 (
     facePointPatch,
diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/wall/wallPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/wall/wallPointPatch.C
index 285e355931a8ec90b5fd82b7ebb6c3c579b70698..332e93837de948425766e03f949687ff6815cdad 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/wall/wallPointPatch.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/wall/wallPointPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,6 @@ namespace Foam
 
 defineTypeNameAndDebug(wallPointPatch, 0);
 
-// Add the patch constructor functions to the hash tables
 addToRunTimeSelectionTable
 (
     facePointPatch,
diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C
index b5a1b29dc9acc309cc183067a6fdae93e330ab58..8969bacec96275b11657501acd171ccc911cf21c 100644
--- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C
+++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,10 +35,7 @@ Foam::autoPtr<Foam::facePointPatch> Foam::facePointPatch::New
 {
     if (debug)
     {
-        Info<< "facePointPatch::New(const polyPatch&, "
-            << " const pointBoundaryMesh&) : "
-            << "constructing facePointPatch"
-            << endl;
+        InfoInFunction << "Constructing facePointPatch" << endl;
     }
 
     polyPatchConstructorTable::iterator cstrIter =
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
index 3a6d49e7576fa5f2e2098d17f647f7312c0159ba..129b477becfda3da079f2d4590a242f3e7ef6bbf 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -251,7 +251,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "globalIndexTemplates.C"
+    #include "globalIndexTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
index 5532969f36978a6cba88f2648d584b98283f3ace..3be3a3a90b668f6baf3e2c3c4acd966ef804e6bf 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ void Foam::globalIndex::gather
         allFld.setSize(off.last());
 
         // Assign my local data
-        SubList<Type>(allFld, fld.size(), 0).assign(fld);
+        SubList<Type>(allFld, fld.size(), 0) = fld;
 
         if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
         {
@@ -207,7 +207,7 @@ void Foam::globalIndex::scatter
 {
     if (Pstream::myProcNo(comm) == procIDs[0])
     {
-        fld.assign(SubList<Type>(allFld, off[1]-off[0]));
+        fld.deepCopy(SubList<Type>(allFld, off[1]-off[0]));
 
         if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
         {
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
index 87317ce8f97ffa4b4ecf0afa2f5b0f7a9b7fd648..b52a952b9a03fa20223601ef389fae35c0eecf6d 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,6 @@ namespace Foam
 {
 defineTypeNameAndDebug(globalMeshData, 0);
 
-// Geometric matching tolerance. Factor of mesh bounding box.
 const scalar globalMeshData::matchTol_ = 1e-8;
 
 template<>
@@ -63,7 +62,6 @@ public:
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Collect processor patch addressing.
 void Foam::globalMeshData::initProcAddr()
 {
     processorPatchIndices_.setSize(mesh_.boundaryMesh().size());
@@ -251,7 +249,6 @@ void Foam::globalMeshData::calcSharedPoints() const
 }
 
 
-// Given information about locally used edges allocate global shared edges.
 void Foam::globalMeshData::countSharedEdges
 (
     const EdgeMap<labelList>& procSharedEdges,
@@ -294,12 +291,13 @@ void Foam::globalMeshData::countSharedEdges
 }
 
 
-// Shared edges are shared between multiple processors. By their nature both
-// of their endpoints are shared points. (but not all edges using two shared
-// points are shared edges! There might e.g. be an edge between two unrelated
-// clusters of shared points)
 void Foam::globalMeshData::calcSharedEdges() const
 {
+    // Shared edges are shared between multiple processors. By their nature both
+    // of their endpoints are shared points. (but not all edges using two shared
+    // points are shared edges! There might e.g. be an edge between two
+    // unrelated clusters of shared points)
+
     if
     (
         nGlobalEdges_ != -1
@@ -806,8 +804,6 @@ void Foam::globalMeshData::calcGlobalPointEdges
 }
 
 
-// Find transformation to take remotePoint to localPoint. Use info to find
-// the transforms.
 Foam::label Foam::globalMeshData::findTransform
 (
     const labelPairList& info,
@@ -1051,7 +1047,7 @@ void Foam::globalMeshData::calcGlobalEdgeSlaves() const
     // Construct map
     globalEdgeTransformedSlavesPtr_.reset(new labelListList());
 
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
     globalEdgeSlavesMapPtr_.reset
     (
         new mapDistribute
@@ -1199,8 +1195,6 @@ void Foam::globalMeshData::calcGlobalEdgeOrientation() const
 }
 
 
-// Calculate uncoupled boundary faces (without calculating
-// primitiveMesh::pointFaces())
 void Foam::globalMeshData::calcPointBoundaryFaces
 (
     labelListList& pointBoundaryFaces
@@ -1435,7 +1429,7 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const
     }
 
     // Construct a map to get the face data directly
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
 
     globalPointTransformedBoundaryFacesPtr_.reset
     (
@@ -1662,7 +1656,7 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const
     }
 
     // Construct a map to get the cell data directly
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
 
     globalPointTransformedBoundaryCellsPtr_.reset
     (
@@ -1737,7 +1731,6 @@ void Foam::globalMeshData::calcGlobalCoPointSlaves() const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from polyMesh
 Foam::globalMeshData::globalMeshData(const polyMesh& mesh)
 :
     processorTopology(mesh.boundaryMesh(), UPstream::worldComm),
@@ -1820,7 +1813,6 @@ void Foam::globalMeshData::clearOut()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Return shared point global labels.
 const Foam::labelList& Foam::globalMeshData::sharedPointGlobalLabels() const
 {
     if (!sharedPointGlobalLabelsPtr_.valid())
@@ -1871,7 +1863,6 @@ const Foam::labelList& Foam::globalMeshData::sharedPointGlobalLabels() const
 }
 
 
-// Collect coordinates of shared points. (does parallel communication!)
 Foam::pointField Foam::globalMeshData::sharedPoints() const
 {
     // Get all processors to send their shared points to master.
@@ -1926,7 +1917,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
             (
                 Pstream::blocking,
                 slave,
-                sharedPoints.size()*sizeof(vector::zero)
+                sharedPoints.size()*sizeof(Zero)
             );
             toSlave << sharedPoints;
         }
@@ -1954,7 +1945,6 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
 }
 
 
-// Collect coordinates of shared points. (does parallel communication!)
 Foam::pointField Foam::globalMeshData::geometricSharedPoints() const
 {
     // Get coords of my shared points
@@ -2728,7 +2718,6 @@ void Foam::globalMeshData::movePoints(const pointField& newPoints)
 }
 
 
-// Update all data after morph
 void Foam::globalMeshData::updateMesh()
 {
     // Clear out old data
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H
index 35543fd0937d399aa4df018d4f0e75b88c0c8482..2362f9382f617dea13e734772fc6f0422135392f 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,7 +153,7 @@ class globalMeshData
             //      edges : meshEdges(), meshEdgeMap()
             mutable autoPtr<indirectPrimitivePatch> coupledPatchPtr_;
             mutable autoPtr<labelList> coupledPatchMeshEdgesPtr_;
-            mutable autoPtr<Map<label> > coupledPatchMeshEdgeMapPtr_;
+            mutable autoPtr<Map<label>> coupledPatchMeshEdgeMapPtr_;
 
             //- Global numbering for coupledPatch points
             mutable autoPtr<globalIndex> globalPointNumberingPtr_;
@@ -625,7 +625,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "globalMeshDataTemplates.C"
+    #include "globalMeshDataTemplates.C"
 #endif
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C
index 2b6b17da92d3e4fe0fc885200ee59b12029a5ec4..fa753427ec33826c63abc91e60d8ac9466b80d76 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,14 +33,12 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(globalPoints, 0);
+    defineTypeNameAndDebug(globalPoints, 0);
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Total number of points on coupled patches. Is upper limit for number
-// of shared points
 Foam::label Foam::globalPoints::countPatchPoints
 (
     const polyBoundaryMesh& patches
@@ -125,9 +123,6 @@ Foam::labelPairList Foam::globalPoints::addSendTransform
 }
 
 
-// Collect all topological information about a point on a patch.
-// (this information is the patch faces using the point and the relative
-// position of the point in the face)
 void Foam::globalPoints::addToSend
 (
     const polyPatch& pp,
@@ -139,6 +134,10 @@ void Foam::globalPoints::addToSend
     DynamicList<labelPairList>& allInfo
 ) const
 {
+    // Collect all topological information about a point on a patch.  (this
+    // information is the patch faces using the point and the relative position
+    // of the point in the face)
+
     label meshPointI = pp.meshPoints()[patchPointI];
 
     // Add all faces using the point so we are sure we find it on the
@@ -160,8 +159,6 @@ void Foam::globalPoints::addToSend
 }
 
 
-// Add nbrInfo to myInfo. Return true if anything changed.
-// nbrInfo is for a point a list of all the global points using it
 bool Foam::globalPoints::mergeInfo
 (
     const labelPairList& nbrInfo,
@@ -169,6 +166,9 @@ bool Foam::globalPoints::mergeInfo
     labelPairList& myInfo
 ) const
 {
+    // Add nbrInfo to myInfo. Return true if anything changed.  nbrInfo is for a
+    // point a list of all the global points using it
+
     bool anyChanged = false;
 
     // Extend to make space for the nbrInfo (trimmed later)
@@ -267,14 +267,15 @@ Foam::label Foam::globalPoints::localToMeshPoint
 }
 
 
-// Updates database of current information on meshpoints with nbrInfo.
-// Uses mergeInfo above. Returns true if data kept for meshPointI changed.
 bool Foam::globalPoints::mergeInfo
 (
     const labelPairList& nbrInfo,
     const label localPointI
 )
 {
+    // Updates database of current information on meshpoints with nbrInfo.  Uses
+    // mergeInfo above. Returns true if data kept for meshPointI changed.
+
     label infoChanged = false;
 
     // Get the index into the procPoints list.
@@ -315,14 +316,15 @@ bool Foam::globalPoints::mergeInfo
 }
 
 
-// Updates database of current information on meshpoints with nbrInfo.
-// Uses mergeInfo above. Returns true if data kept for meshPointI changed.
 bool Foam::globalPoints::storeInitialInfo
 (
     const labelPairList& nbrInfo,
     const label localPointI
 )
 {
+    // Updates database of current information on meshpoints with nbrInfo.  Uses
+    // mergeInfo above. Returns true if data kept for meshPointI changed.
+
     label infoChanged = false;
 
     // Get the index into the procPoints list.
@@ -387,7 +389,6 @@ void Foam::globalPoints::printProcPoints
 }
 
 
-// Insert my own points into structure and mark as changed.
 void Foam::globalPoints::initOwnPoints
 (
     const Map<label>& meshToPatchPoint,
@@ -475,7 +476,6 @@ void Foam::globalPoints::initOwnPoints
 }
 
 
-// Send all my info on changedPoints_ to my neighbours.
 void Foam::globalPoints::sendPatchPoints
 (
     const bool mergeSeparated,
@@ -563,11 +563,6 @@ void Foam::globalPoints::sendPatchPoints
 }
 
 
-// Receive all my neighbours' information and merge with mine.
-// After finishing will have updated
-// - procPoints_ : all neighbour information merged in.
-// - meshToProcPoint_
-// - changedPoints: all points for which something changed.
 void Foam::globalPoints::receivePatchPoints
 (
     const bool mergeSeparated,
@@ -577,6 +572,12 @@ void Foam::globalPoints::receivePatchPoints
     labelHashSet& changedPoints
 )
 {
+    // Receive all my neighbours' information and merge with mine.
+    // After finishing will have updated
+    // - procPoints_ : all neighbour information merged in.
+    // - meshToProcPoint_
+    // - changedPoints: all points for which something changed.
+
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
     const labelPairList& patchInfo = globalTransforms_.patchTransformSign();
 
@@ -721,14 +722,15 @@ void Foam::globalPoints::receivePatchPoints
 }
 
 
-// Remove entries which are handled by normal face-face communication. I.e.
-// those points where the equivalence list is only me and my (face)neighbour
 void Foam::globalPoints::remove
 (
     const labelList& patchToMeshPoint,
     const Map<label>& directNeighbours
 )
 {
+    // Remove entries which are handled by normal face-face communication. I.e.
+    // those points where the equivalence list is only me and my (face)neighbour
+
     // Save old ones.
     Map<label> oldMeshToProcPoint(meshToProcPoint_.xfer());
     meshToProcPoint_.resize(oldMeshToProcPoint.size());
@@ -1061,7 +1063,7 @@ void Foam::globalPoints::calculateSharedPoints
     }
 
 
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
     map_.reset
     (
         new mapDistribute
@@ -1087,7 +1089,6 @@ void Foam::globalPoints::calculateSharedPoints
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from mesh
 Foam::globalPoints::globalPoints
 (
     const polyMesh& mesh,
@@ -1116,7 +1117,6 @@ Foam::globalPoints::globalPoints
 }
 
 
-// Construct from mesh and patch of coupled faces
 Foam::globalPoints::globalPoints
 (
     const polyMesh& mesh,
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C
index ed8f78c259c4fa453d376518a70f782c56b045d5..d43410ec9d661f742942aa91c7bac2ba320ebe15 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -286,7 +286,6 @@ void Foam::cellMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::cellMapper::cellMapper(const mapPolyMesh& mpm)
 :
     mesh_(mpm.mesh()),
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C
index 71ca27fa85168c758122075c17f7916cc03177b3..aa80be4c36a2e93b89a7f0d9d1efeea98f157d99 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -201,7 +201,6 @@ void Foam::faceMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::faceMapper::faceMapper(const mapPolyMesh& mpm)
 :
     mesh_(mpm.mesh()),
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C
index 07ee3f874cc80c886103635d1c93fce706bd33dc..202eaeceb0d483cbc936ad18d2a01fc0975a9de6 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::mapAddedPolyMesh::mapAddedPolyMesh
 (
     const label nOldPoints,
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C
index 66b935ea909a5842c2dd7d0ffbf5cc2a946603e9..7a6ff3c10a0a260500d54c6f13c5e4c077829cfc 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -148,14 +148,12 @@ void Foam::mapDistribute::printLayout(Ostream& os) const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-//- Construct null
 Foam::mapDistribute::mapDistribute()
 :
     mapDistributeBase()
 {}
 
 
-//- Construct from components
 Foam::mapDistribute::mapDistribute
 (
     const label constructSize,
@@ -176,7 +174,6 @@ Foam::mapDistribute::mapDistribute
 {}
 
 
-//- Construct from components
 Foam::mapDistribute::mapDistribute
 (
     const label constructSize,
@@ -215,7 +212,7 @@ Foam::mapDistribute::mapDistribute
 (
     const globalIndex& globalNumbering,
     labelList& elements,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     const int tag
 )
 :
@@ -233,7 +230,7 @@ Foam::mapDistribute::mapDistribute
 (
     const globalIndex& globalNumbering,
     labelListList& cellCells,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     const int tag
 )
 :
@@ -254,7 +251,7 @@ Foam::mapDistribute::mapDistribute
     const globalIndexAndTransform& globalTransforms,
     const labelPairList& transformedElements,
     labelList& transformedIndices,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     const int tag
 )
 :
@@ -359,7 +356,7 @@ Foam::mapDistribute::mapDistribute
     const globalIndexAndTransform& globalTransforms,
     const List<labelPairList>& transformedElements,
     labelListList& transformedIndices,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     const int tag
 )
 :
@@ -513,8 +510,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::mapDistribute::clone() const
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-Foam::label Foam::mapDistribute::whichTransform(const label index)
-const
+Foam::label Foam::mapDistribute::whichTransform(const label index) const
 {
     return findLower(transformStart_, index+1);
 }
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H
index bd19e0947365756a6fb0b1cfbf588d968bdee046..42b1febfdb30e05d43e8e219380c2e82948b5556 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -163,6 +163,7 @@ class mapDistribute
         //- Destination in constructMap for transformed elements
         labelList transformStart_;
 
+
     // Private Member Functions
 
         //- Helper function: copy transformElements without transformation
@@ -189,6 +190,7 @@ class mapDistribute
             const TransformOp& top
         ) const;
 
+
 public:
 
     // Public classes
@@ -215,7 +217,7 @@ public:
             (
                 const vectorTensorTransform& vt,
                 const bool forward,
-                List<List<Type> >& flds
+                List<List<Type>>& flds
             ) const
             {
                 forAll(flds, i)
@@ -272,7 +274,7 @@ public:
             (
                 const vectorTensorTransform& vt,
                 const bool forward,
-                List<List<point> >& flds
+                List<List<point>>& flds
             ) const
             {
                 forAll(flds, i)
@@ -353,7 +355,7 @@ public:
         (
             const globalIndex&,
             labelList& elements,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             const int tag = Pstream::msgType()
         );
 
@@ -364,7 +366,7 @@ public:
         (
             const globalIndex&,
             labelListList& cellCells,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             const int tag = Pstream::msgType()
         );
 
@@ -381,7 +383,7 @@ public:
             const globalIndexAndTransform&,
             const labelPairList& transformedElements,
             labelList& transformedIndices,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             const int tag = Pstream::msgType()
         );
 
@@ -393,7 +395,7 @@ public:
             const globalIndexAndTransform&,
             const List<labelPairList>& transformedElements,
             labelListList& transformedIndices,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             const int tag = Pstream::msgType()
         );
 
@@ -444,7 +446,6 @@ public:
             //- Transfer contents to the Xfer container
             Xfer<mapDistribute> xfer();
 
-
             //- Distribute data using default commsType.
             template<class T>
             void distribute
@@ -550,7 +551,6 @@ public:
 
         //- Write dictionary to Ostream
         friend Ostream& operator<<(Ostream&, const mapDistribute&);
-
 };
 
 
@@ -641,7 +641,7 @@ void mapDistribute::transform::operator()
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mapDistributeTemplates.C"
+    #include "mapDistributeTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C
index 2cdf3d0af215dcff6061c8d57268f032e120299a..ef132e56760be25a2d6e1dc71536e14ea230c139 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -50,7 +50,7 @@ Foam::List<Foam::labelPair> Foam::mapDistributeBase::schedule
     List<labelPair> allComms;
 
     {
-        HashSet<labelPair, labelPair::Hash<> > commsSet(Pstream::nProcs());
+        HashSet<labelPair, labelPair::Hash<>> commsSet(Pstream::nProcs());
 
         // Find what communication is required
         forAll(subMap, procI)
@@ -280,7 +280,7 @@ void Foam::mapDistributeBase::calcCompactAddressing
 (
     const globalIndex& globalNumbering,
     const labelList& elements,
-    List<Map<label> >& compactMap
+    List<Map<label>>& compactMap
 ) const
 {
     compactMap.setSize(Pstream::nProcs());
@@ -329,7 +329,7 @@ void Foam::mapDistributeBase::calcCompactAddressing
 (
     const globalIndex& globalNumbering,
     const labelListList& cellCells,
-    List<Map<label> >& compactMap
+    List<Map<label>>& compactMap
 ) const
 {
     compactMap.setSize(Pstream::nProcs());
@@ -389,7 +389,7 @@ void Foam::mapDistributeBase::exchangeAddressing
     const int tag,
     const globalIndex& globalNumbering,
     labelList& elements,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     labelList& compactStart
 )
 {
@@ -446,12 +446,10 @@ void Foam::mapDistributeBase::exchangeAddressing
     }
 
     subMap_.setSize(Pstream::nProcs());
-    labelListList sendSizes;
     Pstream::exchange<labelList, label>
     (
         wantedRemoteElements,
         subMap_,
-        sendSizes,
         tag,
         Pstream::worldComm  //TBD
     );
@@ -469,7 +467,7 @@ void Foam::mapDistributeBase::exchangeAddressing
     const int tag,
     const globalIndex& globalNumbering,
     labelListList& cellCells,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     labelList& compactStart
 )
 {
@@ -526,12 +524,10 @@ void Foam::mapDistributeBase::exchangeAddressing
     }
 
     subMap_.setSize(Pstream::nProcs());
-    labelListList sendSizes;
     Pstream::exchange<labelList, label>
     (
         wantedRemoteElements,
         subMap_,
-        sendSizes,
         tag,
         Pstream::worldComm      //TBD
     );
@@ -658,7 +654,7 @@ Foam::mapDistributeBase::mapDistributeBase
 (
     const globalIndex& globalNumbering,
     labelList& elements,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     const int tag
 )
 :
@@ -718,7 +714,7 @@ Foam::mapDistributeBase::mapDistributeBase
 (
     const globalIndex& globalNumbering,
     labelListList& cellCells,
-    List<Map<label> >& compactMap,
+    List<Map<label>>& compactMap,
     const int tag
 )
 :
@@ -824,7 +820,7 @@ Foam::Xfer<Foam::mapDistributeBase> Foam::mapDistributeBase::xfer()
 Foam::label Foam::mapDistributeBase::renumber
 (
     const globalIndex& globalNumbering,
-    const List<Map<label> >& compactMap,
+    const List<Map<label>>& compactMap,
     const label globalI
 )
 {
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H
index 80be2a8b9e4bc64f388b04b640fe9a31a65fcde0..9497a3467d910db34749dc2bbbd45291e4fa0f03 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -112,7 +112,7 @@ protected:
 
 
         //- Schedule
-        mutable autoPtr<List<labelPair> > schedulePtr_;
+        mutable autoPtr<List<labelPair>> schedulePtr_;
 
 
     // Private Member Functions
@@ -128,13 +128,13 @@ protected:
         (
             const globalIndex& globalNumbering,
             const labelList& elements,
-            List<Map<label> >& compactMap
+            List<Map<label>>& compactMap
         ) const;
         void calcCompactAddressing
         (
             const globalIndex& globalNumbering,
             const labelListList& elements,
-            List<Map<label> >& compactMap
+            List<Map<label>>& compactMap
         ) const;
 
         void exchangeAddressing
@@ -142,7 +142,7 @@ protected:
             const int tag,
             const globalIndex& globalNumbering,
             labelList& elements,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             labelList& compactStart
         );
         void exchangeAddressing
@@ -150,7 +150,7 @@ protected:
             const int tag,
             const globalIndex& globalNumbering,
             labelListList& elements,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             labelList& compactStart
         );
 
@@ -212,7 +212,7 @@ public:
         (
             const globalIndex&,
             labelList& elements,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             const int tag = Pstream::msgType()
         );
 
@@ -223,7 +223,7 @@ public:
         (
             const globalIndex&,
             labelListList& cellCells,
-            List<Map<label> >& compactMap,
+            List<Map<label>>& compactMap,
             const int tag = Pstream::msgType()
         );
 
@@ -326,7 +326,7 @@ public:
             static label renumber
             (
                 const globalIndex&,
-                const List<Map<label> >& compactMap,
+                const List<Map<label>>& compactMap,
                 const label globalElement
             );
 
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
index 111424e5893f6583e0426977545154ec01596abd..df1986bf8cd75b2e380d6657ae1e487206257556 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBaseTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -461,7 +461,7 @@ void Foam::mapDistributeBase::distribute
         {
             // Set up sends to neighbours
 
-            List<List<T > > sendFields(Pstream::nProcs());
+            List<List<T>> sendFields(Pstream::nProcs());
 
             for (label domain = 0; domain < Pstream::nProcs(); domain++)
             {
@@ -495,7 +495,7 @@ void Foam::mapDistributeBase::distribute
 
             // Set up receives from neighbours
 
-            List<List<T > > recvFields(Pstream::nProcs());
+            List<List<T>> recvFields(Pstream::nProcs());
 
             for (label domain = 0; domain < Pstream::nProcs(); domain++)
             {
@@ -938,7 +938,7 @@ void Foam::mapDistributeBase::distribute
         {
             // Set up sends to neighbours
 
-            List<List<T > > sendFields(Pstream::nProcs());
+            List<List<T>> sendFields(Pstream::nProcs());
 
             for (label domain = 0; domain < Pstream::nProcs(); domain++)
             {
@@ -972,7 +972,7 @@ void Foam::mapDistributeBase::distribute
 
             // Set up receives from neighbours
 
-            List<List<T > > recvFields(Pstream::nProcs());
+            List<List<T>> recvFields(Pstream::nProcs());
 
             for (label domain = 0; domain < Pstream::nProcs(); domain++)
             {
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C
index 48f2830b656b11b67dc596cf90f417e1a955b186..ef0ac93ed77aa4314a91026ac3c7e1cfc6997bbb 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C
index 05d85d7bf75e556f5833690a89f88920e470d360..e1392b51192a5195e7e7ed2ec372ef785142f54a 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,6 @@ void Foam::mapDistribute::applyDummyTransforms(List<T>& field) const
 }
 
 
-// In case of no transform: copy elements
 template<class T>
 void Foam::mapDistribute::applyDummyInverseTransforms(List<T>& field) const
 {
@@ -67,7 +66,6 @@ void Foam::mapDistribute::applyDummyInverseTransforms(List<T>& field) const
 }
 
 
-// Calculate transformed elements.
 template<class T, class TransformOp>   //, class CombineOp>
 void Foam::mapDistribute::applyTransforms
 (
@@ -98,7 +96,6 @@ void Foam::mapDistribute::applyTransforms
 }
 
 
-// Calculate transformed elements.
 template<class T, class TransformOp>   //, class CombineOp>
 void Foam::mapDistribute::applyInverseTransforms
 (
@@ -129,7 +126,6 @@ void Foam::mapDistribute::applyInverseTransforms
 }
 
 
-//- Distribute data using default commsType.
 template<class T, class negateOp>
 void Foam::mapDistribute::distribute
 (
@@ -162,7 +158,6 @@ void Foam::mapDistribute::distribute
 }
 
 
-//- Distribute data using default commsType.
 template<class T>
 void Foam::mapDistribute::distribute
 (
@@ -181,7 +176,6 @@ void Foam::mapDistribute::distribute
 }
 
 
-//- Reverse distribute data using default commsType.
 template<class T>
 void Foam::mapDistribute::reverseDistribute
 (
@@ -200,9 +194,6 @@ void Foam::mapDistribute::reverseDistribute
 }
 
 
-//- Reverse distribute data using default commsType.
-//  Since constructSize might be larger than supplied size supply
-//  a nullValue
 template<class T>
 void Foam::mapDistribute::reverseDistribute
 (
@@ -222,7 +213,6 @@ void Foam::mapDistribute::reverseDistribute
 }
 
 
-//- Distribute data using default commsType.
 template<class T, class TransformOp>
 void Foam::mapDistribute::distribute
 (
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C
index ddf90970ff71d9c6d4ebddb9cedcf8009528852a..48d857b05e3f17c677a7f9d75a45f17bdcf5d18b 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -143,38 +143,38 @@ Foam::mapPolyMesh::mapPolyMesh
     labelList& oldPatchStarts,
     labelList& oldPatchNMeshPoints,
     autoPtr<scalarField>& oldCellVolumesPtr,
-    const bool reUse
+    const bool reuse
 )
 :
     mesh_(mesh),
     nOldPoints_(nOldPoints),
     nOldFaces_(nOldFaces),
     nOldCells_(nOldCells),
-    pointMap_(pointMap, reUse),
-    pointsFromPointsMap_(pointsFromPoints, reUse),
-    faceMap_(faceMap, reUse),
-    facesFromPointsMap_(facesFromPoints, reUse),
-    facesFromEdgesMap_(facesFromEdges, reUse),
-    facesFromFacesMap_(facesFromFaces, reUse),
-    cellMap_(cellMap, reUse),
-    cellsFromPointsMap_(cellsFromPoints, reUse),
-    cellsFromEdgesMap_(cellsFromEdges, reUse),
-    cellsFromFacesMap_(cellsFromFaces, reUse),
-    cellsFromCellsMap_(cellsFromCells, reUse),
-    reversePointMap_(reversePointMap, reUse),
-    reverseFaceMap_(reverseFaceMap, reUse),
-    reverseCellMap_(reverseCellMap, reUse),
+    pointMap_(pointMap, reuse),
+    pointsFromPointsMap_(pointsFromPoints, reuse),
+    faceMap_(faceMap, reuse),
+    facesFromPointsMap_(facesFromPoints, reuse),
+    facesFromEdgesMap_(facesFromEdges, reuse),
+    facesFromFacesMap_(facesFromFaces, reuse),
+    cellMap_(cellMap, reuse),
+    cellsFromPointsMap_(cellsFromPoints, reuse),
+    cellsFromEdgesMap_(cellsFromEdges, reuse),
+    cellsFromFacesMap_(cellsFromFaces, reuse),
+    cellsFromCellsMap_(cellsFromCells, reuse),
+    reversePointMap_(reversePointMap, reuse),
+    reverseFaceMap_(reverseFaceMap, reuse),
+    reverseCellMap_(reverseCellMap, reuse),
     flipFaceFlux_(flipFaceFlux),
-    patchPointMap_(patchPointMap, reUse),
-    pointZoneMap_(pointZoneMap, reUse),
-    faceZonePointMap_(faceZonePointMap, reUse),
-    faceZoneFaceMap_(faceZoneFaceMap, reUse),
-    cellZoneMap_(cellZoneMap, reUse),
-    preMotionPoints_(preMotionPoints, reUse),
+    patchPointMap_(patchPointMap, reuse),
+    pointZoneMap_(pointZoneMap, reuse),
+    faceZonePointMap_(faceZonePointMap, reuse),
+    faceZoneFaceMap_(faceZoneFaceMap, reuse),
+    cellZoneMap_(cellZoneMap, reuse),
+    preMotionPoints_(preMotionPoints, reuse),
     oldPatchSizes_(oldPatchStarts.size()),
-    oldPatchStarts_(oldPatchStarts, reUse),
-    oldPatchNMeshPoints_(oldPatchNMeshPoints, reUse),
-    oldCellVolumesPtr_(oldCellVolumesPtr, reUse)
+    oldPatchStarts_(oldPatchStarts, reuse),
+    oldPatchNMeshPoints_(oldPatchNMeshPoints, reuse),
+    oldCellVolumesPtr_(oldCellVolumesPtr, reuse)
 {
     if (oldPatchStarts_.size() > 0)
     {
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H
index e81de98eb795e0a4e040f4e6266d63472b0bcb77..f369944c69efff40da3ed5b642c5324b00f59d22 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,8 +157,6 @@ class polyMesh;
 \*---------------------------------------------------------------------------*/
 
 class mapPolyMesh
-:
-    public refCount
 {
     // Private data
 
@@ -349,7 +347,7 @@ public:
             labelList& oldPatchStarts,
             labelList& oldPatchNMeshPoints,
             autoPtr<scalarField>& oldCellVolumesPtr,
-            const bool reUse
+            const bool reuse
         );
 
     // Member Functions
diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H
index d85063422d130a264d3093840978f2ba736645f0..c8dcd8154bc907dffed17db67b7665e016afe00e 100644
--- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,6 @@ SourceFiles
 #ifndef mapSubsetMesh_H
 #define mapSubsetMesh_H
 
-#include "refCount.H"
 #include "labelList.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -47,8 +46,6 @@ namespace Foam
 \*---------------------------------------------------------------------------*/
 
 class mapSubsetMesh
-:
-    public refCount
 {
     // Private data
 
@@ -112,7 +109,7 @@ public:
             const label exposedPatchID,
             labelList& oldPatchStarts,
             labelList& oldPatchNMeshPoints,
-            const bool reUse
+            const bool reuse
         );
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
index 5f70ce9e29c1a51a71078437f2cef375532cc524..e15618b552cd1a0066c1caf95f32da876606c655 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,7 +167,7 @@ Foam::polyBoundaryMesh::polyBoundaryMesh
     {
         polyPatchList& patches = *this;
         patches.setSize(ppl.size());
-        forAll (patches, patchI)
+        forAll(patches, patchI)
         {
             patches.set(patchI, ppl[patchI].clone(*this).ptr());
         }
@@ -287,7 +287,7 @@ Foam::polyBoundaryMesh::neighbourEdges() const
 
         // From mesh edge (expressed as a point pair so as not to construct
         // point addressing) to patch + relative edge index.
-        HashTable<labelPair, edge, Hash<edge> > pointsToEdge(nEdgePairs);
+        HashTable<labelPair, edge, Hash<edge>> pointsToEdge(nEdgePairs);
 
         forAll(*this, patchI)
         {
@@ -308,7 +308,7 @@ Foam::polyBoundaryMesh::neighbourEdges() const
                 // Edge in mesh points.
                 edge meshEdge(pp.meshPoints()[e[0]], pp.meshPoints()[e[1]]);
 
-                HashTable<labelPair, edge, Hash<edge> >::iterator fnd =
+                HashTable<labelPair, edge, Hash<edge>>::iterator fnd =
                     pointsToEdge.find(meshEdge);
 
                 if (fnd == pointsToEdge.end())
diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H
index 1906b422ac5587b14286da9693cfb868faad2f1c..114fc231689348e9c249bb61d609f60423be6fb4 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,10 +70,10 @@ class polyBoundaryMesh
 
         mutable autoPtr<labelList> patchIDPtr_;
 
-        mutable autoPtr<HashTable<labelList, word> > groupPatchIDsPtr_;
+        mutable autoPtr<HashTable<labelList, word>> groupPatchIDsPtr_;
 
         //- Edges of neighbouring patches
-        mutable autoPtr<List<labelPairList> > neighbourEdgesPtr_;
+        mutable autoPtr<List<labelPairList>> neighbourEdgesPtr_;
 
 
     // Private Member Functions
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C
index 7a4d8b23ff853e575527bbbb23e515df445869ce..827d089fc771aa54bb3c1022b3ed6f7b7ef7c856 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,8 +62,8 @@ void Foam::polyMesh::calcDirections() const
     label nEmptyPatches = 0;
     label nWedgePatches = 0;
 
-    vector emptyDirVec = vector::zero;
-    vector wedgeDirVec = vector::zero;
+    vector emptyDirVec = Zero;
+    vector wedgeDirVec = Zero;
 
     forAll(boundaryMesh(), patchi)
     {
@@ -205,8 +205,8 @@ Foam::polyMesh::polyMesh(const IOobject& io)
     ),
     bounds_(points_),
     comm_(UPstream::worldComm),
-    geometricD_(Vector<label>::zero),
-    solutionD_(Vector<label>::zero),
+    geometricD_(Zero),
+    solutionD_(Zero),
     tetBasePtIsPtr_(NULL),
     cellTreePtr_(NULL),
     pointZones_
@@ -399,8 +399,8 @@ Foam::polyMesh::polyMesh
     ),
     bounds_(points_, syncPar),
     comm_(UPstream::worldComm),
-    geometricD_(Vector<label>::zero),
-    solutionD_(Vector<label>::zero),
+    geometricD_(Zero),
+    solutionD_(Zero),
     tetBasePtIsPtr_(NULL),
     cellTreePtr_(NULL),
     pointZones_
@@ -550,8 +550,8 @@ Foam::polyMesh::polyMesh
     ),
     bounds_(points_, syncPar),
     comm_(UPstream::worldComm),
-    geometricD_(Vector<label>::zero),
-    solutionD_(Vector<label>::zero),
+    geometricD_(Zero),
+    solutionD_(Zero),
     tetBasePtIsPtr_(NULL),
     cellTreePtr_(NULL),
     pointZones_
@@ -888,8 +888,8 @@ void Foam::polyMesh::addPatches
     }
 
     // Reset valid directions
-    geometricD_ = Vector<label>::zero;
-    solutionD_ = Vector<label>::zero;
+    geometricD_ = Zero;
+    solutionD_ = Zero;
 
     boundary_.setSize(p.size());
 
@@ -1051,8 +1051,8 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
 {
     if (debug)
     {
-        Info<< "tmp<scalarField> polyMesh::movePoints(const pointField&) : "
-            << " Moving points for time " << time().value()
+        InfoInFunction
+            << "Moving points for time " << time().value()
             << " index " << time().timeIndex() << endl;
     }
 
@@ -1094,8 +1094,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
         {
             moveError = true;
 
-            Info<< "tmp<scalarField> polyMesh::movePoints"
-                << "(const pointField&) : "
+            InfoInFunction
                 << "Moving the mesh with given points will "
                 << "invalidate the mesh." << nl
                 << "Mesh motion should not be executed." << endl;
@@ -1128,8 +1127,8 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
     cellZones_.movePoints(points_);
 
     // Reset valid directions (could change with rotation)
-    geometricD_ = Vector<label>::zero;
-    solutionD_ = Vector<label>::zero;
+    geometricD_ = Zero;
+    solutionD_ = Zero;
 
     meshObject::movePoints<polyMesh>(*this);
     meshObject::movePoints<pointMesh>(*this);
@@ -1148,7 +1147,6 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
 }
 
 
-// Reset motion by deleting old points
 void Foam::polyMesh::resetMotion() const
 {
     curMotionTimeIndex_ = 0;
@@ -1156,7 +1154,6 @@ void Foam::polyMesh::resetMotion() const
 }
 
 
-// Return parallel info
 const Foam::globalMeshData& Foam::polyMesh::globalData() const
 {
     if (globalMeshDataPtr_.empty())
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H
index 11d60fec9fef4d1621b9b12c1e7e32889f8f8a01..9ce9703810b04eb4c77bdaee420f1b06edc1ee6d 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,7 +153,7 @@ private:
             mutable autoPtr<labelList> tetBasePtIsPtr_;
 
             //- Search tree to allow spatial cell searching
-            mutable autoPtr<indexedOctree<treeDataCell> > cellTreePtr_;
+            mutable autoPtr<indexedOctree<treeDataCell>> cellTreePtr_;
 
 
         // Zoning information
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C
index 14835981ab812b95ab110ecc950de07b0c4b6b5f..45494b3ce93099ebbee38e203b314fae28c46d05 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,9 +41,7 @@ bool Foam::polyMesh::checkFaceOrthogonality
 {
     if (debug)
     {
-        Info<< "bool polyMesh::checkFaceOrthogonality("
-            << "const bool, labelHashSet*) const: "
-            << "checking mesh non-orthogonality" << endl;
+        InfoInFunction << "Checking mesh non-orthogonality" << endl;
     }
 
     const labelList& own = faceOwner();
@@ -57,7 +55,7 @@ bool Foam::polyMesh::checkFaceOrthogonality
         fAreas,
         cellCtrs
     );
-    const scalarField& ortho = tortho();
+    const scalarField& ortho = tortho.ref();
 
     // Severe nonorthogonality threshold
     const scalar severeNonorthogonalityThreshold =
@@ -182,9 +180,7 @@ bool Foam::polyMesh::checkFaceSkewness
 {
     if (debug)
     {
-        Info<< "bool polyMesh::checkFaceSkewnesss("
-            << "const bool, labelHashSet*) const: "
-            << "checking face skewness" << endl;
+        InfoInFunction << "Checking face skewness" << endl;
     }
 
     const labelList& own = faceOwner();
@@ -201,7 +197,7 @@ bool Foam::polyMesh::checkFaceSkewness
         fAreas,
         cellCtrs
     );
-    const scalarField& skew = tskew();
+    const scalarField& skew = tskew.ref();
 
     scalar maxSkew = max(skew);
     label nWarnSkew = 0;
@@ -273,12 +269,6 @@ bool Foam::polyMesh::checkFaceSkewness
 }
 
 
-// Check 1D/2Dness of edges. Gets passed the non-empty directions and
-// checks all edges in the mesh whether they:
-// - have no component in a non-empty direction or
-// - are only in a singe non-empty direction.
-// Empty direction info is passed in as a vector of labels (synchronised)
-// which are 1 if the direction is non-empty, 0 if it is.
 bool Foam::polyMesh::checkEdgeAlignment
 (
     const pointField& p,
@@ -287,11 +277,16 @@ bool Foam::polyMesh::checkEdgeAlignment
     labelHashSet* setPtr
 ) const
 {
+    // Check 1D/2Dness of edges. Gets passed the non-empty directions and
+    // checks all edges in the mesh whether they:
+    // - have no component in a non-empty direction or
+    // - are only in a singe non-empty direction.
+    // Empty direction info is passed in as a vector of labels (synchronised)
+    // which are 1 if the direction is non-empty, 0 if it is.
+
     if (debug)
     {
-        Info<< "bool polyMesh::checkEdgeAlignment("
-            << "const bool, const Vector<label>&, labelHashSet*) const: "
-            << "checking edge alignment" << endl;
+        InfoInFunction << "Checking edge alignment" << endl;
     }
 
     label nDirs = 0;
@@ -422,9 +417,7 @@ bool Foam::polyMesh::checkCellDeterminant
 
     if (debug)
     {
-        Info<< "bool polyMesh::checkCellDeterminant(const bool"
-            << ", labelHashSet*) const: "
-            << "checking for under-determined cells" << endl;
+        InfoInFunction << "Checking for under-determined cells" << endl;
     }
 
     tmp<scalarField> tcellDeterminant = primitiveMeshTools::cellDeterminant
@@ -434,14 +427,14 @@ bool Foam::polyMesh::checkCellDeterminant
         faceAreas,
         syncTools::getInternalOrCoupledFaces(*this)
     );
-    scalarField& cellDeterminant = tcellDeterminant();
+    scalarField& cellDeterminant = tcellDeterminant.ref();
 
 
     label nErrorCells = 0;
     scalar minDet = min(cellDeterminant);
     scalar sumDet = sum(cellDeterminant);
 
-    forAll (cellDeterminant, cellI)
+    forAll(cellDeterminant, cellI)
     {
         if (cellDeterminant[cellI] < warnDet)
         {
@@ -506,9 +499,7 @@ bool Foam::polyMesh::checkFaceWeight
 {
     if (debug)
     {
-        Info<< "bool polyMesh::checkFaceWeight(const bool"
-            << ", labelHashSet*) const: "
-            << "checking for low face interpolation weights" << endl;
+        InfoInFunction << "Checking for low face interpolation weights" << endl;
     }
 
     tmp<scalarField> tfaceWght = polyMeshTools::faceWeights
@@ -518,7 +509,7 @@ bool Foam::polyMesh::checkFaceWeight
         fAreas,
         cellCtrs
     );
-    scalarField& faceWght = tfaceWght();
+    scalarField& faceWght = tfaceWght.ref();
 
 
     label nErrorFaces = 0;
@@ -529,7 +520,7 @@ bool Foam::polyMesh::checkFaceWeight
     // Statistics only for internal and masters of coupled faces
     PackedBoolList isMasterFace(syncTools::getInternalOrMasterFaces(*this));
 
-    forAll (faceWght, faceI)
+    forAll(faceWght, faceI)
     {
         if (faceWght[faceI] < minWeight)
         {
@@ -601,13 +592,11 @@ bool Foam::polyMesh::checkVolRatio
 {
     if (debug)
     {
-        Info<< "bool polyMesh::checkVolRatio(const bool"
-            << ", labelHashSet*) const: "
-            << "checking for volume ratio < " << minRatio << endl;
+        InfoInFunction << "Checking for volume ratio < " << minRatio << endl;
     }
 
     tmp<scalarField> tvolRatio = polyMeshTools::volRatio(*this, cellVols);
-    scalarField& volRatio = tvolRatio();
+    scalarField& volRatio = tvolRatio.ref();
 
 
     label nErrorFaces = 0;
@@ -618,7 +607,7 @@ bool Foam::polyMesh::checkVolRatio
     // Statistics only for internal and masters of coupled faces
     PackedBoolList isMasterFace(syncTools::getInternalOrMasterFaces(*this));
 
-    forAll (volRatio, faceI)
+    forAll(volRatio, faceI)
     {
         if (volRatio[faceI] < minRatio)
         {
@@ -680,19 +669,6 @@ bool Foam::polyMesh::checkVolRatio
 }
 
 
-//- Could override checkClosedBoundary to not look at (collocated!) coupled
-//  faces
-//bool Foam::polyMesh::checkClosedBoundary(const bool report) const
-//{
-//    return primitiveMesh::checkClosedBoundary
-//    (
-//        faceAreas(),
-//        report,
-//        syncTools::getInternalOrCollocatedCoupledFaces(*this)
-//    );
-//}
-
-
 bool Foam::polyMesh::checkFaceOrthogonality
 (
     const bool report,
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C
index 4945eb0b098d73b50721c055a6c9001fa10e10ed..3cde2db2922a1e8cfc887fcf39da508c78cf8ed2 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceOrthogonality
     const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
     tmp<scalarField> tortho(new scalarField(mesh.nFaces(), 1.0));
-    scalarField& ortho = tortho();
+    scalarField& ortho = tortho.ref();
 
     // Internal faces
     forAll(nei, faceI)
@@ -100,7 +100,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness
     const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
     tmp<scalarField> tskew(new scalarField(mesh.nFaces()));
-    scalarField& skew = tskew();
+    scalarField& skew = tskew.ref();
 
     forAll(nei, faceI)
     {
@@ -184,7 +184,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceWeights
     const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
     tmp<scalarField> tweight(new scalarField(mesh.nFaces(), 1.0));
-    scalarField& weight = tweight();
+    scalarField& weight = tweight.ref();
 
     // Internal faces
     forAll(nei, faceI)
@@ -240,7 +240,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio
     const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
     tmp<scalarField> tratio(new scalarField(mesh.nFaces(), 1.0));
-    scalarField& ratio = tratio();
+    scalarField& ratio = tratio.ref();
 
     // Internal faces
     forAll(nei, faceI)
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C
index 25eb1fd29d8ac12f3a6ab3a3bea5ad0741bb14e2..fa1bdc8bdd10b566bb792533cb5b909436782da1 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,9 +37,7 @@ void Foam::polyMesh::removeBoundary()
 {
     if (debug)
     {
-        Info<< "void polyMesh::removeBoundary(): "
-            << "Removing boundary patches."
-            << endl;
+        InfoInFunction << "Removing boundary patches." << endl;
     }
 
     // Remove the point zones
@@ -56,9 +54,7 @@ void Foam::polyMesh::clearGeom()
 {
     if (debug)
     {
-        Info<< "void polyMesh::clearGeom() : "
-            << "clearing geometric data"
-            << endl;
+        InfoInFunction << "Clearing geometric data" << endl;
     }
 
     // Clear all geometric mesh objects
@@ -70,8 +66,8 @@ void Foam::polyMesh::clearGeom()
     boundary_.clearGeom();
 
     // Reset valid directions (could change with rotation)
-    geometricD_ = Vector<label>::zero;
-    solutionD_ = Vector<label>::zero;
+    geometricD_ = Zero;
+    solutionD_ = Zero;
 
     // Remove the stored tet base points
     tetBasePtIsPtr_.clear();
@@ -84,9 +80,7 @@ void Foam::polyMesh::clearAdditionalGeom()
 {
     if (debug)
     {
-        Info<< "void polyMesh::clearAdditionalGeom() : "
-            << "clearing additional geometric data"
-            << endl;
+        InfoInFunction << "Clearing additional geometric data" << endl;
     }
 
     // Remove the stored tet base points
@@ -100,9 +94,8 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
 {
     if (debug)
     {
-        Info<< "void polyMesh::clearAddressing() : "
-            << "clearing topology  isMeshUpdate:" << isMeshUpdate
-            << endl;
+        InfoInFunction
+            << "Clearing topology  isMeshUpdate:" << isMeshUpdate << endl;
     }
 
     if (isMeshUpdate)
@@ -141,8 +134,8 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
     globalMeshDataPtr_.clear();
 
     // Reset valid directions
-    geometricD_ = Vector<label>::zero;
-    solutionD_ = Vector<label>::zero;
+    geometricD_ = Zero;
+    solutionD_ = Zero;
 
     // Update zones
     pointZones_.clearAddressing();
@@ -181,9 +174,7 @@ void Foam::polyMesh::clearCellTree()
 {
     if (debug)
     {
-        Info<< "void polyMesh::clearCellTree() : "
-            << "clearing cell tree"
-            << endl;
+        InfoInFunction << "Clearing cell tree" << endl;
     }
 
     cellTreePtr_.clear();
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C
index bd778285200aad661364b3566fb3e558be4b2c7e..d0461b67a9766c24a83cd4b53812ae9686bb520a 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ Foam::labelListList Foam::polyMesh::cellShapePointCells
     const cellShapeList& c
 ) const
 {
-    List<DynamicList<label, primitiveMesh::cellsPerPoint_> >
+    List<DynamicList<label, primitiveMesh::cellsPerPoint_>>
         pc(points().size());
 
     // For each cell
@@ -127,7 +127,6 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells
 }
 
 
-//- Set faces_, calculate cells and patchStarts.
 void Foam::polyMesh::setTopology
 (
     const cellShapeList& cellsAsShapes,
@@ -474,8 +473,8 @@ Foam::polyMesh::polyMesh
     ),
     bounds_(points_, syncPar),
     comm_(UPstream::worldComm),
-    geometricD_(Vector<label>::zero),
-    solutionD_(Vector<label>::zero),
+    geometricD_(Zero),
+    solutionD_(Zero),
     tetBasePtIsPtr_(NULL),
     cellTreePtr_(NULL),
     pointZones_
@@ -758,8 +757,8 @@ Foam::polyMesh::polyMesh
     ),
     bounds_(points_, syncPar),
     comm_(UPstream::worldComm),
-    geometricD_(Vector<label>::zero),
-    solutionD_(Vector<label>::zero),
+    geometricD_(Zero),
+    solutionD_(Zero),
     tetBasePtIsPtr_(NULL),
     cellTreePtr_(NULL),
     pointZones_
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C
index 7a39d6c25ee32fe37965c0c3c88c46f509aa25e1..942ea74c0d228868fd81d5e9af8dc0a93269c42e 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -33,8 +33,7 @@ void Foam::polyMesh::setInstance(const fileName& inst)
 {
     if (debug)
     {
-        Info<< "void polyMesh::setInstance(const fileName& inst) : "
-            << "Resetting file instance to " << inst << endl;
+        InfoInFunction << "Resetting file instance to " << inst << endl;
     }
 
     points_.writeOpt() = IOobject::AUTO_WRITE;
@@ -67,8 +66,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
 {
     if (debug)
     {
-        Info<< "polyMesh::readUpdateState polyMesh::readUpdate() : "
-            << "Updating mesh based on saved data." << endl;
+        InfoInFunction << "Updating mesh based on saved data." << endl;
     }
 
     // Find the point and cell instance
@@ -80,8 +78,6 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
     {
         Info<< "Faces instance: old = " << facesInstance()
             << " new = " << facesInst << nl
-            //<< "Boundary instance: old = " << boundary_.instance()
-            //<< " new = " << boundaryInst << nl
             << "Points instance: old = " << pointsInstance()
             << " new = " << pointsInst << endl;
     }
@@ -273,8 +269,8 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
 
         // Derived info
         bounds_ = boundBox(points_);
-        geometricD_ = Vector<label>::zero;
-        solutionD_ = Vector<label>::zero;
+        geometricD_ = Zero;
+        solutionD_ = Zero;
 
         // Zones
         pointZoneMesh newPointZones
@@ -447,52 +443,8 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
         bounds_ = boundBox(points_);
 
         // Rotation can cause direction vector to change
-        geometricD_ = Vector<label>::zero;
-        solutionD_ = Vector<label>::zero;
-
-
-        //if (boundaryInst != boundary_.instance())
-        //{
-        //    // Boundary file but no topology change
-        //    if (debug)
-        //    {
-        //        Info<< "Boundary state change" << endl;
-        //    }
-        //
-        //    // Reset the boundary patches
-        //    polyBoundaryMesh newBoundary
-        //    (
-        //        IOobject
-        //        (
-        //            "boundary",
-        //            facesInst,
-        //            meshSubDir,
-        //            *this,
-        //            IOobject::MUST_READ,
-        //            IOobject::NO_WRITE,
-        //            false
-        //        ),
-        //        *this
-        //    );
-        //
-        //
-        //
-        //
-        //    boundary_.clear();
-        //    boundary_.setSize(newBoundary.size());
-        //
-        //    forAll(newBoundary, patchI)
-        //    {
-        //        boundary_.set(patchI, newBoundary[patchI].clone(boundary_));
-        //    }
-        //    // Calculate topology for the patches (processor-processor comms
-        //    // etc.)
-        //    boundary_.updateMesh();
-        //
-        //    // Calculate the geometry for the patches (transformation tensors
-        //    // etc.)
-        //    boundary_.calcGeometry();
-        //}
+        geometricD_ = Zero;
+        solutionD_ = Zero;
 
         return polyMesh::POINTS_MOVED;
     }
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C
index ef2c09e5b6b63b6393c9c2cbf337b0f888f93d32..730d7b3b475bd2b2324268bcd4a5a6f88279e6e6 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,8 +31,7 @@ void Foam::polyMesh::initMesh()
 {
     if (debug)
     {
-        Info<< "void polyMesh::initMesh() : "
-            << "initialising primitiveMesh" << endl;
+        InfoInFunction << "initialising primitiveMesh" << endl;
     }
 
     // For backward compatibility check if the neighbour array is the same
@@ -109,8 +108,7 @@ void Foam::polyMesh::initMesh(cellList& c)
 {
     if (debug)
     {
-        Info<< "void polyMesh::initMesh(cellList& c) : "
-            << "calculating owner-neighbour arrays" << endl;
+        InfoInFunction << "Calculating owner-neighbour arrays" << endl;
     }
 
     owner_.setSize(faces_.size(), -1);
@@ -175,4 +173,5 @@ void Foam::polyMesh::initMesh(cellList& c)
     neighbour_.note() = meshInfo;
 }
 
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C
index 9bab56964ea379198e1c86bb1a68d9b2f8fd82ae..c98b141dd5d157eb2c3eb1b2c55fb6b4a8af1524 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,8 +40,8 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
 {
     if (debug)
     {
-        Info<< "void polyMesh::updateMesh(const mapPolyMesh&) : "
-            << "updating addressing and (optional) pointMesh/pointFields"
+        InfoInFunction
+            << "Updating addressing and (optional) pointMesh/pointFields"
             << endl;
     }
 
@@ -123,8 +123,8 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
     meshObject::updateMesh<pointMesh>(*this, mpm);
 
     // Reset valid directions (could change by faces put into empty patches)
-    geometricD_ = Vector<label>::zero;
-    solutionD_ = Vector<label>::zero;
+    geometricD_ = Zero;
+    solutionD_ = Zero;
 
     const_cast<Time&>(time()).functionObjects().updateMesh(mpm);
 }
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
index 4aa380399ac800cb0b6973dc12785d46bca41346..ee65f0511ddd95689efe5fc56431e0b2ba42de79 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -605,9 +605,9 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
     coupledPolyPatch(name, size, start, index, bm, patchType, transform),
     neighbPatchName_(word::null),
     neighbPatchID_(-1),
-    rotationAxis_(vector::zero),
-    rotationCentre_(point::zero),
-    separationVector_(vector::zero),
+    rotationAxis_(Zero),
+    rotationCentre_(Zero),
+    separationVector_(Zero),
     coupledPointsPtr_(NULL),
     coupledEdgesPtr_(NULL)
 {
@@ -657,9 +657,9 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
     neighbPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
     coupleGroup_(dict),
     neighbPatchID_(-1),
-    rotationAxis_(vector::zero),
-    rotationCentre_(point::zero),
-    separationVector_(vector::zero),
+    rotationAxis_(Zero),
+    rotationCentre_(Zero),
+    separationVector_(Zero),
     coupledPointsPtr_(NULL),
     coupledEdgesPtr_(NULL)
 {
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
index efc2c8adafdbe6ced709a9c49aed2e634d6b9216..0f75909ee68be3d2a2430c1f31a71700d76dd4dd 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,11 +104,6 @@ Foam::label Foam::oldCyclicPolyPatch::findMaxArea
 }
 
 
-// Get geometric zones of patch by looking at normals.
-// Method 1: any edge with sharpish angle is edge between two halves.
-//           (this will handle e.g. wedge geometries).
-//           Also two fully disconnected regions will be handled this way.
-// Method 2: sort faces into two halves based on face normal.
 bool Foam::oldCyclicPolyPatch::getGeometricHalves
 (
     const primitivePatch& pp,
@@ -116,6 +111,12 @@ bool Foam::oldCyclicPolyPatch::getGeometricHalves
     labelList& half1ToPatch
 ) const
 {
+    // Get geometric zones of patch by looking at normals.
+    // Method 1: any edge with sharpish angle is edge between two halves.
+    //           (this will handle e.g. wedge geometries).
+    //           Also two fully disconnected regions will be handled this way.
+    // Method 2: sort faces into two halves based on face normal.
+
     // Calculate normals
     const vectorField& faceNormals = pp.faceNormals();
 
@@ -282,9 +283,6 @@ bool Foam::oldCyclicPolyPatch::getGeometricHalves
 }
 
 
-// Given a split of faces into left and right half calculate the centres
-// and anchor points. Transform the left points so they align with the
-// right ones.
 void Foam::oldCyclicPolyPatch::getCentresAndAnchors
 (
     const primitivePatch& pp,
@@ -430,7 +428,6 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors
 }
 
 
-// Calculates faceMap and rotation. Returns true if all ok.
 bool Foam::oldCyclicPolyPatch::matchAnchors
 (
     const bool report,
@@ -574,9 +571,9 @@ Foam::oldCyclicPolyPatch::oldCyclicPolyPatch
 :
     coupledPolyPatch(name, size, start, index, bm, patchType, transform),
     featureCos_(0.9),
-    rotationAxis_(vector::zero),
-    rotationCentre_(point::zero),
-    separationVector_(vector::zero)
+    rotationAxis_(Zero),
+    rotationCentre_(Zero),
+    separationVector_(Zero)
 {}
 
 
@@ -591,9 +588,9 @@ Foam::oldCyclicPolyPatch::oldCyclicPolyPatch
 :
     coupledPolyPatch(name, dict, index, bm, patchType),
     featureCos_(0.9),
-    rotationAxis_(vector::zero),
-    rotationCentre_(point::zero),
-    separationVector_(vector::zero)
+    rotationAxis_(Zero),
+    rotationCentre_(Zero),
+    separationVector_(Zero)
 {
     if (dict.found("neighbourPatch"))
     {
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
index 2531438516b51a4a7cb047cfb451bd09c7dfd582..887baf67238ba63028314848972aa16d49d9171e 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -69,6 +69,36 @@ Foam::processorPolyPatch::processorPolyPatch
 {}
 
 
+Foam::processorPolyPatch::processorPolyPatch
+(
+    const label size,
+    const label start,
+    const label index,
+    const polyBoundaryMesh& bm,
+    const int myProcNo,
+    const int neighbProcNo,
+    const transformType transform,
+    const word& patchType
+)
+:
+    coupledPolyPatch
+    (
+        newName(myProcNo, neighbProcNo),
+        size,
+        start,
+        index,
+        bm,
+        patchType,
+        transform
+    ),
+    myProcNo_(myProcNo),
+    neighbProcNo_(neighbProcNo),
+    neighbFaceCentres_(),
+    neighbFaceAreas_(),
+    neighbFaceCellCentres_()
+{}
+
+
 Foam::processorPolyPatch::processorPolyPatch
 (
     const word& name,
@@ -149,6 +179,20 @@ Foam::processorPolyPatch::~processorPolyPatch()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+Foam::word Foam::processorPolyPatch::newName
+(
+    const label myProcNo,
+    const label neighbProcNo
+)
+{
+    return
+        "procBoundary"
+      + Foam::name(myProcNo)
+      + "to"
+      + Foam::name(neighbProcNo);
+}
+
+
 void Foam::processorPolyPatch::initGeometry(PstreamBuffers& pBufs)
 {
     if (Pstream::parRun())
@@ -545,7 +589,7 @@ void Foam::processorPolyPatch::initOrder
             // Get the average of the points of each face. This is needed in
             // case the face centroid calculation is incorrect due to the face
             // having a very high aspect ratio.
-            pointField facePointAverages(pp.size(), point::zero);
+            pointField facePointAverages(pp.size(), Zero);
             forAll(pp, fI)
             {
                 const labelList& facePoints = pp[fI];
@@ -567,10 +611,6 @@ void Foam::processorPolyPatch::initOrder
 }
 
 
-// Returns rotation.
-// + -1 : no match
-// +  0 : match
-// + >0 : match if rotated clockwise by this amount
 Foam::label Foam::processorPolyPatch::matchFace
 (
     const face& a,
@@ -677,10 +717,6 @@ Foam::label Foam::processorPolyPatch::matchFace
 }
 
 
-// Return new ordering. Ordering is -faceMap: for every face index
-// the new face -rotation:for every new face the clockwise shift
-// of the original face. Return false if nothing changes (faceMap
-// is identity, rotation is 0)
 bool Foam::processorPolyPatch::order
 (
     PstreamBuffers& pBufs,
@@ -913,7 +949,7 @@ bool Foam::processorPolyPatch::order
             {
                 const pointField& ppPoints = pp.points();
 
-                pointField facePointAverages(pp.size(), point::zero);
+                pointField facePointAverages(pp.size(), Zero);
                 forAll(pp, fI)
                 {
                     const labelList& facePoints = pp[fI];
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H
index c61ad0eb00295ebf02ae0325ce7dd565add67528..17f567ba5d13c71ee9179112938ec11934158ec5 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -81,6 +81,23 @@ class processorPolyPatch
 
 protected:
 
+    // Protected constructors
+
+        //- Construct from components with specified name
+        processorPolyPatch
+        (
+            const word& name,
+            const label size,
+            const label start,
+            const label index,
+            const polyBoundaryMesh& bm,
+            const int myProcNo,
+            const int neighbProcNo,
+            const transformType transform = UNKNOWN,  // transformation type
+            const word& patchType = typeName
+        );
+
+
     // Protected Member functions
 
         //- Initialise the calculation of the patch geometry
@@ -126,10 +143,9 @@ public:
 
     // Constructors
 
-        //- Construct from components
+        //- Construct from components with automatically generated standard name
         processorPolyPatch
         (
-            const word& name,
             const label size,
             const label start,
             const label index,
@@ -270,7 +286,15 @@ public:
             return !owner();
         }
 
-        //- Return processor-neighbour patch face centres
+        //- Return the name of a processorPolyPatch
+        //  constructed from the processor IDs
+        static word newName
+        (
+            const label myProcNo,
+            const label neighbProcNo
+        );
+
+        //- Return processor-neighbbour patch face centres
         const vectorField& neighbFaceCentres() const
         {
             return neighbFaceCentres_;
@@ -318,6 +342,10 @@ public:
         //  refer to *this (except for name() and type() etc.)
         virtual void initOrder(PstreamBuffers&, const primitivePatch&) const;
 
+        //- Returns rotation.
+        //    -1 : no match
+        //     0 : match
+        //    >0 : match if rotated clockwise by this amount
         static label matchFace
         (
             const face& localFace,
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
index 8bd031532a629168faedec52704cec00e0800894..02dcc6294add023ea3715877236fab29a8fb7527 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,6 @@ namespace Foam
 
 Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
 (
-    const word& name,
     const label size,
     const label start,
     const label index,
@@ -55,7 +54,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
 :
     processorPolyPatch
     (
-        name,
+        newName(referPatchName, myProcNo, neighbProcNo),
         size,
         start,
         index,
@@ -157,6 +156,33 @@ Foam::processorCyclicPolyPatch::~processorCyclicPolyPatch()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+Foam::word Foam::processorCyclicPolyPatch::newName
+(
+    const word& cyclicPolyPatchName,
+    const label myProcNo,
+    const label neighbProcNo
+)
+{
+    return
+        processorPolyPatch::newName(myProcNo, neighbProcNo)
+      + "through"
+      + cyclicPolyPatchName;
+}
+
+
+Foam::labelList Foam::processorCyclicPolyPatch::patchIDs
+(
+    const word& cyclicPolyPatchName,
+    const polyBoundaryMesh& bm
+)
+{
+    return bm.findIndices
+    (
+        string("procBoundary.*to.*through" + cyclicPolyPatchName)
+    );
+}
+
+
 int Foam::processorCyclicPolyPatch::tag() const
 {
     if (tag_ == -1)
@@ -295,10 +321,6 @@ void Foam::processorCyclicPolyPatch::initOrder
 }
 
 
-// Return new ordering. Ordering is -faceMap: for every face index
-// the new face -rotation:for every new face the clockwise shift
-// of the original face. Return false if nothing changes (faceMap
-// is identity, rotation is 0)
 bool Foam::processorCyclicPolyPatch::order
 (
     PstreamBuffers& pBufs,
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H
index 1f98b30bcab3b3d2da3d415a9ccf602538b6227a..ffbb9445e3dee79b220f02df0d80771997d84f1d 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processorCyclic/processorCyclicPolyPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,6 @@ public:
         //- Construct from components
         processorCyclicPolyPatch
         (
-            const word& name,
             const label size,
             const label start,
             const label index,
@@ -261,11 +260,29 @@ public:
 
     // Member functions
 
+        //- Return name of originating cyclicPolyPatch patch
         const word& referPatchName() const
         {
             return referPatchName_;
         }
 
+        //- Return the name of a processorCyclicPolyPatch
+        //  constructed from cyclicPolyPatch name and the processor IDs
+        static word newName
+        (
+            const word& cyclicPolyPatchName,
+            const label myProcNo,
+            const label neighbProcNo
+        );
+
+        //- Return the indices of a processorCyclicPolyPatchs
+        //  constructed from the given cyclicPolyPatch
+        static labelList patchIDs
+        (
+            const word& cyclicPolyPatchName,
+            const polyBoundaryMesh& bm
+        );
+
         //- Referring patchID.
         label referPatchID() const
         {
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C
index e8fd99e786a46e801361df68a40df3f558a78641..5cb0d9c7d89b47e56920b5412686ee9f56048a02 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -143,8 +143,8 @@ Foam::wedgePolyPatch::wedgePolyPatch
     centreNormal_(vector::rootMax),
     n_(vector::rootMax),
     cosAngle_(0.0),
-    faceT_(tensor::zero),
-    cellT_(tensor::zero)
+    faceT_(Zero),
+    cellT_(Zero)
 {}
 
 
@@ -162,8 +162,8 @@ Foam::wedgePolyPatch::wedgePolyPatch
     centreNormal_(vector::rootMax),
     n_(vector::rootMax),
     cosAngle_(0.0),
-    faceT_(tensor::zero),
-    cellT_(tensor::zero)
+    faceT_(Zero),
+    cellT_(Zero)
 {}
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
index 312822613c37b748977809b348add809a1b7d007..cb3355a9e302eb8b32f91e4b138b6cb17986b2d9 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -317,11 +317,10 @@ const Foam::vectorField::subField Foam::polyPatch::faceAreas() const
 }
 
 
-// Return the patch face neighbour cell centres
 Foam::tmp<Foam::vectorField> Foam::polyPatch::faceCellCentres() const
 {
     tmp<vectorField> tcc(new vectorField(size()));
-    vectorField& cc = tcc();
+    vectorField& cc = tcc.ref();
 
     // get reference to global cell centres
     const vectorField& gcc = boundaryMesh_.mesh().cellCentres();
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C
index b161194fc3b18c036b66899f77fb32a613f4d92f..e44810932dbf0f698add039376d967fb9667b7c6 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,10 +40,7 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
 {
     if (debug)
     {
-        Info<< "polyPatch::New(const word&, const word&, const label, "
-               "const label, const label, const polyBoundaryMesh&) : "
-               "constructing polyPatch"
-            << endl;
+        InfoInFunction << "Constructing polyPatch" << endl;
     }
 
     wordConstructorTable::iterator cstrIter =
@@ -84,9 +81,7 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
 {
     if (debug)
     {
-        Info<< "polyPatch::New(const word&, const dictionary&, const label, "
-               "const polyBoundaryMesh&) : constructing polyPatch"
-            << endl;
+        InfoInFunction << "Constructing polyPatch" << endl;
     }
 
     word patchType(dict.lookup("type"));
@@ -107,9 +102,7 @@ Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New
 {
     if (debug)
     {
-        Info<< "polyPatch::New(const word&, const word&, const dictionary&, "
-               "const label, const polyBoundaryMesh&) : constructing polyPatch"
-            << endl;
+        InfoInFunction << "Constructing polyPatch" << endl;
     }
 
     dictionaryConstructorTable::iterator cstrIter =
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/dummyTransform.H b/src/OpenFOAM/meshes/polyMesh/syncTools/dummyTransform.H
index 99fc0a949897eeed80248985c001b7805ea7f49e..18aff56892e3a980fbd3a06a8e9165d55b3043c4 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/dummyTransform.H
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/dummyTransform.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ public:
 
 
 template<class T>
-class pTraits<List<T> >
+class pTraits<List<T>>
 :
     public List<T>
 {
@@ -76,7 +76,7 @@ public:
 };
 
 template<class T>
-class pTraits<UList<T> >
+class pTraits<UList<T>>
 :
     public UList<T>
 {
@@ -90,7 +90,7 @@ public:
 };
 
 template<class T>
-class pTraits<Field<T> >
+class pTraits<Field<T>>
 :
     public Field<T>
 {
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
index 60cafde20ec457b36b0f4a8664189d667cd2d2b8..55dd19b72c104bf8937f207d799903f9e90a62d5 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -617,7 +617,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "syncToolsTemplates.C"
+    #include "syncToolsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
index ff10807dd8bc5738cdb66a81c1fe0048c5a48a01..aaf9e1faff17cb657afe37bdd4deb76499889ab9 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Combine val with existing value at index
 template<class T, class CombineOp>
 void Foam::syncTools::combine
 (
@@ -58,7 +57,6 @@ void Foam::syncTools::combine
 }
 
 
-// Combine val with existing value at (implicit index) e.
 template<class T, class CombineOp>
 void Foam::syncTools::combine
 (
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C
index 7b4f2986d81d05ba41d218e9d66f6af0aa27bc74..3e72e591dcc8a035a3e166a8460e7cf6918dfef1 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -81,7 +81,7 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::read()
     )
     {
         // Warn for MUST_READ_IF_MODIFIED
-        warnNoRereading<ZoneMesh<ZoneType, MeshType> >();
+        warnNoRereading<ZoneMesh<ZoneType, MeshType>>();
 
         PtrList<ZoneType>& zones = *this;
 
@@ -127,7 +127,6 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::read()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Read constructor given IOobject and a MeshType reference
 template<class ZoneType, class MeshType>
 Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
 (
@@ -144,7 +143,6 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
 }
 
 
-// Construct given size. Zones will be set later
 template<class ZoneType, class MeshType>
 Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
 (
@@ -181,7 +179,7 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
         // Nothing read. Use supplied zones
         PtrList<ZoneType>& zones = *this;
         zones.setSize(pzm.size());
-        forAll (zones, zoneI)
+        forAll(zones, zoneI)
         {
             zones.set(zoneI, pzm[zoneI].clone(*this).ptr());
         }
@@ -200,7 +198,6 @@ Foam::ZoneMesh<ZoneType, MeshType>::~ZoneMesh()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Map of zones for quick zone lookup
 template<class ZoneType, class MeshType>
 const Foam::Map<Foam::label>&
 Foam::ZoneMesh<ZoneType, MeshType>::zoneMap() const
@@ -214,8 +211,6 @@ Foam::ZoneMesh<ZoneType, MeshType>::zoneMap() const
 }
 
 
-// Given a global object index, return the zone it is in.
-// If object does not belong to any zones, return -1
 template<class ZoneType, class MeshType>
 Foam::label Foam::ZoneMesh<ZoneType, MeshType>::whichZone
 (
@@ -236,7 +231,6 @@ Foam::label Foam::ZoneMesh<ZoneType, MeshType>::whichZone
 }
 
 
-// Return a list of zone names
 template<class ZoneType, class MeshType>
 Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::types() const
 {
@@ -253,7 +247,6 @@ Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::types() const
 }
 
 
-// Return a list of zone names
 template<class ZoneType, class MeshType>
 Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::names() const
 {
@@ -357,7 +350,7 @@ Foam::label Foam::ZoneMesh<ZoneType, MeshType>::findZoneID
     // Zone not found
     if (debug)
     {
-        Info<< "label ZoneMesh<ZoneType>::findZoneID(const word&) const : "
+        InfoInFunction
             << "Zone named " << zoneName << " not found.  "
             << "List of available zone names: " << names() << endl;
     }
@@ -407,7 +400,6 @@ void Foam::ZoneMesh<ZoneType, MeshType>::clear()
 }
 
 
-// Check zone definition
 template<class ZoneType, class MeshType>
 bool Foam::ZoneMesh<ZoneType, MeshType>::checkDefinition
 (
@@ -504,7 +496,6 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::checkParallelSync
 }
 
 
-// Correct zone mesh after moving points
 template<class ZoneType, class MeshType>
 void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p)
 {
@@ -517,7 +508,6 @@ void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p)
 }
 
 
-// writeData member function required by regIOobject
 template<class ZoneType, class MeshType>
 bool Foam::ZoneMesh<ZoneType, MeshType>::writeData(Ostream& os) const
 {
@@ -525,6 +515,7 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::writeData(Ostream& os) const
     return os.good();
 }
 
+
 // * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * * //
 
 template<class ZoneType, class MeshType>
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H
index d0bb09902648e25ed4aec22466c6e624753335c4..06ee30f5e975e78202aa2bf2977035190d7da8bd 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -204,7 +204,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ZoneMesh.C"
+    #include "ZoneMesh.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H
index 0a6dbd671b1167bdca28cb3a1eb158a130697cbf..c5027f3eaae4cc2ceb62c1f18ac7ab1c69188bfa 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H
+++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,6 +72,8 @@ protected:
         const cellZoneMesh& zoneMesh_;
 
 
+private:
+
     // Private Member Functions
 
         //- Disallow default bitwise copy construct
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C
index 983ff5d8b8aec0d747e3cb41ea518abbe8d7221c..fd6ed39cdd55d3450c50cd58632bcbd4fc7bcf03 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,9 +38,7 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
 {
     if (debug)
     {
-        Info<< "cellZone::New(const word&, const dictionary&, const label, "
-               "const cellZoneMesh&) : constructing cellZone " << name
-            << endl;
+        InfoInFunction << "Constructing cellZone " << name << endl;
     }
 
     const word zoneType(dict.lookup("type"));
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
index 60eb63af662b98f95a0d71e29b791f7b9e212f77..6bf2a1109f6e80cfdfb880df4f5ebf8b06780d7e 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,9 +49,7 @@ void Foam::faceZone::calcFaceZonePatch() const
 {
     if (debug)
     {
-        Info<< "void faceZone::calcFaceZonePatch() const : "
-            << "Calculating primitive patch"
-            << endl;
+        InfoInFunction << "Calculating primitive patch" << endl;
     }
 
     if (patchPtr_)
@@ -89,9 +87,7 @@ void Foam::faceZone::calcFaceZonePatch() const
 
     if (debug)
     {
-        Info<< "void faceZone::calcFaceZonePatch() const : "
-            << "Finished calculating primitive patch"
-            << endl;
+        InfoInFunction << "Finished calculating primitive patch" << endl;
     }
 }
 
@@ -100,9 +96,7 @@ void Foam::faceZone::calcCellLayers() const
 {
     if (debug)
     {
-        Info<< "void Foam::faceZone::calcCellLayers() const : "
-            << "calculating master cells"
-            << endl;
+        InfoInFunction << "Calculating master cells" << endl;
     }
 
     // It is an error to attempt to recalculate edgeCells
@@ -153,8 +147,6 @@ void Foam::faceZone::calcCellLayers() const
                 sc[faceI] = neiCellI;
             }
         }
-        //Info<< "masterCells: " << mc << endl;
-        //Info<< "slaveCells: " << sc << endl;
     }
 }
 
@@ -190,7 +182,6 @@ void Foam::faceZone::checkAddressing() const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::faceZone::faceZone
 (
     const word& name,
@@ -354,28 +345,6 @@ const Foam::labelList& Foam::faceZone::meshEdges() const
 {
     if (!mePtr_)
     {
-        //labelList faceCells(size());
-        //
-        //const labelList& own = zoneMesh().mesh().faceOwner();
-        //
-        //const labelList& faceLabels = *this;
-        //
-        //forAll(faceCells, faceI)
-        //{
-        //    faceCells[faceI] = own[faceLabels[faceI]];
-        //}
-        //
-        //mePtr_ =
-        //    new labelList
-        //    (
-        //        operator()().meshEdges
-        //        (
-        //            zoneMesh().mesh().edges(),
-        //            zoneMesh().mesh().cellEdges(),
-        //            faceCells
-        //        )
-        //    );
-
         mePtr_ =
             new labelList
             (
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H
index 1567b09fb12b62228cfc516bb1a724b2889246c9..690c49e0314e16594393ce1b8047d227d5480b7d 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H
+++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,6 +71,16 @@ class faceZone
         //- The name associated with the zone-labels dictionary entry
         static const word labelsName_;
 
+
+    // Private Member Functions
+
+        //- Disallow default bitwise copy construct
+        faceZone(const faceZone&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const faceZone&);
+
+
 protected:
 
     // Protected data
@@ -98,13 +108,7 @@ protected:
             mutable labelList* mePtr_;
 
 
-    // Private Member Functions
-
-        //- Disallow default bitwise copy construct
-        faceZone(const faceZone&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const faceZone&);
+    // Protected Member Functions
 
         //- Build primitive patch
         void calcFaceZonePatch() const;
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C
index 8c75b01c088e470efa75ebc3fe395453e1f31e57..2b6954b340c110826b2c8d3515e7746843fccc96 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,9 +38,7 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
 {
     if (debug)
     {
-        Info<< "faceZone::New(const word&, const dictionary&, const label, "
-               "const faceZoneMesh&) : constructing faceZone " << name
-            << endl;
+        InfoInFunction << "Constructing faceZone " << name << endl;
     }
 
     const word zoneType(dict.lookup("type"));
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C
index f2ddb5480c5b87c6e7fbe80069dab0bc3fb61612..3c5feac399e7060575d11b35ac4803ff9c465f13 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,9 +38,7 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
 {
     if (debug)
     {
-        Info<< "pointZone::New(const word&, const dictionary&, const label, "
-               "const pointZoneMesh&) : constructing pointZone " << name
-            << endl;
+        InfoInFunction << "Constructing pointZone " << name << endl;
     }
 
     const word zoneType(dict.lookup("type"));
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C
index 8d31b8a3ad4c0dac6d51051224130e7555b3ef29..1d800731389a54b8465b697fd4e85ea82b62e148 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(zone, 0);
+    defineTypeNameAndDebug(zone, 0);
 }
 
 
@@ -53,9 +53,7 @@ void Foam::zone::calcLookupMap() const
 {
     if (debug)
     {
-        Info<< "void zone::calcLookupMap() const: "
-            << "Calculating lookup map"
-            << endl;
+        InfoInFunction << "Calculating lookup map" << endl;
     }
 
     if (lookupMapPtr_)
@@ -77,9 +75,7 @@ void Foam::zone::calcLookupMap() const
 
     if (debug)
     {
-        Info<< "void zone::calcLookupMap() const: "
-            << "Finished calculating lookup map"
-            << endl;
+        InfoInFunction << "Finished calculating lookup map" << endl;
     }
 }
 
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H
index 6eed70e62895ff0a18dfff9f8b5dc77bd8f8d70e..dd242f5c19bedcdda86d1b25b097056ba55510f0 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H
+++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -123,6 +123,7 @@ public:
 
     //- Determine the mapping for a sub-patch.
     //  Only include faces for which bool-list entry is true.
+    //  \param[in]  p patch to be searched on
     //  \param[in]  includeFaces faces to include
     //  \param[out] pointMap mapping new to old localPoints
     //  \param[out] faceMap  mapping new to old faces
@@ -136,7 +137,7 @@ public:
     >
     static void subsetMap
     (
-        const PrimitivePatch<Face, FaceList, PointField, PointType>&,
+        const PrimitivePatch<Face, FaceList, PointField, PointType>& p,
         const BoolListType& includeFaces,
         labelList& pointMap,
         labelList& faceMap
@@ -310,7 +311,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PatchTools.C"
+    #include "PatchTools.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C
index ee47e50a854efbdcdfae9505b649fae5139ddb5c..635dd020969d3a551a91a41e7a2daad875bd540a 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ void Foam::PatchTools::gatherAndMerge
     // Collect points from all processors
     labelList pointSizes;
     {
-        List<Field<PointType> > gatheredPoints(Pstream::nProcs());
+        List<Field<PointType>> gatheredPoints(Pstream::nProcs());
         gatheredPoints[Pstream::myProcNo()] = p.points();
 
         Pstream::gatherList(gatheredPoints);
@@ -61,13 +61,13 @@ void Foam::PatchTools::gatherAndMerge
             pointSizes = ListListOps::subSizes
             (
                 gatheredPoints,
-                accessOp<Field<PointType> >()
+                accessOp<Field<PointType>>()
             );
 
-            mergedPoints = ListListOps::combine<Field<PointType> >
+            mergedPoints = ListListOps::combine<Field<PointType>>
             (
                 gatheredPoints,
-                accessOp<Field<PointType> >()
+                accessOp<Field<PointType>>()
             );
         }
     }
@@ -75,7 +75,7 @@ void Foam::PatchTools::gatherAndMerge
     // Collect faces from all processors and renumber using sizes of
     // gathered points
     {
-        List<List<Face> > gatheredFaces(Pstream::nProcs());
+        List<List<Face>> gatheredFaces(Pstream::nProcs());
         gatheredFaces[Pstream::myProcNo()] = p;
         Pstream::gatherList(gatheredFaces);
 
@@ -83,11 +83,11 @@ void Foam::PatchTools::gatherAndMerge
         {
             mergedFaces = static_cast<const List<Face>&>
             (
-                ListListOps::combineOffset<List<Face> >
+                ListListOps::combineOffset<List<Face>>
                 (
                     gatheredFaces,
                     pointSizes,
-                    accessOp<List<Face> >(),
+                    accessOp<List<Face>>(),
                     offsetOp<Face>()
                 )
             );
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C
index 50f01629153550ee07804fc86ba03e8b9fd68ed6..a72c33084247f983742e442c60e0016755be4591 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,11 +59,11 @@ Foam::PatchTools::pointNormals
     // patch points since the master point does not have to be on the
     // patch!
 
-    pointField coupledPointNormals(map.constructSize(), vector::zero);
+    pointField coupledPointNormals(map.constructSize(), Zero);
 
     {
         // Collect local pointFaces (sized on patch points only)
-        List<List<point> > pointFaceNormals(map.constructSize());
+        List<List<point>> pointFaceNormals(map.constructSize());
         forAll(p.meshPoints(), patchPointI)
         {
             label meshPointI = p.meshPoints()[patchPointI];
@@ -158,8 +158,8 @@ Foam::PatchTools::pointNormals
     // 1. Start off with local normals (note:without calculating pointNormals
     //    to avoid them being stored)
 
-    tmp<pointField> textrudeN(new pointField(p.nPoints(), vector::zero));
-    pointField& extrudeN = textrudeN();
+    tmp<pointField> textrudeN(new pointField(p.nPoints(), Zero));
+    pointField& extrudeN = textrudeN.ref();
     {
         const faceList& localFaces = p.localFaces();
         const vectorField& faceNormals = p.faceNormals();
@@ -212,8 +212,8 @@ Foam::PatchTools::edgeNormals
 {
     // 1. Start off with local normals
 
-    tmp<pointField> tedgeNormals(new pointField(p.nEdges(), vector::zero));
-    pointField& edgeNormals = tedgeNormals();
+    tmp<pointField> tedgeNormals(new pointField(p.nEdges(), Zero));
+    pointField& edgeNormals = tedgeNormals.ref();
     {
         const labelListList& edgeFaces = p.edgeFaces();
         const vectorField& faceNormals = p.faceNormals();
@@ -239,7 +239,7 @@ Foam::PatchTools::edgeNormals
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     //- Construct with all data in consistent orientation
-    pointField cppEdgeData(map.constructSize(), vector::zero);
+    pointField cppEdgeData(map.constructSize(), Zero);
 
     forAll(patchEdges, i)
     {
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C
index 6533c3ca1729d323ee691919630526803b0ecf80..17ea3e17c2901ba820976dc9e8da4f52834ad57b 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,6 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Finds area, starting at faceI, delimited by borderEdge.
-// Marks all visited faces (from face-edge-face walk) with currentZone.
 template
 <
     class BoolListType,
@@ -42,9 +40,7 @@ template
     class PointField,
     class PointType
 >
-
-void
-Foam::PatchTools::markZone
+void Foam::PatchTools::markZone
 (
     const PrimitivePatch<Face, FaceList, PointField, PointType>& p,
     const BoolListType& borderEdge,
@@ -112,8 +108,6 @@ Foam::PatchTools::markZone
 }
 
 
-// Finds areas delimited by borderEdge (or 'real' edges).
-// Fills faceZone accordingly
 template
 <
     class BoolListType,
@@ -154,9 +148,6 @@ Foam::PatchTools::markZones
 }
 
 
-
-// Finds areas delimited by borderEdge (or 'real' edges).
-// Fills faceZone accordingly
 template
 <
     class BoolListType,
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C
index cd2f92e61e2c79c0a488f1683c75c24895b653b1..7f78dde7b2d93f0f0b66e93dfa5f00f14a7afb87 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,8 +73,8 @@ template
 Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
 PrimitivePatch
 (
-    const Xfer<FaceList<Face> >& faces,
-    const Xfer<List<PointType> >& points
+    const Xfer<FaceList<Face>>& faces,
+    const Xfer<List<PointType>>& points
 )
 :
     FaceList<Face>(faces),
@@ -111,11 +111,11 @@ PrimitivePatch
 (
     FaceList<Face>& faces,
     Field<PointType>& points,
-    const bool reUse
+    const bool reuse
 )
 :
-    FaceList<Face>(faces, reUse),
-    points_(points, reUse),
+    FaceList<Face>(faces, reuse),
+    points_(points, reuse),
     edgesPtr_(NULL),
     nInternalEdges_(-1),
     boundaryPointsPtr_(NULL),
@@ -582,7 +582,7 @@ operator=
 {
     clearOut();
 
-    FaceList<Face>::operator=(pp);
+    FaceList<Face>::shallowCopy(pp);
 }
 
 
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H
index 354dfa3f99390c3dbe51ad655fd05ffd6e1a2b91..e01541b6ecfbe6026f25f832e8f4b4907605ec15 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -246,8 +246,8 @@ public:
         //- Construct from components
         PrimitivePatch
         (
-            const Xfer<FaceList<Face> >& faces,
-            const Xfer<List<PointType> >& points
+            const Xfer<FaceList<Face>>& faces,
+            const Xfer<List<PointType>>& points
         );
 
         //- Construct from components, reuse storage
@@ -255,7 +255,7 @@ public:
         (
             FaceList<Face>& faces,
             Field<PointType>& points,
-            const bool reUse
+            const bool reuse
         );
 
         //- Construct as copy
@@ -473,7 +473,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PrimitivePatch.C"
+    #include "PrimitivePatch.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C
index 0508eb31650af5b282ca7080e177f0e4caf8959f..c6cdcc83dd4764972d80d00e36b41c65af3a6a07 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,7 +89,7 @@ calcAddressing() const
 
     // faceFaces created using a dynamic list.  Cannot guess size because
     // of multiple connections
-    List<DynamicList<label> > ff(locFcs.size());
+    List<DynamicList<label>> ff(locFcs.size());
 
     faceEdgesPtr_ = new labelListList(locFcs.size());
     labelListList& faceEdges = *faceEdgesPtr_;
@@ -132,8 +132,8 @@ calcAddressing() const
         const edgeList& curEdges = faceIntoEdges[faceI];
 
         // Record the neighbour face.  Multiple connectivity allowed
-        List<DynamicList<label> > neiFaces(curF.size());
-        List<DynamicList<label> > edgeOfNeiFace(curF.size());
+        List<DynamicList<label>> neiFaces(curF.size());
+        List<DynamicList<label>> edgeOfNeiFace(curF.size());
 
         label nNeighbours = 0;
 
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C
index fe0a80ef28d36024b0308f317331c0d21a62ceee..fc3cdce9028b71bc946282bf831328f5c8dea85b 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchBdryPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,6 @@ License
 #include "PrimitivePatch.H"
 #include "HashSet.H"
 
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template
@@ -42,10 +41,7 @@ calcBdryPoints() const
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcBdryPoints() : "
-            << "calculating boundary points"
-            << endl;
+        InfoInFunction << "Calculating boundary points" << endl;
     }
 
     if (boundaryPointsPtr_)
@@ -74,10 +70,7 @@ calcBdryPoints() const
 
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcBdryPoints() : "
-            << "finished calculating boundary points"
-            << endl;
+        Info<< "    Finished." << endl;
     }
 }
 
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C
index 68be5b7ab5836ace7f644d5731257c47ce5b5f6c..28452cd286afb996442fbb29b7c7d25d46f161cd 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,10 +121,7 @@ surfaceType() const
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-               "surfaceType() : "
-               "calculating patch topology"
-            << endl;
+        InfoInFunction << "Calculating patch topology" << endl;
     }
 
     const labelListList& edgeFcs = edgeFaces();
@@ -151,10 +148,7 @@ surfaceType() const
 
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-               "surfaceType() : "
-               "finished calculating patch topology"
-            << endl;
+        Info<< "    Finished." << endl;
     }
 
     return pType;
@@ -178,10 +172,7 @@ checkTopology
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-               "checkTopology(const bool, labelHashSet&) : "
-               "checking patch topology"
-            << endl;
+        InfoInFunction << "Checking patch topology" << endl;
     }
 
     // Check edgeFaces
@@ -217,10 +208,7 @@ checkTopology
 
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-               "checkTopology(const bool, labelHashSet&) : "
-               "finished checking patch topology"
-            << endl;
+        Info<< "    Finished." << endl;
     }
 
     return illegalTopo;
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C
index d4aa873dadb4a61ee8be6a254e9194fbbfc4b677..96962082592ae5fc58eaef3367d14241a91e1bab 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchClear.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,9 +42,7 @@ clearGeom()
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "clearGeom() : clearing geometric data"
-            << endl;
+        InfoInFunction << "Clearing geometric data" << endl;
     }
 
     deleteDemandDrivenData(localPointsPtr_);
@@ -67,9 +65,7 @@ clearTopology()
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "clearTopology() : clearing patch addressing"
-            << endl;
+        InfoInFunction << "Clearing patch addressing" << endl;
     }
 
     // group created and destroyed together
@@ -109,10 +105,7 @@ clearPatchMeshAddr()
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "clearPatchMeshAddr() : "
-            << "clearing patch-mesh addressing"
-            << endl;
+        InfoInFunction << "Clearing patch-mesh addressing" << endl;
     }
 
     deleteDemandDrivenData(meshPointsPtr_);
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchEdgeLoops.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchEdgeLoops.C
index 3a7501083a4c46d4db5b2553268f80be48c08af6..48094cce32ca0ed649f42d0d94964690cf0af5dd 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchEdgeLoops.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchEdgeLoops.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,10 +45,7 @@ calcEdgeLoops() const
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcEdgeLoops() : "
-            << "calculating boundary edge loops"
-            << endl;
+        InfoInFunction << "Calculating boundary edge loops" << endl;
     }
 
     if (edgeLoopsPtr_)
@@ -153,10 +150,7 @@ calcEdgeLoops() const
 
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcEdgeLoops() : "
-            << "finished calculating boundary edge loops"
-            << endl;
+        Info<< "    Finished." << endl;
     }
 }
 
diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C
index 22374efe12fdde77090e8a86bedf272e9dc735d0..1e9ad11835bdab46653d989b3a4be3803d8991ca 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,9 +46,7 @@ calcPointEdges() const
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcPointEdges() : calculating pointEdges"
-            << endl;
+        InfoInFunction << "Calculating pointEdges" << endl;
     }
 
     if (pointEdgesPtr_)
@@ -68,9 +66,7 @@ calcPointEdges() const
 
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcPointEdges() finished calculating pointEdges"
-            << endl;
+        Info<< "    Finished." << endl;
     }
 }
 
@@ -88,9 +84,7 @@ calcPointFaces() const
 {
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcPointFaces() : calculating pointFaces"
-            << endl;
+        InfoInFunction << "Calculating pointFaces" << endl;
     }
 
     if (pointFacesPtr_)
@@ -105,7 +99,7 @@ calcPointFaces() const
     const List<Face>& f = localFaces();
 
     // set up storage for pointFaces
-    List<SLList<label> > pointFcs(meshPoints().size());
+    List<SLList<label>> pointFcs(meshPoints().size());
 
     forAll(f, faceI)
     {
@@ -135,9 +129,7 @@ calcPointFaces() const
 
     if (debug)
     {
-        Info<< "PrimitivePatch<Face, FaceList, PointField, PointType>::"
-            << "calcPointFaces() finished calculating pointFaces"
-            << endl;
+        Info<< "    Finished." << endl;
     }
 }
 
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C
index 0e5beeeb0349c208f369a4a81256f2262f4ae061..fe85106c2b31a4b759e1563b909376131027a2d5 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,8 +73,6 @@ Foam::primitiveMesh::primitiveMesh()
 {}
 
 
-// Construct from components
-// WARNING: ASSUMES CORRECT ORDERING OF DATA.
 Foam::primitiveMesh::primitiveMesh
 (
     const label nPoints,
@@ -320,7 +318,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMesh::movePoints
     const faceList& f = faces();
 
     tmp<scalarField> tsweptVols(new scalarField(f.size()));
-    scalarField& sweptVols = tsweptVols();
+    scalarField& sweptVols = tsweptVols.ref();
 
     forAll(f, faceI)
     {
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
index f886d801622acd17edc5b7fb87357b1f617ae512..143b38419dcb18b6643962f9d17b9b09a849564d 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -212,7 +212,7 @@ class primitiveMesh
             //- Helper: return (after optional creation) edge between two points
             static label getEdge
             (
-                List<DynamicList<label> >&,
+                List<DynamicList<label>>&,
                 DynamicList<edge>&,
                 const label,
                 const label
@@ -360,6 +360,10 @@ protected:
             ) const;
 
             //- Check face angles
+            //  Allows a slight non-convexity.  E.g. maxDeg = 10 allows for
+            //  angles < 190 (or 10 degrees concavity) (if truly concave and
+            //  points not visible from face centre the face-pyramid check in
+            //  checkMesh will fail)
             bool checkFaceAngles
             (
                 const pointField& points,
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C
index 458336db2083c5aaa0f676063666be875ac6c95f..fec99b0e52f0a0aaa0949d86c66578cef9312b1c 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ void Foam::primitiveMesh::makeCellCentresAndVols
 ) const
 {
     // Clear the fields for accumulation
-    cellCtrs = vector::zero;
+    cellCtrs = Zero;
     cellVols = 0.0;
 
     const labelList& own = faceOwner();
@@ -87,7 +87,7 @@ void Foam::primitiveMesh::makeCellCentresAndVols
     // first estimate the approximate cell centre as the average of
     // face centres
 
-    vectorField cEst(nCells(), vector::zero);
+    vectorField cEst(nCells(), Zero);
     labelField nCellFaces(nCells(), 0);
 
     forAll(own, facei)
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C
index a4e449af3711c312db78458375add7edd4e95908..de155dd7f42e68a19d256067e820c4ae4d0bcb3b 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ void Foam::primitiveMesh::calcCellEdges() const
     else
     {
         // Set up temporary storage
-        List<DynamicList<label, edgesPerCell_> > ce(nCells());
+        List<DynamicList<label, edgesPerCell_>> ce(nCells());
 
 
         // Get reference to faceCells and faceEdges
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C
index 01daafe35547abe4b340028737bd2e1b70870a00..87a473b6106e132f90390d14bf1aa12610d0999d 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,15 +51,14 @@ bool Foam::primitiveMesh::checkClosedBoundary
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkClosedBoundary("
-            << "const bool) const: "
-            << "checking whether the boundary is closed" << endl;
+        InfoInFunction
+            << "Checking whether the boundary is closed" << endl;
     }
 
     // Loop through all boundary faces and sum up the face area vectors.
     // For a closed boundary, this should be zero in all vector components
 
-    vector sumClosed(vector::zero);
+    vector sumClosed(Zero);
     scalar sumMagClosedBoundary = 0;
 
     for (label faceI = nInternalFaces(); faceI < areas.size(); faceI++)
@@ -112,10 +111,8 @@ bool Foam::primitiveMesh::checkClosedCells
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkClosedCells("
-            << "const bool, labelHashSet*, labelHashSet*"
-            << ", const Vector<label>&) const: "
-            << "checking whether cells are closed" << endl;
+        InfoInFunction
+            << "Checking whether cells are closed" << endl;
     }
 
     // Check that all cells labels are valid
@@ -244,9 +241,7 @@ bool Foam::primitiveMesh::checkFaceAreas
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceAreas("
-            << "const bool, labelHashSet*) const: "
-            << "checking face area magnitudes" << endl;
+        InfoInFunction << "Checking face area magnitudes" << endl;
     }
 
     const scalarField magFaceAreas(mag(faceAreas));
@@ -324,9 +319,7 @@ bool Foam::primitiveMesh::checkCellVolumes
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkCellVolumes("
-            << "const bool, labelHashSet*) const: "
-            << "checking cell volumes" << endl;
+        InfoInFunction << "Checking cell volumes" << endl;
     }
 
     scalar minVolume = GREAT;
@@ -396,9 +389,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceOrthogonality("
-            << "const bool, labelHashSet*) const: "
-            << "checking mesh non-orthogonality" << endl;
+        InfoInFunction << "Checking mesh non-orthogonality" << endl;
     }
 
 
@@ -510,9 +501,7 @@ bool Foam::primitiveMesh::checkFacePyramids
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFacePyramids("
-            << "const bool, const scalar, labelHashSet*) const: "
-            << "checking face orientation" << endl;
+        InfoInFunction << "Checking face orientation" << endl;
     }
 
     const labelList& own = faceOwner();
@@ -614,9 +603,7 @@ bool Foam::primitiveMesh::checkFaceSkewness
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceSkewnesss("
-            << "const bool, labelHashSet*) const: "
-            << "checking face skewness" << endl;
+        InfoInFunction << "Checking face skewness" << endl;
     }
 
     // Warn if the skew correction vector is more than skewWarning times
@@ -677,10 +664,6 @@ bool Foam::primitiveMesh::checkFaceSkewness
 }
 
 
-// Check convexity of angles in a face. Allow a slight non-convexity.
-// E.g. maxDeg = 10 allows for angles < 190 (or 10 degrees concavity)
-// (if truly concave and points not visible from face centre the face-pyramid
-//  check in checkMesh will fail)
 bool Foam::primitiveMesh::checkFaceAngles
 (
     const pointField& points,
@@ -692,9 +675,7 @@ bool Foam::primitiveMesh::checkFaceAngles
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceAngles"
-            << "(const bool, const scalar, labelHashSet*) const: "
-            << "checking face angles" << endl;
+        InfoInFunction << "Checking face angles" << endl;
     }
 
     if (maxDeg < -SMALL || maxDeg > 180+SMALL)
@@ -775,9 +756,7 @@ bool Foam::primitiveMesh::checkFaceFlatness
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceFlatness"
-            << "(const bool, const scalar, labelHashSet*) const: "
-            << "checking face flatness" << endl;
+        InfoInFunction << "Checking face flatness" << endl;
     }
 
     if (warnFlatness < 0 || warnFlatness > 1)
@@ -880,9 +859,7 @@ bool Foam::primitiveMesh::checkConcaveCells
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkConcaveCells(const bool"
-            << ", labelHashSet*) const: "
-            << "checking for concave cells" << endl;
+        InfoInFunction << "Checking for concave cells" << endl;
     }
 
     const cellList& c = cells();
@@ -985,8 +962,6 @@ bool Foam::primitiveMesh::checkConcaveCells
 }
 
 
-// Topological tests
-
 bool Foam::primitiveMesh::checkUpperTriangular
 (
     const bool report,
@@ -995,9 +970,7 @@ bool Foam::primitiveMesh::checkUpperTriangular
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkUpperTriangular("
-            << "const bool, labelHashSet*) const: "
-            << "checking face ordering" << endl;
+        InfoInFunction << "Checking face ordering" << endl;
     }
 
     // Check whether internal faces are ordered in the upper triangular order
@@ -1160,9 +1133,7 @@ bool Foam::primitiveMesh::checkCellsZipUp
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkCellsZipUp("
-            << "const bool, labelHashSet*) const: "
-            << "checking topological cell openness" << endl;
+        InfoInFunction << "Checking topological cell openness" << endl;
     }
 
     label nOpenCells = 0;
@@ -1252,7 +1223,6 @@ bool Foam::primitiveMesh::checkCellsZipUp
 }
 
 
-// Vertices of face within point range and unique.
 bool Foam::primitiveMesh::checkFaceVertices
 (
     const bool report,
@@ -1261,9 +1231,7 @@ bool Foam::primitiveMesh::checkFaceVertices
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceVertices("
-            << "const bool, labelHashSet*) const: "
-            << "checking face vertices" << endl;
+        InfoInFunction << "Checking face vertices" << endl;
     }
 
     // Check that all vertex labels are valid
@@ -1336,9 +1304,7 @@ bool Foam::primitiveMesh::checkPoints
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkPoints"
-            << "(const bool, labelHashSet*) const: "
-            << "checking points" << endl;
+        InfoInFunction << "Checking points" << endl;
     }
 
     label nFaceErrors = 0;
@@ -1402,7 +1368,6 @@ bool Foam::primitiveMesh::checkPoints
 }
 
 
-// Check if all points on face are shared between faces.
 bool Foam::primitiveMesh::checkDuplicateFaces
 (
     const label faceI,
@@ -1444,7 +1409,6 @@ bool Foam::primitiveMesh::checkDuplicateFaces
 }
 
 
-// Check that shared points are in consecutive order.
 bool Foam::primitiveMesh::checkCommonOrder
 (
     const label faceI,
@@ -1606,8 +1570,6 @@ bool Foam::primitiveMesh::checkCommonOrder
 }
 
 
-// Checks common vertices between faces. If more than 2 they should be
-// consecutive on both faces.
 bool Foam::primitiveMesh::checkFaceFaces
 (
     const bool report,
@@ -1616,8 +1578,7 @@ bool Foam::primitiveMesh::checkFaceFaces
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkFaceFaces(const bool, labelHashSet*)"
-            << " const: " << "checking face-face connectivity" << endl;
+        InfoInFunction << "Checking face-face connectivity" << endl;
     }
 
     const labelListList& pf = pointFaces();
@@ -1954,8 +1915,7 @@ bool Foam::primitiveMesh::checkMesh(const bool report) const
 {
     if (debug)
     {
-        Info<< "bool primitiveMesh::checkMesh(const bool report) const: "
-            << "checking primitiveMesh" << endl;
+        InfoInFunction << "Checking primitiveMesh" << endl;
     }
 
     label noFailedChecks = checkTopology(report) + checkGeometry(report);
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C
index c833f5ca91ad2384669e1df8c3d245e5435c1ab7..1be204c19126e7bad88c99551d6d0c19ce5f61fc 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,7 +130,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceOrthogonality
     const labelList& nei = mesh.faceNeighbour();
 
     tmp<scalarField> tortho(new scalarField(mesh.nInternalFaces()));
-    scalarField& ortho = tortho();
+    scalarField& ortho = tortho.ref();
 
     // Internal faces
     forAll(nei, faceI)
@@ -160,7 +160,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceSkewness
     const labelList& nei = mesh.faceNeighbour();
 
     tmp<scalarField> tskew(new scalarField(mesh.nFaces()));
-    scalarField& skew = tskew();
+    scalarField& skew = tskew.ref();
 
     forAll(nei, faceI)
     {
@@ -254,8 +254,8 @@ void Foam::primitiveMeshTools::cellClosedness
     // Loop through cell faces and sum up the face area vectors for each cell.
     // This should be zero in all vector components
 
-    vectorField sumClosed(mesh.nCells(), vector::zero);
-    vectorField sumMagClosed(mesh.nCells(), vector::zero);
+    vectorField sumClosed(mesh.nCells(), Zero);
+    vectorField sumMagClosed(mesh.nCells(), Zero);
 
     forAll(own, faceI)
     {
@@ -345,7 +345,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity
     faceNormals /= mag(faceNormals) + ROOTVSMALL;
 
     tmp<scalarField> tfaceAngles(new scalarField(mesh.nFaces()));
-    scalarField& faceAngles = tfaceAngles();
+    scalarField& faceAngles = tfaceAngles.ref();
 
 
     forAll(fcs, faceI)
@@ -416,7 +416,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceFlatness
     scalarField magAreas(mag(faceAreas));
 
     tmp<scalarField> tfaceFlatness(new scalarField(mesh.nFaces(), 1.0));
-    scalarField& faceFlatness = tfaceFlatness();
+    scalarField& faceFlatness = tfaceFlatness.ref();
 
 
     forAll(fcs, faceI)
@@ -474,7 +474,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::cellDeterminant
     }
 
     tmp<scalarField> tcellDeterminant(new scalarField(mesh.nCells()));
-    scalarField& cellDeterminant = tcellDeterminant();
+    scalarField& cellDeterminant = tcellDeterminant.ref();
 
     const cellList& c = mesh.cells();
 
@@ -484,7 +484,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::cellDeterminant
     }
     else
     {
-        forAll (c, cellI)
+        forAll(c, cellI)
         {
             const labelList& curFaces = c[cellI];
 
@@ -511,7 +511,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::cellDeterminant
             {
                 avgArea /= nInternalFaces;
 
-                symmTensor areaTensor(symmTensor::zero);
+                symmTensor areaTensor(Zero);
 
                 forAll(curFaces, i)
                 {
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C
index b79879f01ffc8a28a17329aa5aecdad14cae458a..4c0a70831736146996921e0b54c9fd496e182826 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,10 +31,9 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Returns edgeI between two points.
 Foam::label Foam::primitiveMesh::getEdge
 (
-    List<DynamicList<label> >& pe,
+    List<DynamicList<label>>& pe,
     DynamicList<edge>& es,
 
     const label pointI,
@@ -104,7 +103,7 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const
         // ~~~~~~~~~~~~~
 
         // Estimate pointEdges storage
-        List<DynamicList<label> > pe(nPoints());
+        List<DynamicList<label>> pe(nPoints());
         forAll(pe, pointI)
         {
             pe[pointI].setCapacity(primitiveMesh::edgesPerPoint_);
@@ -670,6 +669,4 @@ const Foam::labelList& Foam::primitiveMesh::cellEdges(const label cellI) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshFaceCentresAndAreas.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshFaceCentresAndAreas.C
index 236b1e30ee0366baba70620a9a82ef580905ab72..f6c29aae8cb238e78cd27eb83038574beaaae4db 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshFaceCentresAndAreas.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshFaceCentresAndAreas.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ void Foam::primitiveMesh::makeFaceCentresAndAreas
         }
         else
         {
-            vector sumN = vector::zero;
+            vector sumN = Zero;
             scalar sumA = 0.0;
-            vector sumAc = vector::zero;
+            vector sumAc = Zero;
 
             point fCentre = p[f[0]];
             for (label pi = 1; pi < nPoints; pi++)
@@ -123,7 +123,7 @@ void Foam::primitiveMesh::makeFaceCentresAndAreas
             if (sumA < ROOTVSMALL)
             {
                 fCtrs[facei] = fCentre;
-                fAreas[facei] = vector::zero;
+                fAreas[facei] = Zero;
             }
             else
             {
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C
index fba0466599e3b86a5f006af2a775b3cab27db62c..563a77a75eb193d2c5708c717a2f6be66dd04a72 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,14 +29,12 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(patchZones, 0);
+    defineTypeNameAndDebug(patchZones, 0);
 }
 
 
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
-// Gets labels of changed faces and propagates them to the edges. Returns
-// labels of edges changed.
 Foam::labelList Foam::patchZones::faceToEdge
 (
     const labelList& changedFaces,
@@ -71,7 +69,6 @@ Foam::labelList Foam::patchZones::faceToEdge
 }
 
 
-// Reverse of faceToEdge: gets edges and returns faces
 Foam::labelList Foam::patchZones::edgeToFace(const labelList& changedEdges)
 {
     labelList changedFaces(pp_.size(), -1);
@@ -102,7 +99,6 @@ Foam::labelList Foam::patchZones::edgeToFace(const labelList& changedEdges)
 }
 
 
-// Finds area, starting at faceI, delimited by borderEdge
 void Foam::patchZones::markZone(label faceI)
 {
     // List of faces whose faceZone has been set.
@@ -148,7 +144,6 @@ void Foam::patchZones::markZone(label faceI)
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::patchZones::patchZones
 (
     const primitivePatch& pp,
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C
index 5b721d73261b5772725171180bea9e21827af998..b35f016c2d4a0bd989309bf01e2ff4fd7f6be575 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,13 +30,12 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(walkPatch, 0);
+    defineTypeNameAndDebug(walkPatch, 0);
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Get other face using v0, v1 (in localFaces numbering). Or -1.
 Foam::label Foam::walkPatch::getNeighbour
 (
     const label faceI,
@@ -124,8 +123,6 @@ Foam::label Foam::walkPatch::getNeighbour
 }
 
 
-// Gets labels of changed faces and enterVertices on faces.
-// Returns labels of faces changed and enterVertices on them.
 void Foam::walkPatch::faceToFace
 (
     const labelList& changedFaces,
@@ -186,7 +183,6 @@ void Foam::walkPatch::faceToFace
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::walkPatch::walkPatch
 (
     const primitivePatch& pp,
diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H
index e6196b9d3791567009107afffcba17ba6be08f9b..1c55ad2d05c5c620730aa1a292c0931c38fc00ae 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ public:
         PointHit()
         :
             hit_(false),
-            hitPoint_(vector::zero),
+            hitPoint_(Zero),
             distance_(GREAT),
             eligibleMiss_(false)
         {}
diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H
index fa15dbfd429eccdf780ca3f207fb27e8d525940e..13118adb01524280993bff4af8697135c4522a2b 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,7 +89,7 @@ public:
         PointIndexHit()
         :
             hit_(false),
-            hitPoint_(vector::zero),
+            hitPoint_(Zero),
             index_(-1)
         {}
 
diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointHitSort.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointHitSort.H
index 97eea8bc7c8f27520102d6a4743a7ad1014cb31e..ab981bd02223a045e5715085bbdc513939881cd9 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointHitSort.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/pointHitSort.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,7 +65,7 @@ public:
         //- Construct null
         pointHitSort()
         :
-            inter_(false, vector::zero, GREAT, false),
+            inter_(false, Zero, GREAT, false),
             index_(-1)
         {}
 
diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
index 7f222fb8a80a675aed03965c189bdc54464f033d..482142bb2aeab91582225aa0d739583ae1f9e2b7 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
+++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculate base point and unit normal vector from plane equation
 void Foam::plane::calcPntAndVec(const scalarList& C)
 {
     if (mag(C[0]) > VSMALL)
@@ -110,11 +109,10 @@ void Foam::plane::calcPntAndVec
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from normal vector through the origin
 Foam::plane::plane(const vector& normalVector)
 :
     unitVector_(normalVector),
-    basePoint_(vector::zero)
+    basePoint_(Zero)
 {
     scalar magUnitVector(mag(unitVector_));
 
@@ -131,7 +129,6 @@ Foam::plane::plane(const vector& normalVector)
 }
 
 
-// Construct from point and normal vector
 Foam::plane::plane(const point& basePoint, const vector& normalVector)
 :
     unitVector_(normalVector),
@@ -152,14 +149,12 @@ Foam::plane::plane(const point& basePoint, const vector& normalVector)
 }
 
 
-// Construct from plane equation
 Foam::plane::plane(const scalarList& C)
 {
     calcPntAndVec(C);
 }
 
 
-// Construct from three points
 Foam::plane::plane
 (
     const point& a,
@@ -171,11 +166,10 @@ Foam::plane::plane
 }
 
 
-// Construct from dictionary
 Foam::plane::plane(const dictionary& dict)
 :
-    unitVector_(vector::zero),
-    basePoint_(point::zero)
+    unitVector_(Zero),
+    basePoint_(Zero)
 {
     const word planeType(dict.lookup("planeType"));
 
@@ -221,7 +215,6 @@ Foam::plane::plane(const dictionary& dict)
 }
 
 
-// Construct from Istream. Assumes point and normal vector.
 Foam::plane::plane(Istream& is)
 :
     unitVector_(is),
@@ -244,21 +237,18 @@ Foam::plane::plane(Istream& is)
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Return plane normal vector
 const Foam::vector& Foam::plane::normal() const
 {
     return unitVector_;
 }
 
 
-// Return plane base point
 const Foam::point& Foam::plane::refPoint() const
 {
     return basePoint_;
 }
 
 
-// Return coefficients for plane equation: ax + by + cz + d = 0
 Foam::FixedList<Foam::scalar, 4> Foam::plane::planeCoeffs() const
 {
     FixedList<scalar, 4> C(4);
@@ -306,21 +296,18 @@ Foam::FixedList<Foam::scalar, 4> Foam::plane::planeCoeffs() const
 }
 
 
-// Return nearest point in the plane for the given point
 Foam::point Foam::plane::nearestPoint(const point& p) const
 {
     return p - unitVector_*((p - basePoint_) & unitVector_);
 }
 
 
-// Return distance from the given point to the plane
 Foam::scalar Foam::plane::distance(const point& p) const
 {
     return mag((p - basePoint_) & unitVector_);
 }
 
 
-// Cutting point for plane and line defined by origin and direction
 Foam::scalar Foam::plane::normalIntersect
 (
     const point& pnt0,
@@ -333,7 +320,6 @@ Foam::scalar Foam::plane::normalIntersect
 }
 
 
-// Cutting line of two planes
 Foam::plane::ray Foam::plane::planeIntersect(const plane& plane2) const
 {
     // Mathworld plane-plane intersection. Assume there is a point on the
@@ -401,7 +387,6 @@ Foam::plane::ray Foam::plane::planeIntersect(const plane& plane2) const
 }
 
 
-// Cutting point of three planes
 Foam::point Foam::plane::planePlaneIntersect
 (
     const plane& plane2,
diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.C b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.C
index 9180eb098602523eae4a3aaf3e04a1f626c1a115..163476a6b32e5166bca73e7e1402e17d9240d99a 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.C
+++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,18 +119,19 @@ void Foam::tetrahedron<Point, PointRef>::tetOverlap
 }
 
 
-// (Probably very inefficient) minimum containment sphere calculation.
-// From http://www.imr.sandia.gov/papers/imr11/shewchuk2.pdf:
-// Sphere ctr is smallest one of
-// - tet circumcentre
-// - triangle circumcentre
-// - edge mids
 template<class Point, class PointRef>
 Foam::pointHit Foam::tetrahedron<Point, PointRef>::containmentSphere
 (
     const scalar tol
 ) const
 {
+    // (Probably very inefficient) minimum containment sphere calculation.
+    // From http://www.imr.sandia.gov/papers/imr11/shewchuk2.pdf:
+    // Sphere ctr is smallest one of
+    // - tet circumcentre
+    // - triangle circumcentre
+    // - edge mids
+
     const scalar fac = 1 + tol;
 
     // Halve order of tolerance for comparisons of sqr.
diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H
index 6ecdfddbabfc8d07d8fbf2dc445efbf951a65ee8..954cffdabeef04584d66544f22836d5f541264dd 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -327,7 +327,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "tetrahedron.C"
+    #include "tetrahedron.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H
index a5e6864c7c5a8fa26c607d984b844777554004d6..4863ec2202091ac5a860c5b06d963657592a182f 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -319,7 +319,7 @@ Foam::scalar Foam::tetrahedron<Point, PointRef>::barycentric
     List<scalar>& bary
 ) const
 {
-    // From:
+    // Reference:
     // http://en.wikipedia.org/wiki/Barycentric_coordinate_system_(mathematics)
 
     vector e0(a_ - d_);
@@ -470,7 +470,7 @@ bool Foam::tetrahedron<Point, PointRef>::inside(const point& pt) const
     // planeBase[2] = tetBasePt = b_
     // planeBase[3] = tetBasePt = b_
 
-    vector n = vector::zero;
+    vector n = Zero;
 
     {
         // 0, a
diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H
index de477d20e05277b6c1f85660643e43d6ecac312a..299ea326619b3ca49af3bcb44ae1ce257b95374f 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangle.H
@@ -230,7 +230,7 @@ public:
             //  point and density specification
             inline tensor inertia
             (
-                PointRef refPt = vector::zero,
+                PointRef refPt = Zero,
                 scalar density = 1.0
             ) const;
 
diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H
index e3f8993e2eac9c4c13515c45defb3c810f6e2eaa..6314bfc1081c01cc739876fe78a95049557aefd0 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H
+++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -283,7 +283,7 @@ Foam::scalar Foam::triangle<Point, PointRef>::barycentric
     List<scalar>& bary
 ) const
 {
-    // From:
+    // Reference:
     // Real-time collision detection, Christer Ericson, 2005, p47-48
 
     vector v0 = b_ - a_;
@@ -452,7 +452,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::intersection
     const scalar det = edge1 & pVec;
 
     // Initialise to miss
-    pointHit intersection(false, vector::zero, GREAT, false);
+    pointHit intersection(false, Zero, GREAT, false);
 
     if (alg == intersection::VISIBLE)
     {
diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C
index 9dfb3e9094d0d394a104cd997dfd4be1b955fab7..cd804fcf94a132b206a206575b65e13cdffe02c0 100644
--- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C
+++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,8 @@ const Foam::treeBoundBox Foam::treeBoundBox::invertedBox
 );
 
 
-//! \cond - skip documentation : local scope only
+//! \cond ignoreDocumentation
+//- Skip documentation : local scope only
 const Foam::label facesArray[6][4] =
 {
     {0, 4, 6, 2}, // left
@@ -63,7 +64,8 @@ const Foam::faceList Foam::treeBoundBox::faces
 );
 
 
-//! \cond - skip documentation : local scope only
+//! \cond  ignoreDocumentation
+//- Skip documentation : local scope only
 const Foam::label edgesArray[12][2] =
 {
     {0, 1}, // 0
@@ -163,8 +165,7 @@ Foam::treeBoundBox::treeBoundBox
 Foam::tmp<Foam::pointField> Foam::treeBoundBox::points() const
 {
     tmp<pointField> tPts = tmp<pointField>(new pointField(8));
-
-    pointField& points = tPts();
+    pointField& points = tPts.ref();
 
     forAll(points, octant)
     {
@@ -181,7 +182,6 @@ Foam::treeBoundBox Foam::treeBoundBox::subBbox(const direction octant) const
 }
 
 
-// Octant to bounding box using permutation only.
 Foam::treeBoundBox Foam::treeBoundBox::subBbox
 (
     const point& mid,
@@ -231,24 +231,6 @@ Foam::treeBoundBox Foam::treeBoundBox::subBbox
 }
 
 
-// line intersection. Returns true if line (start to end) inside
-// bb or intersects bb. Sets pt to intersection.
-//
-// Sutherlands algorithm:
-//   loop
-//     - start = intersection of line with one of the planes bounding
-//       the bounding box
-//     - stop if start inside bb (return true)
-//     - stop if start and end in same 'half' (e.g. both above bb)
-//       (return false)
-//
-// Uses posBits to efficiently determine 'half' in which start and end
-// point are.
-//
-// Note:
-//   - sets coordinate to exact position: e.g. pt.x() = min().x()
-//     since plane intersect routine might have truncation error.
-//     This makes sure that posBits tests 'inside'
 bool Foam::treeBoundBox::intersects
 (
     const point& overallStart,
@@ -259,6 +241,22 @@ bool Foam::treeBoundBox::intersects
     direction& ptOnFaces
 ) const
 {
+    // Sutherlands algorithm:
+    //   loop
+    //     - start = intersection of line with one of the planes bounding
+    //       the bounding box
+    //     - stop if start inside bb (return true)
+    //     - stop if start and end in same 'half' (e.g. both above bb)
+    //       (return false)
+    //
+    // Uses posBits to efficiently determine 'half' in which start and end
+    // point are.
+    //
+    // Note:
+    //   - sets coordinate to exact position: e.g. pt.x() = min().x()
+    //     since plane intersect routine might have truncation error.
+    //     This makes sure that posBits tests 'inside'
+
     const direction endBits = posBits(end);
     pt = start;
 
@@ -394,9 +392,8 @@ bool Foam::treeBoundBox::intersects
 
 bool Foam::treeBoundBox::contains(const vector& dir, const point& pt) const
 {
-    //
     // Compare all components against min and max of bb
-    //
+
     for (direction cmpt=0; cmpt<3; cmpt++)
     {
         if (pt[cmpt] < min()[cmpt])
@@ -431,7 +428,6 @@ bool Foam::treeBoundBox::contains(const vector& dir, const point& pt) const
 }
 
 
-// Code position of pt on bounding box faces
 Foam::direction Foam::treeBoundBox::faceBits(const point& pt) const
 {
     direction faceBits = 0;
@@ -465,7 +461,6 @@ Foam::direction Foam::treeBoundBox::faceBits(const point& pt) const
 }
 
 
-// Code position of point relative to box
 Foam::direction Foam::treeBoundBox::posBits(const point& pt) const
 {
     direction posBits = 0;
@@ -500,8 +495,6 @@ Foam::direction Foam::treeBoundBox::posBits(const point& pt) const
 }
 
 
-// nearest and furthest corner coordinate.
-// !names of treeBoundBox::min() and treeBoundBox::max() are confusing!
 void Foam::treeBoundBox::calcExtremities
 (
     const point& pt,
@@ -559,9 +552,6 @@ Foam::scalar Foam::treeBoundBox::maxDist(const point& pt) const
 }
 
 
-// Distance comparator
-// Compare all vertices of bounding box against all of other bounding
-// box to see if all vertices of one are nearer
 Foam::label Foam::treeBoundBox::distanceCmp
 (
     const point& pt,
diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H
index 6648ba7bcc216ce777c2971489a0e50b590105d9..24a68e8fd4f8d40749d9e24d801335a49f79db7b 100644
--- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H
+++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -362,7 +362,7 @@ inline bool contiguous<treeBoundBox>() {return contiguous<boundBox>();}
 #include "treeBoundBoxI.H"
 
 #ifdef NoRepository
-#   include "treeBoundBoxTemplates.C"
+    #include "treeBoundBoxTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H b/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H
index 2d64825ed773b75333672f07f0f1e34251f677f7..3973e00dacb9458b3082e4533f4029a2bacce9d7 100644
--- a/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H
+++ b/src/OpenFOAM/primitives/DiagTensor/DiagTensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,22 +58,14 @@ class DiagTensor
 
 public:
 
-    // Member constants
-
-        enum
-        {
-            rank = 2 // Rank of DiagTensor is 2
-        };
+    //- Equivalent type of labels used for valid component indexing
+    typedef DiagTensor<label> labelType;
 
 
-    // Static data members
+    // Member constants
 
-        static const char* const typeName;
-        static const char* componentNames[];
-        static const DiagTensor zero;
-        static const DiagTensor one;
-        static const DiagTensor max;
-        static const DiagTensor min;
+        //- Rank of DiagTensor is 2
+        static const direction rank = 2;
 
 
     //- Component labeling enumeration
@@ -85,6 +77,9 @@ public:
         //- Construct null
         inline DiagTensor();
 
+        //- Construct initialized to zero
+        inline DiagTensor(const Foam::zero);
+
         //- Construct given VectorSpace
         template<class Cmpt2>
         inline DiagTensor(const VectorSpace<DiagTensor<Cmpt2>, Cmpt2, 3>&);
diff --git a/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H b/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H
index 63497e7a2463e8e51125504c24eb10f1d8afb58d..3faf0a22e76fbb87679156515906c7dd5302c888 100644
--- a/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H
+++ b/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,21 +26,23 @@ License
 #include "SphericalTensor.H"
 #include "SymmTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::DiagTensor<Cmpt>::DiagTensor()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline DiagTensor<Cmpt>::DiagTensor()
+inline Foam::DiagTensor<Cmpt>::DiagTensor(const Foam::zero)
+:
+    VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(Zero)
 {}
 
 
 template<class Cmpt>
 template<class Cmpt2>
-inline DiagTensor<Cmpt>::DiagTensor
+inline Foam::DiagTensor<Cmpt>::DiagTensor
 (
     const VectorSpace<DiagTensor<Cmpt2>, Cmpt2, 3>& vs
 )
@@ -50,7 +52,7 @@ inline DiagTensor<Cmpt>::DiagTensor
 
 
 template<class Cmpt>
-inline DiagTensor<Cmpt>::DiagTensor
+inline Foam::DiagTensor<Cmpt>::DiagTensor
 (
     const Cmpt& vxx,
     const Cmpt& vyy,
@@ -64,7 +66,7 @@ inline DiagTensor<Cmpt>::DiagTensor
 
 
 template<class Cmpt>
-inline DiagTensor<Cmpt>::DiagTensor(Istream& is)
+inline Foam::DiagTensor<Cmpt>::DiagTensor(Istream& is)
 :
     VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(is)
 {}
@@ -73,43 +75,48 @@ inline DiagTensor<Cmpt>::DiagTensor(Istream& is)
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  DiagTensor<Cmpt>::xx() const
+inline const Cmpt& Foam::DiagTensor<Cmpt>::xx() const
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline const Cmpt&  DiagTensor<Cmpt>::yy() const
+inline const Cmpt& Foam::DiagTensor<Cmpt>::yy() const
 {
     return this->v_[YY];
 }
 
 template<class Cmpt>
-inline const Cmpt&  DiagTensor<Cmpt>::zz() const
+inline const Cmpt& Foam::DiagTensor<Cmpt>::zz() const
 {
     return this->v_[ZZ];
 }
 
 
 template<class Cmpt>
-inline Cmpt& DiagTensor<Cmpt>::xx()
+inline Cmpt& Foam::DiagTensor<Cmpt>::xx()
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline Cmpt& DiagTensor<Cmpt>::yy()
+inline Cmpt& Foam::DiagTensor<Cmpt>::yy()
 {
     return this->v_[YY];
 }
 
 template<class Cmpt>
-inline Cmpt& DiagTensor<Cmpt>::zz()
+inline Cmpt& Foam::DiagTensor<Cmpt>::zz()
 {
     return this->v_[ZZ];
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
diff --git a/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.C b/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.C
index f5fe69dedc3115b402e07dfa4a91f62550e15da3..bcc9c1af3df8c690e75a8fd9241e39c23a9ce821 100644
--- a/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.C
+++ b/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,34 +28,52 @@ Description
 
 #include "diagTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const diagTensor::typeName = "diagTensor";
+const char* const Foam::diagTensor::vsType::typeName = "diagTensor";
 
 template<>
-const char* diagTensor::componentNames[] = {"xx", "yy", "zz"};
+const char* const Foam::diagTensor::vsType::componentNames[] =
+{
+    "xx", "yy", "zz"
+};
 
 template<>
-const diagTensor diagTensor::zero(0, 0, 0);
+const Foam::diagTensor Foam::diagTensor::vsType::vsType::zero
+(
+    diagTensor::uniform(0)
+);
 
 template<>
-const diagTensor diagTensor::one(1, 1, 1);
+const Foam::diagTensor Foam::diagTensor::vsType::one
+(
+    diagTensor::uniform(1)
+);
 
 template<>
-const diagTensor diagTensor::max(VGREAT, VGREAT, VGREAT);
+const Foam::diagTensor Foam::diagTensor::vsType::max
+(
+    diagTensor::uniform(VGREAT)
+);
 
 template<>
-const diagTensor diagTensor::min(-VGREAT, -VGREAT, -VGREAT);
+const Foam::diagTensor Foam::diagTensor::vsType::min
+(
+    diagTensor::uniform(-VGREAT)
+);
 
+template<>
+const Foam::diagTensor Foam::diagTensor::vsType::rootMax
+(
+    diagTensor::uniform(ROOTVGREAT)
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::diagTensor Foam::diagTensor::vsType::rootMin
+(
+    diagTensor::uniform(-ROOTVGREAT)
+);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H
new file mode 100644
index 0000000000000000000000000000000000000000..f04f302f57cef28d9a473615cab5f3b434084213
--- /dev/null
+++ b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H
@@ -0,0 +1,328 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::MatrixSpace
+
+Description
+    Templated matrix space.
+
+    Template arguments are the Form the matrix space will be used to create,
+    the type of the elements and the number of rows and columns of the matrix.
+
+SourceFiles
+    MatrixSpaceI.H
+
+SeeAlso
+    Foam::VectorSpace
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef MatrixSpace_H
+#define MatrixSpace_H
+
+#include "VectorSpace.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class MatrixSpace Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Form, class Cmpt, direction Mrows, direction Ncols>
+class MatrixSpace
+:
+    public VectorSpace<Form, Cmpt, Mrows*Ncols>
+{
+
+public:
+
+    //- MatrixSpace type
+    typedef MatrixSpace<Form, Cmpt, Mrows, Ncols> msType;
+
+
+    // Member constants
+
+        static const direction mRows = Mrows;
+        static const direction nCols = Ncols;
+
+
+    // Static member functions
+
+        //- Return the number of rows
+        static direction m()
+        {
+            return Mrows;
+        }
+
+        //- Return the number of columns
+        static direction n()
+        {
+            return Ncols;
+        }
+
+        //- Return the identity matrix for square matrix spaces
+        inline static msType identity();
+
+
+    // Sub-Block Classes
+
+        //- Const sub-block type
+        template<class SubTensor, direction BRowStart, direction BColStart>
+        class ConstBlock
+        {
+            //- Reference to parent matrix
+            const msType& matrix_;
+
+        public:
+
+            static const direction mRows = SubTensor::mRows;
+            static const direction nCols = SubTensor::nCols;
+
+            //- Return the number of rows in the block
+            static direction m()
+            {
+                return mRows;
+            }
+
+            //- Return the number of columns in the block
+            static direction n()
+            {
+                return nCols;
+            }
+
+            //- Construct for the given matrix
+            inline ConstBlock(const msType& matrix);
+
+            //- Construct and return the sub-ensor corresponding to this block
+            inline SubTensor operator()() const;
+
+            //- (i, j) const element access operator
+            inline const Cmpt& operator()
+            (
+                const direction i,
+                const direction j
+            ) const;
+        };
+
+
+        //- Sub-block type
+        template
+        <
+            class SubTensor,
+            direction BRowStart,
+            direction BColStart
+        >
+        class Block
+        {
+            //- Reference to parent matrix
+            msType& matrix_;
+
+        public:
+
+            static const direction mRows = SubTensor::mRows;
+            static const direction nCols = SubTensor::nCols;
+
+            //- Return the number of rows in the block
+            static direction m()
+            {
+                return mRows;
+            }
+
+            //- Return the number of columns in the block
+            static direction n()
+            {
+                return nCols;
+            }
+
+            //- Construct for the given matrix
+            inline Block(msType& matrix);
+
+            //- Assignment to a matrix
+            template<class Form2>
+            inline void operator=
+            (
+                const MatrixSpace
+                <
+                    Form2,
+                    Cmpt,
+                    SubTensor::mRows,
+                    SubTensor::nCols
+                >& matrix
+            );
+
+            //- Assignment to a column vector
+            template<class VSForm>
+            inline void operator=
+            (
+                const VectorSpace<VSForm, Cmpt, SubTensor::mRows>& v
+            );
+
+            //- Construct and return the sub-tensor corresponding to this block
+            inline SubTensor operator()() const;
+
+            //- (i, j) const element access operator
+            inline const Cmpt& operator()
+            (
+                const direction i,
+                const direction j
+            ) const;
+
+            //- (i, j) element access operator
+            inline Cmpt& operator()(const direction i, const direction j);
+        };
+
+
+    // Constructors
+
+        //- Construct null
+        inline MatrixSpace();
+
+        //- Construct initialized to zero
+        inline MatrixSpace(const Foam::zero);
+
+        //- Construct as copy of a VectorSpace with the same size
+        template<class Form2, class Cmpt2>
+        inline explicit MatrixSpace
+        (
+            const VectorSpace<Form2, Cmpt2, Mrows*Ncols>&
+        );
+
+        //- Construct from a block of another matrix space
+        template
+        <
+            template<class, direction, direction> class Block2,
+            direction BRowStart,
+            direction BColStart
+        >
+        inline MatrixSpace
+        (
+            const Block2<Form, BRowStart, BColStart>& block
+        );
+
+        //- Construct from Istream
+        MatrixSpace(Istream&);
+
+
+    // Member Functions
+
+        //- Fast const element access using compile-time addressing
+        template<direction Row, direction Col>
+        inline const Cmpt& elmt() const;
+
+        //- Fast element access using compile-time addressing
+        template<direction Row, direction Col>
+        inline Cmpt& elmt();
+
+        // Const element access functions for a 3x3
+        // Compile-time errors are generated for inappropriate use
+
+            inline const Cmpt& xx() const;
+            inline const Cmpt& xy() const;
+            inline const Cmpt& xz() const;
+            inline const Cmpt& yx() const;
+            inline const Cmpt& yy() const;
+            inline const Cmpt& yz() const;
+            inline const Cmpt& zx() const;
+            inline const Cmpt& zy() const;
+            inline const Cmpt& zz() const;
+
+        // Element access functions for a 3x3
+        // Compile-time errors are generated for inappropriate use
+
+            inline Cmpt& xx();
+            inline Cmpt& xy();
+            inline Cmpt& xz();
+            inline Cmpt& yx();
+            inline Cmpt& yy();
+            inline Cmpt& yz();
+            inline Cmpt& zx();
+            inline Cmpt& zy();
+            inline Cmpt& zz();
+
+        //- Return the transpose of the matrix
+        inline typename typeOfTranspose<Cmpt, Form>::type T() const;
+
+        //- Return a const sub-block corresponding to the specified type
+        //  starting at the specified row and column
+        template<class SubTensor, direction BRowStart, direction BColStart>
+        inline ConstBlock<SubTensor, BRowStart, BColStart> block() const;
+
+        //- Return a sub-block corresponding to the specified type
+        //  starting at the specified row and column
+        template<class SubTensor, direction BRowStart, direction BColStart>
+        inline Block<SubTensor, BRowStart, BColStart> block();
+
+        //- (i, j) const element access operator
+        inline const Cmpt& operator()
+        (
+            const direction& i,
+            const direction& j
+        ) const;
+
+        //- (i, j) element access operator
+        inline Cmpt& operator()(const direction& i, const direction& j);
+
+
+    // Member Operators
+
+        //- Assignment to zero
+        inline void operator=(const Foam::zero);
+
+        //- Assignment to a block of another matrix space
+        template
+        <
+            template<class, direction, direction> class Block2,
+            direction BRowStart,
+            direction BColStart
+        >
+        inline void operator=
+        (
+            const Block2<Form, BRowStart, BColStart>& block
+        );
+
+        //- Inner product with a compatible square matrix
+        template<class Form2>
+        inline void operator&=
+        (
+            const MatrixSpace<Form, Cmpt, Ncols, Ncols>& matrix
+        );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "MatrixSpaceI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H
new file mode 100644
index 0000000000000000000000000000000000000000..ff636aa933c961457029e47b84e93aa8ac585772
--- /dev/null
+++ b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H
@@ -0,0 +1,635 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "StaticAssert.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::MatrixSpace()
+{}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::MatrixSpace
+(
+    const Foam::zero
+)
+:
+    MatrixSpace::vsType(Zero)
+{}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class Form2, class Cmpt2>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::MatrixSpace
+(
+    const VectorSpace<Form2, Cmpt2, Mrows*Ncols>& vs
+)
+:
+    MatrixSpace::vsType(vs)
+{}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template
+<
+    template<class, Foam::direction, Foam::direction> class Block2,
+    Foam::direction BRowStart,
+    Foam::direction BColStart
+>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::MatrixSpace
+(
+    const Block2<Form, BRowStart, BColStart>& block
+)
+{
+    for (direction i=0; i<Mrows; ++i)
+    {
+        for (direction j=0; j<Ncols; ++j)
+        {
+            operator()(i, j) = block(i, j);
+        }
+    }
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::MatrixSpace(Istream& is)
+:
+    MatrixSpace::vsType(is)
+{}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+ConstBlock<SubTensor, BRowStart, BColStart>::
+ConstBlock(const msType& matrix)
+:
+    matrix_(matrix)
+{
+    StaticAssert(msType::mRows >= BRowStart + mRows);
+    StaticAssert(msType::nCols >= BColStart + nCols);
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+Block<SubTensor, BRowStart, BColStart>::
+Block(msType& matrix)
+:
+    matrix_(matrix)
+{
+    StaticAssert(msType::mRows >= BRowStart + mRows);
+    StaticAssert(msType::nCols >= BColStart + nCols);
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<Foam::direction Row, Foam::direction Col>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::elmt() const
+{
+    StaticAssert(Row < Mrows && Col < Ncols);
+    return this->v_[Row*Ncols + Col];
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<Foam::direction Row, Foam::direction Col>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::elmt()
+{
+    StaticAssert(Row < Mrows && Col < Ncols);
+    return this->v_[Row*Ncols + Col];
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::xx() const
+{
+    return elmt<0, 0>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::xx()
+{
+    return elmt<0, 0>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::xy() const
+{
+    return elmt<0,1>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::xy()
+{
+    return elmt<0,1>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::xz() const
+{
+    return elmt<0,2>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::xz()
+{
+    return elmt<0,2>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::yx() const
+{
+    return elmt<1,0>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::yx()
+{
+    return elmt<1,0>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::yy() const
+{
+    return elmt<1,1>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::yy()
+{
+    return elmt<1,1>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::yz() const
+{
+    return elmt<1,2>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::yz()
+{
+    return elmt<1,2>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::zx() const
+{
+    return elmt<2,0>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::zx()
+{
+    return elmt<2,0>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::zy() const
+{
+    return elmt<2,1>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::zy()
+{
+    return elmt<2,1>();
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::zz() const
+{
+    return elmt<2,2>();
+}
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::zz()
+{
+    return elmt<2,2>();
+}
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::identity()
+{
+    StaticAssert(Mrows == Ncols);
+    msType result(Zero);
+
+    for (direction i=0; i<Ncols; ++i)
+    {
+        result(i, i) = 1;
+    }
+
+    return result;
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline typename Foam::typeOfTranspose<Cmpt, Form>::type
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::T() const
+{
+    typename typeOfTranspose<Cmpt, Form>::type result;
+
+    for (direction i=0; i<Mrows; ++i)
+    {
+        for (direction j=0; j<Ncols; ++j)
+        {
+            result(j,i) = operator()(i, j);
+        }
+    }
+
+    return result;
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template
+<
+    class SubTensor,
+    Foam::direction BRowStart,
+    Foam::direction BColStart
+>
+inline typename Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::template
+    ConstBlock<SubTensor, BRowStart, BColStart>
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::block() const
+{
+    return *this;
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template
+<
+    class SubTensor,
+    Foam::direction BRowStart,
+    Foam::direction BColStart
+>
+inline
+typename Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::template
+    Block<SubTensor, BRowStart, BColStart>
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::block()
+{
+    return *this;
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline const Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::operator()
+(
+    const direction& i,
+    const direction& j
+) const
+{
+    #ifdef FULLDEBUG
+    if (i > Mrows-1 || j > Ncols-1)
+    {
+        FatalErrorInFunction
+            << "indices out of range"
+            << abort(FatalError);
+    }
+    #endif
+
+    return this->v_[i*Ncols + j];
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline Cmpt& Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::operator()
+(
+    const direction& i,
+    const direction& j
+)
+{
+    #ifdef FULLDEBUG
+    if (i > Mrows-1 || j > Ncols-1)
+    {
+        FatalErrorInFunction
+            << "indices out of range"
+            << abort(FatalError);
+    }
+    #endif
+
+    return this->v_[i*Ncols + j];
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline SubTensor
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+ConstBlock<SubTensor, BRowStart, BColStart>::
+operator()() const
+{
+    return *this;
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline const Cmpt&
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+ConstBlock<SubTensor, BRowStart, BColStart>::
+operator()(const direction i, const direction j) const
+{
+    return matrix_(BRowStart + i, BColStart + j);
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline SubTensor
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+Block<SubTensor, BRowStart, BColStart>::
+operator()() const
+{
+    SubTensor st;
+
+    for (direction i=0; i<SubTensor::mRows; ++i)
+    {
+        for (direction j=0; j<SubTensor::nCols; ++j)
+        {
+            st[i*SubTensor::nCols + j] = operator()(i, j);
+        }
+    }
+
+    return st;
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline const Cmpt&
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+Block<SubTensor, BRowStart, BColStart>::
+operator()(const direction i, const direction j) const
+{
+    return matrix_(BRowStart + i, BColStart + j);
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+inline Cmpt&
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+Block<SubTensor, BRowStart, BColStart>::
+operator()(const direction i, const direction j)
+{
+    return matrix_(BRowStart + i, BColStart + j);
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+inline void Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::operator=
+(
+    const Foam::zero
+)
+{
+    MatrixSpace::vsType::operator=(Zero);
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class Form2>
+inline void Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::operator&=
+(
+    const MatrixSpace<Form, Cmpt, Ncols, Ncols>& matrix
+)
+{
+    *this = *this & matrix;
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template
+<
+    template<class, Foam::direction, Foam::direction> class Block2,
+    Foam::direction BRowStart,
+    Foam::direction BColStart
+>
+inline void Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::operator=
+(
+    const Block2<Form, BRowStart, BColStart>& block
+)
+{
+    for (direction i = 0; i < Mrows; ++i)
+    {
+        for (direction j = 0; j < Ncols; ++j)
+        {
+            operator()(i, j) = block(i, j);
+        }
+    }
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+template<class Form2>
+inline void
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+Block<SubTensor, BRowStart, BColStart>::
+operator=
+(
+    const MatrixSpace<Form2, Cmpt, SubTensor::mRows, SubTensor::nCols>& matrix
+)
+{
+    for (direction i=0; i<mRows; ++i)
+    {
+        for (direction j=0; j<nCols; ++j)
+        {
+            operator()(i,j) = matrix(i,j);
+        }
+    }
+}
+
+
+template<class Form, class Cmpt, Foam::direction Mrows, Foam::direction Ncols>
+template<class SubTensor, Foam::direction BRowStart, Foam::direction BColStart>
+template<class VSForm>
+inline void
+Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::
+Block<SubTensor, BRowStart, BColStart>::
+operator=
+(
+    const VectorSpace<VSForm, Cmpt, SubTensor::mRows>& v
+)
+{
+    StaticAssert(nCols == 1);
+
+    for (direction i=0; i<SubTensor::mRows; ++i)
+    {
+        operator()(i,0) = v[i];
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
+
+template<class Form, class Cmpt, direction Mrows, direction Ncols>
+inline typename typeOfTranspose<Cmpt, Form>::type T
+(
+    const MatrixSpace<Form, Cmpt, Ncols, Mrows>& matrix
+)
+{
+    return matrix.T();
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+inline typename typeOfTranspose<Cmpt, Form>::type T
+(
+    const VectorSpace<Form, Cmpt, Ncmpts>& v
+)
+{
+    typename typeOfTranspose<Cmpt, Form>::type result;
+
+    for (direction i=0; i<Ncmpts; ++i)
+    {
+        result[i] = v[i];
+    }
+
+    return result;
+}
+
+
+// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
+
+template
+<
+    class Form1,
+    class Form2,
+    class Cmpt,
+    direction Mrows1,
+    direction Ncols1,
+    direction Mrows2,
+    direction Ncols2
+>
+inline typename typeOfInnerProduct<Cmpt, Form1, Form2>::type operator&
+(
+    const MatrixSpace<Form1, Cmpt, Mrows1, Ncols1>& matrix1,
+    const MatrixSpace<Form2, Cmpt, Mrows2, Ncols2>& matrix2
+)
+{
+    StaticAssert(Ncols1 == Mrows2);
+
+    typename typeOfInnerProduct<Cmpt, Form1, Form2>::type result(Zero);
+
+    for (direction i=0; i<Mrows1; ++i)
+    {
+        for (direction j=0; j<Ncols2; ++j)
+        {
+            for (direction k=0; k<Mrows2; k++)
+            {
+                result(i, j) += matrix1(i, k)*matrix2(k, j);
+            }
+        }
+    }
+
+    return result;
+}
+
+
+template<class Form, class VSForm, class Cmpt, direction Mrows, direction Ncols>
+inline typename typeOfInnerProduct<Cmpt, Form, VSForm>::type operator&
+(
+    const MatrixSpace<Form, Cmpt, Mrows, Ncols>& matrix,
+    const VectorSpace<VSForm, Cmpt, Ncols>& v
+)
+{
+    typename typeOfInnerProduct<Cmpt, Form, VSForm>::type result(Zero);
+
+    for (direction i=0; i<Mrows; ++i)
+    {
+        for (direction j=0; j<Ncols; ++j)
+        {
+            result[i] += matrix(i, j)*v[j];
+        }
+    }
+
+    return result;
+}
+
+
+template
+<
+    class Form1,
+    class Form2,
+    class Cmpt,
+    direction Ncmpts1,
+    direction Ncmpts2
+>
+inline typename typeOfOuterProduct<Cmpt, Form1, Form2>::type operator*
+(
+    const VectorSpace<Form1, Cmpt, Ncmpts1>& v1,
+    const VectorSpace<Form2, Cmpt, Ncmpts2>& v2
+)
+{
+    typename typeOfOuterProduct<Cmpt, Form1, Form2>::type result;
+
+    for (direction i=0; i<Ncmpts1; ++i)
+    {
+        for (direction j=0; j<Ncmpts2; ++j)
+        {
+            result(i, j) = v1[i]*v2[j];
+        }
+    }
+
+    return result;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/RowVector/RowVector.H b/src/OpenFOAM/primitives/RowVector/RowVector.H
new file mode 100644
index 0000000000000000000000000000000000000000..f69b2aa252f3cdf0648ceffdaf973724c3f26d7f
--- /dev/null
+++ b/src/OpenFOAM/primitives/RowVector/RowVector.H
@@ -0,0 +1,130 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RowVector
+
+Description
+    Templated 3D row-vector derived from MatrixSpace adding construction from
+    3 components and element access using x(), y() and z().
+
+SourceFiles
+    RowVectorI.H
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RowVector_H
+#define RowVector_H
+
+#include "MatrixSpace.H"
+#include "Vector.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class RowVector Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Cmpt>
+class RowVector
+:
+    public MatrixSpace<RowVector<Cmpt>, Cmpt, 1, 3>
+{
+
+public:
+
+    //- Equivalent type of labels used for valid component indexing
+    typedef RowVector<label> labelType;
+
+
+    //- Component labeling enumeration
+    enum components { X, Y, Z };
+
+
+    // Constructors
+
+        //- Construct null
+        inline RowVector();
+
+        //- Construct initialized to zero
+        inline RowVector(const Foam::zero);
+
+        //- Construct given VectorSpace of the same rank
+        template<class Cmpt2>
+        inline RowVector(const MatrixSpace<RowVector<Cmpt2>, Cmpt2, 1, 3>&);
+
+        //- Construct given three components
+        inline RowVector(const Cmpt& rvx, const Cmpt& rvy, const Cmpt& rvz);
+
+        //- Construct from Istream
+        inline RowVector(Istream&);
+
+
+    // Member Functions
+
+        // Access
+
+            inline const Cmpt& x() const;
+            inline const Cmpt& y() const;
+            inline const Cmpt& z() const;
+
+            inline Cmpt& x();
+            inline Cmpt& y();
+            inline Cmpt& z();
+};
+
+
+template<class Cmpt>
+class typeOfTranspose<Cmpt, Vector<Cmpt>>
+{
+public:
+
+    typedef RowVector<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfTranspose<Cmpt, RowVector<Cmpt>>
+{
+public:
+
+    typedef Vector<Cmpt> type;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "RowVectorI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/RowVector/RowVectorI.H b/src/OpenFOAM/primitives/RowVector/RowVectorI.H
new file mode 100644
index 0000000000000000000000000000000000000000..69c3b120e6e10a4469cc62d203e985a09c28a349
--- /dev/null
+++ b/src/OpenFOAM/primitives/RowVector/RowVectorI.H
@@ -0,0 +1,112 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline Foam::RowVector<Cmpt>::RowVector()
+{}
+
+
+template<class Cmpt>
+inline Foam::RowVector<Cmpt>::RowVector(const Foam::zero)
+:
+    RowVector::msType(Zero)
+{}
+
+
+template<class Cmpt>
+template<class Cmpt2>
+inline Foam::RowVector<Cmpt>::RowVector
+(
+    const MatrixSpace<RowVector<Cmpt2>, Cmpt2, 1, 3>& ms
+)
+:
+    RowVector::msType(ms)
+{}
+
+
+template<class Cmpt>
+inline Foam::RowVector<Cmpt>::RowVector
+(
+    const Cmpt& rvx,
+    const Cmpt& rvy,
+    const Cmpt& rvz
+)
+{
+    this->v_[X] = rvx;
+    this->v_[Y] = rvy;
+    this->v_[Z] = rvz;
+}
+
+
+template<class Cmpt>
+inline Foam::RowVector<Cmpt>::RowVector(Istream& is)
+:
+    RowVector::msType(is)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline const Cmpt& Foam::RowVector<Cmpt>::x() const
+{
+    return this->v_[X];
+}
+
+template<class Cmpt>
+inline const Cmpt& Foam::RowVector<Cmpt>::y() const
+{
+    return this->v_[Y];
+}
+
+template<class Cmpt>
+inline const Cmpt& Foam::RowVector<Cmpt>::z() const
+{
+    return this->v_[Z];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::RowVector<Cmpt>::x()
+{
+    return this->v_[X];
+}
+
+template<class Cmpt>
+inline Cmpt& Foam::RowVector<Cmpt>::y()
+{
+    return this->v_[Y];
+}
+
+template<class Cmpt>
+inline Cmpt& Foam::RowVector<Cmpt>::z()
+{
+    return this->v_[Z];
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Scalar/Scalar.C b/src/OpenFOAM/primitives/Scalar/Scalar.C
index 05db9a2d80da376fbbe5f95e1f744ebf49023ba5..0a3e09b0b18cb83fcd3e6546bdeab23d888249e1 100644
--- a/src/OpenFOAM/primitives/Scalar/Scalar.C
+++ b/src/OpenFOAM/primitives/Scalar/Scalar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ const Scalar pTraits<Scalar>::max = ScalarVGREAT;
 const Scalar pTraits<Scalar>::rootMin = -ScalarROOTVGREAT;
 const Scalar pTraits<Scalar>::rootMax = ScalarROOTVGREAT;
 
-const char* pTraits<Scalar>::componentNames[] = { "" };
+const char* const pTraits<Scalar>::componentNames[] = { "" };
 
 pTraits<Scalar>::pTraits(const Scalar& p)
 :
diff --git a/src/OpenFOAM/primitives/Scalar/Scalar.H b/src/OpenFOAM/primitives/Scalar/Scalar.H
index c25a92b2097ee2b5cc7234c092961c9dda6c7d2b..502a57c3b2f09aeac9bf3f80891e22babe7a7455 100644
--- a/src/OpenFOAM/primitives/Scalar/Scalar.H
+++ b/src/OpenFOAM/primitives/Scalar/Scalar.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,19 +53,23 @@ public:
     //- Equivalent type of labels used for valid component indexing
     typedef label labelType;
 
+
     // Member constants
 
-        enum
-        {
-            dim = 3,         //!< Dimensionality of space
-            rank = 0,        //!< Rank of Scalar is 0
-            nComponents = 1  //!< Number of components in Scalar is 1
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Rank of Scalar is 0
+        static const direction rank = 0;
+
+        //- Number of components in Scalar is 1
+        static const direction nComponents = 1;
+
 
     // Static data members
 
         static const char* const typeName;
-        static const char* componentNames[];
+        static const char* const componentNames[];
         static const Scalar zero;
         static const Scalar one;
         static const Scalar max;
@@ -73,6 +77,7 @@ public:
         static const Scalar rootMax;
         static const Scalar rootMin;
 
+
     // Constructors
 
         //- Construct from primitive
diff --git a/src/OpenFOAM/primitives/SphericalTensor/Identity.H b/src/OpenFOAM/primitives/SphericalTensor/Identity.H
new file mode 100644
index 0000000000000000000000000000000000000000..aac5313532399fc8f16afa39ce81428199237cb6
--- /dev/null
+++ b/src/OpenFOAM/primitives/SphericalTensor/Identity.H
@@ -0,0 +1,105 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::Identity
+
+Description
+    Templated identity and dual space identity tensors derived from
+    SphericalTensor.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Identity_H
+#define Identity_H
+
+#include "SphericalTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class Identity Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Cmpt>
+class Identity
+:
+    public SphericalTensor<Cmpt>
+{
+
+public:
+
+    //- Construct initializing the SphericalTensor to 1
+    Identity()
+    :
+        SphericalTensor<Cmpt>(1)
+    {}
+
+    //- The identity type in the dual space
+    class dual
+    :
+        public SphericalTensor<Cmpt>
+    {
+        //- Construct initializing the SphericalTensor to 1
+        dual()
+        :
+            SphericalTensor<Cmpt>(1)
+        {}
+    };
+
+    //- Return the identity in the dual space
+    inline dual operator*()
+    {
+        return dual();
+    }
+
+    //- Return 1 for label
+    inline explicit operator label() const
+    {
+        return 1;
+    }
+
+    //- Return 1 for scalar
+    inline explicit operator scalar() const
+    {
+        return 1;
+    }
+};
+
+
+// Global Identity tensor
+static const Identity<scalar> I;
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H b/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H
index a2bb56e3f4c96a0398b6ab2ac724fae9af36ff96..3f17389aaec302bf65a35c398e16db0dbbe8d3b7 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H
+++ b/src/OpenFOAM/primitives/SphericalTensor/SphericalTensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,20 +62,12 @@ public:
 
     // Member constants
 
-        enum
-        {
-            rank = 2 // Rank of SphericalTensor is 2
-        };
+        //- Rank of SphericalTensor is 2
+        static const direction rank = 2;
 
 
     // Static data members
 
-        static const char* const typeName;
-        static const char* componentNames[];
-        static const SphericalTensor zero;
-        static const SphericalTensor one;
-        static const SphericalTensor max;
-        static const SphericalTensor min;
         static const SphericalTensor I;
         static const SphericalTensor oneThirdI;
         static const SphericalTensor twoThirdsI;
@@ -90,6 +82,9 @@ public:
         //- Construct null
         inline SphericalTensor();
 
+        //- Construct initialized to zero
+        inline SphericalTensor(const Foam::zero);
+
         //- Construct given VectorSpace
         template<class Cmpt2>
         inline SphericalTensor
diff --git a/src/OpenFOAM/primitives/SphericalTensor/SphericalTensorI.H b/src/OpenFOAM/primitives/SphericalTensor/SphericalTensorI.H
index 5db52eb1bb45606184751aed5a987a5c3966977d..7d0ed79041c0974d2faeb1c280b6b4e405e2ae72 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/SphericalTensorI.H
+++ b/src/OpenFOAM/primitives/SphericalTensor/SphericalTensorI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,66 +25,74 @@ License
 
 #include "Vector.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::SphericalTensor<Cmpt>::SphericalTensor()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline SphericalTensor<Cmpt>::SphericalTensor()
+inline Foam::SphericalTensor<Cmpt>::SphericalTensor(const Foam::zero)
+:
+    SphericalTensor::vsType(Zero)
 {}
 
 
 template<class Cmpt>
 template<class Cmpt2>
-inline SphericalTensor<Cmpt>::SphericalTensor
+inline Foam::SphericalTensor<Cmpt>::SphericalTensor
 (
     const VectorSpace<SphericalTensor<Cmpt2>, Cmpt2, 1>& vs
 )
 :
-    VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(vs)
+    SphericalTensor::vsType(vs)
 {}
 
 
 template<class Cmpt>
-inline SphericalTensor<Cmpt>::SphericalTensor(const Cmpt& stii)
+inline Foam::SphericalTensor<Cmpt>::SphericalTensor(const Cmpt& stii)
 {
     this->v_[II] = stii;
 }
 
 
 template<class Cmpt>
-inline SphericalTensor<Cmpt>::SphericalTensor(Istream& is)
+inline Foam::SphericalTensor<Cmpt>::SphericalTensor(Istream& is)
 :
-    VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(is)
+    SphericalTensor::vsType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  SphericalTensor<Cmpt>::ii() const
+inline const Cmpt& Foam::SphericalTensor<Cmpt>::ii() const
 {
     return this->v_[II];
 }
 
 
 template<class Cmpt>
-inline Cmpt& SphericalTensor<Cmpt>::ii()
+inline Cmpt& Foam::SphericalTensor<Cmpt>::ii()
 {
     return this->v_[II];
 }
 
 
 template<class Cmpt>
-inline const SphericalTensor<Cmpt>& SphericalTensor<Cmpt>::T() const
+inline const Foam::SphericalTensor<Cmpt>&
+Foam::SphericalTensor<Cmpt>::T() const
 {
     return *this;
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 //- Inner-product between two spherical tensors
@@ -190,7 +198,7 @@ public:
 };
 
 template<class Cmpt>
-class outerProduct<Cmpt, SphericalTensor<Cmpt> >
+class outerProduct<Cmpt, SphericalTensor<Cmpt>>
 {
 public:
 
@@ -199,7 +207,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<SphericalTensor<Cmpt>, SphericalTensor<Cmpt> >
+class innerProduct<SphericalTensor<Cmpt>, SphericalTensor<Cmpt>>
 {
 public:
 
@@ -208,7 +216,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<SphericalTensor<Cmpt>, Vector<Cmpt> >
+class innerProduct<SphericalTensor<Cmpt>, Vector<Cmpt>>
 {
 public:
 
@@ -216,7 +224,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Vector<Cmpt>, SphericalTensor<Cmpt> >
+class innerProduct<Vector<Cmpt>, SphericalTensor<Cmpt>>
 {
 public:
 
diff --git a/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.C b/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.C
index 59f01c61925df370651ebf078865523616f673ae..c7ce40447fd58b897d1695c6e218d32e9d73ef06 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.C
+++ b/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,31 +25,59 @@ License
 
 #include "labelSphericalTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<>
+const char* const Foam::labelSphericalTensor::vsType::typeName
+(
+    "labelSphericalTensor"
+);
 
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+template<>
+const char* const Foam::labelSphericalTensor::vsType::componentNames[] =
+{
+    "ii"
+};
 
 template<>
-const char* const labelSphericalTensor::typeName = "labelSphericalTensor";
+const Foam::labelSphericalTensor
+Foam::labelSphericalTensor::vsType::vsType::zero
+(
+    labelSphericalTensor::uniform(0)
+);
 
 template<>
-const char* labelSphericalTensor::componentNames[] = {"ii"};
+const Foam::labelSphericalTensor Foam::labelSphericalTensor::vsType::one
+(
+    labelSphericalTensor::uniform(1)
+);
 
 template<>
-const labelSphericalTensor labelSphericalTensor::zero(0);
+const Foam::labelSphericalTensor Foam::labelSphericalTensor::vsType::max
+(
+    labelSphericalTensor::uniform(labelMax)
+);
 
 template<>
-const labelSphericalTensor labelSphericalTensor::one(1);
+const Foam::labelSphericalTensor Foam::labelSphericalTensor::vsType::min
+(
+    labelSphericalTensor::uniform(-labelMax)
+);
 
 template<>
-const labelSphericalTensor labelSphericalTensor::I(1);
+const Foam::labelSphericalTensor Foam::labelSphericalTensor::vsType::rootMax
+(
+    labelSphericalTensor::uniform(sqrt(scalar(labelMax)))
+);
 
+template<>
+const Foam::labelSphericalTensor Foam::labelSphericalTensor::vsType::rootMin
+(
+    labelSphericalTensor::uniform(-sqrt(scalar(labelMax)))
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::labelSphericalTensor Foam::labelSphericalTensor::I(1);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.C b/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.C
index b5d3bc59fc86c44d3448e905c42e9a24f180c474..826fb0cc222a0a404c7c0aa46021a55e65baaef5 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.C
+++ b/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,42 +25,57 @@ License
 
 #include "sphericalTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const sphericalTensor::typeName = "sphericalTensor";
+const char* const Foam::sphericalTensor::vsType::typeName = "sphericalTensor";
 
 template<>
-const char* sphericalTensor::componentNames[] = {"ii"};
+const char* const Foam::sphericalTensor::vsType::componentNames[] = {"ii"};
 
 template<>
-const sphericalTensor sphericalTensor::zero(0);
+const Foam::sphericalTensor Foam::sphericalTensor::vsType::zero
+(
+    sphericalTensor::uniform(0)
+);
 
 template<>
-const sphericalTensor sphericalTensor::one(1);
+const Foam::sphericalTensor Foam::sphericalTensor::vsType::one
+(
+    sphericalTensor::uniform(1)
+);
 
 template<>
-const sphericalTensor sphericalTensor::max(VGREAT);
+const Foam::sphericalTensor Foam::sphericalTensor::vsType::max
+(
+    sphericalTensor::uniform(VGREAT)
+);
 
 template<>
-const sphericalTensor sphericalTensor::min(-VGREAT);
+const Foam::sphericalTensor Foam::sphericalTensor::vsType::min
+(
+    sphericalTensor::uniform(-VGREAT)
+);
 
 template<>
-const sphericalTensor sphericalTensor::I(1);
+const Foam::sphericalTensor Foam::sphericalTensor::vsType::rootMax
+(
+    sphericalTensor::uniform(ROOTVGREAT)
+);
 
 template<>
-const sphericalTensor sphericalTensor::oneThirdI(1.0/3.0);
+const Foam::sphericalTensor Foam::sphericalTensor::vsType::rootMin
+(
+    sphericalTensor::uniform(-ROOTVGREAT)
+);
 
 template<>
-const sphericalTensor sphericalTensor::twoThirdsI(2.0/3.0);
+const Foam::sphericalTensor Foam::sphericalTensor::I(1);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::sphericalTensor Foam::sphericalTensor::oneThirdI(1.0/3.0);
 
-} // End namespace Foam
+template<>
+const Foam::sphericalTensor Foam::sphericalTensor::twoThirdsI(2.0/3.0);
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H b/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
index 462db416bc2240f59ac7b8719214387a2a970944..3bfa84f0bc2f5ce89e505e005b0082e96ede1ac7 100644
--- a/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
+++ b/src/OpenFOAM/primitives/SphericalTensor/sphericalTensor/sphericalTensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,6 +36,7 @@ SourceFiles
 #define sphericalTensor_H
 
 #include "SphericalTensor.H"
+#include "Identity.H"
 #include "contiguous.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -47,13 +48,9 @@ namespace Foam
 
 typedef SphericalTensor<scalar> sphericalTensor;
 
-// Identity tensor
-static const sphericalTensor I(1);
-
 static const sphericalTensor oneThirdI(1.0/3.0);
 static const sphericalTensor twoThirdsI(2.0/3.0);
 
-
 //- Specify data associated with sphericalTensor type are contiguous
 template<>
 inline bool contiguous<sphericalTensor>() {return true;}
diff --git a/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H b/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H
index 0ecae53a584022d33c49025830ccd22f7950011c..465dbb0e2776f339d3d23f9c5d30c340fe3f917a 100644
--- a/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H
+++ b/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,20 +58,12 @@ public:
 
     // Member constants
 
-        enum
-        {
-            rank = 2 // Rank of SphericalTensor2D is 2
-        };
+        //- Rank of SphericalTensor2D is 2
+        static const direction rank = 2;
 
 
     // Static data members
 
-        static const char* const typeName;
-        static const char* componentNames[];
-        static const SphericalTensor2D zero;
-        static const SphericalTensor2D one;
-        static const SphericalTensor2D max;
-        static const SphericalTensor2D min;
         static const SphericalTensor2D I;
         static const SphericalTensor2D oneThirdI;
         static const SphericalTensor2D twoThirdsI;
@@ -86,6 +78,9 @@ public:
         //- Construct null
         inline SphericalTensor2D();
 
+        //- Construct initialized to zero
+        inline SphericalTensor2D(const Foam::zero);
+
         //- Construct given VectorSpace
         inline SphericalTensor2D
         (
diff --git a/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2DI.H b/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2DI.H
index 389180fe5cd495c93e5e810c83d173ccb0c165d8..e956abe1be7de081ee583cb5c1e6ba9e7564ce1e 100644
--- a/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2DI.H
+++ b/src/OpenFOAM/primitives/SphericalTensor2D/SphericalTensor2DI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,62 +25,65 @@ License
 
 #include "Vector2D.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::SphericalTensor2D<Cmpt>::SphericalTensor2D()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct null
 template<class Cmpt>
-inline SphericalTensor2D<Cmpt>::SphericalTensor2D()
+inline Foam::SphericalTensor2D<Cmpt>::SphericalTensor2D(const Foam::zero)
+:
+    SphericalTensor2D::vsType(Zero)
 {}
 
 
-// Construct given VectorSpace
 template<class Cmpt>
-inline SphericalTensor2D<Cmpt>::SphericalTensor2D
+inline Foam::SphericalTensor2D<Cmpt>::SphericalTensor2D
 (
     const VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>& vs
 )
 :
-    VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>(vs)
+    SphericalTensor2D::vsType(vs)
 {}
 
 
-// Construct given three Cmpts
 template<class Cmpt>
-inline SphericalTensor2D<Cmpt>::SphericalTensor2D(const Cmpt& stii)
+inline Foam::SphericalTensor2D<Cmpt>::SphericalTensor2D(const Cmpt& stii)
 {
     this->v_[II] = stii;
 }
 
 
-// Construct from Istream
 template<class Cmpt>
-inline SphericalTensor2D<Cmpt>::SphericalTensor2D(Istream& is)
+inline Foam::SphericalTensor2D<Cmpt>::SphericalTensor2D(Istream& is)
 :
-    VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>(is)
+    SphericalTensor2D::vsType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  SphericalTensor2D<Cmpt>::ii() const
+inline const Cmpt& Foam::SphericalTensor2D<Cmpt>::ii() const
 {
     return this->v_[II];
 }
 
 
 template<class Cmpt>
-inline Cmpt& SphericalTensor2D<Cmpt>::ii()
+inline Cmpt& Foam::SphericalTensor2D<Cmpt>::ii()
 {
     return this->v_[II];
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 //- Inner-product between two spherical tensors
@@ -172,7 +175,7 @@ public:
 };
 
 template<class Cmpt>
-class outerProduct<Cmpt, SphericalTensor2D<Cmpt> >
+class outerProduct<Cmpt, SphericalTensor2D<Cmpt>>
 {
 public:
 
@@ -181,7 +184,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<SphericalTensor2D<Cmpt>, SphericalTensor2D<Cmpt> >
+class innerProduct<SphericalTensor2D<Cmpt>, SphericalTensor2D<Cmpt>>
 {
 public:
 
@@ -190,7 +193,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<SphericalTensor2D<Cmpt>, Vector2D<Cmpt> >
+class innerProduct<SphericalTensor2D<Cmpt>, Vector2D<Cmpt>>
 {
 public:
 
@@ -198,7 +201,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Vector2D<Cmpt>, SphericalTensor2D<Cmpt> >
+class innerProduct<Vector2D<Cmpt>, SphericalTensor2D<Cmpt>>
 {
 public:
 
diff --git a/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.C b/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.C
index c8c597f32c96c0ae6e0c7ed0563a1b9bda791d39..538e9d437f30f0dff9ddf26b7d68aa477b546f9d 100644
--- a/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.C
+++ b/src/OpenFOAM/primitives/SphericalTensor2D/sphericalTensor2D/sphericalTensor2D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,42 +25,64 @@ License
 
 #include "sphericalTensor2D.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const sphericalTensor2D::typeName = "sphericalTensor2D";
+const char* const Foam::sphericalTensor2D::vsType::typeName
+(
+    "sphericalTensor2D"
+);
 
 template<>
-const char* sphericalTensor2D::componentNames[] = {"ii"};
+const char* const Foam::sphericalTensor2D::vsType::componentNames[] =
+{
+    "ii"
+};
 
 template<>
-const sphericalTensor2D sphericalTensor2D::zero(0);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::vsType::zero
+(
+    sphericalTensor2D::uniform(0)
+);
 
 template<>
-const sphericalTensor2D sphericalTensor2D::one(1);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::one
+(
+    sphericalTensor2D::uniform(1)
+);
 
 template<>
-const sphericalTensor2D sphericalTensor2D::max(VGREAT);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::max
+(
+    sphericalTensor2D::uniform(VGREAT)
+);
 
 template<>
-const sphericalTensor2D sphericalTensor2D::min(-VGREAT);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::min
+(
+    sphericalTensor2D::uniform(-VGREAT)
+);
 
 template<>
-const sphericalTensor2D sphericalTensor2D::I(1);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::rootMax
+(
+    sphericalTensor2D::uniform(ROOTVGREAT)
+);
 
 template<>
-const sphericalTensor2D sphericalTensor2D::oneThirdI(1.0/3.0);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::rootMin
+(
+    sphericalTensor2D::uniform(-ROOTVGREAT)
+);
 
 template<>
-const sphericalTensor2D sphericalTensor2D::twoThirdsI(2.0/3.0);
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::I(1);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::oneThirdI(1.0/3.0);
+
+template<>
+const Foam::sphericalTensor2D Foam::sphericalTensor2D::twoThirdsI(2.0/3.0);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H
index afa1dbb622f14964f1e1390071699166444ec9cb..036f63e84e32cf113de5897016b93e056daa8eee 100644
--- a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H
+++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,21 +64,12 @@ public:
 
     // Member constants
 
-        enum
-        {
-            rank = 2 // Rank of SymmTensor is 2
-        };
+        //- Rank of SymmTensor is 2
+        static const direction rank = 2;
 
 
     // Static data members
 
-        static const char* const typeName;
-        static const char* componentNames[];
-
-        static const SymmTensor zero;
-        static const SymmTensor one;
-        static const SymmTensor max;
-        static const SymmTensor min;
         static const SymmTensor I;
 
 
@@ -91,6 +82,9 @@ public:
         //- Construct null
         inline SymmTensor();
 
+        //- Construct initialized to zero
+        inline SymmTensor(const Foam::zero);
+
         //- Construct given VectorSpace of the same rank
         template<class Cmpt2>
         inline SymmTensor(const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>&);
@@ -134,7 +128,10 @@ public:
 
     // Member Operators
 
-        //- Construct given SphericalTensor
+        //- Inherit VectorSpace assignment operators
+        using SymmTensor::vsType::operator=;
+
+        //- Assign to given SphericalTensor
         inline void operator=(const SphericalTensor<Cmpt>&);
 };
 
diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H
index 26e849f720d4b03874c71b04ac32a3992900520c..be703817a52a495c58e615bd07b0af2d9e2f8df3 100644
--- a/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H
+++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensorI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,31 +26,33 @@ License
 #include "Vector.H"
 #include "Tensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::SymmTensor<Cmpt>::SymmTensor()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline SymmTensor<Cmpt>::SymmTensor()
+inline Foam::SymmTensor<Cmpt>::SymmTensor(const Foam::zero)
+:
+    SymmTensor::vsType(Zero)
 {}
 
 
 template<class Cmpt>
 template<class Cmpt2>
-inline SymmTensor<Cmpt>::SymmTensor
+inline Foam::SymmTensor<Cmpt>::SymmTensor
 (
     const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>& vs
 )
 :
-    VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(vs)
+    SymmTensor::vsType(vs)
 {}
 
 
 template<class Cmpt>
-inline SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st)
+inline Foam::SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0;       this->v_[XZ] = 0;
                             this->v_[YY] = st.ii(); this->v_[YZ] = 0;
@@ -59,7 +61,7 @@ inline SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st)
 
 
 template<class Cmpt>
-inline SymmTensor<Cmpt>::SymmTensor
+inline Foam::SymmTensor<Cmpt>::SymmTensor
 (
     const Cmpt txx, const Cmpt txy, const Cmpt txz,
                     const Cmpt tyy, const Cmpt tyz,
@@ -73,99 +75,99 @@ inline SymmTensor<Cmpt>::SymmTensor
 
 
 template<class Cmpt>
-inline SymmTensor<Cmpt>::SymmTensor(Istream& is)
+inline Foam::SymmTensor<Cmpt>::SymmTensor(Istream& is)
 :
-    VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(is)
+    SymmTensor::vsType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  SymmTensor<Cmpt>::xx() const
+inline const Cmpt& Foam::SymmTensor<Cmpt>::xx() const
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline const Cmpt&  SymmTensor<Cmpt>::xy() const
+inline const Cmpt& Foam::SymmTensor<Cmpt>::xy() const
 {
     return this->v_[XY];
 }
 
 template<class Cmpt>
-inline const Cmpt&  SymmTensor<Cmpt>::xz() const
+inline const Cmpt& Foam::SymmTensor<Cmpt>::xz() const
 {
     return this->v_[XZ];
 }
 
 template<class Cmpt>
-inline const Cmpt&  SymmTensor<Cmpt>::yy() const
+inline const Cmpt& Foam::SymmTensor<Cmpt>::yy() const
 {
     return this->v_[YY];
 }
 
 template<class Cmpt>
-inline const Cmpt&  SymmTensor<Cmpt>::yz() const
+inline const Cmpt& Foam::SymmTensor<Cmpt>::yz() const
 {
     return this->v_[YZ];
 }
 
 template<class Cmpt>
-inline const Cmpt&  SymmTensor<Cmpt>::zz() const
+inline const Cmpt& Foam::SymmTensor<Cmpt>::zz() const
 {
     return this->v_[ZZ];
 }
 
 
 template<class Cmpt>
-inline Cmpt& SymmTensor<Cmpt>::xx()
+inline Cmpt& Foam::SymmTensor<Cmpt>::xx()
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor<Cmpt>::xy()
+inline Cmpt& Foam::SymmTensor<Cmpt>::xy()
 {
     return this->v_[XY];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor<Cmpt>::xz()
+inline Cmpt& Foam::SymmTensor<Cmpt>::xz()
 {
     return this->v_[XZ];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor<Cmpt>::yy()
+inline Cmpt& Foam::SymmTensor<Cmpt>::yy()
 {
     return this->v_[YY];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor<Cmpt>::yz()
+inline Cmpt& Foam::SymmTensor<Cmpt>::yz()
 {
     return this->v_[YZ];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor<Cmpt>::zz()
+inline Cmpt& Foam::SymmTensor<Cmpt>::zz()
 {
     return this->v_[ZZ];
 }
 
 
 template<class Cmpt>
-inline const SymmTensor<Cmpt>& SymmTensor<Cmpt>::T() const
+inline const Foam::SymmTensor<Cmpt>& Foam::SymmTensor<Cmpt>::T() const
 {
     return *this;
 }
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline void SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
+inline void Foam::SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0;       this->v_[XZ] = 0;
                             this->v_[YY] = st.ii(); this->v_[YZ] = 0;
@@ -173,6 +175,10 @@ inline void SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
@@ -398,13 +404,8 @@ inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
 {
     return
     (
-        0.5*sqr(tr(st))
-      - 0.5*
-        (
-           st.xx()*st.xx() + st.xy()*st.xy() + st.xz()*st.xz()
-         + st.xy()*st.xy() + st.yy()*st.yy() + st.yz()*st.yz()
-         + st.xz()*st.xz() + st.yz()*st.yz() + st.zz()*st.zz()
-        )
+        st.xx()*st.yy() + st.yy()*st.zz() + st.xx()*st.zz()
+      - sqr(st.xy()) - sqr(st.yz()) - sqr(st.xz())
     );
 }
 
@@ -536,7 +537,7 @@ public:
 };
 
 template<class Cmpt>
-class outerProduct<Cmpt, SymmTensor<Cmpt> >
+class outerProduct<Cmpt, SymmTensor<Cmpt>>
 {
 public:
 
@@ -544,7 +545,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SymmTensor<Cmpt>, SymmTensor<Cmpt> >
+class innerProduct<SymmTensor<Cmpt>, SymmTensor<Cmpt>>
 {
 public:
 
@@ -552,7 +553,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SymmTensor<Cmpt>, Vector<Cmpt> >
+class innerProduct<SymmTensor<Cmpt>, Vector<Cmpt>>
 {
 public:
 
@@ -560,7 +561,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Vector<Cmpt>, SymmTensor<Cmpt> >
+class innerProduct<Vector<Cmpt>, SymmTensor<Cmpt>>
 {
 public:
 
@@ -569,7 +570,7 @@ public:
 
 
 template<class Cmpt>
-class typeOfSum<SphericalTensor<Cmpt>, SymmTensor<Cmpt> >
+class typeOfSum<SphericalTensor<Cmpt>, SymmTensor<Cmpt>>
 {
 public:
 
@@ -577,7 +578,7 @@ public:
 };
 
 template<class Cmpt>
-class typeOfSum<SymmTensor<Cmpt>, SphericalTensor<Cmpt> >
+class typeOfSum<SymmTensor<Cmpt>, SphericalTensor<Cmpt>>
 {
 public:
 
@@ -585,7 +586,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SphericalTensor<Cmpt>, SymmTensor<Cmpt> >
+class innerProduct<SphericalTensor<Cmpt>, SymmTensor<Cmpt>>
 {
 public:
 
@@ -593,7 +594,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SymmTensor<Cmpt>, SphericalTensor<Cmpt> >
+class innerProduct<SymmTensor<Cmpt>, SphericalTensor<Cmpt>>
 {
 public:
 
diff --git a/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.C b/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.C
index 0e5deb2705ead4dfabe206f52fc433adc7af4c4a..ea20917f261784ed605c0638fd634ee23d817b40 100644
--- a/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.C
+++ b/src/OpenFOAM/primitives/SymmTensor/labelSymmTensor/labelSymmTensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,18 +25,13 @@ License
 
 #include "labelSymmTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const labelSymmTensor::typeName = "labelSymmTensor";
+const char* const Foam::labelSymmTensor::vsType::typeName = "labelSymmTensor";
 
 template<>
-const char* labelSymmTensor::componentNames[] =
+const char* const Foam::labelSymmTensor::vsType::componentNames[] =
 {
     "xx", "xy", "xz",
           "yy", "yz",
@@ -44,24 +39,48 @@ const char* labelSymmTensor::componentNames[] =
 };
 
 template<>
-const labelSymmTensor labelSymmTensor::zero
+const Foam::labelSymmTensor Foam::labelSymmTensor::vsType::vsType::zero
 (
-    0, 0, 0,
-       0, 0,
-          0
+    labelSymmTensor::uniform(0)
 );
 
 template<>
-const labelSymmTensor labelSymmTensor::one
+const Foam::labelSymmTensor Foam::labelSymmTensor::vsType::one
 (
-    1, 1, 1,
-       1, 1,
-          1
+    labelSymmTensor::uniform(1)
+);
+
+template<>
+const Foam::labelSymmTensor Foam::labelSymmTensor::vsType::max
+(
+    labelSymmTensor::uniform(labelMax)
 );
 
+template<>
+const Foam::labelSymmTensor Foam::labelSymmTensor::vsType::min
+(
+    labelSymmTensor::uniform(-labelMax)
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::labelSymmTensor Foam::labelSymmTensor::vsType::rootMax
+(
+    labelSymmTensor::uniform(sqrt(scalar(labelMax)))
+);
+
+template<>
+const Foam::labelSymmTensor Foam::labelSymmTensor::vsType::rootMin
+(
+    labelSymmTensor::uniform(-sqrt(scalar(labelMax)))
+);
+
+template<>
+const Foam::labelSymmTensor Foam::labelSymmTensor::I
+(
+    1, 0, 0,
+       1, 0,
+          1
+);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C b/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C
index 22f2b9eb8dbf0c9e50ca0c41ca4ad4e4fe311a88..cc5b6975e0ca09ab16ad9e90c968dc2328fa41b0 100644
--- a/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C
+++ b/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,18 +25,13 @@ License
 
 #include "symmTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const symmTensor::typeName = "symmTensor";
+const char* const Foam::symmTensor::vsType::typeName = "symmTensor";
 
 template<>
-const char* symmTensor::componentNames[] =
+const char* const Foam::symmTensor::vsType::componentNames[] =
 {
     "xx", "xy", "xz",
           "yy", "yz",
@@ -44,39 +39,43 @@ const char* symmTensor::componentNames[] =
 };
 
 template<>
-const symmTensor symmTensor::zero
+const Foam::symmTensor Foam::symmTensor::vsType::vsType::zero
 (
-    0, 0, 0,
-       0, 0,
-          0
+    symmTensor::uniform(0)
 );
 
 template<>
-const symmTensor symmTensor::one
+const Foam::symmTensor Foam::symmTensor::vsType::one
 (
-    1, 1, 1,
-       1, 1,
-          1
+    symmTensor::uniform(1)
+);
+
+template<>
+const Foam::symmTensor Foam::symmTensor::vsType::max
+(
+    symmTensor::uniform(VGREAT)
 );
 
 template<>
-const symmTensor symmTensor::max
+const Foam::symmTensor Foam::symmTensor::vsType::min
 (
-    VGREAT, VGREAT, VGREAT,
-            VGREAT, VGREAT,
-                    VGREAT
+    symmTensor::uniform(-VGREAT)
 );
 
 template<>
-const symmTensor symmTensor::min
+const Foam::symmTensor Foam::symmTensor::vsType::rootMax
 (
-    -VGREAT, -VGREAT, -VGREAT,
-             -VGREAT, -VGREAT,
-                      -VGREAT
+    symmTensor::uniform(ROOTVGREAT)
 );
 
 template<>
-const symmTensor symmTensor::I
+const Foam::symmTensor Foam::symmTensor::vsType::rootMin
+(
+    symmTensor::uniform(-ROOTVGREAT)
+);
+
+template<>
+const Foam::symmTensor Foam::symmTensor::I
 (
     1, 0, 0,
        1, 0,
@@ -84,8 +83,4 @@ const symmTensor symmTensor::I
 );
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H
index 550e9bfec077a685430de6a61551bfe02addbff9..141f15f2d2013fd66097d9ed41821e334ea4aa73 100644
--- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H
+++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,21 +64,12 @@ public:
 
     // Member constants
 
-        enum
-        {
-            rank = 2 // Rank of SymmTensor2D is 2
-        };
+        //- Rank of SymmTensor2D is 2
+        static const direction rank = 2;
 
 
     // Static data members
 
-        static const char* const typeName;
-        static const char* componentNames[];
-
-        static const SymmTensor2D zero;
-        static const SymmTensor2D one;
-        static const SymmTensor2D max;
-        static const SymmTensor2D min;
         static const SymmTensor2D I;
 
 
@@ -91,6 +82,9 @@ public:
         //- Construct null
         inline SymmTensor2D();
 
+        //- Construct initialized to zero
+        inline SymmTensor2D(const Foam::zero);
+
         //- Construct given VectorSpace
         inline SymmTensor2D(const VectorSpace<SymmTensor2D<Cmpt>, Cmpt, 3>&);
 
@@ -126,6 +120,9 @@ public:
 
     // Member Operators
 
+        //- Inherit VectorSpace assignment operators
+        using SymmTensor2D::vsType::operator=;
+
         //- Construct given SphericalTensor2D
         inline void operator=(const SphericalTensor2D<Cmpt>&);
 };
diff --git a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H
index 1a139d8f64f19ea73797fe175811224984941712..769fe9e6be7efbe0f77d5ab8e5fbc3aeee2c9b18 100644
--- a/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H
+++ b/src/OpenFOAM/primitives/SymmTensor2D/SymmTensor2DI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,30 +26,32 @@ License
 #include "Vector2D.H"
 #include "Tensor2D.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline SymmTensor2D<Cmpt>::SymmTensor2D()
+inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D(const Foam::zero)
+:
+    SymmTensor2D::vsType(Zero)
 {}
 
 
 template<class Cmpt>
-inline SymmTensor2D<Cmpt>::SymmTensor2D
+inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D
 (
     const VectorSpace<SymmTensor2D<Cmpt>, Cmpt, 3>& vs
 )
 :
-    VectorSpace<SymmTensor2D<Cmpt>, Cmpt, 3>(vs)
+    SymmTensor2D::vsType(vs)
 {}
 
 
 template<class Cmpt>
-inline SymmTensor2D<Cmpt>::SymmTensor2D(const SphericalTensor2D<Cmpt>& st)
+inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D(const SphericalTensor2D<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0;
                             this->v_[YY] = st.ii();
@@ -57,7 +59,7 @@ inline SymmTensor2D<Cmpt>::SymmTensor2D(const SphericalTensor2D<Cmpt>& st)
 
 
 template<class Cmpt>
-inline SymmTensor2D<Cmpt>::SymmTensor2D
+inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D
 (
     const Cmpt txx, const Cmpt txy,
                     const Cmpt tyy
@@ -69,69 +71,77 @@ inline SymmTensor2D<Cmpt>::SymmTensor2D
 
 
 template<class Cmpt>
-inline SymmTensor2D<Cmpt>::SymmTensor2D(Istream& is)
+inline Foam::SymmTensor2D<Cmpt>::SymmTensor2D(Istream& is)
 :
-    VectorSpace<SymmTensor2D<Cmpt>, Cmpt, 3>(is)
+    SymmTensor2D::vsType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt& SymmTensor2D<Cmpt>::xx() const
+inline const Cmpt& Foam::SymmTensor2D<Cmpt>::xx() const
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline const Cmpt& SymmTensor2D<Cmpt>::xy() const
+inline const Cmpt& Foam::SymmTensor2D<Cmpt>::xy() const
 {
     return this->v_[XY];
 }
 
 template<class Cmpt>
-inline const Cmpt& SymmTensor2D<Cmpt>::yy() const
+inline const Cmpt& Foam::SymmTensor2D<Cmpt>::yy() const
 {
     return this->v_[YY];
 }
 
 
 template<class Cmpt>
-inline Cmpt& SymmTensor2D<Cmpt>::xx()
+inline Cmpt& Foam::SymmTensor2D<Cmpt>::xx()
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor2D<Cmpt>::xy()
+inline Cmpt& Foam::SymmTensor2D<Cmpt>::xy()
 {
     return this->v_[XY];
 }
 
 template<class Cmpt>
-inline Cmpt& SymmTensor2D<Cmpt>::yy()
+inline Cmpt& Foam::SymmTensor2D<Cmpt>::yy()
 {
     return this->v_[YY];
 }
 
 
 template<class Cmpt>
-inline const SymmTensor2D<Cmpt>& SymmTensor2D<Cmpt>::T() const
+inline const Foam::SymmTensor2D<Cmpt>& Foam::SymmTensor2D<Cmpt>::T() const
 {
     return *this;
 }
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline void SymmTensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
+inline void Foam::SymmTensor2D<Cmpt>::operator=
+(
+    const SphericalTensor2D<Cmpt>& st
+)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0;
                             this->v_[YY] = st.ii();
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 //- Inner-product between two symmetric tensors
@@ -445,7 +455,7 @@ public:
 };
 
 template<class Cmpt>
-class outerProduct<Cmpt, SymmTensor2D<Cmpt> >
+class outerProduct<Cmpt, SymmTensor2D<Cmpt>>
 {
 public:
 
@@ -453,7 +463,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SymmTensor2D<Cmpt>, SymmTensor2D<Cmpt> >
+class innerProduct<SymmTensor2D<Cmpt>, SymmTensor2D<Cmpt>>
 {
 public:
 
@@ -461,7 +471,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SymmTensor2D<Cmpt>, Vector2D<Cmpt> >
+class innerProduct<SymmTensor2D<Cmpt>, Vector2D<Cmpt>>
 {
 public:
 
@@ -469,7 +479,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Vector2D<Cmpt>, SymmTensor2D<Cmpt> >
+class innerProduct<Vector2D<Cmpt>, SymmTensor2D<Cmpt>>
 {
 public:
 
@@ -478,7 +488,7 @@ public:
 
 
 template<class Cmpt>
-class typeOfSum<SphericalTensor2D<Cmpt>, SymmTensor2D<Cmpt> >
+class typeOfSum<SphericalTensor2D<Cmpt>, SymmTensor2D<Cmpt>>
 {
 public:
 
@@ -486,7 +496,7 @@ public:
 };
 
 template<class Cmpt>
-class typeOfSum<SymmTensor2D<Cmpt>, SphericalTensor2D<Cmpt> >
+class typeOfSum<SymmTensor2D<Cmpt>, SphericalTensor2D<Cmpt>>
 {
 public:
 
@@ -494,7 +504,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SphericalTensor2D<Cmpt>, SymmTensor2D<Cmpt> >
+class innerProduct<SphericalTensor2D<Cmpt>, SymmTensor2D<Cmpt>>
 {
 public:
 
@@ -502,7 +512,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SymmTensor2D<Cmpt>, SphericalTensor2D<Cmpt> >
+class innerProduct<SymmTensor2D<Cmpt>, SphericalTensor2D<Cmpt>>
 {
 public:
 
diff --git a/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.C b/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.C
index 32f6d9ca6a2198cd8c9d0ff5d1488ff2a854634e..f2d870261bafe3445971fb4cf8e333fd3d4c535e 100644
--- a/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.C
+++ b/src/OpenFOAM/primitives/SymmTensor2D/symmTensor2D/symmTensor2D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,61 +25,60 @@ License
 
 #include "symmTensor2D.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const symmTensor2D::typeName = "symmTensor2D";
+const char* const Foam::symmTensor2D::vsType::typeName = "symmTensor2D";
 
 template<>
-const char* symmTensor2D::componentNames[] =
+const char* const Foam::symmTensor2D::vsType::componentNames[] =
 {
     "xx", "xy",
           "yy"
 };
 
 template<>
-const symmTensor2D symmTensor2D::zero
+const Foam::symmTensor2D Foam::symmTensor2D::vsType::vsType::zero
 (
-    0, 0,
-       0
+    symmTensor2D::uniform(0)
 );
 
 template<>
-const symmTensor2D symmTensor2D::one
+const Foam::symmTensor2D Foam::symmTensor2D::vsType::one
 (
-    1, 1,
-       1
+    symmTensor2D::uniform(1)
 );
 
 template<>
-const symmTensor2D symmTensor2D::max
+const Foam::symmTensor2D Foam::symmTensor2D::vsType::max
 (
-    VGREAT, VGREAT,
-            VGREAT
+    symmTensor2D::uniform(VGREAT)
 );
 
 template<>
-const symmTensor2D symmTensor2D::min
+const Foam::symmTensor2D Foam::symmTensor2D::vsType::min
 (
-    -VGREAT, -VGREAT,
-             -VGREAT
+    symmTensor2D::uniform(-VGREAT)
 );
 
 template<>
-const symmTensor2D symmTensor2D::I
+const Foam::symmTensor2D Foam::symmTensor2D::vsType::rootMax
 (
-    1, 0,
-       1
+    symmTensor2D::uniform(ROOTVGREAT)
 );
 
+template<>
+const Foam::symmTensor2D Foam::symmTensor2D::vsType::rootMin
+(
+    symmTensor2D::uniform(-ROOTVGREAT)
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::symmTensor2D Foam::symmTensor2D::I
+(
+    1, 0,
+       1
+);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H
index 985ca6b081f18744b61056ebf7d7364ed6f71282..3b9165f652b33d118fd8f1947bd1d233364666fd 100644
--- a/src/OpenFOAM/primitives/Tensor/Tensor.H
+++ b/src/OpenFOAM/primitives/Tensor/Tensor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,7 @@ Class
     Foam::Tensor
 
 Description
-    Templated 3D tensor derived from VectorSpace adding construction from
+    Templated 3D tensor derived from MatrixSpace adding construction from
     9 components, element access using xx(), xy() etc. member functions and
     the inner-product (dot-product) and outer-product of two Vectors
     (tensor-product) operators.
@@ -33,11 +33,16 @@ Description
 SourceFiles
     TensorI.H
 
+SeeAlso
+    Foam::MatrixSpace
+    Foam::Vector
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef Tensor_H
 #define Tensor_H
 
+#include "MatrixSpace.H"
 #include "Vector.H"
 #include "SphericalTensor.H"
 
@@ -56,7 +61,7 @@ class SymmTensor;
 template<class Cmpt>
 class Tensor
 :
-    public VectorSpace<Tensor<Cmpt>, Cmpt, 9>
+    public MatrixSpace<Tensor<Cmpt>, Cmpt, 3, 3>
 {
 
 public:
@@ -67,21 +72,12 @@ public:
 
     // Member constants
 
-        enum
-        {
-            rank = 2 // Rank of Tensor is 2
-        };
+        //- Rank of Tensor is 2
+        static const direction rank = 2;
 
 
     // Static data members
 
-        static const char* const typeName;
-        static const char* componentNames[];
-
-        static const Tensor zero;
-        static const Tensor one;
-        static const Tensor max;
-        static const Tensor min;
         static const Tensor I;
 
 
@@ -94,6 +90,13 @@ public:
         //- Construct null
         inline Tensor();
 
+        //- Construct initialized to zero
+        inline Tensor(const Foam::zero);
+
+        //- Construct given MatrixSpace of the same rank
+        template<class Cmpt2>
+        inline Tensor(const MatrixSpace<Tensor<Cmpt2>, Cmpt2, 3, 3>&);
+
         //- Construct given VectorSpace of the same rank
         template<class Cmpt2>
         inline Tensor(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>&);
@@ -105,7 +108,7 @@ public:
         inline Tensor(const SymmTensor<Cmpt>&);
 
         //- Construct given triad
-        inline Tensor(const Vector<Vector<Cmpt> >&);
+        inline Tensor(const Vector<Vector<Cmpt>>&);
 
         //- Construct given the three vector components
         inline Tensor
@@ -123,13 +126,25 @@ public:
             const Cmpt tzx, const Cmpt tzy, const Cmpt tzz
         );
 
+        //- Construct from a block of another matrix space
+        template
+        <
+            template<class, direction, direction> class Block2,
+            direction BRowStart,
+            direction BColStart
+        >
+        Tensor
+        (
+            const Block2<Tensor<Cmpt>, BRowStart, BColStart>& block
+        );
+
         //- Construct from Istream
-        Tensor(Istream&);
+        inline Tensor(Istream&);
 
 
     // Member Functions
 
-        // Access
+        // Component access
 
             inline const Cmpt& xx() const;
             inline const Cmpt& xy() const;
@@ -151,19 +166,32 @@ public:
             inline Cmpt& zy();
             inline Cmpt& zz();
 
-            // Access vector components.
+        // Row-vector access.
 
             inline Vector<Cmpt> x() const;
             inline Vector<Cmpt> y() const;
             inline Vector<Cmpt> z() const;
             inline Vector<Cmpt> vectorComponent(const direction) const;
 
-        //- Transpose
+        //- Return transpose
         inline Tensor<Cmpt> T() const;
 
+        //- Return inverse
+        inline Tensor<Cmpt> inv() const;
+
 
     // Member Operators
 
+        //- Inner-product with a Tensor
+        inline void operator&=(const Tensor<Cmpt>&);
+
+        //- Inherit MatrixSpace assignment operators
+        using Tensor::msType::operator=;
+
+        //- Assign to an equivalent vector space
+        template<class Cmpt2>
+        inline void operator=(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>&);
+
         //- Assign to a SphericalTensor
         inline void operator=(const SphericalTensor<Cmpt>&);
 
@@ -171,7 +199,7 @@ public:
         inline void operator=(const SymmTensor<Cmpt>&);
 
         //- Assign to a triad
-        inline void operator=(const Vector<Vector<Cmpt> >&);
+        inline void operator=(const Vector<Vector<Cmpt>>&);
 };
 
 
@@ -184,6 +212,15 @@ public:
 };
 
 
+template<class Cmpt>
+class typeOfTranspose<Cmpt, Tensor<Cmpt>>
+{
+public:
+
+    typedef Tensor<Cmpt> type;
+};
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H
index 03b0594f1dfae3620b88fc05bec1b5d4fc3a7fc2..a20ba8773e4dfccdcecbbf86dfd26be5774d9f5a 100644
--- a/src/OpenFOAM/primitives/Tensor/TensorI.H
+++ b/src/OpenFOAM/primitives/Tensor/TensorI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,28 +25,44 @@ License
 
 #include "SymmTensor.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::Tensor<Cmpt>::Tensor()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor()
+inline Foam::Tensor<Cmpt>::Tensor(const Foam::zero)
+:
+    Tensor::msType(Zero)
+{}
+
+
+template<class Cmpt>
+template<class Cmpt2>
+inline Foam::Tensor<Cmpt>::Tensor
+(
+    const MatrixSpace<Tensor<Cmpt2>, Cmpt2, 3, 3>& vs
+)
+:
+    Tensor::msType(vs)
 {}
 
 
 template<class Cmpt>
 template<class Cmpt2>
-inline Tensor<Cmpt>::Tensor(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>& vs)
+inline Foam::Tensor<Cmpt>::Tensor
+(
+    const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>& vs
+)
 :
-    VectorSpace<Tensor<Cmpt>, Cmpt, 9>(vs)
+    Tensor::msType(vs)
 {}
 
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor(const SphericalTensor<Cmpt>& st)
+inline Foam::Tensor<Cmpt>::Tensor(const SphericalTensor<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
     this->v_[YX] = 0; this->v_[YY] = st.ii(); this->v_[YZ] = 0;
@@ -55,7 +71,7 @@ inline Tensor<Cmpt>::Tensor(const SphericalTensor<Cmpt>& st)
 
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
+inline Foam::Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
 {
     this->v_[XX] = st.xx(); this->v_[XY] = st.xy(); this->v_[XZ] = st.xz();
     this->v_[YX] = st.xy(); this->v_[YY] = st.yy(); this->v_[YZ] = st.yz();
@@ -64,7 +80,7 @@ inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
 
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor(const Vector<Vector<Cmpt> >& tr)
+inline Foam::Tensor<Cmpt>::Tensor(const Vector<Vector<Cmpt>>& tr)
 {
     this->v_[XX] = tr.x().x();
     this->v_[XY] = tr.x().y();
@@ -81,7 +97,7 @@ inline Tensor<Cmpt>::Tensor(const Vector<Vector<Cmpt> >& tr)
 
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor
+inline Foam::Tensor<Cmpt>::Tensor
 (
     const Vector<Cmpt>& x,
     const Vector<Cmpt>& y,
@@ -95,7 +111,7 @@ inline Tensor<Cmpt>::Tensor
 
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor
+inline Foam::Tensor<Cmpt>::Tensor
 (
     const Cmpt txx, const Cmpt txy, const Cmpt txz,
     const Cmpt tyx, const Cmpt tyy, const Cmpt tyz,
@@ -109,181 +125,200 @@ inline Tensor<Cmpt>::Tensor
 
 
 template<class Cmpt>
-inline Tensor<Cmpt>::Tensor(Istream& is)
+template
+<
+    template<class, Foam::direction, Foam::direction> class Block2,
+    Foam::direction BRowStart,
+    Foam::direction BColStart
+>
+inline Foam::Tensor<Cmpt>::Tensor
+(
+    const Block2<Tensor<Cmpt>, BRowStart, BColStart>& block
+)
 :
-    VectorSpace<Tensor<Cmpt>, Cmpt, 9>(is)
+    Tensor::msType(block)
 {}
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
 template<class Cmpt>
-inline Vector<Cmpt> Tensor<Cmpt>::x() const
-{
-    return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
-}
-
-
-template<class Cmpt>
-inline Vector<Cmpt> Tensor<Cmpt>::y() const
-{
-    return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
-}
-
-
-template<class Cmpt>
-inline Vector<Cmpt>  Tensor<Cmpt>::z() const
-{
-    return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]);
-}
+inline Foam::Tensor<Cmpt>::Tensor(Istream& is)
+:
+    Tensor::msType(is)
+{}
 
 
-template<class Cmpt>
-inline Vector<Cmpt>  Tensor<Cmpt>::vectorComponent(const direction cmpt) const
-{
-    switch (cmpt)
-    {
-        case 0:
-            return x();
-        break;
-        case 1:
-            return y();
-        break;
-        case 2:
-            return z();
-        break;
-    }
-}
-
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::xx() const
+inline const Cmpt& Foam::Tensor<Cmpt>::xx() const
 {
     return this->v_[XX];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::xy() const
+inline const Cmpt& Foam::Tensor<Cmpt>::xy() const
 {
     return this->v_[XY];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::xz() const
+inline const Cmpt& Foam::Tensor<Cmpt>::xz() const
 {
     return this->v_[XZ];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::yx() const
+inline const Cmpt& Foam::Tensor<Cmpt>::yx() const
 {
     return this->v_[YX];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::yy() const
+inline const Cmpt& Foam::Tensor<Cmpt>::yy() const
 {
     return this->v_[YY];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::yz() const
+inline const Cmpt& Foam::Tensor<Cmpt>::yz() const
 {
     return this->v_[YZ];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::zx() const
+inline const Cmpt& Foam::Tensor<Cmpt>::zx() const
 {
     return this->v_[ZX];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::zy() const
+inline const Cmpt& Foam::Tensor<Cmpt>::zy() const
 {
     return this->v_[ZY];
 }
 
 
 template<class Cmpt>
-inline const Cmpt&  Tensor<Cmpt>::zz() const
+inline const Cmpt& Foam::Tensor<Cmpt>::zz() const
 {
     return this->v_[ZZ];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::xx()
+inline Cmpt& Foam::Tensor<Cmpt>::xx()
 {
     return this->v_[XX];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::xy()
+inline Cmpt& Foam::Tensor<Cmpt>::xy()
 {
     return this->v_[XY];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::xz()
+inline Cmpt& Foam::Tensor<Cmpt>::xz()
 {
     return this->v_[XZ];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::yx()
+inline Cmpt& Foam::Tensor<Cmpt>::yx()
 {
     return this->v_[YX];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::yy()
+inline Cmpt& Foam::Tensor<Cmpt>::yy()
 {
     return this->v_[YY];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::yz()
+inline Cmpt& Foam::Tensor<Cmpt>::yz()
 {
     return this->v_[YZ];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::zx()
+inline Cmpt& Foam::Tensor<Cmpt>::zx()
 {
     return this->v_[ZX];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::zy()
+inline Cmpt& Foam::Tensor<Cmpt>::zy()
 {
     return this->v_[ZY];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor<Cmpt>::zz()
+inline Cmpt& Foam::Tensor<Cmpt>::zz()
 {
     return this->v_[ZZ];
 }
 
 
 template<class Cmpt>
-inline Tensor<Cmpt> Tensor<Cmpt>::T() const
+inline Foam::Vector<Cmpt> Foam::Tensor<Cmpt>::x() const
+{
+    return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
+}
+
+
+template<class Cmpt>
+inline Foam::Vector<Cmpt> Foam::Tensor<Cmpt>::y() const
+{
+    return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
+}
+
+
+template<class Cmpt>
+inline Foam::Vector<Cmpt> Foam::Tensor<Cmpt>::z() const
+{
+    return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]);
+}
+
+
+template<class Cmpt>
+inline Foam::Vector<Cmpt> Foam::Tensor<Cmpt>::vectorComponent
+(
+    const direction cmpt
+) const
+{
+    switch (cmpt)
+    {
+        case 0:
+            return x();
+            break;
+        case 1:
+            return y();
+            break;
+        case 2:
+            return z();
+            break;
+    }
+}
+
+
+template<class Cmpt>
+inline Foam::Tensor<Cmpt> Foam::Tensor<Cmpt>::T() const
 {
     return Tensor<Cmpt>
     (
@@ -294,10 +329,44 @@ inline Tensor<Cmpt> Tensor<Cmpt>::T() const
 }
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline void Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
+inline void Foam::Tensor<Cmpt>::operator&=(const Tensor<Cmpt>& t)
+{
+    *this =
+    (
+        Tensor<Cmpt>
+        (
+            this->xx()*t.xx() + this->xy()*t.yx() + this->xz()*t.zx(),
+            this->xx()*t.xy() + this->xy()*t.yy() + this->xz()*t.zy(),
+            this->xx()*t.xz() + this->xy()*t.yz() + this->xz()*t.zz(),
+
+            this->yx()*t.xx() + this->yy()*t.yx() + this->yz()*t.zx(),
+            this->yx()*t.xy() + this->yy()*t.yy() + this->yz()*t.zy(),
+            this->yx()*t.xz() + this->yy()*t.yz() + this->yz()*t.zz(),
+
+            this->zx()*t.xx() + this->zy()*t.yx() + this->zz()*t.zx(),
+            this->zx()*t.xy() + this->zy()*t.yy() + this->zz()*t.zy(),
+            this->zx()*t.xz() + this->zy()*t.yz() + this->zz()*t.zz()
+        )
+    );
+}
+
+
+template<class Cmpt>
+template<class Cmpt2>
+inline void Foam::Tensor<Cmpt>::operator=
+(
+    const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>& vs
+)
+{
+    VectorSpace<Tensor<Cmpt>, Cmpt, 9>::operator=(vs);
+}
+
+
+template<class Cmpt>
+inline void Foam::Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
     this->v_[YX] = 0; this->v_[YY] = st.ii(); this->v_[YZ] = 0;
@@ -306,7 +375,7 @@ inline void Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
 
 
 template<class Cmpt>
-inline void Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st)
+inline void Foam::Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st)
 {
     this->v_[XX] = st.xx(); this->v_[XY] = st.xy(); this->v_[XZ] = st.xz();
     this->v_[YX] = st.xy(); this->v_[YY] = st.yy(); this->v_[YZ] = st.yz();
@@ -315,7 +384,7 @@ inline void Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st)
 
 
 template<class Cmpt>
-inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
+inline void Foam::Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt>>& tr)
 {
     this->v_[XX] = tr.x().x();
     this->v_[XY] = tr.x().y();
@@ -331,6 +400,11 @@ inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
@@ -353,7 +427,7 @@ inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
 
 
 template<class Cmpt>
-inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt> >::type
+inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt>>::type
 operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
 {
     return Tensor<Cmpt>
@@ -374,7 +448,7 @@ operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
 
 
 template<class Cmpt>
-inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt> >::type
+inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt>>::type
 operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
 {
     return Vector<Cmpt>
@@ -387,7 +461,7 @@ operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
 
 
 template<class Cmpt>
-inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
+inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt>>::type
 operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
 {
     return Vector<Cmpt>
@@ -400,7 +474,7 @@ operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
 
 
 template<class Cmpt>
-inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
+inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt>>::type
 operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
 {
     return Tensor<Cmpt>
@@ -413,7 +487,7 @@ operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
 
 
 template<class Cmpt>
-inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
+inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt>>::type
 operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
 {
     return inv(t) & v;
@@ -564,6 +638,13 @@ inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t)
 }
 
 
+template<class Cmpt>
+inline Tensor<Cmpt> Tensor<Cmpt>::inv() const
+{
+    return Foam::inv(*this);
+}
+
+
 //- Return the 1st invariant of a tensor
 template<class Cmpt>
 inline Cmpt invariantI(const Tensor<Cmpt>& t)
@@ -578,13 +659,8 @@ inline Cmpt invariantII(const Tensor<Cmpt>& t)
 {
     return
     (
-        0.5*sqr(tr(t))
-      - 0.5*
-        (
-           t.xx()*t.xx() + t.xy()*t.xy() + t.xz()*t.xz()
-         + t.yx()*t.yx() + t.yy()*t.yy() + t.yz()*t.yz()
-         + t.zx()*t.zx() + t.zy()*t.zy() + t.zz()*t.zz()
-        )
+        t.xx()*t.yy() + t.yy()*t.zz() + t.xx()*t.zz()
+      - t.xy()*t.yx() - t.yz()*t.zy() - t.xz()*t.zx()
     );
 }
 
@@ -698,7 +774,7 @@ operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
 
 
 template<class Cmpt>
-class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt> >
+class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt>>
 {
 public:
 
@@ -707,7 +783,7 @@ public:
 
 
 template<class Cmpt>
-class typeOfSum<Tensor<Cmpt>, SphericalTensor<Cmpt> >
+class typeOfSum<Tensor<Cmpt>, SphericalTensor<Cmpt>>
 {
 public:
 
@@ -716,7 +792,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<SphericalTensor<Cmpt>, Tensor<Cmpt> >
+class innerProduct<SphericalTensor<Cmpt>, Tensor<Cmpt>>
 {
 public:
 
@@ -725,7 +801,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<Tensor<Cmpt>, SphericalTensor<Cmpt> >
+class innerProduct<Tensor<Cmpt>, SphericalTensor<Cmpt>>
 {
 public:
 
@@ -860,7 +936,7 @@ operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
 
 
 template<class Cmpt>
-class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
+class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt>>
 {
 public:
 
@@ -869,7 +945,7 @@ public:
 
 
 template<class Cmpt>
-class typeOfSum<Tensor<Cmpt>, SymmTensor<Cmpt> >
+class typeOfSum<Tensor<Cmpt>, SymmTensor<Cmpt>>
 {
 public:
 
@@ -878,7 +954,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<SymmTensor<Cmpt>, Tensor<Cmpt> >
+class innerProduct<SymmTensor<Cmpt>, Tensor<Cmpt>>
 {
 public:
 
@@ -887,7 +963,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<Tensor<Cmpt>, SymmTensor<Cmpt> >
+class innerProduct<Tensor<Cmpt>, SymmTensor<Cmpt>>
 {
 public:
 
diff --git a/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.C b/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.C
new file mode 100644
index 0000000000000000000000000000000000000000..cdcf7d4aa5142de799601901b36bf47711f6add1
--- /dev/null
+++ b/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.C
@@ -0,0 +1,86 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "floatTensor.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+template<>
+const char* const Foam::floatTensor::vsType::typeName = "floatTensor";
+
+template<>
+const char* const Foam::floatTensor::vsType::componentNames[] =
+{
+    "xx", "xy", "xz",
+    "yx", "yy", "yz",
+    "zx", "zy", "zz"
+};
+
+template<>
+const Foam::floatTensor Foam::floatTensor::vsType::zero
+(
+    floatTensor::uniform(0)
+);
+
+template<>
+const Foam::floatTensor Foam::floatTensor::vsType::one
+(
+    floatTensor::uniform(1)
+);
+
+template<>
+const Foam::floatTensor Foam::floatTensor::vsType::max
+(
+    floatTensor::uniform(floatScalarVGREAT)
+);
+
+template<>
+const Foam::floatTensor Foam::floatTensor::vsType::min
+(
+    floatTensor::uniform(-floatScalarVGREAT)
+);
+
+template<>
+const Foam::floatTensor Foam::floatTensor::vsType::rootMax
+(
+    floatTensor::uniform(floatScalarROOTVGREAT)
+);
+
+template<>
+const Foam::floatTensor Foam::floatTensor::vsType::rootMin
+(
+    floatTensor::uniform(-floatScalarROOTVGREAT)
+);
+
+template<>
+const Foam::floatTensor Foam::floatTensor::I
+(
+    1, 0, 0,
+    0, 1, 0,
+    0, 0, 1
+);
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H b/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H
new file mode 100644
index 0000000000000000000000000000000000000000..53f25ca22e7b8b7da963fc48e389e3a74f784c22
--- /dev/null
+++ b/src/OpenFOAM/primitives/Tensor/floatTensor/floatTensor.H
@@ -0,0 +1,63 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Typedef
+    Foam::floatTensor
+
+Description
+    FloatTensor of scalars.
+
+SourceFiles
+    floatTensor.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef floatTensor_H
+#define floatTensor_H
+
+#include "Tensor.H"
+#include "contiguous.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+typedef Tensor<float> floatTensor;
+
+//- Data associated with floatTensor type are contiguous
+template<>
+inline bool contiguous<floatTensor>() {return true;}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C b/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C
index 4274e78a3e4c493d431ec784f24795d22a492dfa..4f15ceda59f16f60e3044ca72005bc08c921a2ab 100644
--- a/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C
+++ b/src/OpenFOAM/primitives/Tensor/labelTensor/labelTensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,35 +28,52 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-namespace Foam
+template<>
+const char* const Foam::labelTensor::vsType::typeName = "labelTensor";
+
+template<>
+const char* const Foam::labelTensor::vsType::componentNames[] =
 {
-    template<>
-    const char* const Foam::labelTensor::typeName = "labelTensor";
-
-    template<>
-    const char* Foam::labelTensor::componentNames[] =
-    {
-        "xx", "xy", "xz",
-        "yx", "yy", "yz",
-        "zx", "zy", "zz"
-    };
-
-    template<>
-    const Foam::labelTensor Foam::labelTensor::zero
-    (
-        0, 0, 0,
-        0, 0, 0,
-        0, 0, 0
-    );
-
-    template<>
-    const Foam::labelTensor Foam::labelTensor::one
-    (
-        1, 1, 1,
-        1, 1, 1,
-        1, 1, 1
-    );
-}
+    "xx", "xy", "xz",
+    "yx", "yy", "yz",
+    "zx", "zy", "zz"
+};
+
+template<>
+const Foam::labelTensor Foam::labelTensor::vsType::zero
+(
+    labelTensor::uniform(0)
+);
+
+template<>
+const Foam::labelTensor Foam::labelTensor::vsType::one
+(
+    labelTensor::uniform(1)
+);
+
+template<>
+const Foam::labelTensor Foam::labelTensor::vsType::max
+(
+    labelTensor::uniform(labelMax)
+);
+
+template<>
+const Foam::labelTensor Foam::labelTensor::vsType::min
+(
+    labelTensor::uniform(-labelMax)
+);
+
+template<>
+const Foam::labelTensor Foam::labelTensor::vsType::rootMax
+(
+    labelTensor::uniform(sqrt(scalar(labelMax)))
+);
+
+template<>
+const Foam::labelTensor Foam::labelTensor::vsType::rootMin
+(
+    labelTensor::uniform(-sqrt(scalar(labelMax)))
+);
 
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C
index fd636a2529a93f130c6d1ee8fc9dc22816abd11d..cadbef6a9b3a731e731de9ff51dbe07c43c5e55b 100644
--- a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C
+++ b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,59 +30,42 @@ using namespace Foam::constant::mathematical;
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-namespace Foam
+template<>
+const char* const Foam::tensor::vsType::typeName = "tensor";
+
+template<>
+const char* const Foam::tensor::vsType::componentNames[] =
 {
-    template<>
-    const char* const tensor::typeName = "tensor";
+    "xx", "xy", "xz",
+    "yx", "yy", "yz",
+    "zx", "zy", "zz"
+};
 
-    template<>
-    const char* tensor::componentNames[] =
-    {
-        "xx", "xy", "xz",
-        "yx", "yy", "yz",
-        "zx", "zy", "zz"
-    };
+template<>
+const Foam::tensor Foam::tensor::vsType::zero(tensor::uniform(0));
 
-    template<>
-    const tensor tensor::zero
-    (
-        0, 0, 0,
-        0, 0, 0,
-        0, 0, 0
-    );
+template<>
+const Foam::tensor Foam::tensor::vsType::one(tensor::uniform(1));
 
-    template<>
-    const tensor tensor::one
-    (
-        1, 1, 1,
-        1, 1, 1,
-        1, 1, 1
-    );
+template<>
+const Foam::tensor Foam::tensor::vsType::max(tensor::uniform(VGREAT));
 
-    template<>
-    const tensor tensor::max
-    (
-        VGREAT, VGREAT, VGREAT,
-        VGREAT, VGREAT, VGREAT,
-        VGREAT, VGREAT, VGREAT
-    );
+template<>
+const Foam::tensor Foam::tensor::vsType::min(tensor::uniform(-VGREAT));
 
-    template<>
-    const tensor tensor::min
-    (
-        -VGREAT, -VGREAT, -VGREAT,
-        -VGREAT, -VGREAT, -VGREAT,
-        -VGREAT, -VGREAT, -VGREAT
-    );
+template<>
+const Foam::tensor Foam::tensor::vsType::rootMax(tensor::uniform(ROOTVGREAT));
 
-    template<>
-    const tensor tensor::I
-    (
-        1, 0, 0,
-        0, 1, 0,
-        0, 0, 1
-    );
-}
+template<>
+const Foam::tensor Foam::tensor::vsType::rootMin(tensor::uniform(-ROOTVGREAT));
+
+template<>
+const Foam::tensor Foam::tensor::I
+(
+    1, 0, 0,
+    0, 1, 0,
+    0, 0, 1
+);
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H
index ac49d74d53aac23fadc6b8b243a52dadbe46e59e..5ee3db5827c5a4323d40b8f2dc49c3ebfafd2aaf 100644
--- a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H
+++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,23 +61,18 @@ class Tensor2D
 
 public:
 
+    //- Equivalent type of labels used for valid component indexing
+    typedef Tensor2D<label> labelType;
+
+
     // Member constants
 
-        enum
-        {
-            rank = 2 // Rank of Tensor2D is 2
-        };
+        //- Rank of Tensor2D is 2
+        static const direction rank = 2;
 
 
     // Static data members
 
-        static const char* const typeName;
-        static const char* componentNames[];
-
-        static const Tensor2D zero;
-        static const Tensor2D one;
-        static const Tensor2D max;
-        static const Tensor2D min;
         static const Tensor2D I;
 
 
@@ -90,6 +85,9 @@ public:
         //- Construct null
         inline Tensor2D();
 
+        //- Construct initialized to zero
+        inline Tensor2D(const Foam::zero);
+
         //- Construct given VectorSpace
         inline Tensor2D(const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>&);
 
diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H
index f5ddd4d6504b526ed28ee2552d1987d7048a94da..7f6be0d324de5f1a6302454e4f70ad6bac620ecb 100644
--- a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H
+++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,27 +23,32 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::Tensor2D<Cmpt>::Tensor2D()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D()
+inline Foam::Tensor2D<Cmpt>::Tensor2D(const Foam::zero)
+:
+    Tensor2D::msType(Zero)
 {}
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D(const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs)
+inline Foam::Tensor2D<Cmpt>::Tensor2D
+(
+    const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs
+)
 :
-    VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(vs)
+    Tensor2D::msType(vs)
 {}
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D(const SymmTensor2D<Cmpt>& st)
+inline Foam::Tensor2D<Cmpt>::Tensor2D(const SymmTensor2D<Cmpt>& st)
 {
     this->v_[XX] = st.xx(); this->v_[XY] = st.xy();
     this->v_[YX] = st.xy(); this->v_[YY] = st.yy();
@@ -51,7 +56,7 @@ inline Tensor2D<Cmpt>::Tensor2D(const SymmTensor2D<Cmpt>& st)
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
+inline Foam::Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0;
     this->v_[YX] = 0; this->v_[YY] = st.ii();
@@ -59,7 +64,7 @@ inline Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D
+inline Foam::Tensor2D<Cmpt>::Tensor2D
 (
     const Vector2D<Cmpt>& x,
     const Vector2D<Cmpt>& y
@@ -71,7 +76,7 @@ inline Tensor2D<Cmpt>::Tensor2D
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D
+inline Foam::Tensor2D<Cmpt>::Tensor2D
 (
     const Cmpt txx, const Cmpt txy,
     const Cmpt tyx, const Cmpt tyy
@@ -83,79 +88,79 @@ inline Tensor2D<Cmpt>::Tensor2D
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt>::Tensor2D(Istream& is)
+inline Foam::Tensor2D<Cmpt>::Tensor2D(Istream& is)
 :
-    VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(is)
+    Tensor2D::msType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline Vector2D<Cmpt> Tensor2D<Cmpt>::x() const
+inline Foam::Vector2D<Cmpt> Foam::Tensor2D<Cmpt>::x() const
 {
     return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
 }
 
 template<class Cmpt>
-inline Vector2D<Cmpt> Tensor2D<Cmpt>::y() const
+inline Foam::Vector2D<Cmpt> Foam::Tensor2D<Cmpt>::y() const
 {
     return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
 }
 
 
 template<class Cmpt>
-inline const Cmpt& Tensor2D<Cmpt>::xx() const
+inline const Cmpt& Foam::Tensor2D<Cmpt>::xx() const
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline const Cmpt& Tensor2D<Cmpt>::xy() const
+inline const Cmpt& Foam::Tensor2D<Cmpt>::xy() const
 {
     return this->v_[XY];
 }
 
 template<class Cmpt>
-inline const Cmpt& Tensor2D<Cmpt>::yx() const
+inline const Cmpt& Foam::Tensor2D<Cmpt>::yx() const
 {
     return this->v_[YX];
 }
 
 template<class Cmpt>
-inline const Cmpt& Tensor2D<Cmpt>::yy() const
+inline const Cmpt& Foam::Tensor2D<Cmpt>::yy() const
 {
     return this->v_[YY];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Tensor2D<Cmpt>::xx()
+inline Cmpt& Foam::Tensor2D<Cmpt>::xx()
 {
     return this->v_[XX];
 }
 
 template<class Cmpt>
-inline Cmpt& Tensor2D<Cmpt>::xy()
+inline Cmpt& Foam::Tensor2D<Cmpt>::xy()
 {
     return this->v_[XY];
 }
 
 template<class Cmpt>
-inline Cmpt& Tensor2D<Cmpt>::yx()
+inline Cmpt& Foam::Tensor2D<Cmpt>::yx()
 {
     return this->v_[YX];
 }
 
 template<class Cmpt>
-inline Cmpt& Tensor2D<Cmpt>::yy()
+inline Cmpt& Foam::Tensor2D<Cmpt>::yy()
 {
     return this->v_[YY];
 }
 
 
 template<class Cmpt>
-inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const
+inline Foam::Tensor2D<Cmpt> Foam::Tensor2D<Cmpt>::T() const
 {
     return Tensor2D<Cmpt>
     (
@@ -165,10 +170,10 @@ inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const
 }
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline void Tensor2D<Cmpt>::operator=(const SymmTensor2D<Cmpt>& st)
+inline void Foam::Tensor2D<Cmpt>::operator=(const SymmTensor2D<Cmpt>& st)
 {
     this->v_[XX] = st.xx(); this->v_[XY] = st.xy();
     this->v_[YX] = st.xy(); this->v_[YY] = st.yy();
@@ -176,19 +181,23 @@ inline void Tensor2D<Cmpt>::operator=(const SymmTensor2D<Cmpt>& st)
 
 
 template<class Cmpt>
-inline void Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
+inline void Foam::Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
 {
     this->v_[XX] = st.ii(); this->v_[XY] = 0;
     this->v_[YX] = 0; this->v_[YY] = st.ii();
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 //- Inner-product between two tensors
 template<class Cmpt>
-inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt> >::type
+inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>::type
 operator&(const Tensor2D<Cmpt>& t1, const Tensor2D<Cmpt>& t2)
 {
     return Tensor2D<Cmpt>
@@ -203,7 +212,7 @@ operator&(const Tensor2D<Cmpt>& t1, const Tensor2D<Cmpt>& t2)
 
 //- Inner-product between a tensor and a vector
 template<class Cmpt>
-inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt> >::type
+inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>::type
 operator&(const Tensor2D<Cmpt>& t, const Vector2D<Cmpt>& v)
 {
     return Vector2D<Cmpt>
@@ -215,7 +224,7 @@ operator&(const Tensor2D<Cmpt>& t, const Vector2D<Cmpt>& v)
 
 //- Inner-product between a vector and a tensor
 template<class Cmpt>
-inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt> >::type
+inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>::type
 operator&(const Vector2D<Cmpt>& v, const Tensor2D<Cmpt>& t)
 {
     return Vector2D<Cmpt>
@@ -227,7 +236,7 @@ operator&(const Vector2D<Cmpt>& v, const Tensor2D<Cmpt>& t)
 
 //- Outer-product between two vectors
 template<class Cmpt>
-inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type
+inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>::type
 operator*(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2)
 {
     return Tensor2D<Cmpt>
@@ -580,7 +589,7 @@ operator&&(const Tensor2D<Cmpt>& t1, const SymmTensor2D<Cmpt>& st2)
 
 
 template<class Cmpt>
-class typeOfSum<SphericalTensor2D<Cmpt>, Tensor2D<Cmpt> >
+class typeOfSum<SphericalTensor2D<Cmpt>, Tensor2D<Cmpt>>
 {
 public:
 
@@ -588,7 +597,7 @@ public:
 };
 
 template<class Cmpt>
-class typeOfSum<Tensor2D<Cmpt>, SphericalTensor2D<Cmpt> >
+class typeOfSum<Tensor2D<Cmpt>, SphericalTensor2D<Cmpt>>
 {
 public:
 
@@ -597,7 +606,7 @@ public:
 
 
 template<class Cmpt>
-class innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt> >
+class innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>
 {
 public:
 
@@ -605,7 +614,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<SphericalTensor2D<Cmpt>, Tensor2D<Cmpt> >
+class innerProduct<SphericalTensor2D<Cmpt>, Tensor2D<Cmpt>>
 {
 public:
 
@@ -613,7 +622,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Tensor2D<Cmpt>, SphericalTensor2D<Cmpt> >
+class innerProduct<Tensor2D<Cmpt>, SphericalTensor2D<Cmpt>>
 {
 public:
 
@@ -621,7 +630,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt> >
+class innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>
 {
 public:
 
@@ -629,7 +638,7 @@ public:
 };
 
 template<class Cmpt>
-class innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt> >
+class innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>
 {
 public:
 
@@ -638,7 +647,7 @@ public:
 
 
 template<class Cmpt>
-class outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >
+class outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>
 {
 public:
 
diff --git a/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.C b/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.C
index 4ac7a9dcb50adf8f5a61f626557d79254991062a..36f972525588a4e2e79a92a0be5902e73ffcc9b3 100644
--- a/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.C
+++ b/src/OpenFOAM/primitives/Tensor2D/tensor2D/tensor2D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,53 +25,56 @@ License
 
 #include "tensor2D.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const tensor2D::typeName = "tensor2D";
+const char* const Foam::tensor2D::vsType::typeName = "tensor2D";
 
 template<>
-const char* tensor2D::componentNames[] =
+const char* const Foam::tensor2D::vsType::componentNames[] =
 {
     "xx", "xy",
     "yx", "yy"
 };
 
 template<>
-const tensor2D tensor2D::zero
+const Foam::tensor2D Foam::tensor2D::vsType::vsType::zero
+(
+    tensor2D::uniform(0)
+);
+
+template<>
+const Foam::tensor2D Foam::tensor2D::vsType::one
 (
-    0, 0,
-    0, 0
+    tensor2D::uniform(1)
 );
 
 template<>
-const tensor2D tensor2D::one
+const Foam::tensor2D Foam::tensor2D::vsType::max
 (
-    1, 1,
-    1, 1
+    tensor2D::uniform(VGREAT)
 );
 
 template<>
-const tensor2D tensor2D::max
+const Foam::tensor2D Foam::tensor2D::vsType::min
 (
-    VGREAT, VGREAT,
-    VGREAT, VGREAT
+    tensor2D::uniform(-VGREAT)
 );
 
 template<>
-const tensor2D tensor2D::min
+const Foam::tensor2D Foam::tensor2D::vsType::rootMax
 (
-    -VGREAT, -VGREAT,
-    -VGREAT, -VGREAT
+    tensor2D::uniform(ROOTVGREAT)
 );
 
 template<>
-const tensor2D tensor2D::I
+const Foam::tensor2D Foam::tensor2D::vsType::rootMin
+(
+    tensor2D::uniform(-ROOTVGREAT)
+);
+
+template<>
+const Foam::tensor2D Foam::tensor2D::I
 (
     1, 0,
     0, 1
@@ -80,8 +83,7 @@ const tensor2D tensor2D::I
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-// Return eigenvalues in ascending order of absolute values
-vector2D eigenValues(const tensor2D& t)
+Foam::vector2D Foam::eigenValues(const tensor2D& t)
 {
     scalar i = 0;
     scalar ii = 0;
@@ -132,7 +134,7 @@ vector2D eigenValues(const tensor2D& t)
 }
 
 
-vector2D eigenVector(const tensor2D& t, const scalar lambda)
+Foam::vector2D Foam::eigenVector(const tensor2D& t, const scalar lambda)
 {
     if (lambda < SMALL)
     {
@@ -161,7 +163,7 @@ vector2D eigenVector(const tensor2D& t, const scalar lambda)
 }
 
 
-tensor2D eigenVectors(const tensor2D& t)
+Foam::tensor2D Foam::eigenVectors(const tensor2D& t)
 {
     vector2D evals(eigenValues(t));
 
@@ -175,8 +177,4 @@ tensor2D eigenVectors(const tensor2D& t)
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Vector/Vector.H b/src/OpenFOAM/primitives/Vector/Vector.H
index 8eda8e99ab312f08a33b8a07922c5961b03cdfae..8929027e03fb893f8ef41e3c6891687e1443d1e5 100644
--- a/src/OpenFOAM/primitives/Vector/Vector.H
+++ b/src/OpenFOAM/primitives/Vector/Vector.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,22 +68,8 @@ public:
 
     // Member constants
 
-        enum
-        {
-            rank = 1 // Rank of Vector is 1
-        };
-
-
-    // Static data members
-
-        static const char* const typeName;
-        static const char* componentNames[];
-        static const Vector zero;
-        static const Vector one;
-        static const Vector max;
-        static const Vector min;
-        static const Vector rootMax;
-        static const Vector rootMin;
+        //- Rank of Vector is 1
+        static const direction rank = 1;
 
 
     //- Component labeling enumeration
@@ -95,6 +81,9 @@ public:
         //- Construct null
         inline Vector();
 
+        //- Construct initialized to zero
+        inline Vector(const Foam::zero);
+
         //- Construct given VectorSpace of the same rank
         template<class Cmpt2>
         inline Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>&);
@@ -121,7 +110,7 @@ public:
         //- Return *this (used for point which is a typedef to Vector<scalar>.
         inline const Vector<Cmpt>& centre
         (
-            const Foam::List<Vector<Cmpt> >&
+            const Foam::List<Vector<Cmpt>>&
         ) const;
 };
 
diff --git a/src/OpenFOAM/primitives/Vector/VectorI.H b/src/OpenFOAM/primitives/Vector/VectorI.H
index cf26a40722f7c98fedd2f78eea8ded1f81a83b1e..518a398dc503a816e8c668ef774a59e3b655cc8a 100644
--- a/src/OpenFOAM/primitives/Vector/VectorI.H
+++ b/src/OpenFOAM/primitives/Vector/VectorI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,28 +23,38 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::Vector<Cmpt>::Vector()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline Vector<Cmpt>::Vector()
+inline Foam::Vector<Cmpt>::Vector(const Foam::zero)
+:
+    Vector::vsType(Zero)
 {}
 
 
 template<class Cmpt>
 template<class Cmpt2>
-inline Vector<Cmpt>::Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>& vs)
+inline Foam::Vector<Cmpt>::Vector
+(
+    const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>& vs
+)
 :
-    VectorSpace<Vector<Cmpt>, Cmpt, 3>(vs)
+    Vector::vsType(vs)
 {}
 
 
 template<class Cmpt>
-inline Vector<Cmpt>::Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz)
+inline Foam::Vector<Cmpt>::Vector
+(
+    const Cmpt& vx,
+    const Cmpt& vy,
+    const Cmpt& vz
+)
 {
     this->v_[X] = vx;
     this->v_[Y] = vy;
@@ -53,47 +63,47 @@ inline Vector<Cmpt>::Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz)
 
 
 template<class Cmpt>
-inline Vector<Cmpt>::Vector(Istream& is)
+inline Foam::Vector<Cmpt>::Vector(Istream& is)
 :
-    VectorSpace<Vector<Cmpt>, Cmpt, 3>(is)
+    Vector::vsType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  Vector<Cmpt>::x() const
+inline const Cmpt& Foam::Vector<Cmpt>::x() const
 {
     return this->v_[X];
 }
 
 template<class Cmpt>
-inline const Cmpt&  Vector<Cmpt>::y() const
+inline const Cmpt& Foam::Vector<Cmpt>::y() const
 {
     return this->v_[Y];
 }
 
 template<class Cmpt>
-inline const Cmpt&  Vector<Cmpt>::z() const
+inline const Cmpt& Foam::Vector<Cmpt>::z() const
 {
     return this->v_[Z];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Vector<Cmpt>::x()
+inline Cmpt& Foam::Vector<Cmpt>::x()
 {
     return this->v_[X];
 }
 
 template<class Cmpt>
-inline Cmpt& Vector<Cmpt>::y()
+inline Cmpt& Foam::Vector<Cmpt>::y()
 {
     return this->v_[Y];
 }
 
 template<class Cmpt>
-inline Cmpt& Vector<Cmpt>::z()
+inline Cmpt& Foam::Vector<Cmpt>::z()
 {
     return this->v_[Z];
 }
@@ -102,9 +112,9 @@ inline Cmpt& Vector<Cmpt>::z()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Vector<Cmpt>& Vector<Cmpt>::centre
+inline const Foam::Vector<Cmpt>& Foam::Vector<Cmpt>::centre
 (
-    const Foam::List<Vector<Cmpt> >&
+    const Foam::List<Vector<Cmpt>>&
 )const
 {
     return *this;
@@ -113,8 +123,25 @@ inline const Vector<Cmpt>& Vector<Cmpt>::centre
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+//- Dummy innerProduct for scalar to allow the construction of vtables for
+//  virtual member functions involving the inner-products of fields
+//  for which a "NotImplemented" specialization for scalar is provided.
+template<class Cmpt>
+class innerProduct<Vector<Cmpt>, scalar>
+{
+public:
+
+    typedef scalar type;
+};
+
+
 template<class Cmpt>
-inline typename innerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
+inline typename innerProduct<Vector<Cmpt>, Vector<Cmpt>>::type
 operator&(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
 {
     return Cmpt(v1.x()*v2.x() + v1.y()*v2.y() + v1.z()*v2.z());
diff --git a/src/OpenFOAM/primitives/Vector/complexVector/complexVector.C b/src/OpenFOAM/primitives/Vector/complexVector/complexVector.C
index 7e5d04144beb91fbb81bc1d23f2c2b739e8e47f4..f3241df6961f820aacbe11879eea6ab96e028a06 100644
--- a/src/OpenFOAM/primitives/Vector/complexVector/complexVector.C
+++ b/src/OpenFOAM/primitives/Vector/complexVector/complexVector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,37 +28,52 @@ Description
 
 #include "complexVector.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+template<>
+const char* const Foam::complexVector::vsType::typeName = "complexVector";
 
-namespace Foam
+template<>
+const char* const Foam::complexVector::vsType::componentNames[] =
 {
+    "x", "y", "z"
+};
 
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+template<>
+const Foam::complexVector Foam::complexVector::vsType::zero
+(
+    complexVector::uniform(complex(0, 0))
+);
 
 template<>
-const char* const complexVector::typeName = "complexVector";
+const Foam::complexVector Foam::complexVector::vsType::one
+(
+    complexVector::uniform(complex(1, 1))
+);
 
 template<>
-const char* complexVector::componentNames[] = {"x", "y", "z"};
+const Foam::complexVector Foam::complexVector::vsType::max
+(
+    complexVector::uniform(complex(VGREAT, VGREAT))
+);
 
 template<>
-const complexVector complexVector::zero
+const Foam::complexVector Foam::complexVector::vsType::min
 (
-    complex(0, 0),
-    complex(0, 0),
-    complex(0, 0)
+    complexVector::uniform(complex(-VGREAT, -VGREAT))
 );
 
 template<>
-const complexVector complexVector::one
+const Foam::complexVector Foam::complexVector::vsType::rootMax
 (
-    complex(1, 1),
-    complex(1, 1),
-    complex(1, 1)
+    complexVector::uniform(complex(ROOTVGREAT, ROOTVGREAT))
 );
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::complexVector Foam::complexVector::vsType::rootMin
+(
+    complexVector::uniform(complex(-ROOTVGREAT, -ROOTVGREAT))
+);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Vector/floatVector/floatVector.C b/src/OpenFOAM/primitives/Vector/floatVector/floatVector.C
index d88ac70f1f4afc6e25a6a7694155a671d48f7c66..13ab567ba41708cd4f7edfa4034e6e6c4524bb28 100644
--- a/src/OpenFOAM/primitives/Vector/floatVector/floatVector.C
+++ b/src/OpenFOAM/primitives/Vector/floatVector/floatVector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,43 +28,52 @@ Description
 
 #include "floatVector.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const floatVector::typeName = "floatVector";
+const char* const Foam::floatVector::vsType::typeName = "floatVector";
 
 template<>
-const char* floatVector::componentNames[] = {"x", "y", "z"};
+const char* const Foam::floatVector::vsType::componentNames[] =
+{
+    "x", "y", "z"
+};
 
 template<>
-const floatVector floatVector::zero(0, 0, 0);
+const Foam::floatVector Foam::floatVector::vsType::zero
+(
+    floatVector::uniform(0)
+);
 
 template<>
-const floatVector floatVector::one(1, 1, 1);
+const Foam::floatVector Foam::floatVector::vsType::one
+(
+    floatVector::uniform(1)
+);
 
 template<>
-const floatVector floatVector::max
+const Foam::floatVector Foam::floatVector::vsType::max
 (
-    floatScalarVGREAT,
-    floatScalarVGREAT,
-    floatScalarVGREAT
+    floatVector::uniform(floatScalarVGREAT)
 );
 
 template<>
-const floatVector floatVector::min
+const Foam::floatVector Foam::floatVector::vsType::min
 (
-    -floatScalarVGREAT,
-    -floatScalarVGREAT,
-    -floatScalarVGREAT
+    floatVector::uniform(-floatScalarVGREAT)
 );
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::floatVector Foam::floatVector::vsType::rootMax
+(
+    floatVector::uniform(floatScalarROOTVGREAT)
+);
+
+template<>
+const Foam::floatVector Foam::floatVector::vsType::rootMin
+(
+    floatVector::uniform(-floatScalarROOTVGREAT)
+);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C b/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C
index 248f6601defdab5ef0fff82410b8eb03f4d1be98..231c3a69ef1b90fff6ef781d7eae49e112887763 100644
--- a/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C
+++ b/src/OpenFOAM/primitives/Vector/labelVector/labelVector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,19 +27,50 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-namespace Foam
+template<>
+const char* const Foam::labelVector::vsType::typeName = "labelVector";
+
+template<>
+const char* const Foam::labelVector::vsType::componentNames[] =
 {
-    template<>
-    const char* const Foam::labelVector::typeName = "labelVector";
+    "x", "y", "z"
+};
+
+template<>
+const Foam::labelVector Foam::labelVector::vsType::zero
+(
+    labelVector::uniform(0)
+);
+
+template<>
+const Foam::labelVector Foam::labelVector::vsType::one
+(
+    labelVector::uniform(1)
+);
+
+template<>
+const Foam::labelVector Foam::labelVector::vsType::max
+(
+    labelVector::uniform(labelMax)
+);
+
+template<>
+const Foam::labelVector Foam::labelVector::vsType::min
+(
+    labelVector::uniform(-labelMax)
+);
 
-    template<>
-    const char* Foam::labelVector::componentNames[] = {"x", "y", "z"};
+template<>
+const Foam::labelVector Foam::labelVector::vsType::rootMax
+(
+    labelVector::uniform(sqrt(scalar(labelMax)))
+);
 
-    template<>
-    const Foam::labelVector Foam::labelVector::zero(0, 0, 0);
+template<>
+const Foam::labelVector Foam::labelVector::vsType::rootMin
+(
+    labelVector::uniform(-sqrt(scalar(labelMax)))
+);
 
-    template<>
-    const Foam::labelVector Foam::labelVector::one(1, 1, 1);
-}
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Vector/vector/vector.C b/src/OpenFOAM/primitives/Vector/vector/vector.C
index 40b6e79c31ac1d84a5bb791825183bb023008124..646f34c35de2418cba068a218e92d36149a6f7bc 100644
--- a/src/OpenFOAM/primitives/Vector/vector/vector.C
+++ b/src/OpenFOAM/primitives/Vector/vector/vector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,39 +28,31 @@ Description
 
 #include "vector.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const vector::typeName = "vector";
+const char* const Foam::vector::vsType::typeName = "vector";
 
 template<>
-const char* vector::componentNames[] = {"x", "y", "z"};
+const char* const Foam::vector::vsType::componentNames[] = {"x", "y", "z"};
 
 template<>
-const vector vector::zero(0, 0, 0);
+const Foam::vector Foam::vector::vsType::vsType::zero(vector::uniform(0));
 
 template<>
-const vector vector::one(1, 1, 1);
+const Foam::vector Foam::vector::vsType::one(vector::uniform(1));
 
 template<>
-const vector vector::max(VGREAT, VGREAT, VGREAT);
+const Foam::vector Foam::vector::vsType::max(vector::uniform(VGREAT));
 
 template<>
-const vector vector::min(-VGREAT, -VGREAT, -VGREAT);
+const Foam::vector Foam::vector::vsType::min(vector::uniform(-VGREAT));
 
 template<>
-const vector vector::rootMax(ROOTVGREAT, ROOTVGREAT, ROOTVGREAT);
+const Foam::vector Foam::vector::vsType::rootMax(vector::uniform(ROOTVGREAT));
 
 template<>
-const vector vector::rootMin(-ROOTVGREAT, -ROOTVGREAT, -ROOTVGREAT);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+const Foam::vector Foam::vector::vsType::rootMin(vector::uniform(-ROOTVGREAT));
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2D.H b/src/OpenFOAM/primitives/Vector2D/Vector2D.H
index e63fbad951bad563dbde3a710668091ff0e9d8cc..58546c693385323dcb01d8d1d43927f70148ab93 100644
--- a/src/OpenFOAM/primitives/Vector2D/Vector2D.H
+++ b/src/OpenFOAM/primitives/Vector2D/Vector2D.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,22 +56,14 @@ class Vector2D
 
 public:
 
-    // Member constants
-
-        enum
-        {
-            rank = 1 // Rank of Vector2D is 1
-        };
+    //- Equivalent type of labels used for valid component indexing
+    typedef Vector2D<label> labelType;
 
 
-    // Static data members
+    // Member constants
 
-        static const char* const typeName;
-        static const char* componentNames[];
-        static const Vector2D zero;
-        static const Vector2D one;
-        static const Vector2D max;
-        static const Vector2D min;
+        //- Rank of Vector2D is 1
+        static const direction rank = 1;
 
 
     //- Component labeling enumeration
@@ -83,6 +75,9 @@ public:
         //- Construct null
         inline Vector2D();
 
+        //- Construct initialized to zero
+        inline Vector2D(const Foam::zero);
+
         //- Construct given VectorSpace
         inline Vector2D(const VectorSpace<Vector2D<Cmpt>, Cmpt, 2>&);
 
diff --git a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H
index beb077485ff14e9d4ad5f919a6865d5db14c401f..3148e7d0affb0bb52a1fcc6b84f2fdea4178f08e 100644
--- a/src/OpenFOAM/primitives/Vector2D/Vector2DI.H
+++ b/src/OpenFOAM/primitives/Vector2D/Vector2DI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,76 +23,82 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-namespace Foam
-{
+template<class Cmpt>
+inline Foam::Vector2D<Cmpt>::Vector2D()
+{}
 
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct null
 template<class Cmpt>
-inline Vector2D<Cmpt>::Vector2D()
+inline Foam::Vector2D<Cmpt>::Vector2D(const Foam::zero)
+:
+    Vector2D::vsType(Zero)
 {}
 
 
-// Construct given VectorSpace
 template<class Cmpt>
-inline Vector2D<Cmpt>::Vector2D(const VectorSpace<Vector2D<Cmpt>, Cmpt, 2>& vs)
+inline Foam::Vector2D<Cmpt>::Vector2D
+(
+    const VectorSpace<Vector2D<Cmpt>, Cmpt, 2>& vs
+)
 :
-    VectorSpace<Vector2D<Cmpt>, Cmpt, 2>(vs)
+    Vector2D::vsType(vs)
 {}
 
 
-// Construct given three Cmpts
 template<class Cmpt>
-inline Vector2D<Cmpt>::Vector2D(const Cmpt& vx, const Cmpt& vy)
+inline Foam::Vector2D<Cmpt>::Vector2D(const Cmpt& vx, const Cmpt& vy)
 {
     this->v_[X] = vx;
     this->v_[Y] = vy;
 }
 
 
-// Construct from Istream
 template<class Cmpt>
-inline Vector2D<Cmpt>::Vector2D(Istream& is)
+inline Foam::Vector2D<Cmpt>::Vector2D(Istream& is)
 :
-    VectorSpace<Vector2D<Cmpt>, Cmpt, 2>(is)
+    Vector2D::vsType(is)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline const Cmpt&  Vector2D<Cmpt>::x() const
+inline const Cmpt& Foam::Vector2D<Cmpt>::x() const
 {
     return this->v_[X];
 }
 
 template<class Cmpt>
-inline const Cmpt&  Vector2D<Cmpt>::y() const
+inline const Cmpt& Foam::Vector2D<Cmpt>::y() const
 {
     return this->v_[Y];
 }
 
 
 template<class Cmpt>
-inline Cmpt& Vector2D<Cmpt>::x()
+inline Cmpt& Foam::Vector2D<Cmpt>::x()
 {
     return this->v_[X];
 }
 
 template<class Cmpt>
-inline Cmpt& Vector2D<Cmpt>::y()
+inline Cmpt& Foam::Vector2D<Cmpt>::y()
 {
     return this->v_[Y];
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 template<class Cmpt>
-inline typename innerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type
+inline typename innerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>::type
 operator&(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2)
 {
     return Cmpt(v1.x()*v2.x() + v1.y()*v2.y());
diff --git a/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.C b/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.C
index e773e19608ecdb887ea4f94dc7557c2a8c1e8c26..4a73dada31b2e4bc7af3eb737c08ecea659e8ad9 100644
--- a/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.C
+++ b/src/OpenFOAM/primitives/Vector2D/vector2D/vector2D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,33 +28,49 @@ Description
 
 #include "vector2D.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<>
-const char* const vector2D::typeName = "vector2D";
+const char* const Foam::vector2D::vsType::typeName = "vector2D";
 
 template<>
-const char* vector2D::componentNames[] = {"x", "y"};
+const char* const Foam::vector2D::vsType::componentNames[] = {"x", "y"};
 
 template<>
-const vector2D vector2D::zero(0, 0);
+const Foam::vector2D Foam::vector2D::vsType::vsType::zero
+(
+    vector2D::uniform(0)
+);
 
 template<>
-const vector2D vector2D::one(1, 1);
+const Foam::vector2D Foam::vector2D::vsType::one
+(
+    vector2D::uniform(1)
+);
 
 template<>
-const vector2D vector2D::max(VGREAT, VGREAT);
+const Foam::vector2D Foam::vector2D::vsType::max
+(
+    vector2D::uniform(VGREAT)
+);
 
 template<>
-const vector2D vector2D::min(-VGREAT, -VGREAT);
+const Foam::vector2D Foam::vector2D::vsType::min
+(
+    vector2D::uniform(-VGREAT)
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::vector2D Foam::vector2D::vsType::rootMax
+(
+    vector2D::uniform(ROOTVGREAT)
+);
+
+template<>
+const Foam::vector2D Foam::vector2D::vsType::rootMin
+(
+    vector2D::uniform(-ROOTVGREAT)
+);
 
-} // End namespace Foam
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/VectorSpace/VectorSpace.C b/src/OpenFOAM/primitives/VectorSpace/VectorSpace.C
index 6eec73b476b1958debebfc5feab65826268a2a5a..baba05c6ec8bca3ca68944492e4ffd516088667b 100644
--- a/src/OpenFOAM/primitives/VectorSpace/VectorSpace.C
+++ b/src/OpenFOAM/primitives/VectorSpace/VectorSpace.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,47 +30,44 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from Istream
-template<class Form, class Cmpt, int nCmpt>
-Foam::VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
+template<class Form, class Cmpt, Foam::direction Ncmpts>
+Foam::VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace
 (
     Istream& is
 )
 {
     // Read beginning of VectorSpace<Cmpt>
-    is.readBegin("VectorSpace<Form, Cmpt, nCmpt>");
+    is.readBegin("VectorSpace<Form, Cmpt, Ncmpts>");
 
-    for (int i=0; i<nCmpt; i++)
+    for (direction i=0; i<Ncmpts; i++)
     {
         is >> v_[i];
     }
 
     // Read end of VectorSpace<Cmpt>
-    is.readEnd("VectorSpace<Form, Cmpt, nCmpt>");
+    is.readEnd("VectorSpace<Form, Cmpt, Ncmpts>");
 
     // Check state of Istream
-    is.check("VectorSpace<Form, Cmpt, nCmpt>::VectorSpace(Istream&)");
+    is.check("VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace(Istream&)");
 }
 
 
-// Return a string representation
-template<class Form, class Cmpt, int nCmpt>
-Foam::word
-Foam::name
+template<class Form, class Cmpt, Foam::direction Ncmpts>
+Foam::word Foam::name
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     std::ostringstream buf;
 
-    buf << '(';
+    buf << '(' << vs.v_[0];
 
-    for (int i=0; i<nCmpt-1; i++)
+    for (direction i=1; i<Ncmpts; i++)
     {
-        buf << vs.v_[i] << ',';
+        buf << ',' << vs.v_[i];
     }
 
-    buf << vs.v_[nCmpt-1] << ')';
+    buf << ')';
 
     return buf.str();
 }
@@ -78,49 +75,49 @@ Foam::name
 
 // * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, Foam::direction Ncmpts>
 Foam::Istream& Foam::operator>>
 (
     Istream& is,
-    VectorSpace<Form, Cmpt, nCmpt>& vs
+    VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    // Read beginning of VectorSpace<Cmpt, nCmpt>
-    is.readBegin("VectorSpace<Form, Cmpt, nCmpt>");
+    // Read beginning of VectorSpace<Cmpt, Ncmpts>
+    is.readBegin("VectorSpace<Form, Cmpt, Ncmpts>");
 
-    for (int i=0; i<nCmpt; i++)
+    for (direction i=0; i<Ncmpts; i++)
     {
         is >> vs.v_[i];
     }
 
-    // Read end of VectorSpace<Cmpt, nCmpt>
-    is.readEnd("VectorSpace<Form, Cmpt, nCmpt>");
+    // Read end of VectorSpace<Cmpt, Ncmpts>
+    is.readEnd("VectorSpace<Form, Cmpt, Ncmpts>");
 
     // Check state of Istream
-    is.check("operator>>(Istream&, VectorSpace<Form, Cmpt, nCmpt>&)");
+    is.check("operator>>(Istream&, VectorSpace<Form, Cmpt, Ncmpts>&)");
 
     return is;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, Foam::direction Ncmpts>
 Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    os << token::BEGIN_LIST;
+    os << token::BEGIN_LIST << vs.v_[0];
 
-    for (int i=0; i<nCmpt-1; i++)
+    for (direction i=1; i<Ncmpts; i++)
     {
-        os << vs.v_[i] << token::SPACE;
+        os << token::SPACE << vs.v_[i];
     }
 
-    os << vs.v_[nCmpt-1] << token::END_LIST;
+    os << token::END_LIST;
 
     // Check state of Ostream
-    os.check("operator<<(Ostream&, const VectorSpace<Form, Cmpt, nCmpt>&)");
+    os.check("operator<<(Ostream&, const VectorSpace<Form, Cmpt, Ncmpts>&)");
 
     return os;
 }
diff --git a/src/OpenFOAM/primitives/VectorSpace/VectorSpace.H b/src/OpenFOAM/primitives/VectorSpace/VectorSpace.H
index f9bf6dfc67b2e9ced2658df060d9d0889f851332..940294b8e71a2a07f1f6cca4e16764547dc76a48 100644
--- a/src/OpenFOAM/primitives/VectorSpace/VectorSpace.H
+++ b/src/OpenFOAM/primitives/VectorSpace/VectorSpace.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,6 +42,7 @@ SourceFiles
 #include "direction.H"
 #include "scalar.H"
 #include "word.H"
+#include "zero.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -50,20 +51,20 @@ namespace Foam
 
 // Forward declaration of friend functions and operators
 
-template<class Form, class Cmpt, int nCmpt> class VectorSpace;
+template<class Form, class Cmpt, direction Ncmpts> class VectorSpace;
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 Istream& operator>>
 (
     Istream&,
-    VectorSpace<Form, Cmpt, nCmpt>&
+    VectorSpace<Form, Cmpt, Ncmpts>&
 );
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 Ostream& operator<<
 (
     Ostream&,
-    const VectorSpace<Form, Cmpt, nCmpt>&
+    const VectorSpace<Form, Cmpt, Ncmpts>&
 );
 
 
@@ -71,29 +72,80 @@ Ostream& operator<<
                            Class VectorSpace Declaration
 \*---------------------------------------------------------------------------*/
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 class VectorSpace
 {
 
 public:
 
+    //- The components of this vector space
+    Cmpt v_[Ncmpts];
+
+    //- VectorSpace type
+    typedef VectorSpace<Form, Cmpt, Ncmpts> vsType;
+
     //- Component type
     typedef Cmpt cmptType;
 
 
-    // Member constants
+    // Static constants
 
-        enum
-        {
-            dim = 3,            //!< Dimensionality of space
-            nComponents = nCmpt //!< Number of components in this vector space
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Number of components in this vector space
+        static const direction nComponents = Ncmpts;
+
+
+        // VectorSpace currently defaults to a column-vector
+        // This will be removed when column-vector is introduced
+        // as a specialization
+        static const direction mRows = Ncmpts;
+        static const direction nCols = 1;
 
 
     // Static data members
 
-        //- The components of this vector space
-        Cmpt v_[nCmpt];
+        static const char* const typeName;
+        static const char* const componentNames[];
+        static const Form zero;
+        static const Form one;
+        static const Form max;
+        static const Form min;
+        static const Form rootMax;
+        static const Form rootMin;
+
+
+    // Sub-Block Classes
+
+        //- Const sub-block type
+        template
+        <
+            class SubVector,
+            direction BStart
+        >
+        class ConstBlock
+        {
+            const vsType& vs_;
+
+        public:
+
+            //- Number of components in this vector space
+            static const direction nComponents = SubVector::nComponents;
+
+            //- Construct for a given vector
+            inline ConstBlock(const vsType& vs);
+
+            //- [i] const element access operator
+            inline const Cmpt& operator[](const direction i) const;
+
+            //- (i, 0) const element access operator
+            inline const Cmpt& operator()
+            (
+                const direction i,
+                const direction
+            ) const;
+        };
 
 
     // Constructors
@@ -101,21 +153,24 @@ public:
         //- Construct null
         inline VectorSpace();
 
+        //- Construct initialized to zero
+        inline VectorSpace(const Foam::zero);
+
         //- Construct from Istream
         VectorSpace(Istream&);
 
         //- Construct as copy
-        inline VectorSpace(const VectorSpace<Form, Cmpt, nCmpt>&);
+        inline VectorSpace(const VectorSpace<Form, Cmpt, Ncmpts>&);
 
-        //- Construct as copy of another VectorSpace type of the same rank
+        //- Construct as copy of a VectorSpace with the same size
         template<class Form2, class Cmpt2>
-        inline VectorSpace(const VectorSpace<Form2, Cmpt2, nCmpt>&);
+        inline explicit VectorSpace(const VectorSpace<Form2, Cmpt2, Ncmpts>&);
 
 
     // Member Functions
 
-        //- Return the number of elements in the VectorSpace = nCmpt.
-        inline label size() const;
+        //- Return the number of elements in the VectorSpace = Ncmpts.
+        inline static direction size();
 
         inline const Cmpt& component(const direction) const;
         inline Cmpt& component(const direction);
@@ -123,32 +178,39 @@ public:
         inline void component(Cmpt&, const direction) const;
         inline void replace(const direction, const Cmpt&);
 
+        //- Return a VectorSpace with all elements = s
+        inline static Form uniform(const Cmpt& s);
+
+        template<class SubVector, direction BStart>
+        inline const ConstBlock<SubVector, BStart> block() const;
+
 
     // Member Operators
 
         inline const Cmpt& operator[](const direction) const;
         inline Cmpt& operator[](const direction);
 
-        inline void operator=(const VectorSpace<Form, Cmpt, nCmpt>&);
-        inline void operator+=(const VectorSpace<Form, Cmpt, nCmpt>&);
-        inline void operator-=(const VectorSpace<Form, Cmpt, nCmpt>&);
+        inline void operator=(const VectorSpace<Form, Cmpt, Ncmpts>&);
+        inline void operator+=(const VectorSpace<Form, Cmpt, Ncmpts>&);
+        inline void operator-=(const VectorSpace<Form, Cmpt, Ncmpts>&);
 
+        inline void operator=(const Foam::zero);
         inline void operator*=(const scalar);
         inline void operator/=(const scalar);
 
 
     // IOstream Operators
 
-        friend Istream& operator>> <Form, Cmpt, nCmpt>
+        friend Istream& operator>> <Form, Cmpt, Ncmpts>
         (
             Istream&,
-            VectorSpace<Form, Cmpt, nCmpt>&
+            VectorSpace<Form, Cmpt, Ncmpts>&
         );
 
-        friend Ostream& operator<< <Form, Cmpt, nCmpt>
+        friend Ostream& operator<< <Form, Cmpt, Ncmpts>
         (
             Ostream&,
-            const VectorSpace<Form, Cmpt, nCmpt>&
+            const VectorSpace<Form, Cmpt, Ncmpts>&
         );
 };
 
@@ -156,8 +218,8 @@ public:
 // * * * * * * * * * * * * * * Global functions  * * * * * * * * * * * * * * //
 
 //- Return a string representation of a VectorSpace
-template<class Form, class Cmpt, int nCmpt>
-word name(const VectorSpace<Form, Cmpt, nCmpt>&);
+template<class Form, class Cmpt, direction Ncmpts>
+word name(const VectorSpace<Form, Cmpt, Ncmpts>&);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -168,7 +230,7 @@ word name(const VectorSpace<Form, Cmpt, nCmpt>&);
 #include "VectorSpaceI.H"
 
 #ifdef NoRepository
-#   include "VectorSpace.C"
+    #include "VectorSpace.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/VectorSpace/VectorSpaceI.H b/src/OpenFOAM/primitives/VectorSpace/VectorSpaceI.H
index 4752ea43f545a6d064a28add1af9a781d6b838fc..3b545a43e613487f1b58f2e61a12edfe0e9c3487 100644
--- a/src/OpenFOAM/primitives/VectorSpace/VectorSpaceI.H
+++ b/src/OpenFOAM/primitives/VectorSpace/VectorSpaceI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,6 +27,7 @@ License
 #include "products.H"
 #include "VectorSpaceOps.H"
 #include "ops.H"
+#include "StaticAssert.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -35,215 +36,314 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-template<class Form, class Cmpt, int nCmpt>
-inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace()
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace()
 {}
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace(const Foam::zero)
+{
+    VectorSpaceOps<Ncmpts,0>::eqOpS(*this, Zero, eqOp<Cmpt>());
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, eqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::eqOp(*this, vs, eqOp<Cmpt>());
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 template<class Form2, class Cmpt2>
-inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
+inline VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace
+(
+    const VectorSpace<Form2, Cmpt2, Ncmpts>& vs
+)
+{
+    VectorSpaceOps<Ncmpts,0>::eqOp(*this, vs, eqOp<Cmpt>());
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+template<class SubVector, direction BStart>
+inline
+VectorSpace<Form, Cmpt, Ncmpts>::ConstBlock<SubVector, BStart>::ConstBlock
 (
-    const VectorSpace<Form2, Cmpt2, nCmpt>& vs
+    const vsType& vs
 )
+:
+    vs_(vs)
 {
-    VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, eqOp<Cmpt>());
+    StaticAssert(vsType::nComponents >= BStart + nComponents);
 }
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-template<class Form, class Cmpt, int nCmpt>
-inline label VectorSpace<Form, Cmpt, nCmpt>::size() const
+template<class Form, class Cmpt, direction Ncmpts>
+inline direction VectorSpace<Form, Cmpt, Ncmpts>::size()
 {
-    return nCmpt;
+    return Ncmpts;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline const Cmpt& VectorSpace<Form, Cmpt, nCmpt>::component
+template<class Form, class Cmpt, direction Ncmpts>
+inline const Cmpt& VectorSpace<Form, Cmpt, Ncmpts>::component
 (
     const direction d
 ) const
 {
-#   ifdef FULLDEBUG
-    if (d >= nCmpt)
+    #ifdef FULLDEBUG
+    if (d >= Ncmpts)
     {
         FatalErrorInFunction
             << "index out of range"
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return v_[d];
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline Cmpt& VectorSpace<Form, Cmpt, nCmpt>::component
+template<class Form, class Cmpt, direction Ncmpts>
+inline Cmpt& VectorSpace<Form, Cmpt, Ncmpts>::component
 (
     const direction d
 )
 {
-#   ifdef FULLDEBUG
-    if (d >= nCmpt)
+    #ifdef FULLDEBUG
+    if (d >= Ncmpts)
     {
         FatalErrorInFunction
             << "index out of range"
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return v_[d];
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::component
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::component
 (
     Cmpt& c,
     const direction d
 ) const
 {
-#   ifdef FULLDEBUG
-    if (d >= nCmpt)
+    #ifdef FULLDEBUG
+    if (d >= Ncmpts)
     {
         FatalErrorInFunction
             << "index out of range"
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     c = v_[d];
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::replace
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::replace
 (
     const direction d,
     const Cmpt& c
 )
 {
-#   ifdef FULLDEBUG
-    if (d >= nCmpt)
+    #ifdef FULLDEBUG
+    if (d >= Ncmpts)
     {
         FatalErrorInFunction
             << "index out of range"
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     v_[d] = c;
 }
 
 
+template<class Form, class Cmpt, direction Ncmpts>
+inline Form VectorSpace<Form, Cmpt, Ncmpts>::uniform(const Cmpt& s)
+{
+    Form v;
+    VectorSpaceOps<Ncmpts,0>::eqOpS(v, s, eqOp<Cmpt>());
+    return v;
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+template<class SubVector, direction BStart>
+inline const typename VectorSpace<Form, Cmpt, Ncmpts>::template
+    ConstBlock<SubVector, BStart>
+VectorSpace<Form, Cmpt, Ncmpts>::block() const
+{
+    return *this;
+}
+
+
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-template<class Form, class Cmpt, int nCmpt>
-inline const Cmpt& VectorSpace<Form, Cmpt, nCmpt>::operator[]
+template<class Form, class Cmpt, direction Ncmpts>
+inline const Cmpt& VectorSpace<Form, Cmpt, Ncmpts>::operator[]
 (
     const direction d
 ) const
 {
-#   ifdef FULLDEBUG
-    if (d >= nCmpt)
+    #ifdef FULLDEBUG
+    if (d >= Ncmpts)
     {
         FatalErrorInFunction
             << "index out of range"
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return v_[d];
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline Cmpt& VectorSpace<Form, Cmpt, nCmpt>::operator[]
+template<class Form, class Cmpt, direction Ncmpts>
+inline Cmpt& VectorSpace<Form, Cmpt, Ncmpts>::operator[]
 (
     const direction d
 )
 {
-#   ifdef FULLDEBUG
-    if (d >= nCmpt)
+    #ifdef FULLDEBUG
+    if (d >= Ncmpts)
     {
         FatalErrorInFunction
             << "index out of range"
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return v_[d];
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::operator=
+template<class Form, class Cmpt, direction Ncmpts>
+template<class SubVector, direction BStart>
+inline const Cmpt&
+VectorSpace<Form, Cmpt, Ncmpts>::
+ConstBlock<SubVector, BStart>::operator[]
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const direction i
+) const
+{
+    #ifdef FULLDEBUG
+    if (i >= Ncmpts)
+    {
+        FatalErrorInFunction
+            << "index out of range"
+            << abort(FatalError);
+    }
+    #endif
+
+    return vs_[BStart + i];
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+template<class SubVector, direction BStart>
+inline const Cmpt&
+VectorSpace<Form, Cmpt, Ncmpts>::
+ConstBlock<SubVector, BStart>::operator()
+(
+    const direction i,
+    const direction j
+) const
+{
+    #ifdef FULLDEBUG
+    if (i >= Ncmpts)
+    {
+        FatalErrorInFunction
+            << "index out of range"
+            << abort(FatalError);
+    }
+
+    if (j != 0)
+    {
+        FatalErrorInFunction
+            << "j != 0"
+            << abort(FatalError);
+    }
+    #endif
+
+    return vs_[BStart + i];
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::operator=
+(
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, eqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::eqOp(*this, vs, eqOp<Cmpt>());
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::operator+=
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::operator+=
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, plusEqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::eqOp(*this, vs, plusEqOp<Cmpt>());
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::operator-=
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::operator-=
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, minusEqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::eqOp(*this, vs, minusEqOp<Cmpt>());
+}
+
+
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::operator=(const Foam::zero)
+{
+    VectorSpaceOps<Ncmpts,0>::eqOpS(*this, 0, eqOp<Cmpt>());
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::operator*=
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::operator*=
 (
     const scalar s
 )
 {
-    VectorSpaceOps<nCmpt,0>::eqOpS(*this, s, multiplyEqOp2<Cmpt, scalar>());
+    VectorSpaceOps<Ncmpts,0>::eqOpS(*this, s, multiplyEqOp2<Cmpt, scalar>());
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline void VectorSpace<Form, Cmpt, nCmpt>::operator/=
+template<class Form, class Cmpt, direction Ncmpts>
+inline void VectorSpace<Form, Cmpt, Ncmpts>::operator/=
 (
     const scalar s
 )
 {
-    VectorSpaceOps<nCmpt,0>::eqOpS(*this, s, divideEqOp2<Cmpt, scalar>());
+    VectorSpaceOps<Ncmpts,0>::eqOpS(*this, s, divideEqOp2<Cmpt, scalar>());
 }
 
 
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt& setComponent
 (
-    VectorSpace<Form, Cmpt, nCmpt>& vs,
+    VectorSpace<Form, Cmpt, Ncmpts>& vs,
     const direction d
 )
 {
@@ -251,10 +351,10 @@ inline Cmpt& setComponent
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline const Cmpt& component
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs,
     const direction d
 )
 {
@@ -265,10 +365,10 @@ inline const Cmpt& component
 // Powers of a Form
 // Equivalent to outer-products between the Form and itself
 // Form^0 = 1.0
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline typename powProduct<Form, 0>::type pow
 (
-    const VectorSpace<Form, Cmpt, nCmpt>&,
+    const VectorSpace<Form, Cmpt, Ncmpts>&,
     typename powProduct<Form, 0>::type
     = pTraits<typename powProduct<Form, 0>::type>::zero
 )
@@ -277,10 +377,10 @@ inline typename powProduct<Form, 0>::type pow
 }
 
 // Form^1 = Form
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline typename powProduct<Form, 1>::type pow
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& v,
+    const VectorSpace<Form, Cmpt, Ncmpts>& v,
     typename powProduct<Form, 1>::type
   = pTraits<typename powProduct<Form, 1>::type>::zero
 )
@@ -290,10 +390,10 @@ inline typename powProduct<Form, 1>::type pow
 
 
 // Form^2 = sqr(Form)
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline typename powProduct<Form, 2>::type pow
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& v,
+    const VectorSpace<Form, Cmpt, Ncmpts>& v,
     typename powProduct<Form, 2>::type
   = pTraits<typename powProduct<Form, 2>::type>::zero
 )
@@ -302,184 +402,184 @@ inline typename powProduct<Form, 2>::type pow
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline scalar magSqr
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     scalar ms = magSqr(vs.v_[0]);
-    VectorSpaceOps<nCmpt,1>::SeqOp(ms, vs, plusEqMagSqrOp2<scalar, Cmpt>());
+    VectorSpaceOps<Ncmpts,1>::SeqOp(ms, vs, plusEqMagSqrOp2<scalar, Cmpt>());
     return ms;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline scalar mag
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     return ::sqrt(magSqr(static_cast<const Form&>(vs)));
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline VectorSpace<Form, Cmpt, nCmpt> cmptMultiply
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts> cmptMultiply
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, cmptMultiplyOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, cmptMultiplyOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline VectorSpace<Form, Cmpt, nCmpt> cmptPow
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts> cmptPow
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, cmptPowOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, cmptPowOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline VectorSpace<Form, Cmpt, nCmpt> cmptDivide
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts> cmptDivide
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, cmptDivideOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, cmptDivideOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
-inline VectorSpace<Form, Cmpt, nCmpt> stabilise
+template<class Form, class Cmpt, direction Ncmpts>
+inline VectorSpace<Form, Cmpt, Ncmpts> stabilise
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs,
     const Cmpt& small
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::opVS(v, vs, small, stabiliseOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::opVS(v, vs, small, stabiliseOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt cmptMax
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Cmpt cMax = vs.v_[0];
-    VectorSpaceOps<nCmpt,1>::SeqOp(cMax, vs, maxEqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,1>::SeqOp(cMax, vs, maxEqOp<Cmpt>());
     return cMax;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt cmptMin
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Cmpt cMin = vs.v_[0];
-    VectorSpaceOps<nCmpt,1>::SeqOp(cMin, vs, minEqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,1>::SeqOp(cMin, vs, minEqOp<Cmpt>());
     return cMin;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt cmptSum
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Cmpt sum = vs.v_[0];
-    VectorSpaceOps<nCmpt,1>::SeqOp(sum, vs, plusEqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,1>::SeqOp(sum, vs, plusEqOp<Cmpt>());
     return sum;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt cmptAv
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
-    return cmptSum(vs)/nCmpt;
+    return cmptSum(vs)/Ncmpts;
 }
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt cmptProduct
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Cmpt product = vs.v_[0];
-    VectorSpaceOps<nCmpt,1>::SeqOp(product, vs, multiplyEqOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,1>::SeqOp(product, vs, multiplyEqOp<Cmpt>());
     return product;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form cmptMag
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::eqOp(v, vs, eqMagOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::eqOp(v, vs, eqMagOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form max
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, maxOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, maxOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form min
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, minOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, minOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form minMod
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, minModOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, minModOp<Cmpt>());
     return v;
 }
 
@@ -500,13 +600,13 @@ inline Type dot(const Type& t, const scalar s)
 
 template
 <
-    class Form1, class Cmpt1, int nCmpt1,
-    class Form2, class Cmpt2, int nCmpt2
+    class Form1, class Cmpt1, direction Ncmpts1,
+    class Form2, class Cmpt2, direction Ncmpts2
 >
 inline typename innerProduct<Form1, Form2>::type dot
 (
-    const VectorSpace<Form1, Cmpt1, nCmpt1>& t1,
-    const VectorSpace<Form2, Cmpt2, nCmpt2>& t2
+    const VectorSpace<Form1, Cmpt1, Ncmpts1>& t1,
+    const VectorSpace<Form2, Cmpt2, Ncmpts2>& t2
 )
 {
     return static_cast<const Form1&>(t1) & static_cast<const Form2&>(t2);
@@ -515,118 +615,118 @@ inline typename innerProduct<Form1, Form2>::type dot
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator-
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::eqOp(v, vs, eqMinusOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::eqOp(v, vs, eqMinusOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator+
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, plusOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, plusOp<Cmpt>());
     return v;
 }
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator-
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, minusOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, minusOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator*
 (
     scalar s,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::opSV(v, s, vs, multiplyOp3<Cmpt, scalar, Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::opSV(v, s, vs, multiplyOp3<Cmpt, scalar, Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator*
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs,
     scalar s
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::opVS(v, vs, s, multiplyOp3<Cmpt, Cmpt, scalar>());
+    VectorSpaceOps<Ncmpts,0>::opVS(v, vs, s, multiplyOp3<Cmpt, Cmpt, scalar>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator/
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs,
     scalar s
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::opVS(v, vs, s, divideOp3<Cmpt, Cmpt, scalar>());
+    VectorSpaceOps<Ncmpts,0>::opVS(v, vs, s, divideOp3<Cmpt, Cmpt, scalar>());
     return v;
 }
 
 /*
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator/
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::op(v, vs1, vs2, divideOp<Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, divideOp<Cmpt>());
     return v;
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Form operator/
 (
     scalar s,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs
 )
 {
     Form v;
-    VectorSpaceOps<nCmpt,0>::opSV(v, s, vs, divideOp2<scalar, Cmpt>());
+    VectorSpaceOps<Ncmpts,0>::opSV(v, s, vs, divideOp2<scalar, Cmpt>());
     return v;
 }
 */
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline Cmpt operator&&
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     Cmpt ddProd = vs1.v_[0]*vs2.v_[0];
-    for (int i=1; i<nCmpt; ++i)
+    for (direction i=1; i<Ncmpts; ++i)
     {
         ddProd += vs1.v_[i]*vs2.v_[i];
     }
@@ -634,15 +734,15 @@ inline Cmpt operator&&
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline bool operator==
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     bool eq = true;
-    for (int i=0; i<nCmpt; ++i)
+    for (direction i=0; i<Ncmpts; ++i)
     {
         if (!(eq &= (equal(vs1.v_[i], vs2.v_[i])))) break;
     }
@@ -650,26 +750,26 @@ inline bool operator==
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline bool operator!=
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     return !(vs1 == vs2);
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline bool operator>
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     bool gt = true;
-    for (int i=0; i<nCmpt; ++i)
+    for (direction i=0; i<Ncmpts; ++i)
     {
         if (!(gt &= vs1.v_[i] > vs2.v_[i])) break;
     }
@@ -677,15 +777,15 @@ inline bool operator>
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline bool operator<
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     bool lt = true;
-    for (int i=0; i<nCmpt; ++i)
+    for (direction i=0; i<Ncmpts; ++i)
     {
         if (!(lt &= vs1.v_[i] < vs2.v_[i])) break;
     }
@@ -693,22 +793,22 @@ inline bool operator<
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline bool operator>=
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     return !(vs1 < vs2);
 }
 
 
-template<class Form, class Cmpt, int nCmpt>
+template<class Form, class Cmpt, direction Ncmpts>
 inline bool operator<=
 (
-    const VectorSpace<Form, Cmpt, nCmpt>& vs1,
-    const VectorSpace<Form, Cmpt, nCmpt>& vs2
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
+    const VectorSpace<Form, Cmpt, Ncmpts>& vs2
 )
 {
     return !(vs1 > vs2);
diff --git a/src/OpenFOAM/primitives/VectorSpace/VectorSpaceOps.H b/src/OpenFOAM/primitives/VectorSpace/VectorSpaceOps.H
index 7f6d3e1199b8b3b6ad53d579240c00c26c2a3435..5df70b1e5bf3ab8398c9cb789e49788b6b4c3af4 100644
--- a/src/OpenFOAM/primitives/VectorSpace/VectorSpaceOps.H
+++ b/src/OpenFOAM/primitives/VectorSpace/VectorSpaceOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-template<int N, int I>
+template<direction N, direction I>
 class VectorSpaceOps
 {
 public:
diff --git a/src/OpenFOAM/primitives/VectorSpace/products.H b/src/OpenFOAM/primitives/VectorSpace/products.H
index 4d657874aa1818724ab8bb386142c920c1cd521e..5992444b8b5ac8d2054b8d3b1f074fa352d39408 100644
--- a/src/OpenFOAM/primitives/VectorSpace/products.H
+++ b/src/OpenFOAM/primitives/VectorSpace/products.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,12 +41,30 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-template<class Cmpt, int rank>
+//- Abstract template class to provide the form resulting from
+//  the inner-product of two forms
+template<class Cmpt, class Form1, class Form2>
+class typeOfInnerProduct
+{};
+
+//- Abstract template class to provide the form resulting from
+//  the outer-product of two forms
+template<class Cmpt, class Form1, class Form2>
+class typeOfOuterProduct
+{};
+
+//- Abstract template class to provide the transpose form of a form
+template<class Cmpt, class Form>
+class typeOfTranspose
+{};
+
+
+template<class Cmpt, direction rank>
 class typeOfRank
 {};
 
 
-template<class Cmpt, int rank>
+template<class Cmpt, direction rank>
 class symmTypeOfRank
 {};
 
@@ -68,7 +86,7 @@ public:
     typedef typename typeOfRank
     <
         typename pTraits<arg1>::cmptType,
-        int(pTraits<arg1>::rank) + int(pTraits<arg2>::rank)
+        direction(pTraits<arg1>::rank) + direction(pTraits<arg2>::rank)
     >::type type;
 };
 
@@ -81,7 +99,7 @@ public:
     typedef typename typeOfRank
     <
         typename pTraits<arg2>::cmptType,
-        int(pTraits<arg1>::rank) + int(pTraits<arg2>::rank) - 1
+        direction(pTraits<arg1>::rank) + direction(pTraits<arg2>::rank) - 1
     >::type type;
 };
 
@@ -93,7 +111,7 @@ public:
     typedef typename typeOfRank
     <
         typename pTraits<arg1>::cmptType,
-        int(pTraits<arg1>::rank) + int(pTraits<arg2>::rank) - 2
+        direction(pTraits<arg1>::rank) + direction(pTraits<arg2>::rank) - 2
     >::type type;
 };
 
@@ -106,7 +124,7 @@ public:
 };
 
 
-template<class arg1, int arg2>
+template<class arg1, direction arg2>
 class powProduct
 {
 public:
@@ -114,7 +132,7 @@ public:
     typedef typename symmTypeOfRank
     <
         typename pTraits<arg1>::cmptType,
-        arg2*int(pTraits<arg1>::rank)
+        arg2*direction(pTraits<arg1>::rank)
     >::type type;
 };
 
diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.C b/src/OpenFOAM/primitives/bools/Switch/Switch.C
index 1ff04b5316d32f507fa1e8048a54ae75782df4ec..f5be21f9417662edda0cdfda38be1248abe4e5f8 100644
--- a/src/OpenFOAM/primitives/bools/Switch/Switch.C
+++ b/src/OpenFOAM/primitives/bools/Switch/Switch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,8 +29,6 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-// NB: values chosen such that bitwise '&' 0x1 yields the bool value
-// INVALID is also evaluates to false, but don't rely on that
 const char* Foam::Switch::names[Foam::Switch::INVALID+1] =
 {
     "false", "true",
@@ -38,7 +36,7 @@ const char* Foam::Switch::names[Foam::Switch::INVALID+1] =
     "no",    "yes",
     "n",     "y",
     "f",     "t",
-    "none",  "true",  // is there a reasonable counterpart to "none"?
+    "none",  "true",  // Is there a reasonable counterpart to "none"?
     "invalid"
 };
 
diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.H b/src/OpenFOAM/primitives/bools/Switch/Switch.H
index 4ee6d051a411ef383eab1cadc6cedac725f60335..3538a73006c09a5dccf070abc90c1c930f04b662 100644
--- a/src/OpenFOAM/primitives/bools/Switch/Switch.H
+++ b/src/OpenFOAM/primitives/bools/Switch/Switch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -188,17 +188,15 @@ public:
         }
 
         //- Assignment from enumerated value
-        const Switch& operator=(const switchType sw)
+        void operator=(const switchType sw)
         {
             switch_ = sw;
-            return *this;
         }
 
         //- Assignment from bool
-        const Switch& operator=(const bool b)
+        void operator=(const bool b)
         {
             switch_ = (b ? Switch::TRUE : Switch::FALSE);
-            return *this;
         }
 
 
diff --git a/src/OpenFOAM/primitives/bools/bool/bool.C b/src/OpenFOAM/primitives/bools/bool/bool.C
index 5969cadcea37682ab506b53037a25ced700a9ace..267a8c16111e75df006b798f697a144766686076 100644
--- a/src/OpenFOAM/primitives/bools/bool/bool.C
+++ b/src/OpenFOAM/primitives/bools/bool/bool.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ const char* const Foam::pTraits<bool>::typeName = "bool";
 const bool Foam::pTraits<bool>::zero = false;
 const bool Foam::pTraits<bool>::one = true;
 
-const char* Foam::pTraits<bool>::componentNames[] = { "" };
+const char* const Foam::pTraits<bool>::componentNames[] = { "" };
 
 Foam::pTraits<bool>::pTraits(const bool& p)
 :
diff --git a/src/OpenFOAM/primitives/bools/bool/bool.H b/src/OpenFOAM/primitives/bools/bool/bool.H
index a7de5ecf469fa155f5d25b1de482f2284ab11793..19d8fb63de0805d39b462ca061241f2e55f04a07 100644
--- a/src/OpenFOAM/primitives/bools/bool/bool.H
+++ b/src/OpenFOAM/primitives/bools/bool/bool.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,6 +56,7 @@ bool readBool(Istream&);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #include "pTraits.H"
+#include "direction.H"
 
 namespace Foam
 {
@@ -73,18 +74,20 @@ public:
 
     // Member constants
 
-        enum
-        {
-            dim = 3,         //!< Dimensionality of space
-            rank = 0,        //!< Rank of bool is 0
-            nComponents = 1  //!< Number of components in bool is 1
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Rank of bool is 0
+        static const direction rank = 0;
+
+        //- Number of components in bool is 1
+        static const direction nComponents = 1;
 
 
     // Static data members
 
         static const char* const typeName;
-        static const char* componentNames[];
+        static const char* const componentNames[];
         static const bool zero;
         static const bool one;
 
diff --git a/src/OpenFOAM/primitives/bools/lists/boolList.H b/src/OpenFOAM/primitives/bools/lists/boolList.H
index d53189c5bf30cd960fb4d31237cc42d7943ca7c7..82c5ae27ab3bfd7338e45718a2c78a6f97e8c32a 100644
--- a/src/OpenFOAM/primitives/bools/lists/boolList.H
+++ b/src/OpenFOAM/primitives/bools/lists/boolList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ namespace Foam
     typedef UList<bool> boolUList;
 
     typedef List<bool> boolList;
-    typedef List<List<bool> > boolListList;
+    typedef List<List<bool>> boolListList;
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/complex/complex.H b/src/OpenFOAM/primitives/complex/complex.H
index 8113103e4eae5c6b1062c616734f99ad0c9f7416..debae297feda9aa071c99f0e504199aab68c6c0f 100644
--- a/src/OpenFOAM/primitives/complex/complex.H
+++ b/src/OpenFOAM/primitives/complex/complex.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,13 +126,13 @@ public:
 
     // Member operators
 
-        inline const complex& operator=(const complex&);
+        inline void operator=(const complex&);
         inline void operator+=(const complex&);
         inline void operator-=(const complex&);
         inline void operator*=(const complex&);
         inline void operator/=(const complex&);
 
-        inline const complex& operator=(const scalar);
+        inline void operator=(const scalar);
         inline void operator+=(const scalar);
         inline void operator-=(const scalar);
         inline void operator*=(const scalar);
diff --git a/src/OpenFOAM/primitives/complex/complexI.H b/src/OpenFOAM/primitives/complex/complexI.H
index 6d8a9152f9a4a3484620ef4b7ef38ad3a94a28de..0332b3d0d61f7facc7cad5821558c6727644244c 100644
--- a/src/OpenFOAM/primitives/complex/complexI.H
+++ b/src/OpenFOAM/primitives/complex/complexI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,11 +75,10 @@ inline complex complex::conjugate() const
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-inline const complex& complex::operator=(const complex& c)
+inline void complex::operator=(const complex& c)
 {
     re = c.re;
     im = c.im;
-    return *this;
 }
 
 
@@ -109,11 +108,10 @@ inline void complex::operator/=(const complex& c)
 }
 
 
-inline const complex& complex::operator=(const scalar s)
+inline void complex::operator=(const scalar s)
 {
     re = s;
     im = 0.0;
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/primitives/contiguous/contiguous.H b/src/OpenFOAM/primitives/contiguous/contiguous.H
index 3567ac85c68a7b759275909c6927db1c18a9f479..902af66dcaa1c6b5f7e64cafad979059794471a1 100644
--- a/src/OpenFOAM/primitives/contiguous/contiguous.H
+++ b/src/OpenFOAM/primitives/contiguous/contiguous.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,93 +60,93 @@ inline bool contiguous()                                   {return false;}
 template<>
 inline bool contiguous<bool>()                              {return true;}
 template<>
-inline bool contiguous<FixedList<bool, 2> >()               {return true;}
+inline bool contiguous<FixedList<bool, 2>>()               {return true;}
 template<>
-inline bool contiguous<Pair<bool> >()                       {return true;}
+inline bool contiguous<Pair<bool>>()                       {return true;}
 
 template<>
 inline bool contiguous<char>()                              {return true;}
 template<>
-inline bool contiguous<FixedList<char, 2> >()               {return true;}
+inline bool contiguous<FixedList<char, 2>>()               {return true;}
 template<>
-inline bool contiguous<Pair<char> >()                       {return true;}
+inline bool contiguous<Pair<char>>()                       {return true;}
 
 template<>
 inline bool contiguous<int8_t>()                            {return true;}
 template<>
-inline bool contiguous<FixedList<int8_t, 2> >()             {return true;}
+inline bool contiguous<FixedList<int8_t, 2>>()             {return true;}
 template<>
-inline bool contiguous<Pair<int8_t> >()                     {return true;}
+inline bool contiguous<Pair<int8_t>>()                     {return true;}
 
 template<>
 inline bool contiguous<uint8_t>()                           {return true;}
 template<>
-inline bool contiguous<FixedList<uint8_t, 2> >()            {return true;}
+inline bool contiguous<FixedList<uint8_t, 2>>()            {return true;}
 template<>
-inline bool contiguous<Pair<uint8_t> >()                    {return true;}
+inline bool contiguous<Pair<uint8_t>>()                    {return true;}
 
 template<>
 inline bool contiguous<int16_t>()                           {return true;}
 template<>
-inline bool contiguous<FixedList<int16_t, 2> >()            {return true;}
+inline bool contiguous<FixedList<int16_t, 2>>()            {return true;}
 template<>
-inline bool contiguous<Pair<int16_t> >()                    {return true;}
+inline bool contiguous<Pair<int16_t>>()                    {return true;}
 
 template<>
 inline bool contiguous<uint16_t>()                          {return true;}
 template<>
-inline bool contiguous<FixedList<uint16_t, 2> >()           {return true;}
+inline bool contiguous<FixedList<uint16_t, 2>>()           {return true;}
 template<>
-inline bool contiguous<Pair<uint16_t> >()                   {return true;}
+inline bool contiguous<Pair<uint16_t>>()                   {return true;}
 
 template<>
 inline bool contiguous<int32_t>()                           {return true;}
 template<>
-inline bool contiguous<FixedList<int32_t, 2> >()            {return true;}
+inline bool contiguous<FixedList<int32_t, 2>>()            {return true;}
 template<>
-inline bool contiguous<Pair<int32_t> >()                    {return true;}
+inline bool contiguous<Pair<int32_t>>()                    {return true;}
 
 template<>
 inline bool contiguous<uint32_t>()                          {return true;}
 template<>
-inline bool contiguous<FixedList<uint32_t, 2> >()           {return true;}
+inline bool contiguous<FixedList<uint32_t, 2>>()           {return true;}
 template<>
-inline bool contiguous<Pair<uint32_t> >()                   {return true;}
+inline bool contiguous<Pair<uint32_t>>()                   {return true;}
 
 template<>
 inline bool contiguous<int64_t>()                           {return true;}
 template<>
-inline bool contiguous<FixedList<int64_t, 2> >()            {return true;}
+inline bool contiguous<FixedList<int64_t, 2>>()            {return true;}
 template<>
-inline bool contiguous<Pair<int64_t> >()                    {return true;}
+inline bool contiguous<Pair<int64_t>>()                    {return true;}
 
 template<>
 inline bool contiguous<uint64_t>()                          {return true;}
 template<>
-inline bool contiguous<FixedList<uint64_t, 2> >()           {return true;}
+inline bool contiguous<FixedList<uint64_t, 2>>()           {return true;}
 template<>
-inline bool contiguous<Pair<uint64_t> >()                   {return true;}
+inline bool contiguous<Pair<uint64_t>>()                   {return true;}
 
 template<>
 inline bool contiguous<float>()                             {return true;}
 template<>
-inline bool contiguous<FixedList<float, 2> >()              {return true;}
+inline bool contiguous<FixedList<float, 2>>()              {return true;}
 template<>
-inline bool contiguous<Pair<float> >()                      {return true;}
+inline bool contiguous<Pair<float>>()                      {return true;}
 
 template<>
 inline bool contiguous<double>()                            {return true;}
 template<>
-inline bool contiguous<FixedList<double, 2> >()             {return true;}
+inline bool contiguous<FixedList<double, 2>>()             {return true;}
 template<>
-inline bool contiguous<Pair<double> >()                     {return true;}
+inline bool contiguous<Pair<double>>()                     {return true;}
 
 template<>
 inline bool contiguous<long double>()                       {return true;}
 template<>
-inline bool contiguous<FixedList<long double, 2> >()        {return true;}
+inline bool contiguous<FixedList<long double, 2>>()        {return true;}
 template<>
-inline bool contiguous<Pair<long double> >()                {return true;}
+inline bool contiguous<Pair<long double>>()                {return true;}
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C b/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C
index bac4117c78a440ca6fe21cf24c104c1769207594..cbb518b241c5121eb29f956524d5739e8e15805c 100644
--- a/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C
+++ b/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ Foam::demandDrivenEntry<Type>::demandDrivenEntry
 :
     dict_(dict),
     keyword_(keyword),
-    value_(pTraits<Type>::zero),
+    value_(Zero),
     stored_(false)
 {}
 
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C b/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C
deleted file mode 100644
index 72a120f4cefc3ab051641910326cd1d9a892975d..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSVIO.C
+++ /dev/null
@@ -1,98 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "DataEntry.H"
-
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
-
-template<class Type>
-Foam::Ostream& Foam::operator<<
-(
-    Ostream& os,
-    const CSV<Type>& tbl
-)
-{
-    if (os.format() == IOstream::ASCII)
-    {
-        os  << static_cast<const DataEntry<Type>& >(tbl)
-            << token::SPACE << tbl.nHeaderLine_
-            << token::SPACE << tbl.timeColumn_
-            << token::SPACE << tbl.componentColumns_
-            << token::SPACE << tbl.separator_
-            << token::SPACE << tbl.mergeSeparators_
-            << token::SPACE << tbl.fileName_;
-    }
-    else
-    {
-        os  << static_cast<const DataEntry<Type>& >(tbl);
-    }
-
-    // Check state of Ostream
-    os.check("Ostream& operator<<(Ostream&, const CSV<Type>&)");
-
-    return os;
-}
-
-
-template<class Type>
-void Foam::CSV<Type>::writeData(Ostream& os) const
-{
-    DataEntry<Type>::writeData(os);
-    os  << token::END_STATEMENT << nl;
-    os  << indent << word(this->name() + "Coeffs") << nl;
-    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
-
-    // Note: for TableBase write the dictionary entries it needs but not
-    // the values themselves
-    TableBase<Type>::writeEntries(os);
-
-    os.writeKeyword("nHeaderLine") << nHeaderLine_ << token::END_STATEMENT
-        << nl;
-    os.writeKeyword("refColumn") << refColumn_ << token::END_STATEMENT << nl;
-
-    // Force writing labelList in ascii
-    os.writeKeyword("componentColumns");
-    if (os.format() == IOstream::BINARY)
-    {
-        os.format(IOstream::ASCII);
-        os  << componentColumns_;
-        os.format(IOstream::BINARY);
-    }
-    else
-    {
-        os  << componentColumns_;
-    }
-    os  << token::END_STATEMENT << nl;
-
-    os.writeKeyword("separator") << string(separator_)
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("mergeSeparators") << mergeSeparators_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl;
-    os  << decrIndent << indent << token::END_BLOCK << endl;
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C b/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C
deleted file mode 100644
index 953328f031209945d02ba39ae33eb4eb0eca5151..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.C
+++ /dev/null
@@ -1,123 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "CompatibilityConstant.H"
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-template<class Type>
-Foam::CompatibilityConstant<Type>::CompatibilityConstant
-(
-    const word& entryName,
-    const dictionary& dict
-)
-:
-    DataEntry<Type>(entryName),
-    value_(pTraits<Type>::zero),
-    dimensions_(dimless)
-{
-    Istream& is(dict.lookup(entryName));
-
-    token firstToken(is);
-    if (firstToken.isWord())
-    {
-        token nextToken(is);
-        if (nextToken == token::BEGIN_SQR)
-        {
-            is.putBack(nextToken);
-            is >> dimensions_;
-            is >> value_;
-        }
-    }
-    else
-    {
-        is.putBack(firstToken);
-        is  >> value_;
-    }
-}
-
-
-template<class Type>
-Foam::CompatibilityConstant<Type>::CompatibilityConstant
-(
-    const CompatibilityConstant<Type>& cnst
-)
-:
-    DataEntry<Type>(cnst),
-    value_(cnst.value_),
-    dimensions_(cnst.dimensions_)
-{}
-
-
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-template<class Type>
-Foam::CompatibilityConstant<Type>::~CompatibilityConstant()
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-template<class Type>
-Type Foam::CompatibilityConstant<Type>::value(const scalar x) const
-{
-    return value_;
-}
-
-
-template<class Type>
-Type Foam::CompatibilityConstant<Type>::integrate
-(
-    const scalar x1,
-    const scalar x2
-) const
-{
-    return (x2 - x1)*value_;
-}
-
-
-template<class Type>
-Foam::dimensioned<Type> Foam::CompatibilityConstant<Type>::
-dimValue(const scalar x) const
-{
-    return dimensioned<Type>("dimensionedValue", dimensions_, value_);
-}
-
-
-template<class Type>
-Foam::dimensioned<Type> Foam::CompatibilityConstant<Type>::dimIntegrate
-(
-    const scalar x1, const scalar x2
-) const
-{
-    return dimensioned<Type>("dimensionedValue", dimensions_, (x2-x1)*value_);
-}
-
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
-
-#include "CompatibilityConstantIO.C"
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.H b/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.H
deleted file mode 100644
index 8ce8d28170aee12e411870021607cb745e4cee44..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstant.H
+++ /dev/null
@@ -1,157 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Class
-    Foam::CompatibilityConstant
-
-Description
-    Templated basic entry that holds a constant value for backwards
-    compatibility (when DataEntry type is not present)
-
-    Usage - for entry \<entryName\> having the value <value>:
-    \verbatim
-        <entryName>    <value>
-    \endverbatim
-
-SourceFiles
-    CompatibilityConstant.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef CompatibilityConstant_H
-#define CompatibilityConstant_H
-
-#include "DataEntry.H"
-#include "dimensionSet.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-template<class Type>
-class CompatibilityConstant;
-
-template<class Type>
-Ostream& operator<<(Ostream&, const CompatibilityConstant<Type>&);
-
-/*---------------------------------------------------------------------------*\
-                   Class CompatibilityConstant Declaration
-\*---------------------------------------------------------------------------*/
-
-template<class Type>
-class CompatibilityConstant
-:
-    public DataEntry<Type>
-{
-    // Private data
-
-        //- Constant value
-        Type value_;
-
-        //- The dimension set
-        dimensionSet dimensions_;
-
-
-    // Private Member Functions
-
-        //- Disallow default bitwise assignment
-        void operator=(const CompatibilityConstant<Type>&);
-
-
-public:
-
-    // Runtime type information
-    TypeName("CompatibilityConstant");
-
-
-    // Constructors
-
-        //- Construct from entry name and Istream
-        CompatibilityConstant(const word& entryName, const dictionary& dict);
-
-        //- Copy constructor
-        CompatibilityConstant(const CompatibilityConstant<Type>& cnst);
-
-        //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
-        {
-            return tmp<DataEntry<Type> >
-            (
-                new CompatibilityConstant<Type>(*this)
-            );
-        }
-
-
-    //- Destructor
-    virtual ~CompatibilityConstant();
-
-
-    // Member Functions
-
-        //- Return constant value
-        Type value(const scalar) const;
-
-        //- Integrate between two values
-        Type integrate(const scalar x1, const scalar x2) const;
-
-        //- Return dimensioned constant value
-        dimensioned<Type> dimValue(const scalar) const;
-
-        //- Integrate between two values and return dimensioned type
-        dimensioned<Type> dimIntegrate
-        (
-            const scalar x1,
-            const scalar x2
-        ) const;
-
-
-    // I/O
-
-        //- Ostream Operator
-        friend Ostream& operator<< <Type>
-        (
-            Ostream& os,
-            const CompatibilityConstant<Type>& cnst
-        );
-
-        //- Write in dictionary format
-        virtual void writeData(Ostream& os) const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#ifdef NoRepository
-#   include "CompatibilityConstant.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Constant/ConstantIO.C b/src/OpenFOAM/primitives/functions/DataEntry/Constant/ConstantIO.C
deleted file mode 100644
index c25e9b9f4c054cdac0186421f12db71a8e92e450..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/Constant/ConstantIO.C
+++ /dev/null
@@ -1,71 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "Constant.H"
-
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
-
-template<class Type>
-Foam::Ostream& Foam::operator<<
-(
-    Ostream& os,
-    const Constant<Type>& cnst
-)
-{
-    if (os.format() == IOstream::ASCII)
-    {
-        os  << static_cast<const DataEntry<Type>& >(cnst)
-            << token::SPACE << cnst.value_;
-    }
-    else
-    {
-        os  << static_cast<const DataEntry<Type>& >(cnst);
-        os.write
-        (
-            reinterpret_cast<const char*>(&cnst.value_),
-            sizeof(cnst.value_)
-        );
-    }
-
-    // Check state of Ostream
-    os.check
-    (
-        "Ostream& operator<<(Ostream&, const Constant<Type>&)"
-    );
-
-    return os;
-}
-
-
-template<class Type>
-void Foam::Constant<Type>::writeData(Ostream& os) const
-{
-    DataEntry<Type>::writeData(os);
-
-    os  << token::SPACE << value_ << token::END_STATEMENT << nl;
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntryIO.C b/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntryIO.C
deleted file mode 100644
index af6dacdb487e3c4c815cefcd990747b4df512b5b..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntryIO.C
+++ /dev/null
@@ -1,71 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "PolynomialEntry.H"
-
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
-
-template<class Type>
-Foam::Ostream& Foam::operator<<
-(
-    Ostream& os,
-    const PolynomialEntry<Type>& poly
-)
-{
-    if (os.format() == IOstream::ASCII)
-    {
-        os  << static_cast<const DataEntry<Type>& >(poly)
-            << token::SPACE << poly.coeffs_;
-    }
-    else
-    {
-        os  << static_cast<const DataEntry<Type>& >(poly);
-        os.write
-        (
-            reinterpret_cast<const char*>(&poly.coeffs_),
-            sizeof(poly.coeffs_)
-        );
-    }
-
-    // Check state of Ostream
-    os.check
-    (
-        "Ostream& operator<<(Ostream&, const PolynomialEntry&)"
-    );
-
-    return os;
-}
-
-
-template<class Type>
-void Foam::PolynomialEntry<Type>::writeData(Ostream& os) const
-{
-    DataEntry<Type>::writeData(os);
-
-    os  << nl << indent << coeffs_ << token::END_STATEMENT << nl;
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBaseIO.C b/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBaseIO.C
deleted file mode 100644
index d4f608b8ab270ad6a89f08e623edbcf52d7376a0..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBaseIO.C
+++ /dev/null
@@ -1,87 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "DataEntry.H"
-
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
-
-template<class Type>
-Foam::Ostream& Foam::operator<<
-(
-    Ostream& os,
-    const TableBase<Type>& tbl
-)
-{
-    os  << static_cast<const DataEntry<Type>&>(tbl);
-
-    if (os.format() == IOstream::ASCII)
-    {
-         os << token::SPACE << tbl.table_;
-    }
-    else
-    {
-        os.write
-        (
-            reinterpret_cast<const char*>(&tbl.table_),
-            tbl.table_.byteSize()
-        );
-    }
-
-    // Check state of Ostream
-    os.check
-    (
-        "Ostream& operator<<(Ostream&, const TableBase<Type>&, const bool)"
-    );
-
-    return os;
-}
-
-
-template<class Type>
-void Foam::TableBase<Type>::writeData(Ostream& os) const
-{
-    DataEntry<Type>::writeData(os);
-    os  << nl << indent << table_ << token::END_STATEMENT << nl;
-    writeEntries(os);
-}
-
-
-template<class Type>
-void Foam::TableBase<Type>::writeEntries(Ostream& os) const
-{
-    if (boundsHandling_ != CLAMP)
-    {
-        os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_)
-            << token::END_STATEMENT << nl;
-    }
-    if (interpolationScheme_ != "linear")
-    {
-        os.writeKeyword("interpolationScheme") << interpolationScheme_
-            << token::END_STATEMENT << nl;
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFileIO.C b/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFileIO.C
deleted file mode 100644
index 5b074027fcbd72a4fd1a1ad08828b71b64cee7a8..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFileIO.C
+++ /dev/null
@@ -1,48 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "DataEntry.H"
-
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
-
-template<class Type>
-void Foam::TableFile<Type>::writeData(Ostream& os) const
-{
-    DataEntry<Type>::writeData(os);
-
-    os  << token::END_STATEMENT << nl
-        << indent << word(this->name() + "Coeffs") << nl
-        << indent << token::BEGIN_BLOCK << nl << incrIndent;
-
-    // Note: for TableBase write the dictionary entries it needs but not
-    // the values themselves
-    TableBase<Type>::writeEntries(os);
-
-    os.writeKeyword("fileName")<< fName_ << token::END_STATEMENT << nl;
-    os  << decrIndent << indent << token::END_BLOCK << endl;
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/makeDataEntries.C b/src/OpenFOAM/primitives/functions/DataEntry/makeDataEntries.C
deleted file mode 100644
index 0289025c0d4685130a933727bc46676a4a002f02..0000000000000000000000000000000000000000
--- a/src/OpenFOAM/primitives/functions/DataEntry/makeDataEntries.C
+++ /dev/null
@@ -1,93 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "CompatibilityConstant.H"
-#include "Constant.H"
-#include "PolynomialEntry.H"
-#include "CSV.H"
-#include "DataEntry.H"
-#include "Table.H"
-#include "TableFile.H"
-
-#include "label.H"
-#include "scalar.H"
-#include "vector.H"
-#include "sphericalTensor.H"
-#include "symmTensor.H"
-#include "tensor.H"
-
-namespace Foam
-{
-    makeDataEntry(label);
-    makeDataEntryType(CompatibilityConstant, label);
-    makeDataEntryType(Constant, label);
-    //makeDataEntryType(PolynomialEntry, label);
-    makeDataEntryType(CSV, label);
-    makeDataEntryType(Table, label);
-    makeDataEntryType(TableFile, label);
-
-    makeDataEntry(scalar);
-    makeDataEntryType(CompatibilityConstant, scalar);
-    makeDataEntryType(Constant, scalar);
-    makeDataEntryType(PolynomialEntry, scalar);
-    makeDataEntryType(CSV, scalar);
-    makeDataEntryType(Table, scalar);
-    makeDataEntryType(TableFile, scalar);
-
-    makeDataEntry(vector);
-    makeDataEntryType(CompatibilityConstant, vector);
-    makeDataEntryType(Constant, vector);
-    makeDataEntryType(PolynomialEntry, vector);
-    makeDataEntryType(CSV, vector);
-    makeDataEntryType(Table, vector);
-    makeDataEntryType(TableFile, vector);
-
-    makeDataEntry(sphericalTensor);
-    makeDataEntryType(CompatibilityConstant, sphericalTensor);
-    makeDataEntryType(Constant, sphericalTensor);
-    makeDataEntryType(PolynomialEntry, sphericalTensor);
-    makeDataEntryType(CSV, sphericalTensor);
-    makeDataEntryType(Table, sphericalTensor);
-    makeDataEntryType(TableFile, sphericalTensor);
-
-    makeDataEntry(symmTensor);
-    makeDataEntryType(CompatibilityConstant, symmTensor);
-    makeDataEntryType(Constant, symmTensor);
-    makeDataEntryType(PolynomialEntry, symmTensor);
-    makeDataEntryType(CSV, symmTensor);
-    makeDataEntryType(Table, symmTensor);
-    makeDataEntryType(TableFile, symmTensor);
-
-    makeDataEntry(tensor);
-    makeDataEntryType(CompatibilityConstant, tensor);
-    makeDataEntryType(Constant, tensor);
-    makeDataEntryType(PolynomialEntry, tensor);
-    makeDataEntryType(CSV, tensor);
-    makeDataEntryType(Table, tensor);
-    makeDataEntryType(TableFile, tensor);
-}
-
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
similarity index 66%
rename from src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C
rename to src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
index 4f3d1b12d3f12450e2c112d2d4a8733d23a4e42e..513298f8c76ece673226b0a403129ab5070ef74f 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.C
+++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,63 +29,67 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-namespace Foam
+template<>
+Foam::label Foam::Function1Types::CSV<Foam::label>::readValue
+(
+    const List<string>& splitted
+)
 {
-    template<>
-    label CSV<label>::readValue(const List<string>& splitted)
+    if (componentColumns_[0] >= splitted.size())
     {
-        if (componentColumns_[0] >= splitted.size())
-        {
-            FatalErrorInFunction
-                << "No column " << componentColumns_[0] << " in "
-                << splitted << endl
-                << exit(FatalError);
-        }
+        FatalErrorInFunction
+            << "No column " << componentColumns_[0] << " in "
+            << splitted << endl
+            << exit(FatalError);
+    }
+
+    return readLabel(IStringStream(splitted[componentColumns_[0]])());
+}
+
 
-        return readLabel(IStringStream(splitted[componentColumns_[0]])());
+template<>
+Foam::scalar Foam::Function1Types::CSV<Foam::scalar>::readValue
+(
+    const List<string>& splitted
+)
+{
+    if (componentColumns_[0] >= splitted.size())
+    {
+        FatalErrorInFunction
+            << "No column " << componentColumns_[0] << " in "
+            << splitted << endl
+            << exit(FatalError);
     }
 
-    template<>
-    scalar CSV<scalar>::readValue(const List<string>& splitted)
+    return readScalar(IStringStream(splitted[componentColumns_[0]])());
+}
+
+
+template<class Type>
+Type Foam::Function1Types::CSV<Type>::readValue(const List<string>& splitted)
+{
+    Type result;
+
+    for (label i = 0; i < pTraits<Type>::nComponents; i++)
     {
-        if (componentColumns_[0] >= splitted.size())
+        if (componentColumns_[i] >= splitted.size())
         {
             FatalErrorInFunction
-                << "No column " << componentColumns_[0] << " in "
+            << "No column " << componentColumns_[i] << " in "
                 << splitted << endl
                 << exit(FatalError);
         }
 
-        return readScalar(IStringStream(splitted[componentColumns_[0]])());
+        result[i] =
+        readScalar(IStringStream(splitted[componentColumns_[i]])());
     }
 
-
-    template<class Type>
-    Type CSV<Type>::readValue(const List<string>& splitted)
-    {
-        Type result;
-
-        for (label i = 0; i < pTraits<Type>::nComponents; i++)
-        {
-            if (componentColumns_[i] >= splitted.size())
-            {
-                FatalErrorInFunction
-                    << "No column " << componentColumns_[i] << " in "
-                    << splitted << endl
-                    << exit(FatalError);
-            }
-
-            result[i] =
-                readScalar(IStringStream(splitted[componentColumns_[i]])());
-        }
-
-        return result;
-    }
+    return result;
 }
 
 
 template<class Type>
-void Foam::CSV<Type>::read()
+void Foam::Function1Types::CSV<Type>::read()
 {
     fileName expandedFile(fName_);
     IFstream is(expandedFile.expand());
@@ -97,7 +101,7 @@ void Foam::CSV<Type>::read()
             << exit(FatalIOError);
     }
 
-    DynamicList<Tuple2<scalar, Type> > values;
+    DynamicList<Tuple2<scalar, Type>> values;
 
     // skip header
     for (label i = 0; i < nHeaderLine_; i++)
@@ -196,7 +200,7 @@ void Foam::CSV<Type>::read()
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::CSV<Type>::CSV
+Foam::Function1Types::CSV<Type>::CSV
 (
     const word& entryName,
     const dictionary& dict,
@@ -227,7 +231,7 @@ Foam::CSV<Type>::CSV
 
 
 template<class Type>
-Foam::CSV<Type>::CSV(const CSV<Type>& tbl)
+Foam::Function1Types::CSV<Type>::CSV(const CSV<Type>& tbl)
 :
     TableBase<Type>(tbl),
     nHeaderLine_(tbl.nHeaderLine_),
@@ -242,22 +246,56 @@ Foam::CSV<Type>::CSV(const CSV<Type>& tbl)
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::CSV<Type>::~CSV()
+Foam::Function1Types::CSV<Type>::~CSV()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-const Foam::fileName& Foam::CSV<Type>::fName() const
+const Foam::fileName& Foam::Function1Types::CSV<Type>::fName() const
 {
     return fName_;
 }
 
 
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
-
-#include "CSVIO.C"
+template<class Type>
+void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
+{
+    Function1<Type>::writeData(os);
+    os  << token::END_STATEMENT << nl;
+    os  << indent << word(this->name() + "Coeffs") << nl;
+    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
+
+    // Note: for TableBase write the dictionary entries it needs but not
+    // the values themselves
+    TableBase<Type>::writeEntries(os);
+
+    os.writeKeyword("nHeaderLine") << nHeaderLine_ << token::END_STATEMENT
+        << nl;
+    os.writeKeyword("refColumn") << refColumn_ << token::END_STATEMENT << nl;
+
+    // Force writing labelList in ascii
+    os.writeKeyword("componentColumns");
+    if (os.format() == IOstream::BINARY)
+    {
+        os.format(IOstream::ASCII);
+        os  << componentColumns_;
+        os.format(IOstream::BINARY);
+    }
+    else
+    {
+        os  << componentColumns_;
+    }
+    os  << token::END_STATEMENT << nl;
+
+    os.writeKeyword("separator") << string(separator_)
+        << token::END_STATEMENT << nl;
+    os.writeKeyword("mergeSeparators") << mergeSeparators_
+        << token::END_STATEMENT << nl;
+    os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl;
+    os  << decrIndent << indent << token::END_BLOCK << endl;
+}
 
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.H b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.H
similarity index 86%
rename from src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.H
rename to src/OpenFOAM/primitives/functions/Function1/CSV/CSV.H
index 1d0b0620e906006e0a33208ca14c07223b6fc9e0..97e0047a2b70a422c3f4e5b59aeaafa050b3c515 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/CSV/CSV.H
+++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::CSV
+    Foam::Function1Types::CSV
 
 Description
     Templated CSV container data entry.  Reference column is always a scalar,
@@ -51,7 +51,7 @@ SourceFiles
 #ifndef CSV_H
 #define CSV_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "TableBase.H"
 #include "Tuple2.H"
 #include "labelList.H"
@@ -61,16 +61,8 @@ SourceFiles
 
 namespace Foam
 {
-
-template<class Type>
-class CSV;
-
-template<class Type>
-Ostream& operator<<
-(
-    Ostream&,
-    const CSV<Type>&
-);
+namespace Function1Types
+{
 
 /*---------------------------------------------------------------------------*\
                            Class CSV Declaration
@@ -137,9 +129,9 @@ public:
         CSV(const CSV<Type>& tbl);
 
         //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
+        virtual tmp<Function1<Type>> clone() const
         {
-            return tmp<DataEntry<Type> >(new CSV<Type>(*this));
+            return tmp<Function1<Type>>(new CSV<Type>(*this));
         }
 
 
@@ -149,34 +141,30 @@ public:
 
     // Member Functions
 
-        // Access
-
-            //- Return const access to the file name
-            virtual const fileName& fName() const;
-
-
-    // I/O
-
-        //- Ostream Operator
-        friend Ostream& operator<< <Type>
-        (
-            Ostream& os,
-            const CSV<Type>& cnst
-        );
+        //- Return const access to the file name
+        virtual const fileName& fName() const;
 
         //- Write in dictionary format
         virtual void writeData(Ostream& os) const;
 };
 
 
+template<>
+label CSV<label>::readValue(const List<string>& splitted);
+
+template<>
+Foam::scalar CSV<scalar>::readValue(const List<string>& splitted);
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace Function1Types
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CSV.C"
+    #include "CSV.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.C b/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C
similarity index 55%
rename from src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.C
rename to src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C
index e07a0d182a99057cf1697e0229380c9da957fff7..883a05d00a0d1e5dc86c99f524236d4c4b19c154 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -28,99 +28,87 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::Constant<Type>::Constant(const word& entryName, const dictionary& dict)
+Foam::Function1Types::Constant<Type>::Constant
+(
+    const word& entryName,
+    const Type& value
+)
+:
+    Function1<Type>(entryName),
+    value_(value)
+{}
+
+
+template<class Type>
+Foam::Function1Types::Constant<Type>::Constant
+(
+    const word& entryName,
+    const dictionary& dict
+)
 :
-    DataEntry<Type>(entryName),
-    value_(pTraits<Type>::zero),
-    dimensions_(dimless)
+    Function1<Type>(entryName),
+    value_(Zero)
 {
     Istream& is(dict.lookup(entryName));
     word entryType(is);
-    token firstToken(is);
-    if (firstToken.isWord())
-    {
-        token nextToken(is);
-        if (nextToken == token::BEGIN_SQR)
-        {
-            is.putBack(nextToken);
-            is >> dimensions_;
-            is >> value_;
-        }
-    }
-    else
-    {
-        is.putBack(firstToken);
-        is  >> value_;
-    }
+    is  >> value_;
 }
 
 
 template<class Type>
-Foam::Constant<Type>::Constant
+Foam::Function1Types::Constant<Type>::Constant
 (
     const word& entryName,
-    const Type& value,
-    const dimensionSet& dimensions
+    Istream& is
 )
 :
-    DataEntry<Type>(entryName),
-    value_(value),
-    dimensions_(dimensions)
+    Function1<Type>(entryName),
+    value_(pTraits<Type>(is))
 {}
 
 
 template<class Type>
-Foam::Constant<Type>::Constant(const Constant<Type>& cnst)
+Foam::Function1Types::Constant<Type>::Constant(const Constant<Type>& cnst)
 :
-    DataEntry<Type>(cnst),
-    value_(cnst.value_),
-    dimensions_(cnst.dimensions_)
+    Function1<Type>(cnst),
+    value_(cnst.value_)
 {}
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::Constant<Type>::~Constant()
+Foam::Function1Types::Constant<Type>::~Constant()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Type Foam::Constant<Type>::value(const scalar x) const
+Type Foam::Function1Types::Constant<Type>::value(const scalar x) const
 {
     return value_;
 }
 
 
 template<class Type>
-Type Foam::Constant<Type>::integrate(const scalar x1, const scalar x2) const
+Type Foam::Function1Types::Constant<Type>::integrate
+(
+    const scalar x1,
+    const scalar x2
+) const
 {
     return (x2 - x1)*value_;
 }
 
 
 template<class Type>
-Foam::dimensioned<Type> Foam::Constant<Type>::dimValue(const scalar x) const
+void Foam::Function1Types::Constant<Type>::writeData(Ostream& os) const
 {
-    return dimensioned<Type>("dimensionedValue", dimensions_, value_);
-}
+    Function1<Type>::writeData(os);
 
-
-template<class Type>
-Foam::dimensioned<Type> Foam::Constant<Type>::dimIntegrate
-(
-    const scalar x1, const scalar x2
-) const
-{
-    return dimensioned<Type>("dimensionedValue", dimensions_, (x2-x1)*value_);
+    os  << token::SPACE << value_ << token::END_STATEMENT << nl;
 }
 
 
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
-
-#include "ConstantIO.C"
-
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H b/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.H
similarity index 75%
rename from src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H
rename to src/OpenFOAM/primitives/functions/Function1/Constant/Constant.H
index 842f84770da596538ba3d295ea01980343935487..ee0279b23ece3491b1741ff56d7806716d3f519f 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/Constant/Constant.H
+++ b/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::Constant
+    Foam::Function1Types::Constant
 
 Description
     Templated basic entry that holds a constant value.
@@ -40,19 +40,14 @@ SourceFiles
 #ifndef Constant_H
 #define Constant_H
 
-#include "DataEntry.H"
-#include "dimensionSet.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-template<class Type>
-class Constant;
-
-template<class Type>
-Ostream& operator<<(Ostream&, const Constant<Type>&);
+namespace Function1Types
+{
 
 /*---------------------------------------------------------------------------*\
                            Class Constant Declaration
@@ -61,16 +56,13 @@ Ostream& operator<<(Ostream&, const Constant<Type>&);
 template<class Type>
 class Constant
 :
-    public DataEntry<Type>
+    public Function1<Type>
 {
     // Private data
 
         //- Constant value
         Type value_;
 
-        //- The dimension set
-        dimensionSet dimensions_;
-
 
     // Private Member Functions
 
@@ -90,20 +82,24 @@ public:
         Constant
         (
             const word& entryName,
-            const Type& value,
-            const dimensionSet& dimensions = dimless
+            const Type& value
         );
 
         //- Construct from entry name and dictionary
         Constant(const word& entryName, const dictionary& dict);
 
+        //- Construct from entry name and Istream
+        //  Reads the constant value without the Function1 type
+        //  for backward compatibility
+        Constant(const word& entryName, Istream& is);
+
         //- Copy constructor
         Constant(const Constant<Type>& cnst);
 
         //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
+        virtual tmp<Function1<Type>> clone() const
         {
-            return tmp<DataEntry<Type> >(new Constant<Type>(*this));
+            return tmp<Function1<Type>>(new Constant<Type>(*this));
         }
 
 
@@ -119,26 +115,6 @@ public:
         //- Integrate between two values
         Type integrate(const scalar x1, const scalar x2) const;
 
-        //- Return dimensioned constant value
-        dimensioned<Type> dimValue(const scalar) const;
-
-        //- Integrate between two values and return dimensioned type
-        dimensioned<Type> dimIntegrate
-        (
-            const scalar x1,
-            const scalar x2
-        ) const;
-
-
-    // I/O
-
-        //- Ostream Operator
-        friend Ostream& operator<< <Type>
-        (
-            Ostream& os,
-            const Constant<Type>& cnst
-        );
-
         //- Write in dictionary format
         virtual void writeData(Ostream& os) const;
 };
@@ -146,12 +122,14 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace Function1Types
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Constant.C"
+    #include "Constant.C"
+    #include "Function1New.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntry.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C
similarity index 50%
rename from src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntry.C
rename to src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C
index 51cea621853872210b46af37f4b4df13b569f159..bccc14d7f5ebfd51d17ae823d881ad60db63736b 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntry.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,23 +23,22 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Time.H"
 
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::DataEntry<Type>::DataEntry(const word& entryName)
+Foam::Function1<Type>::Function1(const word& entryName)
 :
-    refCount(),
     name_(entryName)
 {}
 
 
 template<class Type>
-Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de)
+Foam::Function1<Type>::Function1(const Function1<Type>& de)
 :
-    refCount(),
+    tmp<Function1<Type>>::refCount(),
     name_(de.name_)
 {}
 
@@ -47,52 +46,50 @@ Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de)
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::DataEntry<Type>::~DataEntry()
+Foam::Function1<Type>::~Function1()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-const Foam::word& Foam::DataEntry<Type>::name() const
+const Foam::word& Foam::Function1<Type>::name() const
 {
     return name_;
 }
 
 
 template<class Type>
-void Foam::DataEntry<Type>::convertTimeBase(const Time&)
-{
-    // do nothing
-}
+void Foam::Function1<Type>::convertTimeBase(const Time&)
+{}
 
 
 template<class Type>
-Type Foam::DataEntry<Type>::value(const scalar x) const
+Type Foam::Function1<Type>::value(const scalar x) const
 {
     NotImplemented;
 
-    return pTraits<Type>::zero;
+    return Zero;
 }
 
 
 template<class Type>
-Type Foam::DataEntry<Type>::integrate(const scalar x1, const scalar x2) const
+Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const
 {
     NotImplemented;
 
-    return pTraits<Type>::zero;
+    return Zero;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::DataEntry<Type>::value
+Foam::tmp<Foam::Field<Type>> Foam::Function1<Type>::value
 (
     const scalarField& x
 ) const
 {
-    tmp<Field<Type> > tfld(new Field<Type>(x.size()));
-    Field<Type>& fld = tfld();
+    tmp<Field<Type>> tfld(new Field<Type>(x.size()));
+    Field<Type>& fld = tfld.ref();
 
     forAll(x, i)
     {
@@ -103,14 +100,14 @@ Foam::tmp<Foam::Field<Type> > Foam::DataEntry<Type>::value
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::DataEntry<Type>::integrate
+Foam::tmp<Foam::Field<Type>> Foam::Function1<Type>::integrate
 (
     const scalarField& x1,
     const scalarField& x2
 ) const
 {
-    tmp<Field<Type> > tfld(new Field<Type>(x1.size()));
-    Field<Type>& fld = tfld();
+    tmp<Field<Type>> tfld(new Field<Type>(x1.size()));
+    Field<Type>& fld = tfld.ref();
 
     forAll(x1, i)
     {
@@ -120,81 +117,33 @@ Foam::tmp<Foam::Field<Type> > Foam::DataEntry<Type>::integrate
 }
 
 
-
 template<class Type>
-Foam::dimensioned<Type> Foam::DataEntry<Type>::dimValue(const scalar x) const
+void Foam::Function1<Type>::writeData(Ostream& os) const
 {
-    NotImplemented;
-
-    return dimensioned<Type>("zero", dimless, pTraits<Type>::zero);
+    os.writeKeyword(name_) << type();
 }
 
 
-template<class Type>
-Foam::dimensioned<Type> Foam::DataEntry<Type>::dimIntegrate
-(
-    const scalar x1,
-    const scalar x2
-) const
-{
-    NotImplemented;
-
-    return dimensioned<Type>("zero", dimless, pTraits<Type>::zero);
-}
-
-
-template<class Type>
-Foam::tmp<Foam::Field<Foam::dimensioned<Type> > >
-Foam::DataEntry<Type>::dimValue
-(
-    const scalarField& x
-) const
-{
-
-    tmp<Field<dimensioned<Type> > > tfld
-    (
-        new Field<dimensioned<Type> >
-        (
-            x.size(),
-            dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
-        )
-    );
-
-    Field<dimensioned<Type> >& fld = tfld();
-
-    forAll(x, i)
-    {
-        fld[i] = this->dimValue(x[i]);
-    }
-    return tfld;
-}
-
+// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Foam::dimensioned<Type> > >
-Foam::DataEntry<Type>::dimIntegrate
+Foam::Ostream& Foam::operator<<
 (
-    const scalarField& x1,
-    const scalarField& x2
-) const
+    Ostream& os,
+    const Function1<Type>& f1
+)
 {
-    tmp<Field<dimensioned<Type> > > tfld
+    // Check state of Ostream
+    os.check
     (
-        new Field<dimensioned<Type> >(x1.size())
+        "Ostream& operator<<(Ostream&, const Function1<Type>&)"
     );
 
-    Field<dimensioned<Type> >& fld = tfld();
+    os  << f1.name_;
+    f1.writeData(os);
 
-    forAll(x1, i)
-    {
-        fld[i] = this->dimIntegrate(x1[i], x2[i]);
-    }
-    return tfld;
+    return os;
 }
 
 
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
-
-#include "DataEntryIO.C"
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntry.H b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H
similarity index 64%
rename from src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntry.H
rename to src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H
index a9b1686d5871a1193c4eed0d3414e664cfcb20f1..fb71134add09ba2c5a94b9b7a7a7b8586a6b9732 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntry.H
+++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::DataEntry
+    Foam::Function1
 
 Description
     Top level data entry class for use in dictionaries. Provides a mechanism
@@ -31,47 +31,42 @@ Description
     limits.
 
 SourceFiles
-    DataEntry.C
-    DataEntryNew.C
+    Function1.C
+    Function1New.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef DataEntry_H
-#define DataEntry_H
+#ifndef Function1_H
+#define Function1_H
 
 #include "dictionary.H"
 #include "Field.H"
-#include "dimensionedType.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-class Time;
 
-template<class Type>
-class DataEntry;
+// Forward declarations
+class Time;
 
-template<class Type>
-Ostream& operator<<
-(
-    Ostream&,
-    const DataEntry<Type>&
-);
+// Forward declaration of friend functions and operators
+template<class Type> class Function1;
+template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&);
 
 /*---------------------------------------------------------------------------*\
-                         Class DataEntry Declaration
+                         Class Function1 Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class DataEntry
+class Function1
 :
-    public refCount
+    public tmp<Function1<Type>>::refCount
 {
     // Private Member Functions
 
         //- Disallow default bitwise assignment
-        void operator=(const DataEntry<Type>&);
+        void operator=(const Function1<Type>&);
 
 
 protected:
@@ -85,13 +80,13 @@ protected:
 public:
 
     //- Runtime type information
-    TypeName("DataEntry")
+    TypeName("Function1")
 
     //- Declare runtime constructor selection table
     declareRunTimeSelectionTable
     (
         autoPtr,
-        DataEntry,
+        Function1,
         dictionary,
         (
             const word& entryName,
@@ -104,20 +99,20 @@ public:
     // Constructor
 
         //- Construct from entry name
-        DataEntry(const word& entryName);
+        Function1(const word& entryName);
 
         //- Copy constructor
-        DataEntry(const DataEntry<Type>& de);
+        Function1(const Function1<Type>& de);
 
         //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
+        virtual tmp<Function1<Type>> clone() const
         {
-            return tmp<DataEntry<Type> >(new DataEntry<Type>(*this));
+            return tmp<Function1<Type>>(new Function1<Type>(*this));
         }
 
 
     //- Selector
-    static autoPtr<DataEntry<Type> > New
+    static autoPtr<Function1<Type>> New
     (
         const word& entryName,
         const dictionary& dict
@@ -125,7 +120,7 @@ public:
 
 
     //- Destructor
-    virtual ~DataEntry();
+    virtual ~Function1();
 
 
     // Member Functions
@@ -148,37 +143,13 @@ public:
             virtual Type value(const scalar x) const;
 
             //- Return value as a function of (scalar) independent variable
-            virtual tmp<Field<Type> > value(const scalarField& x) const;
+            virtual tmp<Field<Type>> value(const scalarField& x) const;
 
             //- Integrate between two (scalar) values
             virtual Type integrate(const scalar x1, const scalar x2) const;
 
             //- Integrate between two (scalar) values
-            virtual tmp<Field<Type> > integrate
-            (
-                const scalarField& x1,
-                const scalarField& x2
-            ) const;
-
-            //- Return dimensioned type
-            virtual dimensioned<Type> dimValue(const scalar x) const;
-
-            //- Return dimensioned type as a function of (scalar)
-            virtual tmp<Field<dimensioned<Type> > > dimValue
-            (
-                const scalarField& x
-            ) const;
-
-            //- Integrate between two scalars and return a dimensioned type
-            virtual dimensioned<Type> dimIntegrate
-            (
-                const scalar x1,
-                const scalar x2
-            ) const;
-
-            //- Integrate between two scalar fields and return a field of
-            //  dimensioned type
-            virtual tmp<Field<dimensioned<Type> > > dimIntegrate
+            virtual tmp<Field<Type>> integrate
             (
                 const scalarField& x1,
                 const scalarField& x2
@@ -191,7 +162,7 @@ public:
             friend Ostream& operator<< <Type>
             (
                 Ostream& os,
-                const DataEntry<Type>& de
+                const Function1<Type>& de
             );
 
             //- Write in dictionary format
@@ -205,30 +176,30 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeDataEntry(Type)                                                   \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(DataEntry<Type>, 0);                  \
-                                                                              \
-    defineTemplateRunTimeSelectionTable                                       \
-    (                                                                         \
-        DataEntry<Type>,                                                      \
-        dictionary                                                            \
+#define makeFunction1(Type)                                                    \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0);                   \
+                                                                               \
+    defineTemplateRunTimeSelectionTable                                        \
+    (                                                                          \
+        Function1<Type>,                                                       \
+        dictionary                                                             \
     );
 
 
-#define makeDataEntryType(SS, Type)                                           \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                         \
-                                                                              \
-    DataEntry<Type>::adddictionaryConstructorToTable<SS<Type> >               \
+#define makeFunction1Type(SS, Type)                                            \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(Function1Types::SS<Type>, 0);          \
+                                                                               \
+    Function1<Type>::adddictionaryConstructorToTable<Function1Types::SS<Type>> \
         add##SS##Type##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DataEntry.C"
-#   include "DataEntryNew.C"
+    #include "Function1.C"
+    #include "Constant.H"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryFwd.H b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1Fwd.H
similarity index 76%
rename from src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryFwd.H
rename to src/OpenFOAM/primitives/functions/Function1/Function1/Function1Fwd.H
index 326a2a425902c5c4ee7ae126d8960b69c41cd7c7..6e3b14ba0c064a97134e82fe2841bee31f494f8a 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryFwd.H
+++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1Fwd.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,10 +23,10 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef DataEntryFws_H
-#define DataEntryFws_H
+#ifndef Function1Fws_H
+#define Function1Fws_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "vector.H"
 #include "symmTensor.H"
 #include "sphericalTensor.H"
@@ -36,12 +36,12 @@ License
 
 namespace Foam
 {
-    typedef DataEntry<label> labelDataEntry;
-    typedef DataEntry<scalar> scalarDataEntry;
-    typedef DataEntry<vector> vectorDataEntry;
-    typedef DataEntry<symmTensor> symmTensorDataEntry;
-    typedef DataEntry<sphericalTensor> sphericalTensorDataEntry;
-    typedef DataEntry<tensor> tensorDataEntry;
+    typedef Function1<label> labelFunction1;
+    typedef Function1<scalar> scalarFunction1;
+    typedef Function1<vector> vectorFunction1;
+    typedef Function1<symmTensor> symmTensorFunction1;
+    typedef Function1<sphericalTensor> sphericalTensorFunction1;
+    typedef Function1<tensor> tensorFunction1;
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C
similarity index 67%
rename from src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.C
rename to src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C
index e2edd026fd84026d1d7e1a1ce0a2aa77cac1eb97..81d45654011eb390d47b8013d2aedf0a0604bbc3 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/DataEntry/DataEntryNew.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1New.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,12 +23,12 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "DataEntry.H"
+#include "Constant.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr<Foam::DataEntry<Type> > Foam::DataEntry<Type>::New
+Foam::autoPtr<Foam::Function1<Type>> Foam::Function1<Type>::New
 (
     const word& entryName,
     const dictionary& dict
@@ -37,41 +37,36 @@ Foam::autoPtr<Foam::DataEntry<Type> > Foam::DataEntry<Type>::New
     Istream& is(dict.lookup(entryName, false));
 
     token firstToken(is);
+    word Function1Type;
 
-    word DataEntryType;
-    if (firstToken.isWord())
+    if (!firstToken.isWord())
     {
-        // Dimensioned type default compatibility
-        if (firstToken.wordToken() == entryName)
-        {
-            DataEntryType = "CompatibilityConstant";
-        }
-        else
-        {
-            DataEntryType = firstToken.wordToken();
-        }
+        is.putBack(firstToken);
+        return autoPtr<Function1<Type>>
+        (
+            new Function1Types::Constant<Type>(entryName, is)
+        );
     }
     else
     {
-        // DataEntryType = CompatibilityConstant<Type>::typeName;
-        DataEntryType = "CompatibilityConstant";
+        Function1Type = firstToken.wordToken();
     }
 
     typename dictionaryConstructorTable::iterator cstrIter =
-        dictionaryConstructorTablePtr_->find(DataEntryType);
+        dictionaryConstructorTablePtr_->find(Function1Type);
 
     if (cstrIter == dictionaryConstructorTablePtr_->end())
     {
         FatalErrorInFunction
-            << "Unknown DataEntry type "
-            << DataEntryType << " for DataEntry "
+            << "Unknown Function1 type "
+            << Function1Type << " for Function1 "
             << entryName << nl << nl
-            << "Valid DataEntry types are:" << nl
+            << "Valid Function1 types are:" << nl
             << dictionaryConstructorTablePtr_->sortedToc() << nl
             << exit(FatalError);
     }
 
-    return autoPtr<DataEntry<Type> >(cstrIter()(entryName, dict));
+    return cstrIter()(entryName, dict);
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntry.C b/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C
similarity index 68%
rename from src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntry.C
rename to src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C
index 7479702cdfe198f1fac134015847e50210a67f1e..005e743e61d55b35951c9f63efa717cb2620061f 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntry.C
+++ b/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,33 +28,25 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::PolynomialEntry<Type>::PolynomialEntry
+Foam::Function1Types::Polynomial<Type>::Polynomial
 (
     const word& entryName,
     const dictionary& dict
 )
 :
-    DataEntry<Type>(entryName),
+    Function1<Type>(entryName),
     coeffs_(),
-    canIntegrate_(true),
-    dimensions_(dimless)
+    canIntegrate_(true)
 {
     Istream& is(dict.lookup(entryName));
     word entryType(is);
 
-    token firstToken(is);
-    is.putBack(firstToken);
-    if (firstToken == token::BEGIN_SQR)
-    {
-        is  >> this->dimensions_;
-    }
-
     is  >> coeffs_;
 
     if (!coeffs_.size())
     {
         FatalErrorInFunction
-            << "PolynomialEntry coefficients for entry " << this->name_
+            << "Polynomial coefficients for entry " << this->name_
             << " are invalid (empty)" << nl << exit(FatalError);
     }
 
@@ -72,7 +64,7 @@ Foam::PolynomialEntry<Type>::PolynomialEntry
         if (!canIntegrate_)
         {
             WarningInFunction
-                << "PolynomialEntry " << this->name_ << " cannot be integrated"
+                << "Polynomial " << this->name_ << " cannot be integrated"
                 << endl;
         }
     }
@@ -80,21 +72,20 @@ Foam::PolynomialEntry<Type>::PolynomialEntry
 
 
 template<class Type>
-Foam::PolynomialEntry<Type>::PolynomialEntry
+Foam::Function1Types::Polynomial<Type>::Polynomial
 (
     const word& entryName,
-    const List<Tuple2<Type, Type> >& coeffs
+    const List<Tuple2<Type, Type>>& coeffs
 )
 :
-    DataEntry<Type>(entryName),
+    Function1<Type>(entryName),
     coeffs_(coeffs),
-    canIntegrate_(true),
-    dimensions_(dimless)
+    canIntegrate_(true)
 {
     if (!coeffs_.size())
     {
         FatalErrorInFunction
-            << "PolynomialEntry coefficients for entry " << this->name_
+            << "Polynomial coefficients for entry " << this->name_
             << " are invalid (empty)" << nl << exit(FatalError);
     }
 
@@ -112,7 +103,7 @@ Foam::PolynomialEntry<Type>::PolynomialEntry
         if (!canIntegrate_)
         {
             WarningInFunction
-                << "PolynomialEntry " << this->name_ << " cannot be integrated"
+                << "Polynomial " << this->name_ << " cannot be integrated"
                 << endl;
         }
     }
@@ -120,26 +111,25 @@ Foam::PolynomialEntry<Type>::PolynomialEntry
 
 
 template<class Type>
-Foam::PolynomialEntry<Type>::PolynomialEntry(const PolynomialEntry& poly)
+Foam::Function1Types::Polynomial<Type>::Polynomial(const Polynomial& poly)
 :
-    DataEntry<Type>(poly),
+    Function1<Type>(poly),
     coeffs_(poly.coeffs_),
-    canIntegrate_(poly.canIntegrate_),
-    dimensions_(poly.dimensions_)
+    canIntegrate_(poly.canIntegrate_)
 {}
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::PolynomialEntry<Type>::~PolynomialEntry()
+Foam::Function1Types::Polynomial<Type>::~Polynomial()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::PolynomialEntry<Type>::convertTimeBase(const Time& t)
+void Foam::Function1Types::Polynomial<Type>::convertTimeBase(const Time& t)
 {
     forAll(coeffs_, i)
     {
@@ -154,9 +144,9 @@ void Foam::PolynomialEntry<Type>::convertTimeBase(const Time& t)
 
 
 template<class Type>
-Type Foam::PolynomialEntry<Type>::value(const scalar x) const
+Type Foam::Function1Types::Polynomial<Type>::value(const scalar x) const
 {
-    Type y(pTraits<Type>::zero);
+    Type y(Zero);
     forAll(coeffs_, i)
     {
         y += cmptMultiply
@@ -171,13 +161,13 @@ Type Foam::PolynomialEntry<Type>::value(const scalar x) const
 
 
 template<class Type>
-Type Foam::PolynomialEntry<Type>::integrate
+Type Foam::Function1Types::Polynomial<Type>::integrate
 (
     const scalar x1,
     const scalar x2
 ) const
 {
-    Type intx(pTraits<Type>::zero);
+    Type intx(Zero);
 
     if (canIntegrate_)
     {
@@ -209,34 +199,12 @@ Type Foam::PolynomialEntry<Type>::integrate
 
 
 template<class Type>
-Foam::dimensioned<Type> Foam::PolynomialEntry<Type>::dimValue
-(
-    const scalar x
-) const
+void Foam::Function1Types::Polynomial<Type>::writeData(Ostream& os) const
 {
-    return dimensioned<Type>("dimensionedValue", dimensions_, value(x));
-}
+    Function1<Type>::writeData(os);
 
-
-template<class Type>
-Foam::dimensioned<Type> Foam::PolynomialEntry<Type>::dimIntegrate
-(
-    const scalar x1,
-    const scalar x2
-) const
-{
-    return dimensioned<Type>
-    (
-        "dimensionedValue",
-        dimensions_,
-        integrate(x1, x2)
-    );
+    os  << nl << indent << coeffs_ << token::END_STATEMENT << nl;
 }
 
 
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
-
-#include "PolynomialEntryIO.C"
-
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntry.H b/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.H
similarity index 64%
rename from src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntry.H
rename to src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.H
index f5a783139f706f7fce1c063edccf25910daeef1f..5afa502751508e2498146a5fc3d9d49a2c202fbe 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/PolynomialEntry/PolynomialEntry.H
+++ b/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::PolynomialEntry
+    Foam::Function1Types::PolynomialEntry
 
 Description
     PolynomialEntry container data entry for scalars. Items are stored in a
@@ -30,7 +30,7 @@ Description
     e.g. for an entry \<entryName\> that describes y = x^2 + 2x^3
 
     \verbatim
-        <entryName>  polynomial  [0 0 1 0 0] // optional dimensions
+        <entryName>  polynomial
         (
             (1    2)
             (2    3)
@@ -45,50 +45,39 @@ SourceFiles
 #ifndef PolynomialEntry_H
 #define PolynomialEntry_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Tuple2.H"
-#include "dimensionSet.H"
-#include "DataEntryFwd.H"
+#include "Function1Fwd.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-// Forward declaration of classes
-
-template<class Type>
-class PolynomialEntry;
-
-// Forward declaration of friend functions
-template<class Type>
-Ostream& operator<<(Ostream&, const PolynomialEntry<Type>&);
+namespace Function1Types
+{
 
 /*---------------------------------------------------------------------------*\
-                        Class PolynomialEntry Declaration
+                        Class Polynomial Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class PolynomialEntry
+class Polynomial
 :
-    public DataEntry<Type>
+    public Function1<Type>
 {
     // Private data
 
-        //- PolynomialEntry coefficients - list of prefactor, exponent
-        List<Tuple2<Type, Type> > coeffs_;
+        //- Polynomial coefficients - list of prefactor, exponent
+        List<Tuple2<Type, Type>> coeffs_;
 
         //- Flag to indicate whether poly can be integrated
         bool canIntegrate_;
 
-        //- The dimension set
-        dimensionSet dimensions_;
-
 
     // Private Member Functions
 
         //- Disallow default bitwise assignment
-        void operator=(const PolynomialEntry<Type>&);
+        void operator=(const Polynomial<Type>&);
 
 
 public:
@@ -99,27 +88,27 @@ public:
 
     // Constructors
 
-        PolynomialEntry(const word& entryName, const dictionary& dict);
+        Polynomial(const word& entryName, const dictionary& dict);
 
         //- Construct from components
-        PolynomialEntry
+        Polynomial
         (
             const word& entryName,
-            const List<Tuple2<Type, Type> >&
+            const List<Tuple2<Type, Type>>&
         );
 
         //- Copy constructor
-        PolynomialEntry(const PolynomialEntry& poly);
+        Polynomial(const Polynomial& poly);
 
         //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
+        virtual tmp<Function1<Type>> clone() const
         {
-            return tmp<DataEntry<Type> >(new PolynomialEntry(*this));
+            return tmp<Function1<Type>>(new Polynomial(*this));
         }
 
 
     //- Destructor
-    virtual ~PolynomialEntry();
+    virtual ~Polynomial();
 
 
     // Member Functions
@@ -132,31 +121,12 @@ public:
 
         // Evaluation
 
-            //- Return PolynomialEntry value
+            //- Return Polynomial value
             Type value(const scalar x) const;
 
             //- Integrate between two (scalar) values
             Type integrate(const scalar x1, const scalar x2) const;
 
-            //- Return dimensioned constant value
-            dimensioned<Type> dimValue(const scalar) const;
-
-            //- Integrate between two values and return dimensioned type
-            dimensioned<Type> dimIntegrate
-            (
-                const scalar x1,
-                const scalar x2
-            ) const;
-
-
-    // I/O
-
-        //- Ostream Operator
-        friend Ostream& operator<< <Type>
-        (
-            Ostream& os,
-            const PolynomialEntry<Type>& cnst
-        );
 
         //- Write in dictionary format
         virtual void writeData(Ostream& os) const;
@@ -165,12 +135,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace Function1Types
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PolynomialEntry.C"
+    #include "PolynomialEntry.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C
new file mode 100644
index 0000000000000000000000000000000000000000..603109664386b4aeea573d5df08ae7c8362ddc16
--- /dev/null
+++ b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C
@@ -0,0 +1,104 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Sine.H"
+#include "mathematicalConstants.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::Function1Types::Sine<Type>::read(const dictionary& coeffs)
+{
+    t0_ = coeffs.lookupOrDefault<scalar>("t0", 0);
+    amplitude_ = Function1<scalar>::New("amplitude", coeffs);
+    frequency_ = Function1<scalar>::New("frequency", coeffs);
+    scale_ = Function1<Type>::New("scale", coeffs);
+    level_ = Function1<Type>::New("level", coeffs);
+}
+
+
+template<class Type>
+Foam::Function1Types::Sine<Type>::Sine
+(
+    const word& entryName,
+    const dictionary& dict,
+    const word& ext
+)
+:
+    Function1<Type>(entryName)
+{
+    read(dict.subDict(entryName + ext));
+}
+
+
+template<class Type>
+Foam::Function1Types::Sine<Type>::Sine(const Sine<Type>& se)
+:
+    Function1<Type>(se),
+    t0_(se.t0_),
+    amplitude_(se.amplitude_, false),
+    frequency_(se.frequency_, false),
+    scale_(se.scale_, false),
+    level_(se.level_, false)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::Function1Types::Sine<Type>::~Sine()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+Type Foam::Function1Types::Sine<Type>::value(const scalar t) const
+{
+    return
+        amplitude_->value(t)
+       *sin(constant::mathematical::twoPi*frequency_->value(t)*(t - t0_))
+       *scale_->value(t)
+      + level_->value(t);
+}
+
+
+template<class Type>
+void Foam::Function1Types::Sine<Type>::writeData(Ostream& os) const
+{
+    Function1<Type>::writeData(os);
+    os  << token::END_STATEMENT << nl;
+    os  << indent << word(this->name() + "Coeffs") << nl;
+    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
+    os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
+    amplitude_->writeData(os);
+    frequency_->writeData(os);
+    scale_->writeData(os);
+    level_->writeData(os);
+    os  << decrIndent << indent << token::END_BLOCK << endl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.H b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.H
new file mode 100644
index 0000000000000000000000000000000000000000..66c9f11058ce183c2c2a926918ea80d11737b681
--- /dev/null
+++ b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.H
@@ -0,0 +1,178 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::Function1Types::Sine
+
+Description
+    Templated sine function with support for an offset level.
+
+        \f[
+            a sin(2 \pi f (t - t_0)) s + l
+        \f]
+
+    where
+
+    \vartable
+        symbol  | Description       | Data type
+        a       | Amplitude         | Function1<scalar>
+        f       | Frequency [1/s]   | Function1<scalar>
+        s       | Type scale factor | Function1<Type>
+        l       | Type offset level | Function1<Type>
+        t_0     | Start time [s]    | scalar
+        t       | Time [s]          | scalar
+    \endvartable
+
+    Example for a scalar:
+    \verbatim
+        <entryName> sine;
+        <entryName>Coeffs
+        {
+            frequency 10;
+            amplitude 0.1;
+            scale     2e-6;
+            level     2e-6;
+        }
+    \endverbatim
+
+    Example for a vector:
+    \verbatim
+        <entryName> sine;
+        <entryName>Coeffs
+        {
+            frequency 10;
+            amplitude 1;
+            scale     (1 0.1 0);
+            level     (10 1 0);
+        }
+    \endverbatim
+
+SourceFiles
+    Sine.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Sine_H
+#define Sine_H
+
+#include "Function1.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace Function1Types
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class Sine Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class Sine
+:
+    public Function1<Type>
+{
+    // Private data
+
+        //- Start-time for the sin function
+        scalar t0_;
+
+        //- Scalar amplitude of the sin function
+        autoPtr<Function1<scalar>> amplitude_;
+
+        //- Frequency of the sin function
+        autoPtr<Function1<scalar>> frequency_;
+
+        //- Scaling factor of the sin function
+        autoPtr<Function1<Type>> scale_;
+
+        //- Level to which the sin function is added
+        autoPtr<Function1<Type>> level_;
+
+
+    // Private Member Functions
+
+        //- Read the coefficients from the given dictionary
+        void read(const dictionary& coeffs);
+
+        //- Disallow default bitwise assignment
+        void operator=(const Sine<Type>&);
+
+
+public:
+
+    // Runtime type information
+    TypeName("sine");
+
+
+    // Constructors
+
+        //- Construct from entry name and dictionary
+        Sine
+        (
+            const word& entryName,
+            const dictionary& dict,
+            const word& ext = "Coeffs"
+        );
+
+        //- Copy constructor
+        Sine(const Sine<Type>& se);
+
+        //- Construct and return a clone
+        virtual tmp<Function1<Type>> clone() const
+        {
+            return tmp<Function1<Type>>(new Sine<Type>(*this));
+        }
+
+
+    //- Destructor
+    virtual ~Sine();
+
+
+    // Member Functions
+
+        //- Return value for time t
+        Type value(const scalar t) const;
+
+        //- Write in dictionary format
+        virtual void writeData(Ostream& os) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Function1Types
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "Sine.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C
new file mode 100644
index 0000000000000000000000000000000000000000..213e76832131e07f25085fe8237ee691e56d6623
--- /dev/null
+++ b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C
@@ -0,0 +1,118 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Square.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::Function1Types::Square<Type>::read(const dictionary& coeffs)
+{
+    t0_ = coeffs.lookupOrDefault<scalar>("t0", 0);
+    markSpace_ = coeffs.lookupOrDefault<scalar>("markSpace", 1);
+    amplitude_ = Function1<scalar>::New("amplitude", coeffs);
+    frequency_ = Function1<scalar>::New("frequency", coeffs);
+    scale_ = Function1<Type>::New("scale", coeffs);
+    level_ = Function1<Type>::New("level", coeffs);
+}
+
+
+template<class Type>
+Foam::Function1Types::Square<Type>::Square
+(
+    const word& entryName,
+    const dictionary& dict,
+    const word& ext
+)
+:
+    Function1<Type>(entryName)
+{
+    read(dict.subDict(entryName + ext));
+}
+
+
+template<class Type>
+Foam::Function1Types::Square<Type>::Square(const Square<Type>& se)
+:
+    Function1<Type>(se),
+    t0_(se.t0_),
+    markSpace_(se.markSpace_),
+    amplitude_(se.amplitude_, false),
+    frequency_(se.frequency_, false),
+    scale_(se.scale_, false),
+    level_(se.level_, false)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::Function1Types::Square<Type>::~Square()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+Type Foam::Function1Types::Square<Type>::value(const scalar t) const
+{
+    // Number of waves including fractions
+    scalar waves = frequency_->value(t)*(t - t0_);
+
+    // Number of complete waves
+    scalar nWaves;
+
+    // Fraction of last incomplete wave
+    scalar waveFrac = std::modf(waves, &nWaves);
+
+    // Mark fraction of a wave
+    scalar markFrac = markSpace_/(1.0 + markSpace_);
+
+    return
+        amplitude_->value(t)
+       *(waveFrac < markFrac ? 1 : -1)
+       *scale_->value(t)
+      + level_->value(t);
+}
+
+
+template<class Type>
+void Foam::Function1Types::Square<Type>::writeData(Ostream& os) const
+{
+    Function1<Type>::writeData(os);
+    os  << token::END_STATEMENT << nl;
+    os  << indent << word(this->name() + "Coeffs") << nl;
+    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
+    os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl;
+    os.writeKeyword("markSpace") << markSpace_ << token::END_STATEMENT << nl;
+    amplitude_->writeData(os);
+    frequency_->writeData(os);
+    scale_->writeData(os);
+    level_->writeData(os);
+    os  << decrIndent << indent << token::END_BLOCK << endl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/Function1/Square/Square.H b/src/OpenFOAM/primitives/functions/Function1/Square/Square.H
new file mode 100644
index 0000000000000000000000000000000000000000..9ca2079c00b18cb12b7cde956744b47f709ef178
--- /dev/null
+++ b/src/OpenFOAM/primitives/functions/Function1/Square/Square.H
@@ -0,0 +1,185 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::Function1Types::Square
+
+Description
+    Templated square-wave function with support for an offset level.
+
+        \f[
+            a square(f (t - t_0)) s + l
+        \f]
+
+    where
+
+    \f$ square(t) \f$ is the square-wave function in range \f$ [-1, 1] \f$
+    with a mark/space ratio of \f$ r \f$
+
+    \vartable
+        symbol  | Description       | Data type         | Default
+        a       | Amplitude         | Function1<scalar> |
+        f       | Frequency [1/s]   | Function1<scalar> |
+        s       | Type scale factor | Function1<Type>   |
+        l       | Type offset level | Function1<Type>   |
+        t_0     | Start time [s]    | scalar            | 0
+        r       | mark/space ratio  | scalar            | 1
+        t       | Time [s]          | scalar
+    \endvartable
+
+    Example for a scalar:
+    \verbatim
+        <entryName> square;
+        <entryName>Coeffs
+        {
+            frequency 10;
+            amplitude 0.1;
+            scale     2e-6;
+            level     2e-6;
+        }
+    \endverbatim
+
+    Example for a vector:
+    \verbatim
+        <entryName> square;
+        <entryName>Coeffs
+        {
+            frequency 10;
+            amplitude 1;
+            scale     (1 0.1 0);
+            level     (10 1 0);
+        }
+    \endverbatim
+
+SourceFiles
+    Square.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Square_H
+#define Square_H
+
+#include "Function1.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace Function1Types
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class Square Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class Square
+:
+    public Function1<Type>
+{
+    // Private data
+
+        //- Start-time for the square function
+        scalar t0_;
+
+        //- Mark/space ratio of the square function
+        scalar markSpace_;
+
+        //- Scalar amplitude of the square function
+        autoPtr<Function1<scalar>> amplitude_;
+
+        //- Frequency of the square function
+        autoPtr<Function1<scalar>> frequency_;
+
+        //- Scaling factor of the square function
+        autoPtr<Function1<Type>> scale_;
+
+        //- Level to which the square function is added
+        autoPtr<Function1<Type>> level_;
+
+
+    // Private Member Functions
+
+        //- Read the coefficients from the given dictionary
+        void read(const dictionary& coeffs);
+
+        //- Disallow default bitwise assignment
+        void operator=(const Square<Type>&);
+
+
+public:
+
+    // Runtime type information
+    TypeName("square");
+
+
+    // Constructors
+
+        //- Construct from entry name and dictionary
+        Square
+        (
+            const word& entryName,
+            const dictionary& dict,
+            const word& ext = "Coeffs"
+        );
+
+        //- Copy constructor
+        Square(const Square<Type>& se);
+
+        //- Construct and return a clone
+        virtual tmp<Function1<Type>> clone() const
+        {
+            return tmp<Function1<Type>>(new Square<Type>(*this));
+        }
+
+
+    //- Destructor
+    virtual ~Square();
+
+
+    // Member Functions
+
+        //- Return value for time t
+        Type value(const scalar t) const;
+
+        //- Write in dictionary format
+        virtual void writeData(Ostream& os) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Function1Types
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "Square.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.C b/src/OpenFOAM/primitives/functions/Function1/Table/Table.C
similarity index 82%
rename from src/OpenFOAM/primitives/functions/DataEntry/Table/Table.C
rename to src/OpenFOAM/primitives/functions/Function1/Table/Table.C
index 1e1e0af54e40290f2b9ebd6adb7a09c3549cdacc..92bbefc8cc05fb61c3830733edd907be8283e087 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Table/Table.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,27 +28,23 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::Table<Type>::Table(const word& entryName, const dictionary& dict)
+Foam::Function1Types::Table<Type>::Table
+(
+    const word& entryName,
+    const dictionary& dict
+)
 :
     TableBase<Type>(entryName, dict)
 {
     Istream& is(dict.lookup(entryName));
     word entryType(is);
-
-    token firstToken(is);
-    is.putBack(firstToken);
-    if (firstToken == token::BEGIN_SQR)
-    {
-        is >> this->dimensions_;
-    }
     is  >> this->table_;
-
     TableBase<Type>::check();
 }
 
 
 template<class Type>
-Foam::Table<Type>::Table(const Table<Type>& tbl)
+Foam::Function1Types::Table<Type>::Table(const Table<Type>& tbl)
 :
     TableBase<Type>(tbl)
 {}
@@ -57,7 +53,7 @@ Foam::Table<Type>::Table(const Table<Type>& tbl)
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::Table<Type>::~Table()
+Foam::Function1Types::Table<Type>::~Table()
 {}
 
 
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H b/src/OpenFOAM/primitives/functions/Function1/Table/Table.H
similarity index 88%
rename from src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H
rename to src/OpenFOAM/primitives/functions/Function1/Table/Table.H
index 9f45b69d15a7120cc04ac1c623df0934dc144018..c11eb621db83ce13ed0c4ac71644560d4f676fbe 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/Table/Table.H
+++ b/src/OpenFOAM/primitives/functions/Function1/Table/Table.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::Table
+    Foam::Function1Types::Table
 
 Description
     Templated table container data entry. Items are stored in a list of
@@ -45,23 +45,15 @@ SourceFiles
 #ifndef Table_H
 #define Table_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Tuple2.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-template<class Type>
-class Table;
-
-template<class Type>
-Ostream& operator<<
-(
-    Ostream&,
-    const Table<Type>&
-);
+namespace Function1Types
+{
 
 /*---------------------------------------------------------------------------*\
                            Class Table Declaration
@@ -93,9 +85,9 @@ public:
         Table(const Table<Type>& tbl);
 
         //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
+        virtual tmp<Function1<Type>> clone() const
         {
-            return tmp<DataEntry<Type> >(new Table<Type>(*this));
+            return tmp<Function1<Type>>(new Table<Type>(*this));
         }
 
 
@@ -106,12 +98,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace Function1Types
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Table.C"
+    #include "Table.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
similarity index 79%
rename from src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C
rename to src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
index 8d781f541f51dc34062977563e3704877025f782..a4f83a039c782b6ac1f6242a9e96c9c6ba848d8b 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,8 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-const Foam::interpolationWeights& Foam::TableBase<Type>::interpolator() const
+const Foam::interpolationWeights&
+Foam::Function1Types::TableBase<Type>::interpolator() const
 {
     if (interpolatorPtr_.empty())
     {
@@ -55,9 +56,13 @@ const Foam::interpolationWeights& Foam::TableBase<Type>::interpolator() const
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::TableBase<Type>::TableBase(const word& name, const dictionary& dict)
+Foam::Function1Types::TableBase<Type>::TableBase
+(
+    const word& name,
+    const dictionary& dict
+)
 :
-    DataEntry<Type>(name),
+    Function1<Type>(name),
     name_(name),
     boundsHandling_
     (
@@ -70,20 +75,18 @@ Foam::TableBase<Type>::TableBase(const word& name, const dictionary& dict)
     (
         dict.lookupOrDefault<word>("interpolationScheme", "linear")
     ),
-    table_(),
-    dimensions_(dimless)
+    table_()
 {}
 
 
 template<class Type>
-Foam::TableBase<Type>::TableBase(const TableBase<Type>& tbl)
+Foam::Function1Types::TableBase<Type>::TableBase(const TableBase<Type>& tbl)
 :
-    DataEntry<Type>(tbl),
+    Function1<Type>(tbl),
     name_(tbl.name_),
     boundsHandling_(tbl.boundsHandling_),
     interpolationScheme_(tbl.interpolationScheme_),
     table_(tbl.table_),
-    dimensions_(tbl.dimensions_),
     tableSamplesPtr_(tbl.tableSamplesPtr_),
     interpolatorPtr_(tbl.interpolatorPtr_)
 {}
@@ -92,14 +95,14 @@ Foam::TableBase<Type>::TableBase(const TableBase<Type>& tbl)
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::TableBase<Type>::~TableBase()
+Foam::Function1Types::TableBase<Type>::~TableBase()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::word Foam::TableBase<Type>::boundsHandlingToWord
+Foam::word Foam::Function1Types::TableBase<Type>::boundsHandlingToWord
 (
      const boundsHandling& bound
 ) const
@@ -135,8 +138,8 @@ Foam::word Foam::TableBase<Type>::boundsHandlingToWord
 
 
 template<class Type>
-typename Foam::TableBase<Type>::boundsHandling
-Foam::TableBase<Type>::wordToBoundsHandling
+typename Foam::Function1Types::TableBase<Type>::boundsHandling
+Foam::Function1Types::TableBase<Type>::wordToBoundsHandling
 (
     const word& bound
 ) const
@@ -169,8 +172,8 @@ Foam::TableBase<Type>::wordToBoundsHandling
 
 
 template<class Type>
-typename Foam::TableBase<Type>::boundsHandling
-Foam::TableBase<Type>::outOfBounds
+typename Foam::Function1Types::TableBase<Type>::boundsHandling
+Foam::Function1Types::TableBase<Type>::outOfBounds
 (
     const boundsHandling& bound
 )
@@ -183,7 +186,7 @@ Foam::TableBase<Type>::outOfBounds
 
 
 template<class Type>
-void Foam::TableBase<Type>::check() const
+void Foam::Function1Types::TableBase<Type>::check() const
 {
     if (!table_.size())
     {
@@ -212,7 +215,7 @@ void Foam::TableBase<Type>::check() const
 
 
 template<class Type>
-bool Foam::TableBase<Type>::checkMinBounds
+bool Foam::Function1Types::TableBase<Type>::checkMinBounds
 (
     const scalar x,
     scalar& xDash
@@ -262,7 +265,7 @@ bool Foam::TableBase<Type>::checkMinBounds
 
 
 template<class Type>
-bool Foam::TableBase<Type>::checkMaxBounds
+bool Foam::Function1Types::TableBase<Type>::checkMaxBounds
 (
     const scalar x,
     scalar& xDash
@@ -312,7 +315,7 @@ bool Foam::TableBase<Type>::checkMaxBounds
 
 
 template<class Type>
-void Foam::TableBase<Type>::convertTimeBase(const Time& t)
+void Foam::Function1Types::TableBase<Type>::convertTimeBase(const Time& t)
 {
     forAll(table_, i)
     {
@@ -326,7 +329,7 @@ void Foam::TableBase<Type>::convertTimeBase(const Time& t)
 
 
 template<class Type>
-Type Foam::TableBase<Type>::value(const scalar x) const
+Type Foam::Function1Types::TableBase<Type>::value(const scalar x) const
 {
     scalar xDash = x;
 
@@ -354,7 +357,11 @@ Type Foam::TableBase<Type>::value(const scalar x) const
 
 
 template<class Type>
-Type Foam::TableBase<Type>::integrate(const scalar x1, const scalar x2) const
+Type Foam::Function1Types::TableBase<Type>::integrate
+(
+    const scalar x1,
+    const scalar x2
+) const
 {
     // Use interpolator
     interpolator().integrationWeights(x1, x2, currentIndices_, currentWeights_);
@@ -370,33 +377,10 @@ Type Foam::TableBase<Type>::integrate(const scalar x1, const scalar x2) const
 
 
 template<class Type>
-Foam::dimensioned<Type> Foam::TableBase<Type>::
-dimValue(const scalar x) const
-{
-    return dimensioned<Type>("dimensionedValue", dimensions_, this->value(x));
-}
-
-
-template<class Type>
-Foam::dimensioned<Type> Foam::TableBase<Type>::dimIntegrate
-(
-    const scalar x1, const scalar x2
-) const
-{
-    return dimensioned<Type>
-    (
-        "dimensionedValue",
-        dimensions_,
-        this->integrate(x2, x1)
-    );
-}
-
-
-template<class Type>
-Foam::tmp<Foam::scalarField> Foam::TableBase<Type>::x() const
+Foam::tmp<Foam::scalarField> Foam::Function1Types::TableBase<Type>::x() const
 {
     tmp<scalarField> tfld(new scalarField(table_.size(), 0.0));
-    scalarField& fld = tfld();
+    scalarField& fld = tfld.ref();
 
     forAll(table_, i)
     {
@@ -408,10 +392,10 @@ Foam::tmp<Foam::scalarField> Foam::TableBase<Type>::x() const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::TableBase<Type>::y() const
+Foam::tmp<Foam::Field<Type>> Foam::Function1Types::TableBase<Type>::y() const
 {
-    tmp<Field<Type> > tfld(new Field<Type>(table_.size(), pTraits<Type>::zero));
-    Field<Type>& fld = tfld();
+    tmp<Field<Type>> tfld(new Field<Type>(table_.size(), Zero));
+    Field<Type>& fld = tfld.ref();
 
     forAll(table_, i)
     {
@@ -422,8 +406,29 @@ Foam::tmp<Foam::Field<Type> > Foam::TableBase<Type>::y() const
 }
 
 
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
+template<class Type>
+void Foam::Function1Types::TableBase<Type>::writeEntries(Ostream& os) const
+{
+    if (boundsHandling_ != CLAMP)
+    {
+        os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_)
+            << token::END_STATEMENT << nl;
+    }
+    if (interpolationScheme_ != "linear")
+    {
+        os.writeKeyword("interpolationScheme") << interpolationScheme_
+            << token::END_STATEMENT << nl;
+    }
+}
+
+
+template<class Type>
+void Foam::Function1Types::TableBase<Type>::writeData(Ostream& os) const
+{
+    Function1<Type>::writeData(os);
+    os  << nl << indent << table_ << token::END_STATEMENT << nl;
+    writeEntries(os);
+}
 
-#include "TableBaseIO.C"
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.H
similarity index 84%
rename from src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H
rename to src/OpenFOAM/primitives/functions/Function1/Table/TableBase.H
index df7542e6fde0a5148b8a7bed0b470cdd90f84845..9a1e228bb1d7c76fe771e8ff0a26b50e7b4fa8bc 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/Table/TableBase.H
+++ b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::TableBase
+    Foam::Function1Types::TableBase
 
 Description
     Base class for table with bounds handling, interpolation and integration
@@ -35,27 +35,19 @@ SourceFiles
 #ifndef TableBase_H
 #define TableBase_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Tuple2.H"
-#include "dimensionSet.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
 
-template<class Type>
-class TableBase;
-
-template<class Type>
-Ostream& operator<<
-(
-    Ostream&,
-    const TableBase<Type>&
-);
-
 class interpolationWeights;
 
+namespace Function1Types
+{
+
 /*---------------------------------------------------------------------------*\
                         Class TableBase Declaration
 \*---------------------------------------------------------------------------*/
@@ -63,7 +55,7 @@ class interpolationWeights;
 template<class Type>
 class TableBase
 :
-    public DataEntry<Type>
+    public Function1<Type>
 {
 public:
 
@@ -93,10 +85,7 @@ protected:
         const word interpolationScheme_;
 
         //- Table data
-        List<Tuple2<scalar, Type> > table_;
-
-        //- The dimension set
-        dimensionSet dimensions_;
+        List<Tuple2<scalar, Type>> table_;
 
         //- Extracted values
         mutable autoPtr<scalarField> tableSamplesPtr_;
@@ -112,7 +101,6 @@ protected:
 
     // Protected Member Functions
 
-
         //- Return (demand driven) interpolator
         const interpolationWeights& interpolator() const;
 
@@ -164,31 +152,11 @@ public:
         //- Integrate between two (scalar) values
         virtual Type integrate(const scalar x1, const scalar x2) const;
 
-        //- Return dimensioned constant value
-        virtual dimensioned<Type> dimValue(const scalar x) const;
-
-        //- Integrate between two values and return dimensioned type
-        virtual dimensioned<Type> dimIntegrate
-        (
-            const scalar x1,
-            const scalar x2
-        ) const;
-
         //- Return the reference values
         virtual tmp<scalarField> x() const;
 
         //- Return the dependent values
-        virtual tmp<Field<Type> > y() const;
-
-
-    // I/O
-
-        //- Ostream Operator
-        friend Ostream& operator<< <Type>
-        (
-            Ostream& os,
-            const TableBase<Type>& tbl
-        );
+        virtual tmp<Field<Type>> y() const;
 
         //- Write all table data in dictionary format
         virtual void writeData(Ostream& os) const;
@@ -201,12 +169,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace Function1Types
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TableBase.C"
+    #include "TableBase.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.C b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C
similarity index 68%
rename from src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.C
rename to src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C
index 25ed90dc68f149867b2ddb3f32b4430ade295e7c..8551d1a84a6e57324ade0e1421c7209e0a5060a8 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.C
+++ b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,11 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::TableFile<Type>::TableFile(const word& entryName, const dictionary& dict)
+Foam::Function1Types::TableFile<Type>::TableFile
+(
+    const word& entryName,
+    const dictionary& dict
+)
 :
     TableBase<Type>(entryName, dict.subDict(entryName + "Coeffs")),
     fName_("none")
@@ -36,11 +40,6 @@ Foam::TableFile<Type>::TableFile(const word& entryName, const dictionary& dict)
     const dictionary coeffs(dict.subDict(entryName + "Coeffs"));
     coeffs.lookup("fileName") >> fName_;
 
-    if (coeffs.found("dimensions"))
-    {
-        coeffs.lookup("dimensions") >> this->dimensions_;
-    }
-
     fileName expandedFile(fName_);
     IFstream is(expandedFile.expand());
 
@@ -59,7 +58,7 @@ Foam::TableFile<Type>::TableFile(const word& entryName, const dictionary& dict)
 
 
 template<class Type>
-Foam::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
+Foam::Function1Types::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
 :
     TableBase<Type>(tbl),
     fName_(tbl.fName_)
@@ -69,13 +68,28 @@ Foam::TableFile<Type>::TableFile(const TableFile<Type>& tbl)
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::TableFile<Type>::~TableFile()
+Foam::Function1Types::TableFile<Type>::~TableFile()
 {}
 
 
-// * * * * * * * * * * * * * *  IOStream operators * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-#include "TableFileIO.C"
+template<class Type>
+void Foam::Function1Types::TableFile<Type>::writeData(Ostream& os) const
+{
+    Function1<Type>::writeData(os);
+
+    os  << token::END_STATEMENT << nl
+        << indent << word(this->name() + "Coeffs") << nl
+        << indent << token::BEGIN_BLOCK << nl << incrIndent;
+
+    // Note: for TableBase write the dictionary entries it needs but not
+    // the values themselves
+    TableBase<Type>::writeEntries(os);
+
+    os.writeKeyword("fileName")<< fName_ << token::END_STATEMENT << nl;
+    os  << decrIndent << indent << token::END_BLOCK << endl;
+}
 
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.H b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.H
similarity index 88%
rename from src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.H
rename to src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.H
index dc34c00e795571170bb9a7d9f422210d881299a5..a44ba48d7f8245eb2412d5ce45667133f2778531 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.H
+++ b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::TableFile
+    Foam::Function1Types::TableFile
 
 Description
     Templated table container data entry where data is read from file.
@@ -31,7 +31,6 @@ Description
         <entryName> tableFile;
         <entryName>Coeffs
         {
-            dimensions          [0 0 1 0 0]; // optional dimensions
             fileName            dataFile;    // name of data file
             outOfBounds         clamp;       // optional out-of-bounds handling
             interpolationScheme linear;      // optional interpolation method
@@ -57,23 +56,15 @@ SourceFiles
 #ifndef TableFile_H
 #define TableFile_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Tuple2.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-template<class Type>
-class TableFile;
-
-template<class Type>
-Ostream& operator<<
-(
-    Ostream&,
-    const TableFile<Type>&
-);
+namespace Function1Types
+{
 
 /*---------------------------------------------------------------------------*\
                            Class TableFile Declaration
@@ -111,9 +102,9 @@ public:
         TableFile(const TableFile<Type>& tbl);
 
         //- Construct and return a clone
-        virtual tmp<DataEntry<Type> > clone() const
+        virtual tmp<Function1<Type>> clone() const
         {
-            return tmp<DataEntry<Type> >(new TableFile<Type>(*this));
+            return tmp<Function1<Type>>(new TableFile<Type>(*this));
         }
 
 
@@ -130,12 +121,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+} // End namespace Function1Types
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TableFile.C"
+    #include "TableFile.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/Function1/makeDataEntries.C b/src/OpenFOAM/primitives/functions/Function1/makeDataEntries.C
new file mode 100644
index 0000000000000000000000000000000000000000..babb5bad63b68ce060f0ca7a368b16e1e41f04fc
--- /dev/null
+++ b/src/OpenFOAM/primitives/functions/Function1/makeDataEntries.C
@@ -0,0 +1,63 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Constant.H"
+#include "PolynomialEntry.H"
+#include "Sine.H"
+#include "Square.H"
+#include "CSV.H"
+#include "Table.H"
+#include "TableFile.H"
+
+#include "fieldTypes.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#define makeFunction1s(Type)                                                   \
+    makeFunction1(Type);                                                       \
+    makeFunction1Type(Constant, Type);                                         \
+    makeFunction1Type(Polynomial, Type);                                       \
+    makeFunction1Type(Sine, Type);                                             \
+    makeFunction1Type(Square, Type);                                           \
+    makeFunction1Type(CSV, Type);                                              \
+    makeFunction1Type(Table, Type);                                            \
+    makeFunction1Type(TableFile, Type);
+
+namespace Foam
+{
+    makeFunction1(label);
+    makeFunction1Type(Constant, label);
+    // Polynomial functions and interpolation do evaluate to label
+    // Instead evaluate a scalar and convert to label as appropriate
+
+    makeFunction1s(scalar);
+    makeFunction1s(vector);
+    makeFunction1s(sphericalTensor);
+    makeFunction1s(symmTensor);
+    makeFunction1s(tensor);
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H
index c4848302122de7a640d6194c5c1c43fdae58bbb5..b6f20330d8ec4de674d5b5836cf81d843036e025 100644
--- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H
+++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -168,8 +168,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Polynomial.C"
-#   include "PolynomialIO.C"
+    #include "Polynomial.C"
+    #include "PolynomialIO.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/functions/Polynomial/PolynomialIO.C b/src/OpenFOAM/primitives/functions/Polynomial/PolynomialIO.C
index 6d0d874cef61582b1e51f68e0849f1f08de65724..0b24c9578f822cbe3548757990d34fc1e0b3cd56 100644
--- a/src/OpenFOAM/primitives/functions/Polynomial/PolynomialIO.C
+++ b/src/OpenFOAM/primitives/functions/Polynomial/PolynomialIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Foam::Ostream& Foam::operator<<
 )
 {
     os  << static_cast
-            <VectorSpace<Polynomial<PolySize>, scalar, PolySize> >(poly);
+            <VectorSpace<Polynomial<PolySize>, scalar, PolySize>>(poly);
 
     // Check state of Ostream
     os.check
diff --git a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C b/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C
similarity index 78%
rename from src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C
rename to src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C
index e46962bd3137506d8afb671c92f6899ac0850c72..ed8b34ab0641605c8026552fe92fd8dbb20f7589 100644
--- a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C
+++ b/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,12 +23,12 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::TimeDataEntry<Type>::TimeDataEntry
+Foam::TimeFunction1<Type>::TimeFunction1
 (
     const Time& t,
     const word& name,
@@ -37,14 +37,14 @@ Foam::TimeDataEntry<Type>::TimeDataEntry
 :
     time_(t),
     name_(name),
-    entry_(DataEntry<Type>::New(name, dict))
+    entry_(Function1<Type>::New(name, dict))
 {
     entry_->convertTimeBase(t);
 }
 
 
 template<class Type>
-Foam::TimeDataEntry<Type>::TimeDataEntry(const Time& t, const word& name)
+Foam::TimeFunction1<Type>::TimeFunction1(const Time& t, const word& name)
 :
     time_(t),
     name_(name),
@@ -53,9 +53,9 @@ Foam::TimeDataEntry<Type>::TimeDataEntry(const Time& t, const word& name)
 
 
 template<class Type>
-Foam::TimeDataEntry<Type>::TimeDataEntry
+Foam::TimeFunction1<Type>::TimeFunction1
 (
-    const TimeDataEntry<Type>& tde
+    const TimeFunction1<Type>& tde
 )
 :
     time_(tde.time_),
@@ -72,18 +72,18 @@ Foam::TimeDataEntry<Type>::TimeDataEntry
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::TimeDataEntry<Type>::~TimeDataEntry()
+Foam::TimeFunction1<Type>::~TimeFunction1()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void Foam::TimeDataEntry<Type>::reset(const dictionary& dict)
+void Foam::TimeFunction1<Type>::reset(const dictionary& dict)
 {
     entry_.reset
     (
-        DataEntry<Type>::New
+        Function1<Type>::New
         (
             name_,
             dict
@@ -95,21 +95,21 @@ void Foam::TimeDataEntry<Type>::reset(const dictionary& dict)
 
 
 template<class Type>
-const Foam::word& Foam::TimeDataEntry<Type>::name() const
+const Foam::word& Foam::TimeFunction1<Type>::name() const
 {
     return entry_->name();
 }
 
 
 template<class Type>
-Type Foam::TimeDataEntry<Type>::value(const scalar x) const
+Type Foam::TimeFunction1<Type>::value(const scalar x) const
 {
     return entry_->value(x);
 }
 
 
 template<class Type>
-Type Foam::TimeDataEntry<Type>::integrate
+Type Foam::TimeFunction1<Type>::integrate
 (
     const scalar x1,
     const scalar x2
@@ -125,7 +125,7 @@ template<class Type>
 Foam::Ostream& Foam::operator<<
 (
     Ostream& os,
-    const TimeDataEntry<Type>& de
+    const TimeFunction1<Type>& de
 )
 {
     return de.entry_->operator<<(os, de);
@@ -133,7 +133,7 @@ Foam::Ostream& Foam::operator<<
 
 
 template<class Type>
-void Foam::TimeDataEntry<Type>::writeData(Ostream& os) const
+void Foam::TimeFunction1<Type>::writeData(Ostream& os) const
 {
     entry_->writeData(os);
 }
diff --git a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.H b/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.H
similarity index 82%
rename from src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.H
rename to src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.H
index 2cbe1a6115707575e144ff33eb3e653e3684b5f1..5d89572d8db022bb41f48d2e47947570d30af05a 100644
--- a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.H
+++ b/src/OpenFOAM/primitives/functions/TimeFunction1/TimeFunction1.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,21 +22,21 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::TimeDataEntry
+    Foam::TimeFunction1
 
 Description
-    Light wrapper around DataEntry to provide a mechanism to update time-based
+    Light wrapper around Function1 to provide a mechanism to update time-based
     entries.
 
 SourceFiles
-    TimeDataEntry.C
+    TimeFunction1.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef TimeDataEntry_H
-#define TimeDataEntry_H
+#ifndef TimeFunction1_H
+#define TimeFunction1_H
 
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Time.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -44,21 +44,21 @@ SourceFiles
 namespace Foam
 {
 template<class Type>
-class TimeDataEntry;
+class TimeFunction1;
 
 template<class Type>
 Ostream& operator<<
 (
     Ostream&,
-    const TimeDataEntry<Type>&
+    const TimeFunction1<Type>&
 );
 
 /*---------------------------------------------------------------------------*\
-                       Class TimeDataEntry Declaration
+                       Class TimeFunction1 Declaration
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-class TimeDataEntry
+class TimeFunction1
 {
 
 protected:
@@ -71,8 +71,8 @@ protected:
         //- Name of the data entry
         const word name_;
 
-        //- The underlying DataEntry
-        autoPtr<DataEntry<Type> > entry_;
+        //- The underlying Function1
+        autoPtr<Function1<Type>> entry_;
 
 
 public:
@@ -80,7 +80,7 @@ public:
     // Constructor
 
         //- Construct from entry name
-        TimeDataEntry
+        TimeFunction1
         (
             const Time& t,
             const word& name,
@@ -88,18 +88,18 @@ public:
         );
 
         //- Construct null from entry name
-        TimeDataEntry
+        TimeFunction1
         (
             const Time& t,
             const word& entryName
         );
 
         //- Copy constructor
-        TimeDataEntry(const TimeDataEntry<Type>& tde);
+        TimeFunction1(const TimeFunction1<Type>& tde);
 
 
     //- Destructor
-    virtual ~TimeDataEntry();
+    virtual ~TimeFunction1();
 
 
     // Member Functions
@@ -128,7 +128,7 @@ public:
         friend Ostream& operator<< <Type>
         (
             Ostream& os,
-            const TimeDataEntry<Type>& de
+            const TimeFunction1<Type>& de
         );
 
         //- Write in dictionary format
@@ -143,7 +143,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TimeDataEntry.C"
+    #include "TimeFunction1.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
index 178898eb071f3b1865536e8d3f3ac344a97c385f..3ca3a0e4c725df8c4fb6a00c84a3f1ecc9629ece 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -234,7 +234,7 @@ void Foam::globalIndexAndTransform::determineTransforms()
 
     // Collect transforms on master
 
-    List<List<vectorTensorTransform> > allTransforms(Pstream::nProcs());
+    List<List<vectorTensorTransform>> allTransforms(Pstream::nProcs());
     allTransforms[Pstream::myProcNo()] = transforms_;
     Pstream::gatherList(allTransforms);
 
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H
index b0698ad673c0e7dec9d98e1bf05a2baae2e0ece4..ccfb5d51c2a1882a9f82cb7d5f932cabfd8c7798 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ private:
         //- Mapping from patch index to which transform it matches (or
         //  -1 for none) (.first()) and what sign to use for it,
         //  i.e. +/- 1 (.second()).
-        List<Pair<label> > patchTransformSign_;
+        List<Pair<label>> patchTransformSign_;
 
 
     // Private static data
@@ -264,7 +264,7 @@ public:
             inline label nullTransformIndex() const;
 
             //- Return access to the per-patch transform-sign pairs
-            inline const List<Pair<label> >& patchTransformSign() const;
+            inline const List<Pair<label>>& patchTransformSign() const;
 
             //- Access the overall (permuted) transform corresponding
             //  to the transformIndex
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H
index 5ce965ea48d079f604e8fa1e54e233bb130e0b28..e37e3fb371a99772a2508855ebf8474b4436934e 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ Foam::globalIndexAndTransform::decodeTransformIndex
         }
     }
 
-#   ifdef FULLDEBUG
+    #ifdef FULLDEBUG
     t /= 3;
     if (t != 0)
     {
@@ -166,7 +166,7 @@ Foam::globalIndexAndTransform::decodeTransformIndex
             << " has more than 3 fields."
             << abort(FatalError);
     }
-#   endif
+    #endif
 
     return permutation;
 }
@@ -432,7 +432,7 @@ Foam::label Foam::globalIndexAndTransform::nullTransformIndex() const
 }
 
 
-const Foam::List<Foam::Pair<Foam::label> >&
+const Foam::List<Foam::Pair<Foam::label>>&
 Foam::globalIndexAndTransform::patchTransformSign() const
 {
     return patchTransformSign_;
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.C
index 8605fee30a3dbe2ab204d9c0ed631bada5ff1fab..b0b7df27ef45730922234b26b963eee5f51c24d7 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.C
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,15 +34,15 @@ const char* const Foam::vectorTensorTransform::typeName =
 
 const Foam::vectorTensorTransform Foam::vectorTensorTransform::zero
 (
-    vector::zero,
-    tensor::zero,
+    Zero,
+    Zero,
     false
 );
 
 
 const Foam::vectorTensorTransform Foam::vectorTensorTransform::I
 (
-    vector::zero,
+    Zero,
     sphericalTensor::I,
     false
 );
@@ -69,7 +69,7 @@ Foam::word Foam::name(const vectorTensorTransform& s)
 
 
 template<>
-Foam::tmp<Foam::Field<bool> > Foam::vectorTensorTransform::transform
+Foam::tmp<Foam::Field<bool>> Foam::vectorTensorTransform::transform
 (
     const Field<bool>& fld
 ) const
@@ -77,7 +77,7 @@ Foam::tmp<Foam::Field<bool> > Foam::vectorTensorTransform::transform
     return fld;
 }
 template<>
-Foam::tmp<Foam::Field<Foam::label> > Foam::vectorTensorTransform::transform
+Foam::tmp<Foam::Field<Foam::label>> Foam::vectorTensorTransform::transform
 (
     const Field<label>& fld
 ) const
@@ -85,7 +85,7 @@ Foam::tmp<Foam::Field<Foam::label> > Foam::vectorTensorTransform::transform
     return fld;
 }
 template<>
-Foam::tmp<Foam::Field<Foam::scalar> > Foam::vectorTensorTransform::transform
+Foam::tmp<Foam::Field<Foam::scalar>> Foam::vectorTensorTransform::transform
 (
     const Field<scalar>& fld
 ) const
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H
index 1006784e17e0edbdd32e1ea7880a3a63566c56a9..c4db7aa53f0424d0911d3904ed3adb8c95513027 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -146,7 +146,7 @@ public:
 
             //- Transform the given field
             template<class Type>
-            tmp<Field<Type> > transform(const Field<Type>&) const;
+            tmp<Field<Type>> transform(const Field<Type>&) const;
 
 
     // Member operators
@@ -186,11 +186,11 @@ inline bool contiguous<vectorTensorTransform>() {return true;}
 
 //- Template specialisations
 template<>
-tmp<Field<bool> > vectorTensorTransform::transform(const Field<bool>&) const;
+tmp<Field<bool>> vectorTensorTransform::transform(const Field<bool>&) const;
 template<>
-tmp<Field<label> > vectorTensorTransform::transform(const Field<label>&) const;
+tmp<Field<label>> vectorTensorTransform::transform(const Field<label>&) const;
 template<>
-tmp<Field<scalar> > vectorTensorTransform::transform(const Field<scalar>&)
+tmp<Field<scalar>> vectorTensorTransform::transform(const Field<scalar>&)
 const;
 
 
@@ -248,7 +248,7 @@ inline vectorTensorTransform operator&
 #include "vectorTensorTransformI.H"
 
 #ifdef NoRepository
-#   include "vectorTensorTransformTemplates.C"
+    #include "vectorTensorTransformTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H
index 74d8c5755e466acbdb2f601dd6188846431beb33..2290352d7a6d67e65e5d9be13fd09d11592fd881 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,7 +27,7 @@ License
 
 inline Foam::vectorTensorTransform::vectorTensorTransform()
 :
-    t_(vector::zero),
+    t_(Zero),
     R_(sphericalTensor::I),
     hasR_(false)
 {}
@@ -56,7 +56,7 @@ inline Foam::vectorTensorTransform::vectorTensorTransform(const vector& t)
 
 inline Foam::vectorTensorTransform::vectorTensorTransform(const tensor& R)
 :
-    t_(vector::zero),
+    t_(Zero),
     R_(R),
     hasR_(true)
 {}
diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformTemplates.C b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformTemplates.C
index fe964ea0fde06671ca2893cee441065eed8c296c..6878a6123c586e97e36dbef165692a76d2211d0f 100644
--- a/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformTemplates.C
+++ b/src/OpenFOAM/primitives/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransformTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::vectorTensorTransform::transform
+Foam::tmp<Foam::Field<Type>> Foam::vectorTensorTransform::transform
 (
     const Field<Type>& fld
 ) const
diff --git a/src/OpenFOAM/primitives/hashes/Hasher/Hasher.C b/src/OpenFOAM/primitives/hashes/Hasher/Hasher.C
index 685179d98fa27690e4954c415d5e5422fb39d2c8..f0c51aa45a7f7f2ec0de3e1469174772df4b7d6e 100644
--- a/src/OpenFOAM/primitives/hashes/Hasher/Hasher.C
+++ b/src/OpenFOAM/primitives/hashes/Hasher/Hasher.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ Description
 #include "HasherInt.H"
 
 #if defined (__GLIBC__)
-#  include <endian.h>
+    #include <endian.h>
 #endif
 
 // Left-rotate a 32-bit value and carry by nBits
@@ -113,14 +113,14 @@ Description
 // rotates.
 // ----------------------------------------------------------------------------
 
-#define bitMixer(a, b, c)                                                     \
-    {                                                                         \
-        a -= c; a ^= bitRotateLeft(c, 4); c += b;                             \
-        b -= a; b ^= bitRotateLeft(a, 6); a += c;                             \
-        c -= b; c ^= bitRotateLeft(b, 8); b += a;                             \
-        a -= c; a ^= bitRotateLeft(c,16); c += b;                             \
-        b -= a; b ^= bitRotateLeft(a,19); a += c;                             \
-        c -= b; c ^= bitRotateLeft(b, 4); b += a;                             \
+#define bitMixer(a, b, c)                                                      \
+    {                                                                          \
+        a -= c; a ^= bitRotateLeft(c, 4); c += b;                              \
+        b -= a; b ^= bitRotateLeft(a, 6); a += c;                              \
+        c -= b; c ^= bitRotateLeft(b, 8); b += a;                              \
+        a -= c; a ^= bitRotateLeft(c,16); c += b;                              \
+        b -= a; b ^= bitRotateLeft(a,19); a += c;                              \
+        c -= b; c ^= bitRotateLeft(b, 4); b += a;                              \
     }
 
 
@@ -148,15 +148,15 @@ Description
 //  11  8 15 26 3 22 24
 // ----------------------------------------------------------------------------
 
-#define bitMixerFinal(a, b, c)                                                \
-    {                                                                         \
-        c ^= b; c -= bitRotateLeft(b, 14);                                    \
-        a ^= c; a -= bitRotateLeft(c, 11);                                    \
-        b ^= a; b -= bitRotateLeft(a, 25);                                    \
-        c ^= b; c -= bitRotateLeft(b, 16);                                    \
-        a ^= c; a -= bitRotateLeft(c, 4);                                     \
-        b ^= a; b -= bitRotateLeft(a, 14);                                    \
-        c ^= b; c -= bitRotateLeft(b, 24);                                    \
+#define bitMixerFinal(a, b, c)                                                 \
+    {                                                                          \
+        c ^= b; c -= bitRotateLeft(b, 14);                                     \
+        a ^= c; a -= bitRotateLeft(c, 11);                                     \
+        b ^= a; b -= bitRotateLeft(a, 25);                                     \
+        c ^= b; c -= bitRotateLeft(b, 16);                                     \
+        a ^= c; a -= bitRotateLeft(c, 4);                                      \
+        b ^= a; b -= bitRotateLeft(a, 14);                                     \
+        c ^= b; c -= bitRotateLeft(b, 24);                                     \
     }
 
 
@@ -187,7 +187,7 @@ Description
 // acceptable.  Do NOT use for cryptographic purposes.
 // ----------------------------------------------------------------------------
 
-//- Specialized little-endian code
+// Specialized little-endian code
 #if !defined (__BYTE_ORDER) || (__BYTE_ORDER == __LITTLE_ENDIAN)
 static unsigned jenkins_hashlittle
 (
@@ -480,11 +480,11 @@ unsigned Foam::Hasher
 )
 {
 #ifdef __BYTE_ORDER
-# if (__BYTE_ORDER == __BIG_ENDIAN)
-    return jenkins_hashbig(key, length, initval);
-# else
-    return jenkins_hashlittle(key, length, initval);
-# endif
+    #if (__BYTE_ORDER == __BIG_ENDIAN)
+        return jenkins_hashbig(key, length, initval);
+    #else
+        return jenkins_hashlittle(key, length, initval);
+    #endif
 #else
     // endian-ness not known at compile-time: runtime endian test
     const short endianTest = 0x0100;
diff --git a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
index f9caa9b586b1c16a1fe565819ac60c040f0489b4..43cb7ec474872cb9236f3318a4ad5821c8e3dffb 100644
--- a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
+++ b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ Description
 #include <cstring>
 
 #if defined (__GLIBC__)
-#  include <endian.h>
+    #include <endian.h>
 #endif
 
 
@@ -57,29 +57,9 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ...  */ };
 inline uint32_t Foam::SHA1::swapBytes(uint32_t n)
 {
     #ifdef __BYTE_ORDER
-    # if (__BYTE_ORDER == __BIG_ENDIAN)
-    return n;
-    # else
-    return
-    (
-        ((n) << 24)
-      | (((n) & 0xff00) << 8)
-      | (((n) >> 8) & 0xff00)
-      | ((n) >> 24)
-    );
-    # endif
-
-    #else
-
-    const short x = 0x0100;
-
-    // yields 0x01 for big endian
-    if (*(reinterpret_cast<const char*>(&x)))
-    {
+        #if (__BYTE_ORDER == __BIG_ENDIAN)
         return n;
-    }
-    else
-    {
+        #else
         return
         (
             ((n) << 24)
@@ -87,7 +67,25 @@ inline uint32_t Foam::SHA1::swapBytes(uint32_t n)
           | (((n) >> 8) & 0xff00)
           | ((n) >> 24)
         );
-    }
+        #endif
+    #else
+        const short x = 0x0100;
+
+        // yields 0x01 for big endian
+        if (*(reinterpret_cast<const char*>(&x)))
+        {
+            return n;
+        }
+        else
+        {
+            return
+            (
+                ((n) << 24)
+              | (((n) & 0xff00) << 8)
+              | (((n) >> 8) & 0xff00)
+              | ((n) >> 24)
+            );
+        }
     #endif
 }
 
@@ -206,15 +204,15 @@ void Foam::SHA1::processBlock(const void *data, size_t len)
     // rotate left uint32_t by n bits
     #define rol_uint32(x, nbits)  (((x) << (nbits)) | ((x) >> (32 - (nbits))))
 
-    #define M(I) ( tm = x[I & 0x0F] ^ x[(I-14) & 0x0F]                        \
-               ^ x[(I-8) & 0x0F] ^ x[(I-3) & 0x0F]                            \
+    #define M(I) ( tm = x[I & 0x0F] ^ x[(I-14) & 0x0F]                         \
+               ^ x[(I-8) & 0x0F] ^ x[(I-3) & 0x0F]                             \
                , (x[I & 0x0F] = rol_uint32(tm, 1)) )
 
-    #define R(A,B,C,D,E,F,K,M)                                                \
-        do                                                                    \
-        {                                                                     \
-            E += rol_uint32(A, 5) + F(B, C, D) + K + M;                       \
-            B = rol_uint32(B, 30);                                            \
+    #define R(A,B,C,D,E,F,K,M)                                                 \
+        do                                                                     \
+        {                                                                      \
+            E += rol_uint32(A, 5) + F(B, C, D) + K + M;                        \
+            B = rol_uint32(B, 30);                                             \
         } while (0)
 
     while (words < endp)
diff --git a/src/OpenFOAM/primitives/ints/int32/int32.C b/src/OpenFOAM/primitives/ints/int32/int32.C
index 4883be46d5293674a9f9dac707abf9f23b81f748..4a209fc50b9d0b011bd62b58221cdf5378160821 100644
--- a/src/OpenFOAM/primitives/ints/int32/int32.C
+++ b/src/OpenFOAM/primitives/ints/int32/int32.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ const int32_t Foam::pTraits<int32_t>::max = INT32_MAX;
 const int32_t Foam::pTraits<int32_t>::rootMin = pTraits<int32_t>::min;
 const int32_t Foam::pTraits<int32_t>::rootMax = pTraits<int32_t>::max;
 
-const char* Foam::pTraits<int32_t>::componentNames[] = { "" };
+const char* const Foam::pTraits<int32_t>::componentNames[] = { "" };
 
 Foam::pTraits<int32_t>::pTraits(const int32_t& p)
 :
diff --git a/src/OpenFOAM/primitives/ints/int32/int32.H b/src/OpenFOAM/primitives/ints/int32/int32.H
index 694bfb57f74ae6db62689479ef7ca5c196f18717..d2601ad67cb313ff989993f3a5b3b0d487d21ed0 100644
--- a/src/OpenFOAM/primitives/ints/int32/int32.H
+++ b/src/OpenFOAM/primitives/ints/int32/int32.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,20 +89,23 @@ public:
     //- Component type
     typedef int32_t cmptType;
 
+
     // Member constants
 
-        enum
-        {
-            dim = 3,         //!< Dimensionality of space
-            rank = 0,        //!< Rank of int32_t is 0
-            nComponents = 1  //!< Number of components in int32_t is 1
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Rank of int32_t is 0
+        static const direction rank = 0;
+
+        //- Number of components in int32_t is 1
+        static const direction nComponents = 1;
 
 
     // Static data members
 
         static const char* const typeName;
-        static const char* componentNames[];
+        static const char* const componentNames[];
         static const int32_t zero;
         static const int32_t one;
         static const int32_t min;
diff --git a/src/OpenFOAM/primitives/ints/int64/int64.C b/src/OpenFOAM/primitives/ints/int64/int64.C
index 5b58fad539b3ec36227ffa7289b322724d867a73..f182c9d2760e453509428fe8980214541941d191 100644
--- a/src/OpenFOAM/primitives/ints/int64/int64.C
+++ b/src/OpenFOAM/primitives/ints/int64/int64.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ const int64_t Foam::pTraits<int64_t>::max = INT64_MAX;
 const int64_t Foam::pTraits<int64_t>::rootMin = pTraits<int64_t>::min;
 const int64_t Foam::pTraits<int64_t>::rootMax = pTraits<int64_t>::max;
 
-const char* Foam::pTraits<int64_t>::componentNames[] = { "" };
+const char* const Foam::pTraits<int64_t>::componentNames[] = { "" };
 
 Foam::pTraits<int64_t>::pTraits(const int64_t& p)
 :
diff --git a/src/OpenFOAM/primitives/ints/int64/int64.H b/src/OpenFOAM/primitives/ints/int64/int64.H
index 38cd1057860e0788653b17a94f591e8f9744be10..2bb5a05804fa486cc4e97206a174626a28d98b70 100644
--- a/src/OpenFOAM/primitives/ints/int64/int64.H
+++ b/src/OpenFOAM/primitives/ints/int64/int64.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,20 +80,23 @@ public:
     //- Component type
     typedef int64_t cmptType;
 
+
     // Member constants
 
-        enum
-        {
-            dim = 3,         //!< Dimensionality of space
-            rank = 0,        //!< Rank of int64_t is 0
-            nComponents = 1  //!< Number of components in int64_t is 1
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Rank of int64_t is 0
+        static const direction rank = 0;
+
+        //- Number of components in int64_t is 1
+        static const direction nComponents = 1;
 
 
     // Static data members
 
         static const char* const typeName;
-        static const char* componentNames[];
+        static const char* const componentNames[];
         static const int64_t zero;
         static const int64_t one;
         static const int64_t min;
diff --git a/src/OpenFOAM/primitives/ints/uint/uintIO.C b/src/OpenFOAM/primitives/ints/uint/uintIO.C
index 859eb1f8f60a058b6e178fc2be9303558851e7ab..eb591db54c22fd8a23bcc09aa8af294ce631b3b8 100644
--- a/src/OpenFOAM/primitives/ints/uint/uintIO.C
+++ b/src/OpenFOAM/primitives/ints/uint/uintIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,9 +28,9 @@ License
 
 // * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
 
-uint Foam::readUint(Istream& is)
+unsigned int Foam::readUint(Istream& is)
 {
-    uint val;
+    unsigned int val;
     is >> val;
 
     return val;
diff --git a/src/OpenFOAM/primitives/ints/uint32/uint32.C b/src/OpenFOAM/primitives/ints/uint32/uint32.C
index 2ffe5445dc4369a73dea0e06175d16c44bbb5bd5..c195b355a457f57fab6d6c88824fca23282988a3 100644
--- a/src/OpenFOAM/primitives/ints/uint32/uint32.C
+++ b/src/OpenFOAM/primitives/ints/uint32/uint32.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ const uint32_t Foam::pTraits<uint32_t>::max = INT32_MAX;
 const uint32_t Foam::pTraits<uint32_t>::rootMin = pTraits<uint32_t>::min;
 const uint32_t Foam::pTraits<uint32_t>::rootMax = pTraits<uint32_t>::max;
 
-const char* Foam::pTraits<uint32_t>::componentNames[] = { "" };
+const char* const Foam::pTraits<uint32_t>::componentNames[] = { "" };
 
 Foam::pTraits<uint32_t>::pTraits(const uint32_t& p)
 :
diff --git a/src/OpenFOAM/primitives/ints/uint32/uint32.H b/src/OpenFOAM/primitives/ints/uint32/uint32.H
index 07058dcdcc954482f6bd0c1229c24cee22480405..83c3b18c67ac7975395ffc5946018e719d0b7d7e 100644
--- a/src/OpenFOAM/primitives/ints/uint32/uint32.H
+++ b/src/OpenFOAM/primitives/ints/uint32/uint32.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,20 +80,23 @@ public:
     //- Component type
     typedef uint32_t cmptType;
 
+
     // Member constants
 
-        enum
-        {
-            dim = 3,         //!< Dimensionality of space
-            rank = 0,        //!< Rank of uint32_t is 0
-            nComponents = 1  //!< Number of components in uint32_t is 1
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Rank of uint32_t is 0
+        static const direction rank = 0;
+
+        //- Number of components in uint32_t is 1
+        static const direction nComponents = 1;
 
 
     // Static data members
 
         static const char* const typeName;
-        static const char* componentNames[];
+        static const char* const componentNames[];
         static const uint32_t zero;
         static const uint32_t one;
         static const uint32_t min;
@@ -119,7 +122,7 @@ public:
             return p_;
         }
 
-        //- Access to the uint value
+        //- Access to the uint32_t value
         operator uint32_t&()
         {
             return p_;
diff --git a/src/OpenFOAM/primitives/ints/uint64/uint64.C b/src/OpenFOAM/primitives/ints/uint64/uint64.C
index 63fd8b319429227bbb6f351fc6a40925f796ad35..b099c4b4e03fa2c2ff417025cf0aac20f51686b5 100644
--- a/src/OpenFOAM/primitives/ints/uint64/uint64.C
+++ b/src/OpenFOAM/primitives/ints/uint64/uint64.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ const uint64_t Foam::pTraits<uint64_t>::max = INT64_MAX;
 const uint64_t Foam::pTraits<uint64_t>::rootMin = pTraits<uint64_t>::min;
 const uint64_t Foam::pTraits<uint64_t>::rootMax = pTraits<uint64_t>::max;
 
-const char* Foam::pTraits<uint64_t>::componentNames[] = { "" };
+const char* const Foam::pTraits<uint64_t>::componentNames[] = { "" };
 
 Foam::pTraits<uint64_t>::pTraits(const uint64_t& p)
 :
diff --git a/src/OpenFOAM/primitives/ints/uint64/uint64.H b/src/OpenFOAM/primitives/ints/uint64/uint64.H
index c4f3b581c632bc7ec9ee00fbe2cdb149641dd2f5..e1a742b6c2206e6c8c9aa1500ebcffb635a3ec17 100644
--- a/src/OpenFOAM/primitives/ints/uint64/uint64.H
+++ b/src/OpenFOAM/primitives/ints/uint64/uint64.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,20 +80,23 @@ public:
     //- Component type
     typedef uint64_t cmptType;
 
+
     // Member constants
 
-        enum
-        {
-            dim = 3,         //!< Dimensionality of space
-            rank = 0,        //!< Rank of uint64_t is 0
-            nComponents = 1  //!< Number of components in uint64_t is 1
-        };
+        //- Dimensionality of space
+        static const direction dim = 3;
+
+        //- Rank of uint64_t is 0
+        static const direction rank = 0;
+
+        //- Number of components in uint64_t is 1
+        static const direction nComponents = 1;
 
 
     // Static data members
 
         static const char* const typeName;
-        static const char* componentNames[];
+        static const char* const componentNames[];
         static const uint64_t zero;
         static const uint64_t one;
         static const uint64_t min;
@@ -119,7 +122,7 @@ public:
             return p_;
         }
 
-        //- Access to the uint value
+        //- Access to the uint64_t value
         operator uint64_t&()
         {
             return p_;
diff --git a/src/OpenFOAM/primitives/nullObject/nullObject.H b/src/OpenFOAM/primitives/nullObject/nullObject.H
index d324a92500ef60671e6e2f3cb6b50ff4b256b24b..71217836c15561f8ed76f5e25e72ea68f92ee1b6 100644
--- a/src/OpenFOAM/primitives/nullObject/nullObject.H
+++ b/src/OpenFOAM/primitives/nullObject/nullObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,11 +51,11 @@ class NullObject
     NullObject()
     {}
 
-    //- Prevent copy-construction
+    //- Disallow default bitwise copy construct
     NullObject(const NullObject&);
 
-    //- Prevent assignment
-    NullObject& operator=(const NullObject&);
+    //- Disallow default bitwise assignment
+    void operator=(const NullObject&);
 
 public:
 
@@ -69,29 +69,29 @@ extern const NullObject* nullObjectPtr;
 
 
 //- Return reference to the nullObject of type T
-template <class T>
+template<class T>
 inline const T& NullObjectRef();
 
 //- Return pointer to the nullObject of type T
-template <class T>
+template<class T>
 inline const T* NullObjectPtr();
 
 
 //- Return true if t is a reference to the nullObject of type T
-template <class T>
+template<class T>
 inline bool isNull(const T& t);
 
 //- Return true if t is not a reference to the nullObject of type T
-template <class T>
+template<class T>
 inline bool notNull(const T& t);
 
 
 //- Return true if t is a pointer to the nullObject of type T
-template <class T>
+template<class T>
 inline bool isNull(const T* t);
 
 //- Return true if t is not a pointer to the nullObject of type T
-template <class T>
+template<class T>
 inline bool notNull(const T* t);
 
 
diff --git a/src/OpenFOAM/primitives/nullObject/nullObjectI.H b/src/OpenFOAM/primitives/nullObject/nullObjectI.H
index 4f8fbc1f731402da896f4ee968aa091679922ccf..727de5838b995ba466b5070ea2f42139bd2474d2 100644
--- a/src/OpenFOAM/primitives/nullObject/nullObjectI.H
+++ b/src/OpenFOAM/primitives/nullObject/nullObjectI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,39 +23,39 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-template <class T>
+template<class T>
 inline const T& Foam::NullObjectRef()
 {
     return *reinterpret_cast<const T*>(nullObjectPtr);
 }
 
-template <class T>
+template<class T>
 inline const T* Foam::NullObjectPtr()
 {
     return reinterpret_cast<const T*>(nullObjectPtr);
 }
 
 
-template <class T>
+template<class T>
 inline bool Foam::isNull(const T& t)
 {
     return &t == NullObjectPtr<T>();
 }
 
-template <class T>
+template<class T>
 inline bool Foam::notNull(const T& t)
 {
     return &t != NullObjectPtr<T>();
 }
 
 
-template <class T>
+template<class T>
 inline bool Foam::isNull(const T* t)
 {
     return t == NullObjectPtr<T>();
 }
 
-template <class T>
+template<class T>
 inline bool Foam::notNull(const T* t)
 {
     return t != NullObjectPtr<T>();
diff --git a/src/OpenFOAM/primitives/one/one.H b/src/OpenFOAM/primitives/one/one.H
index 28b7f487abfc2807a19865f8320ece09a02d9ba6..a184af000dfc401a333b83e4adb2ac095e069e58 100644
--- a/src/OpenFOAM/primitives/one/one.H
+++ b/src/OpenFOAM/primitives/one/one.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,11 +29,16 @@ Description
     unnecessary manipulations for objects which are known to be one at
     compile-time.
 
+SourceFiles
+    oneI.H
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef one_H
 #define one_H
 
+#include "label.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
@@ -47,11 +52,34 @@ class one
 {
 public:
 
+    typedef one value_type;
+
     // Constructors
 
         //- Construct null
         one()
         {}
+
+
+    // Member operators
+
+        //- Return 1 for label
+        inline operator label() const
+        {
+            return 1;
+        }
+
+        //- Return 1 for float
+        inline operator float() const
+        {
+            return 1;
+        }
+
+        //- Return 1 for double
+        inline operator double() const
+        {
+            return 1;
+        }
 };
 
 
diff --git a/src/OpenFOAM/primitives/one/oneI.H b/src/OpenFOAM/primitives/one/oneI.H
index 69a8f685f4aa948e58c0ab5fc3a392bc9ae36066..05be7ad1201c1d3ec431bb0f5d3c03e5fadde874 100644
--- a/src/OpenFOAM/primitives/one/oneI.H
+++ b/src/OpenFOAM/primitives/one/oneI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "one.H"
+#include "scalar.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -32,6 +33,14 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+template<class arg2>
+class innerProduct<one, arg2>
+{
+public:
+
+    typedef arg2 type;
+};
+
 inline const one& operator*(const one& o, const one&)
 {
     return o;
@@ -49,6 +58,11 @@ inline const Type& operator*(const one&, const Type& t)
     return t;
 }
 
+template<class Type>
+inline const Type& operator&(const one&, const Type& t)
+{
+    return t;
+}
 
 inline const one& operator/(const one& o, const one&)
 {
diff --git a/src/OpenFOAM/primitives/ops/ops.H b/src/OpenFOAM/primitives/ops/ops.H
index 24c72d24ecfb376452ea6477d934b31d521ce366..0db26d0026109fe49f2e008d85aa96de1c3c88a8 100644
--- a/src/OpenFOAM/primitives/ops/ops.H
+++ b/src/OpenFOAM/primitives/ops/ops.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,28 +43,28 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define EqOp(opName, op)                                                    \
-                                                                            \
-template<class T1, class T2>                                                \
-class opName##Op2                                                           \
-{                                                                           \
-public:                                                                     \
-                                                                            \
-    void operator()(T1& x, const T2& y) const                               \
-    {                                                                       \
-        op;                                                                 \
-    }                                                                       \
-};                                                                          \
-                                                                            \
-template<class T>                                                           \
-class opName##Op                                                            \
-{                                                                           \
-public:                                                                     \
-                                                                            \
-    void operator()(T& x, const T& y) const                                 \
-    {                                                                       \
-        op;                                                                 \
-    }                                                                       \
+#define EqOp(opName, op)                                                       \
+                                                                               \
+template<class T1, class T2>                                                   \
+class opName##Op2                                                              \
+{                                                                              \
+public:                                                                        \
+                                                                               \
+    void operator()(T1& x, const T2& y) const                                  \
+    {                                                                          \
+        op;                                                                    \
+    }                                                                          \
+};                                                                             \
+                                                                               \
+template<class T>                                                              \
+class opName##Op                                                               \
+{                                                                              \
+public:                                                                        \
+                                                                               \
+    void operator()(T& x, const T& y) const                                    \
+    {                                                                          \
+        op;                                                                    \
+    }                                                                          \
 };
 
 EqOp(eq, x = y)
@@ -96,67 +96,67 @@ EqOp(nopEq, (void)x)
 #define WARNRETURN
 #endif
 
-#define Op(opName, op)                                                        \
-                                                                              \
-    template<class T, class T1, class T2>                                     \
-    class opName##Op3                                                         \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        T operator()(const T1& x, const T2& y) const WARNRETURN               \
-        {                                                                     \
-            return op;                                                        \
-        }                                                                     \
-    };                                                                        \
-                                                                              \
-    template<class T1, class T2>                                              \
-    class opName##Op2                                                         \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        T1 operator()(const T1& x, const T2& y) const WARNRETURN              \
-        {                                                                     \
-            return op;                                                        \
-        }                                                                     \
-    };                                                                        \
-                                                                              \
-    template<class T>                                                         \
-    class opName##Op                                                          \
-    {                                                                         \
-    public:                                                                   \
-                                                                              \
-        T operator()(const T& x, const T& y) const WARNRETURN                 \
-        {                                                                     \
-            return op;                                                        \
-        }                                                                     \
+#define Op(opName, op)                                                         \
+                                                                               \
+    template<class T, class T1, class T2>                                      \
+    class opName##Op3                                                          \
+    {                                                                          \
+    public:                                                                    \
+                                                                               \
+        T operator()(const T1& x, const T2& y) const WARNRETURN                \
+        {                                                                      \
+            return op;                                                         \
+        }                                                                      \
+    };                                                                         \
+                                                                               \
+    template<class T1, class T2>                                               \
+    class opName##Op2                                                          \
+    {                                                                          \
+    public:                                                                    \
+                                                                               \
+        T1 operator()(const T1& x, const T2& y) const WARNRETURN               \
+        {                                                                      \
+            return op;                                                         \
+        }                                                                      \
+    };                                                                         \
+                                                                               \
+    template<class T>                                                          \
+    class opName##Op                                                           \
+    {                                                                          \
+    public:                                                                    \
+                                                                               \
+        T operator()(const T& x, const T& y) const WARNRETURN                  \
+        {                                                                      \
+            return op;                                                         \
+        }                                                                      \
     };
 
 
-#define weightedOp(opName, op)                                                \
-                                                                              \
-    template<class Type, class CombineOp>                                     \
-    class opName##WeightedOp                                                  \
-    {                                                                         \
-        const CombineOp& cop_;                                                \
-                                                                              \
-        public:                                                               \
-                                                                              \
-            opName##WeightedOp(const CombineOp& cop)                          \
-            :                                                                 \
-                cop_(cop)                                                     \
-            {}                                                                \
-                                                                              \
-            void operator()                                                   \
-            (                                                                 \
-                Type& x,                                                      \
-                const label index,                                            \
-                const Type& y,                                                \
-                const scalar weight                                           \
-            ) const                                                           \
-            {                                                                 \
-                cop_(x, op);                                                  \
-            }                                                                 \
-    };                                                                        \
+#define weightedOp(opName, op)                                                 \
+                                                                               \
+    template<class Type, class CombineOp>                                      \
+    class opName##WeightedOp                                                   \
+    {                                                                          \
+        const CombineOp& cop_;                                                 \
+                                                                               \
+        public:                                                                \
+                                                                               \
+            opName##WeightedOp(const CombineOp& cop)                           \
+            :                                                                  \
+                cop_(cop)                                                      \
+            {}                                                                 \
+                                                                               \
+            void operator()                                                    \
+            (                                                                  \
+                Type& x,                                                       \
+                const label index,                                             \
+                const Type& y,                                                 \
+                const scalar weight                                            \
+            ) const                                                            \
+            {                                                                  \
+                cop_(x, op);                                                   \
+            }                                                                  \
+    };                                                                         \
 
 
 Op(sum, x + y)
diff --git a/src/OpenFOAM/primitives/quaternion/quaternion.C b/src/OpenFOAM/primitives/quaternion/quaternion.C
index df54f702cdb45b0aa96d64ae6f19b86572824a53..fa509113e0ae7dbc0d1fc2b9ebf6dbfbe6057975 100644
--- a/src/OpenFOAM/primitives/quaternion/quaternion.C
+++ b/src/OpenFOAM/primitives/quaternion/quaternion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,13 +69,38 @@ Foam::quaternion Foam::slerp
 }
 
 
+Foam::quaternion Foam::average
+(
+    const UList<quaternion>& qs,
+    const UList<scalar> w
+)
+{
+    quaternion qa(w[0]*qs[0]);
+
+    for (label i=1; i<qs.size(); i++)
+    {
+        // Invert quaternion if it has the opposite sign to the average
+        if ((qa & qs[i]) > 0)
+        {
+            qa += w[i]*qs[i];
+        }
+        else
+        {
+            qa -= w[i]*qs[i];
+        }
+    }
+
+    return qa;
+}
+
+
 Foam::quaternion Foam::exp(const quaternion& q)
 {
     const scalar magV = mag(q.v());
 
     if (magV == 0)
     {
-        return quaternion(1, vector::zero);
+        return quaternion(1, Zero);
     }
 
     const scalar expW = exp(q.w());
diff --git a/src/OpenFOAM/primitives/quaternion/quaternion.H b/src/OpenFOAM/primitives/quaternion/quaternion.H
index 4a4b9f080f36b71beb760891fe22e65374c9cd4d..a36b0eed350f0a1ca03344adf8391508c7111d81 100644
--- a/src/OpenFOAM/primitives/quaternion/quaternion.H
+++ b/src/OpenFOAM/primitives/quaternion/quaternion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,18 +72,43 @@ class quaternion
         //- Multiply vector v by quaternion as if v is a pure quaternion
         inline quaternion mulq0v(const vector& v) const;
 
+        //- Conversion of two-axis rotation components into Euler-angles
+        inline static vector twoAxes
+        (
+            const scalar t11,
+            const scalar t12,
+            const scalar c2,
+            const scalar t31,
+            const scalar t32
+        );
+
+        //- Conversion of three-axis rotation components into Euler-angles
+        inline static vector threeAxes
+        (
+            const scalar t11,
+            const scalar t12,
+            const scalar s2,
+            const scalar t31,
+            const scalar t32
+        );
+
 
 public:
 
     //- Component type
     typedef scalar cmptType;
 
+    //- Euler-angle rotation sequence
+    enum rotationSequence
+    {
+        ZYX, ZYZ, ZXY, ZXZ, YXZ, YXY, YZX, YZY, XYZ, XYX, XZY, XZX
+    };
+
+
     // Member constants
 
-        enum
-        {
-            rank = 1 // Rank of quaternion is 1
-        };
+        //- Rank of quaternion is 1
+        static const direction rank = 1;
 
 
     // Static data members
@@ -115,18 +140,22 @@ public:
             const bool normalized
         );
 
-        //- Construct given scalar part, the vector part = vector::zero
+        //- Construct a real from the given scalar part, the vector part = zero
         inline explicit quaternion(const scalar w);
 
-        //- Construct a pure quaternion given the vector part, scalar part = 0
+        //- Construct a pure imaginary quaternion given the vector part,
+        //  the scalar part = 0
         inline explicit quaternion(const vector& v);
 
+        //- Return the unit quaternion (versor) from the given vector
+        //  (w = sqrt(1 - |sqr(v)|))
+        static inline quaternion unit(const vector& v);
+
         //- Construct a quaternion given the three Euler angles
         inline quaternion
         (
-            const scalar angleX,
-            const scalar angleY,
-            const scalar angleZ
+            const rotationSequence rs,
+            const vector& angles
         );
 
         //- Construct a quaternion from a rotation tensor
@@ -149,9 +178,9 @@ public:
                //- The rotation tensor corresponding the quaternion
                inline tensor R() const;
 
-               //- Return a vector of euler angles (rotations in radians about
-               //  the x, y and z axes.
-               inline vector eulerAngles(const quaternion& q) const;
+               //- Return a vector of euler angles corresponding to the
+               //  specified rotation sequence
+               inline vector eulerAngles(const rotationSequence rs) const;
 
                inline quaternion normalized() const;
 
@@ -230,6 +259,13 @@ quaternion slerp
     const scalar t
 );
 
+//- Simple weighted average with sign change
+quaternion average
+(
+    const UList<quaternion>& qs,
+    const UList<scalar> w
+);
+
 //- Exponent of a quaternion
 quaternion exp(const quaternion& q);
 
diff --git a/src/OpenFOAM/primitives/quaternion/quaternionI.H b/src/OpenFOAM/primitives/quaternion/quaternionI.H
index 025fa638cd0d0069a7c5d5e61751f5502a23590f..b64fc8f26bf106621e13c67cf77555291200c4a3 100644
--- a/src/OpenFOAM/primitives/quaternion/quaternionI.H
+++ b/src/OpenFOAM/primitives/quaternion/quaternionI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,18 +28,21 @@ License
 inline Foam::quaternion::quaternion()
 {}
 
+
 inline Foam::quaternion::quaternion(const scalar w, const vector& v)
 :
     w_(w),
     v_(v)
 {}
 
+
 inline Foam::quaternion::quaternion(const vector& d, const scalar theta)
 :
     w_(cos(0.5*theta)),
     v_((sin(0.5*theta)/mag(d))*d)
 {}
 
+
 inline Foam::quaternion::quaternion
 (
     const vector& d,
@@ -60,30 +63,115 @@ inline Foam::quaternion::quaternion
     }
 }
 
+
 inline Foam::quaternion::quaternion(const scalar w)
 :
     w_(w),
-    v_(vector::zero)
+    v_(Zero)
 {}
 
+
 inline Foam::quaternion::quaternion(const vector& v)
 :
     w_(0),
     v_(v)
 {}
 
+
+inline Foam::quaternion Foam::quaternion::unit(const vector& v)
+{
+    return quaternion(sqrt(1 - magSqr(v)), v);
+}
+
+
 inline Foam::quaternion::quaternion
 (
-    const scalar angleX,
-    const scalar angleY,
-    const scalar angleZ
+    const rotationSequence rs,
+    const vector& angles
 )
 {
-    operator=(quaternion(vector(1, 0, 0), angleX));
-    operator*=(quaternion(vector(0, 1, 0), angleY));
-    operator*=(quaternion(vector(0, 0, 1), angleZ));
+    switch(rs)
+    {
+        case ZYX:
+            operator=(quaternion(vector(0, 0, 1), angles.x()));
+            operator*=(quaternion(vector(0, 1, 0), angles.y()));
+            operator*=(quaternion(vector(1, 0, 0), angles.z()));
+            break;
+
+        case ZYZ:
+            operator=(quaternion(vector(0, 0, 1), angles.x()));
+            operator*=(quaternion(vector(0, 1, 0), angles.y()));
+            operator*=(quaternion(vector(0, 0, 1), angles.z()));
+            break;
+
+        case ZXY:
+            operator=(quaternion(vector(0, 0, 1), angles.x()));
+            operator*=(quaternion(vector(1, 0, 0), angles.y()));
+            operator*=(quaternion(vector(0, 1, 0), angles.z()));
+            break;
+
+        case ZXZ:
+            operator=(quaternion(vector(0, 0, 1), angles.x()));
+            operator*=(quaternion(vector(1, 0, 0), angles.y()));
+            operator*=(quaternion(vector(0, 0, 1), angles.z()));
+            break;
+
+        case YXZ:
+            operator=(quaternion(vector(0, 1, 0), angles.x()));
+            operator*=(quaternion(vector(1, 0, 0), angles.y()));
+            operator*=(quaternion(vector(0, 0, 1), angles.z()));
+            break;
+
+        case YXY:
+            operator=(quaternion(vector(0, 1, 0), angles.x()));
+            operator*=(quaternion(vector(1, 0, 0), angles.y()));
+            operator*=(quaternion(vector(0, 1, 0), angles.z()));
+            break;
+
+        case YZX:
+            operator=(quaternion(vector(0, 1, 0), angles.x()));
+            operator*=(quaternion(vector(0, 0, 1), angles.y()));
+            operator*=(quaternion(vector(1, 0, 0), angles.z()));
+            break;
+
+        case YZY:
+            operator=(quaternion(vector(0, 1, 0), angles.x()));
+            operator*=(quaternion(vector(0, 0, 1), angles.y()));
+            operator*=(quaternion(vector(0, 1, 0), angles.z()));
+            break;
+
+        case XYZ:
+            operator=(quaternion(vector(1, 0, 0), angles.x()));
+            operator*=(quaternion(vector(0, 1, 0), angles.y()));
+            operator*=(quaternion(vector(0, 0, 1), angles.z()));
+            break;
+
+        case XYX:
+            operator=(quaternion(vector(1, 0, 0), angles.x()));
+            operator*=(quaternion(vector(0, 1, 0), angles.y()));
+            operator*=(quaternion(vector(1, 0, 0), angles.z()));
+            break;
+
+        case XZY:
+            operator=(quaternion(vector(1, 0, 0), angles.x()));
+            operator*=(quaternion(vector(0, 0, 1), angles.y()));
+            operator*=(quaternion(vector(0, 1, 0), angles.z()));
+            break;
+
+        case XZX:
+            operator=(quaternion(vector(1, 0, 0), angles.x()));
+            operator*=(quaternion(vector(0, 0, 1), angles.y()));
+            operator*=(quaternion(vector(1, 0, 0), angles.z()));
+            break;
+
+        default:
+            FatalErrorInFunction
+                << "Unknown rotation sequence " << rs << abort(FatalError);
+            break;
+    }
 }
 
+
 inline Foam::quaternion::quaternion
 (
     const tensor& rotationTensor
@@ -234,17 +322,17 @@ inline Foam::quaternion Foam::quaternion::invTransform
 
 inline Foam::tensor Foam::quaternion::R() const
 {
-    scalar w2 = sqr(w());
-    scalar x2 = sqr(v().x());
-    scalar y2 = sqr(v().y());
-    scalar z2 = sqr(v().z());
+    const scalar w2 = sqr(w());
+    const scalar x2 = sqr(v().x());
+    const scalar y2 = sqr(v().y());
+    const scalar z2 = sqr(v().z());
 
-    scalar txy = 2*v().x()*v().y();
-    scalar twz = 2*w()*v().z();
-    scalar txz = 2*v().x()*v().z();
-    scalar twy = 2*w()*v().y();
-    scalar tyz = 2*v().y()*v().z();
-    scalar twx = 2*w()*v().x();
+    const scalar txy = 2*v().x()*v().y();
+    const scalar twz = 2*w()*v().z();
+    const scalar txz = 2*v().x()*v().z();
+    const scalar twy = 2*w()*v().y();
+    const scalar tyz = 2*v().y()*v().z();
+    const scalar twx = 2*w()*v().x();
 
     return tensor
     (
@@ -255,32 +343,181 @@ inline Foam::tensor Foam::quaternion::R() const
 }
 
 
-inline Foam::vector Foam::quaternion::eulerAngles(const quaternion& q) const
+inline Foam::vector Foam::quaternion::twoAxes
+(
+    const scalar t11,
+    const scalar t12,
+    const scalar c2,
+    const scalar t31,
+    const scalar t32
+)
 {
-    vector angles(vector::zero);
+    return vector(atan2(t11, t12), acos(c2), atan2(t31, t32));
+}
 
-    const scalar& w = q.w();
-    const vector& v = q.v();
 
-    angles[0] = Foam::atan2
-    (
-        2*(w*v.x() + v.y()*v.z()),
-        1 - 2*(sqr(v.x()) + sqr(v.y()))
-    );
-    angles[1] = Foam::asin(2*(w*v.y() - v.z()*v.x()));
-    angles[2] = Foam::atan2
-    (
-        2*(w*v.z() + v.x()*v.y()),
-        1 - 2*(sqr(v.y()) + sqr(v.z()))
-    );
+inline Foam::vector Foam::quaternion::threeAxes
+(
+    const scalar t11,
+    const scalar t12,
+    const scalar s2,
+    const scalar t31,
+    const scalar t32
+)
+{
+    return vector(atan2(t11, t12), asin(s2), atan2(t31, t32));
+}
+
 
-    // Convert to degrees
-//    forAll(angles, aI)
-//    {
-//        angles[aI] = Foam::radToDeg(angles[aI]);
-//    }
+inline Foam::vector Foam::quaternion::eulerAngles
+(
+    const rotationSequence rs
+) const
+{
+    const scalar w2 = sqr(w());
+    const scalar x2 = sqr(v().x());
+    const scalar y2 = sqr(v().y());
+    const scalar z2 = sqr(v().z());
+
+    switch(rs)
+    {
+        case ZYX:
+            return threeAxes
+            (
+                2*(v().x()*v().y() + w()*v().z()),
+                w2 + x2 - y2 - z2,
+                2*(w()*v().y() - v().x()*v().z()),
+                2*(v().y()*v().z() + w()*v().x()),
+                w2 - x2 - y2 + z2
+            );
+            break;
 
-    return angles;
+        case ZYZ:
+            return twoAxes
+            (
+                2*(v().y()*v().z() - w()*v().x()),
+                2*(v().x()*v().z() + w()*v().y()),
+                w2 - x2 - y2 + z2,
+                2*(v().y()*v().z() + w()*v().x()),
+                2*(w()*v().y() - v().x()*v().z())
+            );
+            break;
+
+        case ZXY:
+            return threeAxes
+            (
+                2*(w()*v().z() - v().x()*v().y()),
+                w2 - x2 + y2 - z2,
+                2*(v().y()*v().z() + w()*v().x()),
+                2*(w()*v().y() - v().x()*v().z()),
+                w2 - x2 - y2 + z2
+            );
+            break;
+
+        case ZXZ:
+            return twoAxes
+            (
+                2*(v().x()*v().z() + w()*v().y()),
+                2*(w()*v().x() - v().y()*v().z()),
+                w2 - x2 - y2 + z2,
+                2*(v().x()*v().z() - w()*v().y()),
+                2*(v().y()*v().z() + w()*v().x())
+            );
+            break;
+
+        case YXZ:
+            return threeAxes
+            (
+                2*(v().x()*v().z() + w()*v().y()),
+                w2 - x2 - y2 + z2,
+                2*(w()*v().x() - v().y()*v().z()),
+                2*(v().x()*v().y() + w()*v().z()),
+                w2 - x2 + y2 - z2
+            );
+            break;
+
+        case YXY:
+            return twoAxes
+            (
+                2*(v().x()*v().y() - w()*v().z()),
+                2*(v().y()*v().z() + w()*v().x()),
+                w2 - x2 + y2 - z2,
+                2*(v().x()*v().y() + w()*v().z()),
+                2*(w()*v().x() - v().y()*v().z())
+            );
+            break;
+
+        case YZX:
+            return threeAxes
+            (
+                2*(w()*v().y() - v().x()*v().z()),
+                w2 + x2 - y2 - z2,
+                2*(v().x()*v().y() + w()*v().z()),
+                2*(w()*v().x() - v().y()*v().z()),
+                w2 - x2 + y2 - z2
+            );
+            break;
+
+        case YZY:
+            return twoAxes
+            (
+                2*(v().y()*v().z() + w()*v().x()),
+                2*(w()*v().z() - v().x()*v().y()),
+                w2 - x2 + y2 - z2,
+                2*(v().y()*v().z() - w()*v().x()),
+                2*(v().x()*v().y() + w()*v().z())
+            );
+            break;
+
+        case XYZ:
+            return threeAxes
+            (
+                2*(w()*v().x() - v().y()*v().z()),
+                w2 - x2 - y2 + z2,
+                2*(v().x()*v().z() + w()*v().y()),
+                2*(w()*v().z() - v().x()*v().y()),
+                w2 + x2 - y2 - z2
+            );
+            break;
+
+        case XYX:
+            return twoAxes
+            (
+                2*(v().x()*v().y() + w()*v().z()),
+                2*(w()*v().y() - v().x()*v().z()),
+                w2 + x2 - y2 - z2,
+                2*(v().x()*v().y() - w()*v().z()),
+                2*(v().x()*v().z() + w()*v().y())
+            );
+            break;
+
+        case XZY:
+            return threeAxes
+            (
+                2*(v().y()*v().z() + w()*v().x()),
+                w2 - x2 + y2 - z2,
+                2*(w()*v().z() - v().x()*v().y()),
+                2*(v().x()*v().z() + w()*v().y()),
+                w2 + x2 - y2 - z2
+            );
+            break;
+
+        case XZX:
+            return twoAxes
+            (
+                2*(v().x()*v().z() - w()*v().y()),
+                2*(v().x()*v().y() + w()*v().z()),
+                w2 + x2 - y2 - z2,
+                2*(v().x()*v().z() + w()*v().y()),
+                2*(w()*v().z() - v().x()*v().y())
+            );
+            break;
+        default:
+            FatalErrorInFunction
+                << "Unknown rotation sequence " << rs << abort(FatalError);
+            return Zero;
+            break;
+    }
 }
 
 
diff --git a/src/OpenFOAM/primitives/random/cachedRandom/cachedRandom.H b/src/OpenFOAM/primitives/random/cachedRandom/cachedRandom.H
index 46f23adfe5fa5f9128d695d326e8720aadfc1d93..539d8103b1a02dfa4e805b15589a3c05069b4b82 100644
--- a/src/OpenFOAM/primitives/random/cachedRandom/cachedRandom.H
+++ b/src/OpenFOAM/primitives/random/cachedRandom/cachedRandom.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -224,7 +224,7 @@ label cachedRandom::globalPosition<label>(const label& start, const label& end);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cachedRandomTemplates.C"
+    #include "cachedRandomTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/ranges/labelRange/labelRangeI.H b/src/OpenFOAM/primitives/ranges/labelRange/labelRangeI.H
index eaafd563f3bd3d1074e769c5f649e973a4e0eba9..21e839cf3cc44431fc3113fabb3cc413db155a74 100644
--- a/src/OpenFOAM/primitives/ranges/labelRange/labelRangeI.H
+++ b/src/OpenFOAM/primitives/ranges/labelRange/labelRangeI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ inline Foam::labelRange::labelRange(const label start, const label size)
 
 inline Foam::labelRange::const_iterator::const_iterator()
 :
-   range_(*reinterpret_cast< Foam::labelRange* >(0)),
+   range_(*reinterpret_cast<Foam::labelRange* >(0)),
    index_(-1)
 {}
 
diff --git a/src/OpenFOAM/primitives/ranges/labelRange/labelRangesI.H b/src/OpenFOAM/primitives/ranges/labelRange/labelRangesI.H
index 2c6f75aeccc155cbc9740d63cc28d6439eab9796..739d582e9fe39073e963b4aae45a977136b1b73a 100644
--- a/src/OpenFOAM/primitives/ranges/labelRange/labelRangesI.H
+++ b/src/OpenFOAM/primitives/ranges/labelRange/labelRangesI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ inline Foam::labelRanges::labelRanges(const label nElem)
 
 inline Foam::labelRanges::const_iterator::const_iterator()
 :
-   list_(*reinterpret_cast< Foam::labelRanges* >(0)),
+   list_(*reinterpret_cast<Foam::labelRanges* >(0)),
    index_(-1),
    subIndex_(-1)
 {}
diff --git a/src/OpenFOAM/primitives/septernion/septernion.C b/src/OpenFOAM/primitives/septernion/septernion.C
index 67cae051fdbff5ff126e6d25704d1a0f8adbc18d..34562bba06b7b516a15e6e3ac43eec25bc10d30a 100644
--- a/src/OpenFOAM/primitives/septernion/septernion.C
+++ b/src/OpenFOAM/primitives/septernion/septernion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,12 +61,41 @@ Foam::word Foam::name(const septernion& s)
 
 Foam::septernion Foam::slerp
 (
-    const septernion& qa,
-    const septernion& qb,
+    const septernion& sa,
+    const septernion& sb,
     const scalar t
 )
 {
-    return septernion((1.0-t)*qa.t()+t*qb.t(), slerp(qa.r(), qb.r(), t));
+    return septernion((1 - t)*sa.t() + t*sb.t(), slerp(sa.r(), sb.r(), t));
+}
+
+
+Foam::septernion Foam::average
+(
+    const UList<septernion>& ss,
+    const UList<scalar> w
+)
+{
+    septernion sa(w[0]*ss[0]);
+
+    for (label i=1; i<ss.size(); i++)
+    {
+        sa.t() += w[i]*ss[i].t();
+
+        // Invert quaternion if it has the opposite sign to the average
+        if ((sa.r() & ss[i].r()) > 0)
+        {
+            sa.r() += w[i]*ss[i].r();
+        }
+        else
+        {
+            sa.r() -= w[i]*ss[i].r();
+        }
+    }
+
+    normalize(sa.r());
+
+    return sa;
 }
 
 
diff --git a/src/OpenFOAM/primitives/septernion/septernion.H b/src/OpenFOAM/primitives/septernion/septernion.H
index b6a672f3ecc409e6656c03c05b747ca21730be88..eb34cb5a6e766fa15a0c5d095c353041082e1fcc 100644
--- a/src/OpenFOAM/primitives/septernion/septernion.H
+++ b/src/OpenFOAM/primitives/septernion/septernion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,6 +43,7 @@ SourceFiles
 
 #include "vector.H"
 #include "quaternion.H"
+#include "spatialTransform.H"
 #include "word.H"
 #include "contiguous.H"
 
@@ -97,6 +98,9 @@ public:
         //- Construct a pure rotation septernion given a rotation quaternion
         inline explicit septernion(const quaternion& r);
 
+        //- Construct a general septernion from the given spatialTransform
+        inline explicit septernion(const spatialTransform& st);
+
         //- Construct from Istream
         septernion(Istream&);
 
@@ -117,11 +121,11 @@ public:
 
            // Transform
 
-               //- Transform the given vector
-               inline vector transform(const vector& v) const;
+               //- Transform the given coordinate point
+               inline vector transformPoint(const vector& v) const;
 
-               //- Inverse Transform the given vector
-               inline vector invTransform(const vector& v) const;
+               //- Inverse Transform the given coordinate point
+               inline vector invTransformPoint(const vector& v) const;
 
 
     // Member operators
@@ -153,7 +157,6 @@ public:
 //- Return the inverse of the given septernion
 inline septernion inv(const septernion& tr);
 
-
 //- Return a string representation of a septernion
 word name(const septernion&);
 
@@ -165,6 +168,13 @@ septernion slerp
     const scalar t
 );
 
+//- Simple weighted average
+septernion average
+(
+    const UList<septernion>& ss,
+    const UList<scalar> w
+);
+
 //- Data associated with septernion type are contiguous
 template<>
 inline bool contiguous<septernion>() {return true;}
diff --git a/src/OpenFOAM/primitives/septernion/septernionI.H b/src/OpenFOAM/primitives/septernion/septernionI.H
index d4a6a617890a62457446514e3c881f3fad7ce096..8acf2b51e91729988f293b17b6e70061bebe73f2 100644
--- a/src/OpenFOAM/primitives/septernion/septernionI.H
+++ b/src/OpenFOAM/primitives/septernion/septernionI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,10 +42,16 @@ inline Foam::septernion::septernion(const vector& t)
 
 inline Foam::septernion::septernion(const quaternion& r)
 :
-    t_(vector::zero),
+    t_(Zero),
     r_(r)
 {}
 
+inline Foam::septernion::septernion(const spatialTransform& st)
+:
+    t_(st.r()),
+    r_(st.E())
+{}
+
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
@@ -73,15 +79,15 @@ inline Foam::quaternion& Foam::septernion::r()
 }
 
 
-inline Foam::vector Foam::septernion::transform(const vector& v) const
+inline Foam::vector Foam::septernion::transformPoint(const vector& v) const
 {
-    return t() + r().transform(v);
+    return r().transform(v - t());
 }
 
 
-inline Foam::vector Foam::septernion::invTransform(const vector& v) const
+inline Foam::vector Foam::septernion::invTransformPoint(const vector& v) const
 {
-    return r().invTransform(v - t());
+    return t() + r().invTransform(v);
 }
 
 
@@ -95,7 +101,7 @@ inline void Foam::septernion::operator=(const septernion& tr)
 
 inline void Foam::septernion::operator*=(const septernion& tr)
 {
-    t_ += r().transform(tr.t());
+    t_ = tr.t() + tr.r().invTransform(t_);
     r_ *= tr.r();
 }
 
@@ -103,6 +109,7 @@ inline void Foam::septernion::operator*=(const septernion& tr)
 inline void Foam::septernion::operator=(const vector& t)
 {
     t_ = t;
+    r_ = quaternion::I;
 }
 
 inline void Foam::septernion::operator+=(const vector& t)
@@ -118,16 +125,19 @@ inline void Foam::septernion::operator-=(const vector& t)
 
 inline void Foam::septernion::operator=(const quaternion& r)
 {
+    t_ = Zero;
     r_ = r;
 }
 
 inline void Foam::septernion::operator*=(const quaternion& r)
 {
+    t_ = r.invTransform(t_);
     r_ *= r;
 }
 
 inline void Foam::septernion::operator/=(const quaternion& r)
 {
+    t_ = r.transform(t_);
     r_ /= r;
 }
 
@@ -149,7 +159,7 @@ inline void Foam::septernion::operator/=(const scalar s)
 
 inline Foam::septernion Foam::inv(const septernion& tr)
 {
-    return septernion(-tr.r().invTransform(tr.t()), conjugate(tr.r()));
+    return septernion(-tr.r().transform(tr.t()), conjugate(tr.r()));
 }
 
 
@@ -213,7 +223,7 @@ inline Foam::septernion Foam::operator*
     const quaternion& r
 )
 {
-    return septernion(tr.t(), tr.r()*r);
+    return septernion(r.invTransform(tr.t()), tr.r()*r);
 }
 
 
@@ -223,7 +233,7 @@ inline Foam::septernion Foam::operator/
     const quaternion& r
 )
 {
-    return septernion(tr.t(), tr.r()/r);
+    return septernion(r.transform(tr.t()), tr.r()/r);
 }
 
 
@@ -235,7 +245,7 @@ inline Foam::septernion Foam::operator*
 {
     return septernion
     (
-        tr1.t() + tr1.r().transform(tr2.t()),
+        tr2.r().invTransform(tr1.t()) + tr2.t(),
         tr1.r().transform(tr2.r())
     );
 }
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H
new file mode 100644
index 0000000000000000000000000000000000000000..4f2e0bbd3da80b49001f8614d6c02ab143c2ee03
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensor.H
@@ -0,0 +1,139 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::CompactSpatialTensor
+
+Description
+    Templated 3D compact spatial tensor derived from MatrixSpace used to
+    represent transformations of spatial vectors and the angular and linear
+    inertia of rigid bodies.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+    \endverbatim
+
+SourceFiles
+    CompactSpatialTensorI.H
+
+SeeAlso
+    Foam::MatrixSpace
+    Foam::SpatialTensor
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef CompactSpatialTensor_H
+#define CompactSpatialTensor_H
+
+#include "SpatialTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                     Class CompactSpatialTensor Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Cmpt>
+class CompactSpatialTensor
+:
+    public MatrixSpace<CompactSpatialTensor<Cmpt>, Cmpt, 6, 3>
+{
+
+public:
+
+    // Constructors
+
+        //- Construct null
+        inline CompactSpatialTensor();
+
+        inline CompactSpatialTensor(const Foam::zero);
+
+        //- Construct given MatrixSpace of the same rank
+        inline CompactSpatialTensor
+        (
+            const typename CompactSpatialTensor::msType&
+        );
+
+        //- Construct given 18 components
+        inline CompactSpatialTensor
+        (
+            const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
+            const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
+            const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
+            const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
+            const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
+            const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
+        );
+
+        //- Construct from Istream
+        inline CompactSpatialTensor(Istream&);
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct<Cmpt, CompactSpatialTensor<Cmpt>, Tensor<Cmpt>>
+{
+public:
+
+    typedef CompactSpatialTensor<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct<Cmpt, CompactSpatialTensor<Cmpt>, Vector<Cmpt>>
+{
+public:
+
+    typedef SpatialVector<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct<Cmpt, SpatialTensor<Cmpt>, CompactSpatialTensor<Cmpt>>
+{
+public:
+
+    typedef CompactSpatialTensor<Cmpt> type;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Include inline implementations
+#include "CompactSpatialTensorI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensorI.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensorI.H
new file mode 100644
index 0000000000000000000000000000000000000000..742faf5716ee4f87996ac03bcdb7f070c6369879
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/CompactSpatialTensorI.H
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor()
+{}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor
+(
+    const Foam::zero
+)
+:
+    CompactSpatialTensor::msType(Zero)
+{}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor
+(
+    const typename CompactSpatialTensor::msType& ms
+)
+:
+    CompactSpatialTensor::msType(ms)
+{}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor
+(
+    const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
+    const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
+    const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
+    const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
+    const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
+    const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
+)
+{
+    this->v_[0] = t00;
+    this->v_[1] = t01;
+    this->v_[2] = t02;
+
+    this->v_[6 + 0] = t10;
+    this->v_[6 + 1] = t11;
+    this->v_[6 + 2] = t12;
+
+    this->v_[12 + 0] = t20;
+    this->v_[12 + 1] = t21;
+    this->v_[12 + 2] = t22;
+
+    this->v_[18 + 0] = t30;
+    this->v_[18 + 1] = t31;
+    this->v_[18 + 2] = t32;
+
+    this->v_[24 + 0] = t40;
+    this->v_[24 + 1] = t41;
+    this->v_[24 + 2] = t42;
+
+    this->v_[30 + 0] = t50;
+    this->v_[30 + 1] = t51;
+    this->v_[30 + 2] = t52;
+}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor(Istream& is)
+:
+    CompactSpatialTensor::msType(is)
+{}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.C b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.C
new file mode 100644
index 0000000000000000000000000000000000000000..8004cd034733f21cf4668b24cd407e5427cb8eb7
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.C
@@ -0,0 +1,84 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "compactSpatialTensor.H"
+#include "CompactSpatialTensorT.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+template<>
+const char* const Foam::compactSpatialTensor::vsType::typeName =
+    "compactSpatialTensor";
+
+template<>
+const char* const Foam::compactSpatialTensor::vsType::componentNames[] =
+{
+    "Exx",  "Exy",  "Exz",
+    "Eyx",  "Eyy",  "Eyz",
+    "Ezx",  "Ezy",  "Ezz",
+
+    "Erxx", "Erxy", "Erxz",
+    "Eryx", "Eryy", "Eryz",
+    "Erzx", "Erzy", "Erzz",
+};
+
+template<>
+const Foam::compactSpatialTensor Foam::compactSpatialTensor::vsType::zero
+(
+    Foam::compactSpatialTensor::uniform(0)
+);
+
+template<>
+const Foam::compactSpatialTensor Foam::compactSpatialTensor::vsType::one
+(
+    compactSpatialTensor::uniform(1)
+);
+
+template<>
+const Foam::compactSpatialTensor Foam::compactSpatialTensor::vsType::max
+(
+    compactSpatialTensor::uniform(VGREAT)
+);
+
+template<>
+const Foam::compactSpatialTensor Foam::compactSpatialTensor::vsType::min
+(
+    compactSpatialTensor::uniform(-VGREAT)
+);
+
+template<>
+const Foam::compactSpatialTensor Foam::compactSpatialTensor::vsType::rootMax
+(
+    compactSpatialTensor::uniform(ROOTVGREAT)
+);
+
+template<>
+const Foam::compactSpatialTensor Foam::compactSpatialTensor::vsType::rootMin
+(
+    compactSpatialTensor::uniform(-ROOTVGREAT)
+);
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H
new file mode 100644
index 0000000000000000000000000000000000000000..fac906e11af245966d94010f7a46cb1a864737c9
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensor/compactSpatialTensor/compactSpatialTensor.H
@@ -0,0 +1,62 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Typedef
+    Foam::compactSpatialTensor
+
+Description
+    CompactSpatialTensor of scalars.
+
+SourceFiles
+    CompactSpatialTensor.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef compactSpatialTensor_H
+#define compactSpatialTensor_H
+
+#include "CompactSpatialTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+typedef CompactSpatialTensor<scalar> compactSpatialTensor;
+
+//- Data associated with compactSpatialTensor type are contiguous
+template<>
+inline bool contiguous<compactSpatialTensor>() {return true;}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H
new file mode 100644
index 0000000000000000000000000000000000000000..fbb1d6adf63fb47ef1af496c278bc5aedfc0485a
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorT.H
@@ -0,0 +1,171 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::CompactSpatialTensorT
+
+Description
+    Templated 3D transposed compact spatial tensor derived from MatrixSpace
+    used to represent transformations of spatial vectors of rigid bodies.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+    \endverbatim
+
+SourceFiles
+    CompactSpatialTensorTI.H
+
+SeeAlso
+    Foam::MatrixSpace
+    Foam::CompactSpatialTensor
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef CompactSpatialTensorT_H
+#define CompactSpatialTensorT_H
+
+#include "CompactSpatialTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                     Class CompactSpatialTensor Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Cmpt>
+class CompactSpatialTensorT
+:
+    public MatrixSpace<CompactSpatialTensorT<Cmpt>, Cmpt, 3, 6>
+{
+
+public:
+
+    // Constructors
+
+        //- Construct null
+        inline CompactSpatialTensorT();
+
+        inline CompactSpatialTensorT(const Foam::zero);
+
+        //- Construct given MatrixSpace of the same rank
+        inline CompactSpatialTensorT
+        (
+            const typename CompactSpatialTensorT::msType&
+        );
+
+        //- Construct given 18 components
+        inline CompactSpatialTensorT
+        (
+            const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
+            const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
+            const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
+            const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
+            const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
+            const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
+        );
+
+        //- Construct from Istream
+        inline CompactSpatialTensorT(Istream&);
+};
+
+
+template<class Cmpt>
+class typeOfTranspose<Cmpt, CompactSpatialTensor<Cmpt>>
+{
+public:
+
+    typedef CompactSpatialTensorT<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfTranspose<Cmpt, CompactSpatialTensorT<Cmpt>>
+{
+public:
+
+    typedef CompactSpatialTensor<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct
+<
+    Cmpt,
+    CompactSpatialTensor<Cmpt>,
+    CompactSpatialTensorT<Cmpt>
+>
+{
+public:
+
+    typedef SpatialTensor<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct
+<
+    Cmpt,
+    CompactSpatialTensorT<Cmpt>,
+    CompactSpatialTensor<Cmpt>
+>
+{
+public:
+
+    typedef Tensor<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct
+<
+    Cmpt,
+    CompactSpatialTensorT<Cmpt>,
+    SpatialVector<Cmpt>
+>
+{
+public:
+
+    typedef Vector<Cmpt> type;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Include inline implementations
+#include "CompactSpatialTensorTI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorTI.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorTI.H
new file mode 100644
index 0000000000000000000000000000000000000000..284a3b3d0f775f37a2146a011d52446e92630d74
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/CompactSpatialTensorT/CompactSpatialTensorTI.H
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensorT<Cmpt>::CompactSpatialTensorT()
+{}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensorT<Cmpt>::CompactSpatialTensorT
+(
+    const Foam::zero
+)
+:
+    CompactSpatialTensorT::msType(Zero)
+{}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensorT<Cmpt>::CompactSpatialTensorT
+(
+    const typename CompactSpatialTensorT::msType& ms
+)
+:
+    CompactSpatialTensorT::msType(ms)
+{}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensorT<Cmpt>::CompactSpatialTensorT
+(
+    const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
+    const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
+    const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
+    const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
+    const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
+    const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
+)
+{
+    this->v_[0] = t00;
+    this->v_[1] = t01;
+    this->v_[2] = t02;
+
+    this->v_[6 + 0] = t10;
+    this->v_[6 + 1] = t11;
+    this->v_[6 + 2] = t12;
+
+    this->v_[12 + 0] = t20;
+    this->v_[12 + 1] = t21;
+    this->v_[12 + 2] = t22;
+
+    this->v_[18 + 0] = t30;
+    this->v_[18 + 1] = t31;
+    this->v_[18 + 2] = t32;
+
+    this->v_[24 + 0] = t40;
+    this->v_[24 + 1] = t41;
+    this->v_[24 + 2] = t42;
+
+    this->v_[30 + 0] = t50;
+    this->v_[30 + 1] = t51;
+    this->v_[30 + 2] = t52;
+}
+
+
+template<class Cmpt>
+inline Foam::CompactSpatialTensorT<Cmpt>::CompactSpatialTensorT(Istream& is)
+:
+    CompactSpatialTensorT::msType(is)
+{}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H
new file mode 100644
index 0000000000000000000000000000000000000000..04d53b5979bc5352bf036e414f29accd07e1f895
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensor.H
@@ -0,0 +1,178 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::SpatialTensor
+
+Description
+    Templated 3D spatial tensor derived from MatrixSpace used to represent
+    transformations of spatial vectors and the angular and linear inertia of
+    rigid bodies.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+    \endverbatim
+
+SourceFiles
+    SpatialTensorI.H
+
+SeeAlso
+    Foam::MatrixSpace
+    Foam::Tensor
+    Foam::SpatialVector
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef SpatialTensor_H
+#define SpatialTensor_H
+
+#include "Tensor.H"
+#include "SpatialVector.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class SpatialTensor Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Cmpt>
+class SpatialTensor
+:
+    public MatrixSpace<SpatialTensor<Cmpt>, Cmpt, 6, 6>
+{
+
+public:
+
+    // Member constants
+
+        //- Rank of Tensor is 2
+        static const direction rank = 2;
+
+
+    // Static data members
+
+        //- Identity matrix for square matrices
+        static const SpatialTensor I;
+
+
+    // Constructors
+
+        //- Construct null
+        inline SpatialTensor();
+
+        //- Construct initialized to zero
+        inline SpatialTensor(const Foam::zero);
+
+        //- Construct given MatrixSpace of the same rank
+        inline SpatialTensor(const typename SpatialTensor::msType&);
+
+        //- Construct given 4 tensor blocks
+        inline SpatialTensor
+        (
+            const Tensor<Cmpt>& t00, const Tensor<Cmpt>& t01,
+            const Tensor<Cmpt>& t10, const Tensor<Cmpt>& t11
+        );
+
+        //- Construct given 36 components
+        inline SpatialTensor
+        (
+            const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
+            const Cmpt& t03, const Cmpt& t04, const Cmpt& t05,
+
+            const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
+            const Cmpt& t13, const Cmpt& t14, const Cmpt& t15,
+
+            const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
+            const Cmpt& t23, const Cmpt& t24, const Cmpt& t25,
+
+            const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
+            const Cmpt& t33, const Cmpt& t34, const Cmpt& t35,
+
+            const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
+            const Cmpt& t43, const Cmpt& t44, const Cmpt& t45,
+
+            const Cmpt& t50, const Cmpt& t51, const Cmpt& t52,
+            const Cmpt& t53, const Cmpt& t54, const Cmpt& t55
+        );
+
+        //- Construct from Istream
+        inline SpatialTensor(Istream&);
+};
+
+
+template<class Cmpt>
+class typeOfTranspose<Cmpt, SpatialTensor<Cmpt>>
+{
+public:
+
+    typedef SpatialTensor<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfOuterProduct<Cmpt, SpatialVector<Cmpt>, SpatialVector<Cmpt>>
+{
+public:
+
+    typedef SpatialTensor<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct<Cmpt, SpatialTensor<Cmpt>, SpatialVector<Cmpt>>
+{
+public:
+
+    typedef SpatialVector<Cmpt> type;
+};
+
+
+template<class Cmpt>
+class typeOfInnerProduct<Cmpt, SpatialTensor<Cmpt>, SpatialTensor<Cmpt>>
+{
+public:
+
+    typedef SpatialTensor<Cmpt> type;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Include inline implementations
+#include "SpatialTensorI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensorI.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensorI.H
new file mode 100644
index 0000000000000000000000000000000000000000..16f6967a4abc422bc855da346c3d0b9376c22fde
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/SpatialTensorI.H
@@ -0,0 +1,187 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Identity.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt>::SpatialTensor()
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt>::SpatialTensor(const Foam::zero)
+:
+    SpatialTensor::msType(Zero)
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt>::SpatialTensor
+(
+    const typename SpatialTensor::msType& ms
+)
+:
+    SpatialTensor::msType(ms)
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt>::SpatialTensor
+(
+    const Tensor<Cmpt>& t00, const Tensor<Cmpt>& t01,
+    const Tensor<Cmpt>& t10, const Tensor<Cmpt>& t11
+)
+{
+    // Block (0, 0)
+    this->v_[0] = t00.xx();   this->v_[1] = t00.xy();   this->v_[2] = t00.xz();
+    this->v_[6] = t00.yx();   this->v_[7] = t00.yy();   this->v_[8] = t00.yz();
+    this->v_[12] = t00.zx();  this->v_[13] = t00.zy();  this->v_[14] = t00.zz();
+
+    // Block (0, 1)
+    this->v_[3] = t01.xx();   this->v_[4] = t01.xy();   this->v_[5] = t01.xz();
+    this->v_[9] = t01.yx();   this->v_[10] = t01.yy();  this->v_[11] = t01.yz();
+    this->v_[15] = t01.zx();  this->v_[16] = t01.zy();  this->v_[17] = t01.zz();
+
+    // Block (1, 0)
+    this->v_[18] = t10.xx();  this->v_[19] = t10.xy();  this->v_[20] = t10.xz();
+    this->v_[24] = t10.yx();  this->v_[25] = t10.yy();  this->v_[26] = t10.yz();
+    this->v_[30] = t10.zx();  this->v_[31] = t10.zy();  this->v_[32] = t10.zz();
+
+    // Block (1, 1)
+    this->v_[21] = t11.xx();  this->v_[22] = t11.xy();  this->v_[23] = t11.xz();
+    this->v_[27] = t11.yx();  this->v_[28] = t11.yy();  this->v_[29] = t11.yz();
+    this->v_[33] = t11.zx();  this->v_[34] = t11.zy();  this->v_[35] = t11.zz();
+}
+
+
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt>::SpatialTensor
+(
+    const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
+    const Cmpt& t03, const Cmpt& t04, const Cmpt& t05,
+
+    const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
+    const Cmpt& t13, const Cmpt& t14, const Cmpt& t15,
+
+    const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
+    const Cmpt& t23, const Cmpt& t24, const Cmpt& t25,
+
+    const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
+    const Cmpt& t33, const Cmpt& t34, const Cmpt& t35,
+
+    const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
+    const Cmpt& t43, const Cmpt& t44, const Cmpt& t45,
+
+    const Cmpt& t50, const Cmpt& t51, const Cmpt& t52,
+    const Cmpt& t53, const Cmpt& t54, const Cmpt& t55
+)
+{
+    // Row 0
+    this->v_[0] = t00;    this->v_[1] = t01;    this->v_[2] = t02;
+    this->v_[3] = t03;    this->v_[4] = t04;    this->v_[5] = t05;
+
+    // Row 1
+    this->v_[6] = t10;    this->v_[7] = t11;    this->v_[8] = t12;
+    this->v_[9] = t13;    this->v_[10] = t14;   this->v_[11] = t15;
+
+    // Row 2
+    this->v_[12] = t20;   this->v_[13] = t21;   this->v_[14] = t22;
+    this->v_[15] = t23;   this->v_[16] = t24;   this->v_[17] = t25;
+
+    // Row 3
+    this->v_[18] = t30;   this->v_[19] = t31;   this->v_[20] = t32;
+    this->v_[21] = t33;   this->v_[22] = t34;   this->v_[23] = t35;
+
+    // Row 4
+    this->v_[24] = t40;   this->v_[25] = t41;   this->v_[26] = t42;
+    this->v_[27] = t43;   this->v_[28] = t44;   this->v_[29] = t45;
+
+    // Row 5
+    this->v_[30] = t50;   this->v_[31] = t51;   this->v_[32] = t52;
+    this->v_[33] = t53;   this->v_[34] = t54;   this->v_[35] = t55;
+}
+
+
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt>::SpatialTensor(Istream& is)
+:
+    SpatialTensor::msType(is)
+{}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
+
+//- Return the cross-product tensor
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt> operator^
+(
+    const SpatialVector<Cmpt>& v,
+    const Identity<Cmpt>&
+)
+{
+    return SpatialTensor<Cmpt>
+    (
+        0,       -v.wz(),   v.wy(),   0,        0,        0,
+        v.wz(),   0,       -v.wx(),   0,        0,        0,
+       -v.wy(),   v.wx(),   0,        0,        0,        0,
+        0,       -v.lz(),   v.ly(),   0,       -v.wz(),   v.wy(),
+        v.lz(),   0,       -v.lx(),   v.wz(),   0,       -v.wx(),
+       -v.ly(),   v.lx(),   0,       -v.wy(),   v.wx(),   0
+    );
+}
+
+
+//- Return the dual cross-product tensor
+template<class Cmpt>
+inline Foam::SpatialTensor<Cmpt> operator^
+(
+    const SpatialVector<Cmpt>& f,
+    const typename Identity<Cmpt>::dual&
+)
+{
+    return SpatialTensor<Cmpt>
+    (
+        0,       -f.wz(),   f.wy(),   0,       -f.lz(),   f.ly(),
+        f.wz(),   0,       -f.wx(),   f.lz(),   0,       -f.lx(),
+       -f.wy(),   f.wx(),   0,       -f.ly(),   f.lx(),   0,
+        0,        0,        0,        0,       -f.wz(),   f.wy(),
+        0,        0,        0,        f.wz(),   0,       -f.wx(),
+        0,        0,        0,       -f.wy(),   f.wx(),   0
+    );
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.C b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.C
new file mode 100644
index 0000000000000000000000000000000000000000..191d6c34f3a6cfa68faf5cf78850195a6c68db2d
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.C
@@ -0,0 +1,88 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "spatialTensor.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+template<>
+const char* const Foam::spatialTensor::vsType::typeName = "spatialTensor";
+
+template<>
+const char* const Foam::spatialTensor::vsType::componentNames[] =
+{
+    "Exx",  "Exy",  "Exz",    "Erxx", "Erxy", "Erxz",
+    "Eyx",  "Eyy",  "Eyz",    "Eryx", "Eryy", "Eryz",
+    "Ezx",  "Ezy",  "Ezz",    "Erzx", "Erzy", "Erzz"
+
+    "Erxx", "Erxy", "Erxz",   "Exx",  "Exy",  "Exz",
+    "Eryx", "Eryy", "Eryz",   "Eyx",  "Eyy",  "Eyz",
+    "Erzx", "Erzy", "Erzz",   "Ezx",  "Ezy",  "Ezz"
+};
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::vsType::zero
+(
+    Foam::spatialTensor::uniform(0)
+);
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::vsType::one
+(
+    spatialTensor::uniform(1)
+);
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::vsType::max
+(
+    spatialTensor::uniform(VGREAT)
+);
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::vsType::min
+(
+    spatialTensor::uniform(-VGREAT)
+);
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::vsType::rootMax
+(
+    spatialTensor::uniform(ROOTVGREAT)
+);
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::vsType::rootMin
+(
+    spatialTensor::uniform(-ROOTVGREAT)
+);
+
+template<>
+const Foam::spatialTensor Foam::spatialTensor::I
+(
+    Foam::spatialTensor::identity()
+);
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H
new file mode 100644
index 0000000000000000000000000000000000000000..bd44cb386280565b3d7b42b0f1ba016b4108cb11
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialTensor/spatialTensor/spatialTensor.H
@@ -0,0 +1,62 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Typedef
+    Foam::spatialTensor
+
+Description
+    SpatialTensor of scalars.
+
+SourceFiles
+    spatialTensor.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef spatialTensor_H
+#define spatialTensor_H
+
+#include "SpatialTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+typedef SpatialTensor<scalar> spatialTensor;
+
+//- Data associated with spatialTensor type are contiguous
+template<>
+inline bool contiguous<spatialTensor>() {return true;}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H
new file mode 100644
index 0000000000000000000000000000000000000000..c56a7e06d695e3e22a6d63aedac2b300343bd5df
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVector.H
@@ -0,0 +1,172 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::SpatialVector
+
+Description
+    Templated 3D spatial vector derived from VectorSpace used to represent the
+    anglular and linear components of position, velocity and acceleration of
+    rigid bodies.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+    \endverbatim
+
+SourceFiles
+    SpatialVectorI.H
+
+SeeAlso
+    Foam::VectorSpace
+    Foam::Vector
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef SpatialVector_H
+#define SpatialVector_H
+
+#include "Vector.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class SpatialVector Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Cmpt>
+class SpatialVector
+:
+    public VectorSpace<SpatialVector<Cmpt>, Cmpt, 6>
+{
+
+public:
+
+    //- Component labeling enumeration
+    enum components { WX, WY, WZ, LX, LY, LZ };
+
+
+    //- Class to represent the dual spatial vector
+    class dual
+    {
+        const SpatialVector& v_;
+
+    public:
+
+        //- Construct the dual of the given SpatialVector
+        inline dual(const SpatialVector& v);
+
+        //- Return the parent SpatialVector
+        inline const SpatialVector& v() const;
+    };
+
+
+    // Constructors
+
+        //- Construct null
+        inline SpatialVector();
+
+        //- Construct initialized to zero
+        inline SpatialVector(const Foam::zero);
+
+        //- Construct given VectorSpace of the same rank
+        inline SpatialVector(const typename SpatialVector::vsType&);
+
+        //- Construct from the angular and linear vector components
+        inline SpatialVector
+        (
+            const Vector<Cmpt>& w,
+            const Vector<Cmpt>& l
+        );
+
+        //- Construct given 6 components
+        inline SpatialVector
+        (
+            const Cmpt& wx,
+            const Cmpt& wy,
+            const Cmpt& wz,
+            const Cmpt& lx,
+            const Cmpt& ly,
+            const Cmpt& lz
+        );
+
+        //- Construct from Istream
+        inline SpatialVector(Istream&);
+
+
+    // Member Functions
+
+        // Component access
+
+            inline const Cmpt& wx() const;
+            inline const Cmpt& wy() const;
+            inline const Cmpt& wz() const;
+
+            inline const Cmpt& lx() const;
+            inline const Cmpt& ly() const;
+            inline const Cmpt& lz() const;
+
+            inline Cmpt& wx();
+            inline Cmpt& wy();
+            inline Cmpt& wz();
+
+            inline Cmpt& lx();
+            inline Cmpt& ly();
+            inline Cmpt& lz();
+
+
+        // Sub-vector access.
+
+            //- Return the angular part of the spatial vector as a vector
+            inline Vector<Cmpt> w() const;
+
+            //- Return the linear part of the spatial vector as a vector
+            inline Vector<Cmpt> l() const;
+
+
+    // Member Operators
+
+        //- Return the dual spatial vector
+        inline dual operator*() const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Include inline implementations
+#include "SpatialVectorI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVectorI.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVectorI.H
new file mode 100644
index 0000000000000000000000000000000000000000..8b23c7b5df955d6c16e9aff4e6728fd70ca7ae5e
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/SpatialVectorI.H
@@ -0,0 +1,269 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::SpatialVector()
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::SpatialVector(const Foam::zero)
+:
+    SpatialVector::vsType(Zero)
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::SpatialVector
+(
+    const typename SpatialVector::vsType& vs
+)
+:
+    SpatialVector::vsType(vs)
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::SpatialVector
+(
+    const Vector<Cmpt>& w,
+    const Vector<Cmpt>& l
+)
+{
+    this->v_[0] = w.x();
+    this->v_[1] = w.y();
+    this->v_[2] = w.z();
+    this->v_[3] = l.x();
+    this->v_[4] = l.y();
+    this->v_[5] = l.z();
+}
+
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::SpatialVector
+(
+    const Cmpt& v0,
+    const Cmpt& v1,
+    const Cmpt& v2,
+    const Cmpt& v3,
+    const Cmpt& v4,
+    const Cmpt& v5
+)
+{
+    this->v_[0] = v0;
+    this->v_[1] = v1;
+    this->v_[2] = v2;
+    this->v_[3] = v3;
+    this->v_[4] = v4;
+    this->v_[5] = v5;
+}
+
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::SpatialVector(Istream& is)
+:
+    SpatialVector::vsType(is)
+{}
+
+
+template<class Cmpt>
+inline Foam::SpatialVector<Cmpt>::dual::dual(const SpatialVector& v)
+:
+    v_(v)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline const Cmpt& Foam::SpatialVector<Cmpt>::wx() const
+{
+    return this->v_[WX];
+}
+
+
+template<class Cmpt>
+inline const Cmpt& Foam::SpatialVector<Cmpt>::wy() const
+{
+    return this->v_[WY];
+}
+
+
+template<class Cmpt>
+inline const Cmpt& Foam::SpatialVector<Cmpt>::wz() const
+{
+    return this->v_[WZ];
+}
+
+
+template<class Cmpt>
+inline const Cmpt& Foam::SpatialVector<Cmpt>::lx() const
+{
+    return this->v_[LX];
+}
+
+
+template<class Cmpt>
+inline const Cmpt& Foam::SpatialVector<Cmpt>::ly() const
+{
+    return this->v_[LY];
+}
+
+
+template<class Cmpt>
+inline const Cmpt& Foam::SpatialVector<Cmpt>::lz() const
+{
+    return this->v_[LZ];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::SpatialVector<Cmpt>::wx()
+{
+    return this->v_[WX];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::SpatialVector<Cmpt>::wy()
+{
+    return this->v_[WY];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::SpatialVector<Cmpt>::wz()
+{
+    return this->v_[WZ];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::SpatialVector<Cmpt>::lx()
+{
+    return this->v_[LX];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::SpatialVector<Cmpt>::ly()
+{
+    return this->v_[LY];
+}
+
+
+template<class Cmpt>
+inline Cmpt& Foam::SpatialVector<Cmpt>::lz()
+{
+    return this->v_[LZ];
+}
+
+
+template<class Cmpt>
+inline Foam::Vector<Cmpt> Foam::SpatialVector<Cmpt>::w() const
+{
+    return Vector<Cmpt>(this->v_[0], this->v_[1], this->v_[2]);
+}
+
+template<class Cmpt>
+inline Foam::Vector<Cmpt> Foam::SpatialVector<Cmpt>::l() const
+{
+    return Vector<Cmpt>(this->v_[3], this->v_[4], this->v_[5]);
+}
+
+
+template<class Cmpt>
+const Foam::SpatialVector<Cmpt>& Foam::SpatialVector<Cmpt>::dual::v() const
+{
+    return v_;
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class Cmpt>
+inline typename Foam::SpatialVector<Cmpt>::dual
+Foam::SpatialVector<Cmpt>::operator*() const
+{
+    return dual(*this);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
+
+//- Return the cross-product between two spatial vectors
+template<class Cmpt>
+inline SpatialVector<Cmpt> operator^
+(
+    const SpatialVector<Cmpt>& u,
+    const SpatialVector<Cmpt>& v
+)
+{
+    return SpatialVector<Cmpt>
+    (
+       -u.wz()*v.wy() + u.wy()*v.wz(),
+        u.wz()*v.wx() - u.wx()*v.wz(),
+       -u.wy()*v.wx() + u.wx()*v.wy(),
+       -u.lz()*v.wy() + u.ly()*v.wz() - u.wz()*v.ly() + u.wy()*v.lz(),
+        u.lz()*v.wx() - u.lx()*v.wz() + u.wz()*v.lx() - u.wx()*v.lz(),
+       -u.ly()*v.wx() + u.lx()*v.wy() - u.wy()*v.lx() + u.wx()*v.ly()
+    );
+}
+
+
+//- Return the dual cross-product between two spatial vectors
+template<class Cmpt>
+inline SpatialVector<Cmpt> operator^
+(
+    const SpatialVector<Cmpt>& v,
+    const typename SpatialVector<Cmpt>::dual& df
+)
+{
+    const SpatialVector<Cmpt>& f = df.v();
+
+    return SpatialVector<Cmpt>
+    (
+       -v.wz()*f.wy() + v.wy()*f.wz() - v.lz()*f.ly() + v.ly()*f.lz(),
+        v.wz()*f.wx() - v.wx()*f.wz() + v.lz()*f.lx() - v.lx()*f.lz(),
+       -v.wy()*f.wx() + v.wx()*f.wy() - v.ly()*f.lx() + v.lx()*f.ly(),
+       -v.wz()*f.ly() + v.wy()*f.lz(),
+        v.wz()*f.lx() - v.wx()*f.lz(),
+       -v.wy()*f.lx() + v.wx()*f.ly()
+    );
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.C
similarity index 52%
rename from src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H
rename to src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.C
index 502fb20eef24ed5cab049e922280f759beac59f8..422f31238d4af4b56707dcdd7b455e8596bc2146 100644
--- a/src/OpenFOAM/db/runTimeSelection/globalFunctions/addToGlobalFunctionSelectionTable.H
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -21,31 +21,59 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
-Global
-    Foam::addToGlobalFunctionSelectionTable
-
 Description
-    Macros for easy insertion into global function selection tables
+    SpatialVector of scalars.
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef addToGlobalFunctionSelectionTable_H
-#define addToGlobalFunctionSelectionTable_H
+#include "spatialVector.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+template<>
+const char* const Foam::spatialVector::vsType::typeName = "spatialVector";
+
+template<>
+const char* const Foam::spatialVector::vsType::componentNames[] =
+{
+    "wx", "wy", "wz", "lx", "ly", "lz"
+};
+
+template<>
+const Foam::spatialVector Foam::spatialVector::vsType::zero
+(
+    Foam::spatialVector::uniform(0)
+);
+
+template<>
+const Foam::spatialVector Foam::spatialVector::vsType::one
+(
+    spatialVector::uniform(1)
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::spatialVector Foam::spatialVector::vsType::max
+(
+    spatialVector::uniform(VGREAT)
+);
 
-// add to hash-table of functions with 'lookup' as the key
-#define addNamedToGlobalFunctionSelectionTable\
-(memberFunction,argNames,lookup,functionPtr)                                  \
-                                                                              \
-    /* Add to the table, find by lookup name */                               \
-    add##memberFunction##argNames##GlobalMemberFunctionToTable                \
-    add_##lookup##_##memberFunction##argNames##GlobalMemberFunctionTo##Table_ \
-    (#lookup, functionPtr)
+template<>
+const Foam::spatialVector Foam::spatialVector::vsType::min
+(
+    spatialVector::uniform(-VGREAT)
+);
 
+template<>
+const Foam::spatialVector Foam::spatialVector::vsType::rootMax
+(
+    spatialVector::uniform(ROOTVGREAT)
+);
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<>
+const Foam::spatialVector Foam::spatialVector::vsType::rootMin
+(
+    spatialVector::uniform(-ROOTVGREAT)
+);
 
-#endif
 
 // ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H
new file mode 100644
index 0000000000000000000000000000000000000000..8e6ae153801a110faee6b3ac12b91813ad4d8723
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/SpatialVector/spatialVector/spatialVector.H
@@ -0,0 +1,62 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Typedef
+    Foam::spatialVector
+
+Description
+    SpatialVector of scalars.
+
+SourceFiles
+    spatialVector.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef spatialVector_H
+#define spatialVector_H
+
+#include "SpatialVector.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+typedef SpatialVector<scalar> spatialVector;
+
+//- Data associated with spatialVector type are contiguous
+template<>
+inline bool contiguous<spatialVector>() {return true;}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/spatialTransform/spatialTransform.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/spatialTransform/spatialTransform.H
new file mode 100644
index 0000000000000000000000000000000000000000..475b03f9bb790f2999bf014673bd81f73b25d7c3
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/spatialTransform/spatialTransform.H
@@ -0,0 +1,209 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::spatialTransform
+
+Description
+    Compact representation of the Plücker spatial transformation tensor
+    in terms of the rotation tensor \c E and translation vector \c r .
+
+    See Chapter 2 and Appendix A in reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+    \endverbatim
+
+SourceFiles
+    spatialTransformI.H
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef spatialTransform_H
+#define spatialTransform_H
+
+#include "tensor.H"
+#include "spatialVector.H"
+#include "spatialTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of classes
+class Istream;
+class Ostream;
+
+// Forward declaration of friend functions and operators
+class spatialTransform;
+Istream& operator>>(Istream&, spatialTransform&);
+Ostream& operator<<(Ostream&, const spatialTransform&);
+
+
+/*---------------------------------------------------------------------------*\
+                         Class spatialTransform Declaration
+\*---------------------------------------------------------------------------*/
+
+class spatialTransform
+{
+    // Private data
+
+        //- Rotation tensor
+        tensor E_;
+
+        //- Translation vector
+        vector r_;
+
+
+    // Private member functions
+
+        //- Return E . *r
+        inline tensor Erx() const;
+
+
+public:
+
+        //- Wrapper-class to provide transpose functions and operators
+        class transpose
+        {
+            const spatialTransform& X_;
+
+        public:
+
+            //- Construct from a spatialTransform
+            inline transpose(const spatialTransform& X);
+
+            //- Return the transpose transformation tensor ^A{X^*}_B
+            //  X^T
+            inline operator spatialTensor() const;
+
+            //- Transpose transform dual f: ^A{X^*}_B & f
+            //  X^T . f = (E^T . fl + r ^ E^T . fw, E^T . fl)
+            inline spatialVector operator&(const spatialVector& f) const;
+        };
+
+
+        //- Wrapper-class to provide dual functions and operators
+        class dual
+        {
+            const spatialTransform& X_;
+
+        public:
+
+            //- Construct from a spatialTransform
+            inline dual(const spatialTransform& X);
+
+            //- Return dual transformation tensor ^B{X^*}_A
+            inline operator spatialTensor() const;
+
+            //- Transform dual f: ^B{X^*}_A & f
+            //  X^* . f = (E . fw - r ^ fl, E . fl)
+            inline spatialVector operator&(const spatialVector& f) const;
+        };
+
+
+    // Constructors
+
+        //- Construct null
+        inline spatialTransform();
+
+        //- Construct from components
+        inline spatialTransform(const tensor& E, const vector& r);
+
+        //- Construct from Istream
+        inline spatialTransform(Istream&);
+
+
+    // Member Functions
+
+        //- Return the rotation tensor
+        inline const tensor& E() const;
+
+        //- Return non-const access to the rotation tensor
+        inline tensor& E();
+
+        //- Return the translation vector
+        inline const vector& r() const;
+
+        //- Return non-const access to the translation vector
+        inline vector& r();
+
+        //- Return the transpose transformation tensor ^A{X^*}_B
+        //  X^T
+        inline transpose T() const;
+
+        //- Return the inverse transformation tensor: X^-1
+        //  X^-1 = (E^T, −E.r)
+        inline spatialTransform inv() const;
+
+
+    // Member Operators
+
+        //- Return the dual transformation tensor ^B{X^*}_A
+        inline dual operator*() const;
+
+        //- Return transformation tensor ^BX_A
+        //  X
+        inline operator spatialTensor() const;
+
+        //- Inner-product multiply with a transformation tensor
+        inline void operator&=(const spatialTransform& X);
+
+        //- Return the inner-product of two transformation tensors
+        inline spatialTransform operator&(const spatialTransform& X) const;
+
+        //- Transform v: ^BX_A . v
+        //  X.v = (E . vw, E . (vl - r^vw))
+        inline spatialVector operator&(const spatialVector& v) const;
+
+        //- Transform position p
+        //  X:p = E . (pl - r)
+        inline vector transformPoint(const vector& p) const;
+
+        //- Transform position p
+        //  X:p = (E . pw, E . (vl - r))
+        inline spatialVector operator&&(const spatialVector& v) const;
+
+
+    // IOstream Operators
+
+        friend Istream& operator>>(Istream&, spatialTransform&);
+        friend Ostream& operator<<(Ostream&, const spatialTransform&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "spatialTransformI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/spatialVectorAlgebra/spatialTransform/spatialTransformI.H b/src/OpenFOAM/primitives/spatialVectorAlgebra/spatialTransform/spatialTransformI.H
new file mode 100644
index 0000000000000000000000000000000000000000..4ab3f7e51245af1c77b9dc7cebedc33b3d8fa28b
--- /dev/null
+++ b/src/OpenFOAM/primitives/spatialVectorAlgebra/spatialTransform/spatialTransformI.H
@@ -0,0 +1,289 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "transform.H"
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+Foam::tensor Foam::spatialTransform::Erx() const
+{
+    return E_ & *r_;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::spatialTransform::spatialTransform()
+:
+    E_(tensor::I),
+    r_(Zero)
+{}
+
+
+inline Foam::spatialTransform::spatialTransform
+(
+    const tensor& E,
+    const vector& r
+)
+:
+    E_(E),
+    r_(r)
+{}
+
+
+inline Foam::spatialTransform::spatialTransform(Istream& is)
+:
+    E_(is),
+    r_(is)
+{}
+
+
+inline Foam::spatialTransform::transpose::transpose(const spatialTransform& X)
+:
+    X_(X)
+{}
+
+
+inline Foam::spatialTransform::dual::dual(const spatialTransform& X)
+:
+    X_(X)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline const Foam::tensor& Foam::spatialTransform::E() const
+{
+    return E_;
+}
+
+inline Foam::tensor& Foam::spatialTransform::E()
+{
+    return E_;
+}
+
+inline const Foam::vector& Foam::spatialTransform::r() const
+{
+    return r_;
+}
+
+inline Foam::vector& Foam::spatialTransform::r()
+{
+    return r_;
+}
+
+
+inline Foam::spatialTransform::transpose Foam::spatialTransform::T() const
+{
+    return transpose(*this);
+}
+
+
+inline Foam::spatialTransform Foam::spatialTransform::inv() const
+{
+    return spatialTransform(E_.T(), -(E_ & r_));
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+inline Foam::spatialTransform::dual Foam::spatialTransform::operator*() const
+{
+    return dual(*this);
+}
+
+
+inline Foam::spatialTransform::operator spatialTensor() const
+{
+    return spatialTensor
+    (
+        E_,             Zero,
+       -Erx(),          E_
+    );
+}
+
+
+inline void Foam::spatialTransform::operator&=(const spatialTransform& X)
+{
+    E_ &= X.E_;
+    r_ = X.r_ + (r_ & X.E_);
+}
+
+
+inline Foam::spatialTransform Foam::spatialTransform::operator&
+(
+    const spatialTransform& X
+) const
+{
+    return spatialTransform(E_ & X.E_, X.r_ + (r_ & X.E_));
+}
+
+
+inline Foam::spatialVector Foam::spatialTransform::operator&
+(
+    const spatialVector& v
+) const
+{
+    return spatialVector
+    (
+        E_ & v.w(),
+        E_ & (v.l() - (r_ ^ v.w()))
+    );
+}
+
+
+inline Foam::spatialVector Foam::spatialTransform::operator&&
+(
+    const spatialVector& v
+) const
+{
+    return spatialVector
+    (
+        E_ & v.w(),
+        E_ & (v.l() - r_)
+    );
+}
+
+
+inline Foam::vector Foam::spatialTransform::transformPoint
+(
+    const vector& p
+) const
+{
+    return E_ & (p - r_);
+}
+
+
+inline Foam::spatialTransform::transpose::operator spatialTensor() const
+{
+    return spatialTensor
+    (
+        X_.E().T(),    -X_.Erx().T(),
+        Zero,           X_.E().T()
+    );
+}
+
+
+inline Foam::spatialVector Foam::spatialTransform::transpose::operator&
+(
+    const spatialVector& f
+) const
+{
+    vector ETfl(X_.E().T() & f.l());
+
+    return spatialVector
+    (
+        (X_.E().T() & f.w()) + (X_.r() ^ ETfl),
+        ETfl
+    );
+}
+
+
+inline Foam::spatialTransform::dual::operator spatialTensor() const
+{
+    return spatialTensor
+    (
+        X_.E(),        -X_.Erx(),
+        Zero,           X_.E()
+    );
+}
+
+
+inline Foam::spatialVector Foam::spatialTransform::dual::operator&
+(
+    const spatialVector& f
+) const
+{
+    return spatialVector
+    (
+        X_.E() & (f.w() - (X_.r() ^ f.l())),
+        X_.E() & f.l()
+    );
+}
+
+
+// * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * * //
+
+inline Foam::Istream& Foam::operator>>(Foam::Istream& is, spatialTransform& X)
+{
+    is >> X.E() >> X.r();
+    return is;
+}
+
+
+inline Foam::Ostream& Foam::operator<<
+(
+    Foam::Ostream& os,
+    const spatialTransform& X
+)
+{
+    os << X.E() << token::SPACE << X.r();
+    return os;
+}
+
+
+// * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+//- Rotational spatial transformation tensor about the x-axis by omega radians
+inline spatialTransform Xrx(const scalar& omega)
+{
+    return spatialTransform(Rx(omega), Zero);
+}
+
+//- Rotational spatial transformation tensor about the x-axis by omega radians
+inline spatialTransform Xry(const scalar& omega)
+{
+    return spatialTransform(Ry(omega), Zero);
+}
+
+//- Rotational spatial transformation tensor about the z-axis by omega radians
+inline spatialTransform Xrz(const scalar& omega)
+{
+    return spatialTransform(Rz(omega), Zero);
+}
+
+//- Rotational spatial transformation tensor about axis a by omega radians
+inline spatialTransform Xr(const vector& a, const scalar omega)
+{
+    return spatialTransform(Ra(a, omega), Zero);
+}
+
+//- Translational spatial transformation tensor for translation r
+inline spatialTransform Xt(const vector& r)
+{
+    return spatialTransform(tensor::I, r);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/strings/fileName/fileName.C b/src/OpenFOAM/primitives/strings/fileName/fileName.C
index 637e5e1fe0e207716bbd1b3b4c967e648e679707..becb5db393dafb6ae591721926d6614cc2048fc5 100644
--- a/src/OpenFOAM/primitives/strings/fileName/fileName.C
+++ b/src/OpenFOAM/primitives/strings/fileName/fileName.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,6 @@ License
 #include "fileName.H"
 #include "wordList.H"
 #include "DynamicList.H"
-#include "debug.H"
 #include "OSspecific.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -35,6 +34,7 @@ const char* const Foam::fileName::typeName = "fileName";
 int Foam::fileName::debug(debug::debugSwitch(fileName::typeName, 0));
 const Foam::fileName Foam::fileName::null;
 
+
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 Foam::fileName::fileName(const wordList& lst)
@@ -74,32 +74,18 @@ Foam::fileName& Foam::fileName::toAbsolute()
 }
 
 
-//
-// * remove repeated slashes
-//       /abc////def        -->   /abc/def
-//
-// * remove '/./'
-//       /abc/def/./ghi/.   -->   /abc/def/./ghi
-//       abc/def/./         -->   abc/def
-//
-// * remove '/../'
-//       /abc/def/../ghi/jkl/nmo/..   -->   /abc/ghi/jkl
-//       abc/../def/ghi/../jkl        -->   abc/../def/jkl
-//
-// * remove trailing '/'
-//
 bool Foam::fileName::clean()
 {
-    // the top slash - we are never allowed to go above it
+    // The top slash - we are never allowed to go above it
     string::size_type top = this->find('/');
 
-    // no slashes - nothing to do
+    // No slashes - nothing to do
     if (top == string::npos)
     {
         return false;
     }
 
-    // start with the '/' found:
+    // Start with the '/' found:
     char prev = '/';
     string::size_type nChar  = top+1;
     string::size_type maxLen = this->size();
@@ -108,47 +94,46 @@ bool Foam::fileName::clean()
     (
         string::size_type src = nChar;
         src < maxLen;
-        /*nil*/
     )
     {
         char c = operator[](src++);
 
         if (prev == '/')
         {
-            // repeated '/' - skip it
+            // Repeated '/' - skip it
             if (c == '/')
             {
                 continue;
             }
 
-            // could be '/./' or '/../'
+            // Could be '/./' or '/../'
             if (c == '.')
             {
-                // found trailing '/.' - skip it
+                // Found trailing '/.' - skip it
                 if (src >= maxLen)
                 {
                     continue;
                 }
 
 
-                // peek at the next character
+                // Peek at the next character
                 char c1 = operator[](src);
 
-                // found '/./' - skip it
+                // Found '/./' - skip it
                 if (c1 == '/')
                 {
                     src++;
                     continue;
                 }
 
-                // it is '/..' or '/../'
+                // It is '/..' or '/../'
                 if (c1 == '.' && (src+1 >= maxLen || operator[](src+1) == '/'))
                 {
                     string::size_type parent;
 
-                    // backtrack to find the parent directory
-                    // minimum of 3 characters:  '/x/../'
-                    // strip it, provided it is above the top point
+                    // Backtrack to find the parent directory
+                    // Minimum of 3 characters:  '/x/../'
+                    // Strip it, provided it is above the top point
                     if
                     (
                         nChar > 2
@@ -156,13 +141,13 @@ bool Foam::fileName::clean()
                      && parent >= top
                     )
                     {
-                        nChar = parent + 1;   // retain '/' from the parent
+                        nChar = parent + 1;   // Retain '/' from the parent
                         src += 2;
                         continue;
                     }
 
-                    // bad resolution, eg 'abc/../../'
-                    // retain the sequence, but move the top to avoid it being
+                    // Bad resolution, eg 'abc/../../'
+                    // Retain the sequence, but move the top to avoid it being
                     // considered a valid parent later
                     top = nChar + 2;
                 }
@@ -171,7 +156,7 @@ bool Foam::fileName::clean()
         operator[](nChar++) = prev = c;
     }
 
-    // remove trailing slash
+    // Remove trailing slash
     if (nChar > 1 && operator[](nChar-1) == '/')
     {
         nChar--;
@@ -191,18 +176,6 @@ Foam::fileName Foam::fileName::clean() const
 }
 
 
-
-//  Return file name (part beyond last /)
-//
-//  behaviour compared to /usr/bin/basename:
-//    input           name()          basename
-//    -----           ------          --------
-//    "foo"           "foo"           "foo"
-//    "/foo"          "foo"           "foo"
-//    "foo/bar"       "bar"           "bar"
-//    "/foo/bar"      "bar"           "bar"
-//    "/foo/bar/"     ""              "bar"
-//
 Foam::word Foam::fileName::name() const
 {
     size_type i = rfind('/');
@@ -273,17 +246,6 @@ Foam::word Foam::fileName::name(const bool noExt) const
 }
 
 
-//  Return directory path name (part before last /)
-//
-//  behaviour compared to /usr/bin/dirname:
-//    input           path()          dirname
-//    -----           ------          -------
-//    "foo"           "."             "."
-//    "/foo"          "/"             "foo"
-//    "foo/bar"       "foo"           "foo"
-//    "/foo/bar"      "/foo"          "/foo"
-//    "/foo/bar/"     "/foo/bar/"     "/foo"
-//
 Foam::fileName Foam::fileName::path() const
 {
     size_type i = rfind('/');
@@ -303,7 +265,6 @@ Foam::fileName Foam::fileName::path() const
 }
 
 
-//  Return file name without extension (part before last .)
 Foam::fileName Foam::fileName::lessExt() const
 {
     size_type i = find_last_of("./");
@@ -319,7 +280,6 @@ Foam::fileName Foam::fileName::lessExt() const
 }
 
 
-//  Return file name extension (part after last .)
 Foam::word Foam::fileName::ext() const
 {
     size_type i = find_last_of("./");
@@ -335,19 +295,6 @@ Foam::word Foam::fileName::ext() const
 }
 
 
-// Return the components of the file name as a wordList
-// note that concatenating the components will not necessarily retrieve
-// the original input fileName
-//
-//  behaviour
-//    input           components()
-//    -----           ------
-//    "foo"           1("foo")
-//    "/foo"          1("foo")
-//    "foo/bar"       2("foo", "bar")
-//    "/foo/bar"      2("foo", "bar")
-//    "/foo/bar/"     2("foo", "bar")
-//
 Foam::wordList Foam::fileName::components(const char delimiter) const
 {
     DynamicList<word> wrdList(20);
@@ -356,7 +303,7 @@ Foam::wordList Foam::fileName::components(const char delimiter) const
 
     while ((end = find(delimiter, beg)) != npos)
     {
-        // avoid empty element (caused by doubled slashes)
+        // Avoid empty element (caused by doubled slashes)
         if (beg < end)
         {
             wrdList.append(substr(beg, end-beg));
@@ -364,18 +311,17 @@ Foam::wordList Foam::fileName::components(const char delimiter) const
         beg = end + 1;
     }
 
-    // avoid empty trailing element
+    // Avoid empty trailing element
     if (beg < size())
     {
         wrdList.append(substr(beg, npos));
     }
 
-    // transfer to wordList
+    // Transfer to wordList
     return wordList(wrdList.xfer());
 }
 
 
-// Return a component of the file name
 Foam::word Foam::fileName::component
 (
     const size_type cmpt,
@@ -388,41 +334,36 @@ Foam::word Foam::fileName::component
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-const Foam::fileName& Foam::fileName::operator=(const fileName& str)
+void Foam::fileName::operator=(const fileName& str)
 {
     string::operator=(str);
-    return *this;
 }
 
 
-const Foam::fileName& Foam::fileName::operator=(const word& str)
+void Foam::fileName::operator=(const word& str)
 {
     string::operator=(str);
-    return *this;
 }
 
 
-const Foam::fileName& Foam::fileName::operator=(const string& str)
+void Foam::fileName::operator=(const string& str)
 {
     string::operator=(str);
     stripInvalid();
-    return *this;
 }
 
 
-const Foam::fileName& Foam::fileName::operator=(const std::string& str)
+void Foam::fileName::operator=(const std::string& str)
 {
     string::operator=(str);
     stripInvalid();
-    return *this;
 }
 
 
-const Foam::fileName& Foam::fileName::operator=(const char* str)
+void Foam::fileName::operator=(const char* str)
 {
     string::operator=(str);
     stripInvalid();
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/primitives/strings/fileName/fileName.H b/src/OpenFOAM/primitives/strings/fileName/fileName.H
index d6e9684a7a77fd16efc12f7ae8bb628a26df6b1e..ee0d751fae6167cdd5552cc83eac45af21107a3a 100644
--- a/src/OpenFOAM/primitives/strings/fileName/fileName.H
+++ b/src/OpenFOAM/primitives/strings/fileName/fileName.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,20 @@ public:
         inline static bool valid(char);
 
         //- Cleanup file name
-        //  eg, remove repeated slashes, etc.
+        //
+        // * Removes repeated slashes
+        //       /abc////def        -->   /abc/def
+        //
+        // * Removes '/./'
+        //       /abc/def/./ghi/.   -->   /abc/def/./ghi
+        //       abc/def/./         -->   abc/def
+        //
+        // * Removes '/../'
+        //       /abc/def/../ghi/jkl/nmo/..   -->   /abc/ghi/jkl
+        //       abc/../def/ghi/../jkl        -->   abc/../def/jkl
+        //
+        // * Removes trailing '/'
+        //
         bool clean();
 
         //- Cleanup file name
@@ -154,6 +167,16 @@ public:
         // Decomposition
 
             //- Return file name (part beyond last /)
+            //
+            //  Behaviour compared to /usr/bin/basename:
+            //    Input           name()          basename
+            //    -----           ------          --------
+            //    "foo"           "foo"           "foo"
+            //    "/foo"          "foo"           "foo"
+            //    "foo/bar"       "bar"           "bar"
+            //    "/foo/bar"      "bar"           "bar"
+            //    "/foo/bar/"     ""              "bar"
+            //
             word name() const;
 
             //- Return file name (part beyond last /), subsitute for FOAM_CASE
@@ -163,6 +186,16 @@ public:
             word name(const bool noExt) const;
 
             //- Return directory path name (part before last /)
+            //
+            //  Behaviour compared to /usr/bin/dirname:
+            //    input           path()          dirname
+            //    -----           ------          -------
+            //    "foo"           "."             "."
+            //    "/foo"          "/"             "foo"
+            //    "foo/bar"       "foo"           "foo"
+            //    "/foo/bar"      "/foo"          "/foo"
+            //    "/foo/bar/"     "/foo/bar/"     "/foo"
+            //
             fileName path() const;
 
             //- Return file name without extension (part before last .)
@@ -172,6 +205,15 @@ public:
             word ext() const;
 
             //- Return path components as wordList
+            //
+            //  Behaviour:
+            //    Input           components()
+            //    -----           ------
+            //    "foo"           1("foo")
+            //    "/foo"          1("foo")
+            //    "foo/bar"       2("foo", "bar")
+            //    "/foo/bar"      2("foo", "bar")
+            //    "/foo/bar/"     2("foo", "bar")
             wordList components(const char delimiter='/') const;
 
             //- Return a single component of the path
@@ -182,11 +224,11 @@ public:
 
         // Assignment
 
-            const fileName& operator=(const fileName&);
-            const fileName& operator=(const word&);
-            const fileName& operator=(const string&);
-            const fileName& operator=(const std::string&);
-            const fileName& operator=(const char*);
+            void operator=(const fileName&);
+            void operator=(const word&);
+            void operator=(const string&);
+            void operator=(const std::string&);
+            void operator=(const char*);
 
 
     // IOstream operators
diff --git a/src/OpenFOAM/primitives/strings/keyType/keyType.H b/src/OpenFOAM/primitives/strings/keyType/keyType.H
index b424a95958357ba1cb4aa0ad2405cd53d14867dc..53ef756ee41ad8b46b8cd4a1b8dddb12c3b7cfa4 100644
--- a/src/OpenFOAM/primitives/strings/keyType/keyType.H
+++ b/src/OpenFOAM/primitives/strings/keyType/keyType.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,16 +116,16 @@ public:
         // Assignment
 
             //- Assignment operator
-            inline const keyType& operator=(const keyType&);
+            inline void operator=(const keyType&);
 
             //- Assign as word, not as non regular expression
-            inline const keyType& operator=(const word&);
+            inline void operator=(const word&);
 
             //- Assign as regular expression
-            inline const keyType& operator=(const string&);
+            inline void operator=(const string&);
 
             //- Assign as word, not as non regular expression
-            inline const keyType& operator=(const char*);
+            inline void operator=(const char*);
 
 
     // IOstream operators
diff --git a/src/OpenFOAM/primitives/strings/keyType/keyTypeI.H b/src/OpenFOAM/primitives/strings/keyType/keyTypeI.H
index 136d0cdfeba372a87a5d9ce4c760c629cd0c717a..0f2b8fc3a381cb96ebd6f4e5e6994e50c0fba836 100644
--- a/src/OpenFOAM/primitives/strings/keyType/keyTypeI.H
+++ b/src/OpenFOAM/primitives/strings/keyType/keyTypeI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,38 +81,34 @@ inline bool Foam::keyType::isPattern() const
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-inline const Foam::keyType& Foam::keyType::operator=(const keyType& s)
+inline void Foam::keyType::operator=(const keyType& s)
 {
     // Bypass checking
     string::operator=(s);
     isPattern_ = s.isPattern_;
-    return *this;
 }
 
 
-inline const Foam::keyType& Foam::keyType::operator=(const word& s)
+inline void Foam::keyType::operator=(const word& s)
 {
     word::operator=(s);
     isPattern_ = false;
-    return *this;
 }
 
 
-inline const Foam::keyType& Foam::keyType::operator=(const string& s)
+inline void Foam::keyType::operator=(const string& s)
 {
     // Bypass checking
     string::operator=(s);
     isPattern_ = true;
-    return *this;
 }
 
 
-inline const Foam::keyType& Foam::keyType::operator=(const char* s)
+inline void Foam::keyType::operator=(const char* s)
 {
     // Bypass checking
     string::operator=(s);
     isPattern_ = false;
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/primitives/strings/lists/hashedWordList.C b/src/OpenFOAM/primitives/strings/lists/hashedWordList.C
index de0e43052a0f778617c37e0b59d9cfeb5832596c..4a7cde89edaa8eb0ca4926f1a94e1eacb27a8a71 100644
--- a/src/OpenFOAM/primitives/strings/lists/hashedWordList.C
+++ b/src/OpenFOAM/primitives/strings/lists/hashedWordList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ Foam::hashedWordList::hashedWordList(const hashedWordList& names)
 }
 
 
-Foam::hashedWordList::hashedWordList(const Xfer< List<word> >& names)
+Foam::hashedWordList::hashedWordList(const Xfer<List<word>>& names)
 :
     List<word>(names)
 {
diff --git a/src/OpenFOAM/primitives/strings/lists/hashedWordList.H b/src/OpenFOAM/primitives/strings/lists/hashedWordList.H
index a4cda161637ac2c88196a917837bf2cea0d63378..700f794908a663b21619c49922a151a5a372ccff 100644
--- a/src/OpenFOAM/primitives/strings/lists/hashedWordList.H
+++ b/src/OpenFOAM/primitives/strings/lists/hashedWordList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ public:
         hashedWordList(const UList<word>& names);
 
         //- Construct by transferring the parameter contents
-        hashedWordList(const Xfer< List<word> >& names);
+        hashedWordList(const Xfer<List<word>>& names);
 
         //- Construct from number and list of names
         hashedWordList(const label nNames, const char** names);
diff --git a/src/OpenFOAM/primitives/strings/lists/stringListOps.H b/src/OpenFOAM/primitives/strings/lists/stringListOps.H
index 0fb48c6ede0e8e2ae473ef5b6672464bb1314a21..927118e87f67f5f3fb6949d4f0c9284242c8bbac 100644
--- a/src/OpenFOAM/primitives/strings/lists/stringListOps.H
+++ b/src/OpenFOAM/primitives/strings/lists/stringListOps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -303,7 +303,7 @@ namespace Foam
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "stringListOpsTemplates.C"
+    #include "stringListOpsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/strings/string/string.C b/src/OpenFOAM/primitives/strings/string/string.C
index 9e17488d1e2e04fdd1ee062166ee43cc38daf79e..7645a4d668762f15e35910f65eb6f4927617a4e6 100644
--- a/src/OpenFOAM/primitives/strings/string/string.C
+++ b/src/OpenFOAM/primitives/strings/string/string.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,6 @@ const Foam::string Foam::string::null;
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Count and return the number of a given character in the string
 Foam::string::size_type Foam::string::count(const char c) const
 {
     size_type cCount = 0;
@@ -53,7 +52,6 @@ Foam::string::size_type Foam::string::count(const char c) const
 }
 
 
-// Replace first occurence of sub-string oldStr with newStr
 Foam::string& Foam::string::replace
 (
     const string& oldStr,
@@ -72,7 +70,6 @@ Foam::string& Foam::string::replace
 }
 
 
-// Replace all occurences of sub-string oldStr with newStr
 Foam::string& Foam::string::replaceAll
 (
     const string& oldStr,
@@ -102,7 +99,6 @@ Foam::string& Foam::string::expand(const bool allowEmpty)
 }
 
 
-// Remove repeated characters returning true if string changed
 bool Foam::string::removeRepeated(const char character)
 {
     bool changed = false;
@@ -141,7 +137,6 @@ bool Foam::string::removeRepeated(const char character)
 }
 
 
-// Return string with repeated characters removed
 Foam::string Foam::string::removeRepeated(const char character) const
 {
     string str(*this);
@@ -150,7 +145,6 @@ Foam::string Foam::string::removeRepeated(const char character) const
 }
 
 
-// Remove trailing character returning true if string changed
 bool Foam::string::removeTrailing(const char character)
 {
     bool changed = false;
@@ -166,7 +160,6 @@ bool Foam::string::removeTrailing(const char character)
 }
 
 
-// Return string with trailing character removed
 Foam::string Foam::string::removeTrailing(const char character) const
 {
     string str(*this);
diff --git a/src/OpenFOAM/primitives/strings/word/word.H b/src/OpenFOAM/primitives/strings/word/word.H
index 65d3b7032be25fdd2421cf26482daf3beaf0cacb..4b51809306b9165cc7263f0ff46c1dac15411f94 100644
--- a/src/OpenFOAM/primitives/strings/word/word.H
+++ b/src/OpenFOAM/primitives/strings/word/word.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,10 +117,10 @@ public:
 
         // Assignment
 
-            inline const word& operator=(const word&);
-            inline const word& operator=(const string&);
-            inline const word& operator=(const std::string&);
-            inline const word& operator=(const char*);
+            inline void operator=(const word&);
+            inline void operator=(const string&);
+            inline void operator=(const std::string&);
+            inline void operator=(const char*);
 
 
     // Friend Operators
diff --git a/src/OpenFOAM/primitives/strings/word/wordI.H b/src/OpenFOAM/primitives/strings/word/wordI.H
index b1fb7b7c3e8670e08daece46d63c0a6ea06d8058..587adfac99b3d8378e3c1768e1d52f06012d0ae1 100644
--- a/src/OpenFOAM/primitives/strings/word/wordI.H
+++ b/src/OpenFOAM/primitives/strings/word/wordI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,34 +131,30 @@ inline bool Foam::word::valid(char c)
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-inline const Foam::word& Foam::word::operator=(const word& q)
+inline void Foam::word::operator=(const word& q)
 {
     string::operator=(q);
-    return *this;
 }
 
 
-inline const Foam::word& Foam::word::operator=(const string& q)
+inline void Foam::word::operator=(const string& q)
 {
     string::operator=(q);
     stripInvalid();
-    return *this;
 }
 
 
-inline const Foam::word& Foam::word::operator=(const std::string& q)
+inline void Foam::word::operator=(const std::string& q)
 {
     string::operator=(q);
     stripInvalid();
-    return *this;
 }
 
 
-inline const Foam::word& Foam::word::operator=(const char* q)
+inline void Foam::word::operator=(const char* q)
 {
     string::operator=(q);
     stripInvalid();
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordRe.H b/src/OpenFOAM/primitives/strings/wordRe/wordRe.H
index b0cb62e0b43f490c8c62befe5e2d618dfec493ce..47992fe733730e13a48b40817d6c3fc76f3acf05 100644
--- a/src/OpenFOAM/primitives/strings/wordRe/wordRe.H
+++ b/src/OpenFOAM/primitives/strings/wordRe/wordRe.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -207,26 +207,26 @@ public:
 
             //- Assign copy
             //  Always case sensitive
-            inline const wordRe& operator=(const wordRe&);
+            inline void operator=(const wordRe&);
 
             //- Copy word, never a regular expression
-            inline const wordRe& operator=(const word&);
+            inline void operator=(const word&);
 
             //- Copy keyType, auto-test for regular expression
             //  Always case sensitive
-            inline const wordRe& operator=(const keyType&);
+            inline void operator=(const keyType&);
 
             //- Copy string, auto-test for regular expression
             //  Always case sensitive
-            inline const wordRe& operator=(const string&);
+            inline void operator=(const string&);
 
             //- Copy string, auto-test for regular expression
             //  Always case sensitive
-            inline const wordRe& operator=(const std::string&);
+            inline void operator=(const std::string&);
 
             //- Copy string, auto-test for regular expression
             //  Always case sensitive
-            inline const wordRe& operator=(const char*);
+            inline void operator=(const char*);
 
 
     // IOstream operators
diff --git a/src/OpenFOAM/primitives/strings/wordRe/wordReI.H b/src/OpenFOAM/primitives/strings/wordRe/wordReI.H
index 01a3114c6c9b2c6da7c389b501831eaaa7dca735..d35a8134b7c4c06d5648ece5feec6e9ebc9d698a 100644
--- a/src/OpenFOAM/primitives/strings/wordRe/wordReI.H
+++ b/src/OpenFOAM/primitives/strings/wordRe/wordReI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -236,7 +236,7 @@ inline void Foam::wordRe::set(const char* str, const compOption opt)
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-inline const Foam::wordRe& Foam::wordRe::operator=(const wordRe& str)
+inline void Foam::wordRe::operator=(const wordRe& str)
 {
     string::operator=(str);
 
@@ -248,50 +248,44 @@ inline const Foam::wordRe& Foam::wordRe::operator=(const wordRe& str)
     {
         re_.clear();
     }
-    return *this;
 }
 
 
-inline const Foam::wordRe& Foam::wordRe::operator=(const word& str)
+inline void Foam::wordRe::operator=(const word& str)
 {
     word::operator=(str);
     re_.clear();
-    return *this;
 }
 
 
-inline const Foam::wordRe& Foam::wordRe::operator=(const keyType& str)
+inline void Foam::wordRe::operator=(const keyType& str)
 {
     string::operator=(str);
     if (str.isPattern())
     {
         compile();
     }
-    return *this;
 }
 
 
-inline const Foam::wordRe& Foam::wordRe::operator=(const string& str)
+inline void Foam::wordRe::operator=(const string& str)
 {
     string::operator=(str);
     compile(DETECT);  // auto-detect regex
-    return *this;
 }
 
 
-inline const Foam::wordRe& Foam::wordRe::operator=(const std::string& str)
+inline void Foam::wordRe::operator=(const std::string& str)
 {
     string::operator=(str);
     compile(DETECT);  // auto-detect regex
-    return *this;
 }
 
 
-inline const Foam::wordRe& Foam::wordRe::operator=(const char* str)
+inline void Foam::wordRe::operator=(const char* str)
 {
     string::operator=(str);
     compile(DETECT);  // auto-detect regex
-    return *this;
 }
 
 
diff --git a/src/OpenFOAM/primitives/subModelBase/subModelBase.H b/src/OpenFOAM/primitives/subModelBase/subModelBase.H
index 92627782e9d7dba08f23697230be3abee3b06c0c..c3e861caac636fdd97d0441b64c2470d6eb75980 100644
--- a/src/OpenFOAM/primitives/subModelBase/subModelBase.H
+++ b/src/OpenFOAM/primitives/subModelBase/subModelBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -165,7 +165,7 @@ public:
                 Type getBaseProperty
                 (
                     const word& entryName,
-                    const Type& defaultValue = pTraits<Type>::zero
+                    const Type& defaultValue = Type(Zero)
                 ) const;
 
                 //- Retrieve generic property from the base model
@@ -188,7 +188,7 @@ public:
                 Type getModelProperty
                 (
                     const word& entryName,
-                    const Type& defaultValue = pTraits<Type>::zero
+                    const Type& defaultValue = Type(Zero)
                 ) const;
 
                 //- Add generic property to the sub-model
@@ -210,7 +210,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "subModelBaseTemplates.C"
+    #include "subModelBaseTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/transform/transform.H b/src/OpenFOAM/primitives/transform/transform.H
index 3f50d677db8ee0e45b784abda0b633ed4f5ac4a5..9fd1318acc76db78e02592ebe11305867b6448b9 100644
--- a/src/OpenFOAM/primitives/transform/transform.H
+++ b/src/OpenFOAM/primitives/transform/transform.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,6 +42,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+//- Rotational transformation tensor from vector n1 to n2
 inline tensor rotationTensor
 (
     const vector& n1,
@@ -76,6 +77,71 @@ inline tensor rotationTensor
 }
 
 
+//- Rotational transformation tensor about the x-axis by omega radians
+inline tensor Rx(const scalar& omega)
+{
+    const scalar s = sin(omega);
+    const scalar c = cos(omega);
+    return tensor
+    (
+        1,  0,  0,
+        0,  c,  s,
+        0, -s,  c
+    );
+}
+
+
+//- Rotational transformation tensor about the y-axis by omega radians
+inline tensor Ry(const scalar& omega)
+{
+    const scalar s = sin(omega);
+    const scalar c = cos(omega);
+    return tensor
+    (
+        c,  0, -s,
+        0,  1,  0,
+        s,  0,  c
+    );
+}
+
+
+//- Rotational transformation tensor about the z-axis by omega radians
+inline tensor Rz(const scalar& omega)
+{
+    const scalar s = sin(omega);
+    const scalar c = cos(omega);
+    return tensor
+    (
+        c,  s,  0,
+       -s,  c,  0,
+        0,  0,  1
+    );
+}
+
+
+//- Rotational transformation tensor about axis a by omega radians
+inline tensor Ra(const vector& a, const scalar omega)
+{
+    const scalar s = sin(omega);
+    const scalar c = cos(omega);
+
+    return tensor
+    (
+        sqr(a.x())*(1 - c)  + c,
+        a.y()*a.x()*(1 - c) + a.z()*s,
+        a.x()*a.z()*(1 - c) - a.y()*s,
+
+        a.x()*a.y()*(1 - c) - a.z()*s,
+        sqr(a.y())*(1 - c)  + c,
+        a.y()*a.z()*(1 - c) + a.x()*s,
+
+        a.x()*a.z()*(1 - c) + a.y()*s,
+        a.y()*a.z()*(1 - c) - a.x()*s,
+        sqr(a.z())*(1 - c)  + c
+    );
+}
+
+
 inline label transform(const tensor&, const bool i)
 {
     return i;
diff --git a/src/OpenFOAM/primitives/triad/triad.C b/src/OpenFOAM/primitives/triad/triad.C
index 8bb2f7cd73c30fb8096ad3d5b9c5c89ab414d0b4..f73e82f4d4b9be30ac216f82e261bac5eaab99ff 100644
--- a/src/OpenFOAM/primitives/triad/triad.C
+++ b/src/OpenFOAM/primitives/triad/triad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,73 +29,60 @@ License
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
 template<>
-const char* const triad::Vector<vector>::typeName = "triad";
+const char* const Foam::triad::vsType::typeName = "triad";
 
 template<>
-const char* triad::Vector<vector>::componentNames[] = {"x", "y", "z"};
+const char* const Foam::triad::vsType::componentNames[] = {"x", "y", "z"};
 
-const triad triad::zero
+template<>
+const Foam::Vector<Foam::vector> Foam::triad::vsType::zero
 (
-    vector(0, 0, 0),
-    vector(0, 0, 0),
-    vector(0, 0, 0)
+    triad::uniform(vector::uniform(0))
 );
 
-const triad triad::one
+template<>
+const Foam::Vector<Foam::vector> Foam::triad::vsType::one
 (
-    vector(1, 1, 1),
-    vector(1, 1, 1),
-    vector(1, 1, 1)
+    triad::uniform(vector::uniform(1))
 );
 
-const triad triad::max
+template<>
+const Foam::Vector<Foam::vector> Foam::triad::vsType::max
 (
-    vector(VGREAT, VGREAT, VGREAT),
-    vector(VGREAT, VGREAT, VGREAT),
-    vector(VGREAT, VGREAT, VGREAT)
+    triad::uniform(vector::uniform(VGREAT))
 );
 
-const triad triad::min
+template<>
+const Foam::Vector<Foam::vector> Foam::triad::vsType::min
 (
-    vector(-VGREAT, -VGREAT, -VGREAT),
-    vector(-VGREAT, -VGREAT, -VGREAT),
-    vector(-VGREAT, -VGREAT, -VGREAT)
+    triad::uniform(vector::uniform(-VGREAT))
 );
 
-const triad triad::rootMax
+template<>
+const Foam::Vector<Foam::vector> Foam::triad::vsType::rootMax
 (
-    vector(ROOTVGREAT, ROOTVGREAT, ROOTVGREAT),
-    vector(ROOTVGREAT, ROOTVGREAT, ROOTVGREAT),
-    vector(ROOTVGREAT, ROOTVGREAT, ROOTVGREAT)
+    triad::uniform(vector::uniform(ROOTVGREAT))
 );
 
-const triad triad::rootMin
+template<>
+const Foam::Vector<Foam::vector> Foam::triad::vsType::rootMin
 (
-    vector(-ROOTVGREAT, -ROOTVGREAT, -ROOTVGREAT),
-    vector(-ROOTVGREAT, -ROOTVGREAT, -ROOTVGREAT),
-    vector(-ROOTVGREAT, -ROOTVGREAT, -ROOTVGREAT)
+    triad::uniform(vector::uniform(-ROOTVGREAT))
 );
 
-const triad triad::I
+const Foam::triad Foam::triad::I
 (
     vector(1, 0, 0),
     vector(0, 1, 0),
     vector(0, 0, 1)
 );
 
-const triad triad::unset
+const Foam::triad Foam::triad::unset
 (
-    vector(VGREAT, VGREAT, VGREAT),
-    vector(VGREAT, VGREAT, VGREAT),
-    vector(VGREAT, VGREAT, VGREAT)
+    triad::uniform(vector::uniform(VGREAT))
 );
 
-}
-
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/triad/triad.H b/src/OpenFOAM/primitives/triad/triad.H
index 8755b60bc13dec9ca076a526f6a22c84ee69d1a2..abe8ad0d27f72b28cb8fd69e43a2f0b809832a13 100644
--- a/src/OpenFOAM/primitives/triad/triad.H
+++ b/src/OpenFOAM/primitives/triad/triad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,12 +96,6 @@ public:
 
     // Static data members
 
-        static const triad zero;
-        static const triad one;
-        static const triad max;
-        static const triad min;
-        static const triad rootMax;
-        static const triad rootMin;
         static const triad I;
         static const triad unset;
 
diff --git a/src/OpenFOAM/primitives/triad/triadI.H b/src/OpenFOAM/primitives/triad/triadI.H
index 2025dd6dd72f7e09c5321b2c22a44d148b6399b2..d2592581780a6e2608f9e34c33bed270db65e281 100644
--- a/src/OpenFOAM/primitives/triad/triadI.H
+++ b/src/OpenFOAM/primitives/triad/triadI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ inline Foam::triad::triad(Istream& is)
 
 inline bool Foam::triad::set(const direction d) const
 {
-    return operator[](d)[0] < GREAT; // vector::zero;
+    return operator[](d)[0] < GREAT;
 }
 
 
diff --git a/src/OpenFOAM/primitives/zero/zero.H b/src/OpenFOAM/primitives/zero/zero.H
index af7a9e562f348b468c349ab9b5617598975dc35d..b0156929b63c438477df35811413ff1aadd229f0 100644
--- a/src/OpenFOAM/primitives/zero/zero.H
+++ b/src/OpenFOAM/primitives/zero/zero.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,6 +36,8 @@ SourceFiles
 #ifndef zero_H
 #define zero_H
 
+#include "label.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
@@ -49,17 +51,54 @@ class zero
 {
 public:
 
-    zero()
-    {}
+    typedef zero value_type;
+
+    // Constructors
+
+        //- Construct null
+        zero()
+        {}
+
+
+    // Member operators
+
+        //- Return 0 for bool
+        inline operator bool() const
+        {
+            return 0;
+        }
+
+        //- Return 0 for label
+        inline operator label() const
+        {
+            return 0;
+        }
+
+        //- Return 0 for float
+        inline operator float() const
+        {
+            return 0;
+        }
+
+        //- Return 0 for double
+        inline operator double() const
+        {
+            return 0;
+        }
 };
 
+
+// Global zero
+static const zero Zero;
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "zeroI.H"
+#include "zeroI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/primitives/zero/zeroI.H b/src/OpenFOAM/primitives/zero/zeroI.H
index a197b57338afec8b95f7d495237f59cc41881be4..0b7b75f23766223f97e052a3bdc75f1a4aa77412 100644
--- a/src/OpenFOAM/primitives/zero/zeroI.H
+++ b/src/OpenFOAM/primitives/zero/zeroI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,19 +59,19 @@ inline Type operator-(const zero&, const Type& t)
 template<class Type>
 inline zero operator*(const Type& t, const zero&)
 {
-    return zero();
+    return Zero;
 }
 
 template<class Type>
 inline zero operator*(const zero&, const Type& t)
 {
-    return zero();
+    return Zero;
 }
 
 template<class Type>
 inline zero operator/(const zero&, const Type& t)
 {
-    return zero();
+    return Zero;
 }
 
 
diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index 15961b2028d5c6552fde771d9108b43b730dfc98..218eae9c3a1a7b28df32f903a6ada13fa7e8c97f 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -39,4 +39,4 @@ case "$WM_MPLIB" in
 esac
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/Pstream/dummy/UPstream.C b/src/Pstream/dummy/UPstream.C
index cd3bc60f39dea2c2d27ffd1a7faf74d02fb28fc2..124e22a0c5decb5e9ba3eea68630c0ef1b0d56ff 100644
--- a/src/Pstream/dummy/UPstream.C
+++ b/src/Pstream/dummy/UPstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,6 +81,17 @@ void Foam::reduce(scalar&, const sumOp<scalar>&, const int, const label, label&)
 {}
 
 
+void Foam::UPstream::allToAll
+(
+    const labelUList& sendData,
+    labelUList& recvData,
+    const label communicator
+)
+{
+    recvData.deepCopy(sendData);
+}
+
+
 void Foam::UPstream::allocatePstreamCommunicator
 (
     const label,
diff --git a/src/Pstream/mpi/UPstream.C b/src/Pstream/mpi/UPstream.C
index f035c989c3d1a141706edec990bf4668135361d9..4e105aa7677916c13554691106eb7f4fdd41a3d2 100644
--- a/src/Pstream/mpi/UPstream.C
+++ b/src/Pstream/mpi/UPstream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,9 +37,9 @@ License
 #include <csignal>
 
 #if defined(WM_SP)
-#   define MPI_SCALAR MPI_FLOAT
+    #define MPI_SCALAR MPI_FLOAT
 #elif defined(WM_DP)
-#   define MPI_SCALAR MPI_DOUBLE
+    #define MPI_SCALAR MPI_DOUBLE
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -86,7 +86,7 @@ bool Foam::UPstream::init(int& argc, char**& argv)
     // Initialise parallel structure
     setParRun(numprocs);
 
-#   ifndef SGIMPI
+    #ifndef SGIMPI
     string bufferSizeName = getEnv("MPI_BUFFER_SIZE");
 
     if (bufferSizeName.size())
@@ -105,7 +105,7 @@ bool Foam::UPstream::init(int& argc, char**& argv)
             << "environment variable MPI_BUFFER_SIZE not defined"
             << Foam::abort(FatalError);
     }
-#   endif
+    #endif
 
     //int processorNameLen;
     //char processorName[MPI_MAX_PROCESSOR_NAME];
@@ -125,12 +125,12 @@ void Foam::UPstream::exit(int errnum)
         Pout<< "UPstream::exit." << endl;
     }
 
-#   ifndef SGIMPI
+    #ifndef SGIMPI
     int size;
     char* buff;
     MPI_Buffer_detach(&buff, &size);
     delete[] buff;
-#   endif
+    #endif
 
     if (PstreamGlobals::outstandingRequests_.size())
     {
@@ -295,6 +295,56 @@ void Foam::reduce
 }
 
 
+void Foam::UPstream::allToAll
+(
+    const labelUList& sendData,
+    labelUList& recvData,
+    const label communicator
+)
+{
+    label np = nProcs(communicator);
+
+    if (sendData.size() != np || recvData.size() != np)
+    {
+        FatalErrorInFunction
+            << "Size of sendData " << sendData.size()
+            << " or size of recvData " << recvData.size()
+            << " is not equal to the number of processors in the domain "
+            << np
+            << Foam::abort(FatalError);
+    }
+
+    if (!UPstream::parRun())
+    {
+        recvData.deepCopy(sendData);
+    }
+    else
+    {
+        if
+        (
+            MPI_Alltoall
+            (
+                // NOTE: const_cast is a temporary hack for
+                // backward-compatibility with versions of OpenMPI < 1.7.4
+                const_cast<label*>(sendData.begin()),
+                sizeof(label),
+                MPI_BYTE,
+                recvData.begin(),
+                sizeof(label),
+                MPI_BYTE,
+                PstreamGlobals::MPICommunicators_[communicator]
+            )
+        )
+        {
+            FatalErrorInFunction
+                << "MPI_Alltoall failed for " << sendData
+                << " on communicator " << communicator
+                << Foam::abort(FatalError);
+        }
+    }
+}
+
+
 void Foam::UPstream::allocatePstreamCommunicator
 (
     const label parentIndex,
diff --git a/src/Pstream/mpi/allReduce.H b/src/Pstream/mpi/allReduce.H
index fae4ff99eac0905c65024cabb5428854ef51e740..83e4f4c847209e9f7b47cbbbed001082b67fa981 100644
--- a/src/Pstream/mpi/allReduce.H
+++ b/src/Pstream/mpi/allReduce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ void allReduce
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "allReduceTemplates.C"
+    #include "allReduceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/Allwmake b/src/TurbulenceModels/Allwmake
index d76497d6674a725dff4d6a3080f807da29a572bb..0a771231f0f5e04b5aca96964d20d2c528616c2c 100755
--- a/src/TurbulenceModels/Allwmake
+++ b/src/TurbulenceModels/Allwmake
@@ -13,4 +13,4 @@ wmake $targetType schemes
 wmakeLnInclude phaseIncompressible
 wmakeLnInclude phaseCompressible
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C
index 92b7aa226e56acefae494678a592690893fbdcc9..3b2b1d71002be639ff1bbfba333e23e22e91d7d6 100644
--- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C
+++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ CompressibleTurbulenceModel
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class TransportModel>
-Foam::autoPtr<Foam::CompressibleTurbulenceModel<TransportModel> >
+Foam::autoPtr<Foam::CompressibleTurbulenceModel<TransportModel>>
 Foam::CompressibleTurbulenceModel<TransportModel>::New
 (
     const volScalarField& rho,
diff --git a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H
index 363bd7540e7b7e1bab1db5e121e17fa40d95b08c..9e07547b39f1db4680eb8ae67a595b7ac16cad4b 100644
--- a/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H
+++ b/src/TurbulenceModels/compressible/CompressibleTurbulenceModel/CompressibleTurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -148,7 +148,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CompressibleTurbulenceModel.C"
+    #include "CompressibleTurbulenceModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.H b/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.H
index 3b4f935a856f40604b767cdc0d42f67d0e0c2d99..939e97f94c26dbcc7b1272ba83fdb8c47360dba2 100644
--- a/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.H
+++ b/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -155,7 +155,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "EddyDiffusivity.C"
+    #include "EddyDiffusivity.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H
index 5ac7d56ae26a9608cb7cfb402d9bb6b6e9c5a0c7..0b29d2481d65a4909cc4ed87cc7c9117cc657e3d 100644
--- a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H
+++ b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ class buoyantKEpsilon
 
         // Disallow default bitwise copy construct and assignment
         buoyantKEpsilon(const buoyantKEpsilon&);
-        buoyantKEpsilon& operator=(const buoyantKEpsilon&);
+        void operator=(const buoyantKEpsilon&);
 
 
 protected:
@@ -152,7 +152,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "buoyantKEpsilon.C"
+    #include "buoyantKEpsilon.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C
index 487582a8d5d0a93191e633575a0079bddb3c86ac..baaa6070ff6a9c09e0cf356cbba639243ef7ddca 100644
--- a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C
+++ b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::ThermalDiffusivity
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class BasicTurbulenceModel>
-Foam::autoPtr<Foam::ThermalDiffusivity<BasicTurbulenceModel> >
+Foam::autoPtr<Foam::ThermalDiffusivity<BasicTurbulenceModel>>
 Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
 (
     const alphaField& alpha,
@@ -87,7 +87,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
 
 
 template<class BasicTurbulenceModel>
-Foam::autoPtr<Foam::ThermalDiffusivity<BasicTurbulenceModel> >
+Foam::autoPtr<Foam::ThermalDiffusivity<BasicTurbulenceModel>>
 Foam::ThermalDiffusivity<BasicTurbulenceModel>::New
 (
     const volScalarField& rho,
diff --git a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.H b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.H
index 0ee9da0d0bdc71ed13c87f6371752abedaed7fe0..d517daafa891543fbd321f89f6285860c27f20fd 100644
--- a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.H
+++ b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -177,7 +177,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ThermalDiffusivity.C"
+    #include "ThermalDiffusivity.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
index fff73ccb418040e508c8687498d6eb03fa1231b4..5a48788598dace675d3f663426360e0db259831d 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -70,7 +70,7 @@ externalWallHeatFluxTemperatureFvPatchScalarField
     q_(p.size(), 0.0),
     h_(p.size(), 0.0),
     Ta_(p.size(), 0.0),
-    QrPrevious_(p.size()),
+    QrPrevious_(p.size(), 0.0),
     QrRelaxation_(1),
     QrName_("undefined-Qr"),
     thicknessLayers_(),
@@ -240,6 +240,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::autoMap
     q_.autoMap(m);
     h_.autoMap(m);
     Ta_.autoMap(m);
+    QrPrevious_.autoMap(m);
 }
 
 
@@ -257,6 +258,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap
     q_.rmap(tiptf.q_, addr);
     h_.rmap(tiptf.h_, addr);
     Ta_.rmap(tiptf.Ta_, addr);
+    QrPrevious_.rmap(tiptf.QrPrevious_, addr);
 }
 
 
@@ -294,7 +296,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
             scalar totalSolidRes = 0.0;
             if (thicknessLayers_.size() > 0)
             {
-                forAll (thicknessLayers_, iLayer)
+                forAll(thicknessLayers_, iLayer)
                 {
                     const scalar l = thicknessLayers_[iLayer];
                     if (kappaLayers_[iLayer] > 0.0)
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
index 163cb9537d99383a49413c830536cd014b1530af..8e1e3a8c259598760b9f2fd3494b6e621456c9fc 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,9 +82,13 @@ Description
     }
     \endverbatim
 
-Note
-  - Only supply \c h and \c Ta, or \c q in the dictionary (see above)
-  - kappa entries can be: fluidThermo, solidThermo or lookup
+  Note:
+
+    \li Only supply \c h and \c Ta, or \c q in the dictionary (see above)
+    \li \c kappa and \c kappaName are inherited from temperatureCoupledBase.
+
+SeeAlso
+    Foam::temperatureCoupledBase
 
 SourceFiles
     externalWallHeatFluxTemperatureFvPatchScalarField.C
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
index 7612f746e7a3d726bb898fa700e99600171e0aad..e2cdfdfc0d402fbadc2ca943c3ad029211abd38a 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -257,7 +257,7 @@ baffleThickness() const
         (
             new scalarField(nbrField.baffleThickness())
         );
-        scalarField& thickness = tthickness();
+        scalarField& thickness = tthickness.ref();
         mapDist.distribute(thickness);
         return tthickness;
     }
@@ -285,7 +285,7 @@ tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
         );
 
         tmp<scalarField> tQs(new scalarField(nbrField.Qs()));
-        scalarField& Qs = tQs();
+        scalarField& Qs = tQs.ref();
         mapDist.distribute(Qs);
         return tQs;
     }
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H
index f3c84cb4b58e8bad3740da5481b85413431bcd67..d861f56895ac8d38241cd0b5e2506b12ee4ffc3a 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -263,7 +263,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "thermalBaffle1DFvPatchScalarField.C"
+    #include "thermalBaffle1DFvPatchScalarField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
index d3d5116348a1b46d51ab227379794b508dae23dc..576793f6aa705323edc27fdc565440f667092a9c 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -154,10 +154,10 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
 
     const label patchI = patch().index();
 
-    const LESModel<EddyDiffusivity<compressible::turbulenceModel> >& turbModel =
+    const LESModel<EddyDiffusivity<compressible::turbulenceModel>>& turbModel =
         db().lookupObject
         <
-            LESModel<EddyDiffusivity<compressible::turbulenceModel> >
+            LESModel<EddyDiffusivity<compressible::turbulenceModel>>
         >
         (
             IOobject::groupName
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H
index a6313f71ae7d944429b22249d5e6191cee200f86..2a54af8c401d0f83d2ef7d9212ba8959da23a09b 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,9 +106,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new
                 totalFlowRateAdvectiveDiffusiveFvPatchScalarField(*this)
@@ -123,12 +123,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new
                 totalFlowRateAdvectiveDiffusiveFvPatchScalarField
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
index 903c50b164e039e2d03520c1beefe572417160b5..f5940847c045f3f72546ff2557a580880290da7b 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,7 +109,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
         if (thicknessLayers_.size() > 0)
         {
             // Calculate effective thermal resistance by harmonic averaging
-            forAll (thicknessLayers_, iLayer)
+            forAll(thicknessLayers_, iLayer)
             {
                 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
             }
@@ -195,17 +195,17 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
 
     if (contactRes_ == 0.0)
     {
-        nbrIntFld() = nbrField.patchInternalField();
-        nbrKDelta() = nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs();
+        nbrIntFld.ref() = nbrField.patchInternalField();
+        nbrKDelta.ref() = nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs();
     }
     else
     {
-        nbrIntFld() = nbrField;
-        nbrKDelta() = contactRes_;
+        nbrIntFld.ref() = nbrField;
+        nbrKDelta.ref() = contactRes_;
     }
 
-    mpp.distribute(nbrIntFld());
-    mpp.distribute(nbrKDelta());
+    mpp.distribute(nbrIntFld.ref());
+    mpp.distribute(nbrKDelta.ref());
 
     tmp<scalarField> myKDelta = kappa(*this)*patch().deltaCoeffs();
 
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
index 18d1d4cb4a0844f7eed72c43a365c55124b59834..f8b98df494247626e028ea2f21cda75beea61d38 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,23 +62,22 @@ Description
         type            compressible::turbulentTemperatureCoupledBaffleMixed;
         Tnbr            T;
         kappa           lookup;
-        KappaName       kappa;
+        kappaName       kappa;
         thicknessLayers (0.1 0.2 0.3 0.4);
-        kappaLayers     (1 2 3 4)
+        kappaLayers     (1 2 3 4);
         value           uniform 300;
     }
     \endverbatim
 
     Needs to be on underlying mapped(Wall)FvPatch.
 
-    Note: kappa : heat conduction at patch. Gets supplied how to lookup
-        calculate kappa:
+    Note:
 
-    - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
-    - 'fluidThermo' : use fluidThermo and compressible::RASmodel to calculate
-        kappa
-    - 'solidThermo' : use solidThermo kappa()
-    - 'directionalSolidThermo' directionalKappa()
+    \li \c kappa and \c kappaName are inherited from temperatureCoupledBase.
+
+
+SeeAlso
+    Foam::temperatureCoupledBase
 
 SourceFiles
     turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
index 8d563bac65cd8077b3e58c55017dba98c6ff391a..4fa51bc054d8e54ef1a7adfaef01f6a3bfe1e92e 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,7 +115,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
         if (thicknessLayers_.size() > 0)
         {
             // Calculate effective thermal resistance by harmonic averaging
-            forAll (thicknessLayers_, iLayer)
+            forAll(thicknessLayers_, iLayer)
             {
                 contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
             }
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H
index 6bd2aaa6e9959c3ff56023a30c1dc4b88e6cd911..77365b2aa612ab114e576e095df135aa627d6ea0 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H
@@ -55,7 +55,7 @@ Description
         type            compressible::turbulentTemperatureRadCoupledMixed;
         Tnbr            T;
         kappa           lookup;
-        KappaName       kappa;
+        kappaName       kappa;
         QrNbr           Qr; // or none. Name of Qr field on neighbour region
         Qr              Qr; // or none. Name of Qr field on local region
         thicknessLayers (0.1 0.2 0.3 0.4);
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H
index d4c21d4b96a46860693ce72e6a8ac946d13f5b48..7213aa5be5d149a5248580a80a1e51f80090cc7b 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/makeTurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ License
             dictionary                                                         \
         );                                                                     \
                                                                                \
-        typedef TDModel<BaseModel<Transport> >                                 \
+        typedef TDModel<BaseModel<Transport>>                                  \
             Transport##BaseModel;                                              \
                                                                                \
                                                                                \
@@ -60,7 +60,7 @@ License
         );                                                                     \
                                                                                \
                                                                                \
-        typedef RASModel<EddyDiffusivity<Transport##BaseModel> >               \
+        typedef RASModel<EddyDiffusivity<Transport##BaseModel>>                \
             RAS##Transport##BaseModel;                                         \
                                                                                \
         defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0);     \
@@ -76,7 +76,7 @@ License
         );                                                                     \
                                                                                \
                                                                                \
-        typedef LESModel<EddyDiffusivity<Transport##BaseModel> >               \
+        typedef LESModel<EddyDiffusivity<Transport##BaseModel>>                \
             LES##Transport##BaseModel;                                         \
                                                                                \
         defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0);     \
@@ -94,7 +94,7 @@ License
 
 
 #define makeTemplatedTurbulenceModel(BaseModel, SType, Type)                   \
-    typedef Foam::SType##Models::Type<Foam::EddyDiffusivity<Foam::BaseModel> > \
+    typedef Foam::SType##Models::Type<Foam::EddyDiffusivity<Foam::BaseModel>> \
         Type##SType##BaseModel;                                                \
     defineNamedTemplateTypeNameAndDebug(Type##SType##BaseModel, 0);            \
                                                                                \
@@ -102,7 +102,7 @@ License
     {                                                                          \
         namespace SType##Models                                                \
         {                                                                      \
-            typedef Type<EddyDiffusivity<BaseModel> > Type##SType##BaseModel;  \
+            typedef Type<EddyDiffusivity<BaseModel>> Type##SType##BaseModel;   \
                                                                                \
             addToRunTimeSelectionTable                                         \
             (                                                                  \
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H
index 9420f8986480345da69719843551ab7d1fa19db3..33067385017befcbf54e3f792bbb67f065ae5871 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,11 +56,11 @@ namespace Foam
 {
     namespace compressible
     {
-        typedef ThermalDiffusivity<CompressibleTurbulenceModel<fluidThermo> >
+        typedef ThermalDiffusivity<CompressibleTurbulenceModel<fluidThermo>>
             turbulenceModel;
 
-        typedef RASModel<EddyDiffusivity<turbulenceModel> > RASModel;
-        typedef LESModel<EddyDiffusivity<turbulenceModel> > LESModel;
+        typedef RASModel<EddyDiffusivity<turbulenceModel>> RASModel;
+        typedef LESModel<EddyDiffusivity<turbulenceModel>> LESModel;
 
         template<class BasicCompressibleTurbulenceModel>
         autoPtr<BasicCompressibleTurbulenceModel> New
@@ -79,7 +79,7 @@ namespace Foam
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "turbulentFluidThermoModel.C"
+    #include "turbulentFluidThermoModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C
index 2da3007b122a2d6657817c7a06ef2ff3ca9d0cd4..253b1a0cb07e45fcd0aaeb990f4d5f3e1b186ad1 100644
--- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C
+++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ IncompressibleTurbulenceModel
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class TransportModel>
-Foam::autoPtr<Foam::IncompressibleTurbulenceModel<TransportModel> >
+Foam::autoPtr<Foam::IncompressibleTurbulenceModel<TransportModel>>
 Foam::IncompressibleTurbulenceModel<TransportModel>::New
 (
     const volVectorField& U,
diff --git a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H
index dd6899d3b077dd3344ff1bdc7231f740a4c11d2e..a25be33c94fbc867d347014f8cd57df243302920 100644
--- a/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H
+++ b/src/TurbulenceModels/incompressible/IncompressibleTurbulenceModel/IncompressibleTurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IncompressibleTurbulenceModel.C"
+    #include "IncompressibleTurbulenceModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C
index 245a0ff55c80b11adbc348d6911a54c2d076d7f8..70c7403e2f96e2d6b831be872c1d3a051f3e50b5 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -235,8 +235,8 @@ void LamBremhorstKE::correct()
       - fvm::Sp(Ceps2_*f2(Rt)*epsilon_/k_, epsilon_)
     );
 
-    epsEqn().relax();
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().relax();
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
@@ -250,7 +250,7 @@ void LamBremhorstKE::correct()
         G - fvm::Sp(epsilon_/k_, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
     solve(kEqn);
     bound(k_, kMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H
index e0d1fda37b03a80cd3ae40a0a31354d89072c35c..d45950335a1d33b18e8a2e0643d8620b34bc5f98 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,7 +70,7 @@ class LamBremhorstKE
 
         // Disallow default bitwise copy construct and assignment
         LamBremhorstKE(const LamBremhorstKE&);
-        LamBremhorstKE& operator=(const LamBremhorstKE&);
+        void operator=(const LamBremhorstKE&);
 
         tmp<volScalarField> Rt() const;
         tmp<volScalarField> fMu(const volScalarField& Rt) const;
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C
index cc58aabc787e045e4dbae86455cc1fdbc2a3de22..3a4bc9c2621666ee3730ce84eed1c422238c2302 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -404,8 +404,8 @@ void LienCubicKE::correct()
       + E(f2)
     );
 
-    epsEqn().relax();
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().relax();
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
@@ -421,7 +421,7 @@ void LienCubicKE::correct()
       - fvm::Sp(epsilon_/k_, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
     solve(kEqn);
     bound(k_, kMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C
index 0b1ec7320235533b0141d29de6ef45cff0e06ef9..e91c6235647225dd9f6fa23ac49def98312396a5 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -288,8 +288,8 @@ void LienLeschziner::correct()
       + E(f2)
     );
 
-    epsEqn().relax();
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().relax();
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
@@ -305,7 +305,7 @@ void LienLeschziner::correct()
       - fvm::Sp(epsilon_/k_, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
     solve(kEqn);
     bound(k_, kMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C
index c2d22054c2df7fc76de332a080729e84f3a6ca39..145c863931f05ed659dc4c6c3b8c1231d26cb4fb 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -286,8 +286,8 @@ void ShihQuadraticKE::correct()
       - fvm::Sp(Ceps2_*epsilon_/k_, epsilon_)
     );
 
-    epsEqn().relax();
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().relax();
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
@@ -303,7 +303,7 @@ void ShihQuadraticKE::correct()
       - fvm::Sp(epsilon_/k_, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
     solve(kEqn);
     bound(k_, kMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C
index 58a84fc1482f935b199afc03b66d71ca126af707..6b30ee9d0da76d798cb0ad1b96774c54814ce26e 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -698,8 +698,8 @@ void kkLOmega::correct()
         )().dimensionedInternalField()/pow3(y_.dimensionedInternalField())
     );
 
-    omegaEqn().relax();
-    omegaEqn().boundaryManipulate(omega_.boundaryField());
+    omegaEqn.ref().relax();
+    omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
 
     solve(omegaEqn);
     bound(omega_, omegaMin_);
@@ -718,8 +718,8 @@ void kkLOmega::correct()
       - fvm::Sp(Rbp + Rnat + Dl/(kl_ + kMin_), kl_)
     );
 
-    klEqn().relax();
-    klEqn().boundaryManipulate(kl_.boundaryField());
+    klEqn.ref().relax();
+    klEqn.ref().boundaryManipulate(kl_.boundaryField());
 
     solve(klEqn);
     bound(kl_, kMin_);
@@ -739,8 +739,8 @@ void kkLOmega::correct()
       - fvm::Sp(omega_ + Dt/(kt_+ kMin_), kt_)
     );
 
-    ktEqn().relax();
-    ktEqn().boundaryManipulate(kt_.boundaryField());
+    ktEqn.ref().relax();
+    ktEqn.ref().boundaryManipulate(kt_.boundaryField());
 
     solve(ktEqn);
     bound(kt_, kMin_);
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C
index 44a5c331214720a8c0dba4eba3ec81a47e2ab53e..f5b587385af6dea8538da3d51b5ba044d7bc7895 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -260,7 +260,7 @@ void qZeta::correct()
       + E
     );
 
-    zetaEqn().relax();
+    zetaEqn.ref().relax();
     solve(zetaEqn);
     bound(zeta_, zetaMin_);
 
@@ -275,7 +275,7 @@ void qZeta::correct()
         G - fvm::Sp(zeta_/q_, q_)
     );
 
-    qEqn().relax();
+    qEqn.ref().relax();
     solve(qEqn);
     bound(q_, qMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H
index 99f70435bdb393d3585e785cc6e8823888634979..31b9a37c1585d49ff639ef0a1a27557566a8200b 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ namespace Foam
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "turbulentTransportModel.C"
+    #include "turbulentTransportModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C
index 44eb97019b1cc0626156a224e75e40797a8e1144..12e23ea702878e2943e9051657591dbc9350c4dd 100644
--- a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C
+++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,9 +24,8 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "NicenoKEqn.H"
-#include "addToRunTimeSelectionTable.H"
+#include "fvOptions.H"
 #include "twoPhaseSystem.H"
-#include "dragModel.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -139,7 +138,7 @@ NicenoKEqn<BasicTurbulenceModel>::gasTurbulence() const
 
         gasTurbulencePtr_ =
            &U.db()
-           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel> >
+           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel>>
             (
                 IOobject::groupName
                 (
@@ -165,6 +164,9 @@ void NicenoKEqn<BasicTurbulenceModel>::correctNut()
        *(mag(this->U_ - gasTurbulence.U()));
 
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
diff --git a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H
index d993c357723c40f3d53f804aa9fb710732279ccc..70503dbdd88935b3202c6633956ff284be0e7a37 100644
--- a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H
+++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ class NicenoKEqn
 
         // Disallow default bitwise copy construct and assignment
         NicenoKEqn(const NicenoKEqn&);
-        NicenoKEqn& operator=(const NicenoKEqn&);
+        void operator=(const NicenoKEqn&);
 
 
 protected:
@@ -165,7 +165,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NicenoKEqn.C"
+    #include "NicenoKEqn.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C
index f7bfe4fbf68e279152c5678f815476d2f109109b..c682d0b29a355b9d76b3aebd8f0a080ea9c59acd 100644
--- a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C
+++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "SmagorinskyZhang.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -114,7 +115,7 @@ SmagorinskyZhang<BasicTurbulenceModel>::gasTurbulence() const
 
         gasTurbulencePtr_ =
            &U.db()
-           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel> >
+           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel>>
             (
                 IOobject::groupName
                 (
@@ -142,6 +143,9 @@ void SmagorinskyZhang<BasicTurbulenceModel>::correctNut()
        *(mag(this->U_ - gasTurbulence.U()));
 
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
diff --git a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H
index d0d250c4f627d17856288e881bbdc0c09ac6a3b5..e243ba689fddf2c6a71b53d968bc937725e9116e 100644
--- a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H
+++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ class SmagorinskyZhang
 
         // Disallow default bitwise copy construct and assignment
         SmagorinskyZhang(const SmagorinskyZhang&);
-        SmagorinskyZhang& operator=(const SmagorinskyZhang&);
+        void operator=(const SmagorinskyZhang&);
 
 
 protected:
@@ -158,7 +158,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SmagorinskyZhang.C"
+    #include "SmagorinskyZhang.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C
index 00e23e7c32a73ed6012f1a4be134e6fc294a2121..31d646b7598e6c5d87ac46011b2e820989b4c89c 100644
--- a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C
+++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "continuousGasKEqn.H"
-#include "addToRunTimeSelectionTable.H"
 #include "twoPhaseSystem.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H
index 3893b8cf928d6de639670fda94e5456a026a60e9..fdf2d237387e1e66fa0ed6455ca74db80a810282 100644
--- a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H
+++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ class continuousGasKEqn
 
         // Disallow default bitwise copy construct and assignment
         continuousGasKEqn(const continuousGasKEqn&);
-        continuousGasKEqn& operator=(const continuousGasKEqn&);
+        void operator=(const continuousGasKEqn&);
 
 
 protected:
@@ -152,7 +152,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "continuousGasKEqn.C"
+    #include "continuousGasKEqn.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C
index a09689d068120788e91cd97b0ee755884f49e124..b78cdb4f5e4f4eb4561770158d3859690bd1af17 100644
--- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C
+++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ PhaseCompressibleTurbulenceModel
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class TransportModel>
-Foam::autoPtr<Foam::PhaseCompressibleTurbulenceModel<TransportModel> >
+Foam::autoPtr<Foam::PhaseCompressibleTurbulenceModel<TransportModel>>
 Foam::PhaseCompressibleTurbulenceModel<TransportModel>::New
 (
     const volScalarField& alpha,
diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H
index d3d19edc4d168cde4e38a8e07e255a4f2b986b85..f58f50dfdf6eb7e0625db7ffce24339ab73c8910 100644
--- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H
+++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -158,7 +158,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PhaseCompressibleTurbulenceModel.C"
+    #include "PhaseCompressibleTurbulenceModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C
index 843ecc015d7a85fd7333146b2541dbf8eb0f01fc..7d923e013ffa00f4ff17517ea25ed8f1689dab68 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C
+++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,9 +24,8 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "LaheyKEpsilon.H"
-#include "addToRunTimeSelectionTable.H"
+#include "fvOptions.H"
 #include "twoPhaseSystem.H"
-#include "dragModel.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -150,7 +149,7 @@ LaheyKEpsilon<BasicTurbulenceModel>::gasTurbulence() const
 
         gasTurbulencePtr_ =
            &U.db()
-           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel> >
+           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel>>
             (
                 IOobject::groupName
                 (
@@ -176,6 +175,9 @@ void LaheyKEpsilon<BasicTurbulenceModel>::correctNut()
        *(mag(this->U_ - gasTurbulence.U()));
 
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H
index 63858ecb46eef5641dabc978f95f9c082af4ce2c..86dbf0d6da074689c3c18aacec84bd570ead8913 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H
+++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ class LaheyKEpsilon
 
         // Disallow default bitwise copy construct and assignment
         LaheyKEpsilon(const LaheyKEpsilon&);
-        LaheyKEpsilon& operator=(const LaheyKEpsilon&);
+        void operator=(const LaheyKEpsilon&);
 
 
 protected:
@@ -172,7 +172,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LaheyKEpsilon.C"
+    #include "LaheyKEpsilon.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C
index 86d6a7f334fc493afd951eea06c2f01ea60ebba8..e57eff4b8432445018a74cef4e49a24f5bc1bf58 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C
+++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "continuousGasKEpsilon.H"
-#include "addToRunTimeSelectionTable.H"
+#include "fvOptions.H"
 #include "twoPhaseSystem.H"
 #include "virtualMassModel.H"
 
@@ -136,6 +136,7 @@ void continuousGasKEpsilon<BasicTurbulenceModel>::correctNut()
     volScalarField omega((1 - expThetar)/(1 + expThetar));
 
     nutEff_ = omega*liquidTurbulence.nut();
+    fv::options::New(this->mesh_).correct(nutEff_);
 }
 
 
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H
index ab380bc4649b7bea1a5537bdbffaa112ef2a5ffb..778a6f7dcb4a6066c44063ea2c0e0a683ab5c87c 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H
+++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ class continuousGasKEpsilon
 
         // Disallow default bitwise copy construct and assignment
         continuousGasKEpsilon(const continuousGasKEpsilon&);
-        continuousGasKEpsilon& operator=(const continuousGasKEpsilon&);
+        void operator=(const continuousGasKEpsilon&);
 
 
 protected:
@@ -170,7 +170,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "continuousGasKEpsilon.C"
+    #include "continuousGasKEpsilon.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C
index 76d7e4d0be12dafffede5d945ab72f7a9b817e0c..25e47992f25fa5a73a381bc62636b2723ff50328 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C
+++ b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,9 +24,8 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "kOmegaSSTSato.H"
-#include "addToRunTimeSelectionTable.H"
+#include "fvOptions.H"
 #include "twoPhaseSystem.H"
-#include "dragModel.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -116,7 +115,7 @@ kOmegaSSTSato<BasicTurbulenceModel>::gasTurbulence() const
 
         gasTurbulencePtr_ =
            &U.db()
-           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel> >
+           .lookupObject<PhaseCompressibleTurbulenceModel<transportModel>>
             (
                 IOobject::groupName
                 (
@@ -153,6 +152,9 @@ void kOmegaSSTSato<BasicTurbulenceModel>::correctNut()
        *(mag(this->U_ - gasTurbulence.U()));
 
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.H b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.H
index 6d0f720b7dfadc52f001ac56475d42a1fffabb7d..e25ba65fd7ae6048beb1a9e8dfff6cd9a3c9f4c1 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.H
+++ b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -142,7 +142,7 @@ class kOmegaSSTSato
 
         // Disallow default bitwise copy construct and assignment
         kOmegaSSTSato(const kOmegaSSTSato&);
-        kOmegaSSTSato& operator=(const kOmegaSSTSato&);
+        void operator=(const kOmegaSSTSato&);
 
 
 protected:
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C
index f0b8a4f537e124744c84f869d02bba27c9bfce1f..789a1688da180f0fc21d3329d8c1233ecd11a2d6 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C
+++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,9 +24,9 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "mixtureKEpsilon.H"
+#include "fvOptions.H"
 #include "bound.H"
 #include "twoPhaseSystem.H"
-#include "dragModel.H"
 #include "virtualMassModel.H"
 #include "fixedValueFvPatchFields.H"
 #include "inletOutletFvPatchFields.H"
@@ -54,7 +54,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::mixtureKEpsilon
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -311,7 +311,7 @@ void mixtureKEpsilon<BasicTurbulenceModel>::initMixtureFields()
 template<class BasicTurbulenceModel>
 bool mixtureKEpsilon<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         C1_.readIfPresent(this->coeffDict());
@@ -335,6 +335,9 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Cmu_*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
@@ -354,7 +357,7 @@ mixtureKEpsilon<BasicTurbulenceModel>::liquidTurbulence() const
         liquidTurbulencePtr_ =
            &const_cast<mixtureKEpsilon<BasicTurbulenceModel>&>
             (
-                U.db().lookupObject<mixtureKEpsilon<BasicTurbulenceModel> >
+                U.db().lookupObject<mixtureKEpsilon<BasicTurbulenceModel>>
                 (
                     IOobject::groupName
                     (
@@ -575,7 +578,9 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
     volScalarField& km = km_();
     volScalarField& epsilonm = epsilonm_();
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    fv::options& fvOptions(fv::options::New(this->mesh_));
+
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     // Update the effective mixture density
     rhom = this->rhom();
@@ -610,7 +615,7 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
         kl.boundaryField().updateCoeffs();
         epsilonl.boundaryField().updateCoeffs();
 
-        Gc().checkOut();
+        Gc.ref().checkOut();
     }
 
     tmp<volScalarField> Gd;
@@ -630,7 +635,7 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
         kg.boundaryField().updateCoeffs();
         epsilong.boundaryField().updateCoeffs();
 
-        Gd().checkOut();
+        Gd.ref().checkOut();
     }
 
     // Mixture turbulence generation
@@ -657,13 +662,14 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
       - fvm::SuSp(((2.0/3.0)*C1_)*divUm, epsilonm)
       - fvm::Sp(C2_*epsilonm/km, epsilonm)
       + epsilonSource()
+      + fvOptions(epsilonm)
     );
 
-    epsEqn().relax();
-
-    epsEqn().boundaryManipulate(epsilonm.boundaryField());
-
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilonm.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilonm);
     bound(epsilonm, this->epsilonMin_);
 
 
@@ -679,10 +685,13 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
       - fvm::SuSp((2.0/3.0)*divUm, km)
       - fvm::Sp(epsilonm/km, km)
       + kSource()
+      + fvOptions(km)
     );
 
-    kmEqn().relax();
+    kmEqn.ref().relax();
+    fvOptions.constrain(kmEqn.ref());
     solve(kmEqn);
+    fvOptions.correct(km);
     bound(km, this->kMin_);
     km.correctBoundaryConditions();
 
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H
index 27773a0c6a80a9a930d0fe0bee7124bb28846788..09313c1106b4dcf96fd58d1f295e4fa9ea8ebb65 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H
+++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class mixtureKEpsilon
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
     // Private data
 
@@ -94,7 +94,7 @@ class mixtureKEpsilon
 
         // Disallow default bitwise copy construct and assignment
         mixtureKEpsilon(const mixtureKEpsilon&);
-        mixtureKEpsilon& operator=(const mixtureKEpsilon&);
+        void operator=(const mixtureKEpsilon&);
 
         //- Return the turbulence model for the other phase
         mixtureKEpsilon<BasicTurbulenceModel>& liquidTurbulence() const;
@@ -257,7 +257,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mixtureKEpsilon.C"
+    #include "mixtureKEpsilon.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C
index f563357970c7f64331053582e185656503394e2a..aadd2aac262b14c50076ded596ede6bb36d9380f 100644
--- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C
+++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ PhaseIncompressibleTurbulenceModel
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class TransportModel>
-Foam::autoPtr<Foam::PhaseIncompressibleTurbulenceModel<TransportModel> >
+Foam::autoPtr<Foam::PhaseIncompressibleTurbulenceModel<TransportModel>>
 Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::New
 (
     const volScalarField& alpha,
diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H
index 17b6f0a01e357bdc5d1e3abad8ea7c035b61c437..c388740c17a7269980fbd652a6e404d580107701 100644
--- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H
+++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,7 +133,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PhaseIncompressibleTurbulenceModel.C"
+    #include "PhaseIncompressibleTurbulenceModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H b/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H
index 291a47a8ece92b71ef782fdb7d873fcb7d6cce5b..94b316270b3f8f0a923d7179fd2bad72b2df000a 100644
--- a/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H
+++ b/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -129,10 +129,10 @@ class DEShybrid
     // Private Data
 
         //- Scheme 1
-        tmp<surfaceInterpolationScheme<Type> > tScheme1_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme1_;
 
         //- Scheme 2
-        tmp<surfaceInterpolationScheme<Type> > tScheme2_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme2_;
 
         //- DES Coefficient
         scalar CDES_;
@@ -424,7 +424,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -447,7 +447,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -482,7 +482,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C
index 81ac361b0ce7bf93bc4eb6632b88bf49ca41088c..663c84c44758c69fd94569fe207d10e0a89fd8a8 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -56,7 +56,7 @@ tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr().boundaryField() == 0.0;
+    tr.ref().boundaryField() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.H b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.H
index 9ba263f13e7137beca4b7b3a0cb1e1eb10060d39..e0346cd1f6831b46fcb82aa9be0fc8d31a3c14b2 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.H
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ class SpalartAllmarasDDES
 
         // Disallow default bitwise copy construct and assignment
         SpalartAllmarasDDES(const SpalartAllmarasDDES&);
-        SpalartAllmarasDDES& operator=(const SpalartAllmarasDDES&);
+        void operator=(const SpalartAllmarasDDES&);
 
 
 protected:
@@ -145,7 +145,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SpalartAllmarasDDES.C"
+    #include "SpalartAllmarasDDES.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C
index f5dce6ab61c73a7266cf267be4fc6affff923d34..e4d8fddf16f6271b42eb02bec5fa45533a6fb3a4 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "SpalartAllmarasDES.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -128,7 +129,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::r
             scalar(10)
         )
     );
-    tr().boundaryField() == 0.0;
+    tr.ref().boundaryField() == 0.0;
 
     return tr;
 }
@@ -174,7 +175,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::psi
 
     if (lowReCorrection_)
     {
-        volScalarField& psi = tpsi();
+        volScalarField& psi = tpsi.ref();
 
         const volScalarField fv2(this->fv2(chi, fv1));
         const volScalarField ft2(this->ft2(chi));
@@ -204,7 +205,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda
 ) const
 {
     tmp<volScalarField> tdTilda(psi(chi, fv1)*CDES_*this->delta());
-    min(tdTilda().dimensionedInternalField(), tdTilda(), y_);
+    min(tdTilda.ref().dimensionedInternalField(), tdTilda(), y_);
     return tdTilda;
 }
 
@@ -217,6 +218,7 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correctNut
 {
     this->nut_ = nuTilda_*fv1;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -457,7 +459,29 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::k() const
 {
     const volScalarField chi(this->chi());
     const volScalarField fv1(this->fv1(chi));
-    return sqr(this->nut()/ck_/dTilda(chi, fv1, fvc::grad(this->U_)));
+
+    tmp<volScalarField> tdTilda
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "dTilda",
+                this->mesh_.time().timeName(),
+                this->mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            this->mesh_,
+            dimensionedScalar("0", dimLength, 0.0),
+            zeroGradientFvPatchField<vector>::typeName
+        )
+    );
+    volScalarField& dTildaF = tdTilda.ref();
+    dTildaF = dTilda(chi, fv1, fvc::grad(this->U_));
+    dTildaF.correctBoundaryConditions();
+
+    return sqr(this->nut()/ck_/dTildaF);
 }
 
 
@@ -500,6 +524,7 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct()
     const rhoField& rho = this->rho_;
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
     DESModel<BasicTurbulenceModel>::correct();
 
@@ -526,11 +551,14 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct()
            *alpha*rho*nuTilda_/sqr(dTilda),
             nuTilda_
         )
+      + fvOptions(alpha, rho, nuTilda_)
     );
 
-    nuTildaEqn().relax();
+    nuTildaEqn.ref().relax();
+    fvOptions.constrain(nuTildaEqn.ref());
     solve(nuTildaEqn);
-    bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0));
+    fvOptions.correct(nuTilda_);
+    bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0));
     nuTilda_.correctBoundaryConditions();
 
     correctNut(fv1);
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H
index ea2aacc3a3f11d358240c33dfa00d77da2fc19ab..b0d63572308165185c3fe959590dde00839587ab 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ class SpalartAllmarasDES
 
         // Disallow default bitwise copy construct and assignment
         SpalartAllmarasDES(const SpalartAllmarasDES&);
-        SpalartAllmarasDES& operator=(const SpalartAllmarasDES&);
+        void operator=(const SpalartAllmarasDES&);
 
 
 protected:
@@ -238,7 +238,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SpalartAllmarasDES.C"
+    #include "SpalartAllmarasDES.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C
index 7ce8a1fae1716798545f6911a9d4463cb30b8c56..a302520b587c628eb8a283aa7c031e0fe63e7f06 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C
@@ -98,7 +98,7 @@ tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr().boundaryField() == 0.0;
+    tr.ref().boundaryField() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H
index 1c61c84f0fd20cd85fbc316e20f2ffdd78a647cf..e7243d770876e353f2747fa5e920b240cf8b7bdf 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H
+++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ class SpalartAllmarasIDDES
 
         // Disallow default bitwise copy construct and assignment
         SpalartAllmarasIDDES(const SpalartAllmarasIDDES&);
-        SpalartAllmarasIDDES& operator=(const SpalartAllmarasIDDES&);
+        void operator=(const SpalartAllmarasIDDES&);
 
 
 protected:
@@ -162,7 +162,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SpalartAllmarasIDDES.C"
+    #include "SpalartAllmarasIDDES.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C
index b4f46dfd1db5e6c55706709b6bc9d83e69517cb2..76868eea2942a44e7c13f19c73331a6fba8b07af 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C
@@ -56,7 +56,7 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr().boundaryField() == 0.0;
+    tr.ref().boundaryField() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C
index 0251f96e2aec0066a9df1e6d60c451273a11302d..91fae228e7465f708c2306c640b68124909b7cee 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -38,7 +38,7 @@ template<class BasicTurbulenceModel>
 void kOmegaSSTDES<BasicTurbulenceModel>::correctNut(const volScalarField& S2)
 {
     // Correct the turbulence viscosity
-    kOmegaSSTBase<DESModel<BasicTurbulenceModel> >::correctNut(S2);
+    kOmegaSSTBase<DESModel<BasicTurbulenceModel>>::correctNut(S2);
 
     // Correct the turbulence thermal diffusivity
     BasicTurbulenceModel::correctNut();
@@ -81,7 +81,7 @@ kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES
     const word& type
 )
 :
-    kOmegaSSTBase<DESModel<BasicTurbulenceModel> >
+    kOmegaSSTBase<DESModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -135,7 +135,7 @@ kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES
 template<class BasicTurbulenceModel>
 bool kOmegaSSTDES<BasicTurbulenceModel>::read()
 {
-    if (kOmegaSSTBase<DESModel<BasicTurbulenceModel> >::read())
+    if (kOmegaSSTBase<DESModel<BasicTurbulenceModel>>::read())
     {
         kappa_.readIfPresent(this->coeffDict());
         CDESkom_.readIfPresent(this->coeffDict());
@@ -206,9 +206,9 @@ void kOmegaSSTDES<BasicTurbulenceModel>::correct()
           + this->omegaSource()
         );
 
-        omegaEqn().relax();
+        omegaEqn.ref().relax();
 
-        omegaEqn().boundaryManipulate(omega.boundaryField());
+        omegaEqn.ref().boundaryManipulate(omega.boundaryField());
 
         solve(omegaEqn);
         bound(omega, this->omegaMin_);
@@ -231,7 +231,7 @@ void kOmegaSSTDES<BasicTurbulenceModel>::correct()
           + this->kSource()
         );
 
-        kEqn().relax();
+        kEqn.ref().relax();
         solve(kEqn);
         bound(k, this->kMin_);
     }
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H
index a7648d0dd149125a28bcf49a28c0e2efcf1f5c4d..c609ab98dc9d84aae193251b24a1b5a99aa3bea5 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -65,7 +65,7 @@ namespace LESModels
 template<class BasicTurbulenceModel>
 class kOmegaSSTDES
 :
-    public kOmegaSSTBase<DESModel<BasicTurbulenceModel> >
+    public kOmegaSSTBase<DESModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C
index a3e3bc810410a3378aadb69a39865bfe66bb5ae8..a01df0542a0e865be79963d6ae2964108dccf3f7 100644
--- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C
@@ -98,7 +98,7 @@ tmp<volScalarField> kOmegaSSTIDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr().boundaryField() == 0.0;
+    tr.ref().boundaryField() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C
index e958e933246e7f63129950b4c49bfba2c97a5af2..b2e6cd9796c7b0f0b27379c47ef9cc9ceea75294 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "DeardorffDiffStress.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -39,6 +40,7 @@ void DeardorffDiffStress<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Ck_*sqrt(this->k())*this->delta();
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -59,7 +61,7 @@ DeardorffDiffStress<BasicTurbulenceModel>::DeardorffDiffStress
     const word& type
 )
 :
-    ReynoldsStress<LESModel<BasicTurbulenceModel> >
+    ReynoldsStress<LESModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -121,7 +123,7 @@ DeardorffDiffStress<BasicTurbulenceModel>::DeardorffDiffStress
 template<class BasicTurbulenceModel>
 bool DeardorffDiffStress<BasicTurbulenceModel>::read()
 {
-    if (ReynoldsStress<LESModel<BasicTurbulenceModel> >::read())
+    if (ReynoldsStress<LESModel<BasicTurbulenceModel>>::read())
     {
         Ck_.readIfPresent(this->coeffDict());
         Cm_.readIfPresent(this->coeffDict());
@@ -174,8 +176,9 @@ void DeardorffDiffStress<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volSymmTensorField& R = this->R_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    ReynoldsStress<LESModel<BasicTurbulenceModel> >::correct();
+    ReynoldsStress<LESModel<BasicTurbulenceModel>>::correct();
 
     tmp<volTensorField> tgradU(fvc::grad(U));
     const volTensorField& gradU = tgradU();
@@ -196,12 +199,15 @@ void DeardorffDiffStress<BasicTurbulenceModel>::correct()
         alpha*rho*P
       + (4.0/5.0)*alpha*rho*k*D
       - ((2.0/3.0)*(1.0 - Cm_/this->Ce_)*I)*(alpha*rho*this->epsilon())
+      + fvOptions(alpha, rho, R)
     );
 
-    REqn().relax();
-    REqn().solve();
-
+    REqn.ref().relax();
+    fvOptions.constrain(REqn.ref());
+    REqn.ref().solve();
+    fvOptions.correct(R);
     this->boundNormalStress(R);
+
     correctNut();
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.H b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.H
index 08b3eadb824da52fb4efa236f6952bc7eb826f78..fd6b47ca50b64a737b17ff135a59a6ac18d19323 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,13 +82,13 @@ namespace LESModels
 template<class BasicTurbulenceModel>
 class DeardorffDiffStress
 :
-    public ReynoldsStress<LESModel<BasicTurbulenceModel> >
+    public ReynoldsStress<LESModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         DeardorffDiffStress(const DeardorffDiffStress&);
-        DeardorffDiffStress& operator=(const DeardorffDiffStress&);
+        void operator=(const DeardorffDiffStress&);
 
 
 protected:
@@ -162,7 +162,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DeardorffDiffStress.C"
+    #include "DeardorffDiffStress.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C
index ea11e334a3fa56ea81b86ff305a8f02f486aeaeb..01bfa35a8b26173f8fc701bbf13b720f4e09a12f 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<class BasicTurbulenceModel>
-Foam::autoPtr<Foam::LESModel<BasicTurbulenceModel> >
+Foam::autoPtr<Foam::LESModel<BasicTurbulenceModel>>
 Foam::LESModel<BasicTurbulenceModel>::New
 (
     const alphaField& alpha,
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H
index 5ecfeecee30c1b08fe8a19254ed6e30ead20449a..14ae4458bce29f0d91d3fe081015e587e386bd51 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -233,7 +233,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LESModel.C"
+    #include "LESModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C
index b526437583c004b4156a115c3d61e530db35b886..af876f5c1587f30728017f53ec0ccc9086eb4688 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,7 @@ void Foam::LESModels::IDDESDelta::calcDelta()
         )
     );
 
-    scalarField& faceToFacenMax = tfaceToFacenMax().internalField();
+    scalarField& faceToFacenMax = tfaceToFacenMax.ref().internalField();
 
     const cellList& cells = mesh.cells();
     const vectorField& faceCentres = mesh.faceCentres();
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C
index dab417e7bd53eebde6af448c6c6e5f0301cd71cf..d43f4c2578e0530099612889542782e05e1df01d 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -46,24 +46,8 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
 
     label nD = mesh.nGeometricD();
 
-    tmp<volScalarField> hmax
-    (
-        new volScalarField
-        (
-            IOobject
-            (
-                "hmax",
-                mesh.time().timeName(),
-                mesh,
-                IOobject::NO_READ,
-                IOobject::NO_WRITE
-            ),
-            mesh,
-            dimensionedScalar("zrero", dimLength, 0.0)
-        )
-    );
-
     const cellList& cells = mesh.cells();
+    scalarField hmax(cells.size());
 
     forAll(cells,cellI)
     {
@@ -81,12 +65,13 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
                 deltaMaxTmp = tmp;
             }
         }
-        hmax()[cellI] = deltaCoeff_*deltaMaxTmp;
+
+        hmax[cellI] = deltaCoeff_*deltaMaxTmp;
     }
 
     if (nD == 3)
     {
-        delta_.internalField() = hmax();
+        delta_.internalField() = hmax;
     }
     else if (nD == 2)
     {
@@ -94,7 +79,7 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
             << "Case is 2D, LES is not strictly applicable\n"
             << endl;
 
-        delta_.internalField() = hmax();
+        delta_.internalField() = hmax;
     }
     else
     {
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C
index 2a58c71e3588f4473d817b5aa724a84df9bb0dbb..0aa485a0ec1905055d3548bd3a2f44c1b647c733 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "LESeddyViscosity.H"
+#include "zeroGradientFvPatchField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -47,7 +48,7 @@ LESeddyViscosity<BasicTurbulenceModel>::LESeddyViscosity
     const word& propertiesName
 )
 :
-    eddyViscosity<LESModel<BasicTurbulenceModel> >
+    eddyViscosity<LESModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -76,7 +77,7 @@ LESeddyViscosity<BasicTurbulenceModel>::LESeddyViscosity
 template<class BasicTurbulenceModel>
 bool LESeddyViscosity<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<LESModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<LESModel<BasicTurbulenceModel>>::read())
     {
         Ce_.readIfPresent(this->coeffDict());
 
@@ -94,7 +95,7 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
 {
     tmp<volScalarField> tk(this->k());
 
-    return tmp<volScalarField>
+    tmp<volScalarField> tepsilon
     (
         new volScalarField
         (
@@ -106,9 +107,14 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            Ce_*tk()*sqrt(tk())/this->delta()
+            Ce_*tk()*sqrt(tk())/this->delta(),
+            zeroGradientFvPatchField<scalar>::typeName
         )
     );
+    volScalarField& epsilon = tepsilon.ref();
+    epsilon.correctBoundaryConditions();
+
+    return tepsilon;
 }
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.H b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.H
index a8d82752f5f488492371ea1d1dedd2780ca5812c..38b7d37603c47a779043465e386b06f6d3235de3 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,13 +55,13 @@ namespace LESModels
 template<class BasicTurbulenceModel>
 class LESeddyViscosity
 :
-    public eddyViscosity<LESModel<BasicTurbulenceModel> >
+    public eddyViscosity<LESModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         LESeddyViscosity(const LESeddyViscosity&);
-        LESeddyViscosity& operator=(const LESeddyViscosity&);
+        void operator=(const LESeddyViscosity&);
 
 
 protected:
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LESeddyViscosity.C"
+    #include "LESeddyViscosity.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C
index 08ce6197c6543cd4a14c4fc32790b4475091290b..0d326caa8cf4bbaf5bb48ac7b5a5739bc1e1f800 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ Foam::anisotropicFilter::anisotropicFilter
             mesh
         ),
         mesh,
-        dimensionedVector("zero", dimLength*dimLength, vector::zero),
+        dimensionedVector("zero", dimLength*dimLength, Zero),
         calculatedFvPatchVectorField::typeName
     )
 {
@@ -94,7 +94,7 @@ Foam::anisotropicFilter::anisotropicFilter
             mesh
         ),
         mesh,
-        dimensionedVector("zero", dimLength*dimLength, vector::zero),
+        dimensionedVector("zero", dimLength*dimLength, Zero),
         calculatedFvPatchScalarField::typeName
     )
 {
@@ -190,7 +190,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::anisotropicFilter::operator()
 
     for (direction d=0; d<symmTensor::nComponents; d++)
     {
-        tmpFilteredField().replace
+        tmpFilteredField.ref().replace
         (
             d, anisotropicFilter::operator()(unFilteredField().component(d))
         );
@@ -224,7 +224,7 @@ Foam::tmp<Foam::volTensorField> Foam::anisotropicFilter::operator()
 
     for (direction d=0; d<tensor::nComponents; d++)
     {
-        tmpFilteredField().replace
+        tmpFilteredField.ref().replace
         (
             d, anisotropicFilter::operator()(unFilteredField().component(d))
         );
diff --git a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C
index 9827f76063cafcba37bd8482cfc7aaed85fe4782..8f11a96b9e12137b7f6fe2ac742f6201eadbc921 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "Smagorinsky.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -69,6 +70,7 @@ void Smagorinsky<BasicTurbulenceModel>::correctNut()
 
     this->nut_ = Ck_*this->delta()*sqrt(k);
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
diff --git a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H
index 7b472d39f523d39cd74dca8346ebd5f0a7bb7563..b1eb383b0ca6c65c5f62197a9d3f9a8be03f6d19 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ class Smagorinsky
 
         // Disallow default bitwise copy construct and assignment
         Smagorinsky(const Smagorinsky&);
-        Smagorinsky& operator=(const Smagorinsky&);
+        void operator=(const Smagorinsky&);
 
 
 protected:
@@ -174,7 +174,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Smagorinsky.C"
+    #include "Smagorinsky.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C
index 49a353ba1da68a04c55825cd20a3772a68585dee..e70ff8fabf4db48f9c0f78481b2e4c3824d630c6 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "WALE.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -89,6 +90,7 @@ void WALE<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Ck_*this->delta()*sqrt(this->k(fvc::grad(this->U_)));
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
diff --git a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.H b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.H
index 9ac9c00f84e59833c236b20d2f92d003b3db5606..0c2732b3a3ed17ee273b155f35e7a988e1c89f31 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ class WALE
 
         // Disallow default bitwise copy construct and assignment
         WALE(const WALE&);
-        WALE& operator=(const WALE&);
+        void operator=(const WALE&);
 
 
 protected:
@@ -166,7 +166,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WALE.C"
+    #include "WALE.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C
index 19f557bc3650b1cdba03cede13b8c5cebe8afd3c..f4be29d738effa28d84f238f58663cc7add10ef9 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "dynamicKEqn.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -113,6 +114,9 @@ void dynamicKEqn<BasicTurbulenceModel>::correctNut
 {
     this->nut_ = Ck(D, KK)*sqrt(k_)*this->delta();
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
@@ -249,6 +253,7 @@ void dynamicKEqn<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
     LESeddyViscosity<BasicTurbulenceModel>::correct();
 
@@ -272,10 +277,13 @@ void dynamicKEqn<BasicTurbulenceModel>::correct()
       - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
       - fvm::Sp(Ce(D, KK)*alpha*rho*sqrt(k_)/this->delta(), k_)
       + kSource()
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
-    kEqn().solve();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
+    solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut(D, KK);
diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.H b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.H
index d9e9ef47cb2563426a0f95186e7a7b61fb038f14..01a78ea5903baad4327d22d9bcc10c7d93e30cff 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ class dynamicKEqn
 
         // Disallow default bitwise copy construct and assignment
         dynamicKEqn(const dynamicKEqn&);
-        dynamicKEqn& operator=(const dynamicKEqn&);
+        void operator=(const dynamicKEqn&);
 
 
 protected:
@@ -199,7 +199,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dynamicKEqn.C"
+    #include "dynamicKEqn.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C
index ccf2872d6d5e8f91e3a0d36e2cefe2a6f4f502d7..8e9cc672800730b210db7fefa47be6a8e21d7622 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "dynamicLagrangian.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -42,6 +43,9 @@ void dynamicLagrangian<BasicTurbulenceModel>::correctNut
 {
     this->nut_ = (flm_/fmm_)*sqr(this->delta())*mag(dev(symm(gradU)));
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
@@ -159,6 +163,7 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
     const rhoField& rho = this->rho_;
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
     LESeddyViscosity<BasicTurbulenceModel>::correct();
 
@@ -190,13 +195,15 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
         fvm::ddt(alpha, rho, flm_)
       + fvm::div(alphaRhoPhi, flm_)
      ==
-        rho*invT*LM
-      - fvm::Sp(rho*invT, flm_)
+        alpha*rho*invT*LM
+      - fvm::Sp(alpha*rho*invT, flm_)
+      + fvOptions(alpha, rho, flm_)
     );
 
     flmEqn.relax();
+    fvOptions.constrain(flmEqn);
     flmEqn.solve();
-
+    fvOptions.correct(flm_);
     bound(flm_, flm0_);
 
     volScalarField MM(M && M);
@@ -206,13 +213,15 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
         fvm::ddt(alpha, rho, fmm_)
       + fvm::div(alphaRhoPhi, fmm_)
      ==
-        rho*invT*MM
-      - fvm::Sp(rho*invT, fmm_)
+        alpha*rho*invT*MM
+      - fvm::Sp(alpha*rho*invT, fmm_)
+      + fvOptions(alpha, rho, fmm_)
     );
 
     fmmEqn.relax();
+    fvOptions.constrain(fmmEqn);
     fmmEqn.solve();
-
+    fvOptions.correct(fmm_);
     bound(fmm_, fmm0_);
 
     correctNut(gradU);
diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.H b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.H
index d95e7730a025f5559788b4f15ba886903027f9a6..5b4580e8692287eebbbf8d9a4f94aca07b681635 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,7 +68,7 @@ class dynamicLagrangian
 
         // Disallow default bitwise copy construct and assignment
         dynamicLagrangian(const dynamicLagrangian&);
-        dynamicLagrangian& operator=(const dynamicLagrangian&);
+        void operator=(const dynamicLagrangian&);
 
 
 protected:
@@ -169,7 +169,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "dynamicLagrangian.C"
+    #include "dynamicLagrangian.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C
index ef2b2b85359f3af143c96d62cd2d278d9ec392c4..5f617bf84ee5e18e8042a8cf84c80d489a7e7aaf 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "kEqn.H"
+#include "fvOptions.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -39,6 +40,7 @@ void kEqn<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Ck_*sqrt(k_)*this->delta();
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -171,6 +173,7 @@ void kEqn<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
     LESeddyViscosity<BasicTurbulenceModel>::correct();
 
@@ -190,10 +193,13 @@ void kEqn<BasicTurbulenceModel>::correct()
       - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
       - fvm::Sp(this->Ce_*alpha*rho*sqrt(k_)/this->delta(), k_)
       + kSource()
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut();
diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H
index 6220fc790f6180dbfc5c219fe4ad61cc89e21bf0..a91d3e68e2666403139452116abec6179d26599e 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,7 +80,7 @@ class kEqn
 
         // Disallow default bitwise copy construct and assignment
         kEqn(const kEqn&);
-        kEqn& operator=(const kEqn&);
+        void operator=(const kEqn&);
 
 
 protected:
@@ -171,7 +171,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "kEqn.C"
+    #include "kEqn.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
index 2b8be527627a18ac325c7a8680d31cf826f08034..c15fabab3df6201a0d8927fe7415941c8e1d9b8e 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "LRR.H"
+#include "fvOptions.H"
 #include "wallFvPatch.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -40,6 +41,7 @@ void LRR<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = this->Cmu_*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -60,7 +62,7 @@ LRR<BasicTurbulenceModel>::LRR
     const word& type
 )
 :
-    ReynoldsStress<RASModel<BasicTurbulenceModel> >
+    ReynoldsStress<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -214,7 +216,7 @@ LRR<BasicTurbulenceModel>::LRR
 template<class BasicTurbulenceModel>
 bool LRR<BasicTurbulenceModel>::read()
 {
-    if (ReynoldsStress<RASModel<BasicTurbulenceModel> >::read())
+    if (ReynoldsStress<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         C1_.readIfPresent(this->coeffDict());
@@ -280,8 +282,9 @@ void LRR<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volSymmTensorField& R = this->R_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    ReynoldsStress<RASModel<BasicTurbulenceModel> >::correct();
+    ReynoldsStress<RASModel<BasicTurbulenceModel>>::correct();
 
     tmp<volTensorField> tgradU(fvc::grad(U));
     const volTensorField& gradU = tgradU();
@@ -301,13 +304,14 @@ void LRR<BasicTurbulenceModel>::correct()
      ==
         Ceps1_*alpha*rho*G*epsilon_/k_
       - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
+      + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
-
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
-
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
 
 
@@ -344,6 +348,7 @@ void LRR<BasicTurbulenceModel>::correct()
         alpha*rho*P
       - (2.0/3.0*(1 - C1_)*I)*alpha*rho*epsilon_
       - C2_*alpha*rho*dev(P)
+      + fvOptions(alpha, rho, R)
     );
 
     // Optionally add wall-refection term
@@ -357,13 +362,15 @@ void LRR<BasicTurbulenceModel>::correct()
             Cref1_*R - ((Cref2_*C2_)*(k_/epsilon_))*dev(P)
         );
 
-        REqn() +=
+        REqn.ref() +=
             ((3*pow(Cmu_, 0.75)/kappa_)*(alpha*rho*sqrt(k_)/y_))
            *dev(symm((n_ & reflect)*n_));
     }
 
-    REqn().relax();
+    REqn.ref().relax();
+    fvOptions.constrain(REqn.ref());
     solve(REqn);
+    fvOptions.correct(R);
 
     this->boundNormalStress(R);
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H
index 68c9bd2d7d93615ebccfebe84454112c6e3b1e1b..08ac25e6f0858e9f767ec0c3bfcba312d6e6fe6e 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,13 +100,13 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class LRR
 :
-    public ReynoldsStress<RASModel<BasicTurbulenceModel> >
+    public ReynoldsStress<RASModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         LRR(const LRR&);
-        LRR& operator=(const LRR&);
+        void operator=(const LRR&);
 
 
 protected:
@@ -215,7 +215,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LRR.C"
+    #include "LRR.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C
index d3fca3307b66954895d545de38f884cad5d8055c..ce79ca5011e356e8121836aa098f8fd6987b51e5 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "LaunderSharmaKE.H"
+#include "fvOptions.H"
 #include "bound.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -56,6 +57,7 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Cmu_*fMu()*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -106,7 +108,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -214,7 +216,7 @@ LaunderSharmaKE<BasicTurbulenceModel>::LaunderSharmaKE
 template<class BasicTurbulenceModel>
 bool LaunderSharmaKE<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         C1_.readIfPresent(this->coeffDict());
@@ -246,8 +248,9 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
 
@@ -274,10 +277,14 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correct()
       - fvm::Sp(C2_*f2()*alpha*rho*epsilon_/k_, epsilon_)
       + alpha*rho*E
       + epsilonSource()
+      + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
 
 
@@ -291,10 +298,13 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correct()
         alpha*rho*G - fvm::SuSp(2.0/3.0*alpha*rho*divU, k_)
       - fvm::Sp(alpha*rho*(epsilon_ + D)/k_, k_)
       + kSource()
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut();
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H
index df2bbc0f5d974db9b1a194641a9a069c232def04..f919a54435e60f945a648258040456a9e6e34c0d 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,13 +84,13 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class LaunderSharmaKE
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         LaunderSharmaKE(const LaunderSharmaKE&);
-        LaunderSharmaKE& operator=(const LaunderSharmaKE&);
+        void operator=(const LaunderSharmaKE&);
 
 
 protected:
@@ -211,7 +211,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LaunderSharmaKE.C"
+    #include "LaunderSharmaKE.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C
index e55e79f4d40877bd5400bb209e127cf58e5070b7..d95f2bffb3f3f0e0d9d101d89a029b537aef2809 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ Foam::RASModel<BasicTurbulenceModel>::RASModel
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<class BasicTurbulenceModel>
-Foam::autoPtr<Foam::RASModel<BasicTurbulenceModel> >
+Foam::autoPtr<Foam::RASModel<BasicTurbulenceModel>>
 Foam::RASModel<BasicTurbulenceModel>::New
 (
     const alphaField& alpha,
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H
index 7ecd22b2b28d6af969424b0a38e08ba59cacccea..cf862ef5e3983c4bf563b8d47ff58ab8e1b2f9bf 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -244,7 +244,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "RASModel.C"
+    #include "RASModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C
index 1eec3da8a91d5e6df98859714891200436ff577f..17e8f14f98399e5f9c852b986947ed767d7a601a 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "RNGkEpsilon.H"
+#include "fvOptions.H"
 #include "bound.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -40,6 +41,7 @@ void RNGkEpsilon<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Cmu_*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -90,7 +92,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -215,7 +217,7 @@ RNGkEpsilon<BasicTurbulenceModel>::RNGkEpsilon
 template<class BasicTurbulenceModel>
 bool RNGkEpsilon<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         C1_.readIfPresent(this->coeffDict());
@@ -249,8 +251,9 @@ void RNGkEpsilon<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
 
@@ -282,13 +285,14 @@ void RNGkEpsilon<BasicTurbulenceModel>::correct()
       - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*alpha*rho*divU, epsilon_)
       - fvm::Sp(C2_*alpha*rho*epsilon_/k_, epsilon_)
       + epsilonSource()
+      + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
-
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
-
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
 
 
@@ -304,10 +308,13 @@ void RNGkEpsilon<BasicTurbulenceModel>::correct()
       - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
       - fvm::Sp(alpha*rho*epsilon_/k_, k_)
       + kSource()
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut();
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.H
index 23d60ac788242c923486c9c29e4a5ea74434fb18..374a74bfc771a61908ab98b451668d326b3fdd08 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,13 +85,13 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class RNGkEpsilon
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         RNGkEpsilon(const RNGkEpsilon&);
-        RNGkEpsilon& operator=(const RNGkEpsilon&);
+        void operator=(const RNGkEpsilon&);
 
 
 protected:
@@ -211,7 +211,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "RNGkEpsilon.C"
+    #include "RNGkEpsilon.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
index 9f9cc534640177ef2c0d1bee83567271ad4bc0af..7117f166234b0a53985b08d5eaa0cea8e130131d 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "SSG.H"
+#include "fvOptions.H"
 #include "wallFvPatch.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -40,6 +41,7 @@ void SSG<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = this->Cmu_*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -60,7 +62,7 @@ SSG<BasicTurbulenceModel>::SSG
     const word& type
 )
 :
-    ReynoldsStress<RASModel<BasicTurbulenceModel> >
+    ReynoldsStress<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -223,7 +225,7 @@ SSG<BasicTurbulenceModel>::SSG
 template<class BasicTurbulenceModel>
 bool SSG<BasicTurbulenceModel>::read()
 {
-    if (ReynoldsStress<RASModel<BasicTurbulenceModel> >::read())
+    if (ReynoldsStress<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         C1_.readIfPresent(this->coeffDict());
@@ -290,8 +292,9 @@ void SSG<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volSymmTensorField& R = this->R_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    ReynoldsStress<RASModel<BasicTurbulenceModel> >::correct();
+    ReynoldsStress<RASModel<BasicTurbulenceModel>>::correct();
 
     tmp<volTensorField> tgradU(fvc::grad(U));
     const volTensorField& gradU = tgradU();
@@ -311,13 +314,14 @@ void SSG<BasicTurbulenceModel>::correct()
      ==
         Ceps1_*alpha*rho*G*epsilon_/k_
       - fvm::Sp(Ceps2_*alpha*rho*epsilon_/k_, epsilon_)
+      + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
-
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
-
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
 
 
@@ -364,10 +368,13 @@ void SSG<BasicTurbulenceModel>::correct()
           + C4_*dev(twoSymm(b&S))
           + C5_*twoSymm(b&Omega)
         )
+      + fvOptions(alpha, rho, R)
     );
 
-    REqn().relax();
+    REqn.ref().relax();
+    fvOptions.constrain(REqn.ref());
     solve(REqn);
+    fvOptions.correct(R);
 
     this->boundNormalStress(R);
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.H b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.H
index a0977fba606ffaf583ca4c62a8757ec0ac4267c7..ba72854074a368e15b49b58682c4153b28f76774 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,13 +95,13 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class SSG
 :
-    public ReynoldsStress<RASModel<BasicTurbulenceModel> >
+    public ReynoldsStress<RASModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         SSG(const SSG&);
-        SSG& operator=(const SSG&);
+        void operator=(const SSG&);
 
 
 protected:
@@ -206,7 +206,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SSG.C"
+    #include "SSG.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C
index a029db7ad39da7cea715558a54d5e3a4ba92ccb4..01d990f148848f89fd80f06cad4723026f5f7297 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "SpalartAllmaras.H"
+#include "fvOptions.H"
 #include "bound.H"
 #include "wallDist.H"
 
@@ -124,6 +125,7 @@ void SpalartAllmaras<BasicTurbulenceModel>::correctNut
 {
     this->nut_ = nuTilda_*fv1;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -151,7 +153,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -265,7 +267,7 @@ SpalartAllmaras<BasicTurbulenceModel>::SpalartAllmaras
 template<class BasicTurbulenceModel>
 bool SpalartAllmaras<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         sigmaNut_.readIfPresent(this->coeffDict());
         kappa_.readIfPresent(this->coeffDict());
@@ -300,6 +302,11 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::DnuTildaEff() const
 template<class BasicTurbulenceModel>
 tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const
 {
+    WarningInFunction
+        << "Turbulence kinetic energy not defined for "
+        << "Spalart-Allmaras model. Returning zero field"
+        << endl;
+
     return tmp<volScalarField>
     (
         new volScalarField
@@ -311,7 +318,8 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const
                 this->mesh_
             ),
             this->mesh_,
-            dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
+            dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0),
+            zeroGradientFvPatchField<vector>::typeName
         )
     );
 }
@@ -336,7 +344,8 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const
                 this->mesh_
             ),
             this->mesh_,
-            dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
+            dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0),
+            zeroGradientFvPatchField<vector>::typeName
         )
     );
 }
@@ -354,8 +363,9 @@ void SpalartAllmaras<BasicTurbulenceModel>::correct()
     const alphaField& alpha = this->alpha_;
     const rhoField& rho = this->rho_;
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     const volScalarField chi(this->chi());
     const volScalarField fv1(this->fv1(chi));
@@ -371,10 +381,13 @@ void SpalartAllmaras<BasicTurbulenceModel>::correct()
      ==
         Cb1_*alpha*rho*Stilda*nuTilda_
       - fvm::Sp(Cw1_*alpha*rho*fw(Stilda)*nuTilda_/sqr(y_), nuTilda_)
+      + fvOptions(alpha, rho, nuTilda_)
     );
 
-    nuTildaEqn().relax();
+    nuTildaEqn.ref().relax();
+    fvOptions.constrain(nuTildaEqn.ref());
     solve(nuTildaEqn);
+    fvOptions.correct(nuTilda_);
     bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0));
     nuTilda_.correctBoundaryConditions();
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H
index c84373b9e2c8565f1ef130152aebc39fdb2fbacf..47694e4ab1b4fb38c1b0650445b9a104e10c71e1 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,13 +88,13 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class SpalartAllmaras
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         SpalartAllmaras(const SpalartAllmaras&);
-        SpalartAllmaras& operator=(const SpalartAllmaras&);
+        void operator=(const SpalartAllmaras&);
 
 
 protected:
@@ -208,7 +208,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SpalartAllmaras.C"
+    #include "SpalartAllmaras.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/RASBoundaryConditionsDoc.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/RASBoundaryConditionsDoc.H
index c2e558f948c7a6fb7038b42670787c2270e168a6..aeea3263fb1443c7d9e42173fa58ecfe9413c1a8 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/RASBoundaryConditionsDoc.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/RASBoundaryConditionsDoc.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,4 +29,5 @@ License
     This group contains RAS turbulence model boundary conditions
 @}
 
+
 \*---------------------------------------------------------------------------*/
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
index 2679132d78ea7cf9f835758908a53d1129840765..1f95e729cd8c4cc721051e86adea38bfb975a14a 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,8 +34,8 @@ namespace Foam
 
 atmBoundaryLayer::atmBoundaryLayer()
 :
-    flowDir_(pTraits<vector>::zero),
-    zDir_(pTraits<vector>::zero),
+    flowDir_(Zero),
+    zDir_(Zero),
     kappa_(0.41),
     Cmu_(0.09),
     Uref_(0),
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C
index 6a9266e8b023e066efca27ba1e33c672907c245c..8733871d7a3c77d0116c6bfeade3363abf3e6ef9 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,9 +41,7 @@ void kEpsilon<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = Cmu_*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
-
-    fv::options& fvOptions(fv::options::New(this->mesh_));
-    fvOptions.correct(this->nut_);
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -94,7 +92,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -201,7 +199,7 @@ kEpsilon<BasicTurbulenceModel>::kEpsilon
 template<class BasicTurbulenceModel>
 bool kEpsilon<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         C1_.readIfPresent(this->coeffDict());
@@ -235,7 +233,7 @@ void kEpsilon<BasicTurbulenceModel>::correct()
     volScalarField& nut = this->nut_;
     fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
 
@@ -260,9 +258,9 @@ void kEpsilon<BasicTurbulenceModel>::correct()
       + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
-    fvOptions.constrain(epsEqn());
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
@@ -281,8 +279,8 @@ void kEpsilon<BasicTurbulenceModel>::correct()
       + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
-    fvOptions.constrain(kEqn());
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
     fvOptions.correct(k_);
     bound(k_, this->kMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H
index ace0d15ce429f500edf1e777a79493a326817270..a4126d2efc26284ed74fd4660069ce8471846216 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,13 +86,13 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class kEpsilon
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
     // Private Member Functions
 
         // Disallow default bitwise copy construct and assignment
         kEpsilon(const kEpsilon&);
-        kEpsilon& operator=(const kEpsilon&);
+        void operator=(const kEpsilon&);
 
 
 protected:
@@ -209,7 +209,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "kEpsilon.C"
+    #include "kEpsilon.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C
index 5f5e76c03f9109674ce846c69eb857f9d12dcb44..9084c5720854c907cadd5f4300f429235a7e90b6 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "kOmega.H"
+#include "fvOptions.H"
 #include "bound.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -33,7 +34,6 @@ namespace Foam
 namespace RASModels
 {
 
-
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
 template<class BasicTurbulenceModel>
@@ -41,6 +41,9 @@ void kOmega<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = k_/omega_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
+
+    BasicTurbulenceModel::correctNut();
 }
 
 
@@ -59,7 +62,7 @@ kOmega<BasicTurbulenceModel>::kOmega
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -157,7 +160,7 @@ kOmega<BasicTurbulenceModel>::kOmega
 template<class BasicTurbulenceModel>
 bool kOmega<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         beta_.readIfPresent(this->coeffDict());
@@ -188,8 +191,9 @@ void kOmega<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
 
@@ -214,13 +218,14 @@ void kOmega<BasicTurbulenceModel>::correct()
         gamma_*alpha*rho*G*omega_/k_
       - fvm::SuSp(((2.0/3.0)*gamma_)*alpha*rho*divU, omega_)
       - fvm::Sp(beta_*alpha*rho*omega_, omega_)
+      + fvOptions(alpha, rho, omega_)
     );
 
-    omegaEqn().relax();
-
-    omegaEqn().boundaryManipulate(omega_.boundaryField());
-
+    omegaEqn.ref().relax();
+    fvOptions.constrain(omegaEqn.ref());
+    omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
     solve(omegaEqn);
+    fvOptions.correct(omega_);
     bound(omega_, this->omegaMin_);
 
 
@@ -234,10 +239,13 @@ void kOmega<BasicTurbulenceModel>::correct()
         alpha*rho*G
       - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
       - fvm::Sp(Cmu_*alpha*rho*omega_, k_)
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut();
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.H b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.H
index 5c297a02d4fc4dfba07e72d434feea680bc5f4b1..add5195f2ef8064bdecd283f5c877a8086f8f83f 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class kOmega
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
 
 protected:
@@ -208,7 +208,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 #ifdef NoRepository
-#   include "kOmega.C"
+    #include "kOmega.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C
index 878e0f55a7a387fdfe4851dd15e0287bccf717be..0db50da62e72c541483dc204c5ec69084e8056f8 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ template<class BasicTurbulenceModel>
 void kOmegaSST<BasicTurbulenceModel>::correctNut(const volScalarField& S2)
 {
     // Correct the turbulence viscosity
-    kOmegaSSTBase<eddyViscosity<RASModel<BasicTurbulenceModel> > >::correctNut
+    kOmegaSSTBase<eddyViscosity<RASModel<BasicTurbulenceModel>>>::correctNut
     (
         S2
     );
@@ -70,7 +70,7 @@ kOmegaSST<BasicTurbulenceModel>::kOmegaSST
     const word& type
 )
 :
-    kOmegaSSTBase<eddyViscosity<RASModel<BasicTurbulenceModel> > >
+    kOmegaSSTBase<eddyViscosity<RASModel<BasicTurbulenceModel>>>
     (
         type,
         alpha,
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H
index 17327ad9ddeabe4c2cf491f83ea3da1fd39b91f5..162071442f2cdb064e1e6b23933be244b6cbb52b 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,8 +126,14 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class kOmegaSST
 :
-    public kOmegaSSTBase<eddyViscosity<RASModel<BasicTurbulenceModel> > >
+    public kOmegaSSTBase<eddyViscosity<RASModel<BasicTurbulenceModel>>>
 {
+    // Private Member Functions
+
+        // Disallow default bitwise copy construct and assignment
+        kOmegaSST(const kOmegaSST&);
+        void operator=(const kOmegaSST&);
+
 
 protected:
 
@@ -177,7 +183,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 #ifdef NoRepository
-#   include "kOmegaSST.C"
+    #include "kOmegaSST.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.C
index 19943c0c1bb48e2c3fefd878df4aadcb405504c1..ac38d9b8e0f01d3ca8af116eb15f4eb2226551a0 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd. 
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -101,7 +101,7 @@ tmp<volScalarField> kOmegaSSTBase<BasicEddyViscosityModel>::F23() const
 
     if (F3_)
     {
-        f23() *= F3();
+        f23.ref() *= F3();
     }
 
     return f23;
@@ -117,6 +117,7 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correctNut
     // Correct the turbulence viscosity
     this->nut_ = a1_*k_/max(a1_*omega_, b1_*F23()*sqrt(S2));
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 }
 
 
@@ -395,6 +396,7 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
     BasicEddyViscosityModel::correct();
 
@@ -442,13 +444,14 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
             )
           + Qsas(S2, gamma, beta)
           + omegaSource()
+          + fvOptions(alpha, rho, omega_)
         );
 
-        omegaEqn().relax();
-
-        omegaEqn().boundaryManipulate(omega_.boundaryField());
-
+        omegaEqn.ref().relax();
+        fvOptions.constrain(omegaEqn.ref());
+        omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
         solve(omegaEqn);
+        fvOptions.correct(omega_);
         bound(omega_, this->omegaMin_);
     }
 
@@ -463,10 +466,13 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
       - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
       - fvm::Sp(alpha*rho*betaStar_*omega_, k_)
       + kSource()
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut(S2);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.H b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.H
index 45588790ed0ad8306c89bb4af0c2c5c78e8a1a76..52c918c1c766003bdfc10a4d950edeae60110af8 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ class kOmegaSSTSAS
 
         // Disallow default bitwise copy construct and assignment
         kOmegaSSTSAS(const kOmegaSSTSAS&);
-        kOmegaSSTSAS& operator=(const kOmegaSSTSAS&);
+        void operator=(const kOmegaSSTSAS&);
 
 
 protected:
@@ -190,7 +190,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "kOmegaSSTSAS.C"
+    #include "kOmegaSSTSAS.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C
index 83d156be08f6c1e3ff356287f32547fe222f44fe..b2cd94b1f26679defae71590bd7dcf1383fa4edf 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "realizableKE.H"
+#include "fvOptions.H"
 #include "bound.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -78,6 +79,7 @@ void realizableKE<BasicTurbulenceModel>::correctNut
 {
     this->nut_ = rCmu(gradU, S2, magS)*sqr(k_)/epsilon_;
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -138,7 +140,7 @@ realizableKE<BasicTurbulenceModel>::realizableKE
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -236,7 +238,7 @@ realizableKE<BasicTurbulenceModel>::realizableKE
 template<class BasicTurbulenceModel>
 bool realizableKE<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         A0_.readIfPresent(this->coeffDict());
@@ -267,8 +269,9 @@ void realizableKE<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
 
@@ -309,13 +312,14 @@ void realizableKE<BasicTurbulenceModel>::correct()
             epsilon_
         )
       + epsilonSource()
+      + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
-
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
-
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
 
 
@@ -331,10 +335,13 @@ void realizableKE<BasicTurbulenceModel>::correct()
       - fvm::SuSp(2.0/3.0*alpha*rho*divU, k_)
       - fvm::Sp(alpha*rho*epsilon_/k_, k_)
       + kSource()
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
     correctNut(tgradU(), S2, magS);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.H b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.H
index b68f257ec54e31f3deb7de7117a994076d18dd02..f47616f4f355a6d727fa924182907114f974c0ac 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class realizableKE
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>
 {
 
 protected:
@@ -211,7 +211,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "realizableKE.C"
+    #include "realizableKE.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C
index 6226b6851daa76ed83fb19ccf5605c23e43bb813..51cadb65a1d0f8e284d3fcc4d830f511f8f89985 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "v2f.H"
+#include "fvOptions.H"
 #include "bound.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -87,6 +88,7 @@ void v2f<BasicTurbulenceModel>::correctNut()
 {
     this->nut_ = min(CmuKEps_*sqr(k_)/epsilon_, this->Cmu_*v2_*Ts());
     this->nut_.correctBoundaryConditions();
+    fv::options::New(this->mesh_).correct(this->nut_);
 
     BasicTurbulenceModel::correctNut();
 }
@@ -107,7 +109,7 @@ v2f<BasicTurbulenceModel>::v2f
     const word& type
 )
 :
-    eddyViscosity<RASModel<BasicTurbulenceModel> >
+    eddyViscosity<RASModel<BasicTurbulenceModel>>
     (
         type,
         alpha,
@@ -279,7 +281,7 @@ v2f<BasicTurbulenceModel>::v2f
 template<class BasicTurbulenceModel>
 bool v2f<BasicTurbulenceModel>::read()
 {
-    if (eddyViscosity<RASModel<BasicTurbulenceModel> >::read())
+    if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
     {
         Cmu_.readIfPresent(this->coeffDict());
         CmuKEps_.readIfPresent(this->coeffDict());
@@ -315,8 +317,9 @@ void v2f<BasicTurbulenceModel>::correct()
     const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
     const volVectorField& U = this->U_;
     volScalarField& nut = this->nut_;
+    fv::options& fvOptions(fv::options::New(this->mesh_));
 
-    eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
+    eddyViscosity<RASModel<BasicTurbulenceModel>>::correct();
 
     volScalarField divU(fvc::div(fvc::absolute(this->phi(), U)));
 
@@ -354,13 +357,14 @@ void v2f<BasicTurbulenceModel>::correct()
         Ceps1*alpha*rho*G/Ts
       - fvm::SuSp(((2.0/3.0)*Ceps1 + Ceps3_)*alpha*rho*divU, epsilon_)
       - fvm::Sp(Ceps2_*alpha*rho/Ts, epsilon_)
+      + fvOptions(alpha, rho, epsilon_)
     );
 
-    epsEqn().relax();
-
-    epsEqn().boundaryManipulate(epsilon_.boundaryField());
-
+    epsEqn.ref().relax();
+    fvOptions.constrain(epsEqn.ref());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
     solve(epsEqn);
+    fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
 
 
@@ -374,10 +378,13 @@ void v2f<BasicTurbulenceModel>::correct()
         alpha*rho*G
       - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
       - fvm::Sp(alpha*rho*epsilon_/k_, k_)
+      + fvOptions(alpha, rho, k_)
     );
 
-    kEqn().relax();
+    kEqn.ref().relax();
+    fvOptions.constrain(kEqn.ref());
     solve(kEqn);
+    fvOptions.correct(k_);
     bound(k_, this->kMin_);
 
 
@@ -390,8 +397,10 @@ void v2f<BasicTurbulenceModel>::correct()
       - 1.0/L2/k_*(v2fAlpha - C2_*G)
     );
 
-    fEqn().relax();
+    fEqn.ref().relax();
+    fvOptions.constrain(fEqn.ref());
     solve(fEqn);
+    fvOptions.correct(f_);
     bound(f_, fMin_);
 
 
@@ -404,10 +413,13 @@ void v2f<BasicTurbulenceModel>::correct()
       ==
         alpha*rho*min(k_*f_, C2_*G - v2fAlpha)
       - fvm::Sp(N*alpha*rho*epsilon_/k_, v2_)
+      + fvOptions(alpha, rho, v2_)
     );
 
-    v2Eqn().relax();
+    v2Eqn.ref().relax();
+    fvOptions.constrain(v2Eqn.ref());
     solve(v2Eqn);
+    fvOptions.correct(v2_);
     bound(v2_, v2Min_);
 
     correctNut();
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.H b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.H
index a76c4ee689a7d49168c04b9ea4fd0cb70e040e5c..b12b0dd00e4c872293fb8b0b8d8463e722ab5794 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.H
+++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,7 +120,7 @@ namespace RASModels
 template<class BasicTurbulenceModel>
 class v2f
 :
-    public eddyViscosity<RASModel<BasicTurbulenceModel> >,
+    public eddyViscosity<RASModel<BasicTurbulenceModel>>,
     public v2fBase
 {
 
@@ -274,7 +274,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "v2f.C"
+    #include "v2f.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C
index 55001003da8088632c50f29b9fa100c167a17938..e32c7369fb44de64061b6d9b2cea6c6f9f43468c 100644
--- a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C
+++ b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -198,7 +198,7 @@ Foam::tmp<Foam::volScalarField>
 Foam::ReynoldsStress<BasicTurbulenceModel>::k() const
 {
     tmp<Foam::volScalarField> tk(0.5*tr(R_));
-    tk().rename("k");
+    tk.ref().rename("k");
     return tk;
 }
 
@@ -238,43 +238,43 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::divDevRhoReff
     {
         return
         (
-            fvc::div
+            fvc::laplacian
+            (
+                (1.0 - couplingFactor_)*this->alpha_*this->rho_*this->nut(),
+                U,
+                "laplacian(nuEff,U)"
+            )
+          + fvc::div
             (
                 this->alpha_*this->rho_*R_
               + couplingFactor_
                *this->alpha_*this->rho_*this->nut()*fvc::grad(U),
                 "div(devRhoReff)"
             )
-          + fvc::laplacian
-            (
-                (1.0 - couplingFactor_)*this->alpha_*this->rho_*this->nut(),
-                U,
-                "laplacian(nuEff,U)"
-            )
-          - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
           - fvc::div(this->alpha_*this->rho_*this->nu()*dev2(T(fvc::grad(U))))
+          - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
         );
     }
     else
     {
         return
         (
-            fvc::div(this->alpha_*this->rho_*R_)
-          + fvc::laplacian
+            fvc::laplacian
             (
                 this->alpha_*this->rho_*this->nut(),
                 U,
                 "laplacian(nuEff,U)"
             )
-          - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
+          + fvc::div(this->alpha_*this->rho_*R_)
           - fvc::div(this->alpha_*this->rho_*this->nu()*dev2(T(fvc::grad(U))))
+          - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
         );
     }
 
     return
     (
-      - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
       - fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U))))
+      - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
     );
 }
 
@@ -289,8 +289,8 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::divDevRhoReff
 {
     return
     (
-      - fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
       - fvc::div((this->alpha_*rho*this->nuEff())*dev2(T(fvc::grad(U))))
+      - fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
     );
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H
index 0beb0f5885aa4435ad31b3362c3ce777eb95ea5c..e29c447459f1a87793414bc840ff043523968cd0 100644
--- a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H
+++ b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,7 +156,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReynoldsStress.C"
+    #include "ReynoldsStress.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.H b/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.H
index ecda6e62966894c5c6641d78eafec64d54fede4b..bff236d48643af65dc272fa3e779192bd0d7970a 100644
--- a/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.H
+++ b/src/TurbulenceModels/turbulenceModels/TurbulenceModel/TurbulenceModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -178,7 +178,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TurbulenceModel.C"
+    #include "TurbulenceModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
index 291d5d33dc0795710a85fb826a709c44309e539a..73728cc92db597913e9444d74780c364c553f7eb 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField
 )
 :
     fixedValueFvPatchVectorField(p, iF),
-    tau0_(vector::zero)
+    tau0_(Zero)
 {}
 
 
@@ -51,7 +51,7 @@ Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField
 )
 :
     fixedValueFvPatchVectorField(p, iF),
-    tau0_(dict.lookupOrDefault<vector>("tau", vector::zero))
+    tau0_(dict.lookupOrDefault<vector>("tau", Zero))
 {
     fvPatchField<vector>::operator=(patchInternalField());
 }
@@ -117,7 +117,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs()
 
     const scalarField& ry = patch().deltaCoeffs();
 
-    operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff())) + Uc)));
+    operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff)) + Uc)));
 
     fixedValueFvPatchVectorField::updateCoeffs();
 }
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
index 4940cacefb86f645c2f01e2bd6543d2da3523af5..511ac65abf7a0b1cf0a201d97120bc99a8596cc5 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.C
@@ -56,8 +56,8 @@ Foam::porousBafflePressureFvPatchField::porousBafflePressureFvPatchField
     fixedJumpFvPatchField<scalar>(p, iF),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
     rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
-    D_(DataEntry<scalar>::New("D", dict)),
-    I_(DataEntry<scalar>::New("I", dict)),
+    D_(Function1<scalar>::New("D", dict)),
+    I_(Function1<scalar>::New("I", dict)),
     length_(readScalar(dict.lookup("length"))),
     uniformJump_(dict.lookupOrDefault<bool>("uniformJump", false))
 {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H
index b88a76893627f6486f96d1139d1b29e4f0a9fe89..851fe6df756ac76dc9d7d6d488cd3eff6034082c 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/porousBafflePressure/porousBafflePressureFvPatchField.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -89,7 +89,7 @@ SourceFiles
 #define porousBafflePressureFvPatchField_H
 
 #include "fixedJumpFvPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -113,10 +113,10 @@ class porousBafflePressureFvPatchField
         const word rhoName_;
 
         //- Darcy pressure loss coefficient
-        autoPtr<DataEntry<scalar> > D_;
+        autoPtr<Function1<scalar>> D_;
 
         //- Inertia pressure lost coefficient
-        autoPtr<DataEntry<scalar> > I_;
+        autoPtr<Function1<scalar>> I_;
 
         //- Porous media length
         scalar length_;
@@ -165,9 +165,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new porousBafflePressureFvPatchField(*this)
             );
@@ -181,12 +181,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new porousBafflePressureFvPatchField(*this, iF)
             );
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C
index 87ff8cd80095d2a18054990b1eada2281dac210f..5d6f316e3f5a9513783c246ce7ca1e3e1865d0fb 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ void Foam::epsilonLowReWallFunctionFvPatchScalarField::calculate
     const scalarField magGradUw(mag(Uw.snGrad()));
 
     const DimensionedField<scalar, volMesh>& G =
-        db().lookupObject<DimensionedField<scalar, volMesh> >
+        db().lookupObject<DimensionedField<scalar, volMesh>>
         (
             turbModel.GName()
         );
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H
index 63dd1115005384aa13c36704f93f33557c624fc6..3ee2d514b36ad0781990b42670de57374c88d2c2 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ protected:
         label master_;
 
         //- List of averaging corner weights
-        List<List<scalar> > cornerWeights_;
+        List<List<scalar>> cornerWeights_;
 
 
     // Protected Member Functions
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C
index 6afabdcc6c9989d1e2a1d6c8961861038f6e5b74..4ecd27f1d6f8ba4dde0391ae799ce40102a1afae 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C
@@ -28,15 +28,10 @@ License
 #include "addToRunTimeSelectionTable.H"
 #include "wallFvPatch.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-void kqRWallFunctionFvPatchField<Type>::checkType()
+void Foam::kqRWallFunctionFvPatchField<Type>::checkType()
 {
     if (!isA<wallFvPatch>(this->patch()))
     {
@@ -54,7 +49,7 @@ void kqRWallFunctionFvPatchField<Type>::checkType()
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
+Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -67,36 +62,36 @@ kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 
 
 template<class Type>
-kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
+Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 (
-    const kqRWallFunctionFvPatchField& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
+    zeroGradientFvPatchField<Type>(p, iF, dict)
 {
     checkType();
 }
 
 
 template<class Type>
-kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
+Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 (
+    const kqRWallFunctionFvPatchField& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    zeroGradientFvPatchField<Type>(p, iF, dict)
+    zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
 {
     checkType();
 }
 
 
 template<class Type>
-kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
+Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 (
     const kqRWallFunctionFvPatchField& tkqrwfpf
 )
@@ -108,7 +103,7 @@ kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 
 
 template<class Type>
-kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
+Foam::kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 (
     const kqRWallFunctionFvPatchField& tkqrwfpf,
     const DimensionedField<Type, volMesh>& iF
@@ -123,7 +118,7 @@ kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void kqRWallFunctionFvPatchField<Type>::evaluate
+void Foam::kqRWallFunctionFvPatchField<Type>::evaluate
 (
     const Pstream::commsTypes commsType
 )
@@ -133,15 +128,11 @@ void kqRWallFunctionFvPatchField<Type>::evaluate
 
 
 template<class Type>
-void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
+void Foam::kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
 {
     zeroGradientFvPatchField<Type>::write(os);
     this->writeEntry("value", os);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H
index ddd453239050930c504da20ff1839d68c0eb09fa..7920e431f6ff6d1b91a3c2d2b009b6946636dec1 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,9 +119,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new kqRWallFunctionFvPatchField(*this)
             );
@@ -135,12 +135,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new kqRWallFunctionFvPatchField(*this, iF)
             );
@@ -172,7 +172,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "kqRWallFunctionFvPatchField.C"
+    #include "kqRWallFunctionFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
index 476a1679a0cf378a7133ab178d1786e0e7892c59..0f4bff28a640ebc0e858fa4d0558caceda7628ec 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,10 +57,10 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcNut() const
     const scalarField magUp(mag(Uw.patchInternalField() - Uw));
 
     tmp<scalarField> tyPlus = calcYPlus(magUp);
-    scalarField& yPlus = tyPlus();
+    scalarField& yPlus = tyPlus.ref();
 
     tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
-    scalarField& nutw = tnutw();
+    scalarField& nutw = tnutw.ref();
 
     forAll(yPlus, facei)
     {
@@ -95,7 +95,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus
     const scalarField& nuw = tnuw();
 
     tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0));
-    scalarField& yPlus = tyPlus();
+    scalarField& yPlus = tyPlus.ref();
 
     if (roughnessHeight_ > 0.0)
     {
@@ -209,9 +209,9 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
 )
 :
     nutWallFunctionFvPatchScalarField(p, iF),
-    roughnessHeight_(pTraits<scalar>::zero),
-    roughnessConstant_(pTraits<scalar>::zero),
-    roughnessFactor_(pTraits<scalar>::zero)
+    roughnessHeight_(Zero),
+    roughnessConstant_(Zero),
+    roughnessFactor_(Zero)
 {}
 
 
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C
index 711eb54438b763c913eb43a94deba6ce64fdd311..fca1d717d231a395705458bfbb8930ec4a234eea 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
     const scalarField& nutw = *this;
 
     tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
-    scalarField& uTau = tuTau();
+    scalarField& uTau = tuTau.ref();
 
     forAll(uTau, faceI)
     {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
index 9bc4767efd77f068bfd71ca68b2d454e34e5f9d7..eb4c55fb94b78c53a0b4c5dfedf32742c67a6ff3 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus
 ) const
 {
     tmp<scalarField> tuPlus(new scalarField(patch().size(), 0.0));
-    scalarField& uPlus = tuPlus();
+    scalarField& uPlus = tuPlus.ref();
 
     forAll(uPlus, faceI)
     {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
index 9d848e8efad42c88ae9f7b4ebbd9dcc818141aef..8a85d7226703c1c3f5872463f06fddc175227173 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,10 +54,10 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const
     const scalarField& nuw = tnuw();
 
     tmp<scalarField> tyPlus = calcYPlus(magUp);
-    scalarField& yPlus = tyPlus();
+    scalarField& yPlus = tyPlus.ref();
 
     tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
-    scalarField& nutw = tnutw();
+    scalarField& nutw = tnutw.ref();
 
     forAll(yPlus, facei)
     {
@@ -92,7 +92,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus
     const scalarField& nuw = tnuw();
 
     tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0));
-    scalarField& yPlus = tyPlus();
+    scalarField& yPlus = tyPlus.ref();
 
     forAll(yPlus, facei)
     {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C
index 9392408888be779726a7fc2fedf690a4b791a5a5..710ff8242b909ec08d827eea54169343160d9e33 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ tmp<scalarField> nutkAtmRoughWallFunctionFvPatchScalarField::calcNut() const
     const scalar Cmu25 = pow025(Cmu_);
 
     tmp<scalarField> tnutw(new scalarField(*this));
-    scalarField& nutw = tnutw();
+    scalarField& nutw = tnutw.ref();
 
     forAll(nutw, faceI)
     {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C
index 2d2f038b5a5286181624942a689cd386d1675c22..67405f0aa8502d6a4cc5d4f3b592c6ad8119775e 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,7 +80,7 @@ tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const
     const scalar Cmu25 = pow025(Cmu_);
 
     tmp<scalarField> tnutw(new scalarField(*this));
-    scalarField& nutw = tnutw();
+    scalarField& nutw = tnutw.ref();
 
     forAll(nutw, faceI)
     {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C
index 98b3f548ff25af98156611124b7dbbc39674d757..60dcf74b264644879b86c797edefd5d5d8855c22 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const
     const scalar Cmu25 = pow025(Cmu_);
 
     tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
-    scalarField& nutw = tnutw();
+    scalarField& nutw = tnutw.ref();
 
     forAll(nutw, faceI)
     {
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H
index ceecad1d3be6b2270b66769c3350b2106a7a5781..daf48993445d2c58897994da2184039618d5952d 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ protected:
         label master_;
 
         //- List of averaging corner weights
-        List<List<scalar> > cornerWeights_;
+        List<List<scalar>> cornerWeights_;
 
 
     // Protected Member Functions
diff --git a/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H b/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H
index 3a26fac199d2ce07e960df4ecdee01b425a84516..c214b9930b9c8c5caafaf064a27cfe107cc369cf 100644
--- a/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H
+++ b/src/TurbulenceModels/turbulenceModels/eddyViscosity/eddyViscosity.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -143,7 +143,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "eddyViscosity.C"
+    #include "eddyViscosity.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminar.C b/src/TurbulenceModels/turbulenceModels/laminar/laminar.C
index 55fc7cf62d1c4a93731d57caf3a86221b1ccfc95..2e60815a4158d2dee55ee4e65340a155a65e6dca 100644
--- a/src/TurbulenceModels/turbulenceModels/laminar/laminar.C
+++ b/src/TurbulenceModels/turbulenceModels/laminar/laminar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ Foam::laminar<BasicTurbulenceModel>::laminar
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class BasicTurbulenceModel>
-Foam::autoPtr<Foam::laminar<BasicTurbulenceModel> >
+Foam::autoPtr<Foam::laminar<BasicTurbulenceModel>>
 Foam::laminar<BasicTurbulenceModel>::New
 (
     const alphaField& alpha,
@@ -240,7 +240,7 @@ Foam::laminar<BasicTurbulenceModel>::R() const
             this->mesh_,
             dimensionedSymmTensor
             (
-                "R", sqr(this->U_.dimensions()), symmTensor::zero
+                "R", sqr(this->U_.dimensions()), Zero
             )
         )
     );
diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminar.H b/src/TurbulenceModels/turbulenceModels/laminar/laminar.H
index 07988089d2622774221cbb86373af51345d3b0fe..114287c0b65a78414d916665cee39c2bc93e6653 100644
--- a/src/TurbulenceModels/turbulenceModels/laminar/laminar.H
+++ b/src/TurbulenceModels/turbulenceModels/laminar/laminar.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "laminar.C"
+    #include "laminar.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C
index 1ac59915cfd62917f541e7a50e549f8804bd7dea..d5e61def56e8d54e04060a9545a6f972672110b2 100644
--- a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C
+++ b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,8 +97,8 @@ Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff
 {
     return
     (
-      - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
       - fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U))))
+      - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
     );
 }
 
@@ -113,8 +113,8 @@ Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff
 {
     return
     (
-      - fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
       - fvc::div((this->alpha_*rho*this->nuEff())*dev2(T(fvc::grad(U))))
+      - fvm::laplacian(this->alpha_*rho*this->nuEff(), U)
     );
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H
index 0a8f0e85634cc8ef4031f29a77fddce123e2b3df..6cea0f9cb123a7827a3c02de3720698a943def2b 100644
--- a/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H
+++ b/src/TurbulenceModels/turbulenceModels/linearViscousStress/linearViscousStress.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "linearViscousStress.C"
+    #include "linearViscousStress.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C
index c24ac4d6c5e3410ab77166211b5acbb35dd5481b..c38f806e26b5d5e90ac3f40a970fa4d432f0c93a 100644
--- a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C
+++ b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::nonlinearEddyViscosity
         (
             "nonlinearStress",
             sqr(dimVelocity),
-            symmTensor::zero
+            Zero
         )
     )
 {}
@@ -83,7 +83,7 @@ Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::R() const
     (
         eddyViscosity<BasicTurbulenceModel>::R()
     );
-    tR() += nonlinearStress_;
+    tR.ref() += nonlinearStress_;
     return tR;
 }
 
@@ -96,7 +96,7 @@ Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::devRhoReff() const
     (
         eddyViscosity<BasicTurbulenceModel>::devRhoReff()
     );
-    tdevRhoReff() += this->rho_*nonlinearStress_;
+    tdevRhoReff.ref() += this->rho_*nonlinearStress_;
     return tdevRhoReff;
 }
 
diff --git a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H
index da8a24a055022a386ecf5323b721c521a1d2343c..7e9d259074fe45d96fabbf616c1a9a14554ae0f3 100644
--- a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H
+++ b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "nonlinearEddyViscosity.C"
+    #include "nonlinearEddyViscosity.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C
index ed3cdb602c4c42d51ae33d4042cbe1681e3f879f..fdf6e1395cb57984888a57db737147b6e8f27c0f 100644
--- a/src/combustionModels/FSD/FSD.C
+++ b/src/combustionModels/FSD/FSD.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
         )
     );
 
-    volScalarField& pc = tPc();
+    volScalarField& pc = tPc.ref();
 
     tmp<volScalarField> tomegaFuel
     (
@@ -185,7 +185,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
         )
     );
 
-    volScalarField& omegaFuelBar = tomegaFuel();
+    volScalarField& omegaFuelBar = tomegaFuel.ref();
 
     // Calculation of the mixture fraction variance (ftVar)
     // TODO: generalize delta for RAS and LES.
@@ -307,7 +307,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
         )
     );
 
-    volScalarField& products = tproducts();
+    volScalarField& products = tproducts.ref();
 
     forAll(productsIndex, j)
     {
diff --git a/src/combustionModels/FSD/FSD.H b/src/combustionModels/FSD/FSD.H
index 10be2acdfa0fb763ba7eecb906ae2a43649d654a..c9b4b6fa7d5552873b2a3a23bbd3b7f6b92177d6 100644
--- a/src/combustionModels/FSD/FSD.H
+++ b/src/combustionModels/FSD/FSD.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -164,7 +164,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FSD.C"
+    #include "FSD.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C
index 2a5cbbd7dafb8ed25b8379fc190d107be5f5a77c..1aa0e0ae83ed4c38282ba5e4af80d1ee1270155c 100644
--- a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C
+++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma
         )
     );
 
-    volScalarField& omega0 = tomega0();
+    volScalarField& omega0 = tomega0.ref();
 
     volScalarField::InternalField& iomega0 = omega0.internalField();
 
diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H
index f0d8344af15e1b82b8ef2b51f99c0313876b477d..51614ab2e680a6c1f16b4fc9dc7811861d5e21e3 100644
--- a/src/combustionModels/PaSR/PaSR.H
+++ b/src/combustionModels/PaSR/PaSR.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PaSR.C"
+    #include "PaSR.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/diffusion/diffusion.H b/src/combustionModels/diffusion/diffusion.H
index b2a3516188a08a5f8a9f631621e50e6bf568657c..a3023ee32bd831a0a12bc74da18960640ee96518 100644
--- a/src/combustionModels/diffusion/diffusion.H
+++ b/src/combustionModels/diffusion/diffusion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,7 +118,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "diffusion.C"
+    #include "diffusion.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C
index 7d740ba875c802736501763adfec651bd80e3b7a..3261bf1b516d8ddd17b7b2c26b83eb2ef8d51fe8 100644
--- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C
+++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C
@@ -256,14 +256,14 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
             const List<specieCoeffs>& lhs = reactions_[k].lhs();
 
             // Set to zero RR's
-            forAll (lhs, l)
+            forAll(lhs, l)
             {
                 const label lIndex = lhs[l].index;
                 this->chemistryPtr_->RR(lIndex) =
                     dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0);
             }
 
-            forAll (rhs, l)
+            forAll(rhs, l)
             {
                 const label rIndex = rhs[l].index;
                 this->chemistryPtr_->RR(rIndex) =
@@ -363,7 +363,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
             const List<specieCoeffs>& lhs = reactions_[k].lhs();
 
             scalar fuelStoic = 1.0;
-            forAll (lhs, l)
+            forAll(lhs, l)
             {
                 const label lIndex = lhs[l].index;
                 if (lIndex == fuelIndex)
@@ -376,7 +376,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
             const scalar MwFuel = specieThermo_[fuelIndex].W();
 
             // Update left hand side species
-            forAll (lhs, l)
+            forAll(lhs, l)
             {
                 const label lIndex = lhs[l].index;
 
@@ -389,7 +389,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct()
             }
 
             // Update right hand side species
-            forAll (rhs, r)
+            forAll(rhs, r)
             {
                 const label rIndex = rhs[r].index;
 
@@ -411,7 +411,7 @@ R(volScalarField& Y) const
 {
     tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
 
-    fvScalarMatrix& Su = tSu();
+    fvScalarMatrix& Su = tSu.ref();
 
     if (this->active())
     {
@@ -449,7 +449,7 @@ dQ() const
 
     if (this->active())
     {
-        volScalarField& dQ = tdQ();
+        volScalarField& dQ = tdQ.ref();
         dQ = this->chemistryPtr_->dQ();
     }
 
@@ -483,7 +483,7 @@ Sh() const
 
     if (this->active())
     {
-        scalarField& Sh = tSh();
+        scalarField& Sh = tSh.ref();
         Sh = this->chemistryPtr_->Sh();
     }
 
diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H
index e859e8e4bb0eae6fa3fdb6daca19c32d2efd4e9d..f7143d00ee4225769ea86c4161246ead694123f2 100644
--- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H
+++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.H
@@ -92,7 +92,7 @@ class diffusionMulticomponent
     // Private data
 
         //- Reactions
-        const PtrList<Reaction<ThermoType> >& reactions_;
+        const PtrList<Reaction<ThermoType>>& reactions_;
 
         //- Thermodynamic data of the species
         const PtrList<ThermoType>& specieThermo_;
diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H
index 69fb847e266d6191c4f3cafc0570e8cdf0044de7..08dec407c0815317487903051ba1e4c6f4fac81a 100644
--- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H
+++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,7 +115,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "infinitelyFastChemistry.C"
+    #include "infinitelyFastChemistry.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C
index 069e9b588a4e96459a74ee3fc7bab94ff021a2f0..155c8bf01e3d43d0bf905b84c30687ceef089bdb 100644
--- a/src/combustionModels/laminar/laminar.C
+++ b/src/combustionModels/laminar/laminar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,7 +119,7 @@ Foam::combustionModels::laminar<Type>::R(volScalarField& Y) const
 {
     tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
 
-    fvScalarMatrix& Su = tSu();
+    fvScalarMatrix& Su = tSu.ref();
 
     if (this->active())
     {
@@ -151,14 +151,13 @@ Foam::combustionModels::laminar<Type>::dQ() const
                 false
             ),
             this->mesh(),
-            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
         )
     );
 
     if (this->active())
     {
-        tdQ() = this->chemistryPtr_->dQ();
+        tdQ.ref() = this->chemistryPtr_->dQ();
     }
 
     return tdQ;
@@ -183,14 +182,13 @@ Foam::combustionModels::laminar<Type>::Sh() const
                 false
             ),
             this->mesh(),
-            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
         )
     );
 
     if (this->active())
     {
-        tSh() = this->chemistryPtr_->Sh();
+        tSh.ref() = this->chemistryPtr_->Sh();
     }
 
     return tSh;
diff --git a/src/combustionModels/laminar/laminar.H b/src/combustionModels/laminar/laminar.H
index 6abd8978faac96229ab8ef64d5d5f5f518357537..0caf5a80f09402d1af1d3ecfc203e8b386261717 100644
--- a/src/combustionModels/laminar/laminar.H
+++ b/src/combustionModels/laminar/laminar.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "laminar.C"
+    #include "laminar.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C
index 838edd169cbc57c1a4a90f9467b1ac893cc75bdb..f5947759179dc5aa8bd4682f33e0bb986b0c7721 100644
--- a/src/combustionModels/noCombustion/noCombustion.C
+++ b/src/combustionModels/noCombustion/noCombustion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,8 +90,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::dQ() const
                 false
             ),
             this->mesh(),
-            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
         )
     );
 
@@ -117,8 +116,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Sh() const
                 false
             ),
             this->mesh(),
-            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
         )
     );
 
diff --git a/src/combustionModels/noCombustion/noCombustion.H b/src/combustionModels/noCombustion/noCombustion.H
index 1a93461c39f05520938a117862e11f7fad4bcb77..7e7a3b37818d874c934e49d4c6e454b7695f8b74 100644
--- a/src/combustionModels/noCombustion/noCombustion.H
+++ b/src/combustionModels/noCombustion/noCombustion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "noCombustion.C"
+    #include "noCombustion.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C
index 0f6dd8adc52786fff689d7d3e3c4d14f62d8ec40..d8bc1cfac30a0bcc59404ed732d7d0cb6cc571f3 100644
--- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C
+++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
     ),
     semiImplicit_(readBool(this->coeffs_.lookup("semiImplicit")))
 {
-    if (isA<singleStepReactingMixture<ThermoType> >(this->thermo()))
+    if (isA<singleStepReactingMixture<ThermoType>>(this->thermo()))
     {
         singleMixturePtr_ =
             &dynamic_cast<singleStepReactingMixture<ThermoType>&>
@@ -154,14 +154,13 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const
                 false
             ),
             this->mesh_,
-            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
         )
     );
 
     if (this->active())
     {
-        volScalarField& dQ = tdQ();
+        volScalarField& dQ = tdQ.ref();
         dQ.dimensionedInternalField() = this->mesh().V()*Sh()();
     }
     return tdQ;
diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.H b/src/combustionModels/singleStepCombustion/singleStepCombustion.H
index 6fd81ea0985478dfcb28ecbb7eb0eb3eafa26a61..404bfe1c137eb9b5afc0c9059ec8496586470e26 100644
--- a/src/combustionModels/singleStepCombustion/singleStepCombustion.H
+++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "singleStepCombustion.C"
+    #include "singleStepCombustion.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake
index 125d78c5e4704d9acebee897da850feeeee0c1d8..9c20d87a7577c97caf2de68ee5e1b87b2e1a3eca 100755
--- a/src/conversion/Allwmake
+++ b/src/conversion/Allwmake
@@ -8,4 +8,4 @@ set -x
 
 wmake $targetType
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C
index a8a02535d0367d58188967ee692d2de22edd2b6f..d06c64e55964eb192ccdeabee6651f721830aef1 100644
--- a/src/conversion/ensight/part/ensightPart.C
+++ b/src/conversion/ensight/part/ensightPart.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ bool Foam::ensightPart::isFieldDefined(const List<scalar>& field) const
         {
             const label id = idList[i];
 
-            if (id >= field.size() || isnan(field[id]))
+            if (id >= field.size() || std::isnan(field[id]))
             {
                 return false;
             }
diff --git a/src/conversion/ensight/part/ensightPart.H b/src/conversion/ensight/part/ensightPart.H
index ff1cdcf1f81fe59d9e8041731709a87c88810650..feb6d371baf023b37d50b5ee2f1c03e68586fd31 100644
--- a/src/conversion/ensight/part/ensightPart.H
+++ b/src/conversion/ensight/part/ensightPart.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -362,7 +362,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ensightPartTemplates.C"
+    #include "ensightPartTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/conversion/ensight/part/ensightPartIO.C b/src/conversion/ensight/part/ensightPartIO.C
index 6d827d7ed1e4af33ddb7b7f6eebdbdd5955dc170..1457ff46c3670b365f96909e2e6e9df0c509674e 100644
--- a/src/conversion/ensight/part/ensightPartIO.C
+++ b/src/conversion/ensight/part/ensightPartIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ void Foam::ensightPart::writeFieldList
     {
         forAll(idList, i)
         {
-            if (idList[i] >= field.size() || isnan(field[idList[i]]))
+            if (idList[i] >= field.size() || std::isnan(field[idList[i]]))
             {
                 os.writeUndef();
             }
@@ -80,7 +80,7 @@ void Foam::ensightPart::writeFieldList
         // no idList => perNode
         forAll(field, i)
         {
-            if (isnan(field[i]))
+            if (std::isnan(field[i]))
             {
                 os.writeUndef();
             }
diff --git a/src/conversion/ensight/part/ensightParts.H b/src/conversion/ensight/part/ensightParts.H
index 10faa7ea75c4f3c219bffe001fa1f340e52cc922..68c18774bab8d528a8d2e055a243951c01753e47 100644
--- a/src/conversion/ensight/part/ensightParts.H
+++ b/src/conversion/ensight/part/ensightParts.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,7 +156,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ensightPartsTemplates.C"
+    #include "ensightPartsTemplates.C"
 #endif
 
 #endif
diff --git a/src/conversion/meshReader/createPolyBoundary.C b/src/conversion/meshReader/createPolyBoundary.C
index 47fb2008f7b5cdf5da24ce27f72298d8050fe6c7..aecf77bcc0e6c04da2d7da418a86077b68a59e7d 100644
--- a/src/conversion/meshReader/createPolyBoundary.C
+++ b/src/conversion/meshReader/createPolyBoundary.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ void Foam::meshReader::addPolyBoundaryFace
     // Debugging
     if (cellPolys_[cellId][cellFaceId] > nInternalFaces_)
     {
-        Info<< "meshReader::createPolyBoundary(): "
+        InfoInFunction
             << "Problem with face: " << thisFace << endl
             << "Probably multiple definitions "
             << "of a single boundary face." << endl
@@ -70,7 +70,7 @@ void Foam::meshReader::addPolyBoundaryFace
     }
     else if (cellPolys_[cellId][cellFaceId] >= 0)
     {
-        Info<< "meshReader::createPolyBoundary(): "
+        InfoInFunction
             << "Problem with face: " << thisFace << endl
             << "Probably trying to define a boundary face "
             << "on a previously matched internal face." << endl
@@ -340,8 +340,8 @@ void Foam::meshReader::createPolyBoundary()
         {
             const face& problemFace = meshFaces_[faceI];
 
-            Info<< "meshReader::createPolyBoundary() : "
-                << "problem with face " << faceI << ": addressed "
+            InfoInFunction
+                << "Problem with face " << faceI << ": addressed "
                 << markupFaces[faceI] << " times (should be 2!). Face: "
                 << problemFace << endl;
 
diff --git a/src/conversion/meshReader/meshReader.H b/src/conversion/meshReader/meshReader.H
index a0b696d6dc487b0f3bb8bdbfa171f9273b2ca1c1..c07bf3cd9ced06d86e743de58efd268ce4ebb34d 100644
--- a/src/conversion/meshReader/meshReader.H
+++ b/src/conversion/meshReader/meshReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -158,7 +158,7 @@ private:
         List<labelPair> interfaces_;
 
         //- List of cells/faces id pairs for each baffle
-        List<List<cellFaceIdentifier> > baffleIds_;
+        List<List<cellFaceIdentifier>> baffleIds_;
 
         //- Global face list for polyMesh
         faceList meshFaces_;
@@ -261,7 +261,7 @@ protected:
 
         //- Identify boundary faces by cells and their faces
         //  for each patch
-        List<List<cellFaceIdentifier> > boundaryIds_;
+        List<List<cellFaceIdentifier>> boundaryIds_;
 
         //- Boundary patch types
         wordList patchTypes_;
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.C b/src/conversion/meshReader/starcd/STARCDMeshReader.C
index 5ba8c7abc9b23c2eb2305bf9fd2f998a6f1e74f1..52ffa3594ac3d194628d0a85c84dcaec2af2396a 100644
--- a/src/conversion/meshReader/starcd/STARCDMeshReader.C
+++ b/src/conversion/meshReader/starcd/STARCDMeshReader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -1041,8 +1041,6 @@ void Foam::meshReaders::STARCD::cullPoints()
 
 bool Foam::meshReaders::STARCD::readGeometry(const scalar scaleFactor)
 {
-    // Info<< "called meshReaders::STARCD::readGeometry" << endl;
-
     readPoints(geometryFile_ + ".vrt", scaleFactor);
     readCells(geometryFile_ + ".cel");
     cullPoints();
diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.H b/src/conversion/meshReader/starcd/STARCDMeshReader.H
index 33fadc40e97d4fab1542f97e744c5dbfdbecaac8..bde13a9cd2411f929de1d54a11c38f71643cee64 100644
--- a/src/conversion/meshReader/starcd/STARCDMeshReader.H
+++ b/src/conversion/meshReader/starcd/STARCDMeshReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,10 +42,10 @@ SourceFiles
 #ifndef STARCDMeshReader_H
 #define STARCDMeshReader_H
 
-# include "meshReader.H"
-# include "boundaryRegion.H"
-# include "cellShape.H"
-# include "IFstream.H"
+#include "meshReader.H"
+#include "boundaryRegion.H"
+#include "cellShape.H"
+#include "IFstream.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -89,12 +89,6 @@ protected:
 
     // Protected Member Functions
 
-        //- Disallow default bitwise copy construct
-        STARCD(const STARCD&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const STARCD&);
-
         //- Read the mesh from the file(s)
         virtual bool readGeometry(const scalar scaleFactor = 1.0);
 
@@ -120,6 +114,17 @@ protected:
         static bool readHeader(IFstream&, word fileSignature);
 
 
+private:
+
+    // Private member functions
+
+        //- Disallow default bitwise copy construct
+        STARCD(const STARCD&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const STARCD&);
+
+
 protected:
 
         enum cellType
diff --git a/src/conversion/meshTables/cellTable.C b/src/conversion/meshTables/cellTable.C
index 04af94aeb52acf300c7ee979731c7e05a334396b..d745d7dc5a2e3d8cf750f0e1dc9d7619f1e2535b 100644
--- a/src/conversion/meshTables/cellTable.C
+++ b/src/conversion/meshTables/cellTable.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -444,7 +444,7 @@ void Foam::cellTable::addCellZones
 ) const
 {
     Map<label> typeToZone = zoneMap();
-    List<DynamicList<label> > zoneCells(size());
+    List<DynamicList<label>> zoneCells(size());
 
     forAll(tableIds, cellI)
     {
diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake
index a819e774940ea09c9cc94abea2d2cfa900c31f55..fed1e16fda86eeed3c810ae8ecdee00bd5f26466 100755
--- a/src/dummyThirdParty/Allwmake
+++ b/src/dummyThirdParty/Allwmake
@@ -12,4 +12,4 @@ wmake $targetType metisDecomp
 wmake $targetType MGridGen
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
index a3f38112c8f7ce7f32352dffce79160bda4a1098..eb72493d4c9028e7613d0df80acce533edf3740b 100644
--- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
+++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -196,7 +196,7 @@ void Foam::dynamicRefineFvMesh::readDict()
         ).subDict(typeName + "Coeffs")
     );
 
-    List<Pair<word> > fluxVelocities = List<Pair<word> >
+    List<Pair<word>> fluxVelocities = List<Pair<word>>
     (
         refineDict.lookup("correctFluxes")
     );
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C
index 4051f7a7ea42f8b2a49086867a51197143aebc8d..3e6d98ea8edc6de8ad71f8e731d3ef9b8d2804c4 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -185,7 +185,7 @@ bool Foam::multiSolidBodyMotionFvMesh::update()
         const labelList& zonePoints = pointIDs_[i];
 
         UIndirectList<point>(transformedPts, zonePoints) =
-            transform
+            transformPoints
             (
                 SBMFs_[i].transformation(),
                 pointField(transformedPts, zonePoints)
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
index f925d3a20be74341396ea605bfc48967af8f81ce..7f3b08d1e96314de40f7722e9296e922789e7246 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ solidBodyMotionDisplacementPointPatchVectorField
         // Determine current local points and offset
         fixedValuePointPatchVectorField::operator==
         (
-            transform(SBMFPtr_().transformation(), localPoints0())
+            transformPoints(SBMFPtr_().transformation(), localPoints0())
            -localPoints0()
         );
     }
@@ -86,7 +86,7 @@ solidBodyMotionDisplacementPointPatchVectorField
 
     fixedValuePointPatchVectorField::operator==
     (
-        transform(SBMFPtr_().transformation(), localPoints0())
+        transformPoints(SBMFPtr_().transformation(), localPoints0())
        -localPoints0()
     );
 }
@@ -117,7 +117,7 @@ solidBodyMotionDisplacementPointPatchVectorField
 
     fixedValuePointPatchVectorField::operator==
     (
-        transform(SBMFPtr_().transformation(), localPoints0())
+        transformPoints(SBMFPtr_().transformation(), localPoints0())
        -localPoints0()
     );
 }
@@ -160,7 +160,7 @@ void solidBodyMotionDisplacementPointPatchVectorField::updateCoeffs()
     // Determine current local points and offset
     fixedValuePointPatchVectorField::operator==
     (
-        transform(SBMFPtr_().transformation(), localPoints0())
+        transformPoints(SBMFPtr_().transformation(), localPoints0())
        -localPoints0()
     );
 
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H
index c8319cd95fd75392be69d50b9d94eda3d35c637b..070907249140652b893f7453a99ff83b3b2c0863 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,9 +99,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new solidBodyMotionDisplacementPointPatchVectorField
                 (
@@ -119,12 +119,12 @@ public:
 
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new solidBodyMotionDisplacementPointPatchVectorField
                 (
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C
index 611f36faf156e03b1d51b7759aca8bfbf5f991cc..4c9dbed484dd5c4a6f3d2e85ba0b07ae1efe5705 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/SDA/SDA.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,11 +90,10 @@ Foam::septernion Foam::solidBodyMotionFunctions::SDA::transformation() const
         swayA_*(sin(wr*time + phs) - sin(phs)),
         heaveA_*(sin(wr*time + phh) - sin(phh))
     );
-    quaternion R(rollA*sin(wr*time + phr), 0, 0);
-    septernion TR(septernion(CofG_ + T)*R*septernion(-CofG_));
+    quaternion R(quaternion::XYZ, vector(rollA*sin(wr*time + phr), 0, 0));
+    septernion TR(septernion(-CofG_ - T)*R*septernion(CofG_));
 
-    Info<< "solidBodyMotionFunctions::SDA::transformation(): "
-        << "Time = " << time << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << time << " transformation: " << TR << endl;
 
     return TR;
 }
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/axisRotationMotion/axisRotationMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/axisRotationMotion/axisRotationMotion.C
index 7fec360454bb03bbbb86eec5667f85adb81ff681..fb5d430704d52ce6ee6fc6fbfbfefb0929638683 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/axisRotationMotion/axisRotationMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/axisRotationMotion/axisRotationMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,10 +83,9 @@ Foam::solidBodyMotionFunctions::axisRotationMotion::transformation() const
 
     scalar magOmega = mag(omega);
     quaternion R(omega/magOmega, magOmega);
-    septernion TR(septernion(origin_)*R*septernion(-origin_));
+    septernion TR(septernion(-origin_)*R*septernion(origin_));
 
-    Info<< "solidBodyMotionFunctions::axisRotationMotion::transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -105,4 +104,5 @@ bool Foam::solidBodyMotionFunctions::axisRotationMotion::read
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/linearMotion/linearMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/linearMotion/linearMotion.C
index 69fc23b2f6c0f6cf346e072b28edec692fd6d4c7..a382d190630aab729b4e1b201935d43bbb3d6b27 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/linearMotion/linearMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/linearMotion/linearMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,11 +73,10 @@ Foam::solidBodyMotionFunctions::linearMotion::transformation() const
     // Translation of centre of gravity with constant velocity
     const vector displacement = velocity_*t;
 
-    quaternion R(0, 0, 0);
-    septernion TR(septernion(displacement)*R);
+    quaternion R(1);
+    septernion TR(septernion(-displacement)*R);
 
-    Info<< "solidBodyMotionFunctions::linearMotion::transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -95,4 +94,5 @@ bool Foam::solidBodyMotionFunctions::linearMotion::read
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/multiMotion/multiMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/multiMotion/multiMotion.C
index 963ae01deb4dc5958a301dea0e7db9ae415ffbf0..313b20b506db5bbbe99fc5bcb73379ef9ec5eca8 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/multiMotion/multiMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/multiMotion/multiMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,8 +77,7 @@ Foam::solidBodyMotionFunctions::multiMotion::transformation() const
         TR *= SBMFs_[i].transformation();
     }
 
-    Info<< "solidBodyMotionFunctions::multiMotion::transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -116,4 +115,5 @@ bool Foam::solidBodyMotionFunctions::multiMotion::read
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C
index 5fa4cf48f6c47af1ba185d22d64f6ab559d37949..3b469090153d9e395c6e75a79b18c7def4e233b4 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,12 +73,10 @@ Foam::solidBodyMotionFunctions::oscillatingLinearMotion::transformation() const
 
     const vector displacement = amplitude_*sin(omega_*t);
 
-    quaternion R(0, 0, 0);
-    septernion TR(septernion(displacement)*R);
+    quaternion R(1);
+    septernion TR(septernion(-displacement)*R);
 
-    Info<< "solidBodyMotionFunctions::oscillatingLinearMotion::"
-        << "transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -97,4 +95,5 @@ bool Foam::solidBodyMotionFunctions::oscillatingLinearMotion::read
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C
index 04bf5d2e1df7a44eba2e76bee0b9f82f68938f4d..eff5e30fc2db2d431eeb638b665095d27ec508c2 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,12 +81,10 @@ transformation() const
     // Convert the rotational motion from deg to rad
     eulerAngles *= pi/180.0;
 
-    quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z());
-    septernion TR(septernion(origin_)*R*septernion(-origin_));
+    quaternion R(quaternion::XYZ, eulerAngles);
+    septernion TR(septernion(-origin_)*R*septernion(origin_));
 
-    Info<< "solidBodyMotionFunctions::oscillatingRotatingMotion::"
-        << "transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -106,4 +104,5 @@ bool Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::read
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C
index 8cce3dc680f6ccb556e4c0c78ad412ed2611d669..b246dd9cc1e8932127148213045c9218442e05cb 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion
     solidBodyMotionFunction(SBMFCoeffs, runTime),
     origin_(SBMFCoeffs_.lookup("origin")),
     axis_(SBMFCoeffs_.lookup("axis")),
-    omega_(DataEntry<scalar>::New("omega", SBMFCoeffs_))
+    omega_(Function1<scalar>::New("omega", SBMFCoeffs_))
 {}
 
 
@@ -78,10 +78,9 @@ Foam::solidBodyMotionFunctions::rotatingMotion::transformation() const
     scalar angle = omega_->integrate(0, t);
 
     quaternion R(axis_, angle);
-    septernion TR(septernion(origin_)*R*septernion(-origin_));
+    septernion TR(septernion(-origin_)*R*septernion(origin_));
 
-    Info<< "solidBodyMotionFunctions::rotatingMotion::transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -96,10 +95,11 @@ bool Foam::solidBodyMotionFunctions::rotatingMotion::read
 
     omega_.reset
     (
-        DataEntry<scalar>::New("omega", SBMFCoeffs_).ptr()
+        Function1<scalar>::New("omega", SBMFCoeffs_).ptr()
     );
 
     return true;
 }
 
+
 // ************************************************************************* //
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H
index 169d5d17aa8b62abcbfa0dae44e2136e331a2b04..404b450aa1ec8d35bec7086dc77063512a96be9d 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ SourceFiles
 #include "solidBodyMotionFunction.H"
 #include "primitiveFields.H"
 #include "point.H"
-#include "DataEntry.H"
+#include "Function1.H"
 #include "autoPtr.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -68,7 +68,7 @@ class rotatingMotion
         const vector axis_;
 
         //- Angular velocty (rad/sec)
-        autoPtr<DataEntry<scalar> > omega_;
+        autoPtr<Function1<scalar>> omega_;
 
 
     // Private Member Functions
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C
index 214ac972a153284d2f3ce9cdb1788cd6b4a23c5b..fd2fb3a9d205923c49bd544d22ca6f1417fc3829 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,9 +29,8 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(solidBodyMotionFunction, 0);
-
-defineRunTimeSelectionTable(solidBodyMotionFunction, dictionary);
+    defineTypeNameAndDebug(solidBodyMotionFunction, 0);
+    defineRunTimeSelectionTable(solidBodyMotionFunction, dictionary);
 }
 
 
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C
index 2410e72f04d8b69a5ff50d017916bbeb1e997f27..f185693c85c2f3b06e2a5dd37511a776010b7625 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,11 +104,10 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
     // Convert the rotational motion from deg to rad
     TRV[1] *= pi/180.0;
 
-    quaternion R(TRV[1].x(), TRV[1].y(), TRV[1].z());
-    septernion TR(septernion(CofG_ + TRV[0])*R*septernion(-CofG_));
+    quaternion R(quaternion::XYZ, TRV[1]);
+    septernion TR(septernion(-CofG_ + -TRV[0])*R*septernion(CofG_));
 
-    Info<< "solidBodyMotionFunctions::tabulated6DoFMotion::transformation(): "
-        << "Time = " << t << " transformation: " << TR << endl;
+    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;
 
     return TR;
 }
@@ -136,7 +135,7 @@ bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
 
         if (dataStream.good())
         {
-            List<Tuple2<scalar, translationRotationVectors> > timeValues
+            List<Tuple2<scalar, translationRotationVectors>> timeValues
             (
                 dataStream
             );
diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
index b12b2414290ec8c7eb2e115019b854b859893bb9..4271a894309c7afeafe13dc5d29f8ed23021794b 100644
--- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
+++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -193,7 +193,7 @@ bool Foam::solidBodyMotionFvMesh::update()
     {
         fvMesh::movePoints
         (
-            transform
+            transformPoints
             (
                 SBMFPtr_().transformation(),
                 undisplacedPoints_
@@ -205,7 +205,7 @@ bool Foam::solidBodyMotionFvMesh::update()
         pointField transformedPts(undisplacedPoints_);
 
         UIndirectList<point>(transformedPts, pointIDs_) =
-            transform
+            transformPoints
             (
                 SBMFPtr_().transformation(),
                 pointField(transformedPts, pointIDs_)
diff --git a/src/dynamicMesh/Make/files b/src/dynamicMesh/Make/files
index ec2ec3418edf4a1bbe9a0c1036fd25fc6ce8b761..215d35048d1e33999822dc8be39d9589a241d232 100644
--- a/src/dynamicMesh/Make/files
+++ b/src/dynamicMesh/Make/files
@@ -113,4 +113,7 @@ extrudePatchMesh/extrudePatchMesh.C
 polyMeshFilter/polyMeshFilterSettings.C
 polyMeshFilter/polyMeshFilter.C
 
+pointPatchDist/externalPointEdgePoint.C
+pointPatchDist/pointPatchDist.C
+
 LIB = $(FOAM_LIBBIN)/libdynamicMesh
diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C
index 12769005886f1cddc454a6bfba473c6501d5460a..29b9450f55ad8fd67af2283be92cc3b7427b688f 100644
--- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C
+++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -557,7 +557,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
         {
             const face& f = msh[faceI];
 
-            point ctr(vector::zero);
+            point ctr(Zero);
 
             forAll(f, fp)
             {
@@ -925,7 +925,7 @@ Foam::labelList Foam::boundaryMesh::getNearest
     bbMax.z() += 2*tol;
 
     const scalar planarTol =
-        indexedOctree<treeDataPrimitivePatch<uindirectPrimitivePatch> >::
+        indexedOctree<treeDataPrimitivePatch<uindirectPrimitivePatch>>::
         perturbTol();
 
 
@@ -1259,7 +1259,7 @@ void Foam::boundaryMesh::patchify
 
     if (newPatchPtrList.size())
     {
-        List<DynamicList<label> > patchFaces(nNewPatches);
+        List<DynamicList<label>> patchFaces(nNewPatches);
 
         // Give reasonable estimate for size of patches
         label nAvgFaces =
diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C
index ca8755562787c2c4c7351904fd8525e46e6657a9..fc066d7e9e4f945c634c50f08772d86915b04e5c 100644
--- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C
+++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ extrudePatchMesh::extrudePatchMesh
     List<word> patchTypes(regionPatches.size());
     PtrList<dictionary> dicts(regionPatches.size());
 
-    forAll (dicts, patchI)
+    forAll(dicts, patchI)
     {
         if (!dicts.set(patchI))
         {
@@ -122,13 +122,13 @@ extrudePatchMesh::extrudePatchMesh
     dicts[sidePatchID] = dict_.subDict("sideCoeffs");
     dicts[topPatchID] = dict_.subDict("topCoeffs");
 
-    forAll (dicts, patchI)
+    forAll(dicts, patchI)
     {
         dicts[patchI].lookup("name") >> patchNames[patchI];
         dicts[patchI].lookup("type") >> patchTypes[patchI];
     }
 
-    forAll (regionPatches, patchI)
+    forAll(regionPatches, patchI)
     {
         dictionary&  patchDict = dicts[patchI];
         patchDict.set("nFaces", 0);
@@ -203,7 +203,7 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches)
         // Calculate region normals by reducing local region normals
         pointField localRegionNormals(localToGlobalRegion.size());
         {
-            pointField localSum(localToGlobalRegion.size(), vector::zero);
+            pointField localSum(localToGlobalRegion.size(), Zero);
 
             forAll(pointLocalRegions, faceI)
             {
@@ -267,7 +267,7 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches)
         List<word> patchTypes(regionPatches.size());
         PtrList<dictionary> dicts(regionPatches.size());
 
-        forAll (dicts, patchI)
+        forAll(dicts, patchI)
         {
             if (!dicts.set(patchI))
             {
@@ -279,13 +279,13 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches)
         dicts[sidePatchID] = dict_.subDict("sideCoeffs");
         dicts[topPatchID] = dict_.subDict("topCoeffs");
 
-        forAll (dicts, patchI)
+        forAll(dicts, patchI)
         {
             dicts[patchI].lookup("name") >> patchNames[patchI];
             dicts[patchI].lookup("type") >> patchTypes[patchI];
         }
 
-        forAll (regionPatches, patchI)
+        forAll(regionPatches, patchI)
         {
             dictionary&  patchDict = dicts[patchI];
             patchDict.set("nFaces", 0);
diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H
index 4f0cb123b5cfa04a4165a21c911b85e49144787c..2a6a719afc485e82b2803e8250912ccf4c9f2436 100644
--- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H
+++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,6 +28,8 @@ Description
     Mesh at a patch created on the fly. The following entry should be used
     on the field boundary dictionary:
 
+    Example:
+    \verbatim
         // New Shell mesh data
 
         extrudeModel    linearNormal;
@@ -61,6 +63,7 @@ Description
             name        "side";
             type        empty;
         }
+    \endverbatim
 
 \*---------------------------------------------------------------------------*/
 
diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C
index 7139fb9fe6bdcaa7a4ab72fdced5554fc3139d8e..d710e688918ce328bbc71d1815e904378ad33ae7 100644
--- a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C
+++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,8 +38,6 @@ defineTypeNameAndDebug(fvMeshAdder, 0);
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-//- Calculate map from new patch faces to old patch faces. -1 where
-//  could not map.
 Foam::labelList Foam::fvMeshAdder::calcPatchMap
 (
     const label oldStart,
@@ -69,7 +67,6 @@ Foam::labelList Foam::fvMeshAdder::calcPatchMap
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Inplace add mesh1 to mesh0
 Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::fvMeshAdder::add
 (
     fvMesh& mesh0,
diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H
index c8592034785eebec161553037c5595c10424c3dd..e86792c396d834ef4abb11533777473263be5daf 100644
--- a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H
+++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -165,7 +165,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMeshAdderTemplates.C"
+    #include "fvMeshAdderTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C
index ca4f59cdbd7d4f2f6e91c8e8373de05f93c41ec3..78a6d1e2e31689aabc546c9b8fbf7f85d574b1d4 100644
--- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C
+++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -256,14 +256,14 @@ void Foam::fvMeshAdder::MapVolFields
     HashTable<const GeometricField<Type, fvPatchField, volMesh>*> fields
     (
         mesh.objectRegistry::lookupClass
-        <GeometricField<Type, fvPatchField, volMesh> >
+        <GeometricField<Type, fvPatchField, volMesh>>
         ()
     );
 
     HashTable<const GeometricField<Type, fvPatchField, volMesh>*> fieldsToAdd
     (
         meshToAdd.objectRegistry::lookupClass
-        <GeometricField<Type, fvPatchField, volMesh> >
+        <GeometricField<Type, fvPatchField, volMesh>>
         ()
     );
 
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
index 902e4d85bf42567c950fc18c6cda3505a72dfe49..96a0c4dc5aac51c47046c3a7d8719ec0834c4d13 100644
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -46,40 +46,39 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(fvMeshDistribute, 0);
+    defineTypeNameAndDebug(fvMeshDistribute, 0);
 
-//- Less function class that can be used for sorting processor patches
-class lessProcPatches
-{
-    const labelList& nbrProc_;
-    const labelList& referPatchID_;
+    //- Less function class that can be used for sorting processor patches
+    class lessProcPatches
+    {
+        const labelList& nbrProc_;
+        const labelList& referPatchID_;
 
-public:
+    public:
 
-    lessProcPatches( const labelList& nbrProc, const labelList& referPatchID)
-    :
-        nbrProc_(nbrProc),
-        referPatchID_(referPatchID)
-    {}
+        lessProcPatches(const labelList& nbrProc, const labelList& referPatchID)
+        :
+            nbrProc_(nbrProc),
+            referPatchID_(referPatchID)
+        {}
 
-    bool operator()(const label a, const label b)
-    {
-        if (nbrProc_[a] < nbrProc_[b])
-        {
-            return true;
-        }
-        else if (nbrProc_[a] > nbrProc_[b])
-        {
-            return false;
-        }
-        else
+        bool operator()(const label a, const label b)
         {
-            // Equal neighbour processor
-            return referPatchID_[a] < referPatchID_[b];
+            if (nbrProc_[a] < nbrProc_[b])
+            {
+                return true;
+            }
+            else if (nbrProc_[a] > nbrProc_[b])
+            {
+                return false;
+            }
+            else
+            {
+                // Equal neighbour processor
+                return referPatchID_[a] < referPatchID_[b];
+            }
         }
-    }
-};
-
+    };
 }
 
 
@@ -409,7 +408,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvMeshDistribute::generateTestField
             dimensionedScalar("zero", dimless, 0.0)
         )
     );
-    surfaceScalarField& fld = tfld();
+    surfaceScalarField& fld = tfld.ref();
 
     const surfaceVectorField n(mesh.Sf()/mesh.magSf());
 
@@ -609,15 +608,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
     // is currently not supported by updateMesh.
 
     // Store boundary fields (we only do this for surfaceFields)
-    PtrList<FieldField<fvsPatchField, scalar> > sFlds;
+    PtrList<FieldField<fvsPatchField, scalar>> sFlds;
     saveBoundaryFields<scalar, surfaceMesh>(sFlds);
-    PtrList<FieldField<fvsPatchField, vector> > vFlds;
+    PtrList<FieldField<fvsPatchField, vector>> vFlds;
     saveBoundaryFields<vector, surfaceMesh>(vFlds);
-    PtrList<FieldField<fvsPatchField, sphericalTensor> > sptFlds;
+    PtrList<FieldField<fvsPatchField, sphericalTensor>> sptFlds;
     saveBoundaryFields<sphericalTensor, surfaceMesh>(sptFlds);
-    PtrList<FieldField<fvsPatchField, symmTensor> > sytFlds;
+    PtrList<FieldField<fvsPatchField, symmTensor>> sytFlds;
     saveBoundaryFields<symmTensor, surfaceMesh>(sytFlds);
-    PtrList<FieldField<fvsPatchField, tensor> > tFlds;
+    PtrList<FieldField<fvsPatchField, tensor>> tFlds;
     saveBoundaryFields<tensor, surfaceMesh>(tFlds);
 
     // Change the mesh (no inflation). Note: parallel comms allowed.
@@ -783,10 +782,8 @@ void Foam::fvMeshDistribute::getNeighbourData
             }
 
             // Which processor they will end up on
-            SubList<label>(nbrNewNbrProc, pp.size(), offset).assign
-            (
-                UIndirectList<label>(distribution, pp.faceCells())()
-            );
+            SubList<label>(nbrNewNbrProc, pp.size(), offset) =
+                UIndirectList<label>(distribution, pp.faceCells())();
         }
     }
 
@@ -980,7 +977,7 @@ void Foam::fvMeshDistribute::findCouples
 {
     // Store domain neighbour as map so we can easily look for pair
     // with same face+proc.
-    HashTable<label, labelPair, labelPair::Hash<> > map(domainFace.size());
+    HashTable<label, labelPair, labelPair::Hash<>> map(domainFace.size());
 
     forAll(domainProc, bFaceI)
     {
@@ -1007,7 +1004,7 @@ void Foam::fvMeshDistribute::findCouples
         {
             labelPair myData(sourceFace[bFaceI], sourceProc[bFaceI]);
 
-            HashTable<label, labelPair, labelPair::Hash<> >::const_iterator
+            HashTable<label, labelPair, labelPair::Hash<>>::const_iterator
                 iter = map.find(myData);
 
             if (iter != map.end())
@@ -1107,15 +1104,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::doRemoveCells
 
     // Save internal fields (note: not as DimensionedFields since would
     // get mapped)
-    PtrList<Field<scalar> > sFlds;
+    PtrList<Field<scalar>> sFlds;
     saveInternalFields(sFlds);
-    PtrList<Field<vector> > vFlds;
+    PtrList<Field<vector>> vFlds;
     saveInternalFields(vFlds);
-    PtrList<Field<sphericalTensor> > sptFlds;
+    PtrList<Field<sphericalTensor>> sptFlds;
     saveInternalFields(sptFlds);
-    PtrList<Field<symmTensor> > sytFlds;
+    PtrList<Field<symmTensor>> sytFlds;
     saveInternalFields(sytFlds);
-    PtrList<Field<tensor> > tFlds;
+    PtrList<Field<tensor>> tFlds;
     saveInternalFields(tFlds);
 
     // Change the mesh. No inflation. Note: no parallel comms allowed.
@@ -1157,7 +1154,7 @@ void Foam::fvMeshDistribute::addProcPatches
 (
     const labelList& nbrProc,       // processor that neighbour is now on
     const labelList& referPatchID,  // patchID (or -1) I originated from
-    List<Map<label> >& procPatchID
+    List<Map<label>>& procPatchID
 )
 {
     // Now use the neighbourFace/Proc to repatch the mesh. These lists
@@ -1188,16 +1185,8 @@ void Foam::fvMeshDistribute::addProcPatches
                 if (referPatchID[bFaceI] == -1)
                 {
                     // Ordinary processor boundary
-
-                    const word patchName =
-                        "procBoundary"
-                      + name(Pstream::myProcNo())
-                      + "to"
-                      + name(procI);
-
                     processorPolyPatch pp
                     (
-                        patchName,
                         0,              // size
                         mesh_.nFaces(),
                         mesh_.boundaryMesh().size(),
@@ -1227,27 +1216,15 @@ void Foam::fvMeshDistribute::addProcPatches
                               mesh_.boundaryMesh()[referPatchID[bFaceI]]
                           );
 
-                    // Processor boundary originating from cyclic
-                    const word& cycName = pcPatch.name();
-
-                    const word patchName =
-                        "procBoundary"
-                      + name(Pstream::myProcNo())
-                      + "to"
-                      + name(procI)
-                      + "through"
-                      + cycName;
-
                     processorCyclicPolyPatch pp
                     (
-                        patchName,
                         0,              // size
                         mesh_.nFaces(),
                         mesh_.boundaryMesh().size(),
                         mesh_.boundaryMesh(),
                         Pstream::myProcNo(),
-                        procI,
-                        cycName,
+                        nbrProc[bFaceI],
+                        pcPatch.name(),
                         pcPatch.transform()
                     );
 
@@ -1275,7 +1252,7 @@ Foam::labelList Foam::fvMeshDistribute::getBoundaryPatch
 (
     const labelList& nbrProc,               // new processor per boundary face
     const labelList& referPatchID,          // patchID (or -1) I originated from
-    const List<Map<label> >& procPatchID    // per proc the new procPatches
+    const List<Map<label>>& procPatchID    // per proc the new procPatches
 )
 {
     labelList patchIDs(nbrProc);
@@ -1353,7 +1330,7 @@ void Foam::fvMeshDistribute::sendMesh
 
             if (myZoneID != -1)
             {
-                zonePoints[nameI].assign(pointZones[myZoneID]);
+                zonePoints[nameI].deepCopy(pointZones[myZoneID]);
             }
         }
     }
@@ -1385,8 +1362,8 @@ void Foam::fvMeshDistribute::sendMesh
 
             if (myZoneID != -1)
             {
-                zoneFaces[nameI].assign(faceZones[myZoneID]);
-                zoneFaceFlip[nameI].assign(faceZones[myZoneID].flipMap());
+                zoneFaces[nameI].deepCopy(faceZones[myZoneID]);
+                zoneFaceFlip[nameI].deepCopy(faceZones[myZoneID].flipMap());
             }
         }
     }
@@ -1416,7 +1393,7 @@ void Foam::fvMeshDistribute::sendMesh
 
             if (myZoneID != -1)
             {
-                zoneCells[nameI].assign(cellZones[myZoneID]);
+                zoneCells[nameI].deepCopy(cellZones[myZoneID]);
             }
         }
     }
@@ -2656,7 +2633,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
     // Per neighbour processor, per originating patch, the patchID
     // For faces resulting from internal faces or normal processor patches
     // the originating patch is -1. For cyclics this is the cyclic patchID.
-    List<Map<label> > procPatchID;
+    List<Map<label>> procPatchID;
 
     // Add processor and processorCyclic patches.
     addProcPatches(sourceNewNbrProc, sourcePatch, procPatchID);
@@ -2690,13 +2667,13 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
 
     // Bit of hack: processorFvPatchField does not get reset since created
     // from nothing so explicitly reset.
-    initPatchFields<volScalarField, processorFvPatchField<scalar> >
+    initPatchFields<volScalarField, processorFvPatchField<scalar>>
     (
-        pTraits<scalar>::zero
+        Zero
     );
-    initPatchFields<volVectorField, processorFvPatchField<vector> >
+    initPatchFields<volVectorField, processorFvPatchField<vector>>
     (
-        pTraits<vector>::zero
+        Zero
     );
     initPatchFields
     <
@@ -2704,15 +2681,15 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
         processorFvPatchField<sphericalTensor>
     >
     (
-        pTraits<sphericalTensor>::zero
+        Zero
     );
-    initPatchFields<volSymmTensorField, processorFvPatchField<symmTensor> >
+    initPatchFields<volSymmTensorField, processorFvPatchField<symmTensor>>
     (
-        pTraits<symmTensor>::zero
+        Zero
     );
-    initPatchFields<volTensorField, processorFvPatchField<tensor> >
+    initPatchFields<volTensorField, processorFvPatchField<tensor>>
     (
-        pTraits<tensor>::zero
+        Zero
     );
 
 
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H
index a2e1f391abc63422f7dd2e69d472b67d6d7841f1..2effcbcaa6ac02c270ffd26fcffb3daaa3c91f7d 100644
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -114,7 +114,7 @@ class fvMeshDistribute
             template<class T, class Mesh>
             void saveBoundaryFields
             (
-                PtrList<FieldField<fvsPatchField, T> >& bflds
+                PtrList<FieldField<fvsPatchField, T>>& bflds
             ) const;
 
             //- Map boundary fields
@@ -122,14 +122,14 @@ class fvMeshDistribute
             void mapBoundaryFields
             (
                 const mapPolyMesh& map,
-                const PtrList<FieldField<fvsPatchField, T> >& oldBflds
+                const PtrList<FieldField<fvsPatchField, T>>& oldBflds
             );
 
             //- Save internal fields of surfaceFields
             template<class T>
             void saveInternalFields
             (
-                PtrList<Field<T> >& iflds
+                PtrList<Field<T>>& iflds
             ) const;
 
             //- Set value of patch faces resulting from internal faces
@@ -137,7 +137,7 @@ class fvMeshDistribute
             void mapExposedFaces
             (
                 const mapPolyMesh& map,
-                const PtrList<Field<T> >& oldFlds
+                const PtrList<Field<T>>& oldFlds
             );
 
             //- Init patch fields of certain type
@@ -255,7 +255,7 @@ class fvMeshDistribute
             (
                 const labelList&, // processor that neighbour is now on
                 const labelList&, // -1 or patch that face originated from
-                List<Map<label> >& procPatchID
+                List<Map<label>>& procPatchID
             );
 
             //- Get boundary faces to be repatched. Is -1 or new patchID
@@ -263,7 +263,7 @@ class fvMeshDistribute
             (
                 const labelList& neighbourNewProc,  // new processor per b. face
                 const labelList& referPatchID,      // -1 or original patch
-                const List<Map<label> >& procPatchID// patchID
+                const List<Map<label>>& procPatchID// patchID
             );
 
             //- Send mesh and coupling data.
@@ -376,7 +376,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMeshDistributeTemplates.C"
+    #include "fvMeshDistributeTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C
index 6d4f6d64f19f445e52845863c0b33f2dddb15e23..6864a222b59bd44965f1a995b049d04531c99bc7 100644
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -59,7 +59,7 @@ void Foam::fvMeshDistribute::printFieldInfo(const fvMesh& mesh)
 template<class T, class Mesh>
 void Foam::fvMeshDistribute::saveBoundaryFields
 (
-    PtrList<FieldField<fvsPatchField, T> >& bflds
+    PtrList<FieldField<fvsPatchField, T>>& bflds
 ) const
 {
     typedef GeometricField<T, fvsPatchField, Mesh> fldType;
@@ -89,7 +89,7 @@ template<class T, class Mesh>
 void Foam::fvMeshDistribute::mapBoundaryFields
 (
     const mapPolyMesh& map,
-    const PtrList<FieldField<fvsPatchField, T> >& oldBflds
+    const PtrList<FieldField<fvsPatchField, T>>& oldBflds
 )
 {
     const labelList& oldPatchStarts = map.oldPatchStarts();
@@ -147,7 +147,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
 template<class T>
 void Foam::fvMeshDistribute::saveInternalFields
 (
-    PtrList<Field<T> >& iflds
+    PtrList<Field<T>>& iflds
 ) const
 {
     typedef GeometricField<T, fvsPatchField, surfaceMesh> fldType;
@@ -177,7 +177,7 @@ template<class T>
 void Foam::fvMeshDistribute::mapExposedFaces
 (
     const mapPolyMesh& map,
-    const PtrList<Field<T> >& oldFlds
+    const PtrList<Field<T>>& oldFlds
 )
 {
     const labelList& faceMap = map.faceMap();
diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C
index af93d97f206374075fe233c41a5b155efb9613f8..c4c3c0a7f2eb176af27a9a4db51e234e2754c979 100644
--- a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C
+++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -90,14 +90,15 @@ void Foam::fvMeshSubset::markPoints
 }
 
 
-// Synchronize nCellsUsingFace on both sides of coupled patches. Marks
-// faces that become 'uncoupled' with 3.
 void Foam::fvMeshSubset::doCoupledPatches
 (
     const bool syncPar,
     labelList& nCellsUsingFace
 ) const
 {
+    // Synchronize nCellsUsingFace on both sides of coupled patches.
+    // Marks faces that become 'uncoupled' with 3.
+
     const polyBoundaryMesh& oldPatches = baseMesh().boundaryMesh();
 
     label nUncoupled = 0;
@@ -391,7 +392,6 @@ Foam::labelList Foam::fvMeshSubset::getCellsToRemove
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::fvMeshSubset::fvMeshSubset(const fvMesh& baseMesh)
 :
     baseMesh_(baseMesh),
diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.H b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.H
index d3e2819fedd1e1a02db96f8face0f132ea2c12f9..03e09505be0d68a24958fff4e5c535520e874b2c 100644
--- a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.H
+++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -247,7 +247,7 @@ public:
 
             //- Map volume field
             template<class Type>
-            static tmp<GeometricField<Type, fvPatchField, volMesh> >
+            static tmp<GeometricField<Type, fvPatchField, volMesh>>
             interpolate
             (
                 const GeometricField<Type, fvPatchField, volMesh>&,
@@ -258,7 +258,7 @@ public:
             );
 
             template<class Type>
-            tmp<GeometricField<Type, fvPatchField, volMesh> >
+            tmp<GeometricField<Type, fvPatchField, volMesh>>
             interpolate
             (
                 const GeometricField<Type, fvPatchField, volMesh>&
@@ -267,7 +267,7 @@ public:
             //- Map surface field. Optionally negates value if flipping
             //  a face (from exposing an internal face)
             template<class Type>
-            static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+            static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
             interpolate
             (
                 const GeometricField<Type, fvsPatchField, surfaceMesh>&,
@@ -279,7 +279,7 @@ public:
             );
 
             template<class Type>
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
             interpolate
             (
                 const GeometricField<Type, fvsPatchField, surfaceMesh>&,
@@ -288,7 +288,7 @@ public:
 
             //- Map point field
             template<class Type>
-            static tmp<GeometricField<Type, pointPatchField, pointMesh> >
+            static tmp<GeometricField<Type, pointPatchField, pointMesh>>
             interpolate
             (
                 const GeometricField<Type, pointPatchField, pointMesh>&,
@@ -298,7 +298,7 @@ public:
             );
 
             template<class Type>
-            tmp<GeometricField<Type, pointPatchField, pointMesh> >
+            tmp<GeometricField<Type, pointPatchField, pointMesh>>
             interpolate
             (
                 const GeometricField<Type, pointPatchField, pointMesh>&
@@ -306,7 +306,7 @@ public:
 
             //- Map dimensioned fields
             template<class Type>
-            static tmp<DimensionedField<Type, volMesh> >
+            static tmp<DimensionedField<Type, volMesh>>
             interpolate
             (
                 const DimensionedField<Type, volMesh>&,
@@ -315,7 +315,7 @@ public:
             );
 
             template<class Type>
-            tmp<DimensionedField<Type, volMesh> >
+            tmp<DimensionedField<Type, volMesh>>
             interpolate
             (
                 const DimensionedField<Type, volMesh>&
@@ -331,7 +331,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMeshSubsetInterpolate.C"
+    #include "fvMeshSubsetInterpolate.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/dynamicMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
index f9e406e47dab85ab2fbe8bf1bcad7a2edadb12a5..81463a65592c7f7de18a667a0b089fd090109866 100644
--- a/src/dynamicMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
+++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ namespace Foam
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
+tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const fvMesh& sMesh,
@@ -49,7 +49,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
 )
 {
     // 1. Create the complete field with dummy patch fields
-    PtrList<fvPatchField<Type> > patchFields(patchMap.size());
+    PtrList<fvPatchField<Type>> patchFields(patchMap.size());
 
     forAll(patchFields, patchI)
     {
@@ -83,7 +83,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
         }
     }
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tresF
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tresF
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -101,7 +101,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
             patchFields
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
+    GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvPatchFields to the correct type using a mapper
@@ -157,7 +157,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
+tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
@@ -174,7 +174,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& vf,
     const fvMesh& sMesh,
@@ -185,7 +185,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
 )
 {
     // 1. Create the complete field with dummy patch fields
-    PtrList<fvsPatchField<Type> > patchFields(patchMap.size());
+    PtrList<fvsPatchField<Type>> patchFields(patchMap.size());
 
     forAll(patchFields, patchI)
     {
@@ -220,7 +220,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
     }
 
     // Create the complete field from the pieces
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tresF
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tresF
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -246,7 +246,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
             patchFields
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvsPatchFields to the correct type using a mapper
@@ -340,7 +340,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& sf,
     const bool negateIfFlipped
@@ -359,7 +359,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> >
+tmp<GeometricField<Type, pointPatchField, pointMesh>>
 fvMeshSubset::interpolate
 (
     const GeometricField<Type, pointPatchField, pointMesh>& vf,
@@ -369,7 +369,7 @@ fvMeshSubset::interpolate
 )
 {
     // 1. Create the complete field with dummy patch fields
-    PtrList<pointPatchField<Type> > patchFields(patchMap.size());
+    PtrList<pointPatchField<Type>> patchFields(patchMap.size());
 
     forAll(patchFields, patchI)
     {
@@ -404,7 +404,7 @@ fvMeshSubset::interpolate
     }
 
     // Create the complete field from the pieces
-    tmp<GeometricField<Type, pointPatchField, pointMesh> > tresF
+    tmp<GeometricField<Type, pointPatchField, pointMesh>> tresF
     (
         new GeometricField<Type, pointPatchField, pointMesh>
         (
@@ -422,7 +422,7 @@ fvMeshSubset::interpolate
             patchFields
         )
     );
-    GeometricField<Type, pointPatchField, pointMesh>& resF = tresF();
+    GeometricField<Type, pointPatchField, pointMesh>& resF = tresF.ref();
 
 
     // 2. Change the pointPatchFields to the correct type using a mapper
@@ -490,7 +490,7 @@ fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> > fvMeshSubset::interpolate
+tmp<GeometricField<Type, pointPatchField, pointMesh>> fvMeshSubset::interpolate
 (
     const GeometricField<Type, pointPatchField, pointMesh>& sf
 ) const
@@ -506,7 +506,7 @@ tmp<GeometricField<Type, pointPatchField, pointMesh> > fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<DimensionedField<Type, volMesh> > fvMeshSubset::interpolate
+tmp<DimensionedField<Type, volMesh>> fvMeshSubset::interpolate
 (
     const DimensionedField<Type, volMesh>& df,
     const fvMesh& sMesh,
@@ -514,7 +514,7 @@ tmp<DimensionedField<Type, volMesh> > fvMeshSubset::interpolate
 )
 {
     // Create the complete field from the pieces
-    tmp<DimensionedField<Type, volMesh> > tresF
+    tmp<DimensionedField<Type, volMesh>> tresF
     (
         new DimensionedField<Type, volMesh>
         (
@@ -537,7 +537,7 @@ tmp<DimensionedField<Type, volMesh> > fvMeshSubset::interpolate
 
 
 template<class Type>
-tmp<DimensionedField<Type, volMesh> > fvMeshSubset::interpolate
+tmp<DimensionedField<Type, volMesh>> fvMeshSubset::interpolate
 (
     const DimensionedField<Type, volMesh>& df
 ) const
diff --git a/src/dynamicMesh/fvMeshTools/fvMeshTools.C b/src/dynamicMesh/fvMeshTools/fvMeshTools.C
index df8aaccdb4b027bd179017e8ec72207606cfd8b8..827b8ec025ce3f43ba0ac19ba1378744dcac79f6 100644
--- a/src/dynamicMesh/fvMeshTools/fvMeshTools.C
+++ b/src/dynamicMesh/fvMeshTools/fvMeshTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -110,35 +110,35 @@ Foam::label Foam::fvMeshTools::addPatch
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<scalar>::zero
+        Zero
     );
     addPatchFields<volVectorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<vector>::zero
+        Zero
     );
     addPatchFields<volSphericalTensorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<sphericalTensor>::zero
+        Zero
     );
     addPatchFields<volSymmTensorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<symmTensor>::zero
+        Zero
     );
     addPatchFields<volTensorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<tensor>::zero
+        Zero
     );
 
     // Surface fields
@@ -148,35 +148,35 @@ Foam::label Foam::fvMeshTools::addPatch
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<scalar>::zero
+        Zero
     );
     addPatchFields<surfaceVectorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<vector>::zero
+        Zero
     );
     addPatchFields<surfaceSphericalTensorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<sphericalTensor>::zero
+        Zero
     );
     addPatchFields<surfaceSymmTensorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<symmTensor>::zero
+        Zero
     );
     addPatchFields<surfaceTensorField>
     (
         mesh,
         patchFieldDict,
         defaultPatchFieldType,
-        pTraits<tensor>::zero
+        Zero
     );
 
     // Create reordering list
@@ -240,36 +240,36 @@ void Foam::fvMeshTools::setPatchFields
 
 void Foam::fvMeshTools::zeroPatchFields(fvMesh& mesh, const label patchI)
 {
-    setPatchFields<volScalarField>(mesh, patchI, pTraits<scalar>::zero);
-    setPatchFields<volVectorField>(mesh, patchI, pTraits<vector>::zero);
+    setPatchFields<volScalarField>(mesh, patchI, Zero);
+    setPatchFields<volVectorField>(mesh, patchI, Zero);
     setPatchFields<volSphericalTensorField>
     (
         mesh,
         patchI,
-        pTraits<sphericalTensor>::zero
+        Zero
     );
     setPatchFields<volSymmTensorField>
     (
         mesh,
         patchI,
-        pTraits<symmTensor>::zero
+        Zero
     );
-    setPatchFields<volTensorField>(mesh, patchI, pTraits<tensor>::zero);
-    setPatchFields<surfaceScalarField>(mesh, patchI, pTraits<scalar>::zero);
-    setPatchFields<surfaceVectorField>(mesh, patchI, pTraits<vector>::zero);
+    setPatchFields<volTensorField>(mesh, patchI, Zero);
+    setPatchFields<surfaceScalarField>(mesh, patchI, Zero);
+    setPatchFields<surfaceVectorField>(mesh, patchI, Zero);
     setPatchFields<surfaceSphericalTensorField>
     (
         mesh,
         patchI,
-        pTraits<sphericalTensor>::zero
+        Zero
     );
     setPatchFields<surfaceSymmTensorField>
     (
         mesh,
         patchI,
-        pTraits<symmTensor>::zero
+        Zero
     );
-    setPatchFields<surfaceTensorField>(mesh, patchI, pTraits<tensor>::zero);
+    setPatchFields<surfaceTensorField>(mesh, patchI, Zero);
 }
 
 
diff --git a/src/dynamicMesh/fvMeshTools/fvMeshTools.H b/src/dynamicMesh/fvMeshTools/fvMeshTools.H
index 37b368961c52ff790a4615c05e070cbf14465110..18fe4e0f9b5b0a5285257c44f021118fec03a86f 100644
--- a/src/dynamicMesh/fvMeshTools/fvMeshTools.H
+++ b/src/dynamicMesh/fvMeshTools/fvMeshTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -148,7 +148,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMeshToolsTemplates.C"
+    #include "fvMeshToolsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C
index 572b8b7d790a2bf093fb23111bfef2bbbc74fed6..085cc99079e6b008dcfbed37b8356ba2ffac28ab 100644
--- a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C
+++ b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ Foam::tmp<Foam::vectorField> Foam::layerAdditionRemoval::extrusionDir() const
     const labelList& mp = masterFaceLayer.meshPoints();
 
     tmp<vectorField> textrusionDir(new vectorField(mp.size()));
-    vectorField& extrusionDir = textrusionDir();
+    vectorField& extrusionDir = textrusionDir.ref();
 
     if (setLayerPairing())
     {
diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C
index 864faad5fd1974f8bdb2462a0bf35b38e18973a7..c499fbcb5d35de7bc111834118bdc7ff36ddc48c 100644
--- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C
+++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,13 +38,12 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(cellCuts, 0);
+    defineTypeNameAndDebug(cellCuts, 0);
 }
 
 
 // * * * * * * * * * * * * * Private Static Functions  * * * * * * * * * * * //
 
-// Find val in first nElems elements of list.
 Foam::label Foam::cellCuts::findPartIndex
 (
     const labelList& elems,
@@ -96,7 +95,6 @@ Foam::scalarField Foam::cellCuts::expand
 }
 
 
-// Find first point in lst not in map.
 Foam::label Foam::cellCuts::firstUnique
 (
     const labelList& lst,
@@ -116,14 +114,13 @@ Foam::label Foam::cellCuts::firstUnique
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Write cell and raw cuts on any of the elements
 void Foam::cellCuts::writeUncutOBJ
 (
     const fileName& dir,
     const label cellI
 ) const
 {
-    //- Cell edges
+    // Cell edges
     OFstream cutsStream(dir / "cell_" + name(cellI) + ".obj");
 
     Pout<< "Writing cell for time " <<  mesh().time().timeName()
@@ -138,7 +135,7 @@ void Foam::cellCuts::writeUncutOBJ
         labelList(1, cellI)
     );
 
-    //- Loop cutting cell in two
+    // Loop cutting cell in two
     OFstream cutStream(dir / "cellCuts_" + name(cellI) + ".obj");
 
     Pout<< "Writing raw cuts on cell for time " <<  mesh().time().timeName()
@@ -183,7 +180,7 @@ void Foam::cellCuts::writeOBJ
     const labelList& anchors
 ) const
 {
-    //- Cell edges
+    // Cell edges
     OFstream cutsStream(dir / "cell_" + name(cellI) + ".obj");
 
     Pout<< "Writing cell for time " <<  mesh().time().timeName()
@@ -199,7 +196,7 @@ void Foam::cellCuts::writeOBJ
     );
 
 
-    //- Loop cutting cell in two
+    // Loop cutting cell in two
     OFstream loopStream(dir / "cellLoop_" + name(cellI) + ".obj");
 
     Pout<< "Writing loop for time " <<  mesh().time().timeName()
@@ -210,7 +207,7 @@ void Foam::cellCuts::writeOBJ
     writeOBJ(loopStream, loopPoints, vertI);
 
 
-    //- Anchors for cell
+    // Anchors for cell
     OFstream anchorStream(dir / "anchors_" + name(cellI) + ".obj");
 
     Pout<< "Writing anchors for time " <<  mesh().time().timeName()
@@ -223,7 +220,6 @@ void Foam::cellCuts::writeOBJ
 }
 
 
-// Find face on cell using the two edges.
 Foam::label Foam::cellCuts::edgeEdgeToFace
 (
     const label cellI,
@@ -264,7 +260,6 @@ Foam::label Foam::cellCuts::edgeEdgeToFace
 }
 
 
-// Find face on cell using an edge and a vertex.
 Foam::label Foam::cellCuts::edgeVertexToFace
 (
     const label cellI,
@@ -304,7 +299,6 @@ Foam::label Foam::cellCuts::edgeVertexToFace
 }
 
 
-// Find face using two vertices (guaranteed not to be along edge)
 Foam::label Foam::cellCuts::vertexVertexToFace
 (
     const label cellI,
@@ -477,7 +471,6 @@ void Foam::cellCuts::calcFaceCuts() const
 }
 
 
-// Find edge on face using two vertices
 Foam::label Foam::cellCuts::findEdge
 (
     const label faceI,
@@ -507,7 +500,6 @@ Foam::label Foam::cellCuts::findEdge
 }
 
 
-// Check if there is a face on the cell on which all cuts are.
 Foam::label Foam::cellCuts::loopFace
 (
     const label cellI,
@@ -559,7 +551,6 @@ Foam::label Foam::cellCuts::loopFace
 }
 
 
-// From point go into connected face
 bool Foam::cellCuts::walkPoint
 (
     const label cellI,
@@ -615,7 +606,6 @@ bool Foam::cellCuts::walkPoint
 }
 
 
-// Cross cut (which is edge on faceI) onto next face
 bool Foam::cellCuts::crossEdge
 (
     const label cellI,
@@ -695,8 +685,6 @@ bool Foam::cellCuts::addCut
 }
 
 
-// Walk across faceI, storing cuts as you go. Returns last two cuts visisted.
-// Returns true if valid walk.
 bool Foam::cellCuts::walkFace
 (
     const label cellI,
@@ -787,8 +775,6 @@ bool Foam::cellCuts::walkFace
 
 
 
-// Walk across cuts (cut edges or cut vertices) of cell. Stops when hit cut
-// already visited. Returns true when loop of 3 or more vertices found.
 bool Foam::cellCuts::walkCell
 (
     const label cellI,
@@ -982,13 +968,14 @@ bool Foam::cellCuts::walkCell
 }
 
 
-// Determine for every cut cell the loop (= face) it is cut by. Done by starting
-// from a cut edge or cut vertex and walking across faces, from cut to cut,
-// until starting cut hit.
-// If multiple loops are possible across a cell circumference takes the first
-// one found.
 void Foam::cellCuts::calcCellLoops(const labelList& cutCells)
 {
+    // Determine for every cut cell the loop (= face) it is cut by. Done by
+    // starting from a cut edge or cut vertex and walking across faces, from
+    // cut to cut, until starting cut hit.
+    // If multiple loops are possible across a cell circumference takes the
+    // first one found.
+
     // Calculate cuts per face.
     const labelListList& allFaceCuts = faceCuts();
 
@@ -1139,8 +1126,6 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells)
 }
 
 
-// Walk unset edges of single cell from starting point and marks visited
-// edges and vertices with status.
 void Foam::cellCuts::walkEdges
 (
     const label cellI,
@@ -1178,7 +1163,6 @@ void Foam::cellCuts::walkEdges
 }
 
 
-// Invert anchor point selection.
 Foam::labelList Foam::cellCuts::nonAnchorPoints
 (
     const labelList& cellPoints,
@@ -1209,7 +1193,6 @@ Foam::labelList Foam::cellCuts::nonAnchorPoints
 }
 
 
-//- Check anchor points on 'outside' of loop
 bool Foam::cellCuts::loopAnchorConsistent
 (
     const label cellI,
@@ -1225,7 +1208,7 @@ bool Foam::cellCuts::loopAnchorConsistent
 
 
     // Get average position of anchor points.
-    vector avg(vector::zero);
+    vector avg(Zero);
 
     forAll(anchorPoints, ptI)
     {
@@ -1245,10 +1228,6 @@ bool Foam::cellCuts::loopAnchorConsistent
 }
 
 
-// Determines set of anchor points given a loop. The loop should split the
-// cell into (one or) two sets of vertices. The set of vertices that is
-// on the 'normal' side of the loop is the anchor set.
-// Returns true if valid set, false otherwise.
 bool Foam::cellCuts::calcAnchors
 (
     const label cellI,
@@ -1612,7 +1591,6 @@ Foam::pointField Foam::cellCuts::loopPoints
 }
 
 
-// Returns weights of loop. Inverse of loopPoints.
 Foam::scalarField Foam::cellCuts::loopWeights(const labelList& loop) const
 {
     scalarField weights(loop.size());
@@ -1636,7 +1614,6 @@ Foam::scalarField Foam::cellCuts::loopWeights(const labelList& loop) const
 }
 
 
-// Check if cut edges in loop are compatible with ones in edgeIsCut_
 bool Foam::cellCuts::validEdgeLoop
 (
     const labelList& loop,
@@ -1672,15 +1649,16 @@ bool Foam::cellCuts::validEdgeLoop
 }
 
 
-// Counts cuts on face. Includes cuts through vertices and through edges.
-// Assumes that if edge is cut both in edgeIsCut and in loop that the position
-// of the cut is the same.
 Foam::label Foam::cellCuts::countFaceCuts
 (
     const label faceI,
     const labelList& loop
 ) const
 {
+    // Includes cuts through vertices and through edges.
+    // Assumes that if edge is cut both in edgeIsCut and in loop that the
+    // position of the cut is the same.
+
     label nCuts = 0;
 
     // Count cut vertices
@@ -1723,8 +1701,6 @@ Foam::label Foam::cellCuts::countFaceCuts
 }
 
 
-// Determine compatibility of loop with existing cut pattern. Does not use
-// cut-addressing (faceCuts_, cutCuts_)
 bool Foam::cellCuts::conservativeValidLoop
 (
     const label cellI,
@@ -1816,10 +1792,6 @@ bool Foam::cellCuts::conservativeValidLoop
 }
 
 
-// Determine compatibility of loop with existing cut pattern. Does not use
-// derived cut-addressing (faceCuts), only pointIsCut, edgeIsCut.
-// Adds any cross-cuts found to newFaceSplitCut and sets cell points on
-// one side of the loop in anchorPoints.
 bool Foam::cellCuts::validLoop
 (
     const label cellI,
@@ -1830,6 +1802,11 @@ bool Foam::cellCuts::validLoop
     labelList& anchorPoints
 ) const
 {
+    // Determine compatibility of loop with existing cut pattern. Does not use
+    // derived cut-addressing (faceCuts), only pointIsCut, edgeIsCut.
+    // Adds any cross-cuts found to newFaceSplitCut and sets cell points on
+    // one side of the loop in anchorPoints.
+
     if (loop.size() < 2)
     {
         return false;
@@ -1841,6 +1818,7 @@ bool Foam::cellCuts::validLoop
         // cut per face is allowed.
         if (!conservativeValidLoop(cellI, loop))
         {
+            Info << "Invalid conservative loop: " << loop << endl;
             return  false;
         }
     }
@@ -1984,9 +1962,6 @@ bool Foam::cellCuts::validLoop
 }
 
 
-// Update basic cut information (pointIsCut, edgeIsCut) from cellLoops.
-// Assumes cellLoops_ and edgeWeight_ already set and consistent.
-// Does not use any other information.
 void Foam::cellCuts::setFromCellLoops()
 {
     // 'Uncut' edges/vertices that are not used in loops.
@@ -2071,8 +2046,6 @@ void Foam::cellCuts::setFromCellLoops()
 }
 
 
-// Upate basic cut information from single cellLoop. Returns true if loop
-// was valid.
 bool Foam::cellCuts::setFromCellLoop
 (
     const label cellI,
@@ -2080,6 +2053,9 @@ bool Foam::cellCuts::setFromCellLoop
     const scalarField& loopWeights
 )
 {
+    // Update basic cut information from single cellLoop. Returns true if loop
+    // was valid.
+
     // Dump loop for debugging.
     if (debug)
     {
@@ -2169,8 +2145,6 @@ bool Foam::cellCuts::setFromCellLoop
 }
 
 
-// Update basic cut information from cellLoops. Checks for consistency with
-// existing cut pattern.
 void Foam::cellCuts::setFromCellLoops
 (
     const labelList& cellLabels,
@@ -2207,8 +2181,6 @@ void Foam::cellCuts::setFromCellLoops
 }
 
 
-// Cut cells and update basic cut information from cellLoops. Checks each loop
-// for consistency with existing cut pattern.
 void Foam::cellCuts::setFromCellCutter
 (
     const cellLooper& cellCutter,
@@ -2266,6 +2238,17 @@ void Foam::cellCuts::setFromCellCutter
             {
                 cellLoops_[cellI].setSize(0);
 
+                WarningInFunction
+                    << "Found loop on cell " << cellI
+                    << " that resulted in an unexpected bad cut." << nl
+                    << "    Suggestions:" << nl
+                    << "      - Turn on the debug switch for 'cellCuts' to get"
+                    << " geometry files that identify this cell." << nl
+                    << "      - Also keep in mind to check the defined"
+                    << " reference directions, as these are most likely the"
+                    << " origin of the problem."
+                    << nl << endl;
+
                 // Discarded by validLoop
                 if (debug)
                 {
@@ -2324,7 +2307,6 @@ void Foam::cellCuts::setFromCellCutter
 }
 
 
-// Same as one before but cut plane prescribed (instead of just normal)
 void Foam::cellCuts::setFromCellCutter
 (
     const cellLooper& cellCutter,
@@ -2436,7 +2418,6 @@ void Foam::cellCuts::setFromCellCutter
 }
 
 
-// Set orientation of loops
 void Foam::cellCuts::orientPlanesAndLoops()
 {
     // Determine anchorPoints if not yet done by validLoop.
@@ -2493,7 +2474,6 @@ void Foam::cellCuts::orientPlanesAndLoops()
 }
 
 
-// Do all: calculate addressing, calculate loops splitting cells
 void Foam::cellCuts::calcLoopsAndAddressing(const labelList& cutCells)
 {
     // Sanity check on weights
@@ -2682,7 +2662,6 @@ void Foam::cellCuts::check() const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from cells to cut and pattern of cuts
 Foam::cellCuts::cellCuts
 (
     const polyMesh& mesh,
@@ -2727,8 +2706,6 @@ Foam::cellCuts::cellCuts
 }
 
 
-// Construct from pattern of cuts. Finds out itself which cells are cut.
-// (can go wrong if e.g. all neighbours of cell are refined)
 Foam::cellCuts::cellCuts
 (
     const polyMesh& mesh,
@@ -2747,6 +2724,9 @@ Foam::cellCuts::cellCuts
     nLoops_(-1),
     cellAnchorPoints_(mesh.nCells())
 {
+    // Construct from pattern of cuts. Finds out itself which cells are cut.
+    // (can go wrong if e.g. all neighbours of cell are refined)
+
     if (debug)
     {
         Pout<< "cellCuts : constructor from cellLoops" << endl;
@@ -2771,8 +2751,6 @@ Foam::cellCuts::cellCuts
 }
 
 
-// Construct from complete cellLoops. Assumes correct cut pattern.
-// Only constructs cut-cut addressing and cellAnchorPoints
 Foam::cellCuts::cellCuts
 (
     const polyMesh& mesh,
@@ -2817,7 +2795,6 @@ Foam::cellCuts::cellCuts
 }
 
 
-// Construct from list of cells to cut and cell cutter.
 Foam::cellCuts::cellCuts
 (
     const polyMesh& mesh,
@@ -2861,7 +2838,6 @@ Foam::cellCuts::cellCuts
 }
 
 
-// Construct from list of cells to cut, plane to cut with and cell cutter.
 Foam::cellCuts::cellCuts
 (
     const polyMesh& mesh,
@@ -2908,7 +2884,6 @@ Foam::cellCuts::cellCuts
 }
 
 
-// Construct from components
 Foam::cellCuts::cellCuts
 (
     const polyMesh& mesh,
@@ -2980,7 +2955,6 @@ Foam::pointField Foam::cellCuts::loopPoints(const label cellI) const
 }
 
 
-// Flip loop for cell
 void Foam::cellCuts::flip(const label cellI)
 {
     labelList& loop = cellLoops_[cellI];
@@ -2998,7 +2972,6 @@ void Foam::cellCuts::flip(const label cellI)
 }
 
 
-// Flip loop only
 void Foam::cellCuts::flipLoopOnly(const label cellI)
 {
     labelList& loop = cellLoops_[cellI];
diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.H b/src/dynamicMesh/meshCut/cellCuts/cellCuts.H
index 4fb1173db620647dc44ee41203cd10ec8ce0f99a..30b1528b22a081e8d4f2ea41f612f4c6c5de911f 100644
--- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.H
+++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -277,6 +277,7 @@ class cellCuts
 
             //- Walk across faceI following cuts, starting at cut. Stores cuts
             //  visited
+            // Returns true if valid walk.
             bool walkFace
             (
                 const label cellI,
@@ -374,8 +375,8 @@ class cellCuts
                 const labelList& loop
             ) const;
 
-            //- Determines if loop through cellI consistent with existing
-            //  pattern.
+            //- Determine compatibility of loop with existing cut pattern.
+            //  Does not use cut-addressing (faceCuts_, cutCuts_)
             bool conservativeValidLoop
             (
                 const label cellI,
@@ -395,8 +396,9 @@ class cellCuts
                 labelList& anchorPoints
             ) const;
 
-            //- Update basic cut information from cellLoops. Assumes cellLoops_
-            //  already set and consistent.
+            //- Update basic cut information from cellLoops.
+            //  Assumes cellLoops_ and edgeWeight_ already set and consistent.
+            //  Does not use any other information.
             void setFromCellLoops();
 
             //- Update basic cut information for single cell from cellLoop.
@@ -424,7 +426,8 @@ class cellCuts
                 const List<refineCell>& refCells
             );
 
-            //- Same as above but now cut with prescribed plane.
+            //- Same as above but now cut with prescribed plane (instead of
+            //  just normal).
             void setFromCellCutter
             (
                 const cellLooper&,
@@ -436,6 +439,7 @@ class cellCuts
             void orientPlanesAndLoops();
 
             //- Top level driver: adressing calculation and loop detection
+            //  (loops splitting cells).
             void calcLoopsAndAddressing(const labelList& cutCells);
 
             //- Check various consistencies.
diff --git a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C
index 2b1310ab9136de27c39cbaef404b47b2443b2227..230948a42bae2463c6f8037e8338e61e133c53cb 100644
--- a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C
+++ b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -384,7 +384,7 @@ bool Foam::geomCellLooper::cut
 
     // Get points on loop and centre of loop
     pointField loopPoints(localLoop.size());
-    point ctr(vector::zero);
+    point ctr(Zero);
 
     forAll(localLoop, i)
     {
diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H
index c2c77f7384ae468ec84e72a7e80bce20d0e375ee..d1c51df3f15fc6d66f394ab2e17320b163e9ea44 100644
--- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H
+++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ License
 inline Foam::directionInfo::directionInfo()
 :
     index_(-3),
-    n_(vector::zero)
+    n_(Zero)
 {}
 
 
diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C
index d2b6aa683e23301c110a4d9e067fdbaa243c5d2c..c217f30042f54ab4d2cffea0f753f7b26833bf18 100644
--- a/src/dynamicMesh/meshCut/directions/directions.C
+++ b/src/dynamicMesh/meshCut/directions/directions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,13 +57,12 @@ const Foam::NamedEnum<Foam::directions::directionType, 3>
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// For debugging
 void Foam::directions::writeOBJ(Ostream& os, const point& pt)
 {
     os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
 }
 
-// For debugging
+
 void Foam::directions::writeOBJ
 (
     Ostream& os,
@@ -81,7 +80,6 @@ void Foam::directions::writeOBJ
 }
 
 
-// Dump to file.
 void Foam::directions::writeOBJ
 (
     const fileName& fName,
@@ -137,7 +135,6 @@ void Foam::directions::check2D
 }
 
 
-// Get direction on all cells
 Foam::vectorField Foam::directions::propagateDirection
 (
     const polyMesh& mesh,
@@ -283,34 +280,35 @@ Foam::directions::directions
     List<vectorField>(wordList(dict.lookup("directions")).size())
 {
     const wordList wantedDirs(dict.lookup("directions"));
+    const word coordSystem(dict.lookup("coordinateSystem"));
 
     bool wantNormal = false;
     bool wantTan1 = false;
     bool wantTan2 = false;
+    label nDirs = 0;
 
-    forAll(wantedDirs, i)
+    if (coordSystem != "fieldBased")
     {
-        directionType wantedDir = directionTypeNames_[wantedDirs[i]];
-
-        if (wantedDir == NORMAL)
+        forAll(wantedDirs, i)
         {
-            wantNormal = true;
-        }
-        else if (wantedDir == TAN1)
-        {
-            wantTan1 = true;
-        }
-        else if (wantedDir == TAN2)
-        {
-            wantTan2 = true;
+            directionType wantedDir = directionTypeNames_[wantedDirs[i]];
+
+            if (wantedDir == NORMAL)
+            {
+                wantNormal = true;
+            }
+            else if (wantedDir == TAN1)
+            {
+                wantTan1 = true;
+            }
+            else if (wantedDir == TAN2)
+            {
+                wantTan2 = true;
+            }
         }
     }
 
 
-    label nDirs = 0;
-
-    const word coordSystem(dict.lookup("coordinateSystem"));
-
     if (coordSystem == "global")
     {
         const dictionary& globalDict = dict.subDict("globalCoeffs");
@@ -424,12 +422,29 @@ Foam::directions::directions
             this->operator[](nDirs++) = tan2Dirs;
         }
     }
+    else if (coordSystem == "fieldBased")
+    {
+        forAll(wantedDirs, i)
+        {
+            operator[](nDirs++) =
+                vectorIOField
+                (
+                    IOobject
+                    (
+                        mesh.instance()/wantedDirs[i],
+                        mesh,
+                        IOobject::MUST_READ,
+                        IOobject::NO_WRITE
+                    )
+                );
+        }
+    }
     else
     {
         FatalErrorInFunction
             << "Unknown coordinate system "
             << coordSystem << endl
-            << "Known types are global and patchLocal"
+            << "Known types are global, patchLocal and fieldBased"
             << exit(FatalError);
     }
 }
diff --git a/src/dynamicMesh/meshCut/directions/directions.H b/src/dynamicMesh/meshCut/directions/directions.H
index 8fc4d26aece0785573c42573d4894212ec939d69..0a16672e568073c6fbfc8b5d15a21c83ca7bdd84 100644
--- a/src/dynamicMesh/meshCut/directions/directions.H
+++ b/src/dynamicMesh/meshCut/directions/directions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,8 @@ Description
 
     Used in splitting cells.
     Either all cells have similar refinement direction ('global') or
-    direction is dependent on local cell geometry. Controlled by dictionary.
+    direction is dependent on local cell geometry, or loads selected fields
+    by name ('fieldBased'). Controlled by dictionary.
 
 SourceFiles
     directions.C
@@ -65,7 +66,9 @@ class directions
 :
     public List<vectorField>
 {
+
 public:
+
     // Data types
 
         //- Enumeration listing the possible coordinate directions.
@@ -76,6 +79,7 @@ public:
             NORMAL
         };
 
+
 private:
 
         static const NamedEnum<directionType, 3> directionTypeNames_;
@@ -83,7 +87,6 @@ private:
 
     // Private Member Functions
 
-
         //- For debugging. Write point coordinate.
         static void writeOBJ(Ostream& os, const point& pt);
 
@@ -141,7 +144,6 @@ public:
             const dictionary& dict,
             const twoDPointCorrector* correct2DPtr = NULL
         );
-
 };
 
 
diff --git a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C
index 1e81226a4b8cbc8a58b6efa1b3980958436184d9..a844376723ed1bd2e2524de557d8cb8a25345d49 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C
+++ b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -405,7 +405,7 @@ Foam::boundaryCutter::~boundaryCutter()
 void Foam::boundaryCutter::setRefinement
 (
     const Map<point>& pointToPos,
-    const Map<List<point> >& edgeToCuts,
+    const Map<List<point>>& edgeToCuts,
     const Map<labelPair>& faceToSplit,
     const Map<point>& faceToFeaturePoint,
     polyTopoChange& meshMod
@@ -446,7 +446,7 @@ void Foam::boundaryCutter::setRefinement
     // Map from edge label to sorted list of points
     Map<labelList> edgeToAddedPoints(edgeToCuts.size());
 
-    forAllConstIter(Map<List<point> >, edgeToCuts, iter)
+    forAllConstIter(Map<List<point>>, edgeToCuts, iter)
     {
         label edgeI = iter.key();
 
@@ -869,12 +869,12 @@ void Foam::boundaryCutter::updateMesh(const mapPolyMesh& morphMap)
 
     {
         // Create copy since we're deleting entries
-        HashTable<labelList, edge, Hash<edge> >
+        HashTable<labelList, edge, Hash<edge>>
             newEdgeAddedPoints(edgeAddedPoints_.size());
 
         for
         (
-            HashTable<labelList, edge, Hash<edge> >::const_iterator iter =
+            HashTable<labelList, edge, Hash<edge>>::const_iterator iter =
                 edgeAddedPoints_.begin();
             iter != edgeAddedPoints_.end();
             ++iter
diff --git a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H
index 6f45ad5dc8deee0fa8c656a4788524b345bdba8f..11891488232820b3e71d139249207b3a9f61ef11 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H
+++ b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ class boundaryCutter
         const polyMesh& mesh_;
 
         //- Per edge sorted (start to end) list of points added.
-        HashTable<labelList, edge, Hash<edge> > edgeAddedPoints_;
+        HashTable<labelList, edge, Hash<edge>> edgeAddedPoints_;
 
         //- Per face the mid point added.
         Map<label> faceAddedPoint_;
@@ -146,7 +146,7 @@ public:
             void setRefinement
             (
                 const Map<point>& pointToPos,
-                const Map<List<point> >& edgeToCuts,
+                const Map<List<point>>& edgeToCuts,
                 const Map<labelPair>& faceToSplit,
                 const Map<point>& faceToFeaturePoint,
                 polyTopoChange& meshMod
@@ -159,7 +159,7 @@ public:
         // Access
 
             //- Per edge a sorted list (start to end) of added points.
-            const HashTable<labelList, edge, Hash<edge> >& edgeAddedPoints()
+            const HashTable<labelList, edge, Hash<edge>>& edgeAddedPoints()
              const
             {
                 return edgeAddedPoints_;
diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C
index a3b768e9cde0839132887b7e3ca0cadc32faf0c9..4aa9b2f99daa81928b20c340570a543c7a5fb832 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C
+++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(meshCutAndRemove, 0);
+    defineTypeNameAndDebug(meshCutAndRemove, 0);
 }
 
 
@@ -89,7 +89,6 @@ bool Foam::meshCutAndRemove::isIn
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Returns the cell in cellLabels that is cut. Or -1.
 Foam::label Foam::meshCutAndRemove::findCutCell
 (
     const cellCuts& cuts,
@@ -109,10 +108,6 @@ Foam::label Foam::meshCutAndRemove::findCutCell
 }
 
 
-//- Returns first pointI in pointLabels that uses an internal
-//  face. Used to find point to inflate cell/face from (has to be
-//  connected to internal face). Returns -1 (so inflate from nothing) if
-//  none found.
 Foam::label Foam::meshCutAndRemove::findInternalFacePoint
 (
     const labelList& pointLabels
@@ -145,8 +140,6 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint
 }
 
 
-// Find point on face that is part of original mesh and that is point connected
-// to the patch
 Foam::label Foam::meshCutAndRemove::findPatchFacePoint
 (
     const face& f,
@@ -177,8 +170,6 @@ Foam::label Foam::meshCutAndRemove::findPatchFacePoint
 }
 
 
-// Get new owner and neighbour of face. Checks anchor points to see if
-// cells have been removed.
 void Foam::meshCutAndRemove::faceCells
 (
     const cellCuts& cuts,
@@ -244,7 +235,6 @@ void Foam::meshCutAndRemove::getZoneInfo
 }
 
 
-// Adds a face from point.
 void Foam::meshCutAndRemove::addFace
 (
     polyTopoChange& meshMod,
@@ -407,7 +397,6 @@ void Foam::meshCutAndRemove::modFace
 }
 
 
-// Copies face starting from startFp up to and including endFp.
 void Foam::meshCutAndRemove::copyFace
 (
     const face& f,
@@ -474,8 +463,6 @@ void Foam::meshCutAndRemove::splitFace
 }
 
 
-// Adds additional vertices (from edge cutting) to face. Used for faces which
-// are not split but still might use edge that has been cut.
 Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label faceI) const
 {
     const face& f = mesh().faces()[faceI];
@@ -492,7 +479,7 @@ Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label faceI) const
         // Check if edge has been cut.
         label fp1 = f.fcIndex(fp);
 
-        HashTable<label, edge, Hash<edge> >::const_iterator fnd =
+        HashTable<label, edge, Hash<edge>>::const_iterator fnd =
             addedPoints_.find(edge(f[fp], f[fp1]));
 
         if (fnd != addedPoints_.end())
@@ -554,7 +541,7 @@ Foam::face Foam::meshCutAndRemove::loopToFace
                 if (edgeI != -1)
                 {
                     // Existing edge. Insert split-edge point if any.
-                    HashTable<label, edge, Hash<edge> >::const_iterator fnd =
+                    HashTable<label, edge, Hash<edge>>::const_iterator fnd =
                         addedPoints_.find(mesh().edges()[edgeI]);
 
                     if (fnd != addedPoints_.end())
@@ -1315,11 +1302,11 @@ void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map)
     }
 
     {
-        HashTable<label, edge, Hash<edge> > newAddedPoints(addedPoints_.size());
+        HashTable<label, edge, Hash<edge>> newAddedPoints(addedPoints_.size());
 
         for
         (
-            HashTable<label, edge, Hash<edge> >::const_iterator iter =
+            HashTable<label, edge, Hash<edge>>::const_iterator iter =
                 addedPoints_.begin();
             iter != addedPoints_.end();
             ++iter
diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H
index 57fe27af79beffcc27147b058c69b1e5954224bf..571349c17e59ad6c985c8076870aec1fa8004074 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H
+++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,7 +70,7 @@ class meshCutAndRemove
 
         //- Points added in last setRefinement. Per split edge label of added
         //  point
-        HashTable<label, edge, Hash<edge> > addedPoints_;
+        HashTable<label, edge, Hash<edge>> addedPoints_;
 
 
     // Private Static Functions
@@ -225,7 +225,7 @@ public:
             //- Points added. Per split edge label of added point.
             //  (note: fairly useless across topology changes since one of the
             //  points of the edge will probably disappear)
-            const HashTable<label, edge, Hash<edge> >& addedPoints() const
+            const HashTable<label, edge, Hash<edge>>& addedPoints() const
             {
                 return addedPoints_;
             }
diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C
index 5c3f0e61a6c1131eff8a94f9947f6b343c9c2983..a57bfe72f5ec815c127c0e92b03829c9da3ef3aa 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C
+++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -424,7 +424,7 @@ Foam::face Foam::meshCutter::addEdgeCutsToFace(const label faceI) const
         // Check if edge has been cut.
         label fp1 = f.fcIndex(fp);
 
-        HashTable<label, edge, Hash<edge> >::const_iterator fnd =
+        HashTable<label, edge, Hash<edge>>::const_iterator fnd =
             addedPoints_.find(edge(f[fp], f[fp1]));
 
         if (fnd != addedPoints_.end())
@@ -483,7 +483,7 @@ Foam::face Foam::meshCutter::loopToFace
                 if (edgeI != -1)
                 {
                     // Existing edge. Insert split-edge point if any.
-                    HashTable<label, edge, Hash<edge> >::const_iterator fnd =
+                    HashTable<label, edge, Hash<edge>>::const_iterator fnd =
                         addedPoints_.find(mesh().edges()[edgeI]);
 
                     if (fnd != addedPoints_.end())
@@ -1043,11 +1043,11 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
     }
 
     {
-        HashTable<label, edge, Hash<edge> > newAddedPoints(addedPoints_.size());
+        HashTable<label, edge, Hash<edge>> newAddedPoints(addedPoints_.size());
 
         for
         (
-            HashTable<label, edge, Hash<edge> >::const_iterator iter =
+            HashTable<label, edge, Hash<edge>>::const_iterator iter =
                 addedPoints_.begin();
             iter != addedPoints_.end();
             ++iter
diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H
index 9c2f47911b908456f8420740561feeda0aadfbbf..2fc84062bada7178a543508b870d4cc0999b1c08 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H
+++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -148,7 +148,7 @@ class meshCutter
 
         //- Points added in last setRefinement. Per split edge label of added
         //  point
-        HashTable<label, edge, Hash<edge> > addedPoints_;
+        HashTable<label, edge, Hash<edge>> addedPoints_;
 
 
     // Private Static Functions
@@ -307,7 +307,7 @@ public:
             }
 
             //- Points added. Per split edge label of added point
-            const HashTable<label, edge, Hash<edge> >& addedPoints() const
+            const HashTable<label, edge, Hash<edge>>& addedPoints() const
             {
                 return addedPoints_;
             }
diff --git a/src/dynamicMesh/meshCut/meshModifiers/refinementIterator/refinementIterator.C b/src/dynamicMesh/meshCut/meshModifiers/refinementIterator/refinementIterator.C
index feec8ba08c2093865ef1f192467de305213fd7df..27ee747ae8d405ca6f6e15bd2ce86d6a5484f26a 100644
--- a/src/dynamicMesh/meshCut/meshModifiers/refinementIterator/refinementIterator.C
+++ b/src/dynamicMesh/meshCut/meshModifiers/refinementIterator/refinementIterator.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,10 +126,10 @@ Foam::Map<Foam::label> Foam::refinementIterator::setRefinement
                 OFstream cutsStream(cutsFile);
 
 
-                labelList refCells(currentRefCells.size());
+                labelList refCellsDebug(currentRefCells.size());
                 forAll(currentRefCells, i)
                 {
-                    refCells[i] = currentRefCells[i].cellNo();
+                    refCellsDebug[i] = currentRefCells[i].cellNo();
                 }
                 meshTools::writeOBJ
                 (
@@ -137,7 +137,7 @@ Foam::Map<Foam::label> Foam::refinementIterator::setRefinement
                     mesh().cells(),
                     mesh().faces(),
                     mesh().points(),
-                    refCells
+                    refCellsDebug
                 );
             }
 
diff --git a/src/dynamicMesh/meshCut/refineCell/refineCell.C b/src/dynamicMesh/meshCut/refineCell/refineCell.C
index 5517d34a6674c7fa933a970c0a4d61eff5c4e492..bcc88ca8e13761c8013c7a1a66f2757e1f774f13 100644
--- a/src/dynamicMesh/meshCut/refineCell/refineCell.C
+++ b/src/dynamicMesh/meshCut/refineCell/refineCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 Foam::refineCell::refineCell()
 :
     cellNo_(-1),
-    direction_(vector::zero)
+    direction_(Zero)
 {}
 
 
diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C
index 1e2354f080fcd6c4124bf04456a257f3b6cfefcc..a883cd438bb65716e5654d78701b800e25f446fe 100644
--- a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C
+++ b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,14 +29,11 @@ License
 #include "wallNormalInfo.H"
 #include "OFstream.H"
 
-
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-defineTypeNameAndDebug(wallLayerCells, 0);
-
+    defineTypeNameAndDebug(wallLayerCells, 0);
 }
 
 
@@ -64,7 +61,6 @@ bool Foam::wallLayerCells::usesCoupledPatch(const label cellI) const
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::wallLayerCells::wallLayerCells
 (
     const polyMesh& mesh,
@@ -160,8 +156,7 @@ Foam::wallLayerCells::wallLayerCells
 
     if (debug)
     {
-        Info<< "wallLayerCells::getRefinement : dumping selected faces to "
-            << "selectedFaces.obj" << endl;
+        InfoInFunction << "Dumping selected faces to selectedFaces.obj" << endl;
 
         OFstream fcStream("selectedFaces.obj");
 
diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C
index 9c19ee6102c6ab7e088a2245832de9bfd87e6514..6cd22195e59ad568172d266e27982007133e2e45 100644
--- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C
+++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,7 +119,7 @@ Foam::tmp<Foam::scalarField> Foam::motionSmootherAlgo::calcEdgeWeights
     const edgeList& edges = mesh_.edges();
 
     tmp<scalarField> twght(new scalarField(edges.size()));
-    scalarField& wght = twght();
+    scalarField& wght = twght.ref();
 
     forAll(edges, edgeI)
     {
@@ -525,7 +525,7 @@ void Foam::motionSmootherAlgo::setDisplacement
             label pointI = cppMeshPoints[i];
             if (isPatchPoint[pointI])
             {
-                displacement[pointI] = vector::zero;
+                displacement[pointI] = Zero;
             }
         }
     }
@@ -789,7 +789,7 @@ Foam::tmp<Foam::pointField> Foam::motionSmootherAlgo::curPoints() const
         actualPatchFieldTypes.setSize(pfld.size());
         forAll(pfld, patchI)
         {
-            if (isA<fixedValuePointPatchField<vector> >(pfld[patchI]))
+            if (isA<fixedValuePointPatchField<vector>>(pfld[patchI]))
             {
                 // Get rid of funny
                 actualPatchFieldTypes[patchI] =
@@ -834,7 +834,7 @@ Foam::tmp<Foam::pointField> Foam::motionSmootherAlgo::curPoints() const
     tmp<pointField> tnewPoints(oldPoints_ + totalDisplacement.internalField());
 
     // Correct for 2-D motion
-    modifyMotionPoints(tnewPoints());
+    modifyMotionPoints(tnewPoints.ref());
 
     return tnewPoints;
 }
diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H
index 4cc17efdcd2ea67eb1fa064f928ecc0b14e6319a..0373355f67e23a496775d39d2032890b8237c5e9 100644
--- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H
+++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -172,7 +172,7 @@ class motionSmootherAlgo
 
         //- Average of connected points.
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > avg
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> avg
         (
             const GeometricField<Type, pointPatchField, pointMesh>& fld,
             const scalarField& edgeWeight
@@ -180,7 +180,7 @@ class motionSmootherAlgo
 
         //- Average postion of connected points.
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > avgPositions
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> avgPositions
         (
             const GeometricField<Type, pointPatchField, pointMesh>& fld,
             const scalarField& edgeWeight
@@ -521,7 +521,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "motionSmootherAlgoTemplates.C"
+    #include "motionSmootherAlgoTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C
index abd1d1f04b1d444b30489a62e3a36f5d8cc732a4..683d42f75fad6befdde1848ec4bc0c8b2cc7e6f2 100644
--- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C
+++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,16 +133,15 @@ void Foam::motionSmootherAlgo::checkConstraints
 }
 
 
-// Average of connected points.
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
 Foam::motionSmootherAlgo::avg
 (
     const GeometricField<Type, pointPatchField, pointMesh>& fld,
     const scalarField& edgeWeight
 ) const
 {
-    tmp<GeometricField<Type, pointPatchField, pointMesh> > tres
+    tmp<GeometricField<Type, pointPatchField, pointMesh>> tres
     (
         new GeometricField<Type, pointPatchField, pointMesh>
         (
@@ -156,10 +155,10 @@ Foam::motionSmootherAlgo::avg
                 false
             ),
             fld.mesh(),
-            dimensioned<Type>("zero", fld.dimensions(), pTraits<Type>::zero)
+            dimensioned<Type>("zero", fld.dimensions(), Zero)
         )
     );
-    GeometricField<Type, pointPatchField, pointMesh>& res = tres();
+    GeometricField<Type, pointPatchField, pointMesh>& res = tres.ref();
 
     const polyMesh& mesh = fld.mesh()();
 
@@ -198,7 +197,7 @@ Foam::motionSmootherAlgo::avg
         mesh,
         res,
         plusEqOp<Type>(),
-        pTraits<Type>::zero     // null value
+        Type(Zero)     // null value
     );
     syncTools::syncPointList
     (
@@ -232,7 +231,6 @@ Foam::motionSmootherAlgo::avg
 }
 
 
-// smooth field (point-jacobi)
 template<class Type>
 void Foam::motionSmootherAlgo::smooth
 (
@@ -257,7 +255,6 @@ void Foam::motionSmootherAlgo::smooth
 }
 
 
-//- Test synchronisation of generic field (not positions!) on points
 template<class Type, class CombineOp>
 void Foam::motionSmootherAlgo::testSyncField
 (
diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C
index b583589ecf88c53dbe8984c48029fe7f5743af3b..c90a197ce70ee88a603973e1935cf89f171a16cc 100644
--- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C
+++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -65,9 +65,9 @@ void Foam::polyMeshGeometry::updateFaceCentresAndAreas
         }
         else
         {
-            vector sumN = vector::zero;
+            vector sumN = Zero;
             scalar sumA = 0.0;
-            vector sumAc = vector::zero;
+            vector sumAc = Zero;
 
             point fCentre = p[f[0]];
             for (label pi = 1; pi < nPoints; pi++)
@@ -107,7 +107,7 @@ void Foam::polyMeshGeometry::updateCellCentresAndVols
     const cellList& cells = mesh().cells();
 
     // Clear the fields for accumulation
-    UIndirectList<vector>(cellCentres_, changedCells) = vector::zero;
+    UIndirectList<vector>(cellCentres_, changedCells) = Zero;
     UIndirectList<scalar>(cellVolumes_, changedCells) = 0.0;
 
 
@@ -115,12 +115,10 @@ void Foam::polyMeshGeometry::updateCellCentresAndVols
     forAll(changedCells, changedCellI)
     {
         const label cellI(changedCells[changedCellI]);
-
         const labelList& cFaces(cells[cellI]);
 
-
         // Estimate the cell centre and bounding box using the face centres
-        vector cEst = vector::zero;
+        vector cEst(Zero);
         boundBox bb(boundBox::invertedBox);
 
         forAll(cFaces, cFaceI)
@@ -343,7 +341,6 @@ Foam::polyMeshGeometry::polyMeshGeometry(const polyMesh& mesh)
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-//- Take over properties from mesh
 void Foam::polyMeshGeometry::correct()
 {
     faceAreas_ = mesh_.faceAreas();
@@ -353,7 +350,6 @@ void Foam::polyMeshGeometry::correct()
 }
 
 
-//- Recalculate on selected faces
 void Foam::polyMeshGeometry::correct
 (
     const pointField& p,
@@ -1693,7 +1689,7 @@ bool Foam::polyMeshGeometry::checkFaceTwist
 
         if (f.size() > 3)
         {
-            vector nf(vector::zero);
+            vector nf(Zero);
 
             if (mesh.isInternalFace(faceI))
             {
@@ -2118,7 +2114,7 @@ bool Foam::polyMeshGeometry::checkCellDeterminant
     {
         const cell& cFaces = cells[affectedCells[i]];
 
-        tensor areaSum(tensor::zero);
+        tensor areaSum(Zero);
         scalar magAreaSum = 0;
 
         forAll(cFaces, cFaceI)
diff --git a/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C b/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C
index b6fae65ba8543842c62be725008b74c1e389189e..fc7d6e7c30f0f39d2bc1f9177d9746a42d4a1596 100644
--- a/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C
+++ b/src/dynamicMesh/motionSolver/velocityDisplacement/velocityDisplacementMotionSolver.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -57,7 +57,7 @@ Foam::velocityDisplacementMotionSolver::pointDisplacementBoundaryTypes() const
 
     forAll(pmUbf, patchI)
     {
-        if (isA<fixedValuePointPatchField<vector> >(pmUbf[patchI]))
+        if (isA<fixedValuePointPatchField<vector>>(pmUbf[patchI]))
         {
             cmUbf[patchI] = fixedValuePointPatchField<vector>::typeName;
         }
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.C
similarity index 95%
rename from src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C
rename to src/dynamicMesh/pointPatchDist/externalPointEdgePoint.C
index 8ed6f62005c59fe26693c288f878a2267d597615..c3473844d641e2271d88d89a4baf6bcc6fa82c4c 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C
+++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.H b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H
similarity index 99%
rename from src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.H
rename to src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H
index 85871fc5bfc0a4d419ae23bd2d82a385fde8474a..cabedb0277f8b0d998d58c286a8f6b3f506ac758 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePoint.H
+++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePoint.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePointI.H b/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H
similarity index 98%
rename from src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePointI.H
rename to src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H
index 44ee302e4c7b05b4a5e4722087d70f75a8482495..5927de0776fc87efaec55420cbed1518de2de83c 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/externalPointEdgePointI.H
+++ b/src/dynamicMesh/pointPatchDist/externalPointEdgePointI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.C b/src/dynamicMesh/pointPatchDist/pointPatchDist.C
similarity index 98%
rename from src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.C
rename to src/dynamicMesh/pointPatchDist/pointPatchDist.C
index 7a1eb25a4ebc071a4c1e2d33c8aa165fa1ff65a6..7f2b0e54cc6ef5db56e3043dc720134bcb9bdba1 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.C
+++ b/src/dynamicMesh/pointPatchDist/pointPatchDist.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.H b/src/dynamicMesh/pointPatchDist/pointPatchDist.H
similarity index 97%
rename from src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.H
rename to src/dynamicMesh/pointPatchDist/pointPatchDist.H
index 7d15d30fff54adc10101376a2edaba19ed0bbd6d..6a806fa46d582633177652f9bbf218e36be45075 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/pointPatchDist.H
+++ b/src/dynamicMesh/pointPatchDist/pointPatchDist.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
index 02efdeabf00c5abc06fc0d3c46e4a654d07311f4..8be41984af67df75495fdb3d84355516603c8a67 100644
--- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
+++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,15 +36,13 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(faceCoupleInfo, 0);
-
-const scalar faceCoupleInfo::angleTol_ = 1e-3;
+    defineTypeNameAndDebug(faceCoupleInfo, 0);
+    const scalar faceCoupleInfo::angleTol_ = 1e-3;
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-//- Write edges
 void Foam::faceCoupleInfo::writeOBJ
 (
     const fileName& fName,
@@ -97,7 +95,6 @@ void Foam::faceCoupleInfo::writeOBJ
 }
 
 
-//- Writes edges.
 void Foam::faceCoupleInfo::writeOBJ
 (
     const fileName& fName,
@@ -122,7 +119,6 @@ void Foam::faceCoupleInfo::writeOBJ
 }
 
 
-//- Writes face and point connectivity as .obj files.
 void Foam::faceCoupleInfo::writePointsFaces() const
 {
     const indirectPrimitivePatch& m = masterPatch();
@@ -188,7 +184,7 @@ void Foam::faceCoupleInfo::writePointsFaces() const
                     << " at position " << c[cutFaceI].centre(c.points())
                     << endl;
 
-                equivMasterFaces[cutFaceI] = vector::zero;
+                equivMasterFaces[cutFaceI] = Zero;
             }
         }
 
@@ -303,8 +299,6 @@ void Foam::faceCoupleInfo::writeEdges
 }
 
 
-// Given an edgelist and a map for the points on the edges it tries to find
-// the corresponding patch edges.
 Foam::labelList Foam::faceCoupleInfo::findMappedEdges
 (
     const edgeList& edges,
@@ -334,8 +328,6 @@ Foam::labelList Foam::faceCoupleInfo::findMappedEdges
 }
 
 
-// Detect a cut edge which originates from two boundary faces having different
-// polyPatches.
 bool Foam::faceCoupleInfo::regionEdge
 (
     const polyMesh& slaveMesh,
@@ -377,9 +369,6 @@ bool Foam::faceCoupleInfo::regionEdge
 }
 
 
-// Find edge using pointI that is most aligned with vector between
-// master points. Patchdivision tells us whether or not to use
-// patch information to match edges.
 Foam::label Foam::faceCoupleInfo::mostAlignedCutEdge
 (
     const bool report,
@@ -392,6 +381,10 @@ Foam::label Foam::faceCoupleInfo::mostAlignedCutEdge
     const label edgeEnd
 ) const
 {
+    // Find edge using pointI that is most aligned with vector between master
+    // points. Patchdivision tells us whether or not to use patch information to
+    // match edges.
+
     const pointField& localPoints = cutFaces().localPoints();
 
     const labelList& pEdges = cutFaces().pointEdges()[pointI];
@@ -499,7 +492,6 @@ Foam::label Foam::faceCoupleInfo::mostAlignedCutEdge
 }
 
 
-// Construct points to split points map (in cut addressing)
 void Foam::faceCoupleInfo::setCutEdgeToPoints(const labelList& cutToMasterEdges)
 {
     labelListList masterToCutEdges
@@ -632,8 +624,6 @@ void Foam::faceCoupleInfo::setCutEdgeToPoints(const labelList& cutToMasterEdges)
 }
 
 
-// Determines rotation for f1 to match up with f0, i.e. the index in f0 of
-// the first point of f1.
 Foam::label Foam::faceCoupleInfo::matchFaces
 (
     const scalar absTol,
@@ -713,11 +703,6 @@ Foam::label Foam::faceCoupleInfo::matchFaces
 }
 
 
-// Find correspondence from patch points to cut points. This might
-// detect shared points so the output is a patch-to-cut point list
-// and a compaction list for the cut points (which will always be equal or more
-// connected than the patch).
-// Returns true if there are any duplicates.
 bool Foam::faceCoupleInfo::matchPointsThroughFaces
 (
     const scalar absTol,
@@ -732,6 +717,10 @@ bool Foam::faceCoupleInfo::matchPointsThroughFaces
     labelList& compactToCut         // inverse ,,
 )
 {
+    // Find correspondence from patch points to cut points. This might detect
+    // shared points so the output is a patch-to-cut point list and a compaction
+    // list for the cut points (which will always be equal or more connected
+    // than the patch).  Returns true if there are any duplicates.
 
     // From slave to cut point
     patchToCutPoints.setSize(patchPoints.size());
@@ -865,7 +854,6 @@ bool Foam::faceCoupleInfo::matchPointsThroughFaces
 }
 
 
-// Return max distance from any point on cutF to masterF
 Foam::scalar Foam::faceCoupleInfo::maxDistance
 (
     const face& cutF,
@@ -943,8 +931,7 @@ void Foam::faceCoupleInfo::findPerfectMatchingFaces
 
     if (matchedAllFaces)
     {
-        Warning
-            << "faceCoupleInfo::faceCoupleInfo : "
+        WarningInFunction
             << "Matched ALL " << fc1.size()
             << " boundary faces of mesh0 to boundary faces of mesh1." << endl
             << "This is only valid if the mesh to add is fully"
@@ -1073,7 +1060,6 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
 }
 
 
-// Grow cutToMasterFace across 'internal' edges.
 Foam::label Foam::faceCoupleInfo::growCutFaces
 (
     const labelList& cutToMasterEdges,
@@ -1243,15 +1229,16 @@ void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const
 }
 
 
-// Extends matching information by elimination across cutFaces using more
-// than one region edge. Updates cutToMasterFaces_ and sets candidates
-// which is for every cutface on a region edge the possible master faces.
 Foam::label Foam::faceCoupleInfo::matchEdgeFaces
 (
     const labelList& cutToMasterEdges,
     Map<labelList>& candidates
 )
 {
+    // Extends matching information by elimination across cutFaces using more
+    // than one region edge. Updates cutToMasterFaces_ and sets candidates which
+    // is for every cutface on a region edge the possible master faces.
+
     // For every unassigned cutFaceI the possible list of master faces.
     candidates.clear();
     candidates.resize(cutFaces().size());
@@ -1348,9 +1335,6 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces
 }
 
 
-// Gets a list of cutFaces (that use a master edge) and the candidate
-// master faces.
-// Finds most aligned master face.
 Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces
 (
     Map<labelList>& candidates
@@ -1438,14 +1422,15 @@ Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces
 }
 
 
-// Calculate the set of cut faces inbetween master and slave patch
-// assuming perfect match (and optional face ordering on slave)
 void Foam::faceCoupleInfo::perfectPointMatch
 (
     const scalar absTol,
     const bool slaveFacesOrdered
 )
 {
+    // Calculate the set of cut faces inbetween master and slave patch assuming
+    // perfect match (and optional face ordering on slave)
+
     if (debug)
     {
         Pout<< "perfectPointMatch :"
@@ -1568,8 +1553,6 @@ void Foam::faceCoupleInfo::perfectPointMatch
 }
 
 
-// Calculate the set of cut faces inbetween master and slave patch
-// assuming that slave patch is subdivision of masterPatch.
 void Foam::faceCoupleInfo::subDivisionMatch
 (
     const polyMesh& slaveMesh,
@@ -1881,7 +1864,6 @@ void Foam::faceCoupleInfo::subDivisionMatch
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from mesh data
 Foam::faceCoupleInfo::faceCoupleInfo
 (
     const polyMesh& masterMesh,
@@ -1970,8 +1952,6 @@ Foam::faceCoupleInfo::faceCoupleInfo
 }
 
 
-// Slave is subdivision of master patch.
-// (so -both cover the same area -all of master points are present in slave)
 Foam::faceCoupleInfo::faceCoupleInfo
 (
     const polyMesh& masterMesh,
diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.H b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.H
index 649013365328c190490ce71777274f58a30b1d5a..90fb030b95132653f06c26ecb3b2bfaa4eab5c17 100644
--- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.H
+++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -142,7 +142,7 @@ SourceFiles
 namespace Foam
 {
 
-typedef HashTable<labelList, edge, Hash<edge> > edgeLookup;
+typedef HashTable<labelList, edge, Hash<edge>> edgeLookup;
 
 
 // Forward declaration of classes
@@ -278,9 +278,9 @@ class faceCoupleInfo
 
         // Face matching
 
-            //- Matches two faces.Determines rotation for f1 to match up
-            // with f0, i.e. the index in f0 of
-            // the first point of f1.
+            //- Matches two faces.
+            //  Determines rotation for f1 to match up with f0,
+            //  i.e. the index in f0 of the first point of f1.
             static label matchFaces
             (
                 const scalar absTol,
@@ -503,7 +503,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "faceCoupleInfoTemplates.C"
+    #include "faceCoupleInfoTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C
index d018a3baa519c6cdc6d536aa74a059f6a90bd859..d9fe330794c1c23e003ca554917519dca32a7cc9 100644
--- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C
+++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -872,7 +872,7 @@ void Foam::polyMeshAdder::mergePointZones
 
     DynamicList<word>& zoneNames,
     labelList& from1ToAll,
-    List<DynamicList<label> >& pzPoints
+    List<DynamicList<label>>& pzPoints
 )
 {
     zoneNames.setCapacity(pz0.size() + pz1.size());
@@ -1011,8 +1011,8 @@ void Foam::polyMeshAdder::mergeFaceZones
 
     DynamicList<word>& zoneNames,
     labelList& from1ToAll,
-    List<DynamicList<label> >& fzFaces,
-    List<DynamicList<bool> >& fzFlips
+    List<DynamicList<label>>& fzFaces,
+    List<DynamicList<bool>>& fzFlips
 )
 {
     const faceZoneMesh& fz0 = mesh0.faceZones();
@@ -1199,7 +1199,7 @@ void Foam::polyMeshAdder::mergeCellZones
 
     DynamicList<word>& zoneNames,
     labelList& from1ToAll,
-    List<DynamicList<label> >& czCells
+    List<DynamicList<label>>& czCells
 )
 {
     zoneNames.setCapacity(cz0.size() + cz1.size());
@@ -1335,14 +1335,14 @@ void Foam::polyMeshAdder::mergeZones
     const labelList& from1ToAllCells,
 
     DynamicList<word>& pointZoneNames,
-    List<DynamicList<label> >& pzPoints,
+    List<DynamicList<label>>& pzPoints,
 
     DynamicList<word>& faceZoneNames,
-    List<DynamicList<label> >& fzFaces,
-    List<DynamicList<bool> >& fzFlips,
+    List<DynamicList<label>>& fzFaces,
+    List<DynamicList<bool>>& fzFlips,
 
     DynamicList<word>& cellZoneNames,
-    List<DynamicList<label> >& czCells
+    List<DynamicList<label>>& czCells
 )
 {
     labelList from1ToAllPZones;
@@ -1393,14 +1393,14 @@ void Foam::polyMeshAdder::mergeZones
 void Foam::polyMeshAdder::addZones
 (
     const DynamicList<word>& pointZoneNames,
-    const List<DynamicList<label> >& pzPoints,
+    const List<DynamicList<label>>& pzPoints,
 
     const DynamicList<word>& faceZoneNames,
-    const List<DynamicList<label> >& fzFaces,
-    const List<DynamicList<bool> >& fzFlips,
+    const List<DynamicList<label>>& fzFaces,
+    const List<DynamicList<bool>>& fzFlips,
 
     const DynamicList<word>& cellZoneNames,
-    const List<DynamicList<label> >& czCells,
+    const List<DynamicList<label>>& czCells,
 
     polyMesh& mesh
 )
@@ -1546,14 +1546,14 @@ Foam::autoPtr<Foam::polyMesh> Foam::polyMeshAdder::add
     // ~~~~~
 
     DynamicList<word> pointZoneNames;
-    List<DynamicList<label> > pzPoints;
+    List<DynamicList<label>> pzPoints;
 
     DynamicList<word> faceZoneNames;
-    List<DynamicList<label> > fzFaces;
-    List<DynamicList<bool> > fzFlips;
+    List<DynamicList<label>> fzFaces;
+    List<DynamicList<bool>> fzFlips;
 
     DynamicList<word> cellZoneNames;
-    List<DynamicList<label> > czCells;
+    List<DynamicList<label>> czCells;
 
     mergeZones
     (
@@ -1763,14 +1763,14 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
     // ~~~~~
 
     DynamicList<word> pointZoneNames;
-    List<DynamicList<label> > pzPoints;
+    List<DynamicList<label>> pzPoints;
 
     DynamicList<word> faceZoneNames;
-    List<DynamicList<label> > fzFaces;
-    List<DynamicList<bool> > fzFlips;
+    List<DynamicList<label>> fzFaces;
+    List<DynamicList<bool>> fzFlips;
 
     DynamicList<word> cellZoneNames;
-    List<DynamicList<label> > czCells;
+    List<DynamicList<label>> czCells;
 
     mergeZones
     (
diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H
index 77baed3f03381217b96aa38314aaa12c6fa0d9f9..3305848fadc526894963ed71c8b0344d2b00f29e 100644
--- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H
+++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -169,7 +169,7 @@ private:
 
             DynamicList<word>& zoneNames,
             labelList& from1ToAll,
-            List<DynamicList<label> >& pzPoints
+            List<DynamicList<label>>& pzPoints
         );
 
         //- Merge face zones
@@ -185,8 +185,8 @@ private:
 
             DynamicList<word>& zoneNames,
             labelList& from1ToAll,
-            List<DynamicList<label> >& fzFaces,
-            List<DynamicList<bool> >& fzFlips
+            List<DynamicList<label>>& fzFaces,
+            List<DynamicList<bool>>& fzFlips
         );
 
         //- Merge cell zones
@@ -200,7 +200,7 @@ private:
 
             DynamicList<word>& zoneNames,
             labelList& from1ToAll,
-            List<DynamicList<label> >& czCells
+            List<DynamicList<label>>& czCells
         );
 
         //- Merge point/face/cell zone information
@@ -219,28 +219,28 @@ private:
             const labelList& from1ToAllCells,
 
             DynamicList<word>& pointZoneNames,
-            List<DynamicList<label> >& pzPoints,
+            List<DynamicList<label>>& pzPoints,
 
             DynamicList<word>& faceZoneNames,
-            List<DynamicList<label> >& fzFaces,
-            List<DynamicList<bool> >& fzFlips,
+            List<DynamicList<label>>& fzFaces,
+            List<DynamicList<bool>>& fzFlips,
 
             DynamicList<word>& cellZoneNames,
-            List<DynamicList<label> >& czCells
+            List<DynamicList<label>>& czCells
         );
 
         //- Create new zones and add to new mesh.
         static void addZones
         (
             const DynamicList<word>& pointZoneNames,
-            const List<DynamicList<label> >& pzPoints,
+            const List<DynamicList<label>>& pzPoints,
 
             const DynamicList<word>& faceZoneNames,
-            const List<DynamicList<label> >& fzFaces,
-            const List<DynamicList<bool> >& fzFlips,
+            const List<DynamicList<label>>& fzFaces,
+            const List<DynamicList<bool>>& fzFlips,
 
             const DynamicList<word>& cellZoneNames,
-            const List<DynamicList<label> >& czCells,
+            const List<DynamicList<label>>& czCells,
 
             polyMesh& mesh
         );
diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C
index 28398bdc92a1e5b6a1d181217a62b197b5826ffe..ced6d24aeb2a1c1f5e1970c0ea3f10e17a3708bf 100644
--- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C
+++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -946,6 +946,24 @@ Foam::polyMeshFilter::polyMeshFilter
     writeSettings(Info);
 }
 
+Foam::polyMeshFilter::polyMeshFilter
+(
+    const fvMesh& mesh,
+    const labelList& pointPriority,
+    const dictionary& dict
+)
+:
+    polyMeshFilterSettings(dict),
+    mesh_(mesh),
+    newMeshPtr_(),
+    originalPointPriority_(pointPriority),
+    pointPriority_(),
+    minEdgeLen_(),
+    faceFilterFactor_()
+{
+    writeSettings(Info);
+}
+
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H
index 816e75e126e8d1a66eb0dacab34f3fea6c862ba9..ffe92dc8997f5f5f2f555909cccda2db9c10ec06 100644
--- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H
+++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,10 +89,10 @@ class polyMeshFilter
 
     // Private Member Functions
 
-        template<typename T>
+        template<class T>
         static void updateSets(const mapPolyMesh& map);
 
-        template<typename T>
+        template<class T>
         static void copySets(const polyMesh& oldMesh, const polyMesh& newMesh);
 
         label filterFacesLoop(const label nOriginalBadFaces);
@@ -207,6 +207,14 @@ public:
         //- Construct from fvMesh and a label list of point priorities
         polyMeshFilter(const fvMesh& mesh, const labelList& pointPriority);
 
+        //- Construct from fvMesh and a label list of point priorities
+        polyMeshFilter
+        (
+            const fvMesh& mesh,
+            const labelList& pointPriority,
+            const dictionary& dict
+        );
+
 
     //- Destructor
     ~polyMeshFilter();
@@ -257,7 +265,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "polyMeshFilterTemplates.C"
+    #include "polyMeshFilterTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilterTemplates.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilterTemplates.C
index 08fa9d6efe8d9845da689754878b68d4350c28d8..98078299e05384f6f800d8fc306404525e0722c2 100644
--- a/src/dynamicMesh/polyMeshFilter/polyMeshFilterTemplates.C
+++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilterTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 
 // * * * * * * * * * * * * * Public Member Functions * * * * * * * * * * * * //
 
-template<typename SetType>
+template<class SetType>
 void Foam::polyMeshFilter::updateSets(const mapPolyMesh& map)
 {
     HashTable<const SetType*> sets =
@@ -66,7 +66,7 @@ void Foam::polyMeshFilter::updateSets(const mapPolyMesh& map)
 }
 
 
-template<typename SetType>
+template<class SetType>
 void Foam::polyMeshFilter::copySets
 (
     const polyMesh& oldMesh,
diff --git a/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C b/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C
index eb4a2eb36d3a4efbdeeabca43a32750f4d7a9e9b..6805daf9590be51fafb56ac8cf864820d8fa1f08 100644
--- a/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C
+++ b/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,6 @@ Foam::attachPolyTopoChanger::attachPolyTopoChanger
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-//- Attach mesh
 void Foam::attachPolyTopoChanger::attach(const bool removeEmptyPatches)
 {
     if (debug)
diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C
index 23f90fefca8cd05c78f4fe15b2be97dd9e741fa2..e85f4d59593f373a967131ee9176b0548e3bda98 100644
--- a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C
+++ b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,10 +38,7 @@ Foam::autoPtr<Foam::polyMeshModifier> Foam::polyMeshModifier::New
 {
     if (debug)
     {
-        Info<< "polyMeshModifier::New(const word&, const dictionary&, "
-            << "const label, const polyTopoChanger&) : "
-            << "constructing polyMeshModifier"
-            << endl;
+        InfoInFunction << "Constructing polyMeshModifier" << endl;
     }
 
     const word modifierType(dict.lookup("type"));
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addObject/polyAddPoint.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/addObject/polyAddPoint.H
index 3ec0ed0e7aca5ceb3c90cd2b59238f58834e9f51..61fef2b33caf8ffe3d57746bf8cb484cbbf9901b 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addObject/polyAddPoint.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addObject/polyAddPoint.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ public:
         //- Construct null.  Used only for list construction
         polyAddPoint()
         :
-            p_(vector::zero),
+            p_(Zero),
             masterPointID_(-1),
             zoneID_(-1),
             inCell_(false)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
index 2bb25c9049aab1669446400c911f06fea76c0eb5..5136f38376253a5ec674b83a1f4403b330a63bf7 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -209,7 +209,7 @@ void Foam::edgeCollapser::collapseToEdge
 
     if (!maxPriorityPts.empty())
     {
-        Foam::point averagePt(vector::zero);
+        Foam::point averagePt(Zero);
 
         forAll(maxPriorityPts, ptI)
         {
@@ -259,7 +259,7 @@ void Foam::edgeCollapser::collapseToEdge
 
     if (!maxPriorityPts.empty())
     {
-        Foam::point averagePt(vector::zero);
+        Foam::point averagePt(Zero);
 
         forAll(maxPriorityPts, ptI)
         {
@@ -321,7 +321,7 @@ void Foam::edgeCollapser::collapseToPoint
 
     if (!maxPriorityPts.empty())
     {
-        Foam::point averagePt(vector::zero);
+        Foam::point averagePt(Zero);
 
         forAll(maxPriorityPts, ptI)
         {
@@ -580,7 +580,7 @@ Foam::edgeCollapser::collapseType Foam::edgeCollapser::collapseFace
 
     const scalar fA = f.mag(pts);
 
-    vector collapseAxis = vector::zero;
+    vector collapseAxis = Zero;
     scalar aspectRatio = 1.0;
 
     faceCollapseAxisAndAspectRatio(f, fC, collapseAxis, aspectRatio);
@@ -1035,7 +1035,7 @@ Foam::label Foam::edgeCollapser::syncCollapse
     List<pointEdgeCollapse> allEdgeInfo
     (
         mesh_.nEdges(),
-        pointEdgeCollapse(vector::zero, -1, -1)
+        pointEdgeCollapse(Zero, -1, -1)
     );
 
     // Mark selected edges for collapse
@@ -1120,7 +1120,7 @@ Foam::label Foam::edgeCollapser::syncCollapse
 
 void Foam::edgeCollapser::filterFace
 (
-    const Map<DynamicList<label> >& collapseStrings,
+    const Map<DynamicList<label>>& collapseStrings,
     const List<pointEdgeCollapse>& allPointInfo,
     face& f
 ) const
@@ -1317,7 +1317,7 @@ bool Foam::edgeCollapser::setRefinement
 
     // Create strings of edges.
     // Map from collapseIndex(=global master point) to set of points
-    Map<DynamicList<label> > collapseStrings;
+    Map<DynamicList<label>> collapseStrings;
     {
         // 1. Count elements per collapseIndex
         Map<label> nPerIndex(mesh_.nPoints()/10);
@@ -1363,7 +1363,7 @@ bool Foam::edgeCollapser::setRefinement
 
 //    OFstream str2("collapseStrings_" + name(count) + ".obj");
 //    // Dump point collapses
-//    forAllConstIter(Map<DynamicList<label> >, collapseStrings, iter)
+//    forAllConstIter(Map<DynamicList<label>>, collapseStrings, iter)
 //    {
 //        const label masterPoint = iter.key();
 //        const DynamicList<label>& edgeCollapses = iter();
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H
index dab8bd298b0becb2bdae6c9c9b9ccd58e4e45d3e..8a13628f2f73fa147249b8c48f21d2da9b8fd83e 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -231,7 +231,7 @@ private:
         //- Renumber f with new vertices. Removes consecutive duplicates
         void filterFace
         (
-            const Map<DynamicList<label> >& collapseStrings,
+            const Map<DynamicList<label>>& collapseStrings,
             const List<pointEdgeCollapse>& allPointInfo,
             face& f
         ) const;
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C
index 5012b402c0483b8854fc301b8978cca27f26771c..a0d5a008c3b527422c09a886706cf0f41cebd6be 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -4627,7 +4627,7 @@ void Foam::hexRef8::checkMesh() const
             {
                 // Check how many faces between owner and neighbour. Should
                 // be only one.
-                HashTable<label, labelPair, labelPair::Hash<> >
+                HashTable<label, labelPair, labelPair::Hash<>>
                     cellToFace(2*pp.size());
 
                 label faceI = pp.start();
@@ -5113,13 +5113,6 @@ const Foam::cellShapeList& Foam::hexRef8::cellShapes() const
 }
 
 
-
-//
-// Unrefinement
-// ~~~~~~~~~~~~
-//
-
-
 Foam::labelList Foam::hexRef8::getSplitPoints() const
 {
     if (debug)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
index 1554c24b566909dcbeff927ca8518b5536ae8ebe..fe4cf9ede116bbf760f40ca54dc7752e5177b1c5 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,6 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-//- Construct null
 Foam::refinementHistory::splitCell8::splitCell8()
 :
     parent_(-1),
@@ -46,7 +45,6 @@ Foam::refinementHistory::splitCell8::splitCell8()
 {}
 
 
-//- Construct as child element of parent
 Foam::refinementHistory::splitCell8::splitCell8(const label parent)
 :
     parent_(parent),
@@ -54,14 +52,12 @@ Foam::refinementHistory::splitCell8::splitCell8(const label parent)
 {}
 
 
-//- Construct from Istream
 Foam::refinementHistory::splitCell8::splitCell8(Istream& is)
 {
     is >> *this;
 }
 
 
-//- Construct as (deep) copy.
 Foam::refinementHistory::splitCell8::splitCell8(const splitCell8& sc)
 :
     parent_(sc.parent_),
@@ -305,7 +301,7 @@ void Foam::refinementHistory::freeSplitCell(const label index)
     // Make sure parent does not point to me anymore.
     if (split.parent_ >= 0)
     {
-        autoPtr<FixedList<label, 8> >& subCellsPtr =
+        autoPtr<FixedList<label, 8>>& subCellsPtr =
             splitCells_[split.parent_].addedCellsPtr_;
 
         if (subCellsPtr.valid())
@@ -590,7 +586,6 @@ Foam::refinementHistory::refinementHistory(const IOobject& io)
 }
 
 
-//- Read or construct
 Foam::refinementHistory::refinementHistory
 (
     const IOobject& io,
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H
index c7145be6fbfd206aa766f6a588680ea0d9f873d6..6148b2c8be1f979da1f8c8ac3b2ff3524eaa3f8e 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ public:
         label parent_;
 
         //- Cells this cell was refined into
-        autoPtr<FixedList<label, 8> > addedCellsPtr_;
+        autoPtr<FixedList<label, 8>> addedCellsPtr_;
 
         //- Construct null (parent = -1)
         splitCell8();
@@ -161,6 +161,7 @@ private:
             const List<splitCell8>&,
             const splitCell8&
         );
+
         //- Debug write
         static void writeDebug
         (
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H
index 23fa9b348d153fa153d1e5cf7c43e98d00423071..efd18fa77247422c63717d3dac43f01cce6c26db 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ public:
         polyModifyPoint()
         :
             pointID_(-1),
-            location_(vector::zero),
+            location_(Zero),
             removeFromZone_(false),
             zoneID_(-1),
             inCell_(false)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
index 5416fb5ddbbcfbe153193019fa236e52bf50a3e8..7a1104a1caf0320263a7e1c1d87ccf95f6f9e9fc 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -1331,7 +1331,7 @@ Foam::labelList Foam::polyTopoChange::selectFaces
 // label)
 void Foam::polyTopoChange::calcPatchPointMap
 (
-    const List<Map<label> >& oldPatchMeshPointMaps,
+    const List<Map<label>>& oldPatchMeshPointMaps,
     const polyBoundaryMesh& boundary,
     labelListList& patchPointMap
 ) const
@@ -1882,7 +1882,7 @@ void Foam::polyTopoChange::resetZones
 void Foam::polyTopoChange::calcFaceZonePointMap
 (
     const polyMesh& mesh,
-    const List<Map<label> >& oldFaceZoneMeshPointMaps,
+    const List<Map<label>>& oldFaceZoneMeshPointMaps,
     labelListList& faceZonePointMap
 ) const
 {
@@ -2066,10 +2066,10 @@ void Foam::polyTopoChange::compactAndReorder
     List<objectMap>& cellsFromEdges,
     List<objectMap>& cellsFromFaces,
     List<objectMap>& cellsFromCells,
-    List<Map<label> >& oldPatchMeshPointMaps,
+    List<Map<label>>& oldPatchMeshPointMaps,
     labelList& oldPatchNMeshPoints,
     labelList& oldPatchStarts,
-    List<Map<label> >& oldFaceZoneMeshPointMaps
+    List<Map<label>>& oldFaceZoneMeshPointMaps
 )
 {
     if (mesh.boundaryMesh().size() != nPatches_)
@@ -3074,10 +3074,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
     List<objectMap> cellsFromFaces;
     List<objectMap> cellsFromCells;
     // old mesh info
-    List<Map<label> > oldPatchMeshPointMaps;
+    List<Map<label>> oldPatchMeshPointMaps;
     labelList oldPatchNMeshPoints;
     labelList oldPatchStarts;
-    List<Map<label> > oldFaceZoneMeshPointMaps;
+    List<Map<label>> oldFaceZoneMeshPointMaps;
 
     // Compact, reorder patch faces and calculate mesh/patch maps.
     compactAndReorder
@@ -3132,7 +3132,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
             }
             else
             {
-                renumberedMeshPoints[newPointI] = vector::zero;
+                renumberedMeshPoints[newPointI] = Zero;
             }
         }
 
@@ -3343,10 +3343,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
     List<objectMap> cellsFromCells;
 
     // old mesh info
-    List<Map<label> > oldPatchMeshPointMaps;
+    List<Map<label>> oldPatchMeshPointMaps;
     labelList oldPatchNMeshPoints;
     labelList oldPatchStarts;
-    List<Map<label> > oldFaceZoneMeshPointMaps;
+    List<Map<label>> oldFaceZoneMeshPointMaps;
 
     // Compact, reorder patch faces and calculate mesh/patch maps.
     compactAndReorder
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H
index d9544b2810649a9a179bc0d19c05c37341ac871b..97d82bdb521886bb4ee336d1b518b6221018b994 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -201,7 +201,7 @@ class polyTopoChange
         template<class T>
         static void reorder(const labelList& map, DynamicList<T>&);
         template<class T>
-        static void reorder(const labelList& map, List<DynamicList<T> >&);
+        static void reorder(const labelList& map, List<DynamicList<T>>&);
         template<class T>
         static void renumberKey(const labelList& map, Map<T>&);
 
@@ -322,7 +322,7 @@ class polyTopoChange
         //- Calculate mapping for patchpoints only
         void calcPatchPointMap
         (
-            const List<Map<label> >&,
+            const List<Map<label>>&,
             const polyBoundaryMesh&,
             labelListList&
         ) const;
@@ -356,7 +356,7 @@ class polyTopoChange
         void calcFaceZonePointMap
         (
             const polyMesh&,
-            const List<Map<label> >&,
+            const List<Map<label>>&,
             labelListList&
         ) const;
 
@@ -391,10 +391,10 @@ class polyTopoChange
             List<objectMap>& cellsFromEdges,
             List<objectMap>& cellsFromFaces,
             List<objectMap>& cellsFromCells,
-            List<Map<label> >& oldPatchMeshPointMaps,
+            List<Map<label>>& oldPatchMeshPointMaps,
             labelList& oldPatchNMeshPoints,
             labelList& oldPatchStarts,
-            List<Map<label> >& oldFaceZoneMeshPointMaps
+            List<Map<label>>& oldFaceZoneMeshPointMaps
         );
 
 public:
@@ -610,7 +610,7 @@ public:
 #include "polyTopoChangeI.H"
 
 #ifdef NoRepository
-#   include "polyTopoChangeTemplates.C"
+    #include "polyTopoChangeTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C
index 69da6c4a2ece2802acbafc31a02bb5bfcc0f5e09..ddca640d04e4a3c0faefb1bcf51e1da077c811bf 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,11 +53,11 @@ template<class T>
 void Foam::polyTopoChange::reorder
 (
     const labelList& oldToNew,
-    List<DynamicList<T> >& lst
+    List<DynamicList<T>>& lst
 )
 {
     // Create copy
-    List<DynamicList<T> > oldLst(lst);
+    List<DynamicList<T>> oldLst(lst);
 
     forAll(oldToNew, elemI)
     {
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C
index 154d0e442e8392f8740ae6873d53a8d501755d11..bce0dade15ec16d0ae4dbb4765b237e1049e97eb 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,8 +42,8 @@ namespace Foam
 
 defineTypeNameAndDebug(removePoints, 0);
 
-//- Combine-reduce operator to combine data on faces. Takes care
-//  of reverse orientation on coupled face.
+// Combine-reduce operator to combine data on faces. Takes care
+// of reverse orientation on coupled face.
 template<class T, template<class> class CombineOp>
 class faceEqOp
 {
@@ -71,31 +71,11 @@ public:
     }
 };
 
-
-//// Dummy transform for List. Used in synchronisation.
-//template<class T>
-//class dummyTransformList
-//{
-//public:
-//    void operator()(const coupledPolyPatch&, Field<List<T> >&) const
-//    {}
-//};
-//// Dummy template specialisation. Used in synchronisation.
-//template<>
-//class pTraits<boolList>
-//{
-//public:
-//
-//    //- Component type
-//    typedef label cmptType;
-//};
-
-
 }
 
+
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Change the vertices of the face whilst keeping everything else the same.
 void Foam::removePoints::modifyFace
 (
     const label faceI,
@@ -148,7 +128,6 @@ void Foam::removePoints::modifyFace
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from mesh
 Foam::removePoints::removePoints
 (
     const polyMesh& mesh,
diff --git a/src/dynamicMesh/setUpdater/setUpdater.H b/src/dynamicMesh/setUpdater/setUpdater.H
index fa95ea9bcc3580738c189f724f297273eaada2d5..f9d14353d0471d43a660c207c5a487b0424b33b3 100644
--- a/src/dynamicMesh/setUpdater/setUpdater.H
+++ b/src/dynamicMesh/setUpdater/setUpdater.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 #ifdef NoRepository
-#   include "setUpdaterTemplates.C"
+    #include "setUpdaterTemplates.C"
 #endif
 
 
diff --git a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C
index 6138a7785b9e94cf068d1c10c4630a8b5d11f4cf..6cb0df6d4a8b4b89f497a9ab92bad70b3589b6de 100644
--- a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C
+++ b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -239,8 +239,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
 
     // For every master and slave edge make a list of points to be added into
     // that edge.
-    List<DynamicList<label> > pointsIntoMasterEdges(masterEdges.size());
-    List<DynamicList<label> > pointsIntoSlaveEdges(slaveEdges.size());
+    List<DynamicList<label>> pointsIntoMasterEdges(masterEdges.size());
+    List<DynamicList<label>> pointsIntoSlaveEdges(slaveEdges.size());
 
     // Add all points from the slave patch that have hit the edge
     forAll(slavePointEdgeHits, pointI)
@@ -400,7 +400,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
             << abort(FatalError);
     }
 
-    Map<Pair<edge> >& addToCpepm = *cutPointEdgePairMapPtr_;
+    Map<Pair<edge>>& addToCpepm = *cutPointEdgePairMapPtr_;
 
     // Clear the old map
     addToCpepm.clear();
diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C
index 26450d01f42498dd73e57638cdbc587cfcdc37c9..ef65f5ac8f43f6992b0207056625cd44b464c8a6 100644
--- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C
+++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,8 +94,8 @@ void Foam::enrichedPatch::calcCutFaces() const
     //    the points projected onto the face.
 
     // Create a set of edge usage parameters
-    HashSet<edge, Hash<edge> > edgesUsedOnce(pp.size());
-    HashSet<edge, Hash<edge> > edgesUsedTwice
+    HashSet<edge, Hash<edge>> edgesUsedOnce(pp.size());
+    HashSet<edge, Hash<edge>> edgesUsedTwice
         (pp.size()*primitiveMesh::edgesPerPoint_);
 
 
@@ -361,7 +361,7 @@ void Foam::enrichedPatch::calcCutFaces() const
                         );
 
                         // Increment the usage count using two hash sets
-                        HashSet<edge, Hash<edge> >::iterator euoIter =
+                        HashSet<edge, Hash<edge>>::iterator euoIter =
                             edgesUsedOnce.find(curCutFaceEdge);
 
                         if (euoIter == edgesUsedOnce.end())
diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C
index 6ca52144199f523ab79666b4122099ac206e4cc7..5113594293107106c62a273efa22dfe85d47b8d8 100644
--- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C
+++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
     // Master face points lists the points of the enriched master face plus
     // points projected into the master face
 
-    Map<DynamicList<label> > mpf(meshPoints().size());
+    Map<DynamicList<label>> mpf(meshPoints().size());
 
     const faceList& ef = enrichedFaces();
 
@@ -62,7 +62,7 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
 //         Pout<< "Cur face in pfAddr: " << curFace << endl;
         forAll(curFace, pointI)
         {
-            Map<DynamicList<label> >::iterator mpfIter =
+            Map<DynamicList<label>>::iterator mpfIter =
                 mpf.find(curFace[pointI]);
 
             if (mpfIter == mpf.end())
@@ -101,7 +101,7 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
             const label mergedSmp =
                 pointMergeMap().find(slaveMeshPoints[pointI])();
 
-            Map<DynamicList<label> >::iterator mpfIter =
+            Map<DynamicList<label>>::iterator mpfIter =
                 mpf.find(mergedSmp);
 
             if (mpfIter == mpf.end())
diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C
index f2fd9e3aacc8f66f76dc4444c55e264e3f26c67e..0ef540e9ba5ff9c608483a9bb09d66b14bd1c881 100644
--- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C
+++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ void Foam::enrichedPatch::calcPointPoints() const
     // Go through all faces and add the previous and next point as the
     // neighbour for each point. While inserting points, reject the
     // duplicates (as every internal edge will be visited twice).
-    List<DynamicList<label, primitiveMesh::edgesPerPoint_> >
+    List<DynamicList<label, primitiveMesh::edgesPerPoint_>>
         pp(meshPoints().size());
 
     const faceList& lf = localFaces();
diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C
index 79d1faa89121a66b53b56329ec6f302a5757c577..65f2150c81f8dbd95f65641d4a572fe971a62b9d 100644
--- a/src/dynamicMesh/slidingInterface/slidingInterface.C
+++ b/src/dynamicMesh/slidingInterface/slidingInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -298,7 +298,7 @@ Foam::slidingInterface::slidingInterface
 
         retiredPointMapPtr_ = new Map<label>(dict.lookup("retiredPointMap"));
         cutPointEdgePairMapPtr_ =
-            new Map<Pair<edge> >(dict.lookup("cutPointEdgePairMap"));
+            new Map<Pair<edge>>(dict.lookup("cutPointEdgePairMap"));
     }
     else
     {
@@ -434,7 +434,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
 
         const Map<label>& rpm = retiredPointMap();
 
-        const Map<Pair<edge> >& cpepm = cutPointEdgePairMap();
+        const Map<Pair<edge>>& cpepm = cutPointEdgePairMap();
 
         const Map<label>& slaveZonePointMap =
             mesh.faceZones()[slaveFaceZoneID_.index()]().meshPointMap();
@@ -471,7 +471,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
                 // A cut point is not a projected slave point.  Therefore, it
                 // must be an edge-to-edge intersection.
 
-                Map<Pair<edge> >::const_iterator cpepmIter =
+                Map<Pair<edge>>::const_iterator cpepmIter =
                     cpepm.find(cutPoints[pointI]);
 
                 if (cpepmIter != cpepm.end())
diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.H b/src/dynamicMesh/slidingInterface/slidingInterface.H
index bbec12db114e981e056c7b4531fc58e78537479b..6474e985ed12dabf807b92eade61536abb575938 100644
--- a/src/dynamicMesh/slidingInterface/slidingInterface.H
+++ b/src/dynamicMesh/slidingInterface/slidingInterface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -185,7 +185,7 @@ private:
             //- Cut edge pairs
             //  For cut points created by intersection two edges,
             //  store the master-slave edge pair used in creation
-            mutable Map<Pair<edge> >* cutPointEdgePairMapPtr_;
+            mutable Map<Pair<edge>>* cutPointEdgePairMapPtr_;
 
             //- Slave point hit.  The index of master point hit by the
             //  slave point in projection.  For no point hit, set to -1
@@ -250,7 +250,7 @@ private:
             const Map<label>& retiredPointMap() const;
 
             //- Cut point edge pair map
-            const Map<Pair<edge> >& cutPointEdgePairMap() const;
+            const Map<Pair<edge>>& cutPointEdgePairMap() const;
 
              //- Clear addressing
              void clearAddressing() const;
diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C
index e30f099746b68b228e89d2ed82e7a7d4084549b6..429367551943c0fb015ecde451f48ce5d6e2221f 100644
--- a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C
+++ b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -210,7 +210,7 @@ void Foam::slidingInterface::calcAttachedAddressing() const
         // Ditto for cut point edge map.  This is a rough guess of its size
         //
         cutPointEdgePairMapPtr_ =
-            new Map<Pair<edge> >
+            new Map<Pair<edge>>
             (
                 faceZones[slaveFaceZoneID_.index()]().nEdges()
             );
@@ -390,10 +390,10 @@ void Foam::slidingInterface::renumberAttachedAddressing
     }
 
     // Renumber the cut point edge pair map. Need to take a copy!
-    const Map<Pair<edge> > cpepm = cutPointEdgePairMap();
+    const Map<Pair<edge>> cpepm = cutPointEdgePairMap();
 
-    Map<Pair<edge> >* newCpepmPtr = new Map<Pair<edge> >(cpepm.size());
-    Map<Pair<edge> >& newCpepm = *newCpepmPtr;
+    Map<Pair<edge>>* newCpepmPtr = new Map<Pair<edge>>(cpepm.size());
+    Map<Pair<edge>>& newCpepm = *newCpepmPtr;
 
     const labelList cpepmToc = cpepm.toc();
 
@@ -539,7 +539,7 @@ const Foam::Map<Foam::label>& Foam::slidingInterface::retiredPointMap() const
 }
 
 
-const Foam::Map<Foam::Pair<Foam::edge> >&
+const Foam::Map<Foam::Pair<Foam::edge>>&
 Foam::slidingInterface::cutPointEdgePairMap() const
 {
     if (!cutPointEdgePairMapPtr_)
diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C
index e937c18d183bcf1e7448e6d40fe9d6c6116abbfd..f87b08e6e2d9be3152d964ba0451f3495ad7bc6c 100644
--- a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C
+++ b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -250,7 +250,7 @@ bool Foam::slidingInterface::projectPoints() const
     if (projectedSlavePointsPtr_) delete projectedSlavePointsPtr_;
 
     projectedSlavePointsPtr_ =
-        new pointField(slavePointFaceHits.size(), vector::zero);
+        new pointField(slavePointFaceHits.size(), Zero);
     pointField& projectedSlavePoints = *projectedSlavePointsPtr_;
 
     // Adjust projection to type of match
diff --git a/src/edgeMesh/edgeMeshIO.C b/src/edgeMesh/edgeMeshIO.C
index 074510f2c10fcdfbc29be198f1eea4226ff801e5..e8bc88f4026abf32e7bfac1d812d7b610ebd9447 100644
--- a/src/edgeMesh/edgeMeshIO.C
+++ b/src/edgeMesh/edgeMeshIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,10 +91,7 @@ void Foam::edgeMesh::write
 {
     if (debug)
     {
-        Info<< "edgeMesh::write"
-            "(const fileName&, const edgeMesh&) : "
-            "writing to " << name
-            << endl;
+        InfoInFunction << "Writing to " << name << endl;
     }
 
     const word ext = name.ext();
diff --git a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C
index 8ce9f94ee0d790bbfdcfd5040ac86d629a7706a9..d64b07aae53fc833f584ad6c761893862f12ccb0 100644
--- a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C
+++ b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -233,7 +233,7 @@ void Foam::extendedEdgeMesh::cut
     const pointField& points = this->points();
 
 
-    List<List<pointIndexHit> > edgeHits(edges.size());
+    List<List<pointIndexHit>> edgeHits(edges.size());
     {
         pointField start(edges.size());
         pointField end(edges.size());
@@ -792,7 +792,7 @@ void Foam::extendedEdgeMesh::nearestFeatureEdgeByType
     List<pointIndexHit>& info
 ) const
 {
-    const PtrList<indexedOctree<treeDataEdge> >& edgeTrees = edgeTreesByType();
+    const PtrList<indexedOctree<treeDataEdge>>& edgeTrees = edgeTreesByType();
 
     info.setSize(edgeTrees.size());
 
@@ -859,7 +859,7 @@ void Foam::extendedEdgeMesh::allNearestFeatureEdges
     List<pointIndexHit>& info
 ) const
 {
-    const PtrList<indexedOctree<treeDataEdge> >& edgeTrees = edgeTreesByType();
+    const PtrList<indexedOctree<treeDataEdge>>& edgeTrees = edgeTreesByType();
 
     info.setSize(edgeTrees.size());
 
@@ -990,7 +990,7 @@ Foam::extendedEdgeMesh::edgeTree() const
 }
 
 
-const Foam::PtrList<Foam::indexedOctree<Foam::treeDataEdge> >&
+const Foam::PtrList<Foam::indexedOctree<Foam::treeDataEdge>>&
 Foam::extendedEdgeMesh::edgeTreesByType() const
 {
     if (edgeTreesByType_.size() == 0)
diff --git a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.H b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.H
index 1dfb921e489f3eb64c6cc969b9bae4d3d4a51c94..a33a6fd7af7c96d00efe058464b4f5fab2f74cea 100644
--- a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.H
+++ b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -191,13 +191,13 @@ protected:
         labelList regionEdges_;
 
         //- Search tree for all feature points
-        mutable autoPtr<indexedOctree<treeDataPoint> > pointTree_;
+        mutable autoPtr<indexedOctree<treeDataPoint>> pointTree_;
 
         //- Search tree for all edges
-        mutable autoPtr<indexedOctree<treeDataEdge> > edgeTree_;
+        mutable autoPtr<indexedOctree<treeDataEdge>> edgeTree_;
 
         //- Individual search trees for each type of edge
-        mutable PtrList<indexedOctree<treeDataEdge> > edgeTreesByType_;
+        mutable PtrList<indexedOctree<treeDataEdge>> edgeTreesByType_;
 
 
     // Protected Member Functions
@@ -499,7 +499,7 @@ public:
             const indexedOctree<treeDataEdge>& edgeTree() const;
 
             //- Demand driven construction of octree for boundary edges by type
-            const PtrList<indexedOctree<treeDataEdge> >&
+            const PtrList<indexedOctree<treeDataEdge>>&
             edgeTreesByType() const;
 
 
@@ -624,7 +624,7 @@ public:
 #include "extendedEdgeMeshI.H"
 
 #ifdef NoRepository
-#   include "extendedEdgeMeshTemplates.C"
+    #include "extendedEdgeMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshI.H b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshI.H
index 55d291134652fb129516f3ea23ba0aa3477251cd..098f7e399e7acc5d435fd700b05b286c1501f230 100644
--- a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshI.H
+++ b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -136,7 +136,7 @@ inline Foam::vector Foam::extendedEdgeMesh::edgeDirection
             << e.start() << " " << e.end()
             << exit(FatalError);
 
-        return vector::zero;
+        return Zero;
     }
 }
 
diff --git a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshTemplates.C b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshTemplates.C
index ffa8317fa7bc96308cafa70bd4bccf81f5d346fd..1f2051a3365bd7a81e60808797eba93f080871d7 100644
--- a/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshTemplates.C
+++ b/src/edgeMesh/extendedEdgeMesh/extendedEdgeMeshTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,7 +166,7 @@ void Foam::extendedEdgeMesh::sortPointsAndEdges
                 );
         }
 
-        vector fC0tofC1(vector::zero);
+        vector fC0tofC1(Zero);
 
         if (eFaces.size() == 2)
         {
@@ -208,7 +208,7 @@ void Foam::extendedEdgeMesh::sortPointsAndEdges
     }
 
     // Reorder the edges by classification
-    List<DynamicList<label> > allEds(nEdgeTypes);
+    List<DynamicList<label>> allEds(nEdgeTypes);
 
     DynamicList<label>& externalEds(allEds[0]);
     DynamicList<label>& internalEds(allEds[1]);
@@ -295,7 +295,7 @@ void Foam::extendedEdgeMesh::sortPointsAndEdges
 
     // Reorder the feature points by classification
 
-    List<DynamicList<label> > allPts(3);
+    List<DynamicList<label>> allPts(3);
 
     DynamicList<label>& convexPts(allPts[0]);
     DynamicList<label>& concavePts(allPts[1]);
diff --git a/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H b/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H
index 103d6c78cd9f0ad10c22061a8d953603ef5b7ff0..55cc8ffa6275c613a9ab3b18984411e046bef23d 100644
--- a/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H
+++ b/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,7 +133,7 @@ inline Foam::vector Foam::extendedFeatureEdgeMesh::edgeDirection
             << e.start() << " " << e.end()
             << exit(FatalError);
 
-        return vector::zero;
+        return Zero;
     }
 }
 
diff --git a/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C b/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C
index 9a33bcc96ad4b96b970dcc51735f3abe4b1f2133..8aba7d0b595af4d042dcbf85688f126889c34c3e 100644
--- a/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C
+++ b/src/edgeMesh/extendedEdgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,7 +166,7 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
                 );
         }
 
-        vector fC0tofC1(vector::zero);
+        vector fC0tofC1(Zero);
 
         if (eFaces.size() == 2)
         {
@@ -208,7 +208,7 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
     }
 
     // Reorder the edges by classification
-    List<DynamicList<label> > allEds(nEdgeTypes);
+    List<DynamicList<label>> allEds(nEdgeTypes);
 
     DynamicList<label>& externalEds(allEds[0]);
     DynamicList<label>& internalEds(allEds[1]);
@@ -295,7 +295,7 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges
 
     // Reorder the feature points by classification
 
-    List<DynamicList<label> > allPts(3);
+    List<DynamicList<label>> allPts(3);
 
     DynamicList<label>& convexPts(allPts[0]);
     DynamicList<label>& concavePts(allPts[1]);
diff --git a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C
index 3a797dbb9a4234d5eafaa1ebf4c00c053d7eaba0..f34c29745f3f1c4e24adf8e6b563804c35bcae19 100644
--- a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C
+++ b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,9 +29,7 @@ License
 
 namespace Foam
 {
-
-defineTypeNameAndDebug(featureEdgeMesh, 0);
-
+    defineTypeNameAndDebug(featureEdgeMesh, 0);
 }
 
 
@@ -64,7 +62,6 @@ Foam::featureEdgeMesh::featureEdgeMesh(const IOobject& io)
 }
 
 
-//- Construct from components
 Foam::featureEdgeMesh::featureEdgeMesh
 (
     const IOobject& io,
diff --git a/src/engine/engineTime/engineTime.C b/src/engine/engineTime/engineTime.C
index 0933218bd736a5dfb4d7b9fa9ef18104c228a6c7..a70f6bba7727234016c26183b6e6ea8e13bc907f 100644
--- a/src/engine/engineTime/engineTime.C
+++ b/src/engine/engineTime/engineTime.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,6 @@ void Foam::engineTime::timeAdjustment()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-//- Construct from objectRegistry arguments
 Foam::engineTime::engineTime
 (
     const word& name,
diff --git a/src/fileFormats/coordSet/coordSet.C b/src/fileFormats/coordSet/coordSet.C
index c65ae246b1d4a741d66a6d8694f98d21ed69d7ff..5d7dd92b79a49cff7462f972e5186bc1ea672717 100644
--- a/src/fileFormats/coordSet/coordSet.C
+++ b/src/fileFormats/coordSet/coordSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,6 @@ const Foam::NamedEnum<Foam::coordSet::coordFormat, 5>
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-//- Construct from components
 Foam::coordSet::coordSet
 (
     const word& name,
@@ -65,7 +64,6 @@ Foam::coordSet::coordSet
 {}
 
 
-//- Construct from components
 Foam::coordSet::coordSet
 (
     const word& name,
diff --git a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.C b/src/fileFormats/sampledSetWriters/csv/csvSetWriter.C
index 44762d043cb9139d17bf2a3a77cbb4565200c1bf..8d69d32cb3773e25a77e11d6aa8d3416f552588e 100644
--- a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.C
+++ b/src/fileFormats/sampledSetWriters/csv/csvSetWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ void Foam::csvSetWriter<Type>::write
     const bool writeTracks,
     const PtrList<coordSet>& points,
     const wordList& valueSetNames,
-    const List<List<Field<Type> > >& valueSets,
+    const List<List<Field<Type>>>& valueSets,
     Ostream& os
 ) const
 {
diff --git a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.H b/src/fileFormats/sampledSetWriters/csv/csvSetWriter.H
index 8e4b9c7d70beb9bc5d159fcb49da7fdaffc37563..381285b385eca63b4e188ca06e5ceacc72b22e69 100644
--- a/src/fileFormats/sampledSetWriters/csv/csvSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/csv/csvSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const;
 };
@@ -114,7 +114,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "csvSetWriter.C"
+    #include "csvSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C b/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C
index b5571b4b81bbfe69b2e7bea9b48549e91dcf160d..62c3b3810d3fe2317bfd92e3d5bd6ad14dc96c86 100644
--- a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C
+++ b/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -185,7 +185,7 @@ void Foam::ensightSetWriter<Type>::write
     const bool writeTracks,
     const PtrList<coordSet>& tracks,
     const wordList& valueSetNames,
-    const List<List<Field<Type> > >& valueSets,
+    const List<List<Field<Type>>>& valueSets,
     Ostream& os
 ) const
 {
@@ -283,7 +283,7 @@ void Foam::ensightSetWriter<Type>::write
         {
             os  << ensightPTraits<Type>::typeName << nl;
 
-            const List<Field<Type> >& fieldVals = valueSets[setI];
+            const List<Field<Type>>& fieldVals = valueSets[setI];
             forAll(fieldVals, trackI)
             {
                 os  << "part" << nl
diff --git a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H b/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H
index 14a735b2edc1595223369854b20204eff5895438..662a62e8c17a23920d45d152f5aea1b02740431e 100644
--- a/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/ensight/ensightSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const;
 };
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ensightSetWriter.C"
+    #include "ensightSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C b/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C
index 5f2d2b66bb96e7a0c73bdfe9cc6ad347fea13e0c..4809bb35045d1963849a585c644396b7b1a7b6d5 100644
--- a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C
+++ b/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ void Foam::gnuplotSetWriter<Type>::write
     const bool writeTracks,
     const PtrList<coordSet>& trackPoints,
     const wordList& valueSetNames,
-    const List<List<Field<Type> > >& valueSets,
+    const List<List<Field<Type>>>& valueSets,
     Ostream& os
 ) const
 {
diff --git a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H b/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H
index 74688771e87b568fe90efe6b8ffc98118c48d04f..786f80cbea87da161c17e8bb7d1754383615de96 100644
--- a/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/gnuplot/gnuplotSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const;
 };
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gnuplotSetWriter.C"
+    #include "gnuplotSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H b/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H
index 613b7f6b5ef165471ade6b5e50e52521675e13ef..2fd8dfafa3e688b538b8abfbd476158057cb596f 100644
--- a/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/jplot/jplotSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,7 +92,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const
         {
@@ -108,7 +108,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "jplotSetWriter.C"
+    #include "jplotSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.C b/src/fileFormats/sampledSetWriters/raw/rawSetWriter.C
index bd1b5e5525cab5c2d494cfc3789c8026f80d3062..ec98384af1d4d2bbb726859b1718160003311404 100644
--- a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.C
+++ b/src/fileFormats/sampledSetWriters/raw/rawSetWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ void Foam::rawSetWriter<Type>::write
     const bool writeTracks,
     const PtrList<coordSet>& points,
     const wordList& valueSetNames,
-    const List<List<Field<Type> > >& valueSets,
+    const List<List<Field<Type>>>& valueSets,
     Ostream& os
 ) const
 {
diff --git a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.H b/src/fileFormats/sampledSetWriters/raw/rawSetWriter.H
index 89c857d779c979a76fcebf24a7198f4a844fe474..73c68944684dbe924eeff5eadff2040da2164333 100644
--- a/src/fileFormats/sampledSetWriters/raw/rawSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/raw/rawSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const;
 };
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "rawSetWriter.C"
+    #include "rawSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C b/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C
index d3208e968d6f8f2082406b9a7aee75e9df69c81c..4663b0878f46cf4eba3af28d12062661b9c4ab2f 100644
--- a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C
+++ b/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,7 +109,7 @@ void Foam::vtkSetWriter<Type>::write
     const bool writeTracks,
     const PtrList<coordSet>& tracks,
     const wordList& valueSetNames,
-    const List<List<Field<Type> > >& valueSets,
+    const List<List<Field<Type>>>& valueSets,
     Ostream& os
 ) const
 {
@@ -172,7 +172,7 @@ void Foam::vtkSetWriter<Type>::write
         os  << valueSetNames[setI] << ' ' << pTraits<Type>::nComponents << ' '
             << nPoints << " float" << nl;
 
-        const List<Field<Type> >& fieldVals = valueSets[setI];
+        const List<Field<Type>>& fieldVals = valueSets[setI];
 
         forAll(fieldVals, i)
         {
diff --git a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H b/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H
index 21bd80ef1e7dad0c5c49c911cdf9a09152b1e684..b09e417a45b7a7272d401227bd48356bc53e999c 100644
--- a/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/vtk/vtkSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const;
 };
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "vtkSetWriter.C"
+    #include "vtkSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/sampledSetWriters/writer.C b/src/fileFormats/sampledSetWriters/writer.C
index 6ccf51c743871e6b280b889ace654b7070e444fd..aa195da043ebfaecf2e575d2aa8e249473202e4e 100644
--- a/src/fileFormats/sampledSetWriters/writer.C
+++ b/src/fileFormats/sampledSetWriters/writer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr< Foam::writer<Type> > Foam::writer<Type>::New
+Foam::autoPtr<Foam::writer<Type>> Foam::writer<Type>::New
 (
     const word& writeType
 )
@@ -49,7 +49,7 @@ Foam::autoPtr< Foam::writer<Type> > Foam::writer<Type>::New
             << exit(FatalError);
     }
 
-    return autoPtr<writer<Type> >(cstrIter()());
+    return autoPtr<writer<Type>>(cstrIter()());
 }
 
 
@@ -155,7 +155,7 @@ void Foam::writer<Type>::write
 (
     const coordSet& points,
     const wordList& valueSetNames,
-    const List<Field<Type> >& valueSets,
+    const List<Field<Type>>& valueSets,
     Ostream& os
 ) const
 {
diff --git a/src/fileFormats/sampledSetWriters/writer.H b/src/fileFormats/sampledSetWriters/writer.H
index 8c754bd47b13444b07874c0ad1f71e499f921925..8d36cabea423f5989cae780bf35b4a1a667ca1ba 100644
--- a/src/fileFormats/sampledSetWriters/writer.H
+++ b/src/fileFormats/sampledSetWriters/writer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Description
     Example:
     \verbatim
         // Construct writer of xmgr type
-        autoPtr<writer<scalar> > scalarFormatter(writer<scalar>::New("xmgr"));
+        autoPtr<writer<scalar>> scalarFormatter(writer<scalar>::New("xmgr"));
 
         // Output list of points and corresponding values
         scalarFormatter().write
@@ -165,7 +165,7 @@ public:
         (
             const coordSet&,
             const wordList&,
-            const List<Field<Type> >&,
+            const List<Field<Type>>&,
             Ostream&
         ) const;
 
@@ -178,7 +178,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const = 0;
 
@@ -209,7 +209,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writer.C"
+    #include "writer.C"
 #endif
 
 
diff --git a/src/fileFormats/sampledSetWriters/writers.C b/src/fileFormats/sampledSetWriters/writers.C
index 4bcc1b39b28b1911509a8d76a90caad28bb200c2..f7f1018064edb0d0a338bfb05b78178692046ba7 100644
--- a/src/fileFormats/sampledSetWriters/writers.C
+++ b/src/fileFormats/sampledSetWriters/writers.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,8 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define defineSetWriterType(dataType)                                         \
-    defineNamedTemplateTypeNameAndDebug(writer<dataType >, 0);                \
+#define defineSetWriterType(dataType)                                          \
+    defineNamedTemplateTypeNameAndDebug(writer<dataType >, 0);                 \
     defineTemplatedRunTimeSelectionTable(writer, word, dataType);
 
 defineSetWriterType(scalar);
diff --git a/src/fileFormats/sampledSetWriters/writers.H b/src/fileFormats/sampledSetWriters/writers.H
index 601e7bcd16108f6be6d2e74d9fb524dee6ea62b2..19ca8be0ff044d8696988604b36d4af730007b81 100644
--- a/src/fileFormats/sampledSetWriters/writers.H
+++ b/src/fileFormats/sampledSetWriters/writers.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,36 +39,36 @@ SourceFiles
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 // Only used internally
-#define makeTypeSetWritersTypeName(typeWriter, dataType)                      \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(typeWriter< dataType >, 0)
+#define makeTypeSetWritersTypeName(typeWriter, dataType)                       \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(typeWriter<dataType>, 0)
 
 // Sometimes used externally
-#define makeSetWritersTypeName(typeWriter)                                    \
-                                                                              \
-    makeTypeSetWritersTypeName(typeWriter, scalar);                           \
-    makeTypeSetWritersTypeName(typeWriter, vector);                           \
-    makeTypeSetWritersTypeName(typeWriter, sphericalTensor);                  \
-    makeTypeSetWritersTypeName(typeWriter, symmTensor);                       \
+#define makeSetWritersTypeName(typeWriter)                                     \
+                                                                               \
+    makeTypeSetWritersTypeName(typeWriter, scalar);                            \
+    makeTypeSetWritersTypeName(typeWriter, vector);                            \
+    makeTypeSetWritersTypeName(typeWriter, sphericalTensor);                   \
+    makeTypeSetWritersTypeName(typeWriter, symmTensor);                        \
     makeTypeSetWritersTypeName(typeWriter, tensor)
 
 // Define type info for single dataType template instantiation (eg, vector)
-#define makeSetWriterType(typeWriter, dataType)                               \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(typeWriter< dataType >, 0);           \
-    addTemplatedToRunTimeSelectionTable                                       \
-    (                                                                         \
-        writer, typeWriter, dataType, word                                    \
+#define makeSetWriterType(typeWriter, dataType)                                \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(typeWriter<dataType>, 0);              \
+    addTemplatedToRunTimeSelectionTable                                        \
+    (                                                                          \
+        writer, typeWriter, dataType, word                                     \
     )
 
 
 // Define type info for scalar, vector etc. instantiations
-#define makeSetWriters(typeWriter)                                            \
-                                                                              \
-    makeSetWriterType(typeWriter, scalar);                                    \
-    makeSetWriterType(typeWriter, vector);                                    \
-    makeSetWriterType(typeWriter, sphericalTensor);                           \
-    makeSetWriterType(typeWriter, symmTensor);                                \
+#define makeSetWriters(typeWriter)                                             \
+                                                                               \
+    makeSetWriterType(typeWriter, scalar);                                     \
+    makeSetWriterType(typeWriter, vector);                                     \
+    makeSetWriterType(typeWriter, sphericalTensor);                            \
+    makeSetWriterType(typeWriter, symmTensor);                                 \
     makeSetWriterType(typeWriter, tensor)
 
 
diff --git a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C b/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C
index 15f2e0eaf89341c8b28c92d097f6c3ea0caa56d6..23f30cc9a63484a77c4fd7f3c1b616289ce88c27 100644
--- a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C
+++ b/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ void Foam::xmgraceSetWriter<Type>::write
     const bool writeTracks,
     const PtrList<coordSet>& trackPoints,
     const wordList& valueSetNames,
-    const List<List<Field<Type> > >& valueSets,
+    const List<List<Field<Type>>>& valueSets,
     Ostream& os
 ) const
 {
diff --git a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H b/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H
index 47c36289366591a65af2a14bc0da1247c89a1e6c..cb357d7cfd38cf17b39b7cbfe76665c4058ccdc4 100644
--- a/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H
+++ b/src/fileFormats/sampledSetWriters/xmgrace/xmgraceSetWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
             const bool writeTracks,
             const PtrList<coordSet>&,
             const wordList& valueSetNames,
-            const List<List<Field<Type> > >&,
+            const List<List<Field<Type>>>&,
             Ostream&
         ) const;
 };
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "xmgraceSetWriter.C"
+    #include "xmgraceSetWriter.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fileFormats/vtk/vtkUnstructuredReader.H b/src/fileFormats/vtk/vtkUnstructuredReader.H
index 7c93f86be66afd8d5b80bee6bb2c2d024a14374c..7ea0a4ae20346f31605ebbfbbc97b189b7e986c4 100644
--- a/src/fileFormats/vtk/vtkUnstructuredReader.H
+++ b/src/fileFormats/vtk/vtkUnstructuredReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -365,7 +365,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "vtkUnstructuredReaderTemplates.C"
+    #include "vtkUnstructuredReaderTemplates.C"
 #endif
 
 
diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files
index e4ff95aee9ac965d00f0f217ff45984b5b260cb3..cb44ca9e26fe66ddf3f8ceb48407b5b8d7f08188 100644
--- a/src/finiteVolume/Make/files
+++ b/src/finiteVolume/Make/files
@@ -98,6 +98,7 @@ $(fvPatchFields)/fvPatchField/fvPatchFields.C
 basicFvPatchFields = $(fvPatchFields)/basic
 $(basicFvPatchFields)/basicSymmetry/basicSymmetryFvPatchScalarField.C
 $(basicFvPatchFields)/calculated/calculatedFvPatchFields.C
+$(basicFvPatchFields)/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C
 $(basicFvPatchFields)/coupled/coupledFvPatchFields.C
 $(basicFvPatchFields)/directionMixed/directionMixedFvPatchFields.C
 $(basicFvPatchFields)/fixedGradient/fixedGradientFvPatchFields.C
@@ -136,6 +137,7 @@ $(derivedFvPatchFields)/cylindricalInletVelocity/cylindricalInletVelocityFvPatch
 $(derivedFvPatchFields)/fan/fanFvPatchFields.C
 $(derivedFvPatchFields)/fanPressure/fanPressureFvPatchScalarField.C
 $(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
+$(derivedFvPatchFields)/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.C
 $(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C
 $(derivedFvPatchFields)/fixedJump/fixedJumpFvPatchFields.C
 $(derivedFvPatchFields)/fixedJumpAMI/fixedJumpAMIFvPatchFields.C
@@ -154,8 +156,8 @@ $(derivedFvPatchFields)/mappedFixedPushedInternalValue/mappedFixedPushedInternal
 $(derivedFvPatchFields)/mappedFixedValue/mappedFixedValueFvPatchFields.C
 $(derivedFvPatchFields)/mappedFlowRate/mappedFlowRateFvPatchVectorField.C
 $(derivedFvPatchFields)/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
+$(derivedFvPatchFields)/noSlip/noSlipFvPatchVectorField.C
 $(derivedFvPatchFields)/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
-$(derivedFvPatchFields)/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
 $(derivedFvPatchFields)/outletInlet/outletInletFvPatchFields.C
 $(derivedFvPatchFields)/outletMappedUniformInlet/outletMappedUniformInletFvPatchFields.C
 $(derivedFvPatchFields)/partialSlip/partialSlipFvPatchFields.C
@@ -387,12 +389,14 @@ laplacianSchemes = finiteVolume/laplacianSchemes
 $(laplacianSchemes)/laplacianScheme/laplacianSchemes.C
 $(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C
 
+finiteVolume/fvc/fvcFlux.C
 finiteVolume/fvc/fvcMeshPhi.C
 finiteVolume/fvc/fvcSmooth/fvcSmooth.C
 finiteVolume/fvc/fvcReconstructMag.C
 
 general = cfdTools/general
 $(general)/findRefCell/findRefCell.C
+$(general)/constrainHbyA/constrainHbyA.C
 $(general)/adjustPhi/adjustPhi.C
 $(general)/bound/bound.C
 $(general)/CorrectPhi/correctUphiBCs.C
@@ -422,6 +426,7 @@ $(SRF)/SRFModel/SRFModel/SRFModel.C
 $(SRF)/SRFModel/SRFModel/SRFModelNew.C
 $(SRF)/SRFModel/rpm/rpm.C
 $(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
+$(SRF)/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.C
 $(SRF)/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
 
 fvOptions = $(general)/fvOptions
diff --git a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C
index c6cdff20c5890b28d59ccd1a626c2454b4e9e1dc..f0fd91f4bae11a0b2cde9b2c601d9fff6a907f3b 100644
--- a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C
+++ b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,6 +31,7 @@ License
 #include "fvmLaplacian.H"
 #include "fvcDiv.H"
 #include "fixedValueFvPatchFields.H"
+#include "zeroGradientFvPatchFields.H"
 #include "adjustPhi.H"
 #include "fvcMeshPhi.H"
 #include "pimpleControl.H"
diff --git a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.H b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.H
index ecf8559c8bfcf4033564a9bf6ee84d6e8dae34fa..ce936721db32b536a5beaed3629abf068cb43209 100644
--- a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.H
+++ b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ namespace Foam
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CorrectPhi.C"
+    #include "CorrectPhi.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C
index 42c6e048342a4aae96f9eebfeee7b193ce01142c..90239b4984e63983ac0bf8ac41d657ddb3184e2e 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -253,7 +253,7 @@ Foam::MRFZone::MRFZone
     ),
     origin_(coeffs_.lookup("origin")),
     axis_(coeffs_.lookup("axis")),
-    omega_(DataEntry<scalar>::New("omega", coeffs_))
+    omega_(Function1<scalar>::New("omega", coeffs_))
 {
     if (cellZoneName_ == word::null)
     {
@@ -423,7 +423,7 @@ void Foam::MRFZone::makeRelative(volVectorField& U) const
         forAll(includedFaces_[patchi], i)
         {
             label patchFacei = includedFaces_[patchi][i];
-            U.boundaryField()[patchi][patchFacei] = vector::zero;
+            U.boundaryField()[patchi][patchFacei] = Zero;
         }
     }
 
@@ -453,6 +453,12 @@ void Foam::MRFZone::makeRelative(FieldField<fvsPatchField, scalar>& phi) const
 }
 
 
+void Foam::MRFZone::makeRelative(Field<scalar>& phi, const label patchi) const
+{
+    makeRelativeRhoFlux(oneField(), phi, patchi);
+}
+
+
 void Foam::MRFZone::makeRelative
 (
     const surfaceScalarField& rho,
diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H
index dfe213c39008909d6f6da1c762f001ce8b826b59..d6ea9cdf5c2361ac948ec28b546dd6b6b152e43d 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ SourceFiles
 #include "surfaceFields.H"
 #include "fvMatricesFwd.H"
 #include "mapPolyMesh.H"
-#include "DataEntry.H"
+#include "Function1.H"
 #include "autoPtr.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -105,7 +105,7 @@ class MRFZone
         vector axis_;
 
         //- Angular velocty (rad/sec)
-        autoPtr<DataEntry<scalar> > omega_;
+        autoPtr<Function1<scalar>> omega_;
 
 
     // Private Member Functions
@@ -129,6 +129,15 @@ class MRFZone
             FieldField<fvsPatchField, scalar>& phi
         ) const;
 
+        //- Make the given absolute mass/vol flux relative within the MRF region
+        template<class RhoFieldType>
+        void makeRelativeRhoFlux
+        (
+            const RhoFieldType& rho,
+            Field<scalar>& phi,
+            const label patchi
+        ) const;
+
         //- Make the given relative mass/vol flux absolute within the MRF region
         template<class RhoFieldType>
         void makeAbsoluteRhoFlux
@@ -226,6 +235,10 @@ public:
             //  within the MRF region
             void makeRelative(FieldField<fvsPatchField, scalar>& phi) const;
 
+            //- Make the given absolute patch flux relative
+            //  within the MRF region
+            void makeRelative(Field<scalar>& phi, const label patchi) const;
+
             //- Make the given absolute mass-flux relative within the MRF region
             void makeRelative
             (
@@ -267,7 +280,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MRFZoneTemplates.C"
+    #include "MRFZoneTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C
index 29c13a6fd2841cb8ff75dc8c07985cb3e4e015e6..271157b9a67543f8f159c9e150de8da22a449f1d 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -177,10 +177,10 @@ Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::DDt
                 U.mesh()
             ),
             U.mesh(),
-            dimensionedVector("0", U.dimensions()/dimTime, vector::zero)
+            dimensionedVector("0", U.dimensions()/dimTime, Zero)
         )
     );
-    volVectorField& acceleration = tacceleration();
+    volVectorField& acceleration = tacceleration.ref();
 
     forAll(*this, i)
     {
@@ -221,29 +221,85 @@ void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const
 
 Foam::tmp<Foam::surfaceScalarField> Foam::MRFZoneList::relative
 (
-    const tmp<surfaceScalarField>& phi
+    const tmp<surfaceScalarField>& tphi
 ) const
 {
-    tmp<surfaceScalarField> rphi(phi.ptr());
-    makeRelative(rphi());
-    return rphi;
+    if (size())
+    {
+        tmp<surfaceScalarField> rphi
+        (
+            New
+            (
+                tphi,
+                "relative(" + tphi().name() + ')',
+                tphi().dimensions(),
+                true
+            )
+        );
+
+        makeRelative(rphi.ref());
+
+        tphi.clear();
+
+        return rphi;
+    }
+    else
+    {
+        return tmp<surfaceScalarField>(tphi, true);
+    }
 }
 
 
-Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Foam::scalar> >
+Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Foam::scalar>>
 Foam::MRFZoneList::relative
 (
-    const tmp<FieldField<fvsPatchField, scalar> >& phi
+    const tmp<FieldField<fvsPatchField, scalar>>& tphi
 ) const
 {
-    tmp<FieldField<fvsPatchField, scalar> > rphi(phi.ptr());
+    if (size())
+    {
+        tmp<FieldField<fvsPatchField, scalar>> rphi(New(tphi, true));
 
-    forAll(*this, i)
+        forAll(*this, i)
+        {
+            operator[](i).makeRelative(rphi.ref());
+        }
+
+        tphi.clear();
+
+        return rphi;
+    }
+    else
     {
-        operator[](i).makeRelative(rphi());
+        return tmp<FieldField<fvsPatchField, scalar>>(tphi, true);
     }
+}
+
+
+Foam::tmp<Foam::Field<Foam::scalar>>
+Foam::MRFZoneList::relative
+(
+    const tmp<Field<scalar>>& tphi,
+    const label patchi
+) const
+{
+    if (size())
+    {
+        tmp<Field<scalar>> rphi(New(tphi, true));
+
+        forAll(*this, i)
+        {
+            operator[](i).makeRelative(rphi.ref(), patchi);
+        }
+
+        tphi.clear();
 
-    return rphi;
+        return rphi;
+    }
+    else
+    {
+        return tmp<Field<scalar>>(tphi, true);
+    }
 }
 
 
@@ -280,12 +336,32 @@ void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const
 
 Foam::tmp<Foam::surfaceScalarField> Foam::MRFZoneList::absolute
 (
-    const tmp<surfaceScalarField>& phi
+    const tmp<surfaceScalarField>& tphi
 ) const
 {
-    tmp<surfaceScalarField> rphi(phi.ptr());
-    makeAbsolute(rphi());
-    return rphi;
+    if (size())
+    {
+        tmp<surfaceScalarField> rphi
+        (
+            New
+            (
+                tphi,
+                "absolute(" + tphi().name() + ')',
+                tphi().dimensions(),
+                true
+            )
+        );
+
+        makeAbsolute(rphi.ref());
+
+        tphi.clear();
+
+        return rphi;
+    }
+    else
+    {
+        return tmp<surfaceScalarField>(tphi, true);
+    }
 }
 
 
diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H
index 016bbded84f2b1536345673b8cbf61e1eec20f36..fb36e689ea37d2f137d5212aa680694f6914f424 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -137,9 +137,17 @@ public:
 
         //- Return the given absolute boundary flux relative within
         //  the MRF region
-        tmp<FieldField<fvsPatchField, scalar> > relative
+        tmp<FieldField<fvsPatchField, scalar>> relative
         (
-            const tmp<FieldField<fvsPatchField, scalar> >& tphi
+            const tmp<FieldField<fvsPatchField, scalar>>& tphi
+        ) const;
+
+        //- Return the given absolute patch flux relative within
+        //  the MRF region
+        tmp<Field<scalar>> relative
+        (
+            const tmp<Field<scalar>>& tphi,
+            const label patchi
         ) const;
 
         //- Make the given absolute mass-flux relative within the MRF region
diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C
index ff056fb3b352862b579509ffe070f1f7261dfc7e..b4a59329df15c78901f3074124eb85d4d9bfdb5e 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,6 +97,40 @@ void Foam::MRFZone::makeRelativeRhoFlux
 }
 
 
+template<class RhoFieldType>
+void Foam::MRFZone::makeRelativeRhoFlux
+(
+    const RhoFieldType& rho,
+    Field<scalar>& phi,
+    const label patchi
+) const
+{
+    const surfaceVectorField& Cf = mesh_.Cf();
+    const surfaceVectorField& Sf = mesh_.Sf();
+
+    const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
+
+    // Included patches
+    forAll(includedFaces_[patchi], i)
+    {
+        label patchFacei = includedFaces_[patchi][i];
+
+        phi[patchFacei] = 0.0;
+    }
+
+    // Excluded patches
+    forAll(excludedFaces_[patchi], i)
+    {
+        label patchFacei = excludedFaces_[patchi][i];
+
+        phi[patchFacei] -=
+            rho[patchFacei]
+          * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
+          & Sf.boundaryField()[patchi][patchFacei];
+    }
+}
+
+
 template<class RhoFieldType>
 void Foam::MRFZone::makeAbsoluteRhoFlux
 (
diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C
index 07cd9cb3075649adff7f0fddce9eafc6bde985e2..7077bc2f6b05d0e5fa23e5465acf042e6a152edf 100644
--- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C
+++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ Foam::SRF::SRFModel::SRFModel
     origin_("origin", dimLength, lookup("origin")),
     axis_(lookup("axis")),
     SRFModelCoeffs_(subDict(type + "Coeffs")),
-    omega_(dimensionedVector("omega", dimless/dimTime, vector::zero))
+    omega_(dimensionedVector("omega", dimless/dimTime, Zero))
 {
     // Normalise the axis
     axis_ /= mag(axis_);
@@ -118,10 +118,10 @@ const Foam::dimensionedVector& Foam::SRF::SRFModel::omega() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh>>
 Foam::SRF::SRFModel::Fcoriolis() const
 {
-    return tmp<DimensionedField<vector, volMesh> >
+    return tmp<DimensionedField<vector, volMesh>>
     (
         new DimensionedField<vector, volMesh>
         (
@@ -139,10 +139,10 @@ Foam::SRF::SRFModel::Fcoriolis() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh>>
 Foam::SRF::SRFModel::Fcentrifugal() const
 {
-    return tmp<DimensionedField<vector, volMesh> >
+    return tmp<DimensionedField<vector, volMesh>>
     (
         new DimensionedField<vector, volMesh>
         (
@@ -160,7 +160,7 @@ Foam::SRF::SRFModel::Fcentrifugal() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh>>
 Foam::SRF::SRFModel::Su() const
 {
     return Fcoriolis() + Fcentrifugal();
@@ -226,7 +226,7 @@ Foam::tmp<Foam::volVectorField> Foam::SRF::SRFModel::Uabs() const
     );
 
     // Add SRF contribution to internal field
-    tUabs().internalField() += Urel_.internalField();
+    tUabs.ref().internalField() += Urel_.internalField();
 
     // Add Urel boundary contributions
     const volVectorField::GeometricBoundaryField& bvf = Urel_.boundaryField();
@@ -241,12 +241,12 @@ Foam::tmp<Foam::volVectorField> Foam::SRF::SRFModel::Uabs() const
                 refCast<const SRFVelocityFvPatchVectorField>(bvf[i]);
             if (UrelPatch.relative())
             {
-                tUabs().boundaryField()[i] += Urel_.boundaryField()[i];
+                tUabs.ref().boundaryField()[i] += Urel_.boundaryField()[i];
             }
         }
         else
         {
-            tUabs().boundaryField()[i] += Urel_.boundaryField()[i];
+            tUabs.ref().boundaryField()[i] += Urel_.boundaryField()[i];
         }
     }
 
diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.H b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.H
index 35c0a0dea47152e387f8e7702c391636002ecfae..998bb12f33fb9d648eaede34909197177ca1b911 100644
--- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.H
+++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -162,13 +162,13 @@ public:
             const dimensionedVector& omega() const;
 
             //- Return the coriolis force
-            tmp<DimensionedField<vector, volMesh> > Fcoriolis() const;
+            tmp<DimensionedField<vector, volMesh>> Fcoriolis() const;
 
             //- Return the centrifugal force
-            tmp<DimensionedField<vector, volMesh> > Fcentrifugal() const;
+            tmp<DimensionedField<vector, volMesh>> Fcentrifugal() const;
 
             //- Source term component for momentum equation
-            tmp<DimensionedField<vector, volMesh> > Su() const;
+            tmp<DimensionedField<vector, volMesh>> Su() const;
 
             //- Return velocity vector from positions
             vectorField velocity(const vectorField& positions) const;
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
index b463e79d80c5210a88653b7ad4d37aec7f19d3f4..bfb1caf47055d8b305f94f2836bc56c772783124 100644
--- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ SRFFreestreamVelocityFvPatchVectorField
 :
     inletOutletFvPatchVectorField(p, iF),
     relative_(false),
-    UInf_(vector::zero)
+    UInf_(Zero)
 {}
 
 
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
index 2a1751370033b6a0ca475ab230319c957497e023..ec59dbedfc4831e63df8014b5dee16f85967cc4c 100644
--- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ Foam::SRFVelocityFvPatchVectorField::SRFVelocityFvPatchVectorField
 :
     fixedValueFvPatchVectorField(p, iF),
     relative_(0),
-    inletValue_(p.size(), vector::zero)
+    inletValue_(p.size(), Zero)
 {}
 
 
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.C
new file mode 100644
index 0000000000000000000000000000000000000000..17c0dc700f8b4903566e537239b0cc1532f993de
--- /dev/null
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.C
@@ -0,0 +1,150 @@
+/*---------------------------------------------------------------------------* \
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "SRFWallVelocityFvPatchVectorField.H"
+#include "addToRunTimeSelectionTable.H"
+#include "volFields.H"
+
+#include "SRFModel.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
+(
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF
+)
+:
+    fixedValueFvPatchVectorField(p, iF)
+{}
+
+
+Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
+(
+    const SRFWallVelocityFvPatchVectorField& ptf,
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedValueFvPatchVectorField(ptf, p, iF, mapper)
+{}
+
+
+Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
+(
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    fixedValueFvPatchVectorField(p, iF)
+{
+    fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
+}
+
+
+Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
+(
+    const SRFWallVelocityFvPatchVectorField& srfvpvf
+)
+:
+    fixedValueFvPatchVectorField(srfvpvf)
+{}
+
+
+Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
+(
+    const SRFWallVelocityFvPatchVectorField& srfvpvf,
+    const DimensionedField<vector, volMesh>& iF
+)
+:
+    fixedValueFvPatchVectorField(srfvpvf, iF)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::SRFWallVelocityFvPatchVectorField::autoMap
+(
+    const fvPatchFieldMapper& m
+)
+{
+    vectorField::autoMap(m);
+}
+
+
+void Foam::SRFWallVelocityFvPatchVectorField::rmap
+(
+    const fvPatchVectorField& ptf,
+    const labelList& addr
+)
+{
+    fixedValueFvPatchVectorField::rmap(ptf, addr);
+}
+
+
+void Foam::SRFWallVelocityFvPatchVectorField::updateCoeffs()
+{
+    if (updated())
+    {
+        return;
+    }
+
+    // Get reference to the SRF model
+    const SRF::SRFModel& srf =
+        db().lookupObject<SRF::SRFModel>("SRFProperties");
+
+    // Determine patch velocity due to SRF
+    const vectorField Up(-srf.velocity(patch().Cf()));
+
+    // Remove the component of Up normal to the wall
+    // just in case it is not exactly circular
+    const vectorField n(patch().nf());
+    vectorField::operator=(Up - n*(n & Up));
+
+    fixedValueFvPatchVectorField::updateCoeffs();
+}
+
+
+void Foam::SRFWallVelocityFvPatchVectorField::write(Ostream& os) const
+{
+    fvPatchVectorField::write(os);
+    writeEntry("value", os);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makePatchTypeField
+    (
+        fvPatchVectorField,
+        SRFWallVelocityFvPatchVectorField
+    );
+}
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H
new file mode 100644
index 0000000000000000000000000000000000000000..060898c65e844693c5e340163c35ca3fa4632b88
--- /dev/null
+++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFWallVelocityFvPatchVectorField/SRFWallVelocityFvPatchVectorField.H
@@ -0,0 +1,199 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::SRFWallVelocityFvPatchVectorField
+
+Group
+    grpWallBoundaryConditions
+
+Description
+    Wall-velocity condition to be used in conjunction with the single rotating
+    frame (SRF) model (see: FOAM::SRFModel)
+
+    The condition applies the appropriate rotation transformation in time and
+    space to determine the local SRF velocity of the wall.
+
+        \f[
+            U_p = - U_{p,srf}
+        \f]
+
+    where
+    \vartable
+        U_p     = patch velocity [m/s]
+        U_{p,srf} = SRF velocity
+    \endvartable
+
+    The normal component of \f$ U_p \f$ is removed to ensure 0 wall-flux even
+    if the wall patch faces are irregular.
+
+    \heading Patch usage
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type            SRFWallVelocity;
+        value           uniform (0 0 0);    // Initial value
+    }
+    \endverbatim
+
+SeeAlso
+    Foam::SRFModel
+    Foam::SRFVelocityFvPatchVectorField
+    Foam::fixedValueFvPatchField
+
+SourceFiles
+    SRFWallVelocityFvPatchVectorField.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef SRFWallVelocityFvPatchVectorField_H
+#define SRFWallVelocityFvPatchVectorField_H
+
+#include "fvPatchFields.H"
+#include "fixedValueFvPatchFields.H"
+#include "Switch.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+               Class SRFWallVelocityFvPatchVectorField Declaration
+\*---------------------------------------------------------------------------*/
+
+class SRFWallVelocityFvPatchVectorField
+:
+    public fixedValueFvPatchVectorField
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("SRFWallVelocity");
+
+
+    // Constructors
+
+        //- Construct from patch and internal field
+        SRFWallVelocityFvPatchVectorField
+        (
+            const fvPatch&,
+            const DimensionedField<vector, volMesh>&
+        );
+
+        //- Construct from patch, internal field and dictionary
+        SRFWallVelocityFvPatchVectorField
+        (
+            const fvPatch&,
+            const DimensionedField<vector, volMesh>&,
+            const dictionary&
+        );
+
+        //- Construct by mapping given SRFWallVelocityFvPatchVectorField
+        //  onto a new patch
+        SRFWallVelocityFvPatchVectorField
+        (
+            const SRFWallVelocityFvPatchVectorField&,
+            const fvPatch&,
+            const DimensionedField<vector, volMesh>&,
+            const fvPatchFieldMapper&
+        );
+
+        //- Construct as copy
+        SRFWallVelocityFvPatchVectorField
+        (
+            const SRFWallVelocityFvPatchVectorField&
+        );
+
+        //- Construct and return a clone
+        virtual tmp<fvPatchVectorField> clone() const
+        {
+            return tmp<fvPatchVectorField>
+            (
+                new SRFWallVelocityFvPatchVectorField(*this)
+            );
+        }
+
+        //- Construct as copy setting internal field reference
+        SRFWallVelocityFvPatchVectorField
+        (
+            const SRFWallVelocityFvPatchVectorField&,
+            const DimensionedField<vector, volMesh>&
+        );
+
+        //- Construct and return a clone setting internal field reference
+        virtual tmp<fvPatchVectorField> clone
+        (
+            const DimensionedField<vector, volMesh>& iF
+        ) const
+        {
+            return tmp<fvPatchVectorField>
+            (
+                new SRFWallVelocityFvPatchVectorField(*this, iF)
+            );
+        }
+
+
+    // Member functions
+
+        // Mapping functions
+
+            //- Map (and resize as needed) from self given a mapping object
+            virtual void autoMap
+            (
+                const fvPatchFieldMapper&
+            );
+
+            //- Reverse map the given fvPatchField onto this fvPatchField
+            virtual void rmap
+            (
+                const fvPatchVectorField&,
+                const labelList&
+            );
+
+
+        // Evaluation functions
+
+            //- Update the coefficients associated with the patch field
+            virtual void updateCoeffs();
+
+
+        // I-O
+
+            //- Write
+            virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstantIO.C b/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C
similarity index 57%
rename from src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstantIO.C
rename to src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C
index 4cb72ab8c271088c4cfb7eff2b7d1de1d23677b9..38f84f96a7199d4076679b6fa4c9a1b84e15f83f 100644
--- a/src/OpenFOAM/primitives/functions/DataEntry/CompatibilityConstant/CompatibilityConstantIO.C
+++ b/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,46 +23,49 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "DataEntry.H"
+#include "constrainHbyA.H"
+#include "volFields.H"
+#include "fixedFluxExtrapolatedPressureFvPatchScalarField.H"
 
-// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-template<class Type>
-Foam::Ostream& Foam::operator<<
+Foam::tmp<Foam::volVectorField> Foam::constrainHbyA
 (
-    Ostream& os,
-    const CompatibilityConstant<Type>& cnst
+    const tmp<volVectorField>& tHbyA,
+    const volVectorField& U,
+    const volScalarField& p
 )
 {
-    if (os.format() == IOstream::ASCII)
+    tmp<volVectorField> tHbyANew;
+
+    if (tHbyA.isTmp())
     {
-        os  << static_cast<const DataEntry<Type>& >(cnst)
-            << token::SPACE << cnst.value_;
+        tHbyANew = tHbyA;
+        tHbyANew.ref().rename("HbyA");
     }
     else
     {
-        os  << static_cast<const DataEntry<Type>& >(cnst);
-        os.write
-        (
-            reinterpret_cast<const char*>(&cnst.value_),
-            sizeof(cnst.value_)
-        );
+        tHbyANew = new volVectorField("HbyA", tHbyA);
     }
 
-    // Check state of Ostream
-    os.check
-    (
-        "Ostream& operator<<(Ostream&, const CompatibilityConstant<Type>&)"
-    );
-
-    return os;
-}
+    volVectorField& HbyA = tHbyANew.ref();
 
+    forAll(U.boundaryField(), patchi)
+    {
+        if
+        (
+           !U.boundaryField()[patchi].assignable()
+        && !isA<fixedFluxExtrapolatedPressureFvPatchScalarField>
+            (
+                p.boundaryField()[patchi]
+            )
+        )
+        {
+            HbyA.boundaryField()[patchi] = U.boundaryField()[patchi];
+        }
+    }
 
-template<class Type>
-void Foam::CompatibilityConstant<Type>::writeData(Ostream& os) const
-{
-    os.writeKeyword(this->name_) << value_ << token::END_STATEMENT << nl;
+    return tHbyANew;
 }
 
 
diff --git a/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.H b/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.H
new file mode 100644
index 0000000000000000000000000000000000000000..bc5a914757f9eae6734713fdf0d3ad2f2bf17594
--- /dev/null
+++ b/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.H
@@ -0,0 +1,61 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::constrainHbyA
+
+Description
+
+SourceFiles
+    constrainHbyA.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef constrainHbyA_H
+#define constrainHbyA_H
+
+#include "volFieldsFwd.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+tmp<volVectorField> constrainHbyA
+(
+    const tmp<volVectorField>& tHbyA,
+    const volVectorField& U,
+    const volScalarField& p
+);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.C b/src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.C
new file mode 100644
index 0000000000000000000000000000000000000000..760a33546586571d47f35acaafa76690faa745ea
--- /dev/null
+++ b/src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.C
@@ -0,0 +1,121 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "constrainPressure.H"
+#include "volFields.H"
+#include "surfaceFields.H"
+#include "geometricOneField.H"
+#include "fixedFluxPressureFvPatchScalarField.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+template<class RhoType, class RAUType, class MRFType>
+void Foam::constrainPressure
+(
+    volScalarField& p,
+    const RhoType& rho,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rhorAU,
+    const MRFType& MRF
+)
+{
+    const fvMesh& mesh = p.mesh();
+
+    volScalarField::GeometricBoundaryField& pBf = p.boundaryField();
+
+    const volVectorField::GeometricBoundaryField& UBf = U.boundaryField();
+    const surfaceScalarField::GeometricBoundaryField& phiHbyABf =
+        phiHbyA.boundaryField();
+    const typename RAUType::GeometricBoundaryField& rhorAUBf =
+        rhorAU.boundaryField();
+    const surfaceVectorField::GeometricBoundaryField& SfBf =
+        mesh.Sf().boundaryField();
+    const surfaceScalarField::GeometricBoundaryField& magSfBf =
+        mesh.magSf().boundaryField();
+
+    forAll(pBf, patchi)
+    {
+        if (isA<fixedFluxPressureFvPatchScalarField>(pBf[patchi]))
+        {
+            refCast<fixedFluxPressureFvPatchScalarField>
+            (
+                pBf[patchi]
+            ).updateCoeffs
+            (
+                (
+                    phiHbyABf[patchi]
+                  - rho.boundaryField()[patchi]
+                   *MRF.relative(SfBf[patchi] & UBf[patchi], patchi)
+                )
+               /(magSfBf[patchi]*rhorAUBf[patchi])
+            );
+        }
+    }
+}
+
+
+template<class RAUType>
+void Foam::constrainPressure
+(
+    volScalarField& p,
+    const volScalarField& rho,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rAU
+)
+{
+    constrainPressure(p, rho, U, phiHbyA, rAU, NullMRF());
+}
+
+
+template<class RAUType, class MRFType>
+void Foam::constrainPressure
+(
+    volScalarField& p,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rAU,
+    const MRFType& MRF
+)
+{
+    constrainPressure(p, geometricOneField(), U, phiHbyA, rAU, MRF);
+}
+
+
+template<class RAUType>
+void Foam::constrainPressure
+(
+    volScalarField& p,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rAU
+)
+{
+    constrainPressure(p, U, phiHbyA, rAU, NullMRF());
+}
+
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.H b/src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.H
new file mode 100644
index 0000000000000000000000000000000000000000..1c4a853f52ca34571086c6c0749593666a673c64
--- /dev/null
+++ b/src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.H
@@ -0,0 +1,138 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::constrainPressure
+
+Description
+
+SourceFiles
+    constrainPressure.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef constrainPressure_H
+#define constrainPressure_H
+
+#include "volFieldsFwd.H"
+#include "surfaceFieldsFwd.H"
+#include "IOMRFZoneList.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+/*---------------------------------------------------------------------------*\
+                           Class NullMRF Declaration
+\*---------------------------------------------------------------------------*/
+
+class NullMRF
+{
+public:
+
+    // Constructors
+
+        //- Construct null
+        NullMRF()
+        {}
+
+
+    // Member Functions
+
+        //- Return the argument unchanged
+        template<class Type>
+        inline const Type& relative(const Type& U) const
+        {
+            return U;
+        }
+
+        //- Return the argument unchanged
+        template<class Type>
+        inline const Type& relative(const Type& U, const label patchi) const
+        {
+            return U;
+        }
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+template<class RhoType, class RAUType, class MRFType>
+void constrainPressure
+(
+    volScalarField& p,
+    const RhoType& rho,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rhorAU,
+    const MRFType& MRF
+);
+
+template<class RAUType>
+void constrainPressure
+(
+    volScalarField& p,
+    const volScalarField& rho,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rhorAU
+);
+
+template<class RAUType, class MRFType>
+void constrainPressure
+(
+    volScalarField& p,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rAU,
+    const MRFType& MRF
+);
+
+template<class RAUType>
+void constrainPressure
+(
+    volScalarField& p,
+    const volVectorField& U,
+    const surfaceScalarField& phiHbyA,
+    const RAUType& rAU
+);
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "constrainPressure.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H
index 8362aee7a00f399ddf0b973f8a347a815c11de4c..56e3612b603105a60500bebd10ebe2a787ad666f 100644
--- a/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H
+++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOption.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,13 +25,14 @@ Class
     Foam::fv::option
 
 Description
-    Finite volume options abtract base class.  Provides a base set of controls,
-    e.g.
-
+    Finite volume options abstract base class.  Provides a base set of
+    controls, e.g.:
+    \verbatim
         type            scalarExplicitSource    // source type
         active          on;                     // on/off switch
+    \endverbatim
 
-Note:
+Note
     On evaluation, source/sink options are to be added to the equation R.H.S.
 
 SourceFiles
diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionList.H b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionList.H
index c881fb01b84193b7d95fe5cfb3f1cd3c34537da2..78df2901e18cb79980952751b9b648a8db384ef7 100644
--- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionList.H
+++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,14 +125,14 @@ public:
 
             //- Return source for equation
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 GeometricField<Type, fvPatchField, volMesh>& field
             );
 
             //- Return source for equation with specified name
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 GeometricField<Type, fvPatchField, volMesh>& field,
                 const word& fieldName
@@ -140,7 +140,7 @@ public:
 
             //- Return source for equation
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const volScalarField& rho,
                 GeometricField<Type, fvPatchField, volMesh>& field
@@ -148,7 +148,7 @@ public:
 
             //- Return source for equation with specified name
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const volScalarField& rho,
                 GeometricField<Type, fvPatchField, volMesh>& field,
@@ -157,7 +157,7 @@ public:
 
             //- Return source for equation
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const volScalarField& alpha,
                 const volScalarField& rho,
@@ -166,7 +166,7 @@ public:
 
             //- Return source for equation with specified name
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const volScalarField& alpha,
                 const volScalarField& rho,
@@ -176,7 +176,7 @@ public:
 
             //- Return source for equation
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const volScalarField& alpha,
                 const geometricOneField& rho,
@@ -185,7 +185,7 @@ public:
 
             //- Return source for equation
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const geometricOneField& alpha,
                 const volScalarField& rho,
@@ -194,7 +194,7 @@ public:
 
             //- Return source for equation
             template<class Type>
-            tmp<fvMatrix<Type> > operator()
+            tmp<fvMatrix<Type>> operator()
             (
                 const geometricOneField& alpha,
                 const geometricOneField& rho,
diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionListTemplates.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionListTemplates.C
index 58e362df07f5f3a29cf69c571fffc84190218342..8b9c65856c7739ab68f291205fee7aed10bcba34 100644
--- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptionListTemplates.C
+++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOptionListTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     GeometricField<Type, fvPatchField, volMesh>& field
 )
@@ -36,7 +36,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     GeometricField<Type, fvPatchField, volMesh>& field,
     const word& fieldName
@@ -46,8 +46,8 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
     const dimensionSet ds = field.dimensions()/dimTime*dimVolume;
 
-    tmp<fvMatrix<Type> > tmtx(new fvMatrix<Type>(field, ds));
-    fvMatrix<Type>& mtx = tmtx();
+    tmp<fvMatrix<Type>> tmtx(new fvMatrix<Type>(field, ds));
+    fvMatrix<Type>& mtx = tmtx.ref();
 
     forAll(*this, i)
     {
@@ -77,7 +77,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const volScalarField& rho,
     GeometricField<Type, fvPatchField, volMesh>& field
@@ -88,7 +88,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const volScalarField& rho,
     GeometricField<Type, fvPatchField, volMesh>& field,
@@ -102,8 +102,8 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
         rho.dimensions()*field.dimensions()/dimTime*dimVolume
     );
 
-    tmp<fvMatrix<Type> > tmtx(new fvMatrix<Type>(field, ds));
-    fvMatrix<Type>& mtx = tmtx();
+    tmp<fvMatrix<Type>> tmtx(new fvMatrix<Type>(field, ds));
+    fvMatrix<Type>& mtx = tmtx.ref();
 
     forAll(*this, i)
     {
@@ -133,7 +133,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const volScalarField& alpha,
     const volScalarField& rho,
@@ -145,7 +145,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const volScalarField& alpha,
     const volScalarField& rho,
@@ -161,8 +161,8 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
        /dimTime*dimVolume
     );
 
-    tmp<fvMatrix<Type> > tmtx(new fvMatrix<Type>(field, ds));
-    fvMatrix<Type>& mtx = tmtx();
+    tmp<fvMatrix<Type>> tmtx(new fvMatrix<Type>(field, ds));
+    fvMatrix<Type>& mtx = tmtx.ref();
 
     forAll(*this, i)
     {
@@ -192,7 +192,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const geometricOneField& alpha,
     const geometricOneField& rho,
@@ -204,7 +204,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const volScalarField& alpha,
     const geometricOneField& rho,
@@ -231,7 +231,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
+Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
 (
     const geometricOneField& alpha,
     const volScalarField& rho,
diff --git a/src/finiteVolume/cfdTools/general/fvOptions/makeFvOption.H b/src/finiteVolume/cfdTools/general/fvOptions/makeFvOption.H
index bb4c686a4c5130810baa34f9836934879e2bbced..888225bb7bfe604caec213a8221ded80d3241269 100644
--- a/src/finiteVolume/cfdTools/general/fvOptions/makeFvOption.H
+++ b/src/finiteVolume/cfdTools/general/fvOptions/makeFvOption.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,17 +31,17 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeFvOption(Option, Type)                                            \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        Foam::fv::Option<Foam::Type>,                                         \
-        #Type#Option,                                                         \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    Foam::fv::option::adddictionaryConstructorToTable                         \
-        <Foam::fv::Option<Foam::Type> >                                       \
+#define makeFvOption(Option, Type)                                             \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        Foam::fv::Option<Foam::Type>,                                          \
+        #Type#Option,                                                          \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    Foam::fv::option::adddictionaryConstructorToTable                          \
+        <Foam::fv::Option<Foam::Type>>                                         \
         add##Option##Type##dictionary##ConstructorTooptionTable_
 
 
diff --git a/src/finiteVolume/cfdTools/general/include/createRDeltaT.H b/src/finiteVolume/cfdTools/general/include/createRDeltaT.H
index 5d24e2f78ce1b51a11c5269a91f5f8d654aa4066..9553e0c365086e5d7157aae201830bc6004193d0 100644
--- a/src/finiteVolume/cfdTools/general/include/createRDeltaT.H
+++ b/src/finiteVolume/cfdTools/general/include/createRDeltaT.H
@@ -20,7 +20,7 @@ if (LTS)
             ),
             mesh,
             dimensionedScalar("one", dimless/dimTime, 1),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 }
diff --git a/src/finiteVolume/cfdTools/general/include/fvCFD.H b/src/finiteVolume/cfdTools/general/include/fvCFD.H
index d8eb111f5869fa1dddf0549bfd35373cffd77825..f539b0a004b3a1819ee036b1aa056433fc4f5368 100644
--- a/src/finiteVolume/cfdTools/general/include/fvCFD.H
+++ b/src/finiteVolume/cfdTools/general/include/fvCFD.H
@@ -11,7 +11,12 @@
 #include "linear.H"
 #include "uniformDimensionedFields.H"
 #include "calculatedFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "fixedValueFvPatchFields.H"
+#include "zeroGradientFvPatchFields.H"
+#include "fixedFluxPressureFvPatchScalarField.H"
+#include "constrainHbyA.H"
+#include "constrainPressure.H"
 #include "adjustPhi.H"
 #include "findRefCell.H"
 #include "IOMRFZoneList.H"
diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C
index 20ac7a29b1f42f4a186063906a0789d0846c6a75..ff87ca2e1d0ac46c476dc21f11891af5b3e03b68 100644
--- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C
+++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,12 +79,12 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData()
 {
     if (coordSys_.R().uniform())
     {
-        forAll (cellZoneIDs_, zoneI)
+        forAll(cellZoneIDs_, zoneI)
         {
             D_[zoneI].setSize(1);
             F_[zoneI].setSize(1);
 
-            D_[zoneI][0] = tensor::zero;
+            D_[zoneI][0] = Zero;
             D_[zoneI][0].xx() = dXYZ_.value().x();
             D_[zoneI][0].yy() = dXYZ_.value().y();
             D_[zoneI][0].zz() = dXYZ_.value().z();
@@ -92,7 +92,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData()
             D_[zoneI][0] = coordSys_.R().transformTensor(D_[zoneI][0]);
 
             // leading 0.5 is from 1/2*rho
-            F_[zoneI][0] = tensor::zero;
+            F_[zoneI][0] = Zero;
             F_[zoneI][0].xx() = 0.5*fXYZ_.value().x();
             F_[zoneI][0].yy() = 0.5*fXYZ_.value().y();
             F_[zoneI][0].zz() = 0.5*fXYZ_.value().z();
@@ -111,13 +111,13 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData()
 
             forAll(cells, i)
             {
-                D_[zoneI][i] = tensor::zero;
+                D_[zoneI][i] = Zero;
                 D_[zoneI][i].xx() = dXYZ_.value().x();
                 D_[zoneI][i].yy() = dXYZ_.value().y();
                 D_[zoneI][i].zz() = dXYZ_.value().z();
 
                 // leading 0.5 is from 1/2*rho
-                F_[zoneI][i] = tensor::zero;
+                F_[zoneI][i] = Zero;
                 F_[zoneI][i].xx() = 0.5*fXYZ_.value().x();
                 F_[zoneI][i].yy() = 0.5*fXYZ_.value().y();
                 F_[zoneI][i].zz() = 0.5*fXYZ_.value().z();
@@ -143,7 +143,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData()
                 IOobject::NO_WRITE
             ),
             mesh_,
-            dimensionedTensor("0", dXYZ_.dimensions(), tensor::zero)
+            dimensionedTensor("0", dXYZ_.dimensions(), Zero)
         );
         volTensorField Fout
         (
@@ -156,7 +156,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData()
                 IOobject::NO_WRITE
             ),
             mesh_,
-            dimensionedTensor("0", fXYZ_.dimensions(), tensor::zero)
+            dimensionedTensor("0", fXYZ_.dimensions(), Zero)
         );
 
         UIndirectList<tensor>(Dout, mesh_.cellZones()[cellZoneIDs_[0]]) = D_[0];
@@ -177,7 +177,7 @@ void Foam::porosityModels::DarcyForchheimer::calcForce
 ) const
 {
     scalarField Udiag(U.size(), 0.0);
-    vectorField Usource(U.size(), vector::zero);
+    vectorField Usource(U.size(), Zero);
     const scalarField& V = mesh_.V();
 
     apply(Udiag, Usource, V, rho, mu, U);
diff --git a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C
index eeb4bb3e9c22ea8bbfb6c2fd74e910cf713c1547..35073cd36aa619ac9f23ca59803d956ee8cbfe44 100644
--- a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C
+++ b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,18 +135,18 @@ void Foam::porosityModels::fixedCoeff::calcTransformModelData()
 {
     if (coordSys_.R().uniform())
     {
-        forAll (cellZoneIDs_, zoneI)
+        forAll(cellZoneIDs_, zoneI)
         {
             alpha_[zoneI].setSize(1);
             beta_[zoneI].setSize(1);
 
-            alpha_[zoneI][0] = tensor::zero;
+            alpha_[zoneI][0] = Zero;
             alpha_[zoneI][0].xx() = alphaXYZ_.value().x();
             alpha_[zoneI][0].yy() = alphaXYZ_.value().y();
             alpha_[zoneI][0].zz() = alphaXYZ_.value().z();
             alpha_[zoneI][0] = coordSys_.R().transformTensor(alpha_[zoneI][0]);
 
-            beta_[zoneI][0] = tensor::zero;
+            beta_[zoneI][0] = Zero;
             beta_[zoneI][0].xx() = betaXYZ_.value().x();
             beta_[zoneI][0].yy() = betaXYZ_.value().y();
             beta_[zoneI][0].zz() = betaXYZ_.value().z();
@@ -164,12 +164,12 @@ void Foam::porosityModels::fixedCoeff::calcTransformModelData()
 
             forAll(cells, i)
             {
-                alpha_[zoneI][i] = tensor::zero;
+                alpha_[zoneI][i] = Zero;
                 alpha_[zoneI][i].xx() = alphaXYZ_.value().x();
                 alpha_[zoneI][i].yy() = alphaXYZ_.value().y();
                 alpha_[zoneI][i].zz() = alphaXYZ_.value().z();
 
-                beta_[zoneI][i] = tensor::zero;
+                beta_[zoneI][i] = Zero;
                 beta_[zoneI][i].xx() = betaXYZ_.value().x();
                 beta_[zoneI][i].yy() = betaXYZ_.value().y();
                 beta_[zoneI][i].zz() = betaXYZ_.value().z();
@@ -193,7 +193,7 @@ void Foam::porosityModels::fixedCoeff::calcForce
 ) const
 {
     scalarField Udiag(U.size(), 0.0);
-    vectorField Usource(U.size(), vector::zero);
+    vectorField Usource(U.size(), Zero);
     const scalarField& V = mesh_.V();
     scalar rhoRef = readScalar(coeffs_.lookup("rhoRef"));
 
diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C
index 8dd817f29308b98be6ed9f78be9ea2c6fdc4ebda..0338e35154588ce72288dc1b0ba09c61cb356087 100644
--- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C
+++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -154,11 +154,11 @@ Foam::tmp<Foam::vectorField> Foam::porosityModel::porosityModel::force
 {
     transformModelData();
 
-    tmp<vectorField> tforce(new vectorField(U.size(), vector::zero));
+    tmp<vectorField> tforce(new vectorField(U.size(), Zero));
 
     if (!cellZoneIDs_.empty())
     {
-        this->calcForce(U, rho, mu, tforce());
+        this->calcForce(U, rho, mu, tforce.ref());
     }
 
     return tforce;
diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C
index 49c670b010cfeb0a9071a1c4dfe81502d32960ed..eaff075899ac2b1259be6c155aab5e4e069e0c94 100644
--- a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C
+++ b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,9 @@ namespace Foam
 Foam::pisoControl::pisoControl(fvMesh& mesh, const word& dictName)
 :
     pimpleControl(mesh, dictName)
-{}
+{
+    // mesh_.data::add("finalIteration", true);
+}
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H
index 3d412e7406e11b57428928f57e0ff2bf3379f1c2..9b5a85de74efe4fdc7cf553749eb3adcfa290326 100644
--- a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H
+++ b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControl.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,9 +72,21 @@ public:
 
     //- Destructor
     virtual ~pisoControl();
+
+
+    // Member Functions
+
+        // Solution control
+
+            //- Return true if in the final inner (PISO) iteration
+            inline bool finalInnerIter() const;
 };
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "pisoControlI.H"
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControlI.H b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControlI.H
new file mode 100644
index 0000000000000000000000000000000000000000..d973e5a15a910e78e72160e3c55a2f6950e1ca49
--- /dev/null
+++ b/src/finiteVolume/cfdTools/general/solutionControl/pisoControl/pisoControlI.H
@@ -0,0 +1,36 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline bool Foam::pisoControl::finalInnerIter() const
+{
+    return
+       corrPISO_ == nCorrPISO_
+    && corrNonOrtho_ == nNonOrthCorr_ + 1;
+}
+
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/cfdTools/general/solutionControl/simpleControl/simpleControl.H b/src/finiteVolume/cfdTools/general/solutionControl/simpleControl/simpleControl.H
index 71f8d0e04c70d32089e5d2b4a37f6747587abba8..a9b3b5b49b620395b183b36f23291d51378c6a1a 100644
--- a/src/finiteVolume/cfdTools/general/solutionControl/simpleControl/simpleControl.H
+++ b/src/finiteVolume/cfdTools/general/solutionControl/simpleControl/simpleControl.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,6 +65,11 @@ protected:
         //- Return true if all convergence checks are satisfied
         bool criteriaSatisfied();
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         simpleControl(const simpleControl&);
 
@@ -74,7 +79,6 @@ protected:
 
 public:
 
-
     // Static Data Members
 
         //- Run-time type information
diff --git a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C
index da151d335b180668d7fcbe58d69026b0aac565f4..fb5a15414f33cb5f08e38f3edc94fa44071e4e71 100644
--- a/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C
+++ b/src/finiteVolume/cfdTools/general/solutionControl/solutionControl/solutionControl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -185,7 +185,7 @@ void Foam::solutionControl::maxTypeResidual
 
     if (mesh_.foundObject<fieldType>(fieldName))
     {
-        const List<SolverPerformance<Type> > sp(data);
+        const List<SolverPerformance<Type>> sp(data);
         firstRes = cmptMax(sp.first().initialResidual());
         lastRes = cmptMax(sp.last().initialResidual());
     }
diff --git a/src/finiteVolume/cfdTools/incompressible/createPhi.H b/src/finiteVolume/cfdTools/incompressible/createPhi.H
index c0c58423193052d9a75326e3f0697d6f5cd1f825..f2d8b4f9fb8043e051419d223ea70996c7624fdd 100644
--- a/src/finiteVolume/cfdTools/incompressible/createPhi.H
+++ b/src/finiteVolume/cfdTools/incompressible/createPhi.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ surfaceScalarField phi
         IOobject::READ_IF_PRESENT,
         IOobject::AUTO_WRITE
     ),
-    linearInterpolate(U) & mesh.Sf()
+    fvc::flux(U)
 );
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/cfdTools/incompressible/createPhiv.H b/src/finiteVolume/cfdTools/incompressible/createPhiv.H
index 6a723b29febfb456be16ecd0e3e9e566bc2f80d9..97189c353f5d7e763f2c5bf54ea4b4cfa1cb974e 100644
--- a/src/finiteVolume/cfdTools/incompressible/createPhiv.H
+++ b/src/finiteVolume/cfdTools/incompressible/createPhiv.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ surfaceScalarField phiv
         IOobject::READ_IF_PRESENT,
         IOobject::AUTO_WRITE
     ),
-    linearInterpolate(U) & mesh.Sf()
+    flux(U)
 );
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/cfdTools/incompressible/movingMeshRhoUContinuityErrs.H b/src/finiteVolume/cfdTools/incompressible/movingMeshRhoUContinuityErrs.H
index e998e94cf20f03a86a99d27e337e6b3636d29a64..acee29ed5a6cce28e012aa529b7e3e760d0dbb4f 100644
--- a/src/finiteVolume/cfdTools/incompressible/movingMeshRhoUContinuityErrs.H
+++ b/src/finiteVolume/cfdTools/incompressible/movingMeshRhoUContinuityErrs.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ if (mesh.moving())
 }
 else
 {
-#   include "continuityErrs.H"
+    #include "continuityErrs.H"
 }
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C
index 4c40b1ef7cce4f2cce6da9186d83cac050ba508e..927928e162c25fa2c2a4e4272aa466e985319181 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ Foam::basicSymmetryFvPatchField<Type>::basicSymmetryFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::basicSymmetryFvPatchField<Type>::snGrad() const
 {
     tmp<vectorField> nHat = this->patch().nf();
@@ -126,7 +126,7 @@ void Foam::basicSymmetryFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::basicSymmetryFvPatchField<Type>::snGradTransformDiag() const
 {
     const vectorField nHat(this->patch().nf());
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H
index c6caad802eaa9f846c578529e139e13e5a56aa87..01af21c5fe02d79d7ba96e7eb3e1637109698103 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new basicSymmetryFvPatchField<Type>(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new basicSymmetryFvPatchField<Type>(*this, iF)
             );
@@ -125,7 +125,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -134,7 +134,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 };
 
 
@@ -157,7 +157,7 @@ void basicSymmetryFvPatchField<scalar>::evaluate
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "basicSymmetryFvPatchField.C"
+    #include "basicSymmetryFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C
index 401e456881aa0949ef8da50023614947caf100e5..a7b003dd03988a7a961a105f0a95793d9b061f1b 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,26 +51,26 @@ Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
 template<class Type>
 Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
 (
-    const calculatedFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict,
+    const bool valueRequired
 )
 :
-    fvPatchField<Type>(ptf, p, iF, mapper)
+    fvPatchField<Type>(p, iF, dict, valueRequired)
 {}
 
 
 template<class Type>
 Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
 (
+    const calculatedFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict,
-    const bool valueRequired
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvPatchField<Type>(p, iF, dict, valueRequired)
+    fvPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
@@ -96,7 +96,7 @@ Foam::calculatedFvPatchField<Type>::calculatedFvPatchField
 
 
 template<class Type>
-Foam::tmp<Foam::fvPatchField<Type> >
+Foam::tmp<Foam::fvPatchField<Type>>
 Foam::fvPatchField<Type>::NewCalculatedType
 (
     const fvPatch& p
@@ -115,7 +115,7 @@ Foam::fvPatchField<Type>::NewCalculatedType
     }
     else
     {
-        return tmp<fvPatchField<Type> >
+        return tmp<fvPatchField<Type>>
         (
             new calculatedFvPatchField<Type>
             (
@@ -129,7 +129,7 @@ Foam::fvPatchField<Type>::NewCalculatedType
 
 template<class Type>
 template<class Type2>
-Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::NewCalculatedType
+Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::NewCalculatedType
 (
     const fvPatchField<Type2>& pf
 )
@@ -141,7 +141,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::NewCalculatedType
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::calculatedFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
@@ -154,14 +154,14 @@ Foam::calculatedFvPatchField<Type>::valueInternalCoeffs
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "default boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::calculatedFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
@@ -174,14 +174,14 @@ Foam::calculatedFvPatchField<Type>::valueBoundaryCoeffs
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "default boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const
 {
     FatalErrorInFunction
@@ -191,14 +191,14 @@ Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "default boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     FatalErrorInFunction
@@ -208,7 +208,7 @@ Foam::calculatedFvPatchField<Type>::gradientBoundaryCoeffs() const
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "default boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H
index 7caa505a8d2aa8380c4b58a1eb81016a420e9ab9..54dc55633ee83eb76db64a7bd5bc28191ff8bc09 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ Description
     myPatch
     {
         type            calculated;
-        value           uniform (0 0 0);    // optional value entry
+        value           uniform (0 0 0);    // Required value entry
     }
     \endverbatim
 
@@ -89,7 +89,7 @@ public:
             const fvPatch&,
             const DimensionedField<Type, volMesh>&,
             const dictionary&,
-            const bool valueRequired=false
+            const bool valueRequired=true
         );
 
         //- Construct by mapping given patchField<Type> onto a new patch
@@ -108,9 +108,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new calculatedFvPatchField<Type>(*this)
             );
@@ -124,12 +124,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new calculatedFvPatchField<Type>(*this, iF)
             );
@@ -138,7 +138,7 @@ public:
 
     // Member functions
 
-        // Access
+        // Attributes
 
             //- Return true if this patch field fixes a value.
             //  Needed to check if a level has to be specified while solving
@@ -153,25 +153,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            tmp<Field<Type> > gradientInternalCoeffs() const;
+            tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         //- Write
@@ -186,7 +186,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "calculatedFvPatchField.C"
+    #include "calculatedFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C
index 38b1e11a10d82907b03d0d53635fb479280e42db..5a6f29aa89f0b1589416a19589c5f84b1806f1ca 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ Foam::coupledFvPatchField<Type>::coupledFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::coupledFvPatchField<Type>::snGrad
+Foam::tmp<Foam::Field<Type>> Foam::coupledFvPatchField<Type>::snGrad
 (
     const scalarField& deltaCoeffs
 ) const
@@ -145,7 +145,7 @@ void Foam::coupledFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::coupledFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>& w
@@ -156,7 +156,7 @@ Foam::coupledFvPatchField<Type>::valueInternalCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::coupledFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>& w
@@ -167,7 +167,7 @@ Foam::coupledFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::coupledFvPatchField<Type>::gradientInternalCoeffs
 (
     const scalarField& deltaCoeffs
@@ -178,7 +178,7 @@ Foam::coupledFvPatchField<Type>::gradientInternalCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::coupledFvPatchField<Type>::gradientInternalCoeffs() const
 {
     NotImplemented;
@@ -187,7 +187,7 @@ Foam::coupledFvPatchField<Type>::gradientInternalCoeffs() const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::coupledFvPatchField<Type>::gradientBoundaryCoeffs
 (
     const scalarField& deltaCoeffs
@@ -198,7 +198,7 @@ Foam::coupledFvPatchField<Type>::gradientBoundaryCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::coupledFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     NotImplemented;
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H
index 546e2ee5f8a553d291ec0a0b791a0082bfd253d3..0148af1ac55e61664f3f384048403d919b3f962f 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const = 0;
+        virtual tmp<fvPatchField<Type>> clone() const = 0;
 
         //- Construct as copy setting internal field reference
         coupledFvPatchField
@@ -115,7 +115,7 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>&
         ) const = 0;
@@ -133,19 +133,19 @@ public:
             }
 
             //- Return neighbour field of internal field
-            virtual tmp<Field<Type> > patchNeighbourField() const = 0;
+            virtual tmp<Field<Type>> patchNeighbourField() const = 0;
 
 
         // Evaluation functions
 
             //- Return patch-normal gradient
-            virtual tmp<Field<Type> > snGrad
+            virtual tmp<Field<Type>> snGrad
             (
                 const scalarField& deltaCoeffs
             ) const;
 
             //- Return patch-normal gradient
-            virtual tmp<Field<Type> > snGrad() const
+            virtual tmp<Field<Type>> snGrad() const
             {
                 NotImplemented;
                 return *this;
@@ -165,39 +165,39 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs
+            virtual tmp<Field<Type>> gradientInternalCoeffs
             (
                 const scalarField& deltaCoeffs
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs
             (
                 const scalarField& deltaCoeffs
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         // Coupled interface functionality
@@ -234,7 +234,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "coupledFvPatchField.C"
+    #include "coupledFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.C
index 200dabf29a5cf3401ae71e7dd83cb7320813a21d..3e45bdbedf6a1e9472720ea260aa98ff77a9bfd2 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ void Foam::directionMixedFvPatchField<Type>::rmap
     transformFvPatchField<Type>::rmap(ptf, addr);
 
     const directionMixedFvPatchField<Type>& dmptf =
-        refCast<const directionMixedFvPatchField<Type> >(ptf);
+        refCast<const directionMixedFvPatchField<Type>>(ptf);
 
     refValue_.rmap(dmptf.refValue_, addr);
     refGrad_.rmap(dmptf.refGrad_, addr);
@@ -133,16 +133,16 @@ void Foam::directionMixedFvPatchField<Type>::rmap
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::directionMixedFvPatchField<Type>::snGrad() const
 {
     const Field<Type> pif(this->patchInternalField());
 
-    tmp<Field<Type> > normalValue = transform(valueFraction_, refValue_);
+    tmp<Field<Type>> normalValue = transform(valueFraction_, refValue_);
 
-    tmp<Field<Type> > gradValue = pif + refGrad_/this->patch().deltaCoeffs();
+    tmp<Field<Type>> gradValue = pif + refGrad_/this->patch().deltaCoeffs();
 
-    tmp<Field<Type> > transformGradValue =
+    tmp<Field<Type>> transformGradValue =
         transform(I - valueFraction_, gradValue);
 
     return
@@ -159,12 +159,12 @@ void Foam::directionMixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
         this->updateCoeffs();
     }
 
-    tmp<Field<Type> > normalValue = transform(valueFraction_, refValue_);
+    tmp<Field<Type>> normalValue = transform(valueFraction_, refValue_);
 
-    tmp<Field<Type> > gradValue =
+    tmp<Field<Type>> gradValue =
         this->patchInternalField() + refGrad_/this->patch().deltaCoeffs();
 
-    tmp<Field<Type> > transformGradValue =
+    tmp<Field<Type>> transformGradValue =
         transform(I - valueFraction_, gradValue);
 
     Field<Type>::operator=(normalValue + transformGradValue);
@@ -174,7 +174,7 @@ void Foam::directionMixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::directionMixedFvPatchField<Type>::snGradTransformDiag() const
 {
     vectorField diag(valueFraction_.size());
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H
index 54686db761485553f2d703334e88056426e77e73..d40a605f74d50beded6cc93a2fa410d5df1cdb94 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/directionMixed/directionMixedFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,9 +100,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new directionMixedFvPatchField<Type>(*this)
             );
@@ -116,12 +116,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new directionMixedFvPatchField<Type>(*this, iF)
             );
@@ -130,9 +130,9 @@ public:
 
     // Member functions
 
-        // Access
+        // Attributes
 
-            //- Return true if this patch field fixes a value.
+            //- Return true: this patch field fixes a value.
             //  Needed to check if a level has to be specified while solving
             //  Poissons equations.
             virtual bool fixesValue() const
@@ -140,6 +140,12 @@ public:
                 return true;
             }
 
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
 
         // Mapping functions
 
@@ -193,7 +199,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -202,7 +208,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 
 
         //- Write
@@ -238,7 +244,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "directionMixedFvPatchField.C"
+    #include "directionMixedFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.C
new file mode 100644
index 0000000000000000000000000000000000000000..3d154348800421869debd5160ad42b4a69bc3a1c
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.C
@@ -0,0 +1,112 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "extrapolatedCalculatedFvPatchField.H"
+#include "fvPatchFieldMapper.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Type>
+Foam::extrapolatedCalculatedFvPatchField<Type>::
+extrapolatedCalculatedFvPatchField
+(
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF
+)
+:
+    calculatedFvPatchField<Type>(p, iF)
+{}
+
+
+template<class Type>
+Foam::extrapolatedCalculatedFvPatchField<Type>::
+extrapolatedCalculatedFvPatchField
+(
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const dictionary& dict,
+    const bool valueRequired
+)
+:
+    calculatedFvPatchField<Type>(p, iF, dict, valueRequired)
+{}
+
+
+template<class Type>
+Foam::extrapolatedCalculatedFvPatchField<Type>::
+extrapolatedCalculatedFvPatchField
+(
+    const extrapolatedCalculatedFvPatchField<Type>& ptf,
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    calculatedFvPatchField<Type>(ptf, p, iF, mapper)
+{}
+
+
+template<class Type>
+Foam::extrapolatedCalculatedFvPatchField<Type>::
+extrapolatedCalculatedFvPatchField
+(
+    const extrapolatedCalculatedFvPatchField<Type>& ptf
+)
+:
+    calculatedFvPatchField<Type>(ptf)
+{}
+
+
+template<class Type>
+Foam::extrapolatedCalculatedFvPatchField<Type>::
+extrapolatedCalculatedFvPatchField
+(
+    const extrapolatedCalculatedFvPatchField<Type>& ptf,
+    const DimensionedField<Type, volMesh>& iF
+)
+:
+    calculatedFvPatchField<Type>(ptf, iF)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Type>
+void Foam::extrapolatedCalculatedFvPatchField<Type>::evaluate
+(
+    const Pstream::commsTypes
+)
+{
+    if (!this->updated())
+    {
+        this->updateCoeffs();
+    }
+
+    calculatedFvPatchField<Type>::operator==(this->patchInternalField());
+    calculatedFvPatchField<Type>::evaluate();
+}
+
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H
new file mode 100644
index 0000000000000000000000000000000000000000..2a8674128dff9a5e6fa778854275d1b2757168dc
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchField.H
@@ -0,0 +1,165 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::extrapolatedCalculatedFvPatchField
+
+Group
+    grpGenericBoundaryConditions
+
+Description
+    This boundary condition applies a zero-gradient condition from the patch
+    internal field onto the patch faces when \c evaluated but may also be
+    assigned.  \c snGrad returns the patch gradient evaluated from the current
+    internal and patch field values rather than returning zero.
+
+    \heading Patch usage
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type            extrapolatedCalculated;
+    }
+    \endverbatim
+
+SourceFiles
+    extrapolatedCalculatedFvPatchField.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef extrapolatedCalculatedFvPatchField_H
+#define extrapolatedCalculatedFvPatchField_H
+
+#include "calculatedFvPatchField.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                   Class extrapolatedCalculatedFvPatchField Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Type>
+class extrapolatedCalculatedFvPatchField
+:
+    public calculatedFvPatchField<Type>
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("extrapolatedCalculated");
+
+
+    // Constructors
+
+        //- Construct from patch and internal field
+        extrapolatedCalculatedFvPatchField
+        (
+            const fvPatch&,
+            const DimensionedField<Type, volMesh>&
+        );
+
+        //- Construct from patch, internal field and dictionary
+        extrapolatedCalculatedFvPatchField
+        (
+            const fvPatch&,
+            const DimensionedField<Type, volMesh>&,
+            const dictionary&,
+            const bool valueRequired=false
+        );
+
+        //- Construct by mapping given patchField<Type> onto a new patch
+        extrapolatedCalculatedFvPatchField
+        (
+            const extrapolatedCalculatedFvPatchField<Type>&,
+            const fvPatch&,
+            const DimensionedField<Type, volMesh>&,
+            const fvPatchFieldMapper&
+        );
+
+        //- Construct as copy
+        extrapolatedCalculatedFvPatchField
+        (
+            const extrapolatedCalculatedFvPatchField<Type>&
+        );
+
+        //- Construct and return a clone
+        virtual tmp<fvPatchField<Type>> clone() const
+        {
+            return tmp<fvPatchField<Type>>
+            (
+                new extrapolatedCalculatedFvPatchField<Type>(*this)
+            );
+        }
+
+        //- Construct as copy setting internal field reference
+        extrapolatedCalculatedFvPatchField
+        (
+            const extrapolatedCalculatedFvPatchField<Type>&,
+            const DimensionedField<Type, volMesh>&
+        );
+
+        //- Construct and return a clone setting internal field reference
+        virtual tmp<fvPatchField<Type>> clone
+        (
+            const DimensionedField<Type, volMesh>& iF
+        ) const
+        {
+            return tmp<fvPatchField<Type>>
+            (
+                new extrapolatedCalculatedFvPatchField<Type>(*this, iF)
+            );
+        }
+
+
+    // Member functions
+
+        // Evaluation functions
+
+            //- Evaluate the patch field
+            virtual void evaluate
+            (
+                const Pstream::commsTypes commsType=Pstream::blocking
+            );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "extrapolatedCalculatedFvPatchField.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C
new file mode 100644
index 0000000000000000000000000000000000000000..e09d457b8f14acdc19eb74d8413a72339b2cfad1
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.C
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "extrapolatedCalculatedFvPatchFields.H"
+#include "fvPatchFields.H"
+#include "volMesh.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+makePatchFields(extrapolatedCalculated);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.H
new file mode 100644
index 0000000000000000000000000000000000000000..ec38e3774939fbc3905aee0ca21c9a7d5de24c22
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFields.H
@@ -0,0 +1,49 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef extrapolatedCalculatedFvPatchFields_H
+#define extrapolatedCalculatedFvPatchFields_H
+
+#include "extrapolatedCalculatedFvPatchField.H"
+#include "fieldTypes.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+makePatchTypeFieldTypedefs(extrapolatedCalculated);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFieldsFwd.H
new file mode 100644
index 0000000000000000000000000000000000000000..6f1a89d2f197d54734ef528fd8bf871a4e44a5a5
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/basic/extrapolatedCalculated/extrapolatedCalculatedFvPatchFieldsFwd.H
@@ -0,0 +1,50 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef extrapolatedCalculatedFvPatchFieldsFwd_H
+#define extrapolatedCalculatedFvPatchFieldsFwd_H
+
+#include "fieldTypes.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+template<class Type> class extrapolatedCalculatedFvPatchField;
+
+makePatchTypeFieldTypedefs(extrapolatedCalculated);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C
index 112ddb42f43e6f67bf1bfbbc746916c6610f8e69..bb789ed827c0b472790e8177be938ce30d5af505 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,27 +26,37 @@ License
 #include "fixedGradientFvPatchField.H"
 #include "dictionary.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
+Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
 )
 :
     fvPatchField<Type>(p, iF),
-    gradient_(p.size(), pTraits<Type>::zero)
+    gradient_(p.size(), Zero)
 {}
 
 
 template<class Type>
-fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
+Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
+(
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    fvPatchField<Type>(p, iF, dict),
+    gradient_("gradient", dict, p.size())
+{
+    evaluate();
+}
+
+
+template<class Type>
+Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 (
     const fixedGradientFvPatchField<Type>& ptf,
     const fvPatch& p,
@@ -70,22 +80,7 @@ fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 
 
 template<class Type>
-fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
-(
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
-)
-:
-    fvPatchField<Type>(p, iF, dict),
-    gradient_("gradient", dict, p.size())
-{
-    evaluate();
-}
-
-
-template<class Type>
-fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
+Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 (
     const fixedGradientFvPatchField<Type>& ptf
 )
@@ -96,7 +91,7 @@ fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 
 
 template<class Type>
-fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
+Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 (
     const fixedGradientFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -110,7 +105,7 @@ fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void fixedGradientFvPatchField<Type>::autoMap
+void Foam::fixedGradientFvPatchField<Type>::autoMap
 (
     const fvPatchFieldMapper& m
 )
@@ -121,7 +116,7 @@ void fixedGradientFvPatchField<Type>::autoMap
 
 
 template<class Type>
-void fixedGradientFvPatchField<Type>::rmap
+void Foam::fixedGradientFvPatchField<Type>::rmap
 (
     const fvPatchField<Type>& ptf,
     const labelList& addr
@@ -130,14 +125,14 @@ void fixedGradientFvPatchField<Type>::rmap
     fvPatchField<Type>::rmap(ptf, addr);
 
     const fixedGradientFvPatchField<Type>& fgptf =
-        refCast<const fixedGradientFvPatchField<Type> >(ptf);
+        refCast<const fixedGradientFvPatchField<Type>>(ptf);
 
     gradient_.rmap(fgptf.gradient_, addr);
 }
 
 
 template<class Type>
-void fixedGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
+void Foam::fixedGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 {
     if (!this->updated())
     {
@@ -154,17 +149,19 @@ void fixedGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-tmp<Field<Type> > fixedGradientFvPatchField<Type>::valueInternalCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedGradientFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
 ) const
 {
-    return tmp<Field<Type> >(new Field<Type>(this->size(), pTraits<Type>::one));
+    return tmp<Field<Type>>(new Field<Type>(this->size(), pTraits<Type>::one));
 }
 
 
 template<class Type>
-tmp<Field<Type> > fixedGradientFvPatchField<Type>::valueBoundaryCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedGradientFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -174,34 +171,30 @@ tmp<Field<Type> > fixedGradientFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > fixedGradientFvPatchField<Type>::
-gradientInternalCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedGradientFvPatchField<Type>::gradientInternalCoeffs() const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
-        new Field<Type>(this->size(), pTraits<Type>::zero)
+        new Field<Type>(this->size(), Zero)
     );
 }
 
 
 template<class Type>
-tmp<Field<Type> > fixedGradientFvPatchField<Type>::
-gradientBoundaryCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedGradientFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     return gradient();
 }
 
 
 template<class Type>
-void fixedGradientFvPatchField<Type>::write(Ostream& os) const
+void Foam::fixedGradientFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     gradient_.writeEntry("gradient", os);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H
index 4596364f629dcdd0b98ca7930ffc57510aa425bc..e829dfc72cc2ad8cc78b69c4449e57206a149e92 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedGradient/fixedGradientFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,9 +128,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedGradientFvPatchField<Type>(*this)
             );
@@ -144,12 +144,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedGradientFvPatchField<Type>(*this, iF)
             );
@@ -191,7 +191,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const
+            virtual tmp<Field<Type>> snGrad() const
             {
                 return gradient_;
             }
@@ -204,25 +204,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         //- Write
@@ -237,7 +237,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedGradientFvPatchField.C"
+    #include "fixedGradientFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C
index 6ab4ce6e132651cba5834f8ce2040949f5437488..b6841f3353339849eb09deafe5905a72060df949 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "fixedValueFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-fixedValueFvPatchField<Type>::fixedValueFvPatchField
+Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -44,7 +39,19 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
 
 
 template<class Type>
-fixedValueFvPatchField<Type>::fixedValueFvPatchField
+Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
+(
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const Type& value
+)
+:
+    fvPatchField<Type>(p, iF, value)
+{}
+
+
+template<class Type>
+Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
@@ -56,7 +63,7 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
 
 
 template<class Type>
-fixedValueFvPatchField<Type>::fixedValueFvPatchField
+Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
 (
     const fixedValueFvPatchField<Type>& ptf,
     const fvPatch& p,
@@ -79,7 +86,7 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
 
 
 template<class Type>
-fixedValueFvPatchField<Type>::fixedValueFvPatchField
+Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
 (
     const fixedValueFvPatchField<Type>& ptf
 )
@@ -89,7 +96,7 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
 
 
 template<class Type>
-fixedValueFvPatchField<Type>::fixedValueFvPatchField
+Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
 (
     const fixedValueFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -102,20 +109,22 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvPatchField<Type>::valueInternalCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
 ) const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
-        new Field<Type>(this->size(), pTraits<Type>::zero)
+        new Field<Type>(this->size(), Zero)
     );
 }
 
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvPatchField<Type>::valueBoundaryCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -125,29 +134,27 @@ tmp<Field<Type> > fixedValueFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvPatchField<Type>::gradientInternalCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvPatchField<Type>::gradientInternalCoeffs() const
 {
     return -pTraits<Type>::one*this->patch().deltaCoeffs();
 }
 
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvPatchField<Type>::gradientBoundaryCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     return this->patch().deltaCoeffs()*(*this);
 }
 
 
 template<class Type>
-void fixedValueFvPatchField<Type>::write(Ostream& os) const
+void Foam::fixedValueFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     this->writeEntry("value", os);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H
index 8e1b21691f72ffd3aec03f8abd481f3ac9a6c29f..aef9052b56a17cf73e31e88c2e7a1d06f67f1551 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,6 +87,14 @@ public:
             const DimensionedField<Type, volMesh>&
         );
 
+        //- Construct from patch, internal field and value
+        fixedValueFvPatchField
+        (
+            const fvPatch&,
+            const DimensionedField<Type, volMesh>&,
+            const Type& value
+        );
+
         //- Construct from patch, internal field and dictionary
         fixedValueFvPatchField
         (
@@ -112,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedValueFvPatchField<Type>(*this)
             );
@@ -128,12 +136,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedValueFvPatchField<Type>(*this, iF)
             );
@@ -142,7 +150,7 @@ public:
 
     // Member functions
 
-        // Access
+        // Attributes
 
             //- Return true if this patch field fixes a value.
             //  Needed to check if a level has to be specified while solving
@@ -152,30 +160,36 @@ public:
                 return true;
             }
 
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
 
         // Evaluation functions
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         //- Write
@@ -213,7 +227,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedValueFvPatchField.C"
+    #include "fixedValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C
index 23eef7e24ba75aa087e3fd1974358a1293880a3f..bcec377834b95b94dbd2cb0626bf072b035c1014 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "mixedFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-mixedFvPatchField<Type>::mixedFvPatchField
+Foam::mixedFvPatchField<Type>::mixedFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -47,7 +42,24 @@ mixedFvPatchField<Type>::mixedFvPatchField
 
 
 template<class Type>
-mixedFvPatchField<Type>::mixedFvPatchField
+Foam::mixedFvPatchField<Type>::mixedFvPatchField
+(
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    fvPatchField<Type>(p, iF, dict),
+    refValue_("refValue", dict, p.size()),
+    refGrad_("refGradient", dict, p.size()),
+    valueFraction_("valueFraction", dict, p.size())
+{
+    evaluate();
+}
+
+
+template<class Type>
+Foam::mixedFvPatchField<Type>::mixedFvPatchField
 (
     const mixedFvPatchField<Type>& ptf,
     const fvPatch& p,
@@ -73,24 +85,7 @@ mixedFvPatchField<Type>::mixedFvPatchField
 
 
 template<class Type>
-mixedFvPatchField<Type>::mixedFvPatchField
-(
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
-)
-:
-    fvPatchField<Type>(p, iF, dict),
-    refValue_("refValue", dict, p.size()),
-    refGrad_("refGradient", dict, p.size()),
-    valueFraction_("valueFraction", dict, p.size())
-{
-    evaluate();
-}
-
-
-template<class Type>
-mixedFvPatchField<Type>::mixedFvPatchField
+Foam::mixedFvPatchField<Type>::mixedFvPatchField
 (
     const mixedFvPatchField<Type>& ptf
 )
@@ -103,7 +98,7 @@ mixedFvPatchField<Type>::mixedFvPatchField
 
 
 template<class Type>
-mixedFvPatchField<Type>::mixedFvPatchField
+Foam::mixedFvPatchField<Type>::mixedFvPatchField
 (
     const mixedFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -119,7 +114,7 @@ mixedFvPatchField<Type>::mixedFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void mixedFvPatchField<Type>::autoMap
+void Foam::mixedFvPatchField<Type>::autoMap
 (
     const fvPatchFieldMapper& m
 )
@@ -132,7 +127,7 @@ void mixedFvPatchField<Type>::autoMap
 
 
 template<class Type>
-void mixedFvPatchField<Type>::rmap
+void Foam::mixedFvPatchField<Type>::rmap
 (
     const fvPatchField<Type>& ptf,
     const labelList& addr
@@ -141,7 +136,7 @@ void mixedFvPatchField<Type>::rmap
     fvPatchField<Type>::rmap(ptf, addr);
 
     const mixedFvPatchField<Type>& mptf =
-        refCast<const mixedFvPatchField<Type> >(ptf);
+        refCast<const mixedFvPatchField<Type>>(ptf);
 
     refValue_.rmap(mptf.refValue_, addr);
     refGrad_.rmap(mptf.refGrad_, addr);
@@ -150,7 +145,7 @@ void mixedFvPatchField<Type>::rmap
 
 
 template<class Type>
-void mixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
+void Foam::mixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 {
     if (!this->updated())
     {
@@ -173,7 +168,8 @@ void mixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-tmp<Field<Type> > mixedFvPatchField<Type>::snGrad() const
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFvPatchField<Type>::snGrad() const
 {
     return
         valueFraction_
@@ -184,7 +180,8 @@ tmp<Field<Type> > mixedFvPatchField<Type>::snGrad() const
 
 
 template<class Type>
-tmp<Field<Type> > mixedFvPatchField<Type>::valueInternalCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -195,7 +192,8 @@ tmp<Field<Type> > mixedFvPatchField<Type>::valueInternalCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > mixedFvPatchField<Type>::valueBoundaryCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -207,14 +205,16 @@ tmp<Field<Type> > mixedFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > mixedFvPatchField<Type>::gradientInternalCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFvPatchField<Type>::gradientInternalCoeffs() const
 {
     return -Type(pTraits<Type>::one)*valueFraction_*this->patch().deltaCoeffs();
 }
 
 
 template<class Type>
-tmp<Field<Type> > mixedFvPatchField<Type>::gradientBoundaryCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::mixedFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     return
         valueFraction_*this->patch().deltaCoeffs()*refValue_
@@ -223,7 +223,7 @@ tmp<Field<Type> > mixedFvPatchField<Type>::gradientBoundaryCoeffs() const
 
 
 template<class Type>
-void mixedFvPatchField<Type>::write(Ostream& os) const
+void Foam::mixedFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     refValue_.writeEntry("refValue", os);
@@ -233,8 +233,4 @@ void mixedFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H
index 77dba4ada89c626699bbf8d1605e517d40adb75d..1421baefb42d1474ba088cffc2c9df6ff86351fe 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,9 +139,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mixedFvPatchField<Type>(*this)
             );
@@ -155,12 +155,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mixedFvPatchField<Type>(*this, iF)
             );
@@ -179,6 +179,12 @@ public:
                 return true;
             }
 
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
 
         // Return defining fields
 
@@ -232,7 +238,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -242,25 +248,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         //- Write
@@ -298,7 +304,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mixedFvPatchField.C"
+    #include "mixedFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C
index 9e581c6e90c4dd10bb078a216bbba0c6e58e0f00..5e489ae07f0d1462a34593e979bc263c6c59cca3 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "slicedFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-slicedFvPatchField<Type>::slicedFvPatchField
+Foam::slicedFvPatchField<Type>::slicedFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
@@ -43,12 +38,12 @@ slicedFvPatchField<Type>::slicedFvPatchField
     fvPatchField<Type>(p, iF, Field<Type>())
 {
     // Set the fvPatchField to a slice of the given complete field
-    UList<Type>::operator=(p.patchSlice(completeField));
+    UList<Type>::shallowCopy(p.patchSlice(completeField));
 }
 
 
 template<class Type>
-slicedFvPatchField<Type>::slicedFvPatchField
+Foam::slicedFvPatchField<Type>::slicedFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -59,36 +54,36 @@ slicedFvPatchField<Type>::slicedFvPatchField
 
 
 template<class Type>
-slicedFvPatchField<Type>::slicedFvPatchField
+Foam::slicedFvPatchField<Type>::slicedFvPatchField
 (
-    const slicedFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvPatchField<Type>(ptf, p, iF, mapper)
+    fvPatchField<Type>(p, iF, dict)
 {
     NotImplemented;
 }
 
 
 template<class Type>
-slicedFvPatchField<Type>::slicedFvPatchField
+Foam::slicedFvPatchField<Type>::slicedFvPatchField
 (
+    const slicedFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvPatchField<Type>(p, iF, dict)
+    fvPatchField<Type>(ptf, p, iF, mapper)
 {
     NotImplemented;
 }
 
 
 template<class Type>
-slicedFvPatchField<Type>::slicedFvPatchField
+Foam::slicedFvPatchField<Type>::slicedFvPatchField
 (
     const slicedFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -97,13 +92,15 @@ slicedFvPatchField<Type>::slicedFvPatchField
     fvPatchField<Type>(ptf.patch(), iF, Field<Type>())
 {
     // Transfer the slice from the argument
-    UList<Type>::operator=(ptf);
+    UList<Type>::shallowCopy(ptf);
 }
 
+
 template<class Type>
-tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone() const
+Foam::tmp<Foam::fvPatchField<Type>>
+Foam::slicedFvPatchField<Type>::clone() const
 {
-    return tmp<fvPatchField<Type> >
+    return tmp<fvPatchField<Type>>
     (
         new slicedFvPatchField<Type>(*this)
     );
@@ -111,7 +108,7 @@ tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone() const
 
 
 template<class Type>
-slicedFvPatchField<Type>::slicedFvPatchField
+Foam::slicedFvPatchField<Type>::slicedFvPatchField
 (
     const slicedFvPatchField<Type>& ptf
 )
@@ -124,17 +121,18 @@ slicedFvPatchField<Type>::slicedFvPatchField
     )
 {
     // Transfer the slice from the argument
-    UList<Type>::operator=(ptf);
+    UList<Type>::shallowCopy(ptf);
 }
 
 
 template<class Type>
-tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone
+Foam::tmp<Foam::fvPatchField<Type>>
+Foam::slicedFvPatchField<Type>::clone
 (
     const DimensionedField<Type, volMesh>& iF
 ) const
 {
-    return tmp<fvPatchField<Type> >
+    return tmp<fvPatchField<Type>>
     (
         new slicedFvPatchField<Type>(*this, iF)
     );
@@ -142,18 +140,18 @@ tmp<fvPatchField<Type> > slicedFvPatchField<Type>::clone
 
 
 template<class Type>
-slicedFvPatchField<Type>::~slicedFvPatchField<Type>()
+Foam::slicedFvPatchField<Type>::~slicedFvPatchField()
 {
     // Set the fvPatchField storage pointer to NULL before its destruction
     // to protect the field it a slice of.
-    UList<Type>::operator=(UList<Type>(NULL, 0));
+    UList<Type>::shallowCopy(UList<Type>(NULL, 0));
 }
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::snGrad() const
+Foam::tmp<Foam::Field<Type>> Foam::slicedFvPatchField<Type>::snGrad() const
 {
     NotImplemented;
 
@@ -162,14 +160,15 @@ tmp<Field<Type> > slicedFvPatchField<Type>::snGrad() const
 
 
 template<class Type>
-void slicedFvPatchField<Type>::updateCoeffs()
+void Foam::slicedFvPatchField<Type>::updateCoeffs()
 {
     NotImplemented;
 }
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::patchInternalField() const
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::patchInternalField() const
 {
     NotImplemented;
 
@@ -178,14 +177,15 @@ tmp<Field<Type> > slicedFvPatchField<Type>::patchInternalField() const
 
 
 template<class Type>
-void slicedFvPatchField<Type>::patchInternalField(Field<Type>&) const
+void Foam::slicedFvPatchField<Type>::patchInternalField(Field<Type>&) const
 {
     NotImplemented;
 }
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::patchNeighbourField
 (
     const Field<Type>& iField
 ) const
@@ -197,7 +197,8 @@ tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField() const
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::patchNeighbourField() const
 {
     NotImplemented;
 
@@ -206,7 +207,8 @@ tmp<Field<Type> > slicedFvPatchField<Type>::patchNeighbourField() const
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::valueInternalCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -218,7 +220,8 @@ tmp<Field<Type> > slicedFvPatchField<Type>::valueInternalCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::valueBoundaryCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -230,7 +233,8 @@ tmp<Field<Type> > slicedFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::gradientInternalCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::gradientInternalCoeffs() const
 {
     NotImplemented;
 
@@ -239,7 +243,8 @@ tmp<Field<Type> > slicedFvPatchField<Type>::gradientInternalCoeffs() const
 
 
 template<class Type>
-tmp<Field<Type> > slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     NotImplemented;
 
@@ -248,15 +253,11 @@ tmp<Field<Type> > slicedFvPatchField<Type>::gradientBoundaryCoeffs() const
 
 
 template<class Type>
-void slicedFvPatchField<Type>::write(Ostream& os) const
+void Foam::slicedFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     this->writeEntry("value", os);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H
index b9c794641df40812a2745852cd2ce56536bcb4da..7f783ce695231ee5ef064df2db0e33c00a7f1e45 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/sliced/slicedFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,7 +109,7 @@ public:
         slicedFvPatchField(const slicedFvPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const;
+        virtual tmp<fvPatchField<Type>> clone() const;
 
         //- Construct as copy setting internal field reference
         slicedFvPatchField
@@ -119,7 +119,7 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const;
@@ -131,7 +131,7 @@ public:
 
     // Member functions
 
-        // Access
+        // Attributes
 
             //- Return true if this patch field fixes a value.
             //  Needed to check if a level has to be specified while solving
@@ -141,31 +141,37 @@ public:
                 return true;
             }
 
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
 
         // Evaluation functions
 
             //- Return patch-normal gradient
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Update the coefficients associated with the patch field
             //  Sets Updated to true
             virtual void updateCoeffs();
 
             //- Return internal field next to patch as patch field
-            virtual tmp<Field<Type> > patchInternalField() const;
+            virtual tmp<Field<Type>> patchInternalField() const;
 
             //- Return internal field next to patch as patch field
             virtual void patchInternalField(Field<Type>&) const;
 
             //- Return neighbour coupled given internal cell data
-            virtual tmp<Field<Type> > patchNeighbourField
+            virtual tmp<Field<Type>> patchNeighbourField
             (
                 const Field<Type>& iField
             ) const;
 
             //- Return patchField of the values on the patch or on the
             //  opposite patch
-            virtual tmp<Field<Type> > patchNeighbourField() const;
+            virtual tmp<Field<Type>> patchNeighbourField() const;
 
             //- Initialise the evaluation of the patch field
             virtual void initEvaluate
@@ -183,25 +189,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         //- Write
@@ -239,7 +245,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "slicedFvPatchField.C"
+    #include "slicedFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C
index 901c81e9cc34a35dbe9288e39aa6eddaa066f885..bccf65ef165e913aa1e16b195b030f949cb7de0b 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,7 +89,7 @@ Foam::transformFvPatchField<Type>::transformFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::transformFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
@@ -100,7 +100,7 @@ Foam::transformFvPatchField<Type>::valueInternalCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::transformFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
@@ -117,7 +117,7 @@ Foam::transformFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::transformFvPatchField<Type>::gradientInternalCoeffs() const
 {
     return -this->patch().deltaCoeffs()*snGradTransformDiag();
@@ -125,7 +125,7 @@ Foam::transformFvPatchField<Type>::gradientInternalCoeffs() const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::transformFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     return
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H
index 76174f26278813ed179ae69b3bcf40582c90ec14..6784364e4ebc52a78eee221cbcded92887f1405e 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/transform/transformFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const = 0;
+        virtual tmp<fvPatchField<Type>> clone() const = 0;
 
         //- Construct as copy setting internal field reference
         transformFvPatchField
@@ -105,7 +105,7 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>&
         ) const = 0;
@@ -113,35 +113,45 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true if the value of the patch field
+            //  is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const = 0;
+            virtual tmp<Field<Type>> snGrad() const = 0;
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const = 0;
+            virtual tmp<Field<Type>> snGradTransformDiag() const = 0;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
     // Member operators
@@ -169,7 +179,7 @@ tmp<scalarField> transformFvPatchField<scalar>::gradientInternalCoeffs() const;
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "transformFvPatchField.C"
+    #include "transformFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C
index b33e00277be1a0257f0bb90383ad0313bef5ca39..4395534fe2a948a5eda2dcb95024a387d5e2976d 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "zeroGradientFvPatchField.H"
 #include "fvPatchFieldMapper.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
+Foam::zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -45,34 +40,34 @@ zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 
 
 template<class Type>
-zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
+Foam::zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 (
-    const zeroGradientFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvPatchField<Type>(ptf, p, iF, mapper)
-{}
+    fvPatchField<Type>(p, iF, dict)
+{
+    fvPatchField<Type>::operator=(this->patchInternalField());
+}
 
 
 template<class Type>
-zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
+Foam::zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 (
+    const zeroGradientFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvPatchField<Type>(p, iF, dict)
-{
-    fvPatchField<Type>::operator=(this->patchInternalField());
-}
+    fvPatchField<Type>(ptf, p, iF, mapper)
+{}
 
 
 template<class Type>
-zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
+Foam::zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 (
     const zeroGradientFvPatchField& zgpf
 )
@@ -82,7 +77,7 @@ zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 
 
 template<class Type>
-zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
+Foam::zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 (
     const zeroGradientFvPatchField& zgpf,
     const DimensionedField<Type, volMesh>& iF
@@ -95,7 +90,7 @@ zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void zeroGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
+void Foam::zeroGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 {
     if (!this->updated())
     {
@@ -108,12 +103,13 @@ void zeroGradientFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-tmp<Field<Type> > zeroGradientFvPatchField<Type>::valueInternalCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::zeroGradientFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
 ) const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
         new Field<Type>(this->size(), pTraits<Type>::one)
     );
@@ -121,40 +117,39 @@ tmp<Field<Type> > zeroGradientFvPatchField<Type>::valueInternalCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > zeroGradientFvPatchField<Type>::valueBoundaryCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::zeroGradientFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
 ) const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
-        new Field<Type>(this->size(), pTraits<Type>::zero)
+        new Field<Type>(this->size(), Zero)
     );
 }
 
 
 template<class Type>
-tmp<Field<Type> > zeroGradientFvPatchField<Type>::gradientInternalCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::zeroGradientFvPatchField<Type>::gradientInternalCoeffs() const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
-        new Field<Type>(this->size(), pTraits<Type>::zero)
+        new Field<Type>(this->size(), Zero)
     );
 }
 
 
 template<class Type>
-tmp<Field<Type> > zeroGradientFvPatchField<Type>::gradientBoundaryCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::zeroGradientFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
-        new Field<Type>(this->size(), pTraits<Type>::zero)
+        new Field<Type>(this->size(), Zero)
     );
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H
index cb238253f1d5829ca9b281415cd0eee6c498dbda..2b0f7a31f7ed42c36a388d36714bf4893fd9f5c7 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/zeroGradient/zeroGradientFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,9 +106,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new zeroGradientFvPatchField<Type>(*this)
             );
@@ -122,12 +122,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new zeroGradientFvPatchField<Type>(*this, iF)
             );
@@ -139,11 +139,11 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const
+            virtual tmp<Field<Type>> snGrad() const
             {
-                return tmp<Field<Type> >
+                return tmp<Field<Type>>
                 (
-                    new Field<Type>(this->size(), pTraits<Type>::zero)
+                    new Field<Type>(this->size(), Zero)
                 );
             }
 
@@ -155,25 +155,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 };
 
 
@@ -184,7 +184,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "zeroGradientFvPatchField.C"
+    #include "zeroGradientFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
index 9090ec02bbac1d9ae8a70d703e6171eb3bfb5c1b..a80f6c07867cd0c6b948f07751338113446271d7 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "cyclicFvPatchField.H"
 #include "transformField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-cyclicFvPatchField<Type>::cyclicFvPatchField
+Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -46,59 +41,59 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
 
 
 template<class Type>
-cyclicFvPatchField<Type>::cyclicFvPatchField
+Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
 (
-    const cyclicFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    coupledFvPatchField<Type>(ptf, p, iF, mapper),
+    coupledFvPatchField<Type>(p, iF, dict),
     cyclicPatch_(refCast<const cyclicFvPatch>(p))
 {
-    if (!isA<cyclicFvPatch>(this->patch()))
+    if (!isA<cyclicFvPatch>(p))
     {
-        FatalErrorInFunction
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "    patch type '" << p.type()
             << "' not constraint type '" << typeName << "'"
             << "\n    for patch " << p.name()
             << " of field " << this->dimensionedInternalField().name()
             << " in file " << this->dimensionedInternalField().objectPath()
             << exit(FatalIOError);
     }
+
+    this->evaluate(Pstream::blocking);
 }
 
 
 template<class Type>
-cyclicFvPatchField<Type>::cyclicFvPatchField
+Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
 (
+    const cyclicFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    coupledFvPatchField<Type>(p, iF, dict),
+    coupledFvPatchField<Type>(ptf, p, iF, mapper),
     cyclicPatch_(refCast<const cyclicFvPatch>(p))
 {
-    if (!isA<cyclicFvPatch>(p))
+    if (!isA<cyclicFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "    patch type '" << p.type()
+        FatalErrorInFunction
             << "' not constraint type '" << typeName << "'"
             << "\n    for patch " << p.name()
             << " of field " << this->dimensionedInternalField().name()
             << " in file " << this->dimensionedInternalField().objectPath()
             << exit(FatalIOError);
     }
-
-    this->evaluate(Pstream::blocking);
 }
 
 
 template<class Type>
-cyclicFvPatchField<Type>::cyclicFvPatchField
+Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
 (
     const cyclicFvPatchField<Type>& ptf
 )
@@ -110,7 +105,7 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
 
 
 template<class Type>
-cyclicFvPatchField<Type>::cyclicFvPatchField
+Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
 (
     const cyclicFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -124,14 +119,15 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<Field<Type> > cyclicFvPatchField<Type>::patchNeighbourField() const
+Foam::tmp<Foam::Field<Type>>
+Foam::cyclicFvPatchField<Type>::patchNeighbourField() const
 {
     const Field<Type>& iField = this->internalField();
     const labelUList& nbrFaceCells =
         cyclicPatch().cyclicPatch().neighbPatch().faceCells();
 
-    tmp<Field<Type> > tpnf(new Field<Type>(this->size()));
-    Field<Type>& pnf = tpnf();
+    tmp<Field<Type>> tpnf(new Field<Type>(this->size()));
+    Field<Type>& pnf = tpnf.ref();
 
 
     if (doTransform())
@@ -157,8 +153,8 @@ tmp<Field<Type> > cyclicFvPatchField<Type>::patchNeighbourField() const
 
 
 template<class Type>
-const cyclicFvPatchField<Type>& cyclicFvPatchField<Type>::neighbourPatchField()
-const
+const Foam::cyclicFvPatchField<Type>&
+Foam::cyclicFvPatchField<Type>::neighbourPatchField() const
 {
     const GeometricField<Type, fvPatchField, volMesh>& fld =
     static_cast<const GeometricField<Type, fvPatchField, volMesh>&>
@@ -166,7 +162,7 @@ const
         this->internalField()
     );
 
-    return refCast<const cyclicFvPatchField<Type> >
+    return refCast<const cyclicFvPatchField<Type>>
     (
         fld.boundaryField()[this->cyclicPatch().neighbPatchID()]
     );
@@ -174,7 +170,7 @@ const
 
 
 template<class Type>
-void cyclicFvPatchField<Type>::updateInterfaceMatrix
+void Foam::cyclicFvPatchField<Type>::updateInterfaceMatrix
 (
     scalarField& result,
     const scalarField& psiInternal,
@@ -202,7 +198,7 @@ void cyclicFvPatchField<Type>::updateInterfaceMatrix
 
 
 template<class Type>
-void cyclicFvPatchField<Type>::updateInterfaceMatrix
+void Foam::cyclicFvPatchField<Type>::updateInterfaceMatrix
 (
     Field<Type>& result,
     const Field<Type>& psiInternal,
@@ -229,14 +225,10 @@ void cyclicFvPatchField<Type>::updateInterfaceMatrix
 
 
 template<class Type>
-void cyclicFvPatchField<Type>::write(Ostream& os) const
+void Foam::cyclicFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
index ded4696854e3520dd9938dd934c97444f4117b01..68f883f320c93c64a37aaeeba6a3409a9cdc4f66 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ class cyclicFvPatchField
 
         //- Return neighbour side field given internal fields
         template<class Type2>
-        tmp<Field<Type2> > neighbourSideField
+        tmp<Field<Type2>> neighbourSideField
         (
             const Field<Type2>&
         ) const;
@@ -128,9 +128,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicFvPatchField<Type>(*this)
             );
@@ -144,12 +144,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicFvPatchField<Type>(*this, iF)
             );
@@ -170,7 +170,7 @@ public:
         // Evaluation functions
 
             //- Return neighbour coupled internal cell data
-            tmp<Field<Type> > patchNeighbourField() const;
+            tmp<Field<Type>> patchNeighbourField() const;
 
             //- Return reference to neighbour patchField
             const cyclicFvPatchField<Type>& neighbourPatchField() const;
@@ -236,7 +236,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicFvPatchField.C"
+    #include "cyclicFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C
index 33db8bfe642dc3d56056856860f7522026cfa454..0ded42fdf7cd3f206d8050bd88de3f6938328c8d 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,7 +133,7 @@ bool Foam::cyclicACMIFvPatchField<Type>::coupled() const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::patchNeighbourField() const
 {
     const Field<Type>& iField = this->internalField();
@@ -145,7 +145,7 @@ Foam::cyclicACMIFvPatchField<Type>::patchNeighbourField() const
     Field<Type> pnfCoupled(iField, nbrFaceCellsCoupled);
     Field<Type> pfNonOverlap(iField, faceCellsNonOverlap);
 
-    tmp<Field<Type> > tpnf
+    tmp<Field<Type>> tpnf
     (
         new Field<Type>
         (
@@ -159,7 +159,7 @@ Foam::cyclicACMIFvPatchField<Type>::patchNeighbourField() const
 
     if (doTransform())
     {
-        tpnf() = transform(forwardT(), tpnf());
+        tpnf.ref() = transform(forwardT(), tpnf());
     }
 
     return tpnf;
@@ -176,7 +176,7 @@ Foam::cyclicACMIFvPatchField<Type>::neighbourPatchField() const
             this->internalField()
         );
 
-    return refCast<const cyclicACMIFvPatchField<Type> >
+    return refCast<const cyclicACMIFvPatchField<Type>>
     (
         fld.boundaryField()[cyclicACMIPatch_.neighbPatchID()]
     );
@@ -259,7 +259,7 @@ void Foam::cyclicACMIFvPatchField<Type>::updateInterfaceMatrix
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIFvPatchField<Type>::snGrad
+Foam::tmp<Foam::Field<Type>> Foam::cyclicACMIFvPatchField<Type>::snGrad
 (
     const scalarField& deltaCoeffs
 ) const
@@ -330,7 +330,7 @@ void Foam::cyclicACMIFvPatchField<Type>::evaluate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>& w
@@ -343,7 +343,7 @@ Foam::cyclicACMIFvPatchField<Type>::valueInternalCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>& w
@@ -356,7 +356,7 @@ Foam::cyclicACMIFvPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::gradientInternalCoeffs
 (
     const scalarField& deltaCoeffs
@@ -369,7 +369,7 @@ Foam::cyclicACMIFvPatchField<Type>::gradientInternalCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::gradientInternalCoeffs() const
 {
     // note: do not blend based on mask field
@@ -379,7 +379,7 @@ Foam::cyclicACMIFvPatchField<Type>::gradientInternalCoeffs() const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::gradientBoundaryCoeffs
 (
     const scalarField& deltaCoeffs
@@ -392,7 +392,7 @@ Foam::cyclicACMIFvPatchField<Type>::gradientBoundaryCoeffs
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicACMIFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     // note: do not blend based on mask field
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H
index dd2d8d751b8ddf7ba6169d6359ace0b4c554d6ee..b17c933a4c478027c3fb1bf309f11ea4a592374d 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ class cyclicACMIFvPatchField
 
         //- Return neighbour side field given internal fields
         template<class Type2>
-        tmp<Field<Type2> > neighbourSideField
+        tmp<Field<Type2>> neighbourSideField
         (
             const Field<Type2>&
         ) const;
@@ -124,9 +124,9 @@ public:
         cyclicACMIFvPatchField(const cyclicACMIFvPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicACMIFvPatchField<Type>(*this)
             );
@@ -140,12 +140,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicACMIFvPatchField<Type>(*this, iF)
             );
@@ -191,7 +191,7 @@ public:
 
 
             //- Return neighbour coupled internal cell data
-            virtual tmp<Field<Type> > patchNeighbourField() const;
+            virtual tmp<Field<Type>> patchNeighbourField() const;
 
             //- Return reference to neighbour patchField
             const cyclicACMIFvPatchField<Type>& neighbourPatchField() const;
@@ -219,7 +219,7 @@ public:
             ) const;
 
             //- Return patch-normal gradient
-            virtual tmp<Field<Type> > snGrad
+            virtual tmp<Field<Type>> snGrad
             (
                 const scalarField& deltaCoeffs
             ) const;
@@ -241,39 +241,39 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs
+            virtual tmp<Field<Type>> gradientInternalCoeffs
             (
                 const scalarField& deltaCoeffs
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs
             (
                 const scalarField& deltaCoeffs
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
             //- Manipulate matrix
             virtual void manipulateMatrix(fvMatrix<Type>& matrix);
@@ -321,7 +321,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicACMIFvPatchField.C"
+    #include "cyclicACMIFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C
index b4d804c978172e024b865251dc71ecd0ac2d3a86..a241a8071c8e6fc0a6c63fa9034d66aac75a4192 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,7 +130,7 @@ bool Foam::cyclicAMIFvPatchField<Type>::coupled() const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::cyclicAMIFvPatchField<Type>::patchNeighbourField() const
 {
     const Field<Type>& iField = this->internalField();
@@ -139,7 +139,7 @@ Foam::cyclicAMIFvPatchField<Type>::patchNeighbourField() const
 
     Field<Type> pnf(iField, nbrFaceCells);
 
-    tmp<Field<Type> > tpnf;
+    tmp<Field<Type>> tpnf;
     if (cyclicAMIPatch_.applyLowWeightCorrection())
     {
         tpnf = cyclicAMIPatch_.interpolate(pnf, this->patchInternalField()());
@@ -151,7 +151,7 @@ Foam::cyclicAMIFvPatchField<Type>::patchNeighbourField() const
 
     if (doTransform())
     {
-        tpnf() = transform(forwardT(), tpnf());
+        tpnf.ref() = transform(forwardT(), tpnf());
     }
 
     return tpnf;
@@ -168,7 +168,7 @@ Foam::cyclicAMIFvPatchField<Type>::neighbourPatchField() const
             this->internalField()
         );
 
-    return refCast<const cyclicAMIFvPatchField<Type> >
+    return refCast<const cyclicAMIFvPatchField<Type>>
     (
         fld.boundaryField()[cyclicAMIPatch_.neighbPatchID()]
     );
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H
index c9ad16c6c951b83c3013715a0dd494626b90ac1f..76a2a02031ff924f8b33cb335d8c8fb21396b537 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ class cyclicAMIFvPatchField
 
         //- Return neighbour side field given internal fields
         template<class Type2>
-        tmp<Field<Type2> > neighbourSideField
+        tmp<Field<Type2>> neighbourSideField
         (
             const Field<Type2>&
         ) const;
@@ -129,9 +129,9 @@ public:
         cyclicAMIFvPatchField(const cyclicAMIFvPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicAMIFvPatchField<Type>(*this)
             );
@@ -145,12 +145,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicAMIFvPatchField<Type>(*this, iF)
             );
@@ -175,7 +175,7 @@ public:
             virtual bool coupled() const;
 
             //- Return neighbour coupled internal cell data
-            virtual tmp<Field<Type> > patchNeighbourField() const;
+            virtual tmp<Field<Type>> patchNeighbourField() const;
 
             //- Return reference to neighbour patchField
             const cyclicAMIFvPatchField<Type>& neighbourPatchField() const;
@@ -242,7 +242,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicAMIFvPatchField.C"
+    #include "cyclicAMIFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H
index 3c68fe2b36d9f075eb3596d1b6d0cc881fcdc355..4d3cb95e353e83552c69c65bbcfd7e2ed6143611 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicSlip/cyclicSlipFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,9 +109,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicSlipFvPatchField<Type>(*this)
             );
@@ -125,12 +125,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cyclicSlipFvPatchField<Type>(*this, iF)
             );
@@ -145,7 +145,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicSlipFvPatchField.C"
+    #include "cyclicSlipFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H
index 7b8871461906cb8b54ae4c9a6e6258f7a5a28901..06d0273bfa8cb282f7edd029a9e17c9ae9ead060 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,9 +108,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new emptyFvPatchField<Type>(*this)
             );
@@ -124,12 +124,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new emptyFvPatchField<Type>(*this, iF)
             );
@@ -166,36 +166,36 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const
             {
-                return tmp<Field<Type> >(new Field<Type>(0));
+                return tmp<Field<Type>>(new Field<Type>(0));
             }
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const
             {
-                return tmp<Field<Type> >(new Field<Type>(0));
+                return tmp<Field<Type>>(new Field<Type>(0));
             }
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            tmp<Field<Type> > gradientInternalCoeffs() const
+            tmp<Field<Type>> gradientInternalCoeffs() const
             {
-                return tmp<Field<Type> >(new Field<Type>(0));
+                return tmp<Field<Type>>(new Field<Type>(0));
             }
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            tmp<Field<Type> > gradientBoundaryCoeffs() const
+            tmp<Field<Type>> gradientBoundaryCoeffs() const
             {
-                return tmp<Field<Type> >(new Field<Type>(0));
+                return tmp<Field<Type>>(new Field<Type>(0));
             }
 };
 
@@ -207,7 +207,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "emptyFvPatchField.C"
+    #include "emptyFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
index d8564fae53418529d292b3b707421df0d1cc128f..07764053fc833a8fe3c9da840963edd09254c671 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,15 +90,15 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::jumpCyclicFvPatchField<Type>::patchNeighbourField() const
 {
     const Field<Type>& iField = this->internalField();
     const labelUList& nbrFaceCells =
         this->cyclicPatch().neighbFvPatch().faceCells();
 
-    tmp<Field<Type> > tpnf(new Field<Type>(this->size()));
-    Field<Type>& pnf = tpnf();
+    tmp<Field<Type>> tpnf(new Field<Type>(this->size()));
+    Field<Type>& pnf = tpnf.ref();
 
     Field<Type> jf(this->jump());
     if (!this->cyclicPatch().owner())
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
index 42d0c1805f86a345e061b45faedcaffeed665c60..07eadc8c54c4e08970eda400669a5e02409a2982 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,13 +116,13 @@ public:
             }
 
             //- Return the "jump" across the patch as a "half" field
-            virtual tmp<Field<Type> > jump() const = 0;
+            virtual tmp<Field<Type>> jump() const = 0;
 
 
         // Evaluation functions
 
             //- Return neighbour coupled given internal cell data
-            tmp<Field<Type> > patchNeighbourField() const;
+            tmp<Field<Type>> patchNeighbourField() const;
 
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
@@ -163,7 +163,7 @@ void jumpCyclicFvPatchField<scalar>::updateInterfaceMatrix
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "jumpCyclicFvPatchField.C"
+    #include "jumpCyclicFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C
index 38e6dcf08b6a867057e460af1241f90120e8d609..5f2495f4a6a47c954c9eea9f9574f459ecce3bd7 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ Foam::jumpCyclicAMIFvPatchField<Type>::jumpCyclicAMIFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::jumpCyclicAMIFvPatchField<Type>::patchNeighbourField() const
 {
     const Field<Type>& iField = this->internalField();
@@ -99,7 +99,7 @@ Foam::jumpCyclicAMIFvPatchField<Type>::patchNeighbourField() const
         this->cyclicAMIPatch().cyclicAMIPatch().neighbPatch().faceCells();
 
     Field<Type> pnf(iField, nbrFaceCells);
-    tmp<Field<Type> > tpnf;
+    tmp<Field<Type>> tpnf;
 
     if (this->cyclicAMIPatch().applyLowWeightCorrection())
     {
@@ -120,7 +120,7 @@ Foam::jumpCyclicAMIFvPatchField<Type>::patchNeighbourField() const
         tpnf = transform(this->forwardT(), tpnf);
     }
 
-    tmp<Field<Type> > tjf = jump();
+    tmp<Field<Type>> tjf = jump();
     if (!this->cyclicAMIPatch().owner())
     {
         tjf = -tjf;
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H
index a2e77f0396e8e31008b7a9e172a16254b144df22..3a9bb130af2b01e91408e392523b02ead183a8cb 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,13 +119,13 @@ public:
             }
 
             //- Return the "jump" across the patch as a "half" field
-            virtual tmp<Field<Type> > jump() const = 0;
+            virtual tmp<Field<Type>> jump() const = 0;
 
 
         // Evaluation functions
 
             //- Return neighbour coupled given internal cell data
-            tmp<Field<Type> > patchNeighbourField() const;
+            tmp<Field<Type>> patchNeighbourField() const;
 
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
@@ -167,7 +167,7 @@ void jumpCyclicAMIFvPatchField<scalar>::updateInterfaceMatrix
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "jumpCyclicAMIFvPatchField.C"
+    #include "jumpCyclicAMIFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C
index 9f828449add6967fcef927a1c20584d06c133ef5..a8d4712b168883b176a864d13935588c6cc20791 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "nonuniformTransformCyclicFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-nonuniformTransformCyclicFvPatchField<Type>::
+Foam::nonuniformTransformCyclicFvPatchField<Type>::
 nonuniformTransformCyclicFvPatchField
 (
     const fvPatch& p,
@@ -45,34 +40,34 @@ nonuniformTransformCyclicFvPatchField
 
 
 template<class Type>
-nonuniformTransformCyclicFvPatchField<Type>::
+Foam::nonuniformTransformCyclicFvPatchField<Type>::
 nonuniformTransformCyclicFvPatchField
 (
-    const nonuniformTransformCyclicFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    cyclicFvPatchField<Type>(ptf, p, iF, mapper)
+    cyclicFvPatchField<Type>(p, iF, dict)
 {}
 
 
 template<class Type>
-nonuniformTransformCyclicFvPatchField<Type>::
+Foam::nonuniformTransformCyclicFvPatchField<Type>::
 nonuniformTransformCyclicFvPatchField
 (
+    const nonuniformTransformCyclicFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    cyclicFvPatchField<Type>(p, iF, dict)
+    cyclicFvPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-nonuniformTransformCyclicFvPatchField<Type>::
+Foam::nonuniformTransformCyclicFvPatchField<Type>::
 nonuniformTransformCyclicFvPatchField
 (
     const nonuniformTransformCyclicFvPatchField<Type>& ptf
@@ -83,7 +78,7 @@ nonuniformTransformCyclicFvPatchField
 
 
 template<class Type>
-nonuniformTransformCyclicFvPatchField<Type>::
+Foam::nonuniformTransformCyclicFvPatchField<Type>::
 nonuniformTransformCyclicFvPatchField
 (
     const nonuniformTransformCyclicFvPatchField<Type>& ptf,
@@ -94,8 +89,4 @@ nonuniformTransformCyclicFvPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H
index 576d4d08335b1f60cb6cea71961e97f335d18fe1..15dbeacccf5f9c9097d5de53802c732399657856 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,9 +101,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new nonuniformTransformCyclicFvPatchField<Type>(*this)
             );
@@ -117,12 +117,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new nonuniformTransformCyclicFvPatchField<Type>(*this, iF)
             );
@@ -138,7 +138,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "nonuniformTransformCyclicFvPatchField.C"
+    #include "nonuniformTransformCyclicFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
index 287bebfb330190bf60e845e8f23fb260b3c9389d..75d5e710ceee2007375e8e3b2f3f8121084e9ed6 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,6 @@ Foam::processorFvPatchField<Type>::processorFvPatchField
 {}
 
 
-// Construct by mapping given processorFvPatchField<Type>
 template<class Type>
 Foam::processorFvPatchField<Type>::processorFvPatchField
 (
@@ -196,7 +195,7 @@ Foam::processorFvPatchField<Type>::~processorFvPatchField()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::processorFvPatchField<Type>::patchNeighbourField() const
 {
     if (debug && !this->ready())
@@ -291,7 +290,7 @@ void Foam::processorFvPatchField<Type>::evaluate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::processorFvPatchField<Type>::snGrad
 (
     const scalarField& deltaCoeffs
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H
index da29bce16ad2838cd9b9ea2bcca4483b20f731bc..3928028ced798cf82d155f95c87222f73264748f 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -136,9 +136,9 @@ public:
         processorFvPatchField(const processorFvPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new processorFvPatchField<Type>(*this)
             );
@@ -152,12 +152,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new processorFvPatchField<Type>(*this, iF)
             );
@@ -186,7 +186,7 @@ public:
             }
 
             //- Return neighbour field given internal field
-            virtual tmp<Field<Type> > patchNeighbourField() const;
+            virtual tmp<Field<Type>> patchNeighbourField() const;
 
 
         // Evaluation functions
@@ -198,7 +198,7 @@ public:
             virtual void evaluate(const Pstream::commsTypes commsType);
 
             //- Return patch-normal gradient
-            virtual tmp<Field<Type> > snGrad
+            virtual tmp<Field<Type>> snGrad
             (
                 const scalarField& deltaCoeffs
             ) const;
@@ -293,7 +293,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "processorFvPatchField.C"
+    #include "processorFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C
index 59483e6ee9fe703ffd0f829ad4727690787ed36d..c3092af3e52afb74dea2fa6a5b99b1f589fd9e2a 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,13 +50,11 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const Field<Type>& f
 )
 :
-    //coupledFvPatchField<Type>(p, iF, f),
     processorFvPatchField<Type>(p, iF, f),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {}
 
 
-// Construct by mapping given processorCyclicFvPatchField<Type>
 template<class Type>
 Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
 (
@@ -66,7 +64,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const fvPatchFieldMapper& mapper
 )
 :
-    //coupledFvPatchField<Type>(ptf, p, iF, mapper),
     processorFvPatchField<Type>(ptf, p, iF, mapper),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {
@@ -90,7 +87,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const dictionary& dict
 )
 :
-    //coupledFvPatchField<Type>(p, iF, dict),
     processorFvPatchField<Type>(p, iF, dict),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {
@@ -122,8 +118,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const processorCyclicFvPatchField<Type>& ptf
 )
 :
-    //processorLduInterfaceField(),
-    //coupledFvPatchField<Type>(ptf),
     processorFvPatchField<Type>(ptf),
     procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
 {}
@@ -136,7 +130,6 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
     const DimensionedField<Type, volMesh>& iF
 )
 :
-    //coupledFvPatchField<Type>(ptf, iF),
     processorFvPatchField<Type>(ptf, iF),
     procPatch_(refCast<const processorCyclicFvPatch>(ptf.patch()))
 {}
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H
index d2c244bd69dc7fd144d6a074570b1ef0557909d4..9bf1d7b707e5b0dd2674f09ec20b55cb61e8fce3 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,9 +122,9 @@ public:
         processorCyclicFvPatchField(const processorCyclicFvPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new processorCyclicFvPatchField<Type>(*this)
             );
@@ -138,12 +138,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new processorCyclicFvPatchField<Type>(*this, iF)
             );
@@ -179,7 +179,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "processorCyclicFvPatchField.C"
+    #include "processorCyclicFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.C
index c6a2dc126afb105fcc0b687be255738fb8dd7400..4f27422ccd95dfcf931db69d7aa29610c499d1bf 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "symmetryFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-symmetryFvPatchField<Type>::symmetryFvPatchField
+Foam::symmetryFvPatchField<Type>::symmetryFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -44,19 +39,21 @@ symmetryFvPatchField<Type>::symmetryFvPatchField
 
 
 template<class Type>
-symmetryFvPatchField<Type>::symmetryFvPatchField
+Foam::symmetryFvPatchField<Type>::symmetryFvPatchField
 (
-    const symmetryFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    basicSymmetryFvPatchField<Type>(ptf, p, iF, mapper)
+    basicSymmetryFvPatchField<Type>(p, iF, dict)
 {
-    if (!isType<symmetryFvPatch>(this->patch()))
+    if (!isType<symmetryFvPatch>(p))
     {
-        FatalErrorInFunction
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "\n    patch type '" << p.type()
             << "' not constraint type '" << typeName << "'"
             << "\n    for patch " << p.name()
             << " of field " << this->dimensionedInternalField().name()
@@ -67,21 +64,19 @@ symmetryFvPatchField<Type>::symmetryFvPatchField
 
 
 template<class Type>
-symmetryFvPatchField<Type>::symmetryFvPatchField
+Foam::symmetryFvPatchField<Type>::symmetryFvPatchField
 (
+    const symmetryFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    basicSymmetryFvPatchField<Type>(p, iF, dict)
+    basicSymmetryFvPatchField<Type>(ptf, p, iF, mapper)
 {
-    if (!isType<symmetryFvPatch>(p))
+    if (!isType<symmetryFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "\n    patch type '" << p.type()
+        FatalErrorInFunction
             << "' not constraint type '" << typeName << "'"
             << "\n    for patch " << p.name()
             << " of field " << this->dimensionedInternalField().name()
@@ -92,7 +87,7 @@ symmetryFvPatchField<Type>::symmetryFvPatchField
 
 
 template<class Type>
-symmetryFvPatchField<Type>::symmetryFvPatchField
+Foam::symmetryFvPatchField<Type>::symmetryFvPatchField
 (
     const symmetryFvPatchField<Type>& ptf
 )
@@ -102,7 +97,7 @@ symmetryFvPatchField<Type>::symmetryFvPatchField
 
 
 template<class Type>
-symmetryFvPatchField<Type>::symmetryFvPatchField
+Foam::symmetryFvPatchField<Type>::symmetryFvPatchField
 (
     const symmetryFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -112,8 +107,4 @@ symmetryFvPatchField<Type>::symmetryFvPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H
index 191bd597d1b68060be2f34ea98954836815e1fc6..8834805377ca917d1cbb0914cc5cd48f46dac779 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,9 +108,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new symmetryFvPatchField<Type>(*this)
             );
@@ -124,12 +124,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new symmetryFvPatchField<Type>(*this, iF)
             );
@@ -144,7 +144,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "symmetryFvPatchField.C"
+    #include "symmetryFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C
index 7ab5a129d76ee5dc08e8c0dd2eba5b138b875ef8..3515d3c061dbca2125ffb95b3e91bd3ef99df2e5 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::symmetryPlaneFvPatchField<Type>::snGrad() const
 {
     vector nHat(symmetryPlanePatch_.n());
@@ -151,7 +151,7 @@ void Foam::symmetryPlaneFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::symmetryPlaneFvPatchField<Type>::snGradTransformDiag() const
 {
     vector nHat(symmetryPlanePatch_.n());
@@ -163,7 +163,7 @@ Foam::symmetryPlaneFvPatchField<Type>::snGradTransformDiag() const
         mag(nHat.component(vector::Z))
     );
 
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
         new Field<Type>
         (
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H
index 5f17938aa4952852e1fc147dd662bdc9797d387f..7f00417dd3098a260195ff3bcd100e99a19fce63 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,9 +114,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new symmetryPlaneFvPatchField<Type>(*this)
             );
@@ -130,12 +130,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new symmetryPlaneFvPatchField<Type>(*this, iF)
             );
@@ -147,7 +147,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -156,7 +156,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 };
 
 
@@ -179,7 +179,7 @@ void symmetryPlaneFvPatchField<scalar>::evaluate
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "symmetryPlaneFvPatchField.C"
+    #include "symmetryPlaneFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C
index 03f382fa217342f33b7f96c6488bfc6b11121951..7fbdafde61054f4d9f3dae03c2a0f05618d79c95 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ Foam::wedgeFvPatchField<Type>::wedgeFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::wedgeFvPatchField<Type>::snGrad() const
+Foam::tmp<Foam::Field<Type>> Foam::wedgeFvPatchField<Type>::snGrad() const
 {
     const Field<Type> pif(this->patchInternalField());
 
@@ -148,7 +148,7 @@ void Foam::wedgeFvPatchField<Type>::evaluate(const Pstream::commsTypes)
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::wedgeFvPatchField<Type>::snGradTransformDiag() const
 {
     const diagTensor diagT =
@@ -156,7 +156,7 @@ Foam::wedgeFvPatchField<Type>::snGradTransformDiag() const
 
     const vector diagV(diagT.xx(), diagT.yy(), diagT.zz());
 
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
         new Field<Type>
         (
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H
index 6ab1a7f0814617dcae423b1c3705368b38711ed6..f88636e414784dad0a0b004469f9e03b5e6c091d 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/wedge/wedgeFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,9 +109,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new wedgeFvPatchField<Type>(*this)
             );
@@ -125,12 +125,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new wedgeFvPatchField<Type>(*this, iF)
             );
@@ -142,7 +142,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -151,7 +151,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 };
 
 
@@ -174,7 +174,7 @@ void wedgeFvPatchField<scalar>::evaluate
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "wedgeFvPatchField.C"
+    #include "wedgeFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
index 3b3667bbb5fc155909ba04ebb66d0c8ca2adfd2c..1ce7a7d39f4e01f8fd5ca52fedfbe59a1804c158 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ activeBaffleVelocityFvPatchVectorField
     maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))),
     curTimeIndex_(-1)
 {
-    fvPatchVectorField::operator=(vector::zero);
+    fvPatchVectorField::operator=(Zero);
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
index 02a63dd00d3e1e708ee9de6a598682990eeef5b3..04d33d9b8af172bdfeef49559f356e7ff512b92a 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ activePressureForceBaffleVelocityFvPatchVectorField
     fBased_(readBool(dict.lookup("forceBased"))),
     baffleActivated_(0)
 {
-    fvPatchVectorField::operator=(vector::zero);
+    fvPatchVectorField::operator=(Zero);
 
     if (p.size() > 0)
     {
@@ -190,7 +190,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::autoMap
     //- Note: we don't want to use Sf here since triggers rebuilding of
     //  fvMesh::S() which will give problems when mapped (since already
     //  on new mesh)
-    forAll (patch().boundaryMesh().mesh().faceAreas(), i)
+    forAll(patch().boundaryMesh().mesh().faceAreas(), i)
     {
         if (mag(patch().boundaryMesh().mesh().faceAreas()[i]) == 0)
         {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
index daa2d5694b037a1f46185f39fd31923e7c0fed37..6d17c751873c650ca00bcfa4c02b00b8c2365b05 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,11 +45,11 @@ Foam::advectiveFvPatchField<Type>::advectiveFvPatchField
     mixedFvPatchField<Type>(p, iF),
     phiName_("phi"),
     rhoName_("rho"),
-    fieldInf_(pTraits<Type>::zero),
+    fieldInf_(Zero),
     lInf_(-GREAT)
 {
-    this->refValue() = pTraits<Type>::zero;
-    this->refGrad() = pTraits<Type>::zero;
+    this->refValue() = Zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
@@ -82,7 +82,7 @@ Foam::advectiveFvPatchField<Type>::advectiveFvPatchField
     mixedFvPatchField<Type>(p, iF),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
     rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
-    fieldInf_(pTraits<Type>::zero),
+    fieldInf_(Zero),
     lInf_(-GREAT)
 {
     if (dict.found("value"))
@@ -98,7 +98,7 @@ Foam::advectiveFvPatchField<Type>::advectiveFvPatchField
     }
 
     this->refValue() = *this;
-    this->refGrad() = pTraits<Type>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 
     if (dict.readIfPresent("lInf", lInf_))
@@ -200,7 +200,7 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs()
 
     const GeometricField<Type, fvPatchField, volMesh>& field =
         this->db().objectRegistry::template
-        lookupObject<GeometricField<Type, fvPatchField, volMesh> >
+        lookupObject<GeometricField<Type, fvPatchField, volMesh>>
         (
             this->dimensionedInternalField().name()
         );
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H
index 443c8472a87344225cf6422b221ad19cdd7c2352..123fc8e13cda963fe75a97e08132f03086cb0668 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,9 +153,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new advectiveFvPatchField<Type>(*this)
             );
@@ -169,12 +169,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new advectiveFvPatchField<Type>(*this, iF)
             );
@@ -232,7 +232,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "advectiveFvPatchField.C"
+    #include "advectiveFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H
index e050e2b1933088cef9d3d80f69532f08fac54e60..60e58bb399facfd16098b93aae618b858592b55a 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ class codedFixedValueFvPatchField
 
         const word redirectType_;
 
-        mutable autoPtr<fvPatchField<Type> > redirectPatchFieldPtr_;
+        mutable autoPtr<fvPatchField<Type>> redirectPatchFieldPtr_;
 
 
     // Private Member Functions
@@ -189,9 +189,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new codedFixedValueFvPatchField<Type>(*this)
             );
@@ -205,12 +205,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new codedFixedValueFvPatchField<Type>(*this, iF)
             );
@@ -243,7 +243,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "codedFixedValueFvPatchField.C"
+    #include "codedFixedValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H
index 52662aee51177027f88b15be1bdb592f71225f2a..9d6cf1ae721940a79a20726a8420ddad32e35dc5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/codedMixed/codedMixedFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ Description
             this->refValue() =
                 vector(1, 0, 0)
                *min(10, 0.1*this->db().time().value());
-            this->refGrad() = vector::zero;
+            this->refGrad() = Zero;
             this->valueFraction() = 1.0;
         #};
 
@@ -76,7 +76,7 @@ Description
         code
         #{
             this->refValue() = min(10, 0.1*this->db().time().value());
-            this->refGrad() = vector::zero;
+            this->refGrad() = Zero;
             this->valueFraction() = 1.0;
         #};
     }
@@ -124,7 +124,7 @@ class codedMixedFvPatchField
 
         const word redirectType_;
 
-        mutable autoPtr<mixedFvPatchField<Type> > redirectPatchFieldPtr_;
+        mutable autoPtr<mixedFvPatchField<Type>> redirectPatchFieldPtr_;
 
 
     // Private Member Functions
@@ -199,9 +199,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new codedMixedFvPatchField<Type>(*this)
             );
@@ -215,12 +215,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new codedMixedFvPatchField<Type>(*this, iF)
             );
@@ -255,7 +255,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "codedMixedFvPatchField.C"
+    #include "codedMixedFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C
index 3bdfa9e6e965c7b05fcd23e44467a3fbf4b26040..d6223500e0d3d8a3d890fc7c83cf34f1f32c8dd8 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,8 +40,8 @@ cylindricalInletVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(p, iF),
-    centre_(pTraits<vector>::zero),
-    axis_(pTraits<vector>::zero),
+    centre_(Zero),
+    axis_(Zero),
     axialVelocity_(),
     radialVelocity_(),
     rpm_()
@@ -77,9 +77,9 @@ cylindricalInletVelocityFvPatchVectorField
     fixedValueFvPatchField<vector>(p, iF, dict),
     centre_(dict.lookup("centre")),
     axis_(dict.lookup("axis")),
-    axialVelocity_(DataEntry<scalar>::New("axialVelocity", dict)),
-    radialVelocity_(DataEntry<scalar>::New("radialVelocity", dict)),
-    rpm_(DataEntry<scalar>::New("rpm", dict))
+    axialVelocity_(Function1<scalar>::New("axialVelocity", dict)),
+    radialVelocity_(Function1<scalar>::New("radialVelocity", dict)),
+    rpm_(Function1<scalar>::New("rpm", dict))
 {}
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H
index 4e3db2fdfffd9905329be552615d50986c8a7e90..f390c15b95dd55100c76e27074d2a759176e65a2 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,13 +57,13 @@ Description
     \endverbatim
 
 Note
-    The \c axialVelocity, \c radialVelocity and \c rpm entries are DataEntry
+    The \c axialVelocity, \c radialVelocity and \c rpm entries are Function1
     types, able to describe time varying functions.  The example above gives
     the usage for supplying constant values.
 
 SeeAlso
     Foam::fixedValueFvPatchField
-    Foam::DataEntry
+    Foam::Function1Types
 
 SourceFiles
     cylindricalInletVelocityFvPatchVectorField.C
@@ -74,7 +74,7 @@ SourceFiles
 #define cylindricalInletVelocityFvPatchVectorField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -97,13 +97,13 @@ class cylindricalInletVelocityFvPatchVectorField
         const vector axis_;
 
         //- Axial velocity
-        autoPtr<DataEntry<scalar> > axialVelocity_;
+        autoPtr<Function1<scalar>> axialVelocity_;
 
         //- Radial velocity
-        autoPtr<DataEntry<scalar> > radialVelocity_;
+        autoPtr<Function1<scalar>> radialVelocity_;
 
         //- RPM
-        autoPtr<DataEntry<scalar> > rpm_;
+        autoPtr<Function1<scalar>> rpm_;
 
 
 public:
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
index 6885bd7d4dbcbee30d2845b94615dabf4591031f..3f855d52fa7a1ccbf96f92254457daa8f586a9bd 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,32 +46,38 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
     const DimensionedField<Type, volMesh>& iF
 )
 :
-    uniformJumpFvPatchField<Type>(p, iF)
+    uniformJumpFvPatchField<Type>(p, iF),
+    phiName_("phi"),
+    rhoName_("rho")
 {}
 
 
 template<class Type>
 Foam::fanFvPatchField<Type>::fanFvPatchField
 (
-    const fanFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    uniformJumpFvPatchField<Type>(ptf, p, iF, mapper)
+    uniformJumpFvPatchField<Type>(p, iF, dict),
+    phiName_(dict.lookupOrDefault<word>("phi", "phi")),
+    rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
 {}
 
 
 template<class Type>
 Foam::fanFvPatchField<Type>::fanFvPatchField
 (
+    const fanFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    uniformJumpFvPatchField<Type>(p, iF, dict)
+    uniformJumpFvPatchField<Type>(ptf, p, iF, mapper),
+    phiName_(ptf.phiName_),
+    rhoName_(ptf.rhoName_)
 {}
 
 
@@ -81,7 +87,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
     const fanFvPatchField<Type>& ptf
 )
 :
-    uniformJumpFvPatchField<Type>(ptf)
+    uniformJumpFvPatchField<Type>(ptf),
+    phiName_(ptf.phiName_),
+    rhoName_(ptf.rhoName_)
 {}
 
 
@@ -92,7 +100,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
     const DimensionedField<Type, volMesh>& iF
 )
 :
-    uniformJumpFvPatchField<Type>(ptf, iF)
+    uniformJumpFvPatchField<Type>(ptf, iF),
+    phiName_(ptf.phiName_),
+    rhoName_(ptf.rhoName_)
 {}
 
 
@@ -113,4 +123,13 @@ void Foam::fanFvPatchField<Type>::updateCoeffs()
 }
 
 
+template<class Type>
+void Foam::fanFvPatchField<Type>::write(Ostream& os) const
+{
+    uniformJumpFvPatchField<Type>::write(os);
+    this->template writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
+    this->template writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+}
+
+
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
index fd27dfecd3633a1e6fd8613ada060e0c5743612d..b1080e264f75f287bca778e4bdc301ae92d180f2 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ Description
     This boundary condition provides a jump condition, using the \c cyclic
     condition as a base.
 
-    The jump is specified as a \c DataEntry type, to enable the use of, e.g.
+    The jump is specified as a \c Function1 type, to enable the use of, e.g.
     contant, polynomial, table values.
 
     \heading Patch usage
@@ -70,7 +70,7 @@ Note
      The underlying \c patchType should be set to \c cyclic
 
 SeeAlso
-    Foam::DataEntry
+    Foam::Function1Types
 
 SourceFiles
     fanFvPatchField.C
@@ -84,7 +84,7 @@ SourceFiles
 #define fanFvPatchField_H
 
 #include "uniformJumpFvPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -155,9 +155,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fanFvPatchField<Type>(*this)
             );
@@ -171,12 +171,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fanFvPatchField<Type>(*this, iF)
             );
@@ -187,6 +187,9 @@ public:
 
         //- Update the coefficients associated with the patch field
         virtual void updateCoeffs();
+
+        //- Write
+        virtual void write(Ostream&) const;
 };
 
 
@@ -210,7 +213,7 @@ fanFvPatchField<scalar>::fanFvPatchField
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fanFvPatchField.C"
+    #include "fanFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
index ea9ecdea573a08f3a6dbf7cbdca41c01c2814a07..a4f2809df8c2d7a6fdb0b82c9978f1703b3fc37b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,17 +30,6 @@ License
 #include "Tuple2.H"
 #include "PolynomialEntry.H"
 
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-    makeTemplatePatchTypeField
-    (
-        fvPatchScalarField,
-        fanFvPatchScalarField
-    );
-}
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<>
@@ -78,7 +67,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
 :
     uniformJumpFvPatchField<scalar>(p, iF),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
-    rhoName_(dict.lookupOrDefault<word>("rho", "none"))
+    rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
 {
     if (this->cyclicPatch().owner())
     {
@@ -97,7 +86,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
                     nPows++;
                 }
             }
-            List<Tuple2<scalar, scalar> > coeffs(nPows);
+            List<Tuple2<scalar, scalar>> coeffs(nPows);
             nPows = 0;
             forAll(f, powI)
             {
@@ -109,13 +98,13 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
 
             this->jumpTable_.reset
             (
-                new PolynomialEntry<scalar>("jumpTable", coeffs)
+                new Function1Types::Polynomial<scalar>("jumpTable", coeffs)
             );
         }
         else
         {
             // Generic input constructed from dictionary
-            this->jumpTable_ = DataEntry<scalar>::New("jumpTable", dict);
+            this->jumpTable_ = Function1<scalar>::New("jumpTable", dict);
         }
     }
 
@@ -133,4 +122,16 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
 }
 
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makeTemplatePatchTypeField
+    (
+        fvPatchScalarField,
+        fanFvPatchScalarField
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.C
new file mode 100644
index 0000000000000000000000000000000000000000..6fc0fd67cd3fd123ef6992a6d0a284144639ddaa
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.C
@@ -0,0 +1,100 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "fixedFluxExtrapolatedPressureFvPatchScalarField.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::fixedFluxExtrapolatedPressureFvPatchScalarField::
+fixedFluxExtrapolatedPressureFvPatchScalarField
+(
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF
+)
+:
+    fixedFluxPressureFvPatchScalarField(p, iF)
+{}
+
+
+Foam::fixedFluxExtrapolatedPressureFvPatchScalarField::
+fixedFluxExtrapolatedPressureFvPatchScalarField
+(
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    fixedFluxPressureFvPatchScalarField(p, iF, dict)
+{}
+
+
+Foam::fixedFluxExtrapolatedPressureFvPatchScalarField::
+fixedFluxExtrapolatedPressureFvPatchScalarField
+(
+    const fixedFluxExtrapolatedPressureFvPatchScalarField& ptf,
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedFluxPressureFvPatchScalarField(ptf, p, iF, mapper)
+{}
+
+
+Foam::fixedFluxExtrapolatedPressureFvPatchScalarField::
+fixedFluxExtrapolatedPressureFvPatchScalarField
+(
+    const fixedFluxExtrapolatedPressureFvPatchScalarField& wbppsf
+)
+:
+    fixedFluxPressureFvPatchScalarField(wbppsf)
+{}
+
+
+Foam::fixedFluxExtrapolatedPressureFvPatchScalarField::
+fixedFluxExtrapolatedPressureFvPatchScalarField
+(
+    const fixedFluxExtrapolatedPressureFvPatchScalarField& wbppsf,
+    const DimensionedField<scalar, volMesh>& iF
+)
+:
+    fixedFluxPressureFvPatchScalarField(wbppsf, iF)
+{}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makePatchTypeField
+    (
+        fvPatchScalarField,
+        fixedFluxExtrapolatedPressureFvPatchScalarField
+    );
+}
+
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H
new file mode 100644
index 0000000000000000000000000000000000000000..062e08b772a8b9cbf07cca98f2c04c11ebcce9ad
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H
@@ -0,0 +1,147 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::fixedFluxExtrapolatedPressureFvPatchScalarField
+
+Group
+    grpInletBoundaryConditions grpWallBoundaryConditions
+
+Description
+    This boundary condition sets the pressure gradient to the provided value
+    such that the flux on the boundary is that specified by the velocity
+    boundary condition.
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type            fixedFluxExtrapolatedPressure;
+    }
+    \endverbatim
+
+SeeAlso
+    Foam::fixedGradientFvPatchField
+
+SourceFiles
+    fixedFluxExtrapolatedPressureFvPatchScalarField.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef fixedFluxExtrapolatedPressureFvPatchScalarFields_H
+#define fixedFluxExtrapolatedPressureFvPatchScalarFields_H
+
+#include "fixedFluxPressureFvPatchScalarField.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+             Class fixedFluxExtrapolatedPressureFvPatchScalarField Declaration
+\*---------------------------------------------------------------------------*/
+
+class fixedFluxExtrapolatedPressureFvPatchScalarField
+:
+    public fixedFluxPressureFvPatchScalarField
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("fixedFluxExtrapolatedPressure");
+
+
+    // Constructors
+
+        //- Construct from patch and internal field
+        fixedFluxExtrapolatedPressureFvPatchScalarField
+        (
+            const fvPatch&,
+            const DimensionedField<scalar, volMesh>&
+        );
+
+        //- Construct from patch, internal field and dictionary
+        fixedFluxExtrapolatedPressureFvPatchScalarField
+        (
+            const fvPatch&,
+            const DimensionedField<scalar, volMesh>&,
+            const dictionary&
+        );
+
+        //- Construct by mapping given
+        //  fixedFluxExtrapolatedPressureFvPatchScalarField onto a new patch
+        fixedFluxExtrapolatedPressureFvPatchScalarField
+        (
+            const fixedFluxExtrapolatedPressureFvPatchScalarField&,
+            const fvPatch&,
+            const DimensionedField<scalar, volMesh>&,
+            const fvPatchFieldMapper&
+        );
+
+        //- Construct as copy
+        fixedFluxExtrapolatedPressureFvPatchScalarField
+        (
+            const fixedFluxExtrapolatedPressureFvPatchScalarField&
+        );
+
+        //- Construct and return a clone
+        virtual tmp<fvPatchScalarField> clone() const
+        {
+            return tmp<fvPatchScalarField>
+            (
+                new fixedFluxExtrapolatedPressureFvPatchScalarField(*this)
+            );
+        }
+
+        //- Construct as copy setting internal field reference
+        fixedFluxExtrapolatedPressureFvPatchScalarField
+        (
+            const fixedFluxExtrapolatedPressureFvPatchScalarField&,
+            const DimensionedField<scalar, volMesh>&
+        );
+
+        //- Construct and return a clone setting internal field reference
+        virtual tmp<fvPatchScalarField> clone
+        (
+            const DimensionedField<scalar, volMesh>& iF
+        ) const
+        {
+            return tmp<fvPatchScalarField>
+            (
+                new fixedFluxExtrapolatedPressureFvPatchScalarField(*this, iF)
+            );
+        }
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H
index b10b932be5716b029dcf61b3de1c3f946d5a674a..85002bb092460fea1c8842ce316be4c6ecd2f127 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -184,7 +184,7 @@ namespace Foam
     inline void setSnGrad
     (
         volScalarField::GeometricBoundaryField& bf,
-        const tmp<FieldField<fvsPatchField, scalar> >& tsnGrad
+        const tmp<FieldField<fvsPatchField, scalar>>& tsnGrad
     )
     {
         setSnGrad<GradBC>(bf, tsnGrad());
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H
index 75a9742240f757ddefce2e4f1b64e4ecf6b1e1f7..53a8d50fa716e90be307f14b3983021588a732a3 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedInternalValueFvPatchField/fixedInternalValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,9 +116,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedInternalValueFvPatchField<Type>(*this)
             );
@@ -132,12 +132,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedInternalValueFvPatchField<Type>(*this, iF)
             );
@@ -160,7 +160,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedInternalValueFvPatchField.C"
+    #include "fixedInternalValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
index c9d6e367cc8f9035481031807d2dc44510c37432..13eba7efa00748075b369225ec94c5656e8c10ed 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
 )
 :
     jumpCyclicFvPatchField<Type>(p, iF),
-    jump_(this->size(), pTraits<Type>::zero)
+    jump_(this->size(), Zero)
 {}
 
 
@@ -62,7 +62,7 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
 )
 :
     jumpCyclicFvPatchField<Type>(p, iF),
-    jump_(p.size(), pTraits<Type>::zero)
+    jump_(p.size(), Zero)
 {
     if (this->cyclicPatch().owner())
     {
@@ -109,7 +109,7 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fixedJumpFvPatchField<Type>::jump() const
+Foam::tmp<Foam::Field<Type>> Foam::fixedJumpFvPatchField<Type>::jump() const
 {
     if (this->cyclicPatch().owner())
     {
@@ -117,7 +117,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fixedJumpFvPatchField<Type>::jump() const
     }
     else
     {
-        return refCast<const fixedJumpFvPatchField<Type> >
+        return refCast<const fixedJumpFvPatchField<Type>>
         (
             this->neighbourPatchField()
         ).jump();
@@ -146,7 +146,7 @@ void Foam::fixedJumpFvPatchField<Type>::rmap
     jumpCyclicFvPatchField<Type>::rmap(ptf, addr);
 
     const fixedJumpFvPatchField<Type>& tiptf =
-        refCast<const fixedJumpFvPatchField<Type> >(ptf);
+        refCast<const fixedJumpFvPatchField<Type>>(ptf);
     jump_.rmap(tiptf.jump_, addr);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H
index ede9fea8af48fca9c9901037f61b5dbd3669f695..002d60045ae239cc767d1259ea6e817bb25431cb 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJump/fixedJumpFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -132,9 +132,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedJumpFvPatchField<Type>(*this)
             );
@@ -148,12 +148,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedJumpFvPatchField<Type>(*this, iF)
             );
@@ -165,7 +165,7 @@ public:
         // Access
 
             //- Return the "jump" across the patch
-            virtual tmp<Field<Type> > jump() const;
+            virtual tmp<Field<Type>> jump() const;
 
 
         // Mapping functions
@@ -196,7 +196,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedJumpFvPatchField.C"
+    #include "fixedJumpFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C
index 21b62c6e2c059e71ab2dfe4c8f38e8fad4c97e64..354a84bb2d59cc69eaa17599f8de650ccf6de36e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
 )
 :
     jumpCyclicAMIFvPatchField<Type>(p, iF),
-    jump_(this->size(), pTraits<Type>::zero)
+    jump_(this->size(), Zero)
 {}
 
 
@@ -62,7 +62,7 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
 )
 :
     jumpCyclicAMIFvPatchField<Type>(p, iF),
-    jump_(p.size(), pTraits<Type>::zero)
+    jump_(p.size(), Zero)
 {
     if (this->cyclicAMIPatch().owner())
     {
@@ -109,7 +109,7 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fixedJumpAMIFvPatchField<Type>::jump() const
+Foam::tmp<Foam::Field<Type>> Foam::fixedJumpAMIFvPatchField<Type>::jump() const
 {
     if (this->cyclicAMIPatch().owner())
     {
@@ -118,7 +118,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fixedJumpAMIFvPatchField<Type>::jump() const
     else
     {
         const fixedJumpAMIFvPatchField& nbrPatch =
-            refCast<const fixedJumpAMIFvPatchField<Type> >
+            refCast<const fixedJumpAMIFvPatchField<Type>>
             (
                 this->neighbourPatchField()
             );
@@ -128,7 +128,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fixedJumpAMIFvPatchField<Type>::jump() const
             return this->cyclicAMIPatch().interpolate
             (
                 nbrPatch.jump(),
-                Field<Type>(this->size(), pTraits<Type>::zero)
+                Field<Type>(this->size(), Zero)
             );
         }
         else
@@ -160,7 +160,7 @@ void Foam::fixedJumpAMIFvPatchField<Type>::rmap
     jumpCyclicAMIFvPatchField<Type>::rmap(ptf, addr);
 
     const fixedJumpAMIFvPatchField<Type>& tiptf =
-        refCast<const fixedJumpAMIFvPatchField<Type> >(ptf);
+        refCast<const fixedJumpAMIFvPatchField<Type>>(ptf);
     jump_.rmap(tiptf.jump_, addr);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H
index 9a0c4bf52048c20f0a67d1b9054f763f020b417b..83f7d4c07047ce2662804c9a1b7038154f389dfa 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,9 +133,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedJumpAMIFvPatchField<Type>(*this)
             );
@@ -149,12 +149,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedJumpAMIFvPatchField<Type>(*this, iF)
             );
@@ -166,7 +166,7 @@ public:
         // Access
 
             //- Return the "jump" across the patch
-            virtual tmp<Field<Type> > jump() const;
+            virtual tmp<Field<Type>> jump() const;
 
 
         // Mapping functions
@@ -190,7 +190,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedJumpAMIFvPatchField.C"
+    #include "fixedJumpAMIFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C
index e1eebee79ceb8552f08626cd29c7da639d5101ce..1637834c9fcf48a2185bed2eb96d4c6151fb9865 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,34 +36,34 @@ Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
 )
 :
     fixedValueFvPatchField<Type>(p, iF),
-    meanValue_(pTraits<Type>::zero)
+    meanValue_()
 {}
 
 
 template<class Type>
 Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
 (
-    const fixedMeanFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
-    meanValue_(ptf.meanValue_)
+    fixedValueFvPatchField<Type>(p, iF, dict),
+    meanValue_(Function1<Type>::New("meanValue", dict))
 {}
 
 
 template<class Type>
 Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
 (
+    const fixedMeanFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fixedValueFvPatchField<Type>(p, iF, dict),
-    meanValue_(pTraits<Type>(dict.lookup("meanValue")))
+    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
+    meanValue_(ptf.meanValue_, false)
 {}
 
 
@@ -74,7 +74,7 @@ Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
 )
 :
     fixedValueFvPatchField<Type>(ptf),
-    meanValue_(ptf.meanValue_)
+    meanValue_(ptf.meanValue_, false)
 {}
 
 
@@ -86,7 +86,7 @@ Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
 )
 :
     fixedValueFvPatchField<Type>(ptf, iF),
-    meanValue_(ptf.meanValue_)
+    meanValue_(ptf.meanValue_, false)
 {}
 
 
@@ -100,19 +100,22 @@ void Foam::fixedMeanFvPatchField<Type>::updateCoeffs()
         return;
     }
 
+    const scalar t = this->db().time().timeOutputValue();
+    Type meanValue = meanValue_->value(t);
+
     Field<Type> newValues(this->patchInternalField());
 
     Type meanValuePsi =
         gSum(this->patch().magSf()*newValues)
        /gSum(this->patch().magSf());
 
-    if (mag(meanValue_) > SMALL && mag(meanValuePsi)/mag(meanValue_) > 0.5)
+    if (mag(meanValue) > SMALL && mag(meanValuePsi)/mag(meanValue) > 0.5)
     {
-        newValues *= mag(meanValue_)/mag(meanValuePsi);
+        newValues *= mag(meanValue)/mag(meanValuePsi);
     }
     else
     {
-        newValues += (meanValue_ - meanValuePsi);
+        newValues += (meanValue - meanValuePsi);
     }
 
     this->operator==(newValues);
@@ -125,7 +128,7 @@ template<class Type>
 void Foam::fixedMeanFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
-    os.writeKeyword("meanValue") << meanValue_ << token::END_STATEMENT << nl;
+    meanValue_->writeData(os);
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H
index ed31cfb998a5ae90358a41d33bbff443768c15f3..55c1312c8d4df766a5addebec9179950e0af80f6 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,17 +25,18 @@ Class
     Foam::fixedMeanFvPatchField
 
 Group
-    grpGenericBoundaryConditions
+    grpInletBoundaryConditions
 
 Description
     This boundary condition extrapolates field to the patch using the near-cell
-    values and adjusts the distribution to match the specified mean value.
+    values and adjusts the distribution to match the specified, optionally
+    time-varying, mean value.
 
     \heading Patch usage
 
     \table
         Property     | Description             | Required    | Default value
-        meanValue    | mean value              | yes         |
+        meanValue    | mean value Function1    | yes         |
     \endtable
 
     Example of the boundary condition specification:
@@ -49,6 +50,7 @@ Description
 
 SeeAlso
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     fixedMeanFvPatchField.C
@@ -59,6 +61,7 @@ SourceFiles
 #define fixedMeanFvPatchField_H
 
 #include "fixedValueFvPatchFields.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -74,13 +77,10 @@ class fixedMeanFvPatchField
 :
     public fixedValueFvPatchField<Type>
 {
-
-protected:
-
-    // Protected data
+    // Private data
 
         //- MeanValue value the field is adjusted to maintain
-        Type meanValue_;
+        autoPtr<Function1<Type>> meanValue_;
 
 
 public:
@@ -123,9 +123,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedMeanFvPatchField<Type>(*this)
             );
@@ -139,12 +139,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedMeanFvPatchField<Type>(*this, iF)
             );
@@ -153,10 +153,8 @@ public:
 
     // Member functions
 
-        // Evaluation functions
-
-            //- Update the coefficients associated with the patch field
-            virtual void updateCoeffs();
+        //- Update the coefficients associated with the patch field
+        virtual void updateCoeffs();
 
         //- Write
         virtual void write(Ostream&) const;
@@ -170,7 +168,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedMeanFvPatchField.C"
+    #include "fixedMeanFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C
index f45f9893c16382cc7f9530dd3b46be8b43ebd9bb..72f372ad9194b72b23a9d3dc0cb39451acdc79b5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,52 +46,52 @@ fixedNormalInletOutletVelocityFvPatchVectorField
         fvPatchVectorField::New("fixedValue", p, iF)
     )
 {
-    refValue() = vector::zero;
-    refGrad() = vector::zero;
-    valueFraction() = symmTensor::zero;
+    refValue() = Zero;
+    refGrad() = Zero;
+    valueFraction() = Zero;
 }
 
 
 Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
 fixedNormalInletOutletVelocityFvPatchVectorField
 (
-    const fixedNormalInletOutletVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    directionMixedFvPatchVectorField(ptf, p, iF, mapper),
-    phiName_(ptf.phiName_),
-    fixTangentialInflow_(ptf.fixTangentialInflow_),
+    directionMixedFvPatchVectorField(p, iF),
+    phiName_(dict.lookupOrDefault<word>("phi", "phi")),
+    fixTangentialInflow_(dict.lookup("fixTangentialInflow")),
     normalVelocity_
     (
-        fvPatchVectorField::New(ptf.normalVelocity(), p, iF, mapper)
+        fvPatchVectorField::New(p, iF, dict.subDict("normalVelocity"))
     )
-{}
+{
+    fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
+    refValue() = normalVelocity();
+    refGrad() = Zero;
+    valueFraction() = Zero;
+}
 
 
 Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
 fixedNormalInletOutletVelocityFvPatchVectorField
 (
+    const fixedNormalInletOutletVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    directionMixedFvPatchVectorField(p, iF),
-    phiName_(dict.lookupOrDefault<word>("phi", "phi")),
-    fixTangentialInflow_(dict.lookup("fixTangentialInflow")),
+    directionMixedFvPatchVectorField(ptf, p, iF, mapper),
+    phiName_(ptf.phiName_),
+    fixTangentialInflow_(ptf.fixTangentialInflow_),
     normalVelocity_
     (
-        fvPatchVectorField::New(p, iF, dict.subDict("normalVelocity"))
+        fvPatchVectorField::New(ptf.normalVelocity(), p, iF, mapper)
     )
-{
-    fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
-    refValue() = normalVelocity();
-    refGrad() = vector::zero;
-    valueFraction() = symmTensor::zero;
-}
+{}
 
 
 Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H
index 6d6bb2e7368f4a5c4add5aeea261697b754bdb91..41a8f41bc72db84069b50e1fd23599fda859c26c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,16 +59,20 @@ Description
         fixTangentialInflow false;
         normalVelocity
         {
-            type            oscillatingFixedValue;
-            refValue        uniform (0 1 0);
-            offset          (0 -1 0);
-            amplitude       table
-            (
-                (   0     0)
-                (   2 0.088)
-                (   8 0.088)
-            );
-            frequency       constant 1;
+            type            uniformFixedValue;
+            uniformValue    sine;
+            uniformValueCoeffs
+            {
+                frequency 1;
+                amplitude table
+                (
+                    (0  0)
+                    (2  0.088)
+                    (8  0.088)
+                );
+                scale     (0 1 0);
+                level     (0 0 0);
+            }
         }
 
         value           uniform (0 0 0);
@@ -182,6 +186,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of phi
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C
index db06a2a0033fc84fdd554bf68220f226d6e6b354..d2a8a6b425dac1973a7378a892482683bec981dd 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ Foam::fixedNormalSlipFvPatchField<Type>::fixedNormalSlipFvPatchField
 )
 :
     transformFvPatchField<Type>(p, iF),
-    fixedValue_(p.size(), pTraits<Type>::zero)
+    fixedValue_(p.size(), Zero)
 {}
 
 
@@ -116,14 +116,14 @@ void Foam::fixedNormalSlipFvPatchField<Type>::rmap
     transformFvPatchField<Type>::rmap(ptf, addr);
 
     const fixedNormalSlipFvPatchField<Type>& dmptf =
-        refCast<const fixedNormalSlipFvPatchField<Type> >(ptf);
+        refCast<const fixedNormalSlipFvPatchField<Type>>(ptf);
 
     fixedValue_.rmap(dmptf.fixedValue_, addr);
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::fixedNormalSlipFvPatchField<Type>::snGrad() const
 {
     const vectorField nHat(this->patch().nf());
@@ -160,7 +160,7 @@ void Foam::fixedNormalSlipFvPatchField<Type>::evaluate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::fixedNormalSlipFvPatchField<Type>::snGradTransformDiag() const
 {
     const vectorField nHat(this->patch().nf());
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H
index bbaf0a257bca2df4ec0e75617c53ae89efd8922d..2119f70268114732a92ebe71f254f4edb8591557 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,9 +119,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedNormalSlipFvPatchField<Type>(*this)
             );
@@ -135,12 +135,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedNormalSlipFvPatchField<Type>(*this, iF)
             );
@@ -149,6 +149,15 @@ public:
 
     // Member functions
 
+        // Access
+
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
+
         // Mapping functions
 
             //- Map (and resize as needed) from self given a mapping object
@@ -181,7 +190,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -190,7 +199,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 
 
         //- Write
@@ -228,7 +237,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedNormalSlipFvPatchField.C"
+    #include "fixedNormalSlipFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C
index a9db1a70360f82b985d32a31870d40e224f0a8cd..1ea26724c6595432e591eb89bb40e31d38f3add1 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
 :
     fixedValueFvPatchField<Type>(p, iF),
     profile_(),
-    dir_(pTraits<vector>::zero),
+    dir_(Zero),
     origin_(0)
 {}
 
@@ -51,7 +51,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
 :
     fixedValueFvPatchField<Type>(p, iF, fld),
     profile_(),
-    dir_(pTraits<vector>::zero),
+    dir_(Zero),
     origin_(0)
 {}
 
@@ -65,7 +65,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
 )
 :
     fixedValueFvPatchField<Type>(p, iF),
-    profile_(DataEntry<Type>::New("profile", dict)),
+    profile_(Function1<Type>::New("profile", dict)),
     dir_(dict.lookup("direction")),
     origin_(readScalar(dict.lookup("origin")))
 {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H
index d644a8e73c64c3b03fcee577f44ee3038f303896..d0bb6d640f14eee3992a8920d2d575dc48a48cfc 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedProfile/fixedProfileFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ Description
 
     \table
         Property     | Description              | Required | Default value
-        profile      | Profile DataEntry        | yes |
+        profile      | Profile Function1        | yes |
         direction    | Profile direction        | yes |
         origin       | Profile origin           | yes |
     \endtable
@@ -79,12 +79,12 @@ Description
     \endverbatim
 
 Note
-    The profile entry is a DataEntry type.  The example above gives the
+    The profile entry is a Function1 type.  The example above gives the
     usage for supplying csv file.
 
 SeeAlso
     Foam::fixedValueFvPatchField
-    Foam::DataEntry
+    Foam::Function1Types
     Foam::timeVaryingMappedFixedValueFvPatchField
 
 SourceFiles
@@ -96,7 +96,7 @@ SourceFiles
 #define fixedProfileFvPatchField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -115,7 +115,7 @@ class fixedProfileFvPatchField
     // Private data
 
         //- Profile data
-        autoPtr<DataEntry<Type> > profile_;
+        autoPtr<Function1<Type>> profile_;
 
         //- Profile direction
         vector dir_;
@@ -172,9 +172,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedProfileFvPatchField<Type>(*this)
             );
@@ -188,12 +188,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new fixedProfileFvPatchField<Type>(*this, iF)
             );
@@ -220,7 +220,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedProfileFvPatchField.C"
+    #include "fixedProfileFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
index 7dc2d9497ba75e387cdd8a814bd0955b89867786..152c327a4c9dbc42c677668293b22d1e5d69a12f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,10 +24,9 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "flowRateInletVelocityFvPatchVectorField.H"
-#include "volFields.H"
 #include "addToRunTimeSelectionTable.H"
-#include "fvPatchFieldMapper.H"
-#include "surfaceFields.H"
+#include "volFields.H"
+#include "one.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -42,24 +41,8 @@ flowRateInletVelocityFvPatchVectorField
     flowRate_(),
     volumetric_(false),
     rhoName_("rho"),
-    rhoInlet_(0.0)
-{}
-
-
-Foam::flowRateInletVelocityFvPatchVectorField::
-flowRateInletVelocityFvPatchVectorField
-(
-    const flowRateInletVelocityFvPatchVectorField& ptf,
-    const fvPatch& p,
-    const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
-    flowRate_(ptf.flowRate_, false),
-    volumetric_(ptf.volumetric_),
-    rhoName_(ptf.rhoName_),
-    rhoInlet_(ptf.rhoInlet_)
+    rhoInlet_(0.0),
+    extrapolateProfile_(false)
 {}
 
 
@@ -72,18 +55,22 @@ flowRateInletVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(p, iF),
-    rhoInlet_(dict.lookupOrDefault<scalar>("rhoInlet", -VGREAT))
+    rhoInlet_(dict.lookupOrDefault<scalar>("rhoInlet", -VGREAT)),
+    extrapolateProfile_
+    (
+        dict.lookupOrDefault<Switch>("extrapolateProfile", false)
+    )
 {
     if (dict.found("volumetricFlowRate"))
     {
         volumetric_ = true;
-        flowRate_ = DataEntry<scalar>::New("volumetricFlowRate", dict);
+        flowRate_ = Function1<scalar>::New("volumetricFlowRate", dict);
         rhoName_ = "rho";
     }
     else if (dict.found("massFlowRate"))
     {
         volumetric_ = false;
-        flowRate_ = DataEntry<scalar>::New("massFlowRate", dict);
+        flowRate_ = Function1<scalar>::New("massFlowRate", dict);
         rhoName_ = word(dict.lookupOrDefault<word>("rho", "rho"));
     }
     else
@@ -110,6 +97,24 @@ flowRateInletVelocityFvPatchVectorField
 }
 
 
+Foam::flowRateInletVelocityFvPatchVectorField::
+flowRateInletVelocityFvPatchVectorField
+(
+    const flowRateInletVelocityFvPatchVectorField& ptf,
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
+    flowRate_(ptf.flowRate_, false),
+    volumetric_(ptf.volumetric_),
+    rhoName_(ptf.rhoName_),
+    rhoInlet_(ptf.rhoInlet_),
+    extrapolateProfile_(ptf.extrapolateProfile_)
+{}
+
+
 Foam::flowRateInletVelocityFvPatchVectorField::
 flowRateInletVelocityFvPatchVectorField
 (
@@ -120,7 +125,8 @@ flowRateInletVelocityFvPatchVectorField
     flowRate_(ptf.flowRate_, false),
     volumetric_(ptf.volumetric_),
     rhoName_(ptf.rhoName_),
-    rhoInlet_(ptf.rhoInlet_)
+    rhoInlet_(ptf.rhoInlet_),
+    extrapolateProfile_(ptf.extrapolateProfile_)
 {}
 
 
@@ -135,12 +141,50 @@ flowRateInletVelocityFvPatchVectorField
     flowRate_(ptf.flowRate_, false),
     volumetric_(ptf.volumetric_),
     rhoName_(ptf.rhoName_),
-    rhoInlet_(ptf.rhoInlet_)
+    rhoInlet_(ptf.rhoInlet_),
+    extrapolateProfile_(ptf.extrapolateProfile_)
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+template<class RhoType>
+void Foam::flowRateInletVelocityFvPatchVectorField::updateValues
+(
+    const RhoType& rho
+)
+{
+    const scalar t = db().time().timeOutputValue();
+
+    tmp<vectorField> n = patch().nf();
+
+    if (extrapolateProfile_)
+    {
+        vectorField newValues(this->patchInternalField());
+
+        scalar flowRate = flowRate_->value(t);
+        scalar estimatedFlowRate = -gSum(rho*(this->patch().Sf() & newValues));
+
+        if (estimatedFlowRate/flowRate > 0.5)
+        {
+            newValues *= (mag(flowRate)/mag(estimatedFlowRate));
+        }
+        else
+        {
+            newValues -=
+                ((flowRate - estimatedFlowRate)/gSum(rho*patch().magSf()))*n;
+        }
+
+        this->operator==(newValues);
+    }
+    else
+    {
+        const scalar avgU = -flowRate_->value(t)/gSum(rho*patch().magSf());
+        operator==(n*avgU);
+    }
+}
+
+
 void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
 {
     if (updated())
@@ -148,27 +192,19 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
         return;
     }
 
-    const scalar t = db().time().timeOutputValue();
-
-    // a simpler way of doing this would be nice
-    const scalar avgU = -flowRate_->value(t)/gSum(patch().magSf());
-
-    tmp<vectorField> n = patch().nf();
-
     if (volumetric_ || rhoName_ == "none")
     {
-        // volumetric flow-rate or density not given
-        operator==(n*avgU);
+        updateValues(one());
     }
     else
     {
-        // mass flow-rate
+        // Mass flow-rate
         if (db().foundObject<volScalarField>(rhoName_))
         {
             const fvPatchField<scalar>& rhop =
                 patch().lookupPatchField<volScalarField, scalar>(rhoName_);
 
-            operator==(n*avgU/rhop);
+            updateValues(rhop);
         }
         else
         {
@@ -180,7 +216,8 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
                     << " and no constant density 'rhoInlet' specified"
                     << exit(FatalError);
             }
-            operator==(n*avgU/rhoInlet_);
+
+            updateValues(rhoInlet_);
         }
     }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H
index f8e8f491a7f9b0328e3ea19b7590707de93899f0..8699ad31dcaa7f0fa17036e243f2482ea1df0655 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,15 +49,17 @@ Description
         massFlowRate | mass flow rate [kg/s]   | no          |
         volumetricFlowRate | volumetric flow rate [m3/s]| no |
         rhoInlet     | inlet density           | no          |
+        extrapolateProfile | Extrapolate velocity profile | no | false
     \endtable
 
     Example of the boundary condition specification for a volumetric flow rate:
     \verbatim
     myPatch
     {
-        type        flowRateInletVelocity;
+        type                flowRateInletVelocity;
         volumetricFlowRate  0.2;
-        value       uniform (0 0 0); // placeholder
+        extrapolateProfile  yes;
+        value               uniform (0 0 0);
     }
     \endverbatim
 
@@ -67,24 +69,25 @@ Description
     {
         type                flowRateInletVelocity;
         massFlowRate        0.2;
+        extrapolateProfile  yes;
         rho                 rho;
         rhoInlet            1.0;
+        value               uniform (0 0 0);
     }
     \endverbatim
 
-    The \c flowRate entry is a \c DataEntry type, meaning that it can be
-    specified as constant, a polynomial fuction of time, and ...
+    The \c flowRate entry is a \c Function1 of time, see Foam::Function1Types.
 
 Note
     - \c rhoInlet is required for the case of a mass flow rate, where the
       density field is not available at start-up
-    - the value is positive into the domain (as an inlet)
-    - may not work correctly for transonic inlets
-    - strange behaviour with potentialFoam since the U equation is not solved
+    - The value is positive into the domain (as an inlet)
+    - May not work correctly for transonic inlets
+    - Strange behaviour with potentialFoam since the U equation is not solved
 
 SeeAlso
-    Foam::DataEntry
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     flowRateInletVelocityFvPatchVectorField.C
@@ -95,12 +98,13 @@ SourceFiles
 #define flowRateInletVelocityFvPatchVectorField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
 {
+
 /*---------------------------------------------------------------------------*\
            Class flowRateInletVelocityFvPatchVectorField Declaration
 \*---------------------------------------------------------------------------*/
@@ -112,7 +116,7 @@ class flowRateInletVelocityFvPatchVectorField
     // Private data
 
         //- Inlet integral flow rate
-        autoPtr<DataEntry<scalar> > flowRate_;
+        autoPtr<Function1<scalar>> flowRate_;
 
         //- Is volumetric?
         bool volumetric_;
@@ -123,6 +127,16 @@ class flowRateInletVelocityFvPatchVectorField
         //- Rho initialisation value (for start; if value not supplied)
         scalar rhoInlet_;
 
+        //- Set true to extrapolate the velocity profile from the interior
+        Switch extrapolateProfile_;
+
+
+    // Private member functions
+
+        //- Update the patch values given the appropriate density type and value
+        template<class RhoType>
+        void updateValues(const RhoType& rho);
+
 
 public:
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C
index 00396a70900e16b6f2e214222e9d4e81c6ea59c0..99dad9c4d998475f4f96e83fc1cab907014abfe9 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "freestreamFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-freestreamFvPatchField<Type>::freestreamFvPatchField
+Foam::freestreamFvPatchField<Type>::freestreamFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -44,20 +39,7 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
 
 
 template<class Type>
-freestreamFvPatchField<Type>::freestreamFvPatchField
-(
-    const freestreamFvPatchField<Type>& ptf,
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    inletOutletFvPatchField<Type>(ptf, p, iF, mapper)
-{}
-
-
-template<class Type>
-freestreamFvPatchField<Type>::freestreamFvPatchField
+Foam::freestreamFvPatchField<Type>::freestreamFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
@@ -85,7 +67,20 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
 
 
 template<class Type>
-freestreamFvPatchField<Type>::freestreamFvPatchField
+Foam::freestreamFvPatchField<Type>::freestreamFvPatchField
+(
+    const freestreamFvPatchField<Type>& ptf,
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    inletOutletFvPatchField<Type>(ptf, p, iF, mapper)
+{}
+
+
+template<class Type>
+Foam::freestreamFvPatchField<Type>::freestreamFvPatchField
 (
     const freestreamFvPatchField<Type>& ptf
 )
@@ -95,7 +90,7 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
 
 
 template<class Type>
-freestreamFvPatchField<Type>::freestreamFvPatchField
+Foam::freestreamFvPatchField<Type>::freestreamFvPatchField
 (
     const freestreamFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -108,7 +103,7 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void freestreamFvPatchField<Type>::write(Ostream& os) const
+void Foam::freestreamFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     if (this->phiName_ != "phi")
@@ -121,8 +116,4 @@ void freestreamFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H
index 057c667b7b9104dc880e12b7bba347c6bbd5b1bc..4c260a6adc57b59b1e1666bbc05d5dfec69555a0 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,9 +118,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new freestreamFvPatchField<Type>(*this)
             );
@@ -134,12 +134,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new freestreamFvPatchField<Type>(*this, iF)
             );
@@ -173,7 +173,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "freestreamFvPatchField.C"
+    #include "freestreamFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C
index b50eac91b8139c3afae9324419b56820467b0be0..a32d667709d2027a1b2b6765c55d717bbf3c5432 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C
@@ -42,7 +42,7 @@ freestreamPressureFvPatchScalarField
     zeroGradientFvPatchScalarField(p, iF),
     UName_("U"),
     phiName_("phi"),
-    rhoName_("none")
+    rhoName_("rho")
 {}
 
 
@@ -57,7 +57,7 @@ freestreamPressureFvPatchScalarField
     zeroGradientFvPatchScalarField(p, iF, dict),
     UName_(dict.lookupOrDefault<word>("U", "U")),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
-    rhoName_(dict.lookupOrDefault<word>("rho", "none"))
+    rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
 {}
 
 
@@ -153,6 +153,16 @@ void Foam::freestreamPressureFvPatchScalarField::updateCoeffs()
 }
 
 
+void Foam::freestreamPressureFvPatchScalarField::write(Ostream& os) const
+{
+    fvPatchScalarField::write(os);
+    writeEntryIfDifferent<word>(os, "U", "U", UName_);
+    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
+    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
+    writeEntry("value", os);
+}
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 namespace Foam
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H
index 4d8c5d1807873f3d7448b8aa00b6ddc8142e4690..49687b0ec9198f9f2f2b84b5a9b21ce7ec917ae8 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.H
@@ -167,6 +167,10 @@ public:
 
             //- Update the coefficients associated with the patch field
             virtual void updateCoeffs();
+
+
+        //- Write
+        virtual void write(Ostream&) const;
 };
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C
index 19d887e2578cca6705052ba824ed0427b442daf0..e5036e40586d77fd180e2a5efddc2cefd132197c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,8 +37,8 @@ Foam::inletOutletFvPatchField<Type>::inletOutletFvPatchField
     mixedFvPatchField<Type>(p, iF),
     phiName_("phi")
 {
-    this->refValue() = pTraits<Type>::zero;
-    this->refGrad() = pTraits<Type>::zero;
+    this->refValue() = Zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
@@ -82,7 +82,7 @@ Foam::inletOutletFvPatchField<Type>::inletOutletFvPatchField
         fvPatchField<Type>::operator=(this->refValue());
     }
 
-    this->refGrad() = pTraits<Type>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H
index d141aa07a53864cf8ad3c92b7bc1709e2b4d0486..d70a836616859abd471284880ffcf158ce51e843 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,9 +135,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new inletOutletFvPatchField<Type>(*this)
             );
@@ -151,12 +151,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new inletOutletFvPatchField<Type>(*this, iF)
             );
@@ -165,6 +165,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         //- Update the coefficients associated with the patch field
         virtual void updateCoeffs();
 
@@ -185,7 +194,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "inletOutletFvPatchField.C"
+    #include "inletOutletFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
index 607f88934faaae0c634d9054bf82b119ce64be58..8a113e177a0c259328dc8755c1b70b1fbba56a82 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,8 +44,8 @@ inletOutletTotalTemperatureFvPatchScalarField
     gamma_(0.0),
     T0_(p.size(), 0.0)
 {
-    this->refValue() = pTraits<scalar>::zero;
-    this->refGrad() = pTraits<scalar>::zero;
+    this->refValue() = Zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
@@ -83,7 +83,7 @@ inletOutletTotalTemperatureFvPatchScalarField
 {
     this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
 
-    this->refValue() = pTraits<scalar>::zero;
+    this->refValue() = Zero;
     if (dict.found("value"))
     {
         fvPatchField<scalar>::operator=
@@ -96,7 +96,7 @@ inletOutletTotalTemperatureFvPatchScalarField
         fvPatchField<scalar>::operator=(T0_);
     }
 
-    this->refGrad() = pTraits<scalar>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
index e5f7a049f4e80181e8033780360a72c7f2801204..00f2a8307efe7c840f6d3e24ba64f982b36cb7a3 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ interstitialInletVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchVectorField(p, iF),
-    inletVelocity_(p.size(), vector::zero),
+    inletVelocity_(p.size(), Zero),
     alphaName_("alpha")
 {}
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.C
index 5d359bc691550b2a9c65b443acf2d5bbf4937571..06047dcebdf19e28b420cab317b5022c9143e2aa 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,19 +24,13 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "mappedFieldFvPatchField.H"
-
 #include "volFields.H"
 #include "interpolationCell.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
+Foam::mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -49,36 +43,36 @@ mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 
 
 template<class Type>
-mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
+Foam::mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 (
-    const mappedFieldFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
-    mappedPatchBase(p.patch(), ptf),
-    mappedPatchFieldBase<Type>(*this, *this, ptf)
+    fixedValueFvPatchField<Type>(p, iF, dict),
+    mappedPatchBase(p.patch(), dict),
+    mappedPatchFieldBase<Type>(*this, *this, dict)
 {}
 
 
 template<class Type>
-mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
+Foam::mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 (
+    const mappedFieldFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fixedValueFvPatchField<Type>(p, iF, dict),
-    mappedPatchBase(p.patch(), dict),
-    mappedPatchFieldBase<Type>(*this, *this, dict)
+    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
+    mappedPatchBase(p.patch(), ptf),
+    mappedPatchFieldBase<Type>(*this, *this, ptf)
 {}
 
 
 template<class Type>
-mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
+Foam::mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
@@ -118,7 +112,7 @@ mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 
 
 template<class Type>
-mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
+Foam::mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 (
     const mappedFieldFvPatchField<Type>& ptf
 )
@@ -130,7 +124,7 @@ mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 
 
 template<class Type>
-mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
+Foam::mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 (
     const mappedFieldFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -145,7 +139,7 @@ mappedFieldFvPatchField<Type>::mappedFieldFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void mappedFieldFvPatchField<Type>::updateCoeffs()
+void Foam::mappedFieldFvPatchField<Type>::updateCoeffs()
 {
     if (this->updated())
     {
@@ -169,7 +163,7 @@ void mappedFieldFvPatchField<Type>::updateCoeffs()
 
 
 template<class Type>
-void mappedFieldFvPatchField<Type>::write(Ostream& os) const
+void Foam::mappedFieldFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     mappedPatchBase::write(os);
@@ -178,8 +172,4 @@ void mappedFieldFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H
index 983df12eb4aec8ecf35dceb4476bd3922c279613..2bbece6baa1b454a6cba1610e2a16673e9e9fb98 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedFieldFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,9 +157,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFieldFvPatchField<Type>
                 (
@@ -176,12 +176,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFieldFvPatchField<Type>
                 (
@@ -212,7 +212,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mappedFieldFvPatchField.C"
+    #include "mappedFieldFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C
index 5e8c48df973e7bb7155f0a3ff977e3654d88a264..589afaf3098d9ebf9be613f802dd11e50782c178 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ mappedPatchFieldBase<Type>::mappedPatchFieldBase
     patchField_(patchField),
     fieldName_(patchField_.dimensionedInternalField().name()),
     setAverage_(false),
-    average_(pTraits<Type>::zero),
+    average_(Zero),
     interpolationScheme_(interpolationCell<Type>::typeName)
 {}
 
@@ -166,7 +166,7 @@ mappedPatchFieldBase<Type>::sampleField() const
 
 
 template<class Type>
-tmp<Field<Type> > mappedPatchFieldBase<Type>::mappedField() const
+tmp<Field<Type>> mappedPatchFieldBase<Type>::mappedField() const
 {
     typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
 
@@ -179,8 +179,8 @@ tmp<Field<Type> > mappedPatchFieldBase<Type>::mappedField() const
     const fvMesh& nbrMesh = refCast<const fvMesh>(mapper_.sampleMesh());
 
     // Result of obtaining remote values
-    tmp<Field<Type> > tnewValues(new Field<Type>(0));
-    Field<Type>& newValues = tnewValues();
+    tmp<Field<Type>> tnewValues(new Field<Type>(0));
+    Field<Type>& newValues = tnewValues.ref();
 
     switch (mapper_.mode())
     {
@@ -203,7 +203,7 @@ tmp<Field<Type> > mappedPatchFieldBase<Type>::mappedField() const
                     samples
                 );
 
-                autoPtr<interpolation<Type> > interpolator
+                autoPtr<interpolation<Type>> interpolator
                 (
                     interpolation<Type>::New
                     (
@@ -259,7 +259,7 @@ tmp<Field<Type> > mappedPatchFieldBase<Type>::mappedField() const
         }
         case mappedPatchBase::NEARESTFACE:
         {
-            Field<Type> allValues(nbrMesh.nFaces(), pTraits<Type>::zero);
+            Field<Type> allValues(nbrMesh.nFaces(), Zero);
 
             const fieldType& nbrField = sampleField();
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.H
index b8b69fa4ee255683a027a53e199839e5c51f3c7d..a02e92197bff4fcb9f5af5dd8f3197d0e2983a32 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -145,7 +145,7 @@ public:
         const GeometricField<Type, fvPatchField, volMesh>& sampleField() const;
 
         //- Map sampleField onto *this patch
-        virtual tmp<Field<Type> > mappedField() const;
+        virtual tmp<Field<Type>> mappedField() const;
 
         //- Write
         virtual void write(Ostream&) const;
@@ -159,7 +159,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mappedPatchFieldBase.C"
+    #include "mappedPatchFieldBase.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C
index ba3a0e02092b00eceeffce9611ca79da865962a6..6f5a49c7b624c44068efcb9906da412a44e1a18d 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -145,7 +145,7 @@ void Foam::mappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
         }
         case mappedPatchBase::NEARESTFACE:
         {
-            Field<Type> allValues(nbrMesh.nFaces(), pTraits<Type>::zero);
+            Field<Type> allValues(nbrMesh.nFaces(), Zero);
 
             const FieldType& nbrField = this->sampleField();
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H
index a4b48fce8faa69d99c7087d5a11b2562aac6d9a7..f0af7f306c4e9253dd114a7ec3a611c39e76e348 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,9 +126,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFixedInternalValueFvPatchField<Type>(*this)
             );
@@ -142,12 +142,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFixedInternalValueFvPatchField<Type>(*this, iF)
             );
@@ -173,7 +173,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mappedFixedInternalValueFvPatchField.C"
+    #include "mappedFixedInternalValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H
index 2f9ecedd66db14332ef11e55141232c91a9d9bfd..2740010164451f2c77b59a345741c78f429a3df4 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedPushedInternalValue/mappedFixedPushedInternalValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,9 +127,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFixedPushedInternalValueFvPatchField<Type>
                 (
@@ -146,12 +146,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFixedPushedInternalValueFvPatchField<Type>
                 (
@@ -181,7 +181,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mappedFixedPushedInternalValueFvPatchField.C"
+    #include "mappedFixedPushedInternalValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.C
index 0100f09730cd6faf4e364a5fd91f32aa7059e40a..a1a80c734214f6d8b300d3b864128eb4840aa1f2 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.C
@@ -27,15 +27,10 @@ License
 #include "mappedPatchBase.H"
 #include "volFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
+Foam::mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -47,34 +42,34 @@ mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 
 
 template<class Type>
-mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
+Foam::mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 (
-    const mappedFixedValueFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
-    mappedPatchFieldBase<Type>(this->mapper(p, iF), *this, ptf)
+    fixedValueFvPatchField<Type>(p, iF, dict),
+    mappedPatchFieldBase<Type>(this->mapper(p, iF), *this, dict)
 {}
 
 
 template<class Type>
-mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
+Foam::mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 (
+    const mappedFixedValueFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fixedValueFvPatchField<Type>(p, iF, dict),
-    mappedPatchFieldBase<Type>(this->mapper(p, iF), *this, dict)
+    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
+    mappedPatchFieldBase<Type>(this->mapper(p, iF), *this, ptf)
 {}
 
 
 template<class Type>
-mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
+Foam::mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 (
     const mappedFixedValueFvPatchField<Type>& ptf
 )
@@ -85,7 +80,7 @@ mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 
 
 template<class Type>
-mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
+Foam::mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 (
     const mappedFixedValueFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -99,7 +94,7 @@ mappedFixedValueFvPatchField<Type>::mappedFixedValueFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-const mappedPatchBase& mappedFixedValueFvPatchField<Type>::mapper
+const Foam::mappedPatchBase& Foam::mappedFixedValueFvPatchField<Type>::mapper
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -119,7 +114,7 @@ const mappedPatchBase& mappedFixedValueFvPatchField<Type>::mapper
 
 
 template<class Type>
-void mappedFixedValueFvPatchField<Type>::updateCoeffs()
+void Foam::mappedFixedValueFvPatchField<Type>::updateCoeffs()
 {
     if (this->updated())
     {
@@ -144,7 +139,7 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
 
 
 template<class Type>
-void mappedFixedValueFvPatchField<Type>::write(Ostream& os) const
+void Foam::mappedFixedValueFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     mappedPatchFieldBase<Type>::write(os);
@@ -152,8 +147,4 @@ void mappedFixedValueFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H
index 49b7d7a96b6fa040d55ef6d34eebd2c4446238a3..38857d4e984e446b8b62bbc5ef124fe5b0efb950 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedValue/mappedFixedValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -153,9 +153,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFixedValueFvPatchField<Type>(*this)
             );
@@ -169,12 +169,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new mappedFixedValueFvPatchField<Type>(*this, iF)
             );
@@ -200,7 +200,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mappedFixedValueFvPatchField.C"
+    #include "mappedFixedValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
index 713b94492e790b4f48793dd9f8a66e7a09d451be..be3e6304b98ef0a1933e57e751d85c4104c45d46 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -168,7 +168,7 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
     {
         case mappedPolyPatch::NEARESTFACE:
         {
-            vectorField allUValues(nbrMesh.nFaces(), vector::zero);
+            vectorField allUValues(nbrMesh.nFaces(), Zero);
             scalarField allPhiValues(nbrMesh.nFaces(), 0.0);
 
             forAll(UField.boundaryField(), patchI)
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
index 07c79444cb6ff067f86c8cfc92db9dbc4b58de57..46a7c7a90fc1ab9ee885e2c0aae14253ebf1c787 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,11 +24,10 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "movingWallVelocityFvPatchVectorField.H"
-#include "addToRunTimeSelectionTable.H"
 #include "volFields.H"
 #include "surfaceFields.H"
 #include "fvcMeshPhi.H"
-
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -39,38 +38,35 @@ movingWallVelocityFvPatchVectorField
     const DimensionedField<vector, volMesh>& iF
 )
 :
-    fixedValueFvPatchVectorField(p, iF),
-    UName_("U")
+    fixedValueFvPatchVectorField(p, iF)
 {}
 
 
 Foam::movingWallVelocityFvPatchVectorField::
 movingWallVelocityFvPatchVectorField
 (
-    const movingWallVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fixedValueFvPatchVectorField(ptf, p, iF, mapper),
-    UName_(ptf.UName_)
-{}
+    fixedValueFvPatchVectorField(p, iF)
+{
+    fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
+}
 
 
 Foam::movingWallVelocityFvPatchVectorField::
 movingWallVelocityFvPatchVectorField
 (
+    const movingWallVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fixedValueFvPatchVectorField(p, iF),
-    UName_(dict.lookupOrDefault<word>("U", "U"))
-{
-    fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
-}
+    fixedValueFvPatchVectorField(ptf, p, iF, mapper)
+{}
 
 
 Foam::movingWallVelocityFvPatchVectorField::
@@ -79,8 +75,7 @@ movingWallVelocityFvPatchVectorField
     const movingWallVelocityFvPatchVectorField& mwvpvf
 )
 :
-    fixedValueFvPatchVectorField(mwvpvf),
-    UName_(mwvpvf.UName_)
+    fixedValueFvPatchVectorField(mwvpvf)
 {}
 
 
@@ -91,8 +86,7 @@ movingWallVelocityFvPatchVectorField
     const DimensionedField<vector, volMesh>& iF
 )
 :
-    fixedValueFvPatchVectorField(mwvpvf, iF),
-    UName_(mwvpvf.UName_)
+    fixedValueFvPatchVectorField(mwvpvf, iF)
 {}
 
 
@@ -124,7 +118,9 @@ void Foam::movingWallVelocityFvPatchVectorField::updateCoeffs()
 
         const vectorField Up((pp.faceCentres() - oldFc)/deltaT);
 
-        const volVectorField& U = db().lookupObject<volVectorField>(UName_);
+        const volVectorField& U =
+            static_cast<const volVectorField&>(dimensionedInternalField());
+
         scalarField phip
         (
             p.patchField<surfaceScalarField, scalar>(fvc::meshPhi(U))
@@ -145,7 +141,6 @@ void Foam::movingWallVelocityFvPatchVectorField::updateCoeffs()
 void Foam::movingWallVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    writeEntryIfDifferent<word>(os, "U", "U", UName_);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H
index 13685e8d1cbee32d7c42ee83168b88875c2a6766..788eef034ba78008b400558f9556dbf128680a0d 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/movingWallVelocity/movingWallVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -32,21 +32,14 @@ Description
     moving walls.  In addition, it should also be applied to 'moving' walls
     for moving reference frame (MRF) calculations.
 
-
     \heading Patch usage
 
-    \table
-        Property     | Description             | Required    | Default value
-        U            | velociy field name      | no          | U
-    \endtable
-
     Example of the boundary condition specification:
     \verbatim
     myPatch
     {
         type            movingWallVelocity;
-        U               U;
-        value           uniform (0 0 0);    // initial value
+        value           uniform (0 0 0);    // Initial value
     }
     \endverbatim
 
@@ -62,7 +55,6 @@ SourceFiles
 #ifndef movingWallVelocityFvPatchVectorField_H
 #define movingWallVelocityFvPatchVectorField_H
 
-#include "fvPatchFields.H"
 #include "fixedValueFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -78,11 +70,6 @@ class movingWallVelocityFvPatchVectorField
 :
     public fixedValueFvPatchVectorField
 {
-    // Private data
-
-       //- Name of velocity field
-       word UName_;
-
 
 public:
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C
new file mode 100644
index 0000000000000000000000000000000000000000..b042164ca7aa0db69547c00163354aa2d65a2ea5
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C
@@ -0,0 +1,102 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "noSlipFvPatchVectorField.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
+(
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF
+)
+:
+    fixedValueFvPatchVectorField(p, iF, Zero)
+{}
+
+
+Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
+(
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    fixedValueFvPatchVectorField(p, iF, Zero)
+{}
+
+
+Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
+(
+    const noSlipFvPatchVectorField& ptf,
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedValueFvPatchVectorField(p, iF, Zero)
+{}
+
+
+Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
+(
+    const noSlipFvPatchVectorField& mwvpvf
+)
+:
+    fixedValueFvPatchVectorField(mwvpvf)
+{}
+
+
+Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField
+(
+    const noSlipFvPatchVectorField& mwvpvf,
+    const DimensionedField<vector, volMesh>& iF
+)
+:
+    fixedValueFvPatchVectorField(mwvpvf, iF)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::noSlipFvPatchVectorField::write(Ostream& os) const
+{
+    fvPatchVectorField::write(os);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makePatchTypeField
+    (
+        fvPatchVectorField,
+        noSlipFvPatchVectorField
+    );
+}
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H
new file mode 100644
index 0000000000000000000000000000000000000000..a2925e992f183584bfc6c80a7dfc6ee3572528f0
--- /dev/null
+++ b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.H
@@ -0,0 +1,153 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::noSlipFvPatchVectorField
+
+Group
+    grpWallBoundaryConditions
+
+Description
+    This boundary condition fixes the velocity to zero at walls.
+
+    \heading Patch usage
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type            noSlip;
+    }
+    \endverbatim
+
+SeeAlso
+    Foam::fixedValueFvPatchVectorField
+
+SourceFiles
+    noSlipFvPatchVectorField.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef noSlipFvPatchVectorField_H
+#define noSlipFvPatchVectorField_H
+
+#include "fixedValueFvPatchFields.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+             Class noSlipFvPatchVectorField Declaration
+\*---------------------------------------------------------------------------*/
+
+class noSlipFvPatchVectorField
+:
+    public fixedValueFvPatchVectorField
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("noSlip");
+
+
+    // Constructors
+
+        //- Construct from patch and internal field
+        noSlipFvPatchVectorField
+        (
+            const fvPatch&,
+            const DimensionedField<vector, volMesh>&
+        );
+
+        //- Construct from patch, internal field and dictionary
+        noSlipFvPatchVectorField
+        (
+            const fvPatch&,
+            const DimensionedField<vector, volMesh>&,
+            const dictionary&
+        );
+
+        //- Construct by mapping given noSlipFvPatchVectorField
+        //  onto a new patch
+        noSlipFvPatchVectorField
+        (
+            const noSlipFvPatchVectorField&,
+            const fvPatch&,
+            const DimensionedField<vector, volMesh>&,
+            const fvPatchFieldMapper&
+        );
+
+        //- Construct as copy
+        noSlipFvPatchVectorField
+        (
+            const noSlipFvPatchVectorField&
+        );
+
+        //- Construct and return a clone
+        virtual tmp<fvPatchVectorField> clone() const
+        {
+            return tmp<fvPatchVectorField>
+            (
+                new noSlipFvPatchVectorField(*this)
+            );
+        }
+
+        //- Construct as copy setting internal field reference
+        noSlipFvPatchVectorField
+        (
+            const noSlipFvPatchVectorField&,
+            const DimensionedField<vector, volMesh>&
+        );
+
+        //- Construct and return a clone setting internal field reference
+        virtual tmp<fvPatchVectorField> clone
+        (
+            const DimensionedField<vector, volMesh>& iF
+        ) const
+        {
+            return tmp<fvPatchVectorField>
+            (
+                new noSlipFvPatchVectorField(*this, iF)
+            );
+        }
+
+
+    // Member functions
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C
deleted file mode 100644
index 715586a3691c69c5142b22b25073cefddea771dd..0000000000000000000000000000000000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C
+++ /dev/null
@@ -1,214 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "oscillatingFixedValueFvPatchField.H"
-#include "mathematicalConstants.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
-template<class Type>
-scalar oscillatingFixedValueFvPatchField<Type>::currentScale() const
-{
-    const scalar t = this->db().time().timeOutputValue();
-    const scalar a = amplitude_->value(t);
-    const scalar f = frequency_->value(t);
-
-    return 1.0 + a*sin(constant::mathematical::twoPi*f*t);
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-template<class Type>
-oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
-(
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF
-)
-:
-    fixedValueFvPatchField<Type>(p, iF),
-    refValue_(p.size()),
-    offset_(pTraits<Type>::zero),
-    amplitude_(),
-    frequency_(),
-    curTimeIndex_(-1)
-{}
-
-
-template<class Type>
-oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
-(
-    const oscillatingFixedValueFvPatchField<Type>& ptf,
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
-    refValue_(ptf.refValue_, mapper),
-    offset_(ptf.offset_),
-    amplitude_(ptf.amplitude_, false),
-    frequency_(ptf.frequency_, false),
-    curTimeIndex_(-1)
-{}
-
-
-template<class Type>
-oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
-(
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
-)
-:
-    fixedValueFvPatchField<Type>(p, iF),
-    refValue_("refValue", dict, p.size()),
-    offset_(dict.lookupOrDefault<Type>("offset", pTraits<Type>::zero)),
-    amplitude_(DataEntry<scalar>::New("amplitude", dict)),
-    frequency_(DataEntry<scalar>::New("frequency", dict)),
-    curTimeIndex_(-1)
-{
-    if (dict.found("value"))
-    {
-        fixedValueFvPatchField<Type>::operator==
-        (
-            Field<Type>("value", dict, p.size())
-        );
-    }
-    else
-    {
-        fixedValueFvPatchField<Type>::operator==
-        (
-            refValue_*currentScale()
-          + offset_
-        );
-    }
-}
-
-
-template<class Type>
-oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
-(
-    const oscillatingFixedValueFvPatchField<Type>& ptf
-)
-:
-    fixedValueFvPatchField<Type>(ptf),
-    refValue_(ptf.refValue_),
-    offset_(ptf.offset_),
-    amplitude_(ptf.amplitude_, false),
-    frequency_(ptf.frequency_, false),
-    curTimeIndex_(-1)
-{}
-
-
-template<class Type>
-oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
-(
-    const oscillatingFixedValueFvPatchField<Type>& ptf,
-    const DimensionedField<Type, volMesh>& iF
-)
-:
-    fixedValueFvPatchField<Type>(ptf, iF),
-    refValue_(ptf.refValue_),
-    offset_(ptf.offset_),
-    amplitude_(ptf.amplitude_, false),
-    frequency_(ptf.frequency_, false),
-    curTimeIndex_(-1)
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-template<class Type>
-void oscillatingFixedValueFvPatchField<Type>::autoMap
-(
-    const fvPatchFieldMapper& m
-)
-{
-    fixedValueFvPatchField<Type>::autoMap(m);
-    refValue_.autoMap(m);
-}
-
-
-template<class Type>
-void oscillatingFixedValueFvPatchField<Type>::rmap
-(
-    const fvPatchField<Type>& ptf,
-    const labelList& addr
-)
-{
-    fixedValueFvPatchField<Type>::rmap(ptf, addr);
-
-    const oscillatingFixedValueFvPatchField<Type>& tiptf =
-        refCast<const oscillatingFixedValueFvPatchField<Type> >(ptf);
-
-    refValue_.rmap(tiptf.refValue_, addr);
-}
-
-
-template<class Type>
-void oscillatingFixedValueFvPatchField<Type>::updateCoeffs()
-{
-    if (this->updated())
-    {
-        return;
-    }
-
-    if (curTimeIndex_ != this->db().time().timeIndex())
-    {
-        fixedValueFvPatchField<Type>::operator==
-        (
-            refValue_*currentScale()
-          + offset_
-        );
-
-        curTimeIndex_ = this->db().time().timeIndex();
-    }
-
-    fixedValueFvPatchField<Type>::updateCoeffs();
-}
-
-
-template<class Type>
-void oscillatingFixedValueFvPatchField<Type>::write(Ostream& os) const
-{
-    fixedValueFvPatchField<Type>::write(os);
-    refValue_.writeEntry("refValue", os);
-    os.writeKeyword("offset") << offset_ << token::END_STATEMENT << nl;
-    amplitude_->writeData(os);
-    frequency_->writeData(os);
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.H
deleted file mode 100644
index d16fb9644a45cd6aa57d594dcb30d77aa22fd8eb..0000000000000000000000000000000000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.H
+++ /dev/null
@@ -1,277 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software: you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
-Class
-    Foam::oscillatingFixedValueFvPatchField
-
-Group
-    grpGenericBoundaryConditions
-
-Description
-    This boundary condition provides an oscillating condition in terms of
-    amplitude and frequency.
-
-        \f[
-            x_p = (1 + a sin(2 \pi f t))x_{ref} + x_o
-        \f]
-
-    where
-
-    \vartable
-        x_p     | patch values
-        x_{ref} | patch reference values
-        x_o     | patch offset values
-        a       | amplitude
-        f       | frequency [1/s]
-        t       | time [s]
-    \endvartable
-
-    \heading Patch usage
-
-    \table
-        Property     | Description             | Required    | Default value
-        refValue     | reference value         | yes         |
-        offset       | offset value            | no          | 0.0
-        amplitude    | oscillation amplitude   | yes         |
-        frequency    | oscillation frequency   | yes         |
-    \endtable
-
-    Example of the boundary condition specification:
-    \verbatim
-    myPatch
-    {
-        type            oscillatingFixedValue;
-        refValue        uniform 5.0;
-        offset          0.0;
-        amplitude       constant 0.5;
-        frequency       constant 10;
-    }
-    \endverbatim
-
-Note
-    The amplitude and frequency entries are DataEntry types, able to describe
-    time varying functions.  The example above gives the usage for supplying
-    constant values.
-
-SeeAlso
-    Foam::DataEntry
-
-SourceFiles
-    oscillatingFixedValueFvPatchField.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef oscillatingFixedValueFvPatchField_H
-#define oscillatingFixedValueFvPatchField_H
-
-#include "Random.H"
-#include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
-              Class oscillatingFixedValueFvPatchField Declaration
-\*---------------------------------------------------------------------------*/
-
-template<class Type>
-class oscillatingFixedValueFvPatchField
-:
-    public fixedValueFvPatchField<Type>
-{
-    // Private data
-
-        //- Reference value
-        Field<Type> refValue_;
-
-        //- Offset
-        Type offset_;
-
-        //- Amplitude
-        autoPtr<DataEntry<scalar> > amplitude_;
-
-        //- Frequency
-        autoPtr<DataEntry<scalar> > frequency_;
-
-        //- Current time index
-        label curTimeIndex_;
-
-
-    // Private Member Functions
-
-        //- Return current scale
-        scalar currentScale() const;
-
-
-public:
-
-    //- Runtime type information
-    TypeName("oscillatingFixedValue");
-
-
-    // Constructors
-
-        //- Construct from patch and internal field
-        oscillatingFixedValueFvPatchField
-        (
-            const fvPatch&,
-            const DimensionedField<Type, volMesh>&
-        );
-
-        //- Construct from patch, internal field and dictionary
-        oscillatingFixedValueFvPatchField
-        (
-            const fvPatch&,
-            const DimensionedField<Type, volMesh>&,
-            const dictionary&
-        );
-
-        //- Construct by mapping given oscillatingFixedValueFvPatchField
-        //  onto a new patch
-        oscillatingFixedValueFvPatchField
-        (
-            const oscillatingFixedValueFvPatchField<Type>&,
-            const fvPatch&,
-            const DimensionedField<Type, volMesh>&,
-            const fvPatchFieldMapper&
-        );
-
-        //- Construct as copy
-        oscillatingFixedValueFvPatchField
-        (
-            const oscillatingFixedValueFvPatchField<Type>&
-        );
-
-        //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
-        {
-            return tmp<fvPatchField<Type> >
-            (
-                new oscillatingFixedValueFvPatchField<Type>(*this)
-            );
-        }
-
-        //- Construct as copy setting internal field reference
-        oscillatingFixedValueFvPatchField
-        (
-            const oscillatingFixedValueFvPatchField<Type>&,
-            const DimensionedField<Type, volMesh>&
-        );
-
-        //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
-        (
-            const DimensionedField<Type, volMesh>& iF
-        ) const
-        {
-            return tmp<fvPatchField<Type> >
-            (
-                new oscillatingFixedValueFvPatchField<Type>(*this, iF)
-            );
-        }
-
-
-    // Member functions
-
-        // Access
-
-            //- Return the ref value
-            const Field<Type>& refValue() const
-            {
-                return refValue_;
-            }
-
-            //- Return reference to the ref value to allow adjustment
-            Field<Type>& refValue()
-            {
-                return refValue_;
-            }
-
-            //- Return amplitude
-            scalar amplitude() const
-            {
-                return amplitude_;
-            }
-
-            scalar& amplitude()
-            {
-                return amplitude_;
-            }
-
-            //- Return frequency
-            scalar frequency() const
-            {
-                return frequency_;
-            }
-
-            scalar& frequency()
-            {
-                return frequency_;
-            }
-
-
-        // Mapping functions
-
-            //- Map (and resize as needed) from self given a mapping object
-            virtual void autoMap
-            (
-                const fvPatchFieldMapper&
-            );
-
-            //- Reverse map the given fvPatchField onto this fvPatchField
-            virtual void rmap
-            (
-                const fvPatchField<Type>&,
-                const labelList&
-            );
-
-
-        // Evaluation functions
-
-            //- Update the coefficients associated with the patch field
-            virtual void updateCoeffs();
-
-
-        //- Write
-        virtual void write(Ostream&) const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#ifdef NoRepository
-#   include "oscillatingFixedValueFvPatchField.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C
index d6f69f823a879f4511a99b2e4f2c7d3add342aa8..7584e4aa1a9172624046b728240ef1354aab9867 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ Foam::outletInletFvPatchField<Type>::outletInletFvPatchField
     phiName_("phi")
 {
     this->refValue() = *this;
-    this->refGrad() = pTraits<Type>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
@@ -82,7 +82,7 @@ Foam::outletInletFvPatchField<Type>::outletInletFvPatchField
         fvPatchField<Type>::operator=(this->refValue());
     }
 
-    this->refGrad() = pTraits<Type>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H
index 9d20845488c27bd59cf421df14449300eac02a02..62625a7aac6f72b138b7b29b73b473c2dff3cf94 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,9 +135,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new outletInletFvPatchField<Type>(*this)
             );
@@ -151,12 +151,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new outletInletFvPatchField<Type>(*this, iF)
             );
@@ -180,7 +180,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "outletInletFvPatchField.C"
+    #include "outletInletFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H
index 059faeab0910d0ca327bce12e9c0d8f2e7a45f09..7433f9c1ee3411e1fbfdc011693c3c1e6873ec2a 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletMappedUniformInlet/outletMappedUniformInletFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,9 +127,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new outletMappedUniformInletFvPatchField<Type>(*this)
             );
@@ -143,12 +143,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new outletMappedUniformInletFvPatchField<Type>(*this, iF)
             );
@@ -184,7 +184,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "outletMappedUniformInletFvPatchField.C"
+    #include "outletMappedUniformInletFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C
index abf782bc901c814f8801d89baa1cdff8e97294b0..4004a663621d1432c2d91d682d42728c77719e8c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,8 +42,8 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
     Umean_(0),
     alphaName_("none")
 {
-    refValue() = vector::zero;
-    refGrad() = vector::zero;
+    refValue() = Zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
@@ -75,8 +75,8 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField
     Umean_(readScalar(dict.lookup("Umean"))),
     alphaName_(dict.lookup("alpha"))
 {
-    refValue() = vector::zero;
-    refGrad() = vector::zero;
+    refValue() = Zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 
     if (dict.found("value"))
@@ -145,7 +145,7 @@ void Foam::outletPhaseMeanVelocityFvPatchVectorField::updateCoeffs()
     // such that the phase mean is Umean_
     if (Uzgmean >= Umean_)
     {
-        refValue() = vector::zero;
+        refValue() = Zero;
         valueFraction() = 1.0 - Umean_/Uzgmean;
     }
     else
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C
index 1c4a891b05cb01906bddca46761b08dd59c9a4b1..35655ab3b48def9dc4dddb86f4e1c023266aefbe 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,14 +115,14 @@ void Foam::partialSlipFvPatchField<Type>::rmap
     transformFvPatchField<Type>::rmap(ptf, addr);
 
     const partialSlipFvPatchField<Type>& dmptf =
-        refCast<const partialSlipFvPatchField<Type> >(ptf);
+        refCast<const partialSlipFvPatchField<Type>>(ptf);
 
     valueFraction_.rmap(dmptf.valueFraction_, addr);
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::partialSlipFvPatchField<Type>::snGrad() const
 {
     tmp<vectorField> nHat = this->patch().nf();
@@ -159,7 +159,7 @@ void Foam::partialSlipFvPatchField<Type>::evaluate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::partialSlipFvPatchField<Type>::snGradTransformDiag() const
 {
     const vectorField nHat(this->patch().nf());
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H
index b4fd5e7ce7f37e231110b8a192a5c5bf1a5c079b..4824ea6613d28ba298ecb276383939118dc8ac37 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new partialSlipFvPatchField<Type>(*this)
             );
@@ -136,12 +136,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new partialSlipFvPatchField<Type>(*this, iF)
             );
@@ -150,6 +150,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
+
         // Mapping functions
 
             //- Map (and resize as needed) from self given a mapping object
@@ -182,7 +191,7 @@ public:
         // Evaluation functions
 
             //- Return gradient at boundary
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Evaluate the patch field
             virtual void evaluate
@@ -191,7 +200,7 @@ public:
             );
 
             //- Return face-gradient transform diagonal
-            virtual tmp<Field<Type> > snGradTransformDiag() const;
+            virtual tmp<Field<Type>> snGradTransformDiag() const;
 
 
         //- Write
@@ -229,7 +238,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "partialSlipFvPatchField.C"
+    #include "partialSlipFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
index 09da151f9850b35a2950b4107c6496839ac5cec0..85eae304198a2a8c40f9d911a371ab4307e77c98 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ phaseHydrostaticPressureFvPatchScalarField
     phaseName_("alpha"),
     rho_(0.0),
     pRefValue_(0.0),
-    pRefPoint_(vector::zero)
+    pRefPoint_(Zero)
 {
     this->refValue() = 0.0;
     this->refGrad() = 0.0;
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H
index cb0c472da410539e7f7ed09348810a23de8c50dc..41b5db3a7f6b6c651f93ed374d3ad252cba90125 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -185,6 +185,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the phaseName
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C
index a6a18a61cc04197d85fef7bec1cdd670bcde22d2..a8b69d004042a9660b1057b9e9b7aad6823e26a9 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ pressureDirectedInletOutletVelocityFvPatchVectorField
     inletDir_(p.size())
 {
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
@@ -80,7 +80,7 @@ pressureDirectedInletOutletVelocityFvPatchVectorField
 {
     fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H
index b6e24c73c7ba1bf0c607a493878a0c443ea370b4..83fde6d2c665900a7e05408b2c8aa8c43b68e22b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -177,6 +177,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of rho
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H
index b70077987660c34ac4bd45e834c434d7720eb0cc..697f3bce166e19eb417a0d3f30ddcd442919f621 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletVelocity/pressureDirectedInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,6 +173,14 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
         // Access
 
             //- Return the name of rho
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C
index 0e153504705b1198143670e06f92a3288bc87a2c..e691e374b0cb4cbd343cb68da3cf3009eba76187 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
     rhoName_("rho")
 {
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
@@ -78,7 +78,7 @@ pressureInletOutletParSlipVelocityFvPatchVectorField
 {
     fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H
index f73730907d3fed98de48120ba103450562ced54b..52f19ab0792438d28de4c1cd99221a533930dd26 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,6 +173,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of rho
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C
index 63f9707715cd2a4b51a254d993efacc05932d682..5b28ef39c5e3412f0a49d58e3e1842eae06fa7a9 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,9 +41,9 @@ pressureInletOutletVelocityFvPatchVectorField
     directionMixedFvPatchVectorField(p, iF),
     phiName_("phi")
 {
-    refValue() = vector::zero;
-    refGrad() = vector::zero;
-    valueFraction() = symmTensor::zero;
+    refValue() = Zero;
+    refGrad() = Zero;
+    valueFraction() = Zero;
 }
 
 
@@ -88,11 +88,11 @@ pressureInletOutletVelocityFvPatchVectorField
     }
     else
     {
-        refValue() = vector::zero;
+        refValue() = Zero;
     }
 
-    refGrad() = vector::zero;
-    valueFraction() = symmTensor::zero;
+    refGrad() = Zero;
+    valueFraction() = Zero;
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H
index 1a6def9be359ac102d646548384353078f526581..6d44757d7093990558bfcddd78cfddafc8ca74db 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -163,6 +163,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of phi
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H
index d22757c6725536bee2b23699cda87c3418f7fbfa..4a2a1fbda479ab7b6e2710d9da02b6b75a8827a8 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletUniformVelocity/pressureInletUniformVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -138,6 +138,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         //- Update the coefficients associated with the patch field
         virtual void updateCoeffs();
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H
index 12b7d8bec538d6baac09b14317e9d7c9f508bc80..94d3caf943266b07dd9aa5a159cd271f0ebd9e50 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletVelocity/pressureInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,6 +156,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of rho
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C
index 70ce9adedcd50f266fbd5b377b88a72661eb669f..79dd6a8c92ec7675d0433924e1fa0a4cdc18555f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ pressureNormalInletOutletVelocityFvPatchVectorField
     rhoName_("rho")
 {
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
@@ -78,7 +78,7 @@ pressureNormalInletOutletVelocityFvPatchVectorField
 {
     fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 0.0;
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H
index c138b18f6959352e53be8b471aef6294a09317a2..d5eefefb80628b61113fb95b3e2de6057fa88c29 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -172,6 +172,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of rho
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorFieldTemplates.C b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorFieldTemplates.C
index 6bd1d95bc561de129300c6460059e6c178b69f0a..b9d1d591271541bb0851298c263536292083fabc 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorFieldTemplates.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePIDControlInletVelocity/pressurePIDControlInletVelocityFvPatchVectorFieldTemplates.C
@@ -44,7 +44,7 @@ void Foam::pressurePIDControlInletVelocityFvPatchVectorField::faceZoneAverage
     const faceZone& zone = mesh.faceZones()[name];
 
     area = 0;
-    average = pTraits<Type>::zero;
+    average = Type(Zero);
 
     forAll(zone, faceI)
     {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C
index c86986f711090937b0ad9552b6dfde32f32df278..5ea2c2c823780709cb7f2b9587398a5990284ee1 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C
@@ -53,7 +53,7 @@ prghPressureFvPatchScalarField
 )
 :
     fixedValueFvPatchScalarField(p, iF),
-    rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
+    rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
     p_("p", dict, p.size())
 {
     if (dict.found("value"))
@@ -171,11 +171,7 @@ void Foam::prghPressureFvPatchScalarField::updateCoeffs()
 void Foam::prghPressureFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchScalarField::write(os);
-    if (rhoName_ != "rho")
-    {
-        os.writeKeyword("rhoName")
-            << rhoName_ << token::END_STATEMENT << nl;
-    }
+    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
     p_.writeEntry("p", os);
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H
index bad53659f0059939a2515f2de75c86b988a77553..06cbd5dcf2b983cdb097d9bdd1829070f58e3c2f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H
@@ -49,7 +49,7 @@ Description
 
     \table
         Property     | Description             | Required    | Default value
-        rhoName      | rho field name          | no          | rho
+        rho          | rho field name          | no          | rho
         p            | static pressure         | yes         |
     \endtable
 
@@ -58,7 +58,7 @@ Description
     myPatch
     {
         type            prghPressure;
-        rhoName         rho;
+        rho             rho;
         p               uniform 0;
         value           uniform 0; // optional initial value
     }
@@ -174,18 +174,6 @@ public:
 
         // Access
 
-            //- Return the rhoName
-            const word& rhoName() const
-            {
-                return rhoName_;
-            }
-
-            //- Return reference to the rhoName to allow adjustment
-            word& rhoName()
-            {
-                return rhoName_;
-            }
-
             //- Return the static pressure
             const scalarField& p() const
             {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C
index 7b8789df44832621abc39b1cf6bc583a55117b79..21229f7d82f8bdc25dc6fe4b0f13493754c128e5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C
@@ -58,7 +58,7 @@ prghTotalPressureFvPatchScalarField
     fixedValueFvPatchScalarField(p, iF),
     UName_(dict.lookupOrDefault<word>("U", "U")),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
-    rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
+    rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
     p0_("p0", dict, p.size())
 {
     if (dict.found("value"))
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H
index f809029261bebe7383be54b74fd5f804a1455d55..1723e20919a681589bb50dfa314b6ed4e9aad978 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H
@@ -33,12 +33,14 @@ Description
 
         \f[
             p_rgh = p - \rho g (h - hRef)
+            p = p0 - 0.5 \rho |U|^2
         \f]
 
     where
     \vartable
         p_rgh   | Pseudo hydrostatic pressure [Pa]
         p       | Static pressure [Pa]
+        p0      | Total pressure [Pa]
         h       | Height in the opposite direction to gravity
         hRef    | Reference height in the opposite direction to gravity
         \rho    | density
@@ -49,8 +51,10 @@ Description
 
     \table
         Property     | Description             | Required    | Default value
-        rhoName      | rho field name          | no          | rho
-        p            | static pressure         | yes         |
+        U            | velocity field name     | no          | U
+        phi          | flux field name         | no          | phi
+        rho          | density field name      | no          | rho
+        p0           | total pressure          | yes         |
     \endtable
 
     Example of the boundary condition specification:
@@ -58,8 +62,10 @@ Description
     myPatch
     {
         type            prghTotalPressure;
-        rhoName         rho;
-        p               uniform 0;
+        U               U;
+        phi             phi;
+        rho             rho;
+        p0              uniform 0;
         value           uniform 0; // optional initial value
     }
     \endverbatim
@@ -180,18 +186,6 @@ public:
 
         // Access
 
-            //- Return the rhoName
-            const word& rhoName() const
-            {
-                return rhoName_;
-            }
-
-            //- Return reference to the rhoName to allow adjustment
-            word& rhoName()
-            {
-                return rhoName_;
-            }
-
             //- Return the total pressure
             const scalarField& p0() const
             {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C
index 3a49f4a6800fdf50716e4269ad27a132c64caf22..5a60acfab9315d082bbad319a687d646ad5f267b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ rotatingPressureInletOutletVelocityFvPatchVectorField
 )
 :
     pressureInletOutletVelocityFvPatchVectorField(p, iF, dict),
-    omega_(DataEntry<vector>::New("omega", dict))
+    omega_(Function1<vector>::New("omega", dict))
 {
     calcTangentialVelocity();
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H
index 2335f457393205bedcf4d7f95c5bbea9afa2e350..94ee5b8c3fe90889b06ff1988c759fbcc3051387 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ Description
     }
     \endverbatim
 
-    The \c omega entry is a DataEntry type, able to describe time varying
+    The \c omega entry is a Function1 type, able to describe time varying
     functions.
 
 Note
@@ -64,6 +64,7 @@ Note
 
 SeeAlso
     Foam::pressureInletOutletVelocityFvPatchVectorField
+    Foam::Function1Types
 
 SourceFiles
     rotatingPressureInletOutletVelocityFvPatchVectorField.C
@@ -75,7 +76,7 @@ SourceFiles
 
 #include "fvPatchFields.H"
 #include "pressureInletOutletVelocityFvPatchVectorField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -93,7 +94,7 @@ class rotatingPressureInletOutletVelocityFvPatchVectorField
     // Private data
 
         //- Angular velocity of the frame
-        autoPtr<DataEntry<vector> > omega_;
+        autoPtr<Function1<vector>> omega_;
 
 
     // Private Member Functions
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.C
index 83647fb78208f4dc312b8b07738e45b54b79ec28..5d1df66c792aa999803d775752b2069a265e756f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,7 +66,7 @@ rotatingTotalPressureFvPatchScalarField
 )
 :
     totalPressureFvPatchScalarField(p, iF, dict),
-    omega_(DataEntry<vector>::New("omega", dict))
+    omega_(Function1<vector>::New("omega", dict))
 {}
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H
index af6f11fef33505778799b71ff100205bed8dcf0c..eeb618ed0faa7de24ccf4fe6f1bb1b62867ce8c2 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingTotalPressure/rotatingTotalPressureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,11 +59,12 @@ Description
     }
     \endverbatim
 
-    The \c omega entry is a DataEntry type, able to describe time varying
+    The \c omega entry is a Function1 type, able to describe time varying
     functions.
 
 SeeAlso
     Foam::totalPressureFvPatchScalarField
+    Foam::Function1Types
 
 SourceFiles
     rotatingTotalPressureFvPatchScalarField.C
@@ -74,7 +75,7 @@ SourceFiles
 #define rotatingTotalPressureFvPatchScalarField_H
 
 #include "totalPressureFvPatchScalarField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -92,7 +93,7 @@ class rotatingTotalPressureFvPatchScalarField
     // Private data
 
         //- Angular velocity of the frame
-        autoPtr<DataEntry<vector> > omega_;
+        autoPtr<Function1<vector>> omega_;
 
 
 public:
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C
index 82f5d2e28bb7ec389c5e3695f3ae53590fce1d20..461481f5fb7bcdeb68aea7f7247303e640abc8ba 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,27 +39,11 @@ rotatingWallVelocityFvPatchVectorField
 :
     fixedValueFvPatchField<vector>(p, iF),
     origin_(),
-    axis_(vector::zero),
+    axis_(Zero),
     omega_(0)
 {}
 
 
-Foam::rotatingWallVelocityFvPatchVectorField::
-rotatingWallVelocityFvPatchVectorField
-(
-    const rotatingWallVelocityFvPatchVectorField& ptf,
-    const fvPatch& p,
-    const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
-    origin_(ptf.origin_),
-    axis_(ptf.axis_),
-    omega_(ptf.omega_, false)
-{}
-
-
 Foam::rotatingWallVelocityFvPatchVectorField::
 rotatingWallVelocityFvPatchVectorField
 (
@@ -71,7 +55,7 @@ rotatingWallVelocityFvPatchVectorField
     fixedValueFvPatchField<vector>(p, iF),
     origin_(dict.lookup("origin")),
     axis_(dict.lookup("axis")),
-    omega_(DataEntry<scalar>::New("omega", dict))
+    omega_(Function1<scalar>::New("omega", dict))
 {
     if (dict.found("value"))
     {
@@ -88,6 +72,22 @@ rotatingWallVelocityFvPatchVectorField
 }
 
 
+Foam::rotatingWallVelocityFvPatchVectorField::
+rotatingWallVelocityFvPatchVectorField
+(
+    const rotatingWallVelocityFvPatchVectorField& ptf,
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
+    origin_(ptf.origin_),
+    axis_(ptf.axis_),
+    omega_(ptf.omega_, false)
+{}
+
+
 Foam::rotatingWallVelocityFvPatchVectorField::
 rotatingWallVelocityFvPatchVectorField
 (
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H
index c94e2985a98bf407a1f2197a88491fa404837974..3d08d32b8958d3472a6707554accd55310b65d6b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingWallVelocity/rotatingWallVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,12 +50,11 @@ Description
     }
     \endverbatim
 
-    The \c omega entry is a DataEntry type, able to describe time varying
-    functions.
+    The \c omega entry is a Function1 of time, see Foam::Function1Types.
 
 SeeAlso
-    Foam::DataEntry
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     rotatingWallVelocityFvPatchVectorField.C
@@ -66,7 +65,7 @@ SourceFiles
 #define rotatingWallVelocityFvPatchVectorField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -90,7 +89,7 @@ class rotatingWallVelocityFvPatchVectorField
         vector axis_;
 
         //- Rotational speed
-        autoPtr<DataEntry<scalar> > omega_;
+        autoPtr<Function1<scalar>> omega_;
 
 
 public:
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.C
index c7f30b6e102b3fcae0496e0034d5b64946066bf3..83340f3fe56ad4adccd4c5f50b8c5f9de6820354 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "slipFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-slipFvPatchField<Type>::slipFvPatchField
+Foam::slipFvPatchField<Type>::slipFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -44,32 +39,32 @@ slipFvPatchField<Type>::slipFvPatchField
 
 
 template<class Type>
-slipFvPatchField<Type>::slipFvPatchField
+Foam::slipFvPatchField<Type>::slipFvPatchField
 (
-    const slipFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    basicSymmetryFvPatchField<Type>(ptf, p, iF, mapper)
+    basicSymmetryFvPatchField<Type>(p, iF, dict)
 {}
 
 
 template<class Type>
-slipFvPatchField<Type>::slipFvPatchField
+Foam::slipFvPatchField<Type>::slipFvPatchField
 (
+    const slipFvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    basicSymmetryFvPatchField<Type>(p, iF, dict)
+    basicSymmetryFvPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-slipFvPatchField<Type>::slipFvPatchField
+Foam::slipFvPatchField<Type>::slipFvPatchField
 (
     const slipFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -80,7 +75,7 @@ slipFvPatchField<Type>::slipFvPatchField
 
 
 template<class Type>
-slipFvPatchField<Type>::slipFvPatchField
+Foam::slipFvPatchField<Type>::slipFvPatchField
 (
     const slipFvPatchField<Type>& ptf
 )
@@ -89,8 +84,4 @@ slipFvPatchField<Type>::slipFvPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H
index ee50d198818461f4b774a8d3b53ab5d3003d4b12..c22f79a096abeb158f2679cce37829f4765b4847 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/slip/slipFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,9 +104,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new slipFvPatchField<Type>(*this)
             );
@@ -120,16 +120,50 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new slipFvPatchField<Type>(*this, iF)
             );
         }
+
+
+    // Member functions
+
+        // Attributes
+
+            //- Return false: this patch field is not altered by assignment
+            virtual bool assignable() const
+            {
+                return false;
+            }
+
+
+    // Member operators
+
+        // virtual void operator=(const UList<Type>&) {}
+
+        // virtual void operator=(const fvPatchField<Type>&) {}
+        // virtual void operator+=(const fvPatchField<Type>&) {}
+        // virtual void operator-=(const fvPatchField<Type>&) {}
+        // virtual void operator*=(const fvPatchField<scalar>&) {}
+        // virtual void operator/=(const fvPatchField<scalar>&) {}
+
+        // virtual void operator+=(const Field<Type>&) {}
+        // virtual void operator-=(const Field<Type>&) {}
+
+        // virtual void operator*=(const Field<scalar>&) {}
+        // virtual void operator/=(const Field<scalar>&) {}
+
+        // virtual void operator=(const Type&) {}
+        // virtual void operator+=(const Type&) {}
+        // virtual void operator-=(const Type&) {}
+        // virtual void operator*=(const scalar) {}
+        // virtual void operator/=(const scalar) {}
 };
 
 
@@ -140,7 +174,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "slipFvPatchField.C"
+    #include "slipFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C
index 2d4b1691ceb728756dc21a45dc5768130ab5beee..d2cf3bff2b341ef027d851a630fe5c1f1b9ef21f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,37 +41,17 @@ supersonicFreestreamFvPatchVectorField
     TName_("T"),
     pName_("p"),
     psiName_("thermo:psi"),
-    UInf_(vector::zero),
+    UInf_(Zero),
     pInf_(0),
     TInf_(0),
     gamma_(0)
 {
     refValue() = patchInternalField();
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 1;
 }
 
 
-Foam::supersonicFreestreamFvPatchVectorField::
-supersonicFreestreamFvPatchVectorField
-(
-    const supersonicFreestreamFvPatchVectorField& ptf,
-    const fvPatch& p,
-    const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    mixedFvPatchVectorField(ptf, p, iF, mapper),
-    TName_(ptf.TName_),
-    pName_(ptf.pName_),
-    psiName_(ptf.psiName_),
-    UInf_(ptf.UInf_),
-    pInf_(ptf.pInf_),
-    TInf_(ptf.TInf_),
-    gamma_(ptf.gamma_)
-{}
-
-
 Foam::supersonicFreestreamFvPatchVectorField::
 supersonicFreestreamFvPatchVectorField
 (
@@ -102,7 +82,7 @@ supersonicFreestreamFvPatchVectorField
     }
 
     refValue() = *this;
-    refGrad() = vector::zero;
+    refGrad() = Zero;
     valueFraction() = 1;
 
     if (pInf_ < SMALL)
@@ -119,6 +99,26 @@ supersonicFreestreamFvPatchVectorField
 }
 
 
+Foam::supersonicFreestreamFvPatchVectorField::
+supersonicFreestreamFvPatchVectorField
+(
+    const supersonicFreestreamFvPatchVectorField& ptf,
+    const fvPatch& p,
+    const DimensionedField<vector, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    mixedFvPatchVectorField(ptf, p, iF, mapper),
+    TName_(ptf.TName_),
+    pName_(ptf.pName_),
+    psiName_(ptf.psiName_),
+    UInf_(ptf.UInf_),
+    pInf_(ptf.pInf_),
+    TInf_(ptf.TInf_),
+    gamma_(ptf.gamma_)
+{}
+
+
 Foam::supersonicFreestreamFvPatchVectorField::
 supersonicFreestreamFvPatchVectorField
 (
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H
index 7b3b92044f72cffd29df153635da1b570e2ede61..238eef2034125d3613eb5e351eb778d0f910ad25 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.H
@@ -40,9 +40,9 @@ Description
 
     \table
         Property     | Description             | Required    | Default value
-        TName        | Temperature field name  | no          | T
-        pName        | Pressure field name     | no          | p
-        psiName      | Compressibility field name | no       | thermo:psi
+        T            | Temperature field name  | no          | T
+        p            | Pressure field name     | no          | p
+        psi          | Compressibility field name | no       | thermo:psi
         UInf         | free-stream velocity    | yes         |
         pInf         | free-stream pressure    | yes         |
         TInf         | free-stream temperature | yes         |
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C
index bc6cc097d936fc0b62513c9aae2e00fbdce7333d..478600608b1ceff37d07d3010f0a95902f33310a 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,40 +45,40 @@ surfaceNormalFixedValueFvPatchVectorField
 Foam::surfaceNormalFixedValueFvPatchVectorField::
 surfaceNormalFixedValueFvPatchVectorField
 (
-    const surfaceNormalFixedValueFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
     fixedValueFvPatchVectorField(p, iF),
-    refValue_(ptf.refValue_, mapper)
+    refValue_("refValue", dict, p.size())
 {
-    // Note: calculate product only on ptf to avoid multiplication on
-    // unset values in reconstructPar.
-    fixedValueFvPatchVectorField::operator=
-    (
-        vectorField
-        (
-            ptf.refValue_*ptf.patch().nf(),
-            mapper
-        )
-    );
+    fvPatchVectorField::operator=(refValue_*patch().nf());
 }
 
 
 Foam::surfaceNormalFixedValueFvPatchVectorField::
 surfaceNormalFixedValueFvPatchVectorField
 (
+    const surfaceNormalFixedValueFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
     fixedValueFvPatchVectorField(p, iF),
-    refValue_("refValue", dict, p.size())
+    refValue_(ptf.refValue_, mapper)
 {
-    fvPatchVectorField::operator=(refValue_*patch().nf());
+    // Note: calculate product only on ptf to avoid multiplication on
+    // unset values in reconstructPar.
+    fvPatchVectorField::operator=
+    (
+        vectorField
+        (
+            ptf.refValue_*ptf.patch().nf(),
+            mapper
+        )
+    );
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H
index d57dbee5b5a10f6b9f0644f61530ce90af99b03a..30a7464e2c0e02194b896b24cf6d3454ba1d0533 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/surfaceNormalFixedValue/surfaceNormalFixedValueFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,7 +156,6 @@ public:
         }
 
 
-
     // Member functions
 
         // Mapping functions
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C
index a871e91de077886a7462c28f907adeeda3d269d4..7acfaf45ec0cffacdcd901a5715d825bd9126fe1 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,8 +75,8 @@ swirlFlowRateInletVelocityFvPatchVectorField
     fixedValueFvPatchField<vector>(p, iF, dict),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
     rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
-    flowRate_(DataEntry<scalar>::New("flowRate", dict)),
-    rpm_(DataEntry<scalar>::New("rpm", dict))
+    flowRate_(Function1<scalar>::New("flowRate", dict)),
+    rpm_(Function1<scalar>::New("rpm", dict))
 {}
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H
index a53dd0ca12b4213ef72f37f7798e9766279b7b44..6579b7a86bdb2e00b491c23bf45cb2f7d55272b9 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,13 +58,14 @@ Description
     \endverbatim
 
 Note
-    - the \c flowRate and \c rpm entries are DataEntry types, able to describe
+    - the \c flowRate and \c rpm entries are Function1 types, able to describe
       time varying functions.  The example above gives the usage for supplying
       constant values.
     - the value is positive into the domain
 
 SeeAlso
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     swirlFlowRateInletVelocityFvPatchVectorField.C
@@ -75,7 +76,7 @@ SourceFiles
 #define swirlFlowRateInletVelocityFvPatchVectorField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -98,10 +99,10 @@ class swirlFlowRateInletVelocityFvPatchVectorField
         const word rhoName_;
 
         //- Inlet integral flow rate
-        autoPtr<DataEntry<scalar> > flowRate_;
+        autoPtr<Function1<scalar>> flowRate_;
 
         //- Angular speed in revolutions per minute (RPM)
-        autoPtr<DataEntry<scalar> > rpm_;
+        autoPtr<Function1<scalar>> rpm_;
 
 
 public:
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C
index 20690258a3dc82ade9746f9cf537bbe2e4d695dc..3407e259aba1c84bfee3ffe34d0372c14f2c466c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/syringePressure/syringePressureFvPatchScalarField.C
@@ -243,6 +243,7 @@ void Foam::syringePressureFvPatchScalarField::write(Ostream& os) const
     os.writeKeyword("psI") << psI_ << token::END_STATEMENT << nl;
     os.writeKeyword("psi") << psi_ << token::END_STATEMENT << nl;
     os.writeKeyword("ams") << ams_ << token::END_STATEMENT << nl;
+    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
 
     writeEntry("value", os);
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.C
index 68caf7d14c41f825e599bd868770d91c6837333d..c8099fe94bba6ebd4cebb2fb1661bd40ba8c7e9e 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ Foam::AverageIOField<Type>::AverageIOField
 :
     regIOobject(io),
     Field<Type>(size),
-    average_(pTraits<Type>::zero)
+    average_(Zero)
 {}
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.H
index 3f4445f17f9052991c46a0f8e990477bb0a48228..bfac39700068a49cae5f973d38df8ece24acf4a4 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/AverageIOField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AverageIOField.C"
+    #include "AverageIOField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
index 9187241217d984accd536bbe3f9cd2fa1ec4a5a7..92e9fbfa6a4f0c706212d43aea51e1acc7352608 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -27,15 +27,10 @@ License
 #include "Time.H"
 #include "AverageIOField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-timeVaryingMappedFixedValueFvPatchField<Type>::
+Foam::timeVaryingMappedFixedValueFvPatchField<Type>::
 timeVaryingMappedFixedValueFvPatchField
 (
     const fvPatch& p,
@@ -50,16 +45,16 @@ timeVaryingMappedFixedValueFvPatchField
     sampleTimes_(0),
     startSampleTime_(-1),
     startSampledValues_(0),
-    startAverage_(pTraits<Type>::zero),
+    startAverage_(Zero),
     endSampleTime_(-1),
     endSampledValues_(0),
-    endAverage_(pTraits<Type>::zero),
+    endAverage_(Zero),
     offset_()
 {}
 
 
 template<class Type>
-timeVaryingMappedFixedValueFvPatchField<Type>::
+Foam::timeVaryingMappedFixedValueFvPatchField<Type>::
 timeVaryingMappedFixedValueFvPatchField
 (
     const fvPatch& p,
@@ -83,11 +78,11 @@ timeVaryingMappedFixedValueFvPatchField
     sampleTimes_(0),
     startSampleTime_(-1),
     startSampledValues_(0),
-    startAverage_(pTraits<Type>::zero),
+    startAverage_(Zero),
     endSampleTime_(-1),
     endSampledValues_(0),
-    endAverage_(pTraits<Type>::zero),
-    offset_(DataEntry<Type>::New("offset", dict))
+    endAverage_(Zero),
+    offset_(Function1<Type>::New("offset", dict))
 {
     if
     (
@@ -121,7 +116,7 @@ timeVaryingMappedFixedValueFvPatchField
 
 
 template<class Type>
-timeVaryingMappedFixedValueFvPatchField<Type>::
+Foam::timeVaryingMappedFixedValueFvPatchField<Type>::
 timeVaryingMappedFixedValueFvPatchField
 (
     const timeVaryingMappedFixedValueFvPatchField<Type>& ptf,
@@ -139,16 +134,16 @@ timeVaryingMappedFixedValueFvPatchField
     sampleTimes_(0),
     startSampleTime_(-1),
     startSampledValues_(0),
-    startAverage_(pTraits<Type>::zero),
+    startAverage_(Zero),
     endSampleTime_(-1),
     endSampledValues_(0),
-    endAverage_(pTraits<Type>::zero),
+    endAverage_(Zero),
     offset_(ptf.offset_, false)
 {}
 
 
 template<class Type>
-timeVaryingMappedFixedValueFvPatchField<Type>::
+Foam::timeVaryingMappedFixedValueFvPatchField<Type>::
 timeVaryingMappedFixedValueFvPatchField
 (
     const timeVaryingMappedFixedValueFvPatchField<Type>& ptf
@@ -172,7 +167,7 @@ timeVaryingMappedFixedValueFvPatchField
 
 
 template<class Type>
-timeVaryingMappedFixedValueFvPatchField<Type>::
+Foam::timeVaryingMappedFixedValueFvPatchField<Type>::
 timeVaryingMappedFixedValueFvPatchField
 (
     const timeVaryingMappedFixedValueFvPatchField<Type>& ptf,
@@ -199,7 +194,7 @@ timeVaryingMappedFixedValueFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void timeVaryingMappedFixedValueFvPatchField<Type>::autoMap
+void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::autoMap
 (
     const fvPatchFieldMapper& m
 )
@@ -218,7 +213,7 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::autoMap
 
 
 template<class Type>
-void timeVaryingMappedFixedValueFvPatchField<Type>::rmap
+void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::rmap
 (
     const fvPatchField<Type>& ptf,
     const labelList& addr
@@ -227,7 +222,7 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::rmap
     fixedValueFvPatchField<Type>::rmap(ptf, addr);
 
     const timeVaryingMappedFixedValueFvPatchField<Type>& tiptf =
-        refCast<const timeVaryingMappedFixedValueFvPatchField<Type> >(ptf);
+        refCast<const timeVaryingMappedFixedValueFvPatchField<Type>>(ptf);
 
     startSampledValues_.rmap(tiptf.startSampledValues_, addr);
     endSampledValues_.rmap(tiptf.endSampledValues_, addr);
@@ -240,7 +235,7 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::rmap
 
 
 template<class Type>
-void timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
+void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
 {
     // Initialise
     if (mapperPtr_.empty())
@@ -451,7 +446,7 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
 
 
 template<class Type>
-void timeVaryingMappedFixedValueFvPatchField<Type>::updateCoeffs()
+void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::updateCoeffs()
 {
     if (this->updated())
     {
@@ -556,7 +551,10 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::updateCoeffs()
 
 
 template<class Type>
-void timeVaryingMappedFixedValueFvPatchField<Type>::write(Ostream& os) const
+void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::write
+(
+    Ostream& os
+) const
 {
     fvPatchField<Type>::write(os);
     os.writeKeyword("setAverage") << setAverage_ << token::END_STATEMENT << nl;
@@ -589,8 +587,4 @@ void timeVaryingMappedFixedValueFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H
index 389b965b99ba402a267e35fc9482a4f5f6070950..20783c7f76afc01d7e0ca3b362b7d2879bb193ad 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,6 +67,7 @@ Description
 
 SeeAlso
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     timeVaryingMappedFixedValueFvPatchField.C
@@ -80,7 +81,7 @@ SourceFiles
 #include "FixedList.H"
 #include "instantList.H"
 #include "pointToPointPlanarInterpolation.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -135,7 +136,7 @@ class timeVaryingMappedFixedValueFvPatchField
         Type endAverage_;
 
         //- Time varying offset values to interpolated data
-        autoPtr<DataEntry<Type> > offset_;
+        autoPtr<Function1<Type>> offset_;
 
 
 public:
@@ -178,9 +179,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new timeVaryingMappedFixedValueFvPatchField<Type>(*this)
             );
@@ -194,12 +195,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new timeVaryingMappedFixedValueFvPatchField<Type>(*this, iF)
             );
@@ -257,7 +258,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "timeVaryingMappedFixedValueFvPatchField.C"
+    #include "timeVaryingMappedFixedValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H
index edf53bcede1c0a885b4d705d0642f77f0e29f9e4..3688572a86cca1a409d93f0ebde0cdb177e2c129 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ Description
             U       | velocity
         \endvartable
 
-    3. compressible transonic (\gamma <= 1):
+    3. compressible transonic (\f$\gamma <= 1\f$):
         \f[
             p_p = \frac{p_0}{1 + 0.5 \psi |U|^2}
         \f]
@@ -65,7 +65,7 @@ Description
             G       | coefficient given by \f$\frac{\gamma}{1-\gamma}\f$
         \endvartable
 
-    4. compressible supersonic (\gamma > 1):
+    4. compressible supersonic (\f$\gamma > 1\f$):
         \f[
             p_p = \frac{p_0}{(1 + 0.5 \psi G |U|^2)^{\frac{1}{G}}}
         \f]
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.C
index c60d0cc3fe05ef3ba6a06b3daedbcebf58d72158..37b7ada77298cb958604c498dc043f1fe0fa86aa 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,6 @@ License
 #include "translatingWallVelocityFvPatchVectorField.H"
 #include "addToRunTimeSelectionTable.H"
 #include "volFields.H"
-#include "surfaceFields.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -38,38 +37,38 @@ translatingWallVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(p, iF),
-    U_(vector::zero)
+    U_(0)
 {}
 
 
 Foam::translatingWallVelocityFvPatchVectorField::
 translatingWallVelocityFvPatchVectorField
 (
-    const translatingWallVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
-    U_(ptf.U_)
-{}
+    fixedValueFvPatchField<vector>(p, iF),
+    U_(Function1<vector>::New("U", dict))
+{
+    // Evaluate the wall velocity
+    updateCoeffs();
+}
 
 
 Foam::translatingWallVelocityFvPatchVectorField::
 translatingWallVelocityFvPatchVectorField
 (
+    const translatingWallVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fixedValueFvPatchField<vector>(p, iF),
-    U_(dict.lookup("U"))
-{
-    // Evaluate the wall velocity
-    updateCoeffs();
-}
+    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
+    U_(ptf.U_, false)
+{}
 
 
 Foam::translatingWallVelocityFvPatchVectorField::
@@ -79,7 +78,7 @@ translatingWallVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(twvpvf),
-    U_(twvpvf.U_)
+    U_(twvpvf.U_, false)
 {}
 
 
@@ -91,7 +90,7 @@ translatingWallVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(twvpvf, iF),
-    U_(twvpvf.U_)
+    U_(twvpvf.U_, false)
 {}
 
 
@@ -104,9 +103,12 @@ void Foam::translatingWallVelocityFvPatchVectorField::updateCoeffs()
         return;
     }
 
+    const scalar t = this->db().time().timeOutputValue();
+    const vector U = U_->value(t);
+
     // Remove the component of U normal to the wall in case the wall is not flat
     const vectorField n(patch().nf());
-    vectorField::operator=(U_ - n*(n & U_));
+    vectorField::operator=(U - n*(n & U));
 
     fixedValueFvPatchVectorField::updateCoeffs();
 }
@@ -115,7 +117,7 @@ void Foam::translatingWallVelocityFvPatchVectorField::updateCoeffs()
 void Foam::translatingWallVelocityFvPatchVectorField::write(Ostream& os) const
 {
     fvPatchVectorField::write(os);
-    os.writeKeyword("U") << U_ << token::END_STATEMENT << nl;
+    U_->writeData(os);
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H
index c6e9c70b88b0bd2a79706387096264e55b8d1fd5..5bc1d5e057ba08eddb6807e348a1848954db7bc8 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/translatingWallVelocity/translatingWallVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Description
 
     \table
         Property     | Description             | Required    | Default value
-        U            | translational velocity  | yes|
+        U            | translational velocity  | yes         |
     \endtable
 
     Example of the boundary condition specification:
@@ -47,9 +47,12 @@ Description
     }
     \endverbatim
 
+    The \c U entry is a Function1 of time, see Foam::Function1Types.
+
 
 SeeAlso
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     translatingWallVelocityFvPatchVectorField.C
@@ -60,6 +63,7 @@ SourceFiles
 #define translatingWallVelocityFvPatchVectorField_H
 
 #include "fixedValueFvPatchFields.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -77,7 +81,7 @@ class translatingWallVelocityFvPatchVectorField
     // Private data
 
         //- Translational velocity
-        vector U_;
+        autoPtr<Function1<vector>> U_;
 
 
 public:
@@ -150,19 +154,11 @@ public:
 
     // Member functions
 
-        // Access functions
-
-            //- Return the velocity
-            const vector& U() const
-            {
-                return U_;
-            }
-
-            //- Update the coefficients associated with the patch field
-            virtual void updateCoeffs();
+        //- Update the coefficients associated with the patch field
+        virtual void updateCoeffs();
 
-            //- Write
-            virtual void write(Ostream&) const;
+        //- Write
+        virtual void write(Ostream&) const;
 };
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
index 4ad86d3c3fb7d37ed1f1856c0f05fa5e6a7b0e7d..4527eca00981499c7a8b9f91b62178afa2d82318 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "turbulentInletFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
+Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF
@@ -41,7 +36,7 @@ turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 :
     fixedValueFvPatchField<Type>(p, iF),
     ranGen_(label(0)),
-    fluctuationScale_(pTraits<Type>::zero),
+    fluctuationScale_(Zero),
     referenceField_(p.size()),
     alpha_(0.1),
     curTimeIndex_(-1)
@@ -49,25 +44,7 @@ turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 
 
 template<class Type>
-turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
-(
-    const turbulentInletFvPatchField<Type>& ptf,
-    const fvPatch& p,
-    const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
-    ranGen_(label(0)),
-    fluctuationScale_(ptf.fluctuationScale_),
-    referenceField_(ptf.referenceField_, mapper),
-    alpha_(ptf.alpha_),
-    curTimeIndex_(-1)
-{}
-
-
-template<class Type>
-turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
+Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
@@ -96,7 +73,25 @@ turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 
 
 template<class Type>
-turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
+Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
+(
+    const turbulentInletFvPatchField<Type>& ptf,
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
+    ranGen_(label(0)),
+    fluctuationScale_(ptf.fluctuationScale_),
+    referenceField_(ptf.referenceField_, mapper),
+    alpha_(ptf.alpha_),
+    curTimeIndex_(-1)
+{}
+
+
+template<class Type>
+Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 (
     const turbulentInletFvPatchField<Type>& ptf
 )
@@ -111,7 +106,7 @@ turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 
 
 template<class Type>
-turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
+Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 (
     const turbulentInletFvPatchField<Type>& ptf,
     const DimensionedField<Type, volMesh>& iF
@@ -129,7 +124,7 @@ turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void turbulentInletFvPatchField<Type>::autoMap
+void Foam::turbulentInletFvPatchField<Type>::autoMap
 (
     const fvPatchFieldMapper& m
 )
@@ -140,7 +135,7 @@ void turbulentInletFvPatchField<Type>::autoMap
 
 
 template<class Type>
-void turbulentInletFvPatchField<Type>::rmap
+void Foam::turbulentInletFvPatchField<Type>::rmap
 (
     const fvPatchField<Type>& ptf,
     const labelList& addr
@@ -149,14 +144,14 @@ void turbulentInletFvPatchField<Type>::rmap
     fixedValueFvPatchField<Type>::rmap(ptf, addr);
 
     const turbulentInletFvPatchField<Type>& tiptf =
-        refCast<const turbulentInletFvPatchField<Type> >(ptf);
+        refCast<const turbulentInletFvPatchField<Type>>(ptf);
 
     referenceField_.rmap(tiptf.referenceField_, addr);
 }
 
 
 template<class Type>
-void turbulentInletFvPatchField<Type>::updateCoeffs()
+void Foam::turbulentInletFvPatchField<Type>::updateCoeffs()
 {
     if (this->updated())
     {
@@ -198,7 +193,7 @@ void turbulentInletFvPatchField<Type>::updateCoeffs()
 
 
 template<class Type>
-void turbulentInletFvPatchField<Type>::write(Ostream& os) const
+void Foam::turbulentInletFvPatchField<Type>::write(Ostream& os) const
 {
     fvPatchField<Type>::write(os);
     os.writeKeyword("fluctuationScale")
@@ -209,8 +204,4 @@ void turbulentInletFvPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
index f99a71cc354f2bbfe960aba728f00c71f13e4454..a38d1dfec5a15aae164f2e2408f4ce5562909487 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ class turbulentInletFvPatchField
         //- Random number generator
         Random ranGen_;
 
-        //- Fluctuation scake
+        //- Fluctuation scale
         Type fluctuationScale_;
 
         //- Reference field
@@ -152,9 +152,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new turbulentInletFvPatchField<Type>(*this)
             );
@@ -168,12 +168,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new turbulentInletFvPatchField<Type>(*this, iF)
             );
@@ -243,7 +243,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "turbulentInletFvPatchField.C"
+    #include "turbulentInletFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C
index e43b61dede32c23ee37a592e92551053ef556549..6eea5de3bc2723b1da79c6e2fecd464582ef4406 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ uniformDensityHydrostaticPressureFvPatchScalarField
     fixedValueFvPatchScalarField(p, iF),
     rho_(0.0),
     pRefValue_(0.0),
-    pRefPoint_(vector::zero)
+    pRefPoint_(Zero)
 {}
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C
index aa7c057a7a08fc27e9bcad818d17054d3a0388f0..298d5efc0762dc2b7a0d577e6dce519c0d00047b 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ Foam::uniformFixedGradientFvPatchField<Type>::uniformFixedGradientFvPatchField
 )
 :
     fixedGradientFvPatchField<Type>(p, iF),
-    uniformGradient_(DataEntry<Type>::New("uniformGradient", dict))
+    uniformGradient_(Function1<Type>::New("uniformGradient", dict))
 {
     this->evaluate();
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H
index 2ad895b362c2bece1a0b65ef0113b8bc0ac48ca2..8dfd45e86bbb3ccd0a753d9d45340b5d0302a116 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,12 +47,12 @@ Description
     \endverbatim
 
 Note
-    The uniformGradient entry is a DataEntry type, able to describe time
+    The uniformGradient entry is a Function1 type, able to describe time
     varying functions.  The example above gives the usage for supplying a
     constant value.
 
 SeeAlso
-    Foam::DataEntry
+    Foam::Function1Types
     Foam::fixedGradientFvPatchField
 
 SourceFiles
@@ -64,7 +64,7 @@ SourceFiles
 #define uniformFixedGradientFvPatchField_H
 
 #include "fixedGradientFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -83,7 +83,7 @@ class uniformFixedGradientFvPatchField
     // Private data
 
         //- Gradient
-        autoPtr<DataEntry<Type> > uniformGradient_;
+        autoPtr<Function1<Type>> uniformGradient_;
 
 
 public:
@@ -134,9 +134,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformFixedGradientFvPatchField<Type>(*this)
             );
@@ -150,12 +150,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformFixedGradientFvPatchField<Type>(*this, iF)
             );
@@ -179,7 +179,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uniformFixedGradientFvPatchField.C"
+    #include "uniformFixedGradientFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C
index 8d52b8700d73d6a08a74c0278aeb18501b403773..ab03ec6b0e1e7093face4fb7f2f0b0a50cba85a2 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
 )
 :
     fixedValueFvPatchField<Type>(p, iF),
-    uniformValue_(DataEntry<Type>::New("uniformValue", dict))
+    uniformValue_(Function1<Type>::New("uniformValue", dict))
 {
     this->evaluate();
 }
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H
index 6d77aa885715e611979a934d2fec484ef7c3e757..3b87530609741fe4e3d5eee6a8000bbed223fc3a 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,12 +47,12 @@ Description
     \endverbatim
 
 Note
-    The uniformValue entry is a DataEntry type, able to describe time
+    The uniformValue entry is a Function1 type, able to describe time
     varying functions.  The example above gives the usage for supplying a
     constant value.
 
 SeeAlso
-    Foam::DataEntry
+    Foam::Function1Types
     Foam::fixedValueFvPatchField
 
 SourceFiles
@@ -64,7 +64,7 @@ SourceFiles
 #define uniformFixedValueFvPatchField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -82,7 +82,7 @@ class uniformFixedValueFvPatchField
 {
     // Private data
 
-        autoPtr<DataEntry<Type> > uniformValue_;
+        autoPtr<Function1<Type>> uniformValue_;
 
 
 public:
@@ -133,9 +133,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformFixedValueFvPatchField<Type>(*this)
             );
@@ -149,12 +149,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformFixedValueFvPatchField<Type>(*this, iF)
             );
@@ -178,7 +178,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uniformFixedValueFvPatchField.C"
+    #include "uniformFixedValueFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C
index 8ef6ab0d42eb02bf94de796d7ab95c33db4284bd..577e0b6d598f9f6dfab94da0fc35d1c2aa59c677 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -37,8 +37,8 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
     mixedFvPatchField<Type>(p, iF),
     phiName_("phi")
 {
-    this->refValue() = pTraits<Type>::zero;
-    this->refGrad() = pTraits<Type>::zero;
+    this->refValue() = Zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
@@ -53,10 +53,10 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
 :
     mixedFvPatchField<Type>(p, iF),
     phiName_(dict.lookupOrDefault<word>("phi", "phi")),
-    uniformInletValue_(DataEntry<Type>::New("uniformInletValue", dict))
+    uniformInletValue_(Function1<Type>::New("uniformInletValue", dict))
 {
-    const scalar t = this->db().time().timeOutputValue();
-    this->refValue() = uniformInletValue_->value(t);
+    this->refValue() =
+        uniformInletValue_->value(this->db().time().timeOutputValue());
 
     if (dict.found("value"))
     {
@@ -70,7 +70,7 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
         fvPatchField<Type>::operator=(this->refValue());
     }
 
-    this->refGrad() = pTraits<Type>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 }
 
@@ -91,10 +91,10 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
     this->patchType() = ptf.patchType();
 
     // Evaluate refValue since not mapped
-    const scalar t = this->db().time().timeOutputValue();
-    this->refValue() = uniformInletValue_->value(t);
+    this->refValue() =
+        uniformInletValue_->value(this->db().time().timeOutputValue());
 
-    this->refGrad() = pTraits<Type>::zero;
+    this->refGrad() = Zero;
     this->valueFraction() = 0.0;
 
     // Initialize the patch value to the refValue
@@ -179,8 +179,8 @@ void Foam::uniformInletOutletFvPatchField<Type>::autoMap
     mixedFvPatchField<Type>::autoMap(m);
 
     // Override
-    const scalar t = this->db().time().timeOutputValue();
-    this->refValue() = uniformInletValue_->value(t);
+    this->refValue() =
+        uniformInletValue_->value(this->db().time().timeOutputValue());
 }
 
 
@@ -194,8 +194,8 @@ void Foam::uniformInletOutletFvPatchField<Type>::rmap
     mixedFvPatchField<Type>::rmap(ptf, addr);
 
     // Override
-    const scalar t = this->db().time().timeOutputValue();
-    this->refValue() = uniformInletValue_->value(t);
+    this->refValue() =
+        uniformInletValue_->value(this->db().time().timeOutputValue());
 }
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H
index 2ab8c72ee861fd2091400abbd85cd3dafb306f38..c0d82ef75ddaae11d341f139674ad93e8f0f0f0c 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,6 +59,7 @@ Note
 
 SeeAlso
     Foam::inletOutletFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     uniformInletOutletFvPatchField.C
@@ -69,7 +70,7 @@ SourceFiles
 #define uniformInletOutletFvPatchField_H
 
 #include "mixedFvPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -94,7 +95,7 @@ protected:
         word phiName_;
 
         //- Value
-        autoPtr<DataEntry<Type> > uniformInletValue_;
+        autoPtr<Function1<Type>> uniformInletValue_;
 
 
 public:
@@ -137,9 +138,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformInletOutletFvPatchField<Type>(*this)
             );
@@ -153,35 +154,44 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformInletOutletFvPatchField<Type>(*this, iF)
             );
         }
 
 
-    // Mapping functions
+    // Member functions
 
-        //- Map (and resize as needed) from self given a mapping object
-        virtual void autoMap
-        (
-            const fvPatchFieldMapper&
-        );
+        // Attributes
 
-        //- Reverse map the given fvPatchField onto this fvPatchField
-        virtual void rmap
-        (
-            const fvPatchField<Type>&,
-            const labelList&
-        );
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
 
 
-    // Member functions
+        // Mapping functions
+
+            //- Map (and resize as needed) from self given a mapping object
+            virtual void autoMap
+            (
+                const fvPatchFieldMapper&
+            );
+
+            //- Reverse map the given fvPatchField onto this fvPatchField
+            virtual void rmap
+            (
+                const fvPatchField<Type>&,
+                const labelList&
+            );
+
 
         //- Update the coefficients associated with the patch field
         virtual void updateCoeffs();
@@ -203,7 +213,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uniformInletOutletFvPatchField.C"
+    #include "uniformInletOutletFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C
index 046d9bbeb831a2c372165e985de005a00506bc8b..00f30731de9e16b09fae527a8c9460f33942b430 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
 )
 :
     fixedJumpFvPatchField<Type>(p, iF),
-    jumpTable_(new DataEntry<Type>("jumpTable"))
+    jumpTable_(new Function1<Type>("jumpTable"))
 {}
 
 
@@ -62,11 +62,11 @@ Foam::uniformJumpFvPatchField<Type>::uniformJumpFvPatchField
 )
 :
     fixedJumpFvPatchField<Type>(p, iF),
-    jumpTable_(new DataEntry<Type>("jumpTable"))
+    jumpTable_(new Function1<Type>("jumpTable"))
 {
     if (this->cyclicPatch().owner())
     {
-        jumpTable_ = DataEntry<Type>::New("jumpTable", dict);
+        jumpTable_ = Function1<Type>::New("jumpTable", dict);
     }
 
     if (dict.found("value"))
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H
index aba63cb9d0eb70f6a70f3fa7edd13b9468b0384f..11f8a2f0b44089960545e9931c3487e8c86d6606 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJump/uniformJumpFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ Description
     The above example shows the use of a fixed jump of '10'.
 
 Note
-    The uniformValue entry is a DataEntry type, able to describe time
+    The uniformValue entry is a Function1 type, able to describe time
     varying functions.  The example above gives the usage for supplying a
     constant value.
 
@@ -61,6 +61,7 @@ Note
 
 SeeAlso
     Foam::fixedJumpFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     uniformJumpFvPatchField.C
@@ -71,7 +72,7 @@ SourceFiles
 #define uniformJumpFvPatchField_H
 
 #include "fixedJumpFvPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -93,7 +94,7 @@ protected:
     // Protected data
 
         //- "jump" table
-        autoPtr<DataEntry<Type> > jumpTable_;
+        autoPtr<Function1<Type>> jumpTable_;
 
 
 public:
@@ -135,9 +136,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformJumpFvPatchField<Type>(*this)
             );
@@ -151,12 +152,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformJumpFvPatchField<Type>(*this, iF)
             );
@@ -180,7 +181,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uniformJumpFvPatchField.C"
+    #include "uniformJumpFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C
index 7b2d55e1eb3e7cb00215bc1f86960941cd43c4af..61339e232ea07d38a9e2f3d7e08521c1f863ace9 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,11 +62,11 @@ Foam::uniformJumpAMIFvPatchField<Type>::uniformJumpAMIFvPatchField
 )
 :
     fixedJumpAMIFvPatchField<Type>(p, iF),
-    jumpTable_(new DataEntry<Type>("jumpTable"))
+    jumpTable_(new Function1<Type>("jumpTable"))
 {
     if (this->cyclicAMIPatch().owner())
     {
-        jumpTable_ = DataEntry<Type>::New("jumpTable", dict);
+        jumpTable_ = Function1<Type>::New("jumpTable", dict);
     }
 
     if (dict.found("value"))
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H
index e00f9f9991dd43b6598a54e008240d031e16930b..645375887b4864edcf06875974d10a22e09d3c03 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ Description
     The above example shows the use of a fixed jump of '10'.
 
 Note
-    The uniformValue entry is a DataEntry type, able to describe time
+    The uniformValue entry is a Function1 type, able to describe time
     varying functions.  The example above gives the usage for supplying a
     constant value.
 
@@ -61,6 +61,7 @@ Note
 
 SeeAlso
     Foam::jumpCyclicAMIFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     uniformJumpAMIFvPatchField.C
@@ -71,7 +72,7 @@ SourceFiles
 #define uniformJumpAMIFvPatchField_H
 
 #include "fixedJumpAMIFvPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -93,7 +94,7 @@ protected:
     // Protected data
 
         //- "jump" table
-        autoPtr<DataEntry<Type> > jumpTable_;
+        autoPtr<Function1<Type>> jumpTable_;
 
 
 public:
@@ -135,9 +136,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformJumpAMIFvPatchField<Type>(*this)
             );
@@ -151,12 +152,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new uniformJumpAMIFvPatchField<Type>(*this, iF)
             );
@@ -180,7 +181,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uniformJumpAMIFvPatchField.C"
+    #include "uniformJumpAMIFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
index 52ecf6fe4f197f22ff7a82cc57f121a4f41f2bfd..29841b6932f801876a339fc7d9385e1df2b06572 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ uniformTotalPressureFvPatchScalarField
     rhoName_(dict.lookupOrDefault<word>("rho", "none")),
     psiName_(dict.lookupOrDefault<word>("psi", "none")),
     gamma_(readScalar(dict.lookup("gamma"))),
-    pressure_(DataEntry<scalar>::New("pressure", dict))
+    pressure_(Function1<scalar>::New("pressure", dict))
 {
     if (dict.found("value"))
     {
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H
index 1e50c82e2992206bb19c08c4ed690136b32965a2..0f766e413d58380ee70ec4790f3d5aecf110d652 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ Description
     }
     \endverbatim
 
-    The \c pressure entry is specified as a DataEntry type, able to describe
+    The \c pressure entry is specified as a Function1 type, able to describe
     time varying functions.
 
 Note
@@ -65,7 +65,7 @@ Note
 
 
 SeeAlso
-    Foam::DataEntry
+    Foam::Function1Types
     Foam::uniformFixedValueFvPatchField
     Foam::totalPressureFvPatchField
 
@@ -78,7 +78,7 @@ SourceFiles
 #define uniformTotalPressureFvPatchScalarField_H
 
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -112,7 +112,7 @@ class uniformTotalPressureFvPatchScalarField
         scalar gamma_;
 
         //- Table of time vs total pressure, including the bounding treatment
-        autoPtr<DataEntry<scalar> > pressure_;
+        autoPtr<Function1<scalar>> pressure_;
 
 
 public:
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H
index 858dd6c1cef46d044bc852d318cc56135f79b72f..f257f66197a32573574b81fbac56c63c73533e1f 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,9 +139,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new variableHeightFlowRateFvPatchScalarField(*this)
             );
@@ -155,12 +155,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new variableHeightFlowRateFvPatchScalarField(*this, iF)
             );
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
index 1fcc5feb7df1b98caa271b0d635e920a86b97f96..f0f3802339ca9f9ac960cf8f5efc2a7fc8349ceb 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,10 +24,8 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "variableHeightFlowRateInletVelocityFvPatchVectorField.H"
-#include "volFields.H"
 #include "addToRunTimeSelectionTable.H"
-#include "fvPatchFieldMapper.H"
-#include "surfaceFields.H"
+#include "volFields.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -39,7 +37,7 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(p, iF),
-    flowRate_(0),
+    flowRate_(),
     alphaName_("none")
 {}
 
@@ -47,29 +45,29 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
 Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
 ::variableHeightFlowRateInletVelocityFvPatchVectorField
 (
-    const variableHeightFlowRateInletVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
-    flowRate_(ptf.flowRate_),
-    alphaName_(ptf.alphaName_)
+    fixedValueFvPatchField<vector>(p, iF, dict),
+    flowRate_(Function1<scalar>::New("flowRate", dict)),
+    alphaName_(dict.lookup("alpha"))
 {}
 
 
 Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
 ::variableHeightFlowRateInletVelocityFvPatchVectorField
 (
+    const variableHeightFlowRateInletVelocityFvPatchVectorField& ptf,
     const fvPatch& p,
     const DimensionedField<vector, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fixedValueFvPatchField<vector>(p, iF, dict),
-    flowRate_(readScalar(dict.lookup("flowRate"))),
-    alphaName_(dict.lookup("alpha"))
+    fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
+    flowRate_(ptf.flowRate_, false),
+    alphaName_(ptf.alphaName_)
 {}
 
 
@@ -80,7 +78,7 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(ptf),
-    flowRate_(ptf.flowRate_),
+    flowRate_(ptf.flowRate_, false),
     alphaName_(ptf.alphaName_)
 {}
 
@@ -93,7 +91,7 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
 )
 :
     fixedValueFvPatchField<vector>(ptf, iF),
-    flowRate_(ptf.flowRate_),
+    flowRate_(ptf.flowRate_, false),
     alphaName_(ptf.alphaName_)
 {}
 
@@ -114,8 +112,11 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
     alphap = max(alphap, scalar(0));
     alphap = min(alphap, scalar(1));
 
+    const scalar t = db().time().timeOutputValue();
+    scalar flowRate = flowRate_->value(t);
+
     // a simpler way of doing this would be nice
-    scalar avgU = -flowRate_/gSum(patch().magSf()*alphap);
+    scalar avgU = -flowRate/gSum(patch().magSf()*alphap);
 
     vectorField n(patch().nf());
 
@@ -131,11 +132,8 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::write
 ) const
 {
     fvPatchField<vector>::write(os);
-
-    os.writeKeyword("flowRate") << flowRate_
-        << token::END_STATEMENT << nl;
-    os.writeKeyword("alpha") << alphaName_
-        << token::END_STATEMENT << nl;
+    flowRate_->writeData(os);
+    os.writeKeyword("alpha") << alphaName_ << token::END_STATEMENT << nl;
     writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H
index 34742c7567bbe4ba0d02a8a9bfa511b02ad396e9..eed99370296c2a4f15ea09a7fd633d1f3d413c47 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,6 +53,8 @@ Description
     }
     \endverbatim
 
+    The \c flowRate entry is a \c Function1 of time, see Foam::Function1Types.
+
 Note
     - the value is positive into the domain
     - may not work correctly for transonic inlets
@@ -61,6 +63,7 @@ Note
 
 SeeAlso
     Foam::fixedValueFvPatchField
+    Foam::Function1Types
 
 SourceFiles
     variableHeightFlowRateInletVelocityFvPatchVectorField.C
@@ -71,6 +74,7 @@ SourceFiles
 #define variableHeightFlowRateInletVelocityFvPatchVectorField_H
 
 #include "fixedValueFvPatchFields.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -87,7 +91,7 @@ class variableHeightFlowRateInletVelocityFvPatchVectorField
     // Private data
 
         //- Inlet integral flow rate
-        scalar flowRate_;
+        autoPtr<Function1<scalar>> flowRate_;
 
         //- Name of the phase-fraction field
         word alphaName_;
@@ -168,21 +172,6 @@ public:
 
     // Member functions
 
-        // Access
-
-            //- Return the flux
-            scalar flowRate() const
-            {
-                return flowRate_;
-            }
-
-            //- Return reference to the flux to allow adjustment
-            scalar& flowRate()
-            {
-                return flowRate_;
-            }
-
-
         //- Update the coefficients associated with the patch field
         virtual void updateCoeffs();
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H
index 9ff79884d6b45ddd4c96323dda3592f617175b3d..b3e5498b758a7bfa742e0f2cad741981564a3b44 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -145,9 +145,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new waveTransmissiveFvPatchField<Type>(*this)
             );
@@ -161,12 +161,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new waveTransmissiveFvPatchField<Type>(*this, iF)
             );
@@ -208,7 +208,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "waveTransmissiveFvPatchField.C"
+    #include "waveTransmissiveFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
index ac50365efde1fbd5b3988c52505a5cf0ec1ac555..917872aaa4363e70d1b5b7b4060696499851aefa 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -52,15 +52,15 @@ Foam::fvPatchField<Type>::fvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const word& patchType
+    const Type& value
 )
 :
-    Field<Type>(p.size()),
+    Field<Type>(p.size(), value),
     patch_(p),
     internalField_(iF),
     updated_(false),
     manipulatedMatrix_(false),
-    patchType_(patchType)
+    patchType_(word::null)
 {}
 
 
@@ -69,41 +69,33 @@ Foam::fvPatchField<Type>::fvPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const Field<Type>& f
+    const word& patchType
 )
 :
-    Field<Type>(f),
+    Field<Type>(p.size()),
     patch_(p),
     internalField_(iF),
     updated_(false),
     manipulatedMatrix_(false),
-    patchType_(word::null)
+    patchType_(patchType)
 {}
 
 
 template<class Type>
 Foam::fvPatchField<Type>::fvPatchField
 (
-    const fvPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const Field<Type>& f
 )
 :
-    Field<Type>(p.size()),
+    Field<Type>(f),
     patch_(p),
     internalField_(iF),
     updated_(false),
     manipulatedMatrix_(false),
-    patchType_(ptf.patchType_)
-{
-    // For unmapped faces set to internal field value (zero-gradient)
-    if (notNull(iF) && mapper.hasUnmapped())
-    {
-        fvPatchField<Type>::operator=(this->patchInternalField());
-    }
-    this->map(ptf, mapper);
-}
+    patchType_(word::null)
+{}
 
 
 template<class Type>
@@ -124,14 +116,14 @@ Foam::fvPatchField<Type>::fvPatchField
 {
     if (dict.found("value"))
     {
-        fvPatchField<Type>::operator=
+        Field<Type>::operator=
         (
             Field<Type>("value", dict, p.size())
         );
     }
     else if (!valueRequired)
     {
-        fvPatchField<Type>::operator=(pTraits<Type>::zero);
+        Field<Type>::operator=(Zero);
     }
     else
     {
@@ -144,6 +136,31 @@ Foam::fvPatchField<Type>::fvPatchField
 }
 
 
+template<class Type>
+Foam::fvPatchField<Type>::fvPatchField
+(
+    const fvPatchField<Type>& ptf,
+    const fvPatch& p,
+    const DimensionedField<Type, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    Field<Type>(p.size()),
+    patch_(p),
+    internalField_(iF),
+    updated_(false),
+    manipulatedMatrix_(false),
+    patchType_(ptf.patchType_)
+{
+    // For unmapped faces set to internal field value (zero-gradient)
+    if (notNull(iF) && iF.size())
+    {
+        fvPatchField<Type>::operator=(this->patchInternalField());
+    }
+    this->map(ptf, mapper);
+}
+
+
 template<class Type>
 Foam::fvPatchField<Type>::fvPatchField
 (
@@ -197,14 +214,14 @@ void Foam::fvPatchField<Type>::check(const fvPatchField<Type>& ptf) const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fvPatchField<Type>::snGrad() const
+Foam::tmp<Foam::Field<Type>> Foam::fvPatchField<Type>::snGrad() const
 {
     return patch_.deltaCoeffs()*(*this - patchInternalField());
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::fvPatchField<Type>::patchInternalField() const
 {
     return patch_.patchInternalField(internalField_);
@@ -543,7 +560,6 @@ void Foam::fvPatchField<Type>::operator/=
 }
 
 
-// Force an assignment, overriding fixedValue status
 template<class Type>
 void Foam::fvPatchField<Type>::operator==
 (
@@ -589,6 +605,6 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvPatchField<Type>& ptf)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "fvPatchFieldNew.C"
+    #include "fvPatchFieldNew.C"
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
index dae962c3031a671fd63237138560a39de5186647..f91107ab1eac7a04d31f8998797999f6a746f1c9 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,6 +65,9 @@ class volMesh;
 template<class Type>
 class fvPatchField;
 
+template<class Type>
+class calculatedFvPatchField;
+
 template<class Type>
 class fvMatrix;
 
@@ -106,6 +109,7 @@ class fvPatchField
 public:
 
     typedef fvPatch Patch;
+    typedef calculatedFvPatchField<Type> Calculated;
 
 
     //- Runtime type information
@@ -166,6 +170,14 @@ public:
             const DimensionedField<Type, volMesh>&
         );
 
+        //- Construct from patch, internal field and value
+        fvPatchField
+        (
+            const fvPatch&,
+            const DimensionedField<Type, volMesh>&,
+            const Type& value
+        );
+
         //- Construct from patch and internal field and patch type
         fvPatchField
         (
@@ -204,9 +216,9 @@ public:
         fvPatchField(const fvPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >(new fvPatchField<Type>(*this));
+            return tmp<fvPatchField<Type>>(new fvPatchField<Type>(*this));
         }
 
         //- Construct as copy setting internal field reference
@@ -217,12 +229,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >(new fvPatchField<Type>(*this, iF));
+            return tmp<fvPatchField<Type>>(new fvPatchField<Type>(*this, iF));
         }
 
 
@@ -231,7 +243,7 @@ public:
         //- Return a pointer to a new patchField created on freestore given
         //  patch and internal field
         //  (does not set the patch field values)
-        static tmp<fvPatchField<Type> > New
+        static tmp<fvPatchField<Type>> New
         (
             const word&,
             const fvPatch&,
@@ -242,7 +254,7 @@ public:
         //  patch and internal field
         //  (does not set the patch field values).
         //  Allows override of constraint type
-        static tmp<fvPatchField<Type> > New
+        static tmp<fvPatchField<Type>> New
         (
             const word&,
             const word& actualPatchType,
@@ -252,7 +264,7 @@ public:
 
         //- Return a pointer to a new patchField created on freestore from
         //  a given fvPatchField mapped onto a new patch
-        static tmp<fvPatchField<Type> > New
+        static tmp<fvPatchField<Type>> New
         (
             const fvPatchField<Type>&,
             const fvPatch&,
@@ -262,7 +274,7 @@ public:
 
         //- Return a pointer to a new patchField created on freestore
         //  from dictionary
-        static tmp<fvPatchField<Type> > New
+        static tmp<fvPatchField<Type>> New
         (
             const fvPatch&,
             const DimensionedField<Type, volMesh>&,
@@ -271,7 +283,7 @@ public:
 
         //- Return a pointer to a new calculatedFvPatchField created on
         //  freestore without setting patchField values
-        static tmp<fvPatchField<Type> > NewCalculatedType
+        static tmp<fvPatchField<Type>> NewCalculatedType
         (
             const fvPatch&
         );
@@ -279,7 +291,7 @@ public:
         //- Return a pointer to a new calculatedFvPatchField created on
         //  freestore without setting patchField values
         template<class Type2>
-        static tmp<fvPatchField<Type> > NewCalculatedType
+        static tmp<fvPatchField<Type>> NewCalculatedType
         (
             const fvPatchField<Type2>&
         );
@@ -292,6 +304,33 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return the type of the calculated for of fvPatchField
+            static const word& calculatedType();
+
+            //- Return true if this patch field fixes a value.
+            //  Needed to check if a level has to be specified while solving
+            //  Poissons equations.
+            virtual bool fixesValue() const
+            {
+                return false;
+            }
+
+            //- Return true if the value of the patch field
+            //  is altered by assignment (the default)
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+            //- Return true if this patch field is coupled
+            virtual bool coupled() const
+            {
+                return false;
+            }
+
+
         // Access
 
             //- Return local objectRegistry
@@ -328,23 +367,6 @@ public:
                 return patchType_;
             }
 
-            //- Return the type of the calculated for of fvPatchField
-            static const word& calculatedType();
-
-            //- Return true if this patch field fixes a value.
-            //  Needed to check if a level has to be specified while solving
-            //  Poissons equations.
-            virtual bool fixesValue() const
-            {
-                return false;
-            }
-
-            //- Return true if this patch field is coupled
-            virtual bool coupled() const
-            {
-                return false;
-            }
-
             //- Return true if the boundary condition has already been updated
             bool updated() const
             {
@@ -377,11 +399,11 @@ public:
         // Evaluation functions
 
             //- Return patch-normal gradient
-            virtual tmp<Field<Type> > snGrad() const;
+            virtual tmp<Field<Type>> snGrad() const;
 
             //- Return patch-normal gradient for coupled-patches
             //  using the deltaCoeffs provided
-            virtual tmp<Field<Type> > snGrad
+            virtual tmp<Field<Type>> snGrad
             (
                 const scalarField& deltaCoeffs
             ) const
@@ -400,13 +422,13 @@ public:
             virtual void updateCoeffs(const scalarField& weights);
 
             //- Return internal field next to patch as patch field
-            virtual tmp<Field<Type> > patchInternalField() const;
+            virtual tmp<Field<Type>> patchInternalField() const;
 
             //- Return internal field next to patch as patch field
             virtual void patchInternalField(Field<Type>&) const;
 
             //- Return patchField on the opposite patch of a coupled patch
-            virtual tmp<Field<Type> > patchNeighbourField() const
+            virtual tmp<Field<Type>> patchNeighbourField() const
             {
                 NotImplemented;
                 return *this;
@@ -428,9 +450,9 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
-                const tmp<Field<scalar> >&
+                const tmp<Field<scalar>>&
             ) const
             {
                 NotImplemented;
@@ -439,9 +461,9 @@ public:
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
-                const tmp<Field<scalar> >&
+                const tmp<Field<scalar>>&
             ) const
             {
                 NotImplemented;
@@ -450,7 +472,7 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const
             {
                 NotImplemented;
                 return *this;
@@ -459,7 +481,7 @@ public:
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this coupled patchField
             //  using the deltaCoeffs provided
-            virtual tmp<Field<Type> > gradientInternalCoeffs
+            virtual tmp<Field<Type>> gradientInternalCoeffs
             (
                 const scalarField& deltaCoeffs
             ) const
@@ -470,7 +492,7 @@ public:
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const
             {
                 NotImplemented;
                 return *this;
@@ -479,7 +501,7 @@ public:
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this coupled patchField
             //  using the deltaCoeffs provided
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs
             (
                 const scalarField& deltaCoeffs
             ) const
@@ -566,128 +588,128 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvPatchField.C"
-#   include "calculatedFvPatchField.H"
+    #include "fvPatchField.C"
+    #include "calculatedFvPatchField.H"
 #endif
 
 
-#define makeFvPatchField(fvPatchTypeField)                                    \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(fvPatchTypeField, 0);                     \
-template<>                                                                    \
-int fvPatchTypeField::disallowGenericFvPatchField                             \
-(                                                                             \
-    debug::debugSwitch("disallowGenericFvPatchField", 0)                      \
-);                                                                            \
-defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch);                 \
-defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper);           \
+#define makeFvPatchField(fvPatchTypeField)                                     \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(fvPatchTypeField, 0);                      \
+template<>                                                                     \
+int fvPatchTypeField::disallowGenericFvPatchField                              \
+(                                                                              \
+    debug::debugSwitch("disallowGenericFvPatchField", 0)                       \
+);                                                                             \
+defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch);                  \
+defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper);            \
 defineTemplateRunTimeSelectionTable(fvPatchTypeField, dictionary);
 
 
-#define addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)   \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        patch                                                                 \
-    );                                                                        \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        patchMapper                                                           \
-    );                                                                        \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        dictionary                                                            \
+#define addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)    \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        patch                                                                  \
+    );                                                                         \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        patchMapper                                                            \
+    );                                                                         \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        dictionary                                                             \
     );
 
 
 // use with caution
 #define addRemovableToPatchFieldRunTimeSelection\
-(PatchTypeField, typePatchTypeField)                                          \
-                                                                              \
-    addRemovableToRunTimeSelectionTable                                       \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        patch                                                                 \
-    );                                                                        \
-    addRemovableToRunTimeSelectionTable                                       \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        patchMapper                                                           \
-    );                                                                        \
-    addRemovableToRunTimeSelectionTable                                       \
-    (                                                                         \
-        PatchTypeField,                                                       \
-        typePatchTypeField,                                                   \
-        dictionary                                                            \
+(PatchTypeField, typePatchTypeField)                                           \
+                                                                               \
+    addRemovableToRunTimeSelectionTable                                        \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        patch                                                                  \
+    );                                                                         \
+    addRemovableToRunTimeSelectionTable                                        \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        patchMapper                                                            \
+    );                                                                         \
+    addRemovableToRunTimeSelectionTable                                        \
+    (                                                                          \
+        PatchTypeField,                                                        \
+        typePatchTypeField,                                                    \
+        dictionary                                                             \
     );
 
 
 // for non-templated patch fields
-#define makePatchTypeField(PatchTypeField, typePatchTypeField)                \
-    defineTypeNameAndDebug(typePatchTypeField, 0);                            \
+#define makePatchTypeField(PatchTypeField, typePatchTypeField)                 \
+    defineTypeNameAndDebug(typePatchTypeField, 0);                             \
     addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
 
 // for non-templated patch fields - use with caution
-#define makeRemovablePatchTypeField(PatchTypeField, typePatchTypeField)       \
-    defineTypeNameAndDebug(typePatchTypeField, 0);                            \
+#define makeRemovablePatchTypeField(PatchTypeField, typePatchTypeField)        \
+    defineTypeNameAndDebug(typePatchTypeField, 0);                             \
     addRemovableToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
 
 
 // for templated patch fields
-#define makeTemplatePatchTypeField(PatchTypeField, typePatchTypeField)        \
-    defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);               \
+#define makeTemplatePatchTypeField(PatchTypeField, typePatchTypeField)         \
+    defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);                \
     addToPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField)
 
 
-#define makePatchFields(type)                                                 \
-    makeTemplatePatchTypeField                                                \
-    (                                                                         \
-        fvPatchScalarField,                                                   \
-        type##FvPatchScalarField                                              \
-    );                                                                        \
-    makeTemplatePatchTypeField                                                \
-    (                                                                         \
-        fvPatchVectorField,                                                   \
-        type##FvPatchVectorField                                              \
-    );                                                                        \
-    makeTemplatePatchTypeField                                                \
-    (                                                                         \
-        fvPatchSphericalTensorField,                                          \
-        type##FvPatchSphericalTensorField                                     \
-    );                                                                        \
-    makeTemplatePatchTypeField                                                \
-    (                                                                         \
-        fvPatchSymmTensorField,                                               \
-        type##FvPatchSymmTensorField                                          \
-    );                                                                        \
-    makeTemplatePatchTypeField                                                \
-    (                                                                         \
-        fvPatchTensorField,                                                   \
-        type##FvPatchTensorField                                              \
+#define makePatchFields(type)                                                  \
+    makeTemplatePatchTypeField                                                 \
+    (                                                                          \
+        fvPatchScalarField,                                                    \
+        type##FvPatchScalarField                                               \
+    );                                                                         \
+    makeTemplatePatchTypeField                                                 \
+    (                                                                          \
+        fvPatchVectorField,                                                    \
+        type##FvPatchVectorField                                               \
+    );                                                                         \
+    makeTemplatePatchTypeField                                                 \
+    (                                                                          \
+        fvPatchSphericalTensorField,                                           \
+        type##FvPatchSphericalTensorField                                      \
+    );                                                                         \
+    makeTemplatePatchTypeField                                                 \
+    (                                                                          \
+        fvPatchSymmTensorField,                                                \
+        type##FvPatchSymmTensorField                                           \
+    );                                                                         \
+    makeTemplatePatchTypeField                                                 \
+    (                                                                          \
+        fvPatchTensorField,                                                    \
+        type##FvPatchTensorField                                               \
     );
 
 
-#define makePatchFieldsTypeName(type)                                         \
-    defineNamedTemplateTypeNameAndDebug(type##FvPatchScalarField, 0);         \
-    defineNamedTemplateTypeNameAndDebug(type##FvPatchVectorField, 0);         \
+#define makePatchFieldsTypeName(type)                                          \
+    defineNamedTemplateTypeNameAndDebug(type##FvPatchScalarField, 0);          \
+    defineNamedTemplateTypeNameAndDebug(type##FvPatchVectorField, 0);          \
     defineNamedTemplateTypeNameAndDebug(type##FvPatchSphericalTensorField, 0);\
-    defineNamedTemplateTypeNameAndDebug(type##FvPatchSymmTensorField, 0);     \
+    defineNamedTemplateTypeNameAndDebug(type##FvPatchSymmTensorField, 0);      \
     defineNamedTemplateTypeNameAndDebug(type##FvPatchTensorField, 0)
 
 
-#define makePatchTypeFieldTypedefs(type)                                      \
-    typedef type##FvPatchField<scalar> type##FvPatchScalarField;              \
-    typedef type##FvPatchField<vector> type##FvPatchVectorField;              \
-    typedef type##FvPatchField<sphericalTensor>                               \
-        type##FvPatchSphericalTensorField;                                    \
-    typedef type##FvPatchField<symmTensor> type##FvPatchSymmTensorField;      \
+#define makePatchTypeFieldTypedefs(type)                                       \
+    typedef type##FvPatchField<scalar> type##FvPatchScalarField;               \
+    typedef type##FvPatchField<vector> type##FvPatchVectorField;               \
+    typedef type##FvPatchField<sphericalTensor>                                \
+        type##FvPatchSphericalTensorField;                                     \
+    typedef type##FvPatchField<symmTensor> type##FvPatchSymmTensorField;       \
     typedef type##FvPatchField<tensor> type##FvPatchTensorField;
 
 
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C
index a88caa7b66204be740e1a94a98368808e13b2a10..537881840b713e163febedf3c4c6ab22096cacd4 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
+Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
 (
     const word& patchFieldType,
     const word& actualPatchType,
@@ -36,10 +36,8 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "fvPatchField<Type>::New(const word&, const word&, "
-               "const fvPatch&, const DimensionedField<Type, volMesh>&) :"
-               " patchFieldType="
-            << patchFieldType
+        InfoInFunction
+            << "patchFieldType = " << patchFieldType
             << " : " << p.type()
             << endl;
     }
@@ -77,12 +75,12 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
     }
     else
     {
-        tmp<fvPatchField<Type> > tfvp = cstrIter()(p, iF);
+        tmp<fvPatchField<Type>> tfvp = cstrIter()(p, iF);
 
         // Check if constraint type override and store patchType if so
         if ((patchTypeCstrIter != patchConstructorTablePtr_->end()))
         {
-            tfvp().patchType() = actualPatchType;
+            tfvp.ref().patchType() = actualPatchType;
         }
         return tfvp;
     }
@@ -90,7 +88,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
 
 
 template<class Type>
-Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
+Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
 (
     const word& patchFieldType,
     const fvPatch& p,
@@ -102,7 +100,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
 
 
 template<class Type>
-Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
+Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
 (
     const fvPatch& p,
     const DimensionedField<Type, volMesh>& iF,
@@ -113,9 +111,8 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
 
     if (debug)
     {
-        Info<< "fvPatchField<Type>::New(const fvPatch&, "
-               "const DimensionedField<Type, volMesh>&, "
-               "const dictionary&) : patchFieldType="  << patchFieldType
+        InfoInFunction
+            << "patchFieldType = " << patchFieldType
             << endl;
     }
 
@@ -172,7 +169,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
 
 
 template<class Type>
-Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
+Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New
 (
     const fvPatchField<Type>& ptf,
     const fvPatch& p,
@@ -182,11 +179,7 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "fvPatchField<Type>::New(const fvPatchField<Type>&, "
-               "const fvPatch&, const DimensionedField<Type, volMesh>&, "
-               "const fvPatchFieldMapper&) : "
-               "constructing fvPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing fvPatchField<Type>" << endl;
     }
 
     typename patchMapperConstructorTable::iterator cstrIter =
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C
index efe80d2f73644a5b57de6cc79887d3e1ca52eec3..5202908f9840ae5f9a94942d26f8bc80b9e123fc 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,11 +28,8 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
 template<class Type>
-const word& fvsPatchField<Type>::calculatedType()
+const Foam::word& Foam::fvsPatchField<Type>::calculatedType()
 {
     return calculatedFvsPatchField<Type>::typeName;
 }
@@ -40,7 +37,7 @@ const word& fvsPatchField<Type>::calculatedType()
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-calculatedFvsPatchField<Type>::calculatedFvsPatchField
+Foam::calculatedFvsPatchField<Type>::calculatedFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -51,32 +48,32 @@ calculatedFvsPatchField<Type>::calculatedFvsPatchField
 
 
 template<class Type>
-calculatedFvsPatchField<Type>::calculatedFvsPatchField
+Foam::calculatedFvsPatchField<Type>::calculatedFvsPatchField
 (
-    const calculatedFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
 {}
 
 
 template<class Type>
-calculatedFvsPatchField<Type>::calculatedFvsPatchField
+Foam::calculatedFvsPatchField<Type>::calculatedFvsPatchField
 (
+    const calculatedFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-calculatedFvsPatchField<Type>::calculatedFvsPatchField
+Foam::calculatedFvsPatchField<Type>::calculatedFvsPatchField
 (
     const calculatedFvsPatchField<Type>& ptf
 )
@@ -86,7 +83,7 @@ calculatedFvsPatchField<Type>::calculatedFvsPatchField
 
 
 template<class Type>
-calculatedFvsPatchField<Type>::calculatedFvsPatchField
+Foam::calculatedFvsPatchField<Type>::calculatedFvsPatchField
 (
     const calculatedFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -97,7 +94,8 @@ calculatedFvsPatchField<Type>::calculatedFvsPatchField
 
 
 template<class Type>
-tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
+Foam::tmp<Foam::fvsPatchField<Type>>
+Foam::fvsPatchField<Type>::NewCalculatedType
 (
     const fvPatch& p
 )
@@ -115,7 +113,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
     }
     else
     {
-        return tmp<fvsPatchField<Type> >
+        return tmp<fvsPatchField<Type>>
         (
             new calculatedFvsPatchField<Type>
             (
@@ -129,7 +127,8 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
 
 template<class Type>
 template<class Type2>
-tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
+Foam::tmp<Foam::fvsPatchField<Type>>
+Foam::fvsPatchField<Type>::NewCalculatedType
 (
     const fvsPatchField<Type2>& pf
 )
@@ -138,8 +137,4 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::NewCalculatedType
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H
index 549f9597dc0586990e44cdc92d94f1e1235a2eec..f16499538f9f4c0bdf46f6581b82942d88c8b96b 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/calculated/calculatedFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,9 +91,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new calculatedFvsPatchField<Type>(*this)
             );
@@ -107,12 +107,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new calculatedFvsPatchField<Type>(*this, iF)
             );
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "calculatedFvsPatchField.C"
+    #include "calculatedFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C
index 0a619f50a4fb076b1e043bc99dcefedb56a3ed3f..13cc7386136e6f9aeac62b1bd5e137bf32344e31 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "coupledFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-coupledFvsPatchField<Type>::coupledFvsPatchField
+Foam::coupledFvsPatchField<Type>::coupledFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -44,7 +39,7 @@ coupledFvsPatchField<Type>::coupledFvsPatchField
 
 
 template<class Type>
-coupledFvsPatchField<Type>::coupledFvsPatchField
+Foam::coupledFvsPatchField<Type>::coupledFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -56,32 +51,32 @@ coupledFvsPatchField<Type>::coupledFvsPatchField
 
 
 template<class Type>
-coupledFvsPatchField<Type>::coupledFvsPatchField
+Foam::coupledFvsPatchField<Type>::coupledFvsPatchField
 (
-    const coupledFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, dict)
 {}
 
 
 template<class Type>
-coupledFvsPatchField<Type>::coupledFvsPatchField
+Foam::coupledFvsPatchField<Type>::coupledFvsPatchField
 (
+    const coupledFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, dict)
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-coupledFvsPatchField<Type>::coupledFvsPatchField
+Foam::coupledFvsPatchField<Type>::coupledFvsPatchField
 (
     const coupledFvsPatchField<Type>& ptf
 )
@@ -91,7 +86,7 @@ coupledFvsPatchField<Type>::coupledFvsPatchField
 
 
 template<class Type>
-coupledFvsPatchField<Type>::coupledFvsPatchField
+Foam::coupledFvsPatchField<Type>::coupledFvsPatchField
 (
     const coupledFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -101,8 +96,4 @@ coupledFvsPatchField<Type>::coupledFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H
index 9c56b6f1ada425e178be6e1465b0dfcb47b0b729..2cc30869448ce6be59926d530def591369919413 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/coupled/coupledFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const = 0;
+        virtual tmp<fvsPatchField<Type>> clone() const = 0;
 
         //- Construct as copy setting internal field reference
         coupledFvsPatchField
@@ -110,7 +110,7 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>&
         ) const = 0;
@@ -136,7 +136,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "coupledFvsPatchField.C"
+    #include "coupledFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C
index b791dca272b92ca5a087d77e61ab7b09dae1f4db..2d4fdaceea04e02d21017cb50e5a3470f4061971 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "fixedValueFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
+Foam::fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -44,32 +39,32 @@ fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 
 
 template<class Type>
-fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
+Foam::fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 (
-    const fixedValueFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
 {}
 
 
 template<class Type>
-fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
+Foam::fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 (
+    const fixedValueFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
+Foam::fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 (
     const fixedValueFvsPatchField<Type>& ptf
 )
@@ -79,7 +74,7 @@ fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 
 
 template<class Type>
-fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
+Foam::fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 (
     const fixedValueFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -92,20 +87,22 @@ fixedValueFvsPatchField<Type>::fixedValueFvsPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvsPatchField<Type>::valueInternalCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvsPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
 ) const
 {
-    return tmp<Field<Type> >
+    return tmp<Field<Type>>
     (
-        new Field<Type>(this->size(), pTraits<Type>::zero)
+        new Field<Type>(this->size(), Zero)
     );
 }
 
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvsPatchField<Type>::valueBoundaryCoeffs
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvsPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
 ) const
@@ -115,21 +112,19 @@ tmp<Field<Type> > fixedValueFvsPatchField<Type>::valueBoundaryCoeffs
 
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvsPatchField<Type>::gradientInternalCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvsPatchField<Type>::gradientInternalCoeffs() const
 {
     return -pTraits<Type>::one*this->patch().deltaCoeffs();
 }
 
 
 template<class Type>
-tmp<Field<Type> > fixedValueFvsPatchField<Type>::gradientBoundaryCoeffs() const
+Foam::tmp<Foam::Field<Type>>
+Foam::fixedValueFvsPatchField<Type>::gradientBoundaryCoeffs() const
 {
     return this->patch().deltaCoeffs()*(*this);
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H
index baa7241809c2a394f9f934afeaac489eabe548ac..a59b8f8f579a85532f0ed8a21a3e7a42e4d413c5 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/fixedValue/fixedValueFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new fixedValueFvsPatchField<Type>(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new fixedValueFvsPatchField<Type>(*this, iF)
             );
@@ -137,25 +137,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientInternalCoeffs() const;
+            virtual tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
     // Member operators
@@ -189,7 +189,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fixedValueFvsPatchField.C"
+    #include "fixedValueFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C
index acef68f92825544be04880b9f86003fd5f2a6499..34750c979adc967448701b5cbaf694ab31db7fd9 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "slicedFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-slicedFvsPatchField<Type>::slicedFvsPatchField
+Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -43,12 +38,12 @@ slicedFvsPatchField<Type>::slicedFvsPatchField
     fvsPatchField<Type>(p, iF, Field<Type>())
 {
     // Set the fvsPatchField to a slice of the given complete field
-    UList<Type>::operator=(p.patchSlice(completeField));
+    UList<Type>::shallowCopy(p.patchSlice(completeField));
 }
 
 
 template<class Type>
-slicedFvsPatchField<Type>::slicedFvsPatchField
+Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -59,36 +54,36 @@ slicedFvsPatchField<Type>::slicedFvsPatchField
 
 
 template<class Type>
-slicedFvsPatchField<Type>::slicedFvsPatchField
+Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
 (
-    const slicedFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
 {
     NotImplemented;
 }
 
 
 template<class Type>
-slicedFvsPatchField<Type>::slicedFvsPatchField
+Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
 (
+    const slicedFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, Field<Type>("value", dict, p.size()))
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {
     NotImplemented;
 }
 
 
 template<class Type>
-slicedFvsPatchField<Type>::slicedFvsPatchField
+Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
 (
     const slicedFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -97,13 +92,15 @@ slicedFvsPatchField<Type>::slicedFvsPatchField
     fvsPatchField<Type>(ptf.patch(), iF, Field<Type>())
 {
     // Transfer the slice from the argument
-    UList<Type>::operator=(ptf);
+    UList<Type>::shallowCopy(ptf);
 }
 
+
 template<class Type>
-tmp<fvsPatchField<Type> > slicedFvsPatchField<Type>::clone() const
+Foam::tmp<Foam::fvsPatchField<Type>>
+Foam::slicedFvsPatchField<Type>::clone() const
 {
-    return tmp<fvsPatchField<Type> >
+    return tmp<fvsPatchField<Type>>
     (
         new slicedFvsPatchField<Type>(*this)
     );
@@ -111,7 +108,7 @@ tmp<fvsPatchField<Type> > slicedFvsPatchField<Type>::clone() const
 
 
 template<class Type>
-slicedFvsPatchField<Type>::slicedFvsPatchField
+Foam::slicedFvsPatchField<Type>::slicedFvsPatchField
 (
     const slicedFvsPatchField<Type>& ptf
 )
@@ -124,17 +121,18 @@ slicedFvsPatchField<Type>::slicedFvsPatchField
     )
 {
     // Transfer the slice from the argument
-    UList<Type>::operator=(ptf);
+    UList<Type>::shallowCopy(ptf);
 }
 
 
 template<class Type>
-tmp<fvsPatchField<Type> > slicedFvsPatchField<Type>::clone
+Foam::tmp<Foam::fvsPatchField<Type>>
+Foam::slicedFvsPatchField<Type>::clone
 (
     const DimensionedField<Type, surfaceMesh>& iF
 ) const
 {
-    return tmp<fvsPatchField<Type> >
+    return tmp<fvsPatchField<Type>>
     (
         new slicedFvsPatchField<Type>(*this, iF)
     );
@@ -142,16 +140,12 @@ tmp<fvsPatchField<Type> > slicedFvsPatchField<Type>::clone
 
 
 template<class Type>
-slicedFvsPatchField<Type>::~slicedFvsPatchField<Type>()
+Foam::slicedFvsPatchField<Type>::~slicedFvsPatchField()
 {
     // Set the fvsPatchField storage pointer to NULL before its destruction
     // to protect the field it a slice of.
-    UList<Type>::operator=(UList<Type>(NULL, 0));
+    UList<Type>::shallowCopy(UList<Type>(NULL, 0));
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H
index 5fcc3c18ae9155f866db340c253aab6fdde86ca7..392d110d0e485336c1600a40a0c30e8776eeab6b 100644
--- a/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ public:
         slicedFvsPatchField(const slicedFvsPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const;
+        virtual tmp<fvsPatchField<Type>> clone() const;
 
         //- Construct as copy setting internal field reference
         slicedFvsPatchField
@@ -113,7 +113,7 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const;
@@ -167,7 +167,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "slicedFvsPatchField.C"
+    #include "slicedFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C
index 6134ed61fa8475f93dd9c910f7080ea0dd9ee354..15fe2d9df7c8af0e3105c3226014fc59c66ffffe 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "cyclicFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-cyclicFvsPatchField<Type>::cyclicFvsPatchField
+Foam::cyclicFvsPatchField<Type>::cyclicFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -45,54 +40,54 @@ cyclicFvsPatchField<Type>::cyclicFvsPatchField
 
 
 template<class Type>
-cyclicFvsPatchField<Type>::cyclicFvsPatchField
+Foam::cyclicFvsPatchField<Type>::cyclicFvsPatchField
 (
-    const cyclicFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    coupledFvsPatchField<Type>(ptf, p, iF, mapper),
+    coupledFvsPatchField<Type>(p, iF, dict),
     cyclicPatch_(refCast<const cyclicFvPatch>(p))
 {
-    if (!isA<cyclicFvPatch>(this->patch()))
+    if (!isA<cyclicFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not cyclic type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-cyclicFvsPatchField<Type>::cyclicFvsPatchField
+Foam::cyclicFvsPatchField<Type>::cyclicFvsPatchField
 (
+    const cyclicFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    coupledFvsPatchField<Type>(p, iF, dict),
+    coupledFvsPatchField<Type>(ptf, p, iF, mapper),
     cyclicPatch_(refCast<const cyclicFvPatch>(p))
 {
-    if (!isA<cyclicFvPatch>(p))
+    if (!isA<cyclicFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not cyclic type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-cyclicFvsPatchField<Type>::cyclicFvsPatchField
+Foam::cyclicFvsPatchField<Type>::cyclicFvsPatchField
 (
     const cyclicFvsPatchField<Type>& ptf
 )
@@ -103,7 +98,7 @@ cyclicFvsPatchField<Type>::cyclicFvsPatchField
 
 
 template<class Type>
-cyclicFvsPatchField<Type>::cyclicFvsPatchField
+Foam::cyclicFvsPatchField<Type>::cyclicFvsPatchField
 (
     const cyclicFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -114,8 +109,4 @@ cyclicFvsPatchField<Type>::cyclicFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H
index ee621316075d207aefa742f47b237ed88a480aff..edcec6361d570bfaf1de1c511fb7382cd0e50b92 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,9 +97,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicFvsPatchField<Type>(*this)
             );
@@ -113,12 +113,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicFvsPatchField<Type>(*this, iF)
             );
@@ -133,7 +133,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicFvsPatchField.C"
+    #include "cyclicFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H
index edd7b9bf1548e37b43e25ed1a8c8c7196d61a73d..b0b0d5745415947c2b88611a18ebc2240d62460c 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,9 +97,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicACMIFvsPatchField<Type>(*this)
             );
@@ -113,12 +113,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicACMIFvsPatchField<Type>(*this, iF)
             );
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicACMIFvsPatchField.C"
+    #include "cyclicACMIFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H
index d55ff5cd5d1f1665acb05cf22e88d2f515f3a773..36edeb2d3b8b151331af79f278c42f9da36f0856 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,9 +97,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicAMIFvsPatchField<Type>(*this)
             );
@@ -113,12 +113,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicAMIFvsPatchField<Type>(*this, iF)
             );
@@ -141,7 +141,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicAMIFvsPatchField.C"
+    #include "cyclicAMIFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.C
index 1e2425befb893d6ffec2c23ff5a0aeeab1ad22b2..8caad80e694de22cef98e5e383798c710df7428a 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "cyclicSlipFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
+Foam::cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -44,32 +39,32 @@ cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 
 
 template<class Type>
-cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
+Foam::cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 (
-    const cyclicSlipFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    cyclicFvsPatchField<Type>(ptf, p, iF, mapper)
+    cyclicFvsPatchField<Type>(p, iF, dict)
 {}
 
 
 template<class Type>
-cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
+Foam::cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 (
+    const cyclicSlipFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    cyclicFvsPatchField<Type>(p, iF, dict)
+    cyclicFvsPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
+Foam::cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 (
     const cyclicSlipFvsPatchField<Type>& ptf
 )
@@ -79,7 +74,7 @@ cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 
 
 template<class Type>
-cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
+Foam::cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 (
     const cyclicSlipFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -89,8 +84,4 @@ cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H
index 9b3e26cf8e99f06d9d73d61ac0f30a41b862ee2b..ea34cd0d19663e7e90262f27b21e15b31aba51d9 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicSlip/cyclicSlipFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicSlipFvsPatchField<Type>(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new cyclicSlipFvsPatchField<Type>(*this, iF)
             );
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cyclicSlipFvsPatchField.C"
+    #include "cyclicSlipFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C
index 3af9ea316898fc5bc2e5772488689f9d6f61659a..160d3e93650dc2f9229b487ce4ae46b9d7fc7032 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.C
@@ -27,15 +27,10 @@ License
 #include "fvPatchFieldMapper.H"
 #include "surfaceMesh.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-emptyFvsPatchField<Type>::emptyFvsPatchField
+Foam::emptyFvsPatchField<Type>::emptyFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -46,52 +41,52 @@ emptyFvsPatchField<Type>::emptyFvsPatchField
 
 
 template<class Type>
-emptyFvsPatchField<Type>::emptyFvsPatchField
+Foam::emptyFvsPatchField<Type>::emptyFvsPatchField
 (
-    const emptyFvsPatchField<Type>&,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper&
+    const dictionary& dict
 )
 :
     fvsPatchField<Type>(p, iF, Field<Type>(0))
 {
-    if (!isType<emptyFvPatch>(this->patch()))
+    if (!isType<emptyFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not empty type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-emptyFvsPatchField<Type>::emptyFvsPatchField
+Foam::emptyFvsPatchField<Type>::emptyFvsPatchField
 (
+    const emptyFvsPatchField<Type>&,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper&
 )
 :
     fvsPatchField<Type>(p, iF, Field<Type>(0))
 {
-    if (!isType<emptyFvPatch>(p))
+    if (!isType<emptyFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not empty type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-emptyFvsPatchField<Type>::emptyFvsPatchField
+Foam::emptyFvsPatchField<Type>::emptyFvsPatchField
 (
     const emptyFvsPatchField<Type>& ptf
 )
@@ -106,7 +101,7 @@ emptyFvsPatchField<Type>::emptyFvsPatchField
 
 
 template<class Type>
-emptyFvsPatchField<Type>::emptyFvsPatchField
+Foam::emptyFvsPatchField<Type>::emptyFvsPatchField
 (
     const emptyFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -116,8 +111,4 @@ emptyFvsPatchField<Type>::emptyFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H
index a2c4f2c0cc967b08c82d08cda3438a1b214c162b..a70fca2172d9860860811aa8240a08cfffad8a45 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/empty/emptyFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new emptyFvsPatchField<Type>(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new emptyFvsPatchField<Type>(*this, iF)
             );
@@ -148,7 +148,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "emptyFvsPatchField.C"
+    #include "emptyFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C
index 8540298cf03bd2b75a12a3d5f84c4066cd5dac2c..ed83712884a69fd300f32b620b8e4fa651415c65 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,15 +25,10 @@ License
 
 #include "nonuniformTransformCyclicFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-nonuniformTransformCyclicFvsPatchField<Type>::
+Foam::nonuniformTransformCyclicFvsPatchField<Type>::
 nonuniformTransformCyclicFvsPatchField
 (
     const fvPatch& p,
@@ -45,34 +40,34 @@ nonuniformTransformCyclicFvsPatchField
 
 
 template<class Type>
-nonuniformTransformCyclicFvsPatchField<Type>::
+Foam::nonuniformTransformCyclicFvsPatchField<Type>::
 nonuniformTransformCyclicFvsPatchField
 (
-    const nonuniformTransformCyclicFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    cyclicFvsPatchField<Type>(ptf, p, iF, mapper)
+    cyclicFvsPatchField<Type>(p, iF, dict)
 {}
 
 
 template<class Type>
-nonuniformTransformCyclicFvsPatchField<Type>::
+Foam::nonuniformTransformCyclicFvsPatchField<Type>::
 nonuniformTransformCyclicFvsPatchField
 (
+    const nonuniformTransformCyclicFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    cyclicFvsPatchField<Type>(p, iF, dict)
+    cyclicFvsPatchField<Type>(ptf, p, iF, mapper)
 {}
 
 
 template<class Type>
-nonuniformTransformCyclicFvsPatchField<Type>::
+Foam::nonuniformTransformCyclicFvsPatchField<Type>::
 nonuniformTransformCyclicFvsPatchField
 (
     const nonuniformTransformCyclicFvsPatchField<Type>& ptf
@@ -83,7 +78,7 @@ nonuniformTransformCyclicFvsPatchField
 
 
 template<class Type>
-nonuniformTransformCyclicFvsPatchField<Type>::
+Foam::nonuniformTransformCyclicFvsPatchField<Type>::
 nonuniformTransformCyclicFvsPatchField
 (
     const nonuniformTransformCyclicFvsPatchField<Type>& ptf,
@@ -94,8 +89,4 @@ nonuniformTransformCyclicFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H
index 1aac3703cd951876cc875b1a328f3c467a5ec0a3..aa488c74c83f0028fba35603b48ecc3aa1e78820 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new nonuniformTransformCyclicFvsPatchField<Type>(*this)
             );
@@ -109,12 +109,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new nonuniformTransformCyclicFvsPatchField<Type>(*this, iF)
             );
@@ -129,7 +129,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "nonuniformTransformCyclicFvsPatchField.C"
+    #include "nonuniformTransformCyclicFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C
index 68eaf04816ee61c49cdff1b44962358806b2d720..a6fa1617905137805b902e85ff30b01202349413 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "processorFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
 
 template<class Type>
-processorFvsPatchField<Type>::processorFvsPatchField
+Foam::processorFvsPatchField<Type>::processorFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -45,7 +40,7 @@ processorFvsPatchField<Type>::processorFvsPatchField
 
 
 template<class Type>
-processorFvsPatchField<Type>::processorFvsPatchField
+Foam::processorFvsPatchField<Type>::processorFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -57,56 +52,55 @@ processorFvsPatchField<Type>::processorFvsPatchField
 {}
 
 
-// Construct by mapping given processorFvsPatchField<Type>
 template<class Type>
-processorFvsPatchField<Type>::processorFvsPatchField
+Foam::processorFvsPatchField<Type>::processorFvsPatchField
 (
-    const processorFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    coupledFvsPatchField<Type>(ptf, p, iF, mapper),
+    coupledFvsPatchField<Type>(p, iF, dict),
     procPatch_(refCast<const processorFvPatch>(p))
 {
-    if (!isType<processorFvPatch>(this->patch()))
+    if (!isType<processorFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not processor type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-processorFvsPatchField<Type>::processorFvsPatchField
+Foam::processorFvsPatchField<Type>::processorFvsPatchField
 (
+    const processorFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    coupledFvsPatchField<Type>(p, iF, dict),
+    coupledFvsPatchField<Type>(ptf, p, iF, mapper),
     procPatch_(refCast<const processorFvPatch>(p))
 {
-    if (!isType<processorFvPatch>(p))
+    if (!isType<processorFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not processor type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-processorFvsPatchField<Type>::processorFvsPatchField
+Foam::processorFvsPatchField<Type>::processorFvsPatchField
 (
     const processorFvsPatchField<Type>& ptf
 )
@@ -117,7 +111,7 @@ processorFvsPatchField<Type>::processorFvsPatchField
 
 
 template<class Type>
-processorFvsPatchField<Type>::processorFvsPatchField
+Foam::processorFvsPatchField<Type>::processorFvsPatchField
 (
     const processorFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -131,12 +125,8 @@ processorFvsPatchField<Type>::processorFvsPatchField
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
 template<class Type>
-processorFvsPatchField<Type>::~processorFvsPatchField()
+Foam::processorFvsPatchField<Type>::~processorFvsPatchField()
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H
index 38aa5f18c7b71dcba3a552e99b26914fa3fd0ba7..d9eb058068d0e73c8253ef8712c1c949de349065 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,9 +102,9 @@ public:
         processorFvsPatchField(const processorFvsPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new processorFvsPatchField<Type>(*this)
             );
@@ -118,12 +118,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new processorFvsPatchField<Type>(*this, iF)
             );
@@ -160,7 +160,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "processorFvsPatchField.C"
+    #include "processorFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C
index e633442acae7bed46f6b94826f22e9222e5035f2..0cfa469404acbdda9df35e329264a83ae1bd560f 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "processorCyclicFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
 
 template<class Type>
-processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
+Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -45,7 +40,7 @@ processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 
 
 template<class Type>
-processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
+Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -57,56 +52,55 @@ processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 {}
 
 
-// Construct by mapping given processorCyclicFvsPatchField<Type>
 template<class Type>
-processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
+Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 (
-    const processorCyclicFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    coupledFvsPatchField<Type>(ptf, p, iF, mapper),
+    coupledFvsPatchField<Type>(p, iF, dict),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {
-    if (!isType<processorCyclicFvPatch>(this->patch()))
+    if (!isType<processorCyclicFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not processor type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
+Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 (
+    const processorCyclicFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    coupledFvsPatchField<Type>(p, iF, dict),
+    coupledFvsPatchField<Type>(ptf, p, iF, mapper),
     procPatch_(refCast<const processorCyclicFvPatch>(p))
 {
-    if (!isType<processorCyclicFvPatch>(p))
+    if (!isType<processorCyclicFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not processor type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
+Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 (
     const processorCyclicFvsPatchField<Type>& ptf
 )
@@ -117,7 +111,7 @@ processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 
 
 template<class Type>
-processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
+Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 (
     const processorCyclicFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -131,12 +125,8 @@ processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField
 // * * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * //
 
 template<class Type>
-processorCyclicFvsPatchField<Type>::~processorCyclicFvsPatchField()
+Foam::processorCyclicFvsPatchField<Type>::~processorCyclicFvsPatchField()
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H
index c096662b29ea669853b8b09b7100120d11ec1f3d..8a67a0c6325827ae17500cafd42bf7cf7a0467df 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,9 +103,9 @@ public:
         processorCyclicFvsPatchField(const processorCyclicFvsPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new processorCyclicFvsPatchField<Type>(*this)
             );
@@ -119,12 +119,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new processorCyclicFvsPatchField<Type>(*this, iF)
             );
@@ -161,7 +161,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "processorCyclicFvsPatchField.C"
+    #include "processorCyclicFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C
index 104052a54bcd45e5e4adb7e57d9a4a5e618a612c..fef8848e67a8f9dce1bf43fc3f48bfa4f2cd9cfc 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "symmetryFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-symmetryFvsPatchField<Type>::symmetryFvsPatchField
+Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -44,52 +39,52 @@ symmetryFvsPatchField<Type>::symmetryFvsPatchField
 
 
 template<class Type>
-symmetryFvsPatchField<Type>::symmetryFvsPatchField
+Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
 (
-    const symmetryFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, dict)
 {
-    if (!isType<symmetryFvPatch>(this->patch()))
+    if (!isType<symmetryFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not symmetry type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-symmetryFvsPatchField<Type>::symmetryFvsPatchField
+Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
 (
+    const symmetryFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, dict)
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {
-    if (!isType<symmetryFvPatch>(p))
+    if (!isType<symmetryFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not symmetry type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-symmetryFvsPatchField<Type>::symmetryFvsPatchField
+Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
 (
     const symmetryFvsPatchField<Type>& ptf
 )
@@ -99,7 +94,7 @@ symmetryFvsPatchField<Type>::symmetryFvsPatchField
 
 
 template<class Type>
-symmetryFvsPatchField<Type>::symmetryFvsPatchField
+Foam::symmetryFvsPatchField<Type>::symmetryFvsPatchField
 (
     const symmetryFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -109,8 +104,4 @@ symmetryFvsPatchField<Type>::symmetryFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H
index 64c6c48da70d51f35add81b4968e46b824fb0a11..56ee70064b653d3f2bb3c3176c92d3ced9fed280 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetry/symmetryFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new symmetryFvsPatchField<Type>(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new symmetryFvsPatchField<Type>(*this, iF)
             );
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "symmetryFvsPatchField.C"
+    #include "symmetryFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C
index ade5b53c0e4e6c35acc6c0355b33bc0847899b65..c1d2d3d3c51d9d17ea961d9026054fdded0f22c7 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "symmetryPlaneFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
+Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -44,52 +39,52 @@ symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 
 
 template<class Type>
-symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
+Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 (
-    const symmetryPlaneFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, dict)
 {
-    if (!isType<symmetryPlaneFvPatch>(this->patch()))
+    if (!isType<symmetryPlaneFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not symmetryPlane type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
+Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 (
+    const symmetryPlaneFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, dict)
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {
-    if (!isType<symmetryPlaneFvPatch>(p))
+    if (!isType<symmetryPlaneFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not symmetryPlane type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
+Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 (
     const symmetryPlaneFvsPatchField<Type>& ptf
 )
@@ -99,7 +94,7 @@ symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 
 
 template<class Type>
-symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
+Foam::symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 (
     const symmetryPlaneFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -109,8 +104,4 @@ symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H
index 8dd2035610147c02140911b4a55bb68d98f5e538..5b8e4724f7eaa2f18828e13f37a89c8b9426d996 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new symmetryPlaneFvsPatchField<Type>(*this)
             );
@@ -109,12 +109,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new symmetryPlaneFvsPatchField<Type>(*this, iF)
             );
@@ -129,7 +129,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "symmetryPlaneFvsPatchField.C"
+    #include "symmetryPlaneFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C
index ec31c57f1bfbd1b78e4cada64c24eca2fb2e8cee..5c5ada449eaf7c2d60277326f9a8c9834a77b2db 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.C
@@ -25,15 +25,10 @@ License
 
 #include "wedgeFvsPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-wedgeFvsPatchField<Type>::wedgeFvsPatchField
+Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -44,52 +39,52 @@ wedgeFvsPatchField<Type>::wedgeFvsPatchField
 
 
 template<class Type>
-wedgeFvsPatchField<Type>::wedgeFvsPatchField
+Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
 (
-    const wedgeFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    fvsPatchField<Type>(ptf, p, iF, mapper)
+    fvsPatchField<Type>(p, iF, dict)
 {
-    if (!isType<wedgeFvPatch>(this->patch()))
+    if (!isType<wedgeFvPatch>(p))
     {
-        FatalErrorInFunction
-            << "Field type does not correspond to patch type for patch "
-            << this->patch().index() << "." << endl
-            << "Field type: " << typeName << endl
-            << "Patch type: " << this->patch().type()
-            << exit(FatalError);
+        FatalIOErrorInFunction
+        (
+            dict
+        )   << "patch " << this->patch().index() << " not wedge type. "
+            << "Patch type = " << p.type()
+            << exit(FatalIOError);
     }
 }
 
 
 template<class Type>
-wedgeFvsPatchField<Type>::wedgeFvsPatchField
+Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
 (
+    const wedgeFvsPatchField<Type>& ptf,
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    fvsPatchField<Type>(p, iF, dict)
+    fvsPatchField<Type>(ptf, p, iF, mapper)
 {
-    if (!isType<wedgeFvPatch>(p))
+    if (!isType<wedgeFvPatch>(this->patch()))
     {
-        FatalIOErrorInFunction
-        (
-            dict
-        )   << "patch " << this->patch().index() << " not wedge type. "
-            << "Patch type = " << p.type()
-            << exit(FatalIOError);
+        FatalErrorInFunction
+            << "Field type does not correspond to patch type for patch "
+            << this->patch().index() << "." << endl
+            << "Field type: " << typeName << endl
+            << "Patch type: " << this->patch().type()
+            << exit(FatalError);
     }
 }
 
 
 template<class Type>
-wedgeFvsPatchField<Type>::wedgeFvsPatchField
+Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
 (
     const wedgeFvsPatchField<Type>& ptf
 )
@@ -99,7 +94,7 @@ wedgeFvsPatchField<Type>::wedgeFvsPatchField
 
 
 template<class Type>
-wedgeFvsPatchField<Type>::wedgeFvsPatchField
+Foam::wedgeFvsPatchField<Type>::wedgeFvsPatchField
 (
     const wedgeFvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -109,8 +104,4 @@ wedgeFvsPatchField<Type>::wedgeFvsPatchField
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H
index dabd590d7fb7d14b7fba39c764d2a553ef1ac300..fd2c68c8e29d9d21c3706de1d3228938c11ce61f 100644
--- a/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/constraint/wedge/wedgeFvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new wedgeFvsPatchField<Type>(*this)
             );
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new wedgeFvsPatchField<Type>(*this, iF)
             );
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "wedgeFvsPatchField.C"
+    #include "wedgeFvsPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C
index 713f876c7db5fddb03871ef61db6de31786af596..cb0276cc7c49c4c9e8f395804ac7fa99a5155e6e 100644
--- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C
+++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C
@@ -28,15 +28,10 @@ License
 #include "fvMesh.H"
 #include "fvPatchFieldMapper.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-fvsPatchField<Type>::fvsPatchField
+Foam::fvsPatchField<Type>::fvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -49,7 +44,7 @@ fvsPatchField<Type>::fvsPatchField
 
 
 template<class Type>
-fvsPatchField<Type>::fvsPatchField
+Foam::fvsPatchField<Type>::fvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -63,7 +58,7 @@ fvsPatchField<Type>::fvsPatchField
 
 
 template<class Type>
-fvsPatchField<Type>::fvsPatchField
+Foam::fvsPatchField<Type>::fvsPatchField
 (
     const fvsPatchField<Type>& ptf,
     const fvPatch& p,
@@ -78,7 +73,7 @@ fvsPatchField<Type>::fvsPatchField
 
 
 template<class Type>
-fvsPatchField<Type>::fvsPatchField
+Foam::fvsPatchField<Type>::fvsPatchField
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -108,7 +103,7 @@ fvsPatchField<Type>::fvsPatchField
 
 
 template<class Type>
-fvsPatchField<Type>::fvsPatchField
+Foam::fvsPatchField<Type>::fvsPatchField
 (
     const fvsPatchField<Type>& ptf
 )
@@ -120,7 +115,7 @@ fvsPatchField<Type>::fvsPatchField
 
 
 template<class Type>
-fvsPatchField<Type>::fvsPatchField
+Foam::fvsPatchField<Type>::fvsPatchField
 (
     const fvsPatchField<Type>& ptf,
     const DimensionedField<Type, surfaceMesh>& iF
@@ -135,14 +130,14 @@ fvsPatchField<Type>::fvsPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-const objectRegistry& fvsPatchField<Type>::db() const
+const Foam::objectRegistry& Foam::fvsPatchField<Type>::db() const
 {
     return patch_.boundaryMesh().mesh();
 }
 
 
 template<class Type>
-void fvsPatchField<Type>::check(const fvsPatchField<Type>& ptf) const
+void Foam::fvsPatchField<Type>::check(const fvsPatchField<Type>& ptf) const
 {
     if (&patch_ != &(ptf.patch_))
     {
@@ -153,9 +148,8 @@ void fvsPatchField<Type>::check(const fvsPatchField<Type>& ptf) const
 }
 
 
-// Map from self
 template<class Type>
-void fvsPatchField<Type>::autoMap
+void Foam::fvsPatchField<Type>::autoMap
 (
     const fvPatchFieldMapper& m
 )
@@ -164,9 +158,8 @@ void fvsPatchField<Type>::autoMap
 }
 
 
-// Reverse-map the given fvsPatchField onto this fvsPatchField
 template<class Type>
-void fvsPatchField<Type>::rmap
+void Foam::fvsPatchField<Type>::rmap
 (
     const fvsPatchField<Type>& ptf,
     const labelList& addr
@@ -176,9 +169,8 @@ void fvsPatchField<Type>::rmap
 }
 
 
-// Write
 template<class Type>
-void fvsPatchField<Type>::write(Ostream& os) const
+void Foam::fvsPatchField<Type>::write(Ostream& os) const
 {
     os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
     this->writeEntry("value", os);
@@ -188,7 +180,7 @@ void fvsPatchField<Type>::write(Ostream& os) const
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Type>
-void fvsPatchField<Type>::operator=
+void Foam::fvsPatchField<Type>::operator=
 (
     const UList<Type>& ul
 )
@@ -198,7 +190,7 @@ void fvsPatchField<Type>::operator=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator=
+void Foam::fvsPatchField<Type>::operator=
 (
     const fvsPatchField<Type>& ptf
 )
@@ -209,7 +201,7 @@ void fvsPatchField<Type>::operator=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator+=
+void Foam::fvsPatchField<Type>::operator+=
 (
     const fvsPatchField<Type>& ptf
 )
@@ -220,7 +212,7 @@ void fvsPatchField<Type>::operator+=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator-=
+void Foam::fvsPatchField<Type>::operator-=
 (
     const fvsPatchField<Type>& ptf
 )
@@ -231,7 +223,7 @@ void fvsPatchField<Type>::operator-=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator*=
+void Foam::fvsPatchField<Type>::operator*=
 (
     const fvsPatchField<scalar>& ptf
 )
@@ -248,7 +240,7 @@ void fvsPatchField<Type>::operator*=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator/=
+void Foam::fvsPatchField<Type>::operator/=
 (
     const fvsPatchField<scalar>& ptf
 )
@@ -264,7 +256,7 @@ void fvsPatchField<Type>::operator/=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator+=
+void Foam::fvsPatchField<Type>::operator+=
 (
     const Field<Type>& tf
 )
@@ -274,7 +266,7 @@ void fvsPatchField<Type>::operator+=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator-=
+void Foam::fvsPatchField<Type>::operator-=
 (
     const Field<Type>& tf
 )
@@ -284,7 +276,7 @@ void fvsPatchField<Type>::operator-=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator*=
+void Foam::fvsPatchField<Type>::operator*=
 (
     const scalarField& tf
 )
@@ -294,7 +286,7 @@ void fvsPatchField<Type>::operator*=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator/=
+void Foam::fvsPatchField<Type>::operator/=
 (
     const scalarField& tf
 )
@@ -304,7 +296,7 @@ void fvsPatchField<Type>::operator/=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator=
+void Foam::fvsPatchField<Type>::operator=
 (
     const Type& t
 )
@@ -314,7 +306,7 @@ void fvsPatchField<Type>::operator=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator+=
+void Foam::fvsPatchField<Type>::operator+=
 (
     const Type& t
 )
@@ -324,7 +316,7 @@ void fvsPatchField<Type>::operator+=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator-=
+void Foam::fvsPatchField<Type>::operator-=
 (
     const Type& t
 )
@@ -334,7 +326,7 @@ void fvsPatchField<Type>::operator-=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator*=
+void Foam::fvsPatchField<Type>::operator*=
 (
     const scalar s
 )
@@ -344,7 +336,7 @@ void fvsPatchField<Type>::operator*=
 
 
 template<class Type>
-void fvsPatchField<Type>::operator/=
+void Foam::fvsPatchField<Type>::operator/=
 (
     const scalar s
 )
@@ -353,9 +345,8 @@ void fvsPatchField<Type>::operator/=
 }
 
 
-// Force an assignment, overriding fixedValue status
 template<class Type>
-void fvsPatchField<Type>::operator==
+void Foam::fvsPatchField<Type>::operator==
 (
     const fvsPatchField<Type>& ptf
 )
@@ -365,7 +356,7 @@ void fvsPatchField<Type>::operator==
 
 
 template<class Type>
-void fvsPatchField<Type>::operator==
+void Foam::fvsPatchField<Type>::operator==
 (
     const Field<Type>& tf
 )
@@ -375,7 +366,7 @@ void fvsPatchField<Type>::operator==
 
 
 template<class Type>
-void fvsPatchField<Type>::operator==
+void Foam::fvsPatchField<Type>::operator==
 (
     const Type& t
 )
@@ -387,7 +378,7 @@ void fvsPatchField<Type>::operator==
 // * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
 
 template<class Type>
-Ostream& operator<<(Ostream& os, const fvsPatchField<Type>& ptf)
+Foam::Ostream& Foam::operator<<(Ostream& os, const fvsPatchField<Type>& ptf)
 {
     ptf.write(os);
 
@@ -399,10 +390,6 @@ Ostream& operator<<(Ostream& os, const fvsPatchField<Type>& ptf)
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#   include "fvsPatchFieldNew.C"
+#include "fvsPatchFieldNew.C"
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H
index 88fb9a7d58d40dce40824467729e4ac13f6d0254..6bfd32ec0665d1b824d520d28569bb2617c6d190 100644
--- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H
+++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,6 +65,9 @@ class surfaceMesh;
 template<class Type>
 class fvsPatchField;
 
+template<class Type>
+class calculatedFvsPatchField;
+
 template<class Type>
 Ostream& operator<<(Ostream&, const fvsPatchField<Type>&);
 
@@ -90,6 +93,7 @@ class fvsPatchField
 public:
 
     typedef fvPatch Patch;
+    typedef calculatedFvsPatchField<Type> Calculated;
 
 
     //- Runtime type information
@@ -179,9 +183,9 @@ public:
         fvsPatchField(const fvsPatchField<Type>&);
 
         //- Construct and return a clone
-        virtual tmp<fvsPatchField<Type> > clone() const
+        virtual tmp<fvsPatchField<Type>> clone() const
         {
-            return tmp<fvsPatchField<Type> >(new fvsPatchField<Type>(*this));
+            return tmp<fvsPatchField<Type>>(new fvsPatchField<Type>(*this));
         }
 
         //- Construct as copy setting internal field reference
@@ -192,12 +196,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvsPatchField<Type> > clone
+        virtual tmp<fvsPatchField<Type>> clone
         (
             const DimensionedField<Type, surfaceMesh>& iF
         ) const
         {
-            return tmp<fvsPatchField<Type> >
+            return tmp<fvsPatchField<Type>>
             (
                 new fvsPatchField<Type>(*this, iF)
             );
@@ -209,7 +213,7 @@ public:
         //- Return a pointer to a new patchField created on freestore given
         //  patch and internal field
         //  (does not set the patch field values)
-        static tmp<fvsPatchField<Type> > New
+        static tmp<fvsPatchField<Type>> New
         (
             const word&,
             const fvPatch&,
@@ -220,7 +224,7 @@ public:
         //  patch and internal field
         //  (does not set the patch field values)
         //  Allows override of constraint type
-        static tmp<fvsPatchField<Type> > New
+        static tmp<fvsPatchField<Type>> New
         (
             const word&,
             const word& actualPatchType,
@@ -230,7 +234,7 @@ public:
 
         //- Return a pointer to a new patchField created on freestore from
         //  a given fvsPatchField mapped onto a new patch
-        static tmp<fvsPatchField<Type> > New
+        static tmp<fvsPatchField<Type>> New
         (
             const fvsPatchField<Type>&,
             const fvPatch&,
@@ -240,7 +244,7 @@ public:
 
         //- Return a pointer to a new patchField created on freestore
         //  from dictionary
-        static tmp<fvsPatchField<Type> > New
+        static tmp<fvsPatchField<Type>> New
         (
             const fvPatch&,
             const DimensionedField<Type, surfaceMesh>&,
@@ -249,7 +253,7 @@ public:
 
         //- Return a pointer to a new calculatedFvsPatchField created on
         //  freestore without setting patchField values
-        static tmp<fvsPatchField<Type> > NewCalculatedType
+        static tmp<fvsPatchField<Type>> NewCalculatedType
         (
             const fvPatch&
         );
@@ -257,7 +261,7 @@ public:
         //- Return a pointer to a new calculatedFvsPatchField created on
         //  freestore without setting patchField values
         template<class Type2>
-        static tmp<fvsPatchField<Type> > NewCalculatedType
+        static tmp<fvsPatchField<Type>> NewCalculatedType
         (
             const fvsPatchField<Type2>&
         );
@@ -381,65 +385,65 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvsPatchField.C"
-#   include "calculatedFvsPatchField.H"
+    #include "fvsPatchField.C"
+    #include "calculatedFvsPatchField.H"
 #endif
 
 
-#define makeFvsPatchTypeFieldTypeName(type)                                \
-                                                                           \
+#define makeFvsPatchTypeFieldTypeName(type)                                    \
+                                                                               \
 defineNamedTemplateTypeNameAndDebug(type, 0);
 
-#define makeFvsPatchFieldsTypeName(type)                                   \
-                                                                           \
-makeFvsPatchTypeFieldTypeName(type##FvsPatchScalarField);                  \
-makeFvsPatchTypeFieldTypeName(type##FvsPatchVectorField);                  \
-makeFvsPatchTypeFieldTypeName(type##FvsPatchSphericalTensorField);         \
-makeFvsPatchTypeFieldTypeName(type##FvsPatchSymmTensorField);              \
+#define makeFvsPatchFieldsTypeName(type)                                       \
+                                                                               \
+makeFvsPatchTypeFieldTypeName(type##FvsPatchScalarField);                      \
+makeFvsPatchTypeFieldTypeName(type##FvsPatchVectorField);                      \
+makeFvsPatchTypeFieldTypeName(type##FvsPatchSphericalTensorField);             \
+makeFvsPatchTypeFieldTypeName(type##FvsPatchSymmTensorField);                  \
 makeFvsPatchTypeFieldTypeName(type##FvsPatchTensorField);
 
-#define makeFvsPatchTypeField(PatchTypeField, typePatchTypeField)          \
-                                                                           \
-defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);                \
-                                                                           \
-addToRunTimeSelectionTable                                                 \
-(                                                                          \
-    PatchTypeField, typePatchTypeField, patch                              \
-);                                                                         \
-                                                                           \
-addToRunTimeSelectionTable                                                 \
-(                                                                          \
-    PatchTypeField,                                                        \
-    typePatchTypeField,                                                    \
-    patchMapper                                                            \
-);                                                                         \
-                                                                           \
-addToRunTimeSelectionTable                                                 \
-(                                                                          \
-    PatchTypeField, typePatchTypeField, dictionary                         \
+#define makeFvsPatchTypeField(PatchTypeField, typePatchTypeField)              \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0);                    \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    PatchTypeField, typePatchTypeField, patch                                  \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    PatchTypeField,                                                            \
+    typePatchTypeField,                                                        \
+    patchMapper                                                                \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    PatchTypeField, typePatchTypeField, dictionary                             \
 );
 
 
-#define makeFvsPatchFields(type)                                           \
-                                                                           \
-makeFvsPatchTypeField(fvsPatchScalarField, type##FvsPatchScalarField);     \
-makeFvsPatchTypeField(fvsPatchVectorField, type##FvsPatchVectorField);     \
-makeFvsPatchTypeField                                                      \
-(                                                                          \
-    fvsPatchSphericalTensorField,                                          \
-    type##FvsPatchSphericalTensorField                                     \
-);                                                                         \
+#define makeFvsPatchFields(type)                                               \
+                                                                               \
+makeFvsPatchTypeField(fvsPatchScalarField, type##FvsPatchScalarField);         \
+makeFvsPatchTypeField(fvsPatchVectorField, type##FvsPatchVectorField);         \
+makeFvsPatchTypeField                                                          \
+(                                                                              \
+    fvsPatchSphericalTensorField,                                              \
+    type##FvsPatchSphericalTensorField                                         \
+);                                                                             \
 makeFvsPatchTypeField(fvsPatchSymmTensorField, type##FvsPatchSymmTensorField); \
 makeFvsPatchTypeField(fvsPatchTensorField, type##FvsPatchTensorField);
 
 
-#define makeFvsPatchTypeFieldTypedefs(type)                                \
-                                                                           \
-typedef type##FvsPatchField<scalar> type##FvsPatchScalarField;             \
-typedef type##FvsPatchField<vector> type##FvsPatchVectorField;             \
-typedef type##FvsPatchField<sphericalTensor>                               \
-    type##FvsPatchSphericalTensorField;                                    \
-typedef type##FvsPatchField<symmTensor> type##FvsPatchSymmTensorField;     \
+#define makeFvsPatchTypeFieldTypedefs(type)                                    \
+                                                                               \
+typedef type##FvsPatchField<scalar> type##FvsPatchScalarField;                 \
+typedef type##FvsPatchField<vector> type##FvsPatchVectorField;                 \
+typedef type##FvsPatchField<sphericalTensor>                                   \
+    type##FvsPatchSphericalTensorField;                                        \
+typedef type##FvsPatchField<symmTensor> type##FvsPatchSymmTensorField;         \
 typedef type##FvsPatchField<tensor> type##FvsPatchTensorField;
 
 
diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C
index b1f0d186daed779e9fe357bae7362fe150f74232..9becf00ccfd1fea99e29a16e0f5831dd7d12271e 100644
--- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C
+++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,15 +23,10 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
+Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
 (
     const word& patchFieldType,
     const word& actualPatchType,
@@ -41,10 +36,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "fvsPatchField<Type>::New(const word&, const word&"
-               ", const fvPatch&, const Field<Type>&) : "
-               "constructing fvsPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing fvsPatchField<Type>" << endl;
     }
 
     typename patchConstructorTable::iterator cstrIter =
@@ -86,7 +78,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 
 
 template<class Type>
-tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
+Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
 (
     const word& patchFieldType,
     const fvPatch& p,
@@ -98,7 +90,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 
 
 template<class Type>
-tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
+Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
 (
     const fvPatch& p,
     const DimensionedField<Type, surfaceMesh>& iF,
@@ -107,10 +99,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "fvsPatchField<Type>::New(const fvPatch&, const Field<Type>&, "
-               "const dictionary&) : "
-               "constructing fvsPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing fvsPatchField<Type>" << endl;
     }
 
     const word patchFieldType(dict.lookup("type"));
@@ -167,10 +156,8 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 }
 
 
-// Return a pointer to a new patch created on freestore from
-// a given fvsPatchField<Type> mapped onto a new patch
 template<class Type>
-tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
+Foam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New
 (
     const fvsPatchField<Type>& ptf,
     const fvPatch& p,
@@ -180,11 +167,7 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 {
     if (debug)
     {
-        Info<< "fvsPatchField<Type>::New(const fvsPatchField<Type>&,"
-               " const fvPatch&, const Field<Type>&, "
-               "const fvPatchFieldMapper&) : "
-               "constructing fvsPatchField<Type>"
-            << endl;
+        InfoInFunction << "Constructing fvsPatchField<Type>" << endl;
     }
 
     typename patchMapperConstructorTable::iterator cstrIter =
@@ -213,8 +196,4 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C
index 63b0cc10d8daa16353d6d459a5563be3c7a61fe1..61d4f1cf32f585dffe9103ca406db390dba65f5e 100644
--- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C
+++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,16 +32,16 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define makeFvsPatchField(fvsPatchTypeField)                                  \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0);                    \
-template<>                                                                    \
-int fvsPatchTypeField::disallowGenericFvsPatchField                           \
-(                                                                             \
-    debug::debugSwitch("disallowGenericFvsPatchField", 0)                     \
-);                                                                            \
-defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch);                \
-defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper);          \
+#define makeFvsPatchField(fvsPatchTypeField)                                   \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0);                     \
+template<>                                                                     \
+int fvsPatchTypeField::disallowGenericFvsPatchField                            \
+(                                                                              \
+    debug::debugSwitch("disallowGenericFvsPatchField", 0)                      \
+);                                                                             \
+defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch);                 \
+defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper);           \
 defineTemplateRunTimeSelectionTable(fvsPatchTypeField, dictionary);
 
 makeFvsPatchField(fvsPatchScalarField)
diff --git a/src/finiteVolume/fields/volFields/volFields.C b/src/finiteVolume/fields/volFields/volFields.C
index 65dd22e5a3d926056c6bdb99dcfdabf3d9ce73db..055e182b728ca6baa38df5c847fdfeea5eb82596 100644
--- a/src/finiteVolume/fields/volFields/volFields.C
+++ b/src/finiteVolume/fields/volFields/volFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ defineTemplateTypeNameAndDebug(volTensorField, 0);
 
 // specialization for scalar fields
 template<>
-tmp<GeometricField<scalar, fvPatchField, volMesh> >
+tmp<GeometricField<scalar, fvPatchField, volMesh>>
 GeometricField<scalar, fvPatchField, volMesh>::component
 (
     const direction
diff --git a/src/finiteVolume/fields/volFields/volFields.H b/src/finiteVolume/fields/volFields/volFields.H
index ef3a632c3022b04099dcc29b7e06df473b03b2f8..145fc5dccb781a8edc7cf66658e1e017dbf4d689 100644
--- a/src/finiteVolume/fields/volFields/volFields.H
+++ b/src/finiteVolume/fields/volFields/volFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ namespace Foam
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<>
-tmp<GeometricField<scalar, fvPatchField, volMesh> >
+tmp<GeometricField<scalar, fvPatchField, volMesh>>
 GeometricField<scalar, fvPatchField, volMesh>::component
 (
     const direction
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C
index 1e5c9117638b6b4b9ac59cf161c9b76631a2de35..5da9b1486c8eff7c00a0a2f1a412c9c827422f71 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 boundedConvectionScheme<Type>::interpolate
 (
     const surfaceScalarField& phi,
@@ -53,7 +53,7 @@ boundedConvectionScheme<Type>::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 boundedConvectionScheme<Type>::flux
 (
     const surfaceScalarField& faceFlux,
@@ -65,7 +65,7 @@ boundedConvectionScheme<Type>::flux
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 boundedConvectionScheme<Type>::fvmDiv
 (
     const surfaceScalarField& faceFlux,
@@ -79,7 +79,7 @@ boundedConvectionScheme<Type>::fvmDiv
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 boundedConvectionScheme<Type>::fvcDiv
 (
     const surfaceScalarField& faceFlux,
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H
index 9426104d3398fd922c6bba88bd89ef9f3923fb72..225f507e673af4c7274d5173926f9b0e3e0edc3e 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,7 +65,7 @@ class boundedConvectionScheme
 {
     // Private data
 
-        tmp<fv::convectionScheme<Type> > scheme_;
+        tmp<fv::convectionScheme<Type>> scheme_;
 
 
     // Private Member Functions
@@ -103,25 +103,25 @@ public:
 
     // Member Functions
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<fvMatrix<Type> > fvmDiv
+        tmp<fvMatrix<Type>> fvmDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "boundedConvectionScheme.C"
+    #include "boundedConvectionScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C
index a7bbdeed7247aee24338dc5a3008f1b26fe57c13..a3ba465414560a473682c7a5211a8925ad494e73 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ namespace fv
 template<class Type>
 convectionScheme<Type>::convectionScheme(const convectionScheme& cs)
 :
-    refCount(),
+    tmp<convectionScheme<Type>>::refCount(),
     mesh_(cs.mesh_)
 {}
 
@@ -54,7 +54,7 @@ convectionScheme<Type>::convectionScheme(const convectionScheme& cs)
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<convectionScheme<Type> > convectionScheme<Type>::New
+tmp<convectionScheme<Type>> convectionScheme<Type>::New
 (
     const fvMesh& mesh,
     const surfaceScalarField& faceFlux,
@@ -63,10 +63,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "convectionScheme<Type>::New"
-               "(const fvMesh&, const surfaceScalarField&, Istream&) : "
-               "constructing convectionScheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing convectionScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
@@ -101,7 +98,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
 
 
 template<class Type>
-tmp<convectionScheme<Type> > convectionScheme<Type>::New
+tmp<convectionScheme<Type>> convectionScheme<Type>::New
 (
     const fvMesh& mesh,
     const typename multivariateSurfaceInterpolationScheme<Type>::
@@ -112,12 +109,7 @@ tmp<convectionScheme<Type> > convectionScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "convectionScheme<Type>::New"
-               "(const fvMesh&, "
-               "const typename multivariateSurfaceInterpolationScheme<Type>"
-               "::fieldTable&, const surfaceScalarField&, Istream&) : "
-               "constructing convectionScheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing convectionScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H
index 491ed4849602f9d811949252914f8979659da3fa..5388abce15af706222fb62102a2ab51ad52ce373 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ namespace fv
 template<class Type>
 class convectionScheme
 :
-    public refCount
+    public tmp<convectionScheme<Type>>::refCount
 {
     // Private data
 
@@ -127,7 +127,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new convectionScheme created on freestore
-        static tmp<convectionScheme<Type> > New
+        static tmp<convectionScheme<Type>> New
         (
             const fvMesh& mesh,
             const surfaceScalarField& faceFlux,
@@ -137,7 +137,7 @@ public:
 
         //- Return a pointer to a new multivariate convectionScheme
         //  created on freestore
-        static tmp<convectionScheme<Type> > New
+        static tmp<convectionScheme<Type>> New
         (
             const fvMesh& mesh,
             const typename multivariateSurfaceInterpolationScheme<Type>::
@@ -159,26 +159,26 @@ public:
             return mesh_;
         }
 
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const = 0;
 
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmDiv
+        virtual tmp<fvMatrix<Type>> fvmDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -210,7 +210,7 @@ public:
     {                                                                          \
         namespace fv                                                           \
         {                                                                      \
-            convectionScheme<Type>::addIstreamConstructorToTable<SS<Type> >    \
+            convectionScheme<Type>::addIstreamConstructorToTable<SS<Type>>     \
                 add##SS##Type##IstreamConstructorToTable_;                     \
         }                                                                      \
     }
@@ -232,7 +232,7 @@ makeFvConvectionTypeScheme(SS, tensor)
         namespace fv                                                           \
         {                                                                      \
             convectionScheme<Type>::                                           \
-                addMultivariateConstructorToTable<SS<Type> >                   \
+                addMultivariateConstructorToTable<SS<Type>>                    \
                 add##SS##Type##MultivariateConstructorToTable_;                \
         }                                                                      \
     }
@@ -250,7 +250,7 @@ makeMultivariateFvConvectionTypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "convectionScheme.C"
+    #include "convectionScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionSchemes.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionSchemes.C
index e0e34a5b6f36e886c836c82117b37d9ccc387934..78fc2f57d6e4ea98f2b99680182583034f592001 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionSchemes.C
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,18 +41,18 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 // Define the constructor function hash tables
 
-#define makeBaseConvectionScheme(Type)                                        \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    convectionScheme<Type>,                                                   \
-    Istream                                                                   \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    convectionScheme<Type>,                                                   \
-    Multivariate                                                              \
+#define makeBaseConvectionScheme(Type)                                         \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    convectionScheme<Type>,                                                    \
+    Istream                                                                    \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    convectionScheme<Type>,                                                    \
+    Multivariate                                                               \
 );
 
 
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C
index 1c68b9cf12eb497f20b35a12bd84e913a6838f5d..38040b2119b1853aeb0749062f84b452be7cdef1 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ gaussConvectionScheme<Type>::interpScheme() const
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 gaussConvectionScheme<Type>::interpolate
 (
     const surfaceScalarField&,
@@ -60,7 +60,7 @@ gaussConvectionScheme<Type>::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 gaussConvectionScheme<Type>::flux
 (
     const surfaceScalarField& faceFlux,
@@ -72,7 +72,7 @@ gaussConvectionScheme<Type>::flux
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 gaussConvectionScheme<Type>::fvmDiv
 (
     const surfaceScalarField& faceFlux,
@@ -82,7 +82,7 @@ gaussConvectionScheme<Type>::fvmDiv
     tmp<surfaceScalarField> tweights = tinterpScheme_().weights(vf);
     const surfaceScalarField& weights = tweights();
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -90,7 +90,7 @@ gaussConvectionScheme<Type>::fvmDiv
             faceFlux.dimensions()*vf.dimensions()
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     fvm.lower() = -weights.internalField()*faceFlux.internalField();
     fvm.upper() = fvm.lower() + faceFlux.internalField();
@@ -116,19 +116,19 @@ gaussConvectionScheme<Type>::fvmDiv
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 gaussConvectionScheme<Type>::fvcDiv
 (
     const surfaceScalarField& faceFlux,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tConvection
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tConvection
     (
         fvc::surfaceIntegrate(flux(faceFlux, vf))
     );
 
-    tConvection().rename
+    tConvection.ref().rename
     (
         "convection(" + faceFlux.name() + ',' + vf.name() + ')'
     );
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H
index 83b50416e9d9b57b958fe5e26283ea285cdbb5a2..fc7d98d4c5c79045ad155cca869f1ec124c5ecdc 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ class gaussConvectionScheme
 {
     // Private data
 
-        tmp<surfaceInterpolationScheme<Type> > tinterpScheme_;
+        tmp<surfaceInterpolationScheme<Type>> tinterpScheme_;
 
 
     // Private Member Functions
@@ -87,7 +87,7 @@ public:
         (
             const fvMesh& mesh,
             const surfaceScalarField& faceFlux,
-            const tmp<surfaceInterpolationScheme<Type> >& scheme
+            const tmp<surfaceInterpolationScheme<Type>>& scheme
         )
         :
             convectionScheme<Type>(mesh, faceFlux),
@@ -136,25 +136,25 @@ public:
 
         const surfaceInterpolationScheme<Type>& interpScheme() const;
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<fvMatrix<Type> > fvmDiv
+        tmp<fvMatrix<Type>> fvmDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -173,7 +173,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gaussConvectionScheme.C"
+    #include "gaussConvectionScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.C
index b979f534ab830e5845ce58b9751a8fd6c49c4f50..0a1da8aa97d48c71abdf5e71bfc80428fee62cff 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.C
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 multivariateGaussConvectionScheme<Type>::interpolate
 (
     const surfaceScalarField& faceFlux,
@@ -57,7 +57,7 @@ multivariateGaussConvectionScheme<Type>::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 multivariateGaussConvectionScheme<Type>::flux
 (
     const surfaceScalarField& faceFlux,
@@ -74,7 +74,7 @@ multivariateGaussConvectionScheme<Type>::flux
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 multivariateGaussConvectionScheme<Type>::fvmDiv
 (
     const surfaceScalarField& faceFlux,
@@ -91,7 +91,7 @@ multivariateGaussConvectionScheme<Type>::fvmDiv
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 multivariateGaussConvectionScheme<Type>::fvcDiv
 (
     const surfaceScalarField& faceFlux,
diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.H
index df8fde08be63c039c56348f3cc4013b806d717f6..3b363b1de6e4bb4e56697ea6ac9f49bcca104a67 100644
--- a/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.H
+++ b/src/finiteVolume/finiteVolume/convectionSchemes/multivariateGaussConvectionScheme/multivariateGaussConvectionScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ class multivariateGaussConvectionScheme
 {
     // Private data
 
-        tmp<multivariateSurfaceInterpolationScheme<Type> > tinterpScheme_;
+        tmp<multivariateSurfaceInterpolationScheme<Type>> tinterpScheme_;
 
 
 public:
@@ -92,31 +92,31 @@ public:
 
     // Member Functions
 
-        tmp<multivariateSurfaceInterpolationScheme<Type> >
+        tmp<multivariateSurfaceInterpolationScheme<Type>>
         interpolationScheme() const
         {
             return tinterpScheme_;
         }
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<fvMatrix<Type> > fvmDiv
+        tmp<fvMatrix<Type>> fvmDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDiv
         (
             const surfaceScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -135,7 +135,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "multivariateGaussConvectionScheme.C"
+    #include "multivariateGaussConvectionScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.C
index 76064b74f412e9400dd03be2d367a9a13174cda9..44ee3649646d5184f6b7dce4238f5faa2f7070c0 100644
--- a/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.C
+++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerD2dt2Scheme<Type>::fvcD2dt2
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -72,7 +72,7 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
         scalarField VV0 = mesh().V() + mesh().V0();
         scalarField V0V00 = mesh().V0() + mesh().V00();
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -99,7 +99,7 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -117,7 +117,7 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerD2dt2Scheme<Type>::fvcD2dt2
 (
     const volScalarField& rho,
@@ -162,7 +162,7 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
             )
         );
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -214,7 +214,7 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
         const volScalarField rhoRho0(rho + rho.oldTime());
         const volScalarField rho0Rho00(rho.oldTime() +rho.oldTime().oldTime());
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -232,13 +232,13 @@ EulerD2dt2Scheme<Type>::fvcD2dt2
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerD2dt2Scheme<Type>::fvmD2dt2
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -247,7 +247,7 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar deltaT = mesh().time().deltaTValue();
     scalar deltaT0 = mesh().time().deltaT0Value();
@@ -291,14 +291,14 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerD2dt2Scheme<Type>::fvmD2dt2
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -308,7 +308,7 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar deltaT = mesh().time().deltaTValue();
     scalar deltaT0 = mesh().time().deltaT0Value();
@@ -351,14 +351,14 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerD2dt2Scheme<Type>::fvmD2dt2
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -368,7 +368,7 @@ EulerD2dt2Scheme<Type>::fvmD2dt2
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar deltaT = mesh().time().deltaTValue();
     scalar deltaT0 = mesh().time().deltaT0Value();
diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.H b/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.H
index a1e8fa0bc3d0b15d47f05eec157cfed5ac056225..0ce4c7d220a9be5b1ffe9e1daed52984aca09feb 100644
--- a/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.H
+++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/EulerD2dt2Scheme/EulerD2dt2Scheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,29 +95,29 @@ public:
             return fv::d2dt2Scheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcD2dt2
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcD2dt2
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmD2dt2
+        tmp<fvMatrix<Type>> fvmD2dt2
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmD2dt2
+        tmp<fvMatrix<Type>> fvmD2dt2
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmD2dt2
+        tmp<fvMatrix<Type>> fvmD2dt2
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -136,7 +136,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "EulerD2dt2Scheme.C"
+    #include "EulerD2dt2Scheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C
index da2492411535da7da1713438b2ca6b80e37cac8a..8113fed871d1d2642ddd801b3b7badb9282179f8 100644
--- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C
+++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<d2dt2Scheme<Type> > d2dt2Scheme<Type>::New
+tmp<d2dt2Scheme<Type>> d2dt2Scheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -50,9 +50,7 @@ tmp<d2dt2Scheme<Type> > d2dt2Scheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "d2dt2Scheme<Type>::New(const fvMesh&, Istream&) : "
-               "constructing d2dt2Scheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing d2dt2Scheme<Type>" << endl;
     }
 
     if (schemeData.eof())
diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H
index 55e2fd21e210f27a8747773777b5660914120d30..b00888c5779f05f42a8ad4b6189574ac87f4f017 100644
--- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H
+++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ namespace fv
 template<class Type>
 class d2dt2Scheme
 :
-    public refCount
+    public tmp<d2dt2Scheme<Type>>::refCount
 {
 
 protected:
@@ -119,7 +119,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new d2dt2Scheme created on freestore
-        static tmp<d2dt2Scheme<Type> > New
+        static tmp<d2dt2Scheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
@@ -138,29 +138,29 @@ public:
             return mesh_;
         }
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcD2dt2
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcD2dt2
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmD2dt2
+        virtual tmp<fvMatrix<Type>> fvmD2dt2
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmD2dt2
+        virtual tmp<fvMatrix<Type>> fvmD2dt2
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmD2dt2
+        virtual tmp<fvMatrix<Type>> fvmD2dt2
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -187,7 +187,7 @@ public:
     {                                                                          \
         namespace fv                                                           \
         {                                                                      \
-            d2dt2Scheme<Type>::addIstreamConstructorToTable<SS<Type> >         \
+            d2dt2Scheme<Type>::addIstreamConstructorToTable<SS<Type>>          \
                 add##SS##Type##IstreamConstructorToTable_;                     \
         }                                                                      \
     }
@@ -204,7 +204,7 @@ makeFvD2dt2TypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "d2dt2Scheme.C"
+    #include "d2dt2Scheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C
index 614279e87c0dfd647734187dc06cdd1c38636ab9..2290d1735fe332de2bc0bacc92bad497876daa78 100644
--- a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C
+++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,13 +40,13 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateD2dt2Scheme<Type>::fvcD2dt2
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -63,7 +63,7 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2
             (
                 "0",
                 vf.dimensions()/dimTime/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -71,14 +71,14 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateD2dt2Scheme<Type>::fvcD2dt2
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -95,7 +95,7 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2
             (
                 "0",
                 rho.dimensions()*vf.dimensions()/dimTime/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -103,13 +103,13 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateD2dt2Scheme<Type>::fvmD2dt2
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -123,14 +123,14 @@ steadyStateD2dt2Scheme<Type>::fvmD2dt2
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateD2dt2Scheme<Type>::fvmD2dt2
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -144,14 +144,14 @@ steadyStateD2dt2Scheme<Type>::fvmD2dt2
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateD2dt2Scheme<Type>::fvmD2dt2
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.H b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.H
index 986e1be05a130826a2e60706d838e0bd7e40fd69..76fe1160b3f6a0dc3e3adfe8165bbb7dbf7c25ee 100644
--- a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.H
+++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,29 +94,29 @@ public:
             return fv::d2dt2Scheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcD2dt2
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcD2dt2
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcD2dt2
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmD2dt2
+        tmp<fvMatrix<Type>> fvmD2dt2
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmD2dt2
+        tmp<fvMatrix<Type>> fvmD2dt2
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmD2dt2
+        tmp<fvMatrix<Type>> fvmD2dt2
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -135,7 +135,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "steadyStateD2dt2Scheme.C"
+    #include "steadyStateD2dt2Scheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C
index 64cfa89943e84e571fc1a596ac1a8eedae678a47..4165b621912746066682df913e84d6d08842e039 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,11 +57,11 @@ tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT() const
             ),
             mesh(),
             dimensionedScalar("CorDeltaT", cofrDeltaT.dimensions(), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    volScalarField& corDeltaT = tcorDeltaT();
+    volScalarField& corDeltaT = tcorDeltaT.ref();
 
     const labelUList& owner = mesh().owner();
     const labelUList& neighbour = mesh().neighbour();
@@ -151,7 +151,7 @@ tmp<surfaceScalarField> CoEulerDdtScheme<Type>::CofrDeltaT() const
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CoEulerDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
@@ -168,7 +168,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tdtdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -178,12 +178,12 @@ CoEulerDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 )
             )
         );
 
-        tdtdt().internalField() =
+        tdtdt.ref().internalField() =
             rDeltaT.internalField()*dt.value()
            *(1.0 - mesh().Vsc0()/mesh().Vsc());
 
@@ -191,7 +191,7 @@ CoEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -201,7 +201,7 @@ CoEulerDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 ),
                 calculatedFvPatchField<Type>::typeName
             )
@@ -211,7 +211,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CoEulerDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -228,7 +228,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -249,7 +249,7 @@ CoEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -262,7 +262,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CoEulerDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
@@ -280,7 +280,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -301,7 +301,7 @@ CoEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -314,7 +314,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CoEulerDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
@@ -332,7 +332,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -356,7 +356,7 @@ CoEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -369,7 +369,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CoEulerDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -388,7 +388,7 @@ CoEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -421,7 +421,7 @@ CoEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -438,13 +438,13 @@ CoEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CoEulerDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -453,7 +453,7 @@ CoEulerDdtScheme<Type>::fvmDdt
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(CorDeltaT()().internalField());
 
@@ -473,14 +473,14 @@ CoEulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CoEulerDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -488,7 +488,7 @@ CoEulerDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(CorDeltaT()().internalField());
 
@@ -510,14 +510,14 @@ CoEulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CoEulerDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -525,7 +525,7 @@ CoEulerDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(CorDeltaT()().internalField());
 
@@ -549,7 +549,7 @@ CoEulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CoEulerDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -557,7 +557,7 @@ CoEulerDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -565,7 +565,7 @@ CoEulerDdtScheme<Type>::fvmDdt
             alpha.dimensions()*rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(CorDeltaT()().internalField());
 
@@ -600,9 +600,10 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
 {
     const surfaceScalarField rDeltaT(fvc::interpolate(CorDeltaT()));
 
+    fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
     fluxFieldType phiCorr
     (
-        mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
+        phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -615,12 +616,7 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
                 mesh().time().timeName(),
                 mesh()
             ),
-            this->fvcDdtPhiCoeff
-            (
-                U.oldTime(),
-                (mesh().Sf() & Uf.oldTime()),
-                phiCorr
-            )
+            this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
            *rDeltaT*phiCorr
         )
     );
@@ -639,7 +635,7 @@ CoEulerDdtScheme<Type>::fvcDdtPhiCorr
 
     fluxFieldType phiCorr
     (
-        phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
+        phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -681,10 +677,8 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
             rho.oldTime()*U.oldTime()
         );
 
-        fluxFieldType phiCorr
-        (
-            mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
-        );
+        fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
+        fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
 
         return tmp<fluxFieldType>
         (
@@ -697,13 +691,7 @@ CoEulerDdtScheme<Type>::fvcDdtUfCorr
                     mesh().time().timeName(),
                     mesh()
                 ),
-                this->fvcDdtPhiCoeff
-                (
-                    rhoU0,
-                    mesh().Sf() & Uf.oldTime(),
-                    phiCorr
-                )
-               *rDeltaT*phiCorr
+                this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
             )
         );
     }
@@ -750,7 +738,7 @@ CoEulerDdtScheme<Type>::fvcDdtPhiCorr
 
         fluxFieldType phiCorr
         (
-            phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
+            phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
         );
 
         return tmp<fluxFieldType>
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H
index e743a0cb4035e14dda39d10ce61697059301d778..9ee9020e230ee2311d526b7fcd4392f8a86aaf76 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,53 +117,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -247,7 +247,7 @@ tmp<surfaceScalarField> CoEulerDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CoEulerDdtScheme.C"
+    #include "CoEulerDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C
index 60040579e278ba092446f6435b0200c74eefa865..5c09bc973129b733861de29e704da78a0efb14ca 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ CrankNicolsonDdtScheme<Type>::ddt0_
                 name,
                 startTimeName,
                 mesh()
-            ).template typeHeaderOk<DDt0Field<GeoField> >(true)
+            ).template typeHeaderOk<DDt0Field<GeoField>>(true)
         )
         {
             regIOobject::store
@@ -162,7 +162,7 @@ CrankNicolsonDdtScheme<Type>::ddt0_
                     (
                         "0",
                         dims/dimTime,
-                        pTraits<typename GeoField::value_type>::zero
+                        Zero
                     )
                 )
             );
@@ -280,14 +280,14 @@ const FieldField<fvPatchField, Type>& ff
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CrankNicolsonDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + dt.name() + ')',
             dt.dimensions()
@@ -300,7 +300,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
         mesh()
     );
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tdtdt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -310,7 +310,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             (
                 "0",
                 dt.dimensions()/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -330,7 +330,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             )/mesh().V0();
         }
 
-        tdtdt().dimensionedInternalField() =
+        tdtdt.ref().dimensionedInternalField() =
         (
             (rDtCoef*dt)*(mesh().V() - mesh().V0())
           - mesh().V0()*offCentre_(ddt0.dimensionedInternalField())
@@ -342,14 +342,14 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CrankNicolsonDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + vf.name() + ')',
             vf.dimensions()
@@ -389,7 +389,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             );
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -418,7 +418,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
                  - offCentre_(ddt0());
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -431,15 +431,15 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CrankNicolsonDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + rho.name() + ',' + vf.name() + ')',
             rho.dimensions()*vf.dimensions()
@@ -479,7 +479,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             );
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -508,7 +508,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
                  - offCentre_(ddt0());
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -521,15 +521,15 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CrankNicolsonDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + rho.name() + ',' + vf.name() + ')',
             rho.dimensions()*vf.dimensions()
@@ -573,7 +573,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             );
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -607,7 +607,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             ) - offCentre_(ddt0());
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -621,7 +621,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 CrankNicolsonDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -629,8 +629,8 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + alpha.name() + ',' + rho.name() + ',' + vf.name() + ')',
             alpha.dimensions()*rho.dimensions()*vf.dimensions()
@@ -682,7 +682,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             );
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -733,7 +733,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
             ) - offCentre_(ddt0());
         }
 
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -751,20 +751,20 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CrankNicolsonDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + vf.name() + ')',
             vf.dimensions()
         );
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -773,7 +773,7 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDtCoef = rDtCoef_(ddt0).value();
     fvm.diag() = rDtCoef*mesh().V();
@@ -833,21 +833,21 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CrankNicolsonDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + rho.name() + ',' + vf.name() + ')',
             rho.dimensions()*vf.dimensions()
         );
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -855,7 +855,7 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDtCoef = rDtCoef_(ddt0).value();
     fvm.diag() = rDtCoef*rho.value()*mesh().V();
@@ -915,21 +915,21 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CrankNicolsonDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + rho.name() + ',' + vf.name() + ')',
             rho.dimensions()*vf.dimensions()
         );
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -937,7 +937,7 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDtCoef = rDtCoef_(ddt0).value();
     fvm.diag() = rDtCoef*rho.internalField()*mesh().V();
@@ -1005,7 +1005,7 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 CrankNicolsonDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -1013,14 +1013,14 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + alpha.name() + ',' + rho.name() + ',' + vf.name() + ')',
             alpha.dimensions()*rho.dimensions()*vf.dimensions()
         );
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -1028,7 +1028,7 @@ CrankNicolsonDdtScheme<Type>::fvmDdt
             alpha.dimensions()*rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDtCoef = rDtCoef_(ddt0).value();
     fvm.diag() = rDtCoef*alpha.internalField()*rho.internalField()*mesh().V();
@@ -1123,15 +1123,15 @@ CrankNicolsonDdtScheme<Type>::fvcDdtUfCorr
     const GeometricField<Type, fvsPatchField, surfaceMesh>& Uf
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + U.name() + ')',
             U.dimensions()
         );
 
-    DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh> >& dUfdt0 =
-        ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh> >
+    DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
+        ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
         (
             "ddt0(" + Uf.name() + ')',
             Uf.dimensions()
@@ -1184,8 +1184,8 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
     const fluxFieldType& phi
 )
 {
-    DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-        ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+    DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+        ddt0_<GeometricField<Type, fvPatchField, volMesh>>
         (
             "ddt0(" + U.name() + ')',
             U.dimensions()
@@ -1227,9 +1227,10 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
             this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())
            *(
                 (rDtCoef*phi.oldTime() + offCentre_(dphidt0()))
-              - (
-                    mesh().Sf()
-                  & fvc::interpolate(rDtCoef*U.oldTime() + offCentre_(ddt0()))
+              - fvc::dotInterpolate
+                (
+                    mesh().Sf(),
+                    rDtCoef*U.oldTime() + offCentre_(ddt0())
                 )
             )
         )
@@ -1252,15 +1253,15 @@ CrankNicolsonDdtScheme<Type>::fvcDdtUfCorr
      && Uf.dimensions() == rho.dimensions()*dimVelocity
     )
     {
-        DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-            ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+        DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+            ddt0_<GeometricField<Type, fvPatchField, volMesh>>
             (
                 "ddt0(" + rho.name() + ',' + U.name() + ')',
                 U.dimensions()
             );
 
-        DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh> >& dUfdt0 =
-            ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
+            ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
             (
                 "ddt0(" + Uf.name() + ')',
                 Uf.dimensions()
@@ -1347,8 +1348,8 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
      && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea
     )
     {
-        DDt0Field<GeometricField<Type, fvPatchField, volMesh> >& ddt0 =
-            ddt0_<GeometricField<Type, fvPatchField, volMesh> >
+        DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
+            ddt0_<GeometricField<Type, fvPatchField, volMesh>>
             (
                 "ddt0(" + rho.name() + ',' + U.name() + ')',
                 U.dimensions()
@@ -1398,9 +1399,10 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
                 this->fvcDdtPhiCoeff(rhoU0, phi.oldTime())
                *(
                     (rDtCoef*phi.oldTime() + offCentre_(dphidt0()))
-                  - (
-                        mesh().Sf()
-                      & fvc::interpolate(rDtCoef*rhoU0 + offCentre_(ddt0()))
+                  - fvc::dotInterpolate
+                    (
+                        mesh().Sf(),
+                        rDtCoef*rhoU0 + offCentre_(ddt0())
                     )
                 )
             )
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H
index db2c5a08f0edcf128a825676ad142713743cacb1..14d6947a1c27f6efd99f2c6f24edece932f9db9e 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -232,53 +232,53 @@ public:
             return ocCoeff_;
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -363,7 +363,7 @@ tmp<surfaceScalarField> CrankNicolsonDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CrankNicolsonDdtScheme.C"
+    #include "CrankNicolsonDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C
index 1d64797ac729228a89fbcf904508fe34999377a4..5a72c9d93201f3147b33ce602fc038ed691be574 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
@@ -58,7 +58,7 @@ EulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tdtdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -68,19 +68,19 @@ EulerDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 )
             )
         );
 
-        tdtdt().internalField() =
+        tdtdt.ref().internalField() =
             rDeltaT.value()*dt.value()*(1.0 - mesh().Vsc0()/mesh().Vsc());
 
         return tdtdt;
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -90,7 +90,7 @@ EulerDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 ),
                 calculatedFvPatchField<Type>::typeName
             )
@@ -100,7 +100,7 @@ EulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -117,7 +117,7 @@ EulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -138,7 +138,7 @@ EulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -151,7 +151,7 @@ EulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
@@ -169,7 +169,7 @@ EulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -190,7 +190,7 @@ EulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -203,7 +203,7 @@ EulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
@@ -221,7 +221,7 @@ EulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -245,7 +245,7 @@ EulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -258,7 +258,7 @@ EulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 EulerDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -277,7 +277,7 @@ EulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -310,7 +310,7 @@ EulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -327,13 +327,13 @@ EulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -342,7 +342,7 @@ EulerDdtScheme<Type>::fvmDdt
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/mesh().time().deltaTValue();
 
@@ -362,14 +362,14 @@ EulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -377,7 +377,7 @@ EulerDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/mesh().time().deltaTValue();
 
@@ -399,14 +399,14 @@ EulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -414,7 +414,7 @@ EulerDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/mesh().time().deltaTValue();
 
@@ -438,7 +438,7 @@ EulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 EulerDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -446,7 +446,7 @@ EulerDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -454,7 +454,7 @@ EulerDdtScheme<Type>::fvmDdt
             alpha.dimensions()*rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/mesh().time().deltaTValue();
 
@@ -489,9 +489,10 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
 {
     dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT();
 
+    fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
     fluxFieldType phiCorr
     (
-        mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
+        phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -504,12 +505,7 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
                 mesh().time().timeName(),
                 mesh()
             ),
-            this->fvcDdtPhiCoeff
-            (
-                U.oldTime(),
-                mesh().Sf() & Uf.oldTime(),
-                phiCorr
-            )
+            this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
            *rDeltaT*phiCorr
         )
     );
@@ -528,7 +524,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr
 
     fluxFieldType phiCorr
     (
-        phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
+        phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -570,10 +566,8 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
             rho.oldTime()*U.oldTime()
         );
 
-        fluxFieldType phiCorr
-        (
-            mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
-        );
+        fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
+        fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
 
         return tmp<fluxFieldType>
         (
@@ -586,13 +580,7 @@ EulerDdtScheme<Type>::fvcDdtUfCorr
                     mesh().time().timeName(),
                     mesh()
                 ),
-                this->fvcDdtPhiCoeff
-                (
-                    rhoU0,
-                    mesh().Sf() & Uf.oldTime(),
-                    phiCorr
-                )
-               *rDeltaT*phiCorr
+                this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
             )
         );
     }
@@ -639,7 +627,7 @@ EulerDdtScheme<Type>::fvcDdtPhiCorr
 
         fluxFieldType phiCorr
         (
-            phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
+            phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
         );
 
         return tmp<fluxFieldType>
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H
index 2818fa123f9074e5539e76a93fb410fc1f32e75d..4cc92a40e2f95830644ae51c4cf64ffd0b2dfcac 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,53 +95,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -225,7 +225,7 @@ tmp<surfaceScalarField> EulerDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "EulerDdtScheme.C"
+    #include "EulerDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C
index 6873c384316080a0e6b3b910a79ac12d6923aa96..399487792213c29ee6524c6d3d9337fe2dd26eef 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,11 +107,11 @@ tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT() const
             ),
             mesh(),
             dimensionedScalar("rDeltaT", dimless/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    volScalarField& rDeltaT = trDeltaT();
+    volScalarField& rDeltaT = trDeltaT.ref();
 
     relaxedDiag(rDeltaT, phi);
 
@@ -151,7 +151,7 @@ tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT() const
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SLTSDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
@@ -168,7 +168,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tdtdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -178,19 +178,19 @@ SLTSDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 )
             )
         );
 
-        tdtdt().internalField() =
+        tdtdt.ref().internalField() =
             rDeltaT.internalField()*dt.value()*(1.0 - mesh().V0()/mesh().V());
 
         return tdtdt;
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -200,7 +200,7 @@ SLTSDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 ),
                 calculatedFvPatchField<Type>::typeName
             )
@@ -210,7 +210,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SLTSDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -227,7 +227,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -248,7 +248,7 @@ SLTSDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -261,7 +261,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SLTSDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
@@ -279,7 +279,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -300,7 +300,7 @@ SLTSDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -313,7 +313,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SLTSDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
@@ -331,7 +331,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -355,7 +355,7 @@ SLTSDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -368,7 +368,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SLTSDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -387,7 +387,7 @@ SLTSDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -420,7 +420,7 @@ SLTSDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -437,13 +437,13 @@ SLTSDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 SLTSDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -452,13 +452,10 @@ SLTSDdtScheme<Type>::fvmDdt
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(SLrDeltaT()().internalField());
 
-    Info<< "SLTSDdtScheme<Type>::fvmDdt: max/min rDeltaT "
-        << gMax(rDeltaT) << " " << gMin(rDeltaT) << endl;
-
     fvm.diag() = rDeltaT*mesh().V();
 
     if (mesh().moving())
@@ -475,14 +472,14 @@ SLTSDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 SLTSDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -490,7 +487,7 @@ SLTSDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(SLrDeltaT()().internalField());
 
@@ -512,14 +509,14 @@ SLTSDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 SLTSDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -527,7 +524,7 @@ SLTSDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(SLrDeltaT()().internalField());
 
@@ -551,7 +548,7 @@ SLTSDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 SLTSDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -559,7 +556,7 @@ SLTSDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -567,7 +564,7 @@ SLTSDdtScheme<Type>::fvmDdt
             alpha.dimensions()*rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalarField rDeltaT(SLrDeltaT()().internalField());
 
@@ -602,9 +599,10 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
 {
     const surfaceScalarField rDeltaT(fvc::interpolate(SLrDeltaT()));
 
+    fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
     fluxFieldType phiCorr
     (
-        mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
+        phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -617,12 +615,7 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
                 mesh().time().timeName(),
                 mesh()
             ),
-            this->fvcDdtPhiCoeff
-            (
-                U.oldTime(),
-                (mesh().Sf() & Uf.oldTime()),
-                phiCorr
-            )
+            this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
            *rDeltaT*phiCorr
         )
     );
@@ -641,7 +634,7 @@ SLTSDdtScheme<Type>::fvcDdtPhiCorr
 
     fluxFieldType phiCorr
     (
-        phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
+        phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -683,10 +676,8 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
             rho.oldTime()*U.oldTime()
         );
 
-        fluxFieldType phiCorr
-        (
-            mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
-        );
+        fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
+        fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
 
         return tmp<fluxFieldType>
         (
@@ -699,13 +690,7 @@ SLTSDdtScheme<Type>::fvcDdtUfCorr
                     mesh().time().timeName(),
                     mesh()
                 ),
-                this->fvcDdtPhiCoeff
-                (
-                    rhoU0,
-                    mesh().Sf() & Uf.oldTime(),
-                    phiCorr
-                )
-               *rDeltaT*phiCorr
+                this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
             )
         );
     }
@@ -752,7 +737,7 @@ SLTSDdtScheme<Type>::fvcDdtPhiCorr
 
         fluxFieldType phiCorr
         (
-            phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
+            phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
         );
 
         return tmp<fluxFieldType>
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H
index ee92d658b65de235b4a982f55915d9c5ad4c59f8..edfcdb4043c3a42509b86506a9bdc0ff289cddbf 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,53 +119,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -249,7 +249,7 @@ tmp<surfaceScalarField> SLTSDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SLTSDdtScheme.C"
+    #include "SLTSDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C
index 9d17e8dbfc0f9acf35305fcca5588537c2688ed1..a405a2c3f363641b699f9ab830a36b6fd3471c67 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ scalar backwardDdtScheme<Type>::deltaT0_(const GeoField& vf) const
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 backwardDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
@@ -96,7 +96,7 @@ backwardDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tdtdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -106,12 +106,12 @@ backwardDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 )
             )
         );
 
-        tdtdt().internalField() = rDeltaT.value()*dt.value()*
+        tdtdt.ref().internalField() = rDeltaT.value()*dt.value()*
         (
             coefft - (coefft0*mesh().V0() - coefft00*mesh().V00())/mesh().V()
         );
@@ -120,7 +120,7 @@ backwardDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -130,7 +130,7 @@ backwardDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 ),
                 calculatedFvPatchField<Type>::typeName
             )
@@ -140,7 +140,7 @@ backwardDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 backwardDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -164,7 +164,7 @@ backwardDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -193,7 +193,7 @@ backwardDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -211,7 +211,7 @@ backwardDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 backwardDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
@@ -236,7 +236,7 @@ backwardDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -265,7 +265,7 @@ backwardDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -283,7 +283,7 @@ backwardDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 backwardDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
@@ -308,7 +308,7 @@ backwardDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -340,7 +340,7 @@ backwardDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -358,7 +358,7 @@ backwardDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 backwardDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -384,7 +384,7 @@ backwardDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -433,7 +433,7 @@ backwardDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -452,13 +452,13 @@ backwardDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 backwardDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -467,7 +467,7 @@ backwardDdtScheme<Type>::fvmDdt
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/deltaT_();
 
@@ -503,14 +503,14 @@ backwardDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 backwardDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -518,7 +518,7 @@ backwardDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/deltaT_();
 
@@ -554,14 +554,14 @@ backwardDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 backwardDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -569,7 +569,7 @@ backwardDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/deltaT_();
 
@@ -608,7 +608,7 @@ backwardDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 backwardDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -616,7 +616,7 @@ backwardDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -624,7 +624,7 @@ backwardDdtScheme<Type>::fvmDdt
             alpha.dimensions()*rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     scalar rDeltaT = 1.0/deltaT_();
 
@@ -748,12 +748,10 @@ backwardDdtScheme<Type>::fvcDdtPhiCorr
            *rDeltaT
            *(
                 (coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime())
-              - (
-                    mesh().Sf()
-                  & fvc::interpolate
-                    (
-                        coefft0*U.oldTime() - coefft00*U.oldTime().oldTime()
-                    )
+              - fvc::dotInterpolate
+                (
+                    mesh().Sf(),
+                    coefft0*U.oldTime() - coefft00*U.oldTime().oldTime()
                 )
             )
         )
@@ -886,9 +884,10 @@ backwardDdtScheme<Type>::fvcDdtPhiCorr
                *rDeltaT
                *(
                     (coefft0*phi.oldTime() - coefft00*phi.oldTime().oldTime())
-                  - (
-                        mesh().Sf()
-                      & fvc::interpolate(coefft0*rhoU0 - coefft00*rhoU00)
+                  - fvc::dotInterpolate
+                    (
+                        mesh().Sf(),
+                        coefft0*rhoU0 - coefft00*rhoU00
                     )
                 )
             )
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H
index 9855ad55997ba62bd6182f13c9c4c72fcbe1e412..0833cda7a4b5d5579a607c0fed882c12d2847c21 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,53 +106,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -236,7 +236,7 @@ tmp<surfaceScalarField> backwardDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "backwardDdtScheme.C"
+    #include "backwardDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C
index d5ea7dbcbb1480f02c141a6d74624df519f6f88a..c81e9f5266070b09e702590f02b32ce2024fff53 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,53 +42,53 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 boundedDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
 )
 {
-    return scheme_().fvcDdt(dt);
+    return scheme_.ref().fvcDdt(dt);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 boundedDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvcDdt(vf);
+    return scheme_.ref().fvcDdt(vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 boundedDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvcDdt(rho, vf);
+    return scheme_.ref().fvcDdt(rho, vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 boundedDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvcDdt(rho, vf) - fvc::ddt(rho)*vf;
+    return scheme_.ref().fvcDdt(rho, vf) - fvc::ddt(rho)*vf;
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 boundedDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -96,47 +96,47 @@ boundedDdtScheme<Type>::fvcDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvcDdt(alpha, rho, vf) - fvc::ddt(alpha, rho)*vf;
+    return scheme_.ref().fvcDdt(alpha, rho, vf) - fvc::ddt(alpha, rho)*vf;
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 boundedDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvmDdt(vf);
+    return scheme_.ref().fvmDdt(vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 boundedDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvmDdt(rho, vf);
+    return scheme_.ref().fvmDdt(rho, vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 boundedDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvmDdt(rho, vf) - fvm::Sp(fvc::ddt(rho), vf);
+    return scheme_.ref().fvmDdt(rho, vf) - fvm::Sp(fvc::ddt(rho), vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 boundedDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -144,7 +144,9 @@ boundedDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().fvmDdt(alpha, rho, vf) - fvm::Sp(fvc::ddt(alpha, rho), vf);
+    return
+        scheme_.ref().fvmDdt(alpha, rho, vf)
+      - fvm::Sp(fvc::ddt(alpha, rho), vf);
 }
 
 
@@ -156,7 +158,7 @@ boundedDdtScheme<Type>::fvcDdtUfCorr
     const GeometricField<Type, fvsPatchField, surfaceMesh>& Uf
 )
 {
-    return scheme_().fvcDdtUfCorr(U, Uf);
+    return scheme_.ref().fvcDdtUfCorr(U, Uf);
 }
 
 
@@ -168,7 +170,7 @@ boundedDdtScheme<Type>::fvcDdtPhiCorr
     const fluxFieldType& phi
 )
 {
-    return scheme_().fvcDdtPhiCorr(U, phi);
+    return scheme_.ref().fvcDdtPhiCorr(U, phi);
 }
 
 
@@ -181,7 +183,7 @@ boundedDdtScheme<Type>::fvcDdtUfCorr
     const GeometricField<Type, fvsPatchField, surfaceMesh>& Uf
 )
 {
-    return scheme_().fvcDdtUfCorr(rho, U, Uf);
+    return scheme_.ref().fvcDdtUfCorr(rho, U, Uf);
 }
 
 
@@ -194,7 +196,7 @@ boundedDdtScheme<Type>::fvcDdtPhiCorr
     const fluxFieldType& phi
 )
 {
-    return scheme_().fvcDdtPhiCorr(rho, U, phi);
+    return scheme_.ref().fvcDdtPhiCorr(rho, U, phi);
 }
 
 
@@ -204,7 +206,7 @@ tmp<surfaceScalarField> boundedDdtScheme<Type>::meshPhi
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return scheme_().meshPhi(vf);
+    return scheme_.ref().meshPhi(vf);
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H
index 741e7c1e0fa4833bf5f0f5bd1ed721dd93cb64db..7441cf9c55ac6c3f5010205023273208030e83c7 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,7 +65,7 @@ class boundedDdtScheme
 {
     // Private data
 
-        tmp<fv::ddtScheme<Type> > scheme_;
+        tmp<fv::ddtScheme<Type>> scheme_;
 
 
     // Private Member Functions
@@ -104,53 +104,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -234,7 +234,7 @@ tmp<surfaceScalarField> boundedDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "boundedDdtScheme.C"
+    #include "boundedDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C
index 8777ec8973ce6841531433ddd438de81573159c8..cd0e1adc7e0ceaf3403767bbde21abb06e7379d5 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<ddtScheme<Type> > ddtScheme<Type>::New
+tmp<ddtScheme<Type>> ddtScheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -50,9 +50,7 @@ tmp<ddtScheme<Type> > ddtScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "ddtScheme<Type>::New(const fvMesh&, Istream&) : "
-               "constructing ddtScheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing ddtScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
@@ -96,7 +94,7 @@ ddtScheme<Type>::~ddtScheme()
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > ddtScheme<Type>::fvcDdt
+tmp<GeometricField<Type, fvPatchField, volMesh>> ddtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
     const volScalarField& rho,
@@ -105,7 +103,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > ddtScheme<Type>::fvcDdt
 {
     NotImplemented;
 
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         GeometricField<Type, fvPatchField, volMesh>::null()
     );
@@ -113,7 +111,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > ddtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> > ddtScheme<Type>::fvmDdt
+tmp<fvMatrix<Type>> ddtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
     const volScalarField& rho,
@@ -122,7 +120,7 @@ tmp<fvMatrix<Type> > ddtScheme<Type>::fvmDdt
 {
     NotImplemented;
 
-    return tmp<fvMatrix<Type> >
+    return tmp<fvMatrix<Type>>
     (
         new fvMatrix<Type>
         (
@@ -150,7 +148,7 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
             scalar(1)
         );
 
-    surfaceScalarField& ddtCouplingCoeff = tddtCouplingCoeff();
+    surfaceScalarField& ddtCouplingCoeff = tddtCouplingCoeff.ref();
 
     forAll(U.boundaryField(), patchi)
     {
@@ -166,7 +164,8 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
 
     if (debug > 1)
     {
-        Info<< "ddtCouplingCoeff mean max min = "
+        InfoInFunction
+            << "ddtCouplingCoeff mean max min = "
             << gAverage(ddtCouplingCoeff.internalField())
             << " " << gMax(ddtCouplingCoeff.internalField())
             << " " << gMin(ddtCouplingCoeff.internalField())
@@ -184,7 +183,7 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
     const fluxFieldType& phi
 )
 {
-    return fvcDdtPhiCoeff(U, phi, phi - (mesh().Sf() & fvc::interpolate(U)));
+    return fvcDdtPhiCoeff(U, phi, phi - fvc::dotInterpolate(mesh().Sf(), U));
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H
index 5c35996c384944c6580b4d0f8832f4c1e47b1aa0..f475ed24f47a067ceef7a3fc3f01009a3d243b1f 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ namespace fv
 template<class Type>
 class ddtScheme
 :
-    public refCount
+    public tmp<ddtScheme<Type>>::refCount
 {
 
 protected:
@@ -119,7 +119,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new ddtScheme created on freestore
-        static tmp<ddtScheme<Type> > New
+        static tmp<ddtScheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
@@ -138,53 +138,53 @@ public:
             return mesh_;
         }
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmDdt
+        virtual tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmDdt
+        virtual tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmDdt
+        virtual tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmDdt
+        virtual tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -263,7 +263,7 @@ public:
     {                                                                          \
         namespace fv                                                           \
         {                                                                      \
-            ddtScheme<Type>::addIstreamConstructorToTable<SS<Type> >           \
+            ddtScheme<Type>::addIstreamConstructorToTable<SS<Type>>            \
                 add##SS##Type##IstreamConstructorToTable_;                     \
         }                                                                      \
     }
@@ -288,7 +288,7 @@ tmp<surfaceScalarField> SS<scalar>::fvcDdtUfCorr                               \
     const surfaceScalarField& Uf                                               \
 )                                                                              \
 {                                                                              \
-    NotImplemented;                               \
+    NotImplemented;                                                            \
     return surfaceScalarField::null();                                         \
 }                                                                              \
                                                                                \
@@ -299,7 +299,7 @@ tmp<surfaceScalarField> SS<scalar>::fvcDdtPhiCorr                              \
     const surfaceScalarField& phi                                              \
 )                                                                              \
 {                                                                              \
-    NotImplemented;                              \
+    NotImplemented;                                                            \
     return surfaceScalarField::null();                                         \
 }                                                                              \
                                                                                \
@@ -311,7 +311,7 @@ tmp<surfaceScalarField> SS<scalar>::fvcDdtUfCorr                               \
     const surfaceScalarField& Uf                                               \
 )                                                                              \
 {                                                                              \
-    NotImplemented;                               \
+    NotImplemented;                                                            \
     return surfaceScalarField::null();                                         \
 }                                                                              \
                                                                                \
@@ -323,7 +323,7 @@ tmp<surfaceScalarField> SS<scalar>::fvcDdtPhiCorr                              \
     const surfaceScalarField& phi                                              \
 )                                                                              \
 {                                                                              \
-    NotImplemented;                              \
+    NotImplemented;                                                            \
     return surfaceScalarField::null();                                         \
 }                                                                              \
                                                                                \
@@ -334,7 +334,7 @@ tmp<surfaceScalarField> SS<scalar>::fvcDdtPhiCorr                              \
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ddtScheme.C"
+    #include "ddtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C
index e18f10c95ca76651772807c6cfebc88133fda10d..da4c454a506c4afd4ddf2143e6202897eb52fc34 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ const volScalarField& localEulerDdtScheme<Type>::localRDeltaT() const
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 localEulerDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
@@ -64,7 +64,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tdtdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -74,12 +74,12 @@ localEulerDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 )
             )
         );
 
-        tdtdt().internalField() =
+        tdtdt.ref().internalField() =
             rDeltaT.internalField()*dt.value()
            *(1.0 - mesh().Vsc0()/mesh().Vsc());
 
@@ -87,7 +87,7 @@ localEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -97,7 +97,7 @@ localEulerDdtScheme<Type>::fvcDdt
                 (
                     "0",
                     dt.dimensions()/dimTime,
-                    pTraits<Type>::zero
+                    Zero
                 ),
                 calculatedFvPatchField<Type>::typeName
             )
@@ -107,7 +107,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 localEulerDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -124,7 +124,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -145,7 +145,7 @@ localEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -158,7 +158,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 localEulerDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
@@ -176,7 +176,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -197,7 +197,7 @@ localEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -210,7 +210,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 localEulerDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
@@ -228,7 +228,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -252,7 +252,7 @@ localEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -265,7 +265,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 localEulerDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -284,7 +284,7 @@ localEulerDdtScheme<Type>::fvcDdt
 
     if (mesh().moving())
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -317,7 +317,7 @@ localEulerDdtScheme<Type>::fvcDdt
     }
     else
     {
-        return tmp<GeometricField<Type, fvPatchField, volMesh> >
+        return tmp<GeometricField<Type, fvPatchField, volMesh>>
         (
             new GeometricField<Type, fvPatchField, volMesh>
             (
@@ -334,13 +334,13 @@ localEulerDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 localEulerDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -349,7 +349,7 @@ localEulerDdtScheme<Type>::fvmDdt
         )
     );
 
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     const scalarField& rDeltaT = localRDeltaT().internalField();
 
@@ -369,14 +369,14 @@ localEulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 localEulerDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -384,7 +384,7 @@ localEulerDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     const scalarField& rDeltaT = localRDeltaT().internalField();
 
@@ -406,14 +406,14 @@ localEulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 localEulerDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -421,7 +421,7 @@ localEulerDdtScheme<Type>::fvmDdt
             rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     const scalarField& rDeltaT = localRDeltaT().internalField();
 
@@ -445,7 +445,7 @@ localEulerDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 localEulerDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -453,7 +453,7 @@ localEulerDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -461,7 +461,7 @@ localEulerDdtScheme<Type>::fvmDdt
             alpha.dimensions()*rho.dimensions()*vf.dimensions()*dimVol/dimTime
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     const scalarField& rDeltaT = localRDeltaT().internalField();
 
@@ -496,9 +496,10 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
 {
     const surfaceScalarField rDeltaT(fvc::interpolate(localRDeltaT()));
 
+    fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
     fluxFieldType phiCorr
     (
-        mesh().Sf() & (Uf.oldTime() - fvc::interpolate(U.oldTime()))
+        phiUf0 - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -511,12 +512,7 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
                 mesh().time().timeName(),
                 mesh()
             ),
-            this->fvcDdtPhiCoeff
-            (
-                U.oldTime(),
-                (mesh().Sf() & Uf.oldTime()),
-                phiCorr
-            )
+            this->fvcDdtPhiCoeff(U.oldTime(), phiUf0, phiCorr)
            *rDeltaT*phiCorr
         )
     );
@@ -535,7 +531,7 @@ localEulerDdtScheme<Type>::fvcDdtPhiCorr
 
     fluxFieldType phiCorr
     (
-        phi.oldTime() - (mesh().Sf() & fvc::interpolate(U.oldTime()))
+        phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), U.oldTime())
     );
 
     return tmp<fluxFieldType>
@@ -577,10 +573,8 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
             rho.oldTime()*U.oldTime()
         );
 
-        fluxFieldType phiCorr
-        (
-            mesh().Sf() & (Uf.oldTime() - fvc::interpolate(rhoU0))
-        );
+        fluxFieldType phiUf0(mesh().Sf() & Uf.oldTime());
+        fluxFieldType phiCorr(phiUf0 - fvc::dotInterpolate(mesh().Sf(), rhoU0));
 
         return tmp<fluxFieldType>
         (
@@ -593,13 +587,7 @@ localEulerDdtScheme<Type>::fvcDdtUfCorr
                     mesh().time().timeName(),
                     mesh()
                 ),
-                this->fvcDdtPhiCoeff
-                (
-                    rhoU0,
-                    mesh().Sf() & Uf.oldTime(),
-                    phiCorr
-                )
-               *rDeltaT*phiCorr
+                this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr)*rDeltaT*phiCorr
             )
         );
     }
@@ -646,7 +634,7 @@ localEulerDdtScheme<Type>::fvcDdtPhiCorr
 
         fluxFieldType phiCorr
         (
-            phi.oldTime() - (mesh().Sf() & fvc::interpolate(rhoU0))
+            phi.oldTime() - fvc::dotInterpolate(mesh().Sf(), rhoU0)
         );
 
         return tmp<fluxFieldType>
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H
index b28227939fcbb3e5c842ebe0839f30fbc89848b7..5ea0b2127f3124c9735b2d65fa20e44cb145ee2c 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -149,53 +149,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -279,7 +279,7 @@ tmp<surfaceScalarField> localEulerDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "localEulerDdtScheme.C"
+    #include "localEulerDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C
index 3e2ec1350af184fbe2d27381c04991038be2ab93..790d189bc3b51f1516f497f1862d0d2a0670f518 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,13 +40,13 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateDdtScheme<Type>::fvcDdt
 (
     const dimensioned<Type>& dt
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -61,7 +61,7 @@ steadyStateDdtScheme<Type>::fvcDdt
             (
                 "0",
                 dt.dimensions()/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -69,13 +69,13 @@ steadyStateDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateDdtScheme<Type>::fvcDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -90,7 +90,7 @@ steadyStateDdtScheme<Type>::fvcDdt
             (
                 "0",
                 vf.dimensions()/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -98,14 +98,14 @@ steadyStateDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateDdtScheme<Type>::fvcDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -120,7 +120,7 @@ steadyStateDdtScheme<Type>::fvcDdt
             (
                 "0",
                 rho.dimensions()*vf.dimensions()/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -128,14 +128,14 @@ steadyStateDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateDdtScheme<Type>::fvcDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -150,7 +150,7 @@ steadyStateDdtScheme<Type>::fvcDdt
             (
                 "0",
                 rho.dimensions()*vf.dimensions()/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -158,7 +158,7 @@ steadyStateDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 steadyStateDdtScheme<Type>::fvcDdt
 (
     const volScalarField& alpha,
@@ -166,7 +166,7 @@ steadyStateDdtScheme<Type>::fvcDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -181,7 +181,7 @@ steadyStateDdtScheme<Type>::fvcDdt
             (
                 "0",
                 rho.dimensions()*vf.dimensions()/dimTime,
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
@@ -189,13 +189,13 @@ steadyStateDdtScheme<Type>::fvcDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateDdtScheme<Type>::fvmDdt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -209,14 +209,14 @@ steadyStateDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateDdtScheme<Type>::fvmDdt
 (
     const dimensionedScalar& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -230,14 +230,14 @@ steadyStateDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateDdtScheme<Type>::fvmDdt
 (
     const volScalarField& rho,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -251,7 +251,7 @@ steadyStateDdtScheme<Type>::fvmDdt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 steadyStateDdtScheme<Type>::fvmDdt
 (
     const volScalarField& alpha,
@@ -259,7 +259,7 @@ steadyStateDdtScheme<Type>::fvmDdt
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -295,7 +295,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr
             (
                 "0",
                 Uf.dimensions()*dimArea/dimTime,
-                pTraits<typename flux<Type>::type>::zero
+                Zero
             )
         )
     );
@@ -325,7 +325,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr
             (
                 "0",
                 phi.dimensions()/dimTime,
-                pTraits<typename flux<Type>::type>::zero
+                Zero
             )
         )
     );
@@ -358,7 +358,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr
             (
                 "0",
                 Uf.dimensions()*dimArea/dimTime,
-                pTraits<typename flux<Type>::type>::zero
+                Zero
             )
         )
     );
@@ -391,7 +391,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr
             (
                 "0",
                 phi.dimensions()/dimTime,
-                pTraits<typename flux<Type>::type>::zero
+                Zero
             )
         )
     );
diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H
index 7d990746f2edfb7fe1f771181e5e8fd89b89aa74..2f004cf994a0288affea7dbbb78007a98f998295 100644
--- a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H
+++ b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,53 +94,53 @@ public:
             return fv::ddtScheme<Type>::mesh();
         }
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensioned<Type>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDdt
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmDdt
+        tmp<fvMatrix<Type>> fvmDdt
         (
             const volScalarField& alpha,
             const volScalarField& rho,
@@ -224,7 +224,7 @@ tmp<surfaceScalarField> steadyStateDdtScheme<scalar>::fvcDdtPhiCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "steadyStateDdtScheme.C"
+    #include "steadyStateDdtScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C
index 59622c9dc47e61b253578c92f61f40f046893b56..17c042539ac4bf66a2251cd8e7c0f558d4b541af 100644
--- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C
+++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<divScheme<Type> > divScheme<Type>::New
+tmp<divScheme<Type>> divScheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -51,9 +51,7 @@ tmp<divScheme<Type> > divScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "divScheme<Type>::New(const fvMesh&, Istream&) : "
-               "constructing divScheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing divScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H
index 4032e2d5cf0cdc1d600c0196df1d5749379eaa66..add7bbccc9648b6e90a856bf4a64862ec2717c62 100644
--- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H
+++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ namespace fv
 template<class Type>
 class divScheme
 :
-    public refCount
+    public tmp<divScheme<Type>>::refCount
 {
 
 protected:
@@ -72,7 +72,7 @@ protected:
     // Protected data
 
         const fvMesh& mesh_;
-        tmp<surfaceInterpolationScheme<Type> > tinterpScheme_;
+        tmp<surfaceInterpolationScheme<Type>> tinterpScheme_;
 
 
     // Private Member Functions
@@ -122,7 +122,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new divScheme created on freestore
-        static tmp<divScheme<Type> > New
+        static tmp<divScheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
@@ -171,7 +171,7 @@ public:
     {                                                                          \
         namespace fv                                                           \
         {                                                                      \
-            divScheme<Type>::addIstreamConstructorToTable<SS<Type> >           \
+            divScheme<Type>::addIstreamConstructorToTable<SS<Type>>            \
                 add##SS##Type##IstreamConstructorToTable_;                     \
         }                                                                      \
     }
@@ -187,7 +187,7 @@ makeFvDivTypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "divScheme.C"
+    #include "divScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.C b/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.C
index 8d445b2f77e899e24ed10e07b6297a81f829a4db..308f0daff744b8b400c4372af3fd46092527998f 100644
--- a/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.C
+++ b/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,11 +58,11 @@ gaussDivScheme<Type>::fvcDiv
     (
         fvc::surfaceIntegrate
         (
-            this->mesh_.Sf() & this->tinterpScheme_().interpolate(vf)
+            this->tinterpScheme_().dotInterpolate(this->mesh_.Sf(), vf)
         )
     );
 
-    tDiv().rename("div(" + vf.name() + ')');
+    tDiv.ref().rename("div(" + vf.name() + ')');
 
     return tDiv;
 }
diff --git a/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.H b/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.H
index 34b444437d1c22d8801d6d8f6add51844b8449f9..b2d42395a1521596ce32b5d2ad29295d6a9d199e 100644
--- a/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.H
+++ b/src/finiteVolume/finiteVolume/divSchemes/gaussDivScheme/gaussDivScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gaussDivScheme.C"
+    #include "gaussDivScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcAverage.C b/src/finiteVolume/finiteVolume/fvc/fvcAverage.C
index c6daac12d2f1a5e45c60daa568fa18251f0237a8..711a012f661bdd7c0a1ec5a37b3790cd45dad893 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcAverage.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcAverage.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 average
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf
@@ -49,7 +49,7 @@ average
 {
     const fvMesh& mesh = ssf.mesh();
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > taverage
+    tmp<GeometricField<Type, fvPatchField, volMesh>> taverage
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -65,8 +65,7 @@ average
             ssf.dimensions()
         )
     );
-
-    GeometricField<Type, fvPatchField, volMesh>& av = taverage();
+    GeometricField<Type, fvPatchField, volMesh>& av = taverage.ref();
 
     av.internalField() =
     (
@@ -89,13 +88,13 @@ average
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 average
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > taverage
+    tmp<GeometricField<Type, fvPatchField, volMesh>> taverage
     (
         fvc::average(tssf())
     );
@@ -105,7 +104,7 @@ average
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 average
 (
     const GeometricField<Type, fvPatchField, volMesh>& vtf
@@ -116,13 +115,13 @@ average
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 average
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvtf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvtf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > taverage
+    tmp<GeometricField<Type, fvPatchField, volMesh>> taverage
     (
         fvc::average(tvtf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcAverage.H b/src/finiteVolume/finiteVolume/fvc/fvcAverage.H
index e8831f1eb238d05654785c9fb8736a70d17aa387..3bea8d32a44816c374c05adb29cb86ae0268cb63 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcAverage.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcAverage.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,31 +52,31 @@ namespace fvc
 {
     //- Area-weighted average a surfaceField creating a volField
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > average
+    tmp<GeometricField<Type, fvPatchField, volMesh>> average
     (
         const GeometricField<Type, fvsPatchField, surfaceMesh>&
     );
 
     //- Area-weighted average a surfaceField creating a volField
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > average
+    tmp<GeometricField<Type, fvPatchField, volMesh>> average
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&
     );
 
 
     //- Area-weighted average a surfaceField creating a volField
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > average
+    tmp<GeometricField<Type, fvPatchField, volMesh>> average
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     //- Area-weighted average a surfaceField creating a volField
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > average
+    tmp<GeometricField<Type, fvPatchField, volMesh>> average
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -88,7 +88,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcAverage.C"
+    #include "fvcAverage.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C
index 7d8294b1e68c796c4c51f78a79766c6d3965a333..8153630ea5a94c308119b6fddd883c0918eeaca9 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,7 +27,7 @@ License
 #include "fvMesh.H"
 #include "volFields.H"
 #include "surfaceFields.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -42,7 +42,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class CombineOp>
-tmp<GeometricField<Type, fvPatchField, volMesh> > cellReduce
+tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf,
     const CombineOp& cop,
@@ -67,11 +67,11 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > cellReduce
             ),
             mesh,
             dimensioned<Type>("initialValue", ssf.dimensions(), nullValue),
-            zeroGradientFvPatchField<Type>::typeName
+            extrapolatedCalculatedFvPatchField<Type>::typeName
         )
     );
 
-    volFieldType& result = tresult();
+    volFieldType& result = tresult.ref();
 
     const labelUList& own = mesh.owner();
     const labelUList& nbr = mesh.neighbour();
@@ -108,17 +108,18 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > cellReduce
 
 
 template<class Type, class CombineOp>
-tmp<GeometricField<Type, fvPatchField, volMesh> > cellReduce
+tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
 (
     const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>&> tssf,
     const CombineOp& cop,
     const Type& nullValue
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> >
+    tmp<GeometricField<Type, fvPatchField, volMesh>>
         tvf(cellReduce(cop, tssf, nullValue));
 
     tssf.clear();
+
     return tvf;
 }
 
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.H b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.H
index d355fd4a51bf9f6c0ea5f4dddc6b0ce3c44fdf29..969d08600148be6d890a99e03827a15d4b0bf3d7 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,19 +50,19 @@ namespace Foam
 namespace fvc
 {
     template<class Type, class CombineOp>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > cellReduce
+    tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
     (
         const GeometricField<Type, fvsPatchField, surfaceMesh>&,
         const CombineOp& cop,
-        const Type& nullValue = pTraits<Type>::zero
+        const Type& nullValue = Type(Zero)
     );
 
     template<class Type, class CombineOp>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > cellReduce
+    tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&,
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&,
         const CombineOp& cop,
-        const Type& nullValue = pTraits<Type>::zero
+        const Type& nullValue = Type(Zero)
     );
 }
 
@@ -74,7 +74,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcCellReduce.C"
+    #include "fvcCellReduce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCurl.C b/src/finiteVolume/finiteVolume/fvc/fvcCurl.C
index e89d08d1e5559ee45233c1cd4c2968865374eb17..1ec6024fb9b41db8fdd1eab0be532ab787edbdb3 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcCurl.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcCurl.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 curl
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -49,27 +49,27 @@ curl
     word nameCurlVf = "curl(" + vf.name() + ')';
 
     // Gausses theorem curl
-    // tmp<GeometricField<Type, fvPatchField, volMesh> > tcurlVf =
+    // tmp<GeometricField<Type, fvPatchField, volMesh>> tcurlVf =
     //     fvc::surfaceIntegrate(vf.mesh().Sf() ^ fvc::interpolate(vf));
 
     // Calculate curl as the Hodge dual of the skew-symmetric part of grad
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tcurlVf =
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tcurlVf =
         2.0*(*skew(fvc::grad(vf, nameCurlVf)));
 
-    tcurlVf().rename(nameCurlVf);
+    tcurlVf.ref().rename(nameCurlVf);
 
     return tcurlVf;
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 curl
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Curl(fvc::curl(tvf()));
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Curl(fvc::curl(tvf()));
     tvf.clear();
     return Curl;
 }
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCurl.H b/src/finiteVolume/finiteVolume/fvc/fvcCurl.H
index 2a4aeb4ac9e8897ff62f2cccebddf7e7568b191f..210e08d444977f40ca370ce29fc8150e0ec56a87 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcCurl.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcCurl.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,15 +51,15 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > curl
+    tmp<GeometricField<Type, fvPatchField, volMesh>> curl
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > curl
+    tmp<GeometricField<Type, fvPatchField, volMesh>> curl
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -71,7 +71,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcCurl.C"
+    #include "fvcCurl.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.C b/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.C
index 46068fdd43534b9bd7e3907c46390c920dfc8129..7468f4bae7727f024c6cb58a34e56664a2cb62c3 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 d2dt2
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -55,7 +55,7 @@ d2dt2
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 d2dt2
 (
     const volScalarField& rho,
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.H b/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.H
index 6fd6f651d687ef147126aa0575271c01ae5d0bdf..9d01ba787c7053ea824b021ccc46b194c93e24ee 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcD2dt2.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,13 +50,13 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > d2dt2
+    tmp<GeometricField<Type, fvPatchField, volMesh>> d2dt2
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > d2dt2
+    tmp<GeometricField<Type, fvPatchField, volMesh>> d2dt2
     (
         const volScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -71,7 +71,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcD2dt2.C"
+    #include "fvcD2dt2.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDDt.C b/src/finiteVolume/finiteVolume/fvc/fvcDDt.C
index 29bea9d9112b0b713f96d561a655eb81ac357376..6b507d87f5c0db9d33b8159526567157e9919925 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcDDt.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcDDt.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,14 +40,14 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 DDt
 (
     const surfaceScalarField& phi,
     const GeometricField<Type, fvPatchField, volMesh>& psi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddtDivPhiPsi
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddtDivPhiPsi
         = fvc::ddt(psi) + fvc::div(phi, psi);
 
     if (phi.mesh().moving())
@@ -62,14 +62,14 @@ DDt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 DDt
 (
     const tmp<surfaceScalarField>& tphi,
     const GeometricField<Type, fvPatchField, volMesh>& psi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > DDtPsi
+    tmp<GeometricField<Type, fvPatchField, volMesh>> DDtPsi
     (
         fvc::DDt(tphi(), psi)
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDDt.H b/src/finiteVolume/finiteVolume/fvc/fvcDDt.H
index bdeec0ea070cfa0dbd091457a08c75e4b4e36a5a..67a77dbbf13f1040a679296dae243ebb8ced1511 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcDDt.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcDDt.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,14 +51,14 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > DDt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> DDt
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > DDt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> DDt
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -73,7 +73,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcDDt.C"
+    #include "fvcDDt.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDdt.C b/src/finiteVolume/finiteVolume/fvc/fvcDdt.C
index e300c072d4941c79ad52492121e91909c296c85c..391da38be341ef0760a8d700941eef98c7ebad19 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcDdt.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcDdt.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const dimensioned<Type> dt,
@@ -51,12 +51,12 @@ ddt
     (
         mesh,
         mesh.ddtScheme("ddt(" + dt.name() + ')')
-    )().fvcDdt(dt);
+    ).ref().fvcDdt(dt);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -66,12 +66,12 @@ ddt
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
-    )().fvcDdt(vf);
+    ).ref().fvcDdt(vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const dimensionedScalar& rho,
@@ -82,12 +82,12 @@ ddt
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
-    )().fvcDdt(rho, vf);
+    ).ref().fvcDdt(rho, vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const volScalarField& rho,
@@ -98,12 +98,12 @@ ddt
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
-    )().fvcDdt(rho, vf);
+    ).ref().fvcDdt(rho, vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const volScalarField& alpha,
@@ -121,12 +121,12 @@ ddt
           + rho.name() + ','
           + vf.name() + ')'
         )
-    )().fvcDdt(alpha, rho, vf);
+    ).ref().fvcDdt(alpha, rho, vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const one&,
@@ -138,7 +138,7 @@ ddt
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 ddt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
@@ -150,7 +150,7 @@ ddt
 
 
 template<class Type>
-tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh>>
 ddtCorr
 (
     const GeometricField<Type, fvPatchField, volMesh>& U,
@@ -161,12 +161,12 @@ ddtCorr
     (
         U.mesh(),
         U.mesh().ddtScheme("ddt(" + U.name() + ')')
-    )().fvcDdtUfCorr(U, Uf);
+    ).ref().fvcDdtUfCorr(U, Uf);
 }
 
 
 template<class Type>
-tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh>>
 ddtCorr
 (
     const GeometricField<Type, fvPatchField, volMesh>& U,
@@ -182,12 +182,12 @@ ddtCorr
     (
         U.mesh(),
         U.mesh().ddtScheme("ddt(" + U.name() + ')')
-    )().fvcDdtPhiCorr(U, phi);
+    ).ref().fvcDdtPhiCorr(U, phi);
 }
 
 
 template<class Type>
-tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh>>
 ddtCorr
 (
     const volScalarField& rho,
@@ -199,12 +199,12 @@ ddtCorr
     (
         U.mesh(),
         U.mesh().ddtScheme("ddt(" + U.name() + ')')
-    )().fvcDdtUfCorr(rho, U, Uf);
+    ).ref().fvcDdtUfCorr(rho, U, Uf);
 }
 
 
 template<class Type>
-tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<typename flux<Type>::type, fvsPatchField, surfaceMesh>>
 ddtCorr
 (
     const volScalarField& rho,
@@ -221,7 +221,7 @@ ddtCorr
     (
         U.mesh(),
         U.mesh().ddtScheme("ddt(" + rho.name() + ',' + U.name() + ')')
-    )().fvcDdtPhiCorr(rho, U, phi);
+    ).ref().fvcDdtPhiCorr(rho, U, phi);
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDdt.H b/src/finiteVolume/finiteVolume/fvc/fvcDdt.H
index 1f7047cdec7fee4f030b33c8d4014fde99d4a12d..c164445ebf4e743e3a3e2e57e7ac486fe9b9ccfc 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcDdt.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcDdt.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,34 +54,34 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const dimensioned<Type>,
         const fvMesh&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const dimensionedScalar&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const volScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const volScalarField&,
         const volScalarField&,
@@ -89,14 +89,14 @@ namespace fvc
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const one&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ddt
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ddt
     (
         const GeometricField<Type, fvPatchField, volMesh>&,
         const one&
@@ -196,7 +196,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcDdt.C"
+    #include "fvcDdt.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDiv.C b/src/finiteVolume/finiteVolume/fvc/fvcDiv.C
index 7734495d95070a6256dda8eaffd9755cb1bec40f..888e394dfac5dbd2ff6d9d8fa4e7a19aa22d7405 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcDiv.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcDiv.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,13 +42,13 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf
 )
 {
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -60,13 +60,13 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div(fvc::div(tssf()));
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div(fvc::div(tssf()));
     tssf.clear();
     return Div;
 }
@@ -89,7 +89,7 @@ div
     return fv::divScheme<Type>::New
     (
         vf.mesh(), vf.mesh().divScheme(name)
-    )().fvcDiv(vf);
+    ).ref().fvcDiv(vf);
 }
 
 
@@ -103,12 +103,12 @@ tmp
 >
 div
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvvf,
     const word& name
 )
 {
     typedef typename innerProduct<vector, Type>::type DivType;
-    tmp<GeometricField<DivType, fvPatchField, volMesh> > Div
+    tmp<GeometricField<DivType, fvPatchField, volMesh>> Div
     (
         fvc::div(tvvf(), name)
     );
@@ -143,18 +143,18 @@ tmp
 >
 div
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvvf
 )
 {
     typedef typename innerProduct<vector, Type>::type DivType;
-    tmp<GeometricField<DivType, fvPatchField, volMesh> > Div(fvc::div(tvvf()));
+    tmp<GeometricField<DivType, fvPatchField, volMesh>> Div(fvc::div(tvvf()));
     tvvf.clear();
     return Div;
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const surfaceScalarField& flux,
@@ -167,12 +167,12 @@ div
         vf.mesh(),
         flux,
         vf.mesh().divScheme(name)
-    )().fvcDiv(flux, vf);
+    ).ref().fvcDiv(flux, vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const tmp<surfaceScalarField>& tflux,
@@ -180,7 +180,7 @@ div
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div
     (
         fvc::div(tflux(), vf, name)
     );
@@ -190,15 +190,15 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const surfaceScalarField& flux,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div
     (
         fvc::div(flux, tvf(), name)
     );
@@ -208,15 +208,15 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const tmp<surfaceScalarField>& tflux,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div
     (
         fvc::div(tflux(), tvf(), name)
     );
@@ -227,7 +227,7 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const surfaceScalarField& flux,
@@ -242,14 +242,14 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const tmp<surfaceScalarField>& tflux,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div
     (
         fvc::div(tflux(), vf)
     );
@@ -259,14 +259,14 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const surfaceScalarField& flux,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div
     (
         fvc::div(flux, tvf())
     );
@@ -276,14 +276,14 @@ div
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 div
 (
     const tmp<surfaceScalarField>& tflux,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Div
     (
         fvc::div(tflux(), tvf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcDiv.H b/src/finiteVolume/finiteVolume/fvc/fvcDiv.H
index 8843500dee142bf55d671d891e09466c04680278..868d141f59e10a5e1ace7107d09c53bd63e8dff9 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcDiv.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcDiv.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,15 +51,15 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const GeometricField<Type, fvsPatchField, surfaceMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&
     );
 
 
@@ -81,7 +81,7 @@ namespace fvc
         <typename innerProduct<vector, Type>::type, fvPatchField, volMesh>
     > div
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
@@ -103,12 +103,12 @@ namespace fvc
         <typename innerProduct<vector, Type>::type, fvPatchField, volMesh>
     > div
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -116,7 +116,7 @@ namespace fvc
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -124,48 +124,48 @@ namespace fvc
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const surfaceScalarField&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const tmp<surfaceScalarField>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const surfaceScalarField&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > div
+    tmp<GeometricField<Type, fvPatchField, volMesh>> div
     (
         const tmp<surfaceScalarField>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -177,7 +177,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcDiv.C"
+    #include "fvcDiv.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcFlux.C b/src/finiteVolume/finiteVolume/fvc/fvcFlux.C
index 6cd3b0ad543770513e7efb3394b35cca58f73871..b1bf586e668ed53500b95cf0277c702f021327a5 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcFlux.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcFlux.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,167 +24,32 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "fvcFlux.H"
-#include "fvMesh.H"
-#include "convectionScheme.H"
+#include "surfaceInterpolate.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace fvc
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
-(
-    const surfaceScalarField& phi,
-    const GeometricField<Type, fvPatchField, volMesh>& vf,
-    const word& name
-)
-{
-    return fv::convectionScheme<Type>::New
-    (
-        vf.mesh(),
-        phi,
-        vf.mesh().divScheme(name)
-    )().flux(phi, vf);
-}
-
-
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
-(
-    const tmp<surfaceScalarField>& tphi,
-    const GeometricField<Type, fvPatchField, volMesh>& vf,
-    const word& name
-)
-{
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
-    (
-        fvc::flux(tphi(), vf, name)
-    );
-    tphi.clear();
-    return Flux;
-}
-
-
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
-(
-    const surfaceScalarField& phi,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
-    const word& name
-)
-{
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
-    (
-        fvc::flux(phi, tvf(), name)
-    );
-    tvf.clear();
-    return Flux;
-}
-
-
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
+Foam::tmp<Foam::surfaceScalarField> Foam::fvc::flux
 (
-    const tmp<surfaceScalarField>& tphi,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
-    const word& name
+    const volVectorField& vvf
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
+    return scheme<vector>
     (
-        fvc::flux(tphi(), tvf(), name)
-    );
-    tphi.clear();
-    tvf.clear();
-    return Flux;
-}
-
-
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
-(
-    const surfaceScalarField& phi,
-    const GeometricField<Type, fvPatchField, volMesh>& vf
-)
-{
-    return fvc::flux
-    (
-        phi, vf, "flux("+phi.name()+','+vf.name()+')'
-    );
+        vvf.mesh(),
+        "flux(" + vvf.name() + ')'
+    )().dotInterpolate(vvf.mesh().Sf(), vvf);
 }
 
 
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
+Foam::tmp<Foam::surfaceScalarField> Foam::fvc::flux
 (
-    const tmp<surfaceScalarField>& tphi,
-    const GeometricField<Type, fvPatchField, volMesh>& vf
+    const tmp<volVectorField>& tvvf
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
-    (
-        fvc::flux(tphi(), vf)
-    );
-    tphi.clear();
+    tmp<surfaceScalarField> Flux(fvc::flux(tvvf()));
+    tvvf.clear();
     return Flux;
 }
 
 
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
-(
-    const surfaceScalarField& phi,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
-)
-{
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
-    (
-        fvc::flux(phi, tvf())
-    );
-    tvf.clear();
-    return Flux;
-}
-
-
-template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-flux
-(
-    const tmp<surfaceScalarField>& tphi,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
-)
-{
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
-    (
-        fvc::flux(tphi(), tvf())
-    );
-    tphi.clear();
-    tvf.clear();
-    return Flux;
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace fvc
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcFlux.H b/src/finiteVolume/finiteVolume/fvc/fvcFlux.H
index b7a6e21fef069cc4e5f94fff493c55d96c90691e..e62dcec0cb9c89d30a9fdf4781fb806db956ca50 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcFlux.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcFlux.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,8 +50,21 @@ namespace Foam
 
 namespace fvc
 {
+    //- Return the face-flux field obtained from the given volVectorField
+    tmp<surfaceScalarField> flux(const volVectorField& vvf);
+
+    //- Return the face-flux field obtained from the given tmp volVectorField
+    tmp<surfaceScalarField> flux(const tmp<volVectorField>& tvvf);
+
+    template<class Type>
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
+    (
+        const surfaceScalarField&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
+    );
+
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -59,7 +72,7 @@ namespace fvc
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -67,48 +80,48 @@ namespace fvc
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const surfaceScalarField&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const tmp<surfaceScalarField>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const surfaceScalarField&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> flux
     (
         const tmp<surfaceScalarField>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -120,7 +133,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcFlux.C"
+    #include "fvcFluxTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcFluxTemplates.C b/src/finiteVolume/finiteVolume/fvc/fvcFluxTemplates.C
new file mode 100644
index 0000000000000000000000000000000000000000..ab9c346e3fe8f2641cbd91fb70f121171f8b74d1
--- /dev/null
+++ b/src/finiteVolume/finiteVolume/fvc/fvcFluxTemplates.C
@@ -0,0 +1,190 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "fvcFlux.H"
+#include "fvMesh.H"
+#include "convectionScheme.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace fvc
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const surfaceScalarField& phi,
+    const GeometricField<Type, fvPatchField, volMesh>& vf,
+    const word& name
+)
+{
+    return fv::convectionScheme<Type>::New
+    (
+        vf.mesh(),
+        phi,
+        vf.mesh().divScheme(name)
+    )().flux(phi, vf);
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const tmp<surfaceScalarField>& tphi,
+    const GeometricField<Type, fvPatchField, volMesh>& vf,
+    const word& name
+)
+{
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
+    (
+        fvc::flux(tphi(), vf, name)
+    );
+    tphi.clear();
+    return Flux;
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const surfaceScalarField& phi,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
+    const word& name
+)
+{
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
+    (
+        fvc::flux(phi, tvf(), name)
+    );
+    tvf.clear();
+    return Flux;
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const tmp<surfaceScalarField>& tphi,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
+    const word& name
+)
+{
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
+    (
+        fvc::flux(tphi(), tvf(), name)
+    );
+    tphi.clear();
+    tvf.clear();
+    return Flux;
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const surfaceScalarField& phi,
+    const GeometricField<Type, fvPatchField, volMesh>& vf
+)
+{
+    return fvc::flux
+    (
+        phi, vf, "flux("+phi.name()+','+vf.name()+')'
+    );
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const tmp<surfaceScalarField>& tphi,
+    const GeometricField<Type, fvPatchField, volMesh>& vf
+)
+{
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
+    (
+        fvc::flux(tphi(), vf)
+    );
+    tphi.clear();
+    return Flux;
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const surfaceScalarField& phi,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
+)
+{
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
+    (
+        fvc::flux(phi, tvf())
+    );
+    tvf.clear();
+    return Flux;
+}
+
+
+template<class Type>
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+flux
+(
+    const tmp<surfaceScalarField>& tphi,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
+)
+{
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> Flux
+    (
+        fvc::flux(tphi(), tvf())
+    );
+    tphi.clear();
+    tvf.clear();
+    return Flux;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace fvc
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcGrad.C b/src/finiteVolume/finiteVolume/fvc/fvcGrad.C
index 41a0d495e815aa0d6b01d685f31353aa19b525f7..23e36f6c5140739487102b2a2bc62a8631f7ab9c 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcGrad.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,11 +67,11 @@ tmp
 >
 grad
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
     typedef typename outerProduct<vector, Type>::type GradType;
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > Grad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> Grad
     (
         fvc::grad(tssf())
     );
@@ -112,7 +112,7 @@ tmp
 >
 grad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
@@ -158,11 +158,11 @@ tmp
 >
 grad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
     typedef typename outerProduct<vector, Type>::type GradType;
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > Grad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> Grad
     (
         fvc::grad(tvf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcGrad.H b/src/finiteVolume/finiteVolume/fvc/fvcGrad.H
index 583dacfdc91df826b73b7540bdf78c6d9b873e04..21528f0e7037d308fa64531d1790a9fb4079f6a8 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcGrad.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ namespace fvc
         <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
     > grad
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&
     );
 
     template<class Type>
@@ -88,7 +88,7 @@ namespace fvc
         <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
     > grad
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
@@ -109,7 +109,7 @@ namespace fvc
         <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
     > grad
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -121,7 +121,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcGrad.C"
+    #include "fvcGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.C b/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.C
index 41231d8bd74f6360e100bc6d6e623b8fa101213d..56b94907daac36114dc590731b41c51554ca88a8 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
@@ -51,19 +51,19 @@ laplacian
     (
         vf.mesh(),
         vf.mesh().laplacianScheme(name)
-    )().fvcLaplacian(vf);
+    ).ref().fvcLaplacian(vf);
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tvf(), name)
     );
@@ -73,7 +73,7 @@ laplacian
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -84,13 +84,13 @@ laplacian
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tvf())
     );
@@ -102,7 +102,7 @@ laplacian
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const dimensioned<GType>& gamma,
@@ -128,15 +128,15 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const dimensioned<GType>& gamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(gamma, tvf(), name)
     );
@@ -146,7 +146,7 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const dimensioned<GType>& gamma,
@@ -171,14 +171,14 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const dimensioned<GType>& gamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(gamma, tvf())
     );
@@ -190,7 +190,7 @@ laplacian
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
@@ -202,20 +202,20 @@ laplacian
     (
         vf.mesh(),
         vf.mesh().laplacianScheme(name)
-    )().fvcLaplacian(gamma, vf);
+    ).ref().fvcLaplacian(gamma, vf);
 }
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvPatchField, volMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tgamma(), vf, name)
     );
@@ -225,15 +225,15 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(gamma, tvf(), name)
     );
@@ -243,15 +243,15 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<GType, fvPatchField, volMesh>>& tgamma,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tgamma(), tvf(), name)
     );
@@ -262,7 +262,7 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
@@ -279,10 +279,10 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvPatchField, volMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
@@ -296,11 +296,11 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
     return fvc::laplacian
@@ -313,11 +313,11 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<GType, fvPatchField, volMesh>>& tgamma,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
     return fvc::laplacian
@@ -332,7 +332,7 @@ laplacian
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
@@ -344,20 +344,20 @@ laplacian
     (
         vf.mesh(),
         vf.mesh().laplacianScheme(name)
-    )().fvcLaplacian(gamma, vf);
+    ).ref().fvcLaplacian(gamma, vf);
 }
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tgamma(), vf, name)
     );
@@ -367,15 +367,15 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(gamma, tvf(), name)
     );
@@ -385,14 +385,14 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
 (
-    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>& tgamma,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tgamma(), tvf(), name)
     );
@@ -403,7 +403,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
@@ -420,14 +420,14 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tgamma(), vf)
     );
@@ -437,14 +437,14 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(gamma, tvf())
     );
@@ -454,13 +454,13 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
 (
-    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>& tgamma,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> Laplacian
     (
         fvc::laplacian(tgamma(), tvf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.H b/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.H
index dbe544e2f244f37a9095676beec31a64feb18b3b..4548ce48b7ea49d22c36b9bbca4e731f67d96805 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcLaplacian.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,34 +52,34 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const dimensioned<GType>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -87,30 +87,30 @@ namespace fvc
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const dimensioned<GType>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const dimensioned<GType>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const dimensioned<GType>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvPatchField, volMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -118,60 +118,60 @@ namespace fvc
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<GType, fvPatchField, volMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvPatchField, volMesh>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvPatchField, volMesh> >&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<GType, fvPatchField, volMesh>>&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvPatchField, volMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<GType, fvPatchField, volMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvPatchField, volMesh>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvPatchField, volMesh> >&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<GType, fvPatchField, volMesh>>&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvsPatchField, surfaceMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -179,55 +179,55 @@ namespace fvc
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >&,
+        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvsPatchField, surfaceMesh>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvsPatchField, surfaceMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >&,
+        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
         const GeometricField<GType, fvsPatchField, surfaceMesh>&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
     template<class Type, class GType>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> laplacian
     (
-        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >&,
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -239,7 +239,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcLaplacian.C"
+    #include "fvcLaplacian.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.C b/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.C
index 329c14e2306f9223555d60d2d40e2d41401a3b8c..6def790f2eb06899d6c5987b6fade9e7e005f7e7 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,8 @@ tmp<volScalarField> magSqrGradGrad
     // Loop over other vector field components
     for (direction cmpt = 1; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        tMagSqrGradGrad() += magSqr(fvc::grad(fvc::grad(vf.component(cmpt))))();
+        tMagSqrGradGrad.ref() +=
+            magSqr(fvc::grad(fvc::grad(vf.component(cmpt))))();
     }
 
     return tMagSqrGradGrad;
@@ -64,7 +65,7 @@ template<class Type>
 tmp<volScalarField>
 magSqrGradGrad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
     tmp<volScalarField> tMagSqrGradGrad(fvc::magSqrGradGrad(tvf()));
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.H b/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.H
index 716827860594c0bf1e0801899dc0fe44f57a9ec2..010c17e26ccf174c7913e5d3bc435e7b4cbf019a 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcMagSqrGradGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ namespace fvc
     template<class Type>
     tmp<volScalarField> magSqrGradGrad
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -71,7 +71,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcMagSqrGradGrad.C"
+    #include "fvcMagSqrGradGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C b/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C
index 741321612c97fd5b16316b0ac3784ee7caef7d57..c7c38d79e84f758450fd81c7ab4fbdc4cd991394 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "fvcMeshPhi.H"
 #include "fvMesh.H"
 #include "ddtScheme.H"
+#include "surfaceInterpolate.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -38,7 +39,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
-    )().meshPhi(vf);
+    ).ref().meshPhi(vf);
 }
 
 
@@ -52,7 +53,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
-    )().meshPhi(vf);
+    ).ref().meshPhi(vf);
 }
 
 
@@ -66,7 +67,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
-    )().meshPhi(vf);
+    ).ref().meshPhi(vf);
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C
index 880bd7f72eeb87b4d29e6f44434c4d512f4753ae..32c8a51dda769fbe68617068856e7206ed239d64 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 #include "volFields.H"
 #include "surfaceFields.H"
 #include "fvcSurfaceIntegrate.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -61,7 +61,7 @@ reconstruct
 
     surfaceVectorField SfHat(mesh.Sf()/mesh.magSf());
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > treconField
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> treconField
     (
         new GeometricField<GradType, fvPatchField, volMesh>
         (
@@ -74,11 +74,11 @@ reconstruct
                 IOobject::NO_WRITE
             ),
             inv(surfaceSum(SfHat*mesh.Sf()))&surfaceSum(SfHat*ssf),
-            zeroGradientFvPatchField<GradType>::typeName
+            extrapolatedCalculatedFvPatchField<GradType>::typeName
         )
     );
 
-    treconField().correctBoundaryConditions();
+    treconField.ref().correctBoundaryConditions();
 
     return treconField;
 }
@@ -94,11 +94,11 @@ tmp
 >
 reconstruct
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
     typedef typename outerProduct<vector, Type>::type GradType;
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tvf
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tvf
     (
         fvc::reconstruct(tssf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.H b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.H
index 305e7ad8200dbe079d4ef2853fa19ce9b38483a9..47a140974e39d0c3bfe1288762363f50e843c3c4 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ namespace fvc
         <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
     > reconstruct
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&
     );
 
     tmp<volScalarField> reconstructMag(const surfaceScalarField&);
@@ -82,7 +82,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcReconstruct.C"
+    #include "fvcReconstruct.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C
index 63c03590ca9ae13b9a1e09500bc0be06569bd9cf..30d12abc4b8fc578b30766ecb474e398ae55291d 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,7 +27,7 @@ License
 #include "fvMesh.H"
 #include "volFields.H"
 #include "surfaceFields.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -72,11 +72,10 @@ tmp<volScalarField> reconstructMag(const surfaceScalarField& ssf)
                 ssf.dimensions()/dimArea,
                 scalar(0)
             ),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
-
-    scalarField& rf = treconField();
+    scalarField& rf = treconField.ref();
 
     forAll(owner, facei)
     {
@@ -109,7 +108,7 @@ tmp<volScalarField> reconstructMag(const surfaceScalarField& ssf)
 
     rf /= mesh.V();
 
-    treconField().correctBoundaryConditions();
+    treconField.ref().correctBoundaryConditions();
 
     return treconField;
 }
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C
index a399bf79fd33f5cc6f4b9b5c9ce9c1ff8eee2be0..f4e5bae45dac3fc55e8da70173cbebf02f8d84ae 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,7 @@ License
 
 #include "fvcReconstruct.H"
 #include "fvMesh.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -62,7 +62,7 @@ reconstruct
     const volVectorField& C = mesh.C();
     const surfaceVectorField& Cf = mesh.Cf();
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > treconField
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> treconField
     (
         new GeometricField<GradType, fvPatchField, volMesh>
         (
@@ -79,9 +79,9 @@ reconstruct
             (
                 "0",
                 ssf.dimensions()/dimArea,
-                pTraits<GradType>::zero
+                Zero
             ),
-            zeroGradientFvPatchField<GradType>::typeName
+            extrapolatedCalculatedFvPatchField<GradType>::typeName
         )
     );
 
@@ -131,11 +131,11 @@ tmp
 >
 reconstruct
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
     typedef typename outerProduct<vector, Type>::type GradType;
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tvf
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tvf
     (
         fvc::reconstruct(tssf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.C b/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.C
index 52d9386317dcc0a0084292fcf511ad8177ef8575..42a565586ad1236cf7b546c12d4aa05b26828d5e 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGrad
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
@@ -56,14 +56,14 @@ snGrad
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGrad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > SnGrad
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> SnGrad
     (
         fvc::snGrad(tvf(), name)
     );
@@ -73,7 +73,7 @@ snGrad
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGrad
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -84,13 +84,13 @@ snGrad
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGrad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > SnGrad
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> SnGrad
     (
         fvc::snGrad(tvf())
     );
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.H b/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.H
index 84e4e8a57c0fd40eb6a759f9a30b07285e17b286..61f85bd954162d5860433987e5368d318b1690a5 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSnGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,29 +51,29 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > snGrad
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> snGrad
     (
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word& name
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > snGrad
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> snGrad
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
         const word& name
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > snGrad
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> snGrad
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > snGrad
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> snGrad
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 }
 
@@ -85,7 +85,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcSnGrad.C"
+    #include "fvcSnGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSup.C b/src/finiteVolume/finiteVolume/fvc/fvcSup.C
index 67b0e11df72c60c635f68d21f1b39effab526393..dcc8f36d3c6f441bd27cd68420b4f77cff62049b 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSup.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSup.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 Su
 (
     const GeometricField<Type, fvPatchField, volMesh>& su,
@@ -50,10 +50,10 @@ Su
 }
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 Su
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
@@ -62,7 +62,7 @@ Su
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 Sp
 (
     const volScalarField& sp,
@@ -73,7 +73,7 @@ Sp
 }
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 Sp
 (
     const tmp<volScalarField>& tsp,
@@ -85,7 +85,7 @@ Sp
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 Sp
 (
     const dimensionedScalar& sp,
@@ -97,7 +97,7 @@ Sp
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SuSp
 (
     const volScalarField& sp,
@@ -108,7 +108,7 @@ SuSp
 }
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 SuSp
 (
     const tmp<volScalarField>& tsp,
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSup.H b/src/finiteVolume/finiteVolume/fvc/fvcSup.H
index 2958d676b952d6967190a910776f511b2c890a45..44b40e28bf23978627584f93b203b56974d8000a 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSup.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSup.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,16 +52,16 @@ namespace fvc
    // Explicit source
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > Su
+        tmp<GeometricField<Type, fvPatchField, volMesh>> Su
         (
             const GeometricField<Type, fvPatchField, volMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > Su
+        tmp<GeometricField<Type, fvPatchField, volMesh>> Su
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
@@ -69,14 +69,14 @@ namespace fvc
     // Implicit source
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > Sp
+        tmp<GeometricField<Type, fvPatchField, volMesh>> Sp
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > Sp
+        tmp<GeometricField<Type, fvPatchField, volMesh>> Sp
         (
             const tmp<volScalarField>&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -84,7 +84,7 @@ namespace fvc
 
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > Sp
+        tmp<GeometricField<Type, fvPatchField, volMesh>> Sp
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -94,14 +94,14 @@ namespace fvc
     // Implicit/Explicit source depending on sign of coefficient
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > SuSp
+        tmp<GeometricField<Type, fvPatchField, volMesh>> SuSp
         (
             const volScalarField&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > SuSp
+        tmp<GeometricField<Type, fvPatchField, volMesh>> SuSp
         (
             const tmp<volScalarField>&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -116,7 +116,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcSup.C"
+    #include "fvcSup.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C
index 669b1e46fdcef6215edc8a7e9c98e66109eb07b0..3ce8ab38ec6caa89c798bd5afffbe2bd717e31ac 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,7 @@ License
 
 #include "fvcSurfaceIntegrate.H"
 #include "fvMesh.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -77,7 +77,7 @@ void surfaceIntegrate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 surfaceIntegrate
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf
@@ -85,7 +85,7 @@ surfaceIntegrate
 {
     const fvMesh& mesh = ssf.mesh();
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tvf
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tvf
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -102,12 +102,12 @@ surfaceIntegrate
             (
                 "0",
                 ssf.dimensions()/dimVol,
-                pTraits<Type>::zero
+                Zero
             ),
-            zeroGradientFvPatchField<Type>::typeName
+            extrapolatedCalculatedFvPatchField<Type>::typeName
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
+    GeometricField<Type, fvPatchField, volMesh>& vf = tvf.ref();
 
     surfaceIntegrate(vf.internalField(), ssf);
     vf.correctBoundaryConditions();
@@ -117,13 +117,13 @@ surfaceIntegrate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 surfaceIntegrate
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tvf
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tvf
     (
         fvc::surfaceIntegrate(tssf())
     );
@@ -133,7 +133,7 @@ surfaceIntegrate
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 surfaceSum
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf
@@ -141,7 +141,7 @@ surfaceSum
 {
     const fvMesh& mesh = ssf.mesh();
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tvf
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tvf
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -154,11 +154,11 @@ surfaceSum
                 IOobject::NO_WRITE
             ),
             mesh,
-            dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero),
-            zeroGradientFvPatchField<Type>::typeName
+            dimensioned<Type>("0", ssf.dimensions(), Zero),
+            extrapolatedCalculatedFvPatchField<Type>::typeName
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
+    GeometricField<Type, fvPatchField, volMesh>& vf = tvf.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
@@ -189,12 +189,12 @@ surfaceSum
 
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > surfaceSum
+tmp<GeometricField<Type, fvPatchField, volMesh>> surfaceSum
 (
-    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >& tssf
+    const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>& tssf
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tvf = surfaceSum(tssf());
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tvf = surfaceSum(tssf());
     tssf.clear();
     return tvf;
 }
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.H b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.H
index 8036b220628409c7748c35cfa2564eb80fd3c6eb..c3efda91c5f92ad7251ec6fbc903249b061b00c4 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,29 +59,29 @@ namespace fvc
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> >
+    tmp<GeometricField<Type, fvPatchField, volMesh>>
     surfaceIntegrate
     (
         const GeometricField<Type, fvsPatchField, surfaceMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> >
+    tmp<GeometricField<Type, fvPatchField, volMesh>>
     surfaceIntegrate
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > surfaceSum
+    tmp<GeometricField<Type, fvPatchField, volMesh>> surfaceSum
     (
         const GeometricField<Type, fvsPatchField, surfaceMesh>&
     );
 
     template<class Type>
-    tmp<GeometricField<Type, fvPatchField, volMesh> > surfaceSum
+    tmp<GeometricField<Type, fvPatchField, volMesh>> surfaceSum
     (
-        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+        const tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>&
     );
 }
 
@@ -93,7 +93,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcSurfaceIntegrate.C"
+    #include "fvcSurfaceIntegrate.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.C b/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.C
index 783a20482e169e7aaaa552257569df2e5fa5a391..77dc81490213293234ddbc04173ae8e009af8d94 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.C
+++ b/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<Field<Type> >
+tmp<Field<Type>>
 volumeIntegrate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -51,30 +51,30 @@ volumeIntegrate
 
 
 template<class Type>
-tmp<Field<Type> >
+tmp<Field<Type>>
 volumeIntegrate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<Field<Type> > tvivf = tvf().mesh().V()*tvf().internalField();
+    tmp<Field<Type>> tvivf = tvf().mesh().V()*tvf().internalField();
     tvf.clear();
     return tvivf;
 }
 
 
 template<class Type>
-tmp<Field<Type> > volumeIntegrate(const DimensionedField<Type, volMesh>& df)
+tmp<Field<Type>> volumeIntegrate(const DimensionedField<Type, volMesh>& df)
 {
     return df.mesh().V()*df.field();
 }
 
 
 template<class Type>
-tmp<Field<Type> >
-volumeIntegrate(const tmp<DimensionedField<Type, volMesh> >& tdf)
+tmp<Field<Type>>
+volumeIntegrate(const tmp<DimensionedField<Type, volMesh>>& tdf)
 {
-    tmp<Field<Type> > tdidf = tdf().mesh().V()*tdf().field();
+    tmp<Field<Type>> tdidf = tdf().mesh().V()*tdf().field();
     tdf.clear();
     return tdidf;
 }
@@ -99,7 +99,7 @@ domainIntegrate
 template<class Type>
 dimensioned<Type> domainIntegrate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
     dimensioned<Type> integral = domainIntegrate(tvf());
@@ -126,7 +126,7 @@ dimensioned<Type> domainIntegrate
 template<class Type>
 dimensioned<Type> domainIntegrate
 (
-    const tmp<DimensionedField<Type, volMesh> >& tdf
+    const tmp<DimensionedField<Type, volMesh>>& tdf
 )
 {
     dimensioned<Type> integral = domainIntegrate(tdf());
diff --git a/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.H b/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.H
index 784087ee3075a8c7935e153bba9e11e63827b649..804bbbeef984b357ea402ab9f9c836f2cf40f682 100644
--- a/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.H
+++ b/src/finiteVolume/finiteVolume/fvc/fvcVolumeIntegrate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,28 +55,28 @@ namespace Foam
 namespace fvc
 {
     template<class Type>
-    tmp<Field<Type> > volumeIntegrate
+    tmp<Field<Type>> volumeIntegrate
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<Field<Type> > volumeIntegrate
+    tmp<Field<Type>> volumeIntegrate
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
 
     template<class Type>
-    tmp<Field<Type> > volumeIntegrate
+    tmp<Field<Type>> volumeIntegrate
     (
         const DimensionedField<Type, volMesh>&
     );
 
     template<class Type>
-    tmp<Field<Type> > volumeIntegrate
+    tmp<Field<Type>> volumeIntegrate
     (
-        const tmp<DimensionedField<Type, volMesh> >&
+        const tmp<DimensionedField<Type, volMesh>>&
     );
 
 
@@ -89,7 +89,7 @@ namespace fvc
     template<class Type>
     dimensioned<Type> domainIntegrate
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>&
     );
 
 
@@ -102,7 +102,7 @@ namespace fvc
     template<class Type>
     dimensioned<Type> domainIntegrate
     (
-        const tmp<DimensionedField<Type, volMesh> >&
+        const tmp<DimensionedField<Type, volMesh>>&
     );
 }
 
@@ -114,7 +114,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvcVolumeIntegrate.C"
+    #include "fvcVolumeIntegrate.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C
index 9739b77336a6f443c7368a081cddac39cad5dede..46a3f5db9d91b11e84579adebab4b7a5ea795b5b 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C
+++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 d2dt2
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -51,12 +51,12 @@ d2dt2
     (
         vf.mesh(),
         vf.mesh().d2dt2Scheme("d2dt2(" + vf.name() + ')')
-    )().fvmD2dt2(vf);
+    ).ref().fvmD2dt2(vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 d2dt2
 (
     const dimensionedScalar& rho,
@@ -67,12 +67,12 @@ d2dt2
     (
         vf.mesh(),
         vf.mesh().d2dt2Scheme("d2dt2(" + rho.name() + ',' + vf.name() + ')')
-    )().fvmD2dt2(rho, vf);
+    ).ref().fvmD2dt2(rho, vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 d2dt2
 (
     const volScalarField& rho,
@@ -83,7 +83,7 @@ d2dt2
     (
         vf.mesh(),
         vf.mesh().d2dt2Scheme("d2dt2(" + rho.name() + ',' + vf.name() + ')')
-    )().fvmD2dt2(rho, vf);
+    ).ref().fvmD2dt2(rho, vf);
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H
index 94e6b13568ad01d364178f723c68c173d387d7cf..20ec929bcd3694f8db6b3703d3503a611b74a806 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H
+++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,20 +50,20 @@ namespace Foam
 namespace fvm
 {
     template<class Type>
-    tmp<fvMatrix<Type> > d2dt2
+    tmp<fvMatrix<Type>> d2dt2
     (
         const dimensionedScalar&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > d2dt2
+    tmp<fvMatrix<Type>> d2dt2
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > d2dt2
+    tmp<fvMatrix<Type>> d2dt2
     (
         const volScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -78,7 +78,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvmD2dt2.C"
+    #include "fvmD2dt2.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C
index a2f75da02429513638d0b4b130c354af39db37fa..da9cef131c9a82d464bb075a686ae3f6cd3ddc56 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.C
+++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -51,12 +51,12 @@ ddt
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
-    )().fvmDdt(vf);
+    ).ref().fvmDdt(vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const one&,
@@ -68,7 +68,7 @@ ddt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const dimensionedScalar& rho,
@@ -79,12 +79,12 @@ ddt
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
-    )().fvmDdt(rho, vf);
+    ).ref().fvmDdt(rho, vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const volScalarField& rho,
@@ -95,12 +95,12 @@ ddt
     (
         vf.mesh(),
         vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
-    )().fvmDdt(rho, vf);
+    ).ref().fvmDdt(rho, vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const volScalarField& alpha,
@@ -118,12 +118,12 @@ ddt
           + rho.name() + ','
           + vf.name() + ')'
         )
-    )().fvmDdt(alpha, rho, vf);
+    ).ref().fvmDdt(alpha, rho, vf);
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const one&,
@@ -136,7 +136,7 @@ ddt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const one&,
@@ -149,7 +149,7 @@ ddt
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 ddt
 (
     const volScalarField& alpha,
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H
index 4091c5be6b1aa298698237716d882115e05bd954..621e9617d73d5607138b3c58e1f0e0a44a6a4e74 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmDdt.H
+++ b/src/finiteVolume/finiteVolume/fvm/fvmDdt.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,34 +51,34 @@ namespace Foam
 namespace fvm
 {
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const one&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const dimensionedScalar&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const volScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const volScalarField&,
         const volScalarField&,
@@ -86,7 +86,7 @@ namespace fvm
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const one&,
         const one&,
@@ -94,7 +94,7 @@ namespace fvm
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const one&,
         const volScalarField&,
@@ -102,7 +102,7 @@ namespace fvm
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > ddt
+    tmp<fvMatrix<Type>> ddt
     (
         const volScalarField&,
         const one&,
@@ -118,7 +118,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvmDdt.C"
+    #include "fvmDdt.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDiv.C b/src/finiteVolume/finiteVolume/fvm/fvmDiv.C
index d095816f5bbf6ded050821bddea27c6138c24f7f..849e3c6a502afd9d0c8fedb6ff17abeeb7667296 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmDiv.C
+++ b/src/finiteVolume/finiteVolume/fvm/fvmDiv.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 div
 (
     const surfaceScalarField& flux,
@@ -58,7 +58,7 @@ div
 }
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 div
 (
     const tmp<surfaceScalarField>& tflux,
@@ -66,14 +66,14 @@ div
     const word& name
 )
 {
-    tmp<fvMatrix<Type> > Div(fvm::div(tflux(), vf, name));
+    tmp<fvMatrix<Type>> Div(fvm::div(tflux(), vf, name));
     tflux.clear();
     return Div;
 }
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 div
 (
     const surfaceScalarField& flux,
@@ -84,14 +84,14 @@ div
 }
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 div
 (
     const tmp<surfaceScalarField>& tflux,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > Div(fvm::div(tflux(), vf));
+    tmp<fvMatrix<Type>> Div(fvm::div(tflux(), vf));
     tflux.clear();
     return Div;
 }
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmDiv.H b/src/finiteVolume/finiteVolume/fvm/fvmDiv.H
index 0cbf0850228f93796f4f5252416c9ba4452cd46b..0310c5518d979825fd029673583ab9f1143ec411 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmDiv.H
+++ b/src/finiteVolume/finiteVolume/fvm/fvmDiv.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ namespace Foam
 namespace fvm
 {
     template<class Type>
-    tmp<fvMatrix<Type> > div
+    tmp<fvMatrix<Type>> div
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -60,7 +60,7 @@ namespace fvm
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > div
+    tmp<fvMatrix<Type>> div
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -69,14 +69,14 @@ namespace fvm
 
 
     template<class Type>
-    tmp<fvMatrix<Type> > div
+    tmp<fvMatrix<Type>> div
     (
         const surfaceScalarField&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > div
+    tmp<fvMatrix<Type>> div
     (
         const tmp<surfaceScalarField>&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -91,7 +91,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvmDiv.C"
+    #include "fvmDiv.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C
index dfbc5ab579345e485e0579b6653fde063b08f735..aa44d4e68f51a23134023d1b819ef8c2574df715 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C
+++ b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
@@ -66,7 +66,7 @@ laplacian
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -95,7 +95,7 @@ laplacian
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const zero&,
@@ -103,7 +103,7 @@ laplacian
     const word& name
 )
 {
-    return tmp<fvMatrix<Type> >
+    return tmp<fvMatrix<Type>>
     (
         new fvMatrix<Type>(vf, dimensionSet(0, 0, -2, 0, 0))
     );
@@ -111,14 +111,14 @@ laplacian
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const zero&,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    return tmp<fvMatrix<Type> >
+    return tmp<fvMatrix<Type>>
     (
         new fvMatrix<Type>(vf, dimensionSet(0, 0, -2, 0, 0))
     );
@@ -126,7 +126,7 @@ laplacian
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const one&,
@@ -139,7 +139,7 @@ laplacian
 
 
 template<class Type>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const one&,
@@ -151,7 +151,7 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const dimensioned<GType>& gamma,
@@ -177,7 +177,7 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const dimensioned<GType>& gamma,
@@ -204,7 +204,7 @@ laplacian
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
@@ -216,27 +216,27 @@ laplacian
     (
         vf.mesh(),
         vf.mesh().laplacianScheme(name)
-    )().fvmLaplacian(gamma, vf);
+    ).ref().fvmLaplacian(gamma, vf);
 }
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvPatchField, volMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const word& name
 )
 {
-    tmp<fvMatrix<Type> > Laplacian(fvm::laplacian(tgamma(), vf, name));
+    tmp<fvMatrix<Type>> Laplacian(fvm::laplacian(tgamma(), vf, name));
     tgamma.clear();
     return Laplacian;
 }
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
@@ -253,14 +253,14 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvPatchField, volMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > Laplacian(fvm::laplacian(tgamma(), vf));
+    tmp<fvMatrix<Type>> Laplacian(fvm::laplacian(tgamma(), vf));
     tgamma.clear();
     return Laplacian;
 }
@@ -269,7 +269,7 @@ laplacian
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
@@ -281,27 +281,27 @@ laplacian
     (
         vf.mesh(),
         vf.mesh().laplacianScheme(name)
-    )().fvmLaplacian(gamma, vf);
+    ).ref().fvmLaplacian(gamma, vf);
 }
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
+    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>& tgamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const word& name
 )
 {
-    tmp<fvMatrix<Type> > tLaplacian = fvm::laplacian(tgamma(), vf, name);
+    tmp<fvMatrix<Type>> tLaplacian = fvm::laplacian(tgamma(), vf, name);
     tgamma.clear();
     return tLaplacian;
 }
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
@@ -318,14 +318,14 @@ laplacian
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacian
 (
-    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tGamma,
+    const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>& tGamma,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm(fvm::laplacian(tGamma(), vf));
+    tmp<fvMatrix<Type>> tfvm(fvm::laplacian(tGamma(), vf));
     tGamma.clear();
     return tfvm;
 }
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H
index 0790dd1db5345212393eb039b2ab35efc8c2ba39..647541a34250cf70e7039b1155fc8137c3c5ee78 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H
+++ b/src/finiteVolume/finiteVolume/fvm/fvmLaplacian.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,21 +53,21 @@ namespace Foam
 namespace fvm
 {
     template<class Type>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word&
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
 
     template<class Type>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const zero&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -75,7 +75,7 @@ namespace fvm
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const zero&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -83,7 +83,7 @@ namespace fvm
 
 
     template<class Type>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const one&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -91,7 +91,7 @@ namespace fvm
     );
 
     template<class Type>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const one&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -99,7 +99,7 @@ namespace fvm
 
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const dimensioned<GType>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -107,7 +107,7 @@ namespace fvm
     );
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const dimensioned<GType>&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -115,7 +115,7 @@ namespace fvm
 
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const GeometricField<GType, fvPatchField, volMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -123,7 +123,7 @@ namespace fvm
     );
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const GeometricField<GType, fvPatchField, volMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&
@@ -131,23 +131,23 @@ namespace fvm
 
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
-        const tmp<GeometricField<GType, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<GType, fvPatchField, volMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
-        const tmp<GeometricField<GType, fvPatchField, volMesh> >&,
+        const tmp<GeometricField<GType, fvPatchField, volMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const GeometricField<GType, fvsPatchField, surfaceMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
@@ -155,24 +155,24 @@ namespace fvm
     );
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
-        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >&,
+        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&,
         const word&
     );
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
         const GeometricField<GType, fvsPatchField, surfaceMesh>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 
     template<class Type, class GType>
-    tmp<fvMatrix<Type> > laplacian
+    tmp<fvMatrix<Type>> laplacian
     (
-        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >&,
+        const tmp<GeometricField<GType, fvsPatchField, surfaceMesh>>&,
         const GeometricField<Type, fvPatchField, volMesh>&
     );
 }
@@ -185,7 +185,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvmLaplacian.C"
+    #include "fvmLaplacian.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmSup.C b/src/finiteVolume/finiteVolume/fvm/fvmSup.C
index b0304e17914e806107177bbf24ff14c510d51cc0..97d33bd609b96e357f9d34356f162ef0a1307863 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmSup.C
+++ b/src/finiteVolume/finiteVolume/fvm/fvmSup.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Su
 (
     const DimensionedField<Type, volMesh>& su,
@@ -39,7 +39,7 @@ Foam::fvm::Su
 {
     const fvMesh& mesh = vf.mesh();
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -47,7 +47,7 @@ Foam::fvm::Su
             dimVol*su.dimensions()
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     fvm.source() -= mesh.V()*su.field();
 
@@ -56,28 +56,28 @@ Foam::fvm::Su
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Su
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu,
+    const tmp<DimensionedField<Type, volMesh>>& tsu,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm = fvm::Su(tsu(), vf);
+    tmp<fvMatrix<Type>> tfvm = fvm::Su(tsu(), vf);
     tsu.clear();
     return tfvm;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Su
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm = fvm::Su(tsu(), vf);
+    tmp<fvMatrix<Type>> tfvm = fvm::Su(tsu(), vf);
     tsu.clear();
     return tfvm;
 }
@@ -96,7 +96,7 @@ Foam::fvm::Su
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Sp
 (
     const DimensionedField<scalar, volMesh>& sp,
@@ -105,7 +105,7 @@ Foam::fvm::Sp
 {
     const fvMesh& mesh = vf.mesh();
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -113,7 +113,7 @@ Foam::fvm::Sp
             dimVol*sp.dimensions()*vf.dimensions()
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     fvm.diag() += mesh.V()*sp.field();
 
@@ -122,35 +122,35 @@ Foam::fvm::Sp
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Sp
 (
-    const tmp<DimensionedField<scalar, volMesh> >& tsp,
+    const tmp<DimensionedField<scalar, volMesh>>& tsp,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm = fvm::Sp(tsp(), vf);
+    tmp<fvMatrix<Type>> tfvm = fvm::Sp(tsp(), vf);
     tsp.clear();
     return tfvm;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Sp
 (
     const tmp<volScalarField>& tsp,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm = fvm::Sp(tsp(), vf);
+    tmp<fvMatrix<Type>> tfvm = fvm::Sp(tsp(), vf);
     tsp.clear();
     return tfvm;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::Sp
 (
     const dimensionedScalar& sp,
@@ -159,7 +159,7 @@ Foam::fvm::Sp
 {
     const fvMesh& mesh = vf.mesh();
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -167,7 +167,7 @@ Foam::fvm::Sp
             dimVol*sp.dimensions()*vf.dimensions()
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     fvm.diag() += mesh.V()*sp.value();
 
@@ -188,7 +188,7 @@ Foam::fvm::Sp
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::SuSp
 (
     const DimensionedField<scalar, volMesh>& susp,
@@ -197,7 +197,7 @@ Foam::fvm::SuSp
 {
     const fvMesh& mesh = vf.mesh();
 
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -205,7 +205,7 @@ Foam::fvm::SuSp
             dimVol*susp.dimensions()*vf.dimensions()
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     fvm.diag() += mesh.V()*max(susp.field(), scalar(0));
 
@@ -217,28 +217,28 @@ Foam::fvm::SuSp
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::SuSp
 (
-    const tmp<DimensionedField<scalar, volMesh> >& tsusp,
+    const tmp<DimensionedField<scalar, volMesh>>& tsusp,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm = fvm::SuSp(tsusp(), vf);
+    tmp<fvMatrix<Type>> tfvm = fvm::SuSp(tsusp(), vf);
     tsusp.clear();
     return tfvm;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> >
+Foam::tmp<Foam::fvMatrix<Type>>
 Foam::fvm::SuSp
 (
     const tmp<volScalarField>& tsusp,
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm = fvm::SuSp(tsusp(), vf);
+    tmp<fvMatrix<Type>> tfvm = fvm::SuSp(tsusp(), vf);
     tsusp.clear();
     return tfvm;
 }
diff --git a/src/finiteVolume/finiteVolume/fvm/fvmSup.H b/src/finiteVolume/finiteVolume/fvm/fvmSup.H
index bf692cd9ebb5b373cea5647475ca5e094302df6f..7a82b7e138ba7591b892309e6bc716a41777da66 100644
--- a/src/finiteVolume/finiteVolume/fvm/fvmSup.H
+++ b/src/finiteVolume/finiteVolume/fvm/fvmSup.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,23 +53,23 @@ namespace fvm
    // Explicit source
 
         template<class Type>
-        tmp<fvMatrix<Type> > Su
+        tmp<fvMatrix<Type>> Su
         (
             const DimensionedField<Type, volMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<fvMatrix<Type> > Su
+        tmp<fvMatrix<Type>> Su
         (
-            const tmp<DimensionedField<Type, volMesh> >&,
+            const tmp<DimensionedField<Type, volMesh>>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<fvMatrix<Type> > Su
+        tmp<fvMatrix<Type>> Su
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
@@ -84,21 +84,21 @@ namespace fvm
     // Implicit source
 
         template<class Type>
-        tmp<fvMatrix<Type> > Sp
+        tmp<fvMatrix<Type>> Sp
         (
             const DimensionedField<scalar, volMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<fvMatrix<Type> > Sp
+        tmp<fvMatrix<Type>> Sp
         (
-            const tmp<DimensionedField<scalar, volMesh> >&,
+            const tmp<DimensionedField<scalar, volMesh>>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<fvMatrix<Type> > Sp
+        tmp<fvMatrix<Type>> Sp
         (
             const tmp<volScalarField>&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -106,7 +106,7 @@ namespace fvm
 
 
         template<class Type>
-        tmp<fvMatrix<Type> > Sp
+        tmp<fvMatrix<Type>> Sp
         (
             const dimensionedScalar&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -124,21 +124,21 @@ namespace fvm
     // Implicit/Explicit source depending on sign of coefficient
 
         template<class Type>
-        tmp<fvMatrix<Type> > SuSp
+        tmp<fvMatrix<Type>> SuSp
         (
             const DimensionedField<scalar, volMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<fvMatrix<Type> > SuSp
+        tmp<fvMatrix<Type>> SuSp
         (
-            const tmp<DimensionedField<scalar, volMesh> >&,
+            const tmp<DimensionedField<scalar, volMesh>>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
         template<class Type>
-        tmp<fvMatrix<Type> > SuSp
+        tmp<fvMatrix<Type>> SuSp
         (
             const tmp<volScalarField>&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -160,7 +160,7 @@ namespace fvm
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvmSup.C"
+    #include "fvmSup.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C
index 03a6f1c84fd00e6ddcfa158a0145132a78b1124a..b8f0336226f1703a376106df6755da73d911d5c2 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 #include "gaussGrad.H"
 #include "fvMesh.H"
 #include "volMesh.H"
-#include "zeroGradientFvPatchField.H"
+#include "extrapolatedCalculatedFvPatchField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -58,7 +58,7 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad
         mesh
     );
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tlsGrad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tlsGrad
     (
         new GeometricField<GradType, fvPatchField, volMesh>
         (
@@ -75,21 +75,21 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad
             (
                 "zero",
                 vtf.dimensions()/dimLength,
-                pTraits<GradType>::zero
+                Zero
             ),
-            zeroGradientFvPatchField<GradType>::typeName
+            extrapolatedCalculatedFvPatchField<GradType>::typeName
         )
     );
-    GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad();
+    GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad.ref();
     Field<GradType>& lsGradIf = lsGrad;
 
     const extendedCentredCellToCellStencil& stencil = lsv.stencil();
-    const List<List<label> >& stencilAddr = stencil.stencil();
-    const List<List<vector> >& lsvs = lsv.vectors();
+    const List<List<label>>& stencilAddr = stencil.stencil();
+    const List<List<vector>>& lsvs = lsv.vectors();
 
     // Construct flat version of vtf
     // including all values referred to by the stencil
-    List<Type> flatVtf(stencil.map().constructSize(), pTraits<Type>::zero);
+    List<Type> flatVtf(stencil.map().constructSize(), Zero);
 
     // Insert internal values
     forAll(vtf, celli)
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.H
index a71d0e87abd13849fa2904d61a269b872bfac389..3393e6c48702f9c4025ccd3e691a3537df575839 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ public:
                 LeastSquaresGrad##TYPE##STENCIL##_;                            \
                                                                                \
             gradScheme<Foam::TYPE>::addIstreamConstructorToTable               \
-                <LeastSquaresGrad<Foam::TYPE, Foam::STENCIL> >                 \
+                <LeastSquaresGrad<Foam::TYPE, Foam::STENCIL>>                  \
                 add##SS##STENCIL##TYPE##IstreamConstructorToTable_;            \
         }                                                                      \
     }
@@ -175,7 +175,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LeastSquaresGrad.C"
+    #include "LeastSquaresGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C
index ea30ffa3dbfb3d7be7d0d8d8d5c40bba52d290b5..c0d37aa177618f53a36521b32ee46ed7f0d85fbe 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,9 +54,7 @@ void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
 {
     if (debug)
     {
-        Info<< "LeastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Calculating least square gradient vectors"
-            << endl;
+        InfoInFunction << "Calculating least square gradient vectors" << endl;
     }
 
     const fvMesh& mesh = this->mesh_;
@@ -68,7 +66,7 @@ void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
     // including components for the "empty" directions
     symmTensor dd0(sqr((Vector<label>::one - mesh.geometricD())/2));
 
-    forAll (vectors_, i)
+    forAll(vectors_, i)
     {
         List<vector>& lsvi = vectors_[i];
         symmTensor dd(dd0);
@@ -90,7 +88,7 @@ void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
         dd -= dd0;
 
         // Finalize the gradient weighting vectors
-        lsvi[0] = vector::zero;
+        lsvi[0] = Zero;
         for (label j=1; j<lsvi.size(); j++)
         {
             lsvi[j] = dd & lsvi[j];
@@ -100,9 +98,8 @@ void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors()
 
     if (debug)
     {
-        Info<< "LeastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Finished calculating least square gradient vectors"
-            << endl;
+        InfoInFunction
+            << "Finished calculating least square gradient vectors" << endl;
     }
 }
 
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H
index d454e8cb3f48022518996992c913efdf176e2bb8..d187f4d38290ad2bddee146497281dfba4eb560e 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,12 +58,12 @@ namespace fv
 template<class Stencil>
 class LeastSquaresVectors
 :
-    public MeshObject<fvMesh, MoveableMeshObject, LeastSquaresVectors<Stencil> >
+    public MeshObject<fvMesh, MoveableMeshObject, LeastSquaresVectors<Stencil>>
 {
     // Private data
 
         //- Least-squares gradient vectors
-        List<List<vector> > vectors_;
+        List<List<vector>> vectors_;
 
 
     // Private Member Functions
@@ -100,7 +100,7 @@ public:
         }
 
         //- Return reference to the least square vectors
-        const List<List<vector> >& vectors() const
+        const List<List<vector>>& vectors() const
         {
             return vectors_;
         }
@@ -121,7 +121,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LeastSquaresVectors.C"
+    #include "LeastSquaresVectors.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C
index 2293c126db80a3f0ea39bb0ba0c3afe47dea0193..975ff9141d91a22192bae107ba329e224f75a942 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ Foam::fv::fourthGrad<Type>::calcGrad
 
     // Assemble the second-order least-square gradient
     // Calculate the second-order least-square gradient
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tsecondfGrad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tsecondfGrad
       = leastSquaresGrad<Type>(mesh).grad
         (
             vsf,
@@ -70,7 +70,7 @@ Foam::fv::fourthGrad<Type>::calcGrad
     const GeometricField<GradType, fvPatchField, volMesh>& secondfGrad =
         tsecondfGrad();
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tfGrad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tfGrad
     (
         new GeometricField<GradType, fvPatchField, volMesh>
         (
@@ -85,7 +85,7 @@ Foam::fv::fourthGrad<Type>::calcGrad
             secondfGrad
         )
     );
-    GeometricField<GradType, fvPatchField, volMesh>& fGrad = tfGrad();
+    GeometricField<GradType, fvPatchField, volMesh>& fGrad = tfGrad.ref();
 
     const vectorField& C = mesh.C();
 
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.H
index effe6d7ffda0c4b37d36a18e25544edfcc5261c4..f2da695dd99560a57fadc2813c5bfaa660bcd86b 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fourthGrad.C"
+    #include "fourthGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C
index a4947705ba55dc69360deff0ee291d3075ea4484..34b9170c628e055acc5b5fb850eef60653fa5dbd 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "gaussGrad.H"
-#include "zeroGradientFvPatchField.H"
+#include "extrapolatedCalculatedFvPatchField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -48,7 +48,7 @@ Foam::fv::gaussGrad<Type>::gradf
 
     const fvMesh& mesh = ssf.mesh();
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tgGrad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tgGrad
     (
         new GeometricField<GradType, fvPatchField, volMesh>
         (
@@ -65,12 +65,12 @@ Foam::fv::gaussGrad<Type>::gradf
             (
                 "0",
                 ssf.dimensions()/dimLength,
-                pTraits<GradType>::zero
+                Zero
             ),
-            zeroGradientFvPatchField<GradType>::typeName
+            extrapolatedCalculatedFvPatchField<GradType>::typeName
         )
     );
-    GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad();
+    GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
@@ -128,11 +128,11 @@ Foam::fv::gaussGrad<Type>::calcGrad
 {
     typedef typename outerProduct<vector, Type>::type GradType;
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tgGrad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tgGrad
     (
         gradf(tinterpScheme_().interpolate(vsf), name)
     );
-    GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad();
+    GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad.ref();
 
     correctBoundaryConditions(vsf, gGrad);
 
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H
index 6559ed22aa6646c0e70a1c5f0e49029776696721..bec2d9c6f1c4b92c81088253fd01f6038da7e971 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ class gaussGrad
 {
     // Private data
 
-        tmp<surfaceInterpolationScheme<Type> > tinterpScheme_;
+        tmp<surfaceInterpolationScheme<Type>> tinterpScheme_;
 
 
     // Private Member Functions
@@ -97,7 +97,7 @@ public:
             if (is.eof())
             {
                 tinterpScheme_ =
-                    tmp<surfaceInterpolationScheme<Type> >
+                    tmp<surfaceInterpolationScheme<Type>>
                     (
                         new linear<Type>(mesh)
                     );
@@ -105,7 +105,7 @@ public:
             else
             {
                 tinterpScheme_ =
-                    tmp<surfaceInterpolationScheme<Type> >
+                    tmp<surfaceInterpolationScheme<Type>>
                     (
                         surfaceInterpolationScheme<Type>::New(mesh, is)
                     );
@@ -162,7 +162,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gaussGrad.C"
+    #include "gaussGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C
index 503c8a978f89069191a1255056bdb2140d1d7701..2c045538e2eb590a4a3f08b2837daf977a9a64b1 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::fv::gradScheme<Type> > Foam::fv::gradScheme<Type>::New
+Foam::tmp<Foam::fv::gradScheme<Type>> Foam::fv::gradScheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -38,10 +38,7 @@ Foam::tmp<Foam::fv::gradScheme<Type> > Foam::fv::gradScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "gradScheme<Type>::New"
-               "(const fvMesh& mesh, Istream& schemeData) : "
-               "constructing gradScheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing gradScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
@@ -200,7 +197,7 @@ Foam::tmp
 >
 Foam::fv::gradScheme<Type>::grad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvsf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvsf
 ) const
 {
     typedef typename outerProduct<vector, Type>::type GradType;
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H
index aa508ab8b6182abafd80036ebd5d0192da1b7b38..4e6ca98bf6135ba71dfbd648d8dad65d3cbc8392 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ namespace fv
 template<class Type>
 class gradScheme
 :
-    public refCount
+    public tmp<gradScheme<Type>>::refCount
 {
     // Private data
 
@@ -106,7 +106,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new gradScheme created on freestore
-        static tmp<gradScheme<Type> > New
+        static tmp<gradScheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
@@ -171,7 +171,7 @@ public:
             <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
         > grad
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 };
 
@@ -195,7 +195,7 @@ public:
     {                                                                          \
         namespace fv                                                           \
         {                                                                      \
-            gradScheme<Type>::addIstreamConstructorToTable<SS<Type> >          \
+            gradScheme<Type>::addIstreamConstructorToTable<SS<Type>>           \
                 add##SS##Type##IstreamConstructorToTable_;                     \
         }                                                                      \
     }
@@ -210,7 +210,7 @@ makeFvGradTypeScheme(SS, vector)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gradScheme.C"
+    #include "gradScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C
index 96e5c1b37669d265c002f0c66ea4ef50cd2f39c2..12ee0858f3d751a8e2ebdfa1016c94240e014a88 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
             false
         ),
         mesh_,
-        dimensionedVector("zero", dimless/dimLength, vector::zero)
+        dimensionedVector("zero", dimless/dimLength, Zero)
     ),
     nVectors_
     (
@@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
             false
         ),
         mesh_,
-        dimensionedVector("zero", dimless/dimLength, vector::zero)
+        dimensionedVector("zero", dimless/dimLength, Zero)
     )
 {
     calcLeastSquaresVectors();
@@ -84,9 +84,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 {
     if (debug)
     {
-        Info<< "leastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Calculating least square gradient vectors"
-            << endl;
+        InfoInFunction << "Calculating least square gradient vectors" << endl;
     }
 
     const fvMesh& mesh = mesh_;
@@ -98,7 +96,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
     const volVectorField& C = mesh.C();
 
     // Set up temporary storage for the dd tensor (before inversion)
-    symmTensorField dd(mesh_.nCells(), symmTensor::zero);
+    symmTensorField dd(mesh_.nCells(), Zero);
 
     forAll(owner, facei)
     {
@@ -170,9 +168,8 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 
     if (debug)
     {
-        Info<< "leastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Finished calculating least square gradient vectors"
-            << endl;
+        InfoInFunction
+            <<"Finished calculating least square gradient vectors" << endl;
     }
 }
 
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C
index ac1957f9b12aaa28561fea09f00febdcafa2bf0b..2a3839b5b29032fc5fe2820ea3d3a4d99c8adfa4 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 #include "volMesh.H"
 #include "surfaceMesh.H"
 #include "GeometricField.H"
-#include "zeroGradientFvPatchField.H"
+#include "extrapolatedCalculatedFvPatchField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -54,7 +54,7 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad
 
     const fvMesh& mesh = vsf.mesh();
 
-    tmp<GeometricField<GradType, fvPatchField, volMesh> > tlsGrad
+    tmp<GeometricField<GradType, fvPatchField, volMesh>> tlsGrad
     (
         new GeometricField<GradType, fvPatchField, volMesh>
         (
@@ -71,12 +71,12 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad
             (
                 "zero",
                 vsf.dimensions()/dimLength,
-                pTraits<GradType>::zero
+                Zero
             ),
-            zeroGradientFvPatchField<GradType>::typeName
+            extrapolatedCalculatedFvPatchField<GradType>::typeName
         )
     );
-    GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad();
+    GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad.ref();
 
     // Get reference to least square vectors
     const leastSquaresVectors& lsv = leastSquaresVectors::New(mesh);
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.H
index cf8c57048052bcf1ea9ebbe6779bc226917154ed..7755bac09892006e246b9c0fa7007aedec8ab42a 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,7 +113,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "leastSquaresGrad.C"
+    #include "leastSquaresGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C
index 48c4c8a25699edfc099d43cb14221925f6221d35..3a6e8233fa432d42ce51d8f9f0e3d4abf60cad74 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
             false
         ),
         mesh_,
-        dimensionedVector("zero", dimless/dimLength, vector::zero)
+        dimensionedVector("zero", dimless/dimLength, Zero)
     ),
     nVectors_
     (
@@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
             false
         ),
         mesh_,
-        dimensionedVector("zero", dimless/dimLength, vector::zero)
+        dimensionedVector("zero", dimless/dimLength, Zero)
     )
 {
     calcLeastSquaresVectors();
@@ -84,9 +84,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 {
     if (debug)
     {
-        Info<< "leastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Calculating least square gradient vectors"
-            << endl;
+        InfoInFunction << "Calculating least square gradient vectors" << endl;
     }
 
     const fvMesh& mesh = mesh_;
@@ -101,7 +99,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 
 
     // Set up temporary storage for the dd tensor (before inversion)
-    symmTensorField dd(mesh_.nCells(), symmTensor::zero);
+    symmTensorField dd(mesh_.nCells(), Zero);
 
     forAll(owner, facei)
     {
@@ -209,9 +207,8 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 
     if (debug)
     {
-        Info<< "leastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Finished calculating least square gradient vectors"
-            << endl;
+        InfoInFunction
+            << "Finished calculating least square gradient vectors" << endl;
     }
 }
 
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C
index 06325e1f61921e04f65ebff81f4e798db9fbdd06..b6bb1475d09692b12cab8fe21edcfd19d4498c70 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
             false
         ),
         mesh_,
-        dimensionedVector("zero", dimless/dimLength, vector::zero)
+        dimensionedVector("zero", dimless/dimLength, Zero)
     ),
     nVectors_
     (
@@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh)
             false
         ),
         mesh_,
-        dimensionedVector("zero", dimless/dimLength, vector::zero)
+        dimensionedVector("zero", dimless/dimLength, Zero)
     )
 {
     calcLeastSquaresVectors();
@@ -84,9 +84,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 {
     if (debug)
     {
-        Info<< "leastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Calculating least square gradient vectors"
-            << endl;
+        InfoInFunction << "Calculating least square gradient vectors" << endl;
     }
 
     const fvMesh& mesh = mesh_;
@@ -98,7 +96,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
     const volVectorField& C = mesh.C();
 
     // Set up temporary storage for the dd tensor (before inversion)
-    symmTensorField dd(mesh_.nCells(), symmTensor::zero);
+    symmTensorField dd(mesh_.nCells(), Zero);
 
     forAll(owner, facei)
     {
@@ -166,9 +164,8 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors()
 
     if (debug)
     {
-        Info<< "leastSquaresVectors::calcLeastSquaresVectors() :"
-            << "Finished calculating least square gradient vectors"
-            << endl;
+        InfoInFunction
+            << "Finished calculating least square gradient vectors" << endl;
     }
 }
 
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H
index 6ee95bdbcc3f2c117931acb6b9d6e9699c52a94b..129e3f48d56e97be5dc6d79fe58fa4d2557faf18 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ class cellLimitedGrad
 {
     // Private Data
 
-        tmp<fv::gradScheme<Type> > basicGradScheme_;
+        tmp<fv::gradScheme<Type>> basicGradScheme_;
 
         //- Limiter coefficient
         const scalar k_;
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C
index 14064aa9e225db82689151d5712c6dda5969f3f7..43238d823c9add8466c0d11eb2ba7ea8820d80a6 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrads.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ Foam::fv::cellLimitedGrad<Foam::scalar>::calcGrad
         return tGrad;
     }
 
-    volVectorField& g = tGrad();
+    volVectorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
@@ -208,7 +208,7 @@ Foam::fv::cellLimitedGrad<Foam::vector>::calcGrad
         return tGrad;
     }
 
-    volTensorField& g = tGrad();
+    volTensorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H
index 0ef0b44ad65455f466a8c60cd7ec52e72ffc6f0e..f4b55ea3989b17974d56b241917cc3ca75c55090 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ class cellMDLimitedGrad
 {
     // Private Data
 
-        tmp<fv::gradScheme<Type> > basicGradScheme_;
+        tmp<fv::gradScheme<Type>> basicGradScheme_;
 
         //- Limiter coefficient
         const scalar k_;
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrads.C
index 594ad63dd9e8f36a21219bc4133d6b3b8085aac3..5f230156268ea03a21e3a3c6c32b6bc022c92866 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrads.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrads.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ Foam::fv::cellMDLimitedGrad<Foam::scalar>::calcGrad
         return tGrad;
     }
 
-    volVectorField& g = tGrad();
+    volVectorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
@@ -197,7 +197,7 @@ Foam::fv::cellMDLimitedGrad<Foam::vector>::calcGrad
         return tGrad;
     }
 
-    volTensorField& g = tGrad();
+    volTensorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrad.H
index a3ce867666afe1ff8a372c869545fbfed26270c7..9b7d698d2326e634dfdeccac960c708288ff91ff 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ class faceLimitedGrad
 {
     // Private Data
 
-        tmp<fv::gradScheme<Type> > basicGradScheme_;
+        tmp<fv::gradScheme<Type>> basicGradScheme_;
 
         //- Limiter coefficient
         const scalar k_;
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C
index c37b14a298f1814edc3e216cda324050dfc41243..775dee934a0ece3c13cd4956094bd2377e1568cc 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceLimitedGrad/faceLimitedGrads.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ Foam::fv::faceLimitedGrad<Foam::scalar>::calcGrad
         return tGrad;
     }
 
-    volVectorField& g = tGrad();
+    volVectorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
@@ -190,7 +190,7 @@ Foam::fv::faceLimitedGrad<Foam::vector>::calcGrad
         return tGrad;
     }
 
-    volTensorField& g = tGrad();
+    volTensorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrad.H
index 9da9990353cc6fccd56aaf809a1574ea21e22ada..5844f6ff0ff7da2b074a6ee1d4bf494937867a30 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ class faceMDLimitedGrad
 {
     // Private Data
 
-        tmp<fv::gradScheme<Type> > basicGradScheme_;
+        tmp<fv::gradScheme<Type>> basicGradScheme_;
 
         //- Limiter coefficient
         const scalar k_;
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C
index 9a43689fd482d56e98231ed9dfaddfd7035504c0..f0fd65ee018228f6c4f320d80974d247cc12dbf4 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/faceMDLimitedGrad/faceMDLimitedGrads.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ Foam::fv::faceMDLimitedGrad<Foam::scalar>::calcGrad
         return tGrad;
     }
 
-    volVectorField& g = tGrad();
+    volVectorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
@@ -195,7 +195,7 @@ Foam::fv::faceMDLimitedGrad<Foam::vector>::calcGrad
         return tGrad;
     }
 
-    volTensorField& g = tGrad();
+    volTensorField& g = tGrad.ref();
 
     const labelUList& owner = mesh.owner();
     const labelUList& neighbour = mesh.neighbour();
diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C
index 0da6e26eb339defd30b7482f816e57e0c2383684..937a359d85bbb4227234a1099471995111de4645 100644
--- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C
+++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
 (
     const surfaceScalarField& gammaMagSf,
@@ -50,7 +50,7 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
-    tmp<fvMatrix<Type> > tfvm
+    tmp<fvMatrix<Type>> tfvm
     (
         new fvMatrix<Type>
         (
@@ -58,7 +58,7 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
             deltaCoeffs.dimensions()*gammaMagSf.dimensions()*vf.dimensions()
         )
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
     fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalField();
     fvm.negSumDiag();
@@ -89,7 +89,7 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 gaussLaplacianScheme<Type, GType>::gammaSnGradCorr
 (
     const surfaceVectorField& SfGammaCorr,
@@ -98,7 +98,7 @@ gaussLaplacianScheme<Type, GType>::gammaSnGradCorr
 {
     const fvMesh& mesh = this->mesh();
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tgammaSnGradCorr
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tgammaSnGradCorr
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -118,10 +118,10 @@ gaussLaplacianScheme<Type, GType>::gammaSnGradCorr
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
-        tgammaSnGradCorr().replace
+        tgammaSnGradCorr.ref().replace
         (
             cmpt,
-            SfGammaCorr & fvc::interpolate(fvc::grad(vf.component(cmpt)))
+            fvc::dotInterpolate(SfGammaCorr, fvc::grad(vf.component(cmpt)))
         );
     }
 
@@ -132,7 +132,7 @@ gaussLaplacianScheme<Type, GType>::gammaSnGradCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 gaussLaplacianScheme<Type, GType>::fvcLaplacian
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -140,19 +140,19 @@ gaussLaplacianScheme<Type, GType>::fvcLaplacian
 {
     const fvMesh& mesh = this->mesh();
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tLaplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tLaplacian
     (
         fvc::div(this->tsnGradScheme_().snGrad(vf)*mesh.magSf())
     );
 
-    tLaplacian().rename("laplacian(" + vf.name() + ')');
+    tLaplacian.ref().rename("laplacian(" + vf.name() + ')');
 
     return tLaplacian;
 }
 
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 gaussLaplacianScheme<Type, GType>::fvmLaplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
@@ -170,20 +170,20 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacian
     );
     const surfaceVectorField SfGammaCorr(SfGamma - SfGammaSn*Sn);
 
-    tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected
+    tmp<fvMatrix<Type>> tfvm = fvmLaplacianUncorrected
     (
         SfGammaSn,
         this->tsnGradScheme_().deltaCoeffs(vf),
         vf
     );
-    fvMatrix<Type>& fvm = tfvm();
+    fvMatrix<Type>& fvm = tfvm.ref();
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tfaceFluxCorrection
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tfaceFluxCorrection
         = gammaSnGradCorr(SfGammaCorr, vf);
 
     if (this->tsnGradScheme_().corrected())
     {
-        tfaceFluxCorrection() +=
+        tfaceFluxCorrection.ref() +=
             SfGammaSn*this->tsnGradScheme_().correction(vf);
     }
 
@@ -199,7 +199,7 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 gaussLaplacianScheme<Type, GType>::fvcLaplacian
 (
     const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
@@ -216,7 +216,7 @@ gaussLaplacianScheme<Type, GType>::fvcLaplacian
     );
     const surfaceVectorField SfGammaCorr(SfGamma - SfGammaSn*Sn);
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tLaplacian
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tLaplacian
     (
         fvc::div
         (
@@ -225,7 +225,10 @@ gaussLaplacianScheme<Type, GType>::fvcLaplacian
         )
     );
 
-    tLaplacian().rename("laplacian(" + gamma.name() + ',' + vf.name() + ')');
+    tLaplacian.ref().rename
+    (
+        "laplacian(" + gamma.name() + ',' + vf.name() + ')'
+    );
 
     return tLaplacian;
 }
diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H
index 1ff2a71843acd374681072a3ca7e7f99fc9f5b5a..0176db4e9d61004679d5b0866f59cfb53e5db00f 100644
--- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H
+++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ class gaussLaplacianScheme
 {
     // Private Member Functions
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > gammaSnGradCorr
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> gammaSnGradCorr
         (
             const surfaceVectorField& SfGammaCorr,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -95,8 +95,8 @@ public:
         gaussLaplacianScheme
         (
             const fvMesh& mesh,
-            const tmp<surfaceInterpolationScheme<GType> >& igs,
-            const tmp<snGradScheme<Type> >& sngs
+            const tmp<surfaceInterpolationScheme<GType>>& igs,
+            const tmp<snGradScheme<Type>>& sngs
         )
         :
             laplacianScheme<Type, GType>(mesh, igs, sngs)
@@ -110,25 +110,25 @@ public:
 
     // Member Functions
 
-        static tmp<fvMatrix<Type> > fvmLaplacianUncorrected
+        static tmp<fvMatrix<Type>> fvmLaplacianUncorrected
         (
             const surfaceScalarField& gammaMagSf,
             const surfaceScalarField& deltaCoeffs,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcLaplacian
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<fvMatrix<Type> > fvmLaplacian
+        tmp<fvMatrix<Type>> fvmLaplacian
         (
             const GeometricField<GType, fvsPatchField, surfaceMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian
+        tmp<GeometricField<Type, fvPatchField, volMesh>> fvcLaplacian
         (
             const GeometricField<GType, fvsPatchField, surfaceMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -139,21 +139,21 @@ public:
 // Use macros to emulate partial-specialisation of the the Laplacian functions
 // for scalar diffusivity gamma
 
-#define defineFvmLaplacianScalarGamma(Type)                                 \
-                                                                            \
-template<>                                                                  \
-tmp<fvMatrix<Type> > gaussLaplacianScheme<Type, scalar>::fvmLaplacian       \
-(                                                                           \
-    const GeometricField<scalar, fvsPatchField, surfaceMesh>&,              \
-    const GeometricField<Type, fvPatchField, volMesh>&                      \
-);                                                                          \
-                                                                            \
-template<>                                                                  \
-tmp<GeometricField<Type, fvPatchField, volMesh> >                           \
-gaussLaplacianScheme<Type, scalar>::fvcLaplacian                            \
-(                                                                           \
-    const GeometricField<scalar, fvsPatchField, surfaceMesh>&,              \
-    const GeometricField<Type, fvPatchField, volMesh>&                      \
+#define defineFvmLaplacianScalarGamma(Type)                                    \
+                                                                               \
+template<>                                                                     \
+tmp<fvMatrix<Type>> gaussLaplacianScheme<Type, scalar>::fvmLaplacian           \
+(                                                                              \
+    const GeometricField<scalar, fvsPatchField, surfaceMesh>&,                 \
+    const GeometricField<Type, fvPatchField, volMesh>&                         \
+);                                                                             \
+                                                                               \
+template<>                                                                     \
+tmp<GeometricField<Type, fvPatchField, volMesh>>                               \
+gaussLaplacianScheme<Type, scalar>::fvcLaplacian                               \
+(                                                                              \
+    const GeometricField<scalar, fvsPatchField, surfaceMesh>&,                 \
+    const GeometricField<Type, fvPatchField, volMesh>&                         \
 );
 
 
@@ -175,7 +175,7 @@ defineFvmLaplacianScalarGamma(tensor);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "gaussLaplacianScheme.C"
+    #include "gaussLaplacianScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C
index b7c2e25b8ab5c2ce5583fbd85d86879114f54015..8afa4447dc6e9d4f8f8ee5c93564a228f5f70185 100644
--- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C
+++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,81 +30,84 @@ License
 
 makeFvLaplacianScheme(gaussLaplacianScheme)
 
-#define declareFvmLaplacianScalarGamma(Type)                                 \
-                                                                             \
-template<>                                                                   \
-Foam::tmp<Foam::fvMatrix<Foam::Type> >                                       \
-Foam::fv::gaussLaplacianScheme<Foam::Type, Foam::scalar>::fvmLaplacian       \
-(                                                                            \
-    const GeometricField<scalar, fvsPatchField, surfaceMesh>& gamma,         \
-    const GeometricField<Type, fvPatchField, volMesh>& vf                    \
-)                                                                            \
-{                                                                            \
-    const fvMesh& mesh = this->mesh();                                       \
-                                                                             \
-    GeometricField<scalar, fvsPatchField, surfaceMesh> gammaMagSf            \
-    (                                                                        \
-        gamma*mesh.magSf()                                                   \
-    );                                                                       \
-                                                                             \
-    tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected                      \
-    (                                                                        \
-        gammaMagSf,                                                          \
-        this->tsnGradScheme_().deltaCoeffs(vf),                              \
-        vf                                                                   \
-    );                                                                       \
-    fvMatrix<Type>& fvm = tfvm();                                            \
-                                                                             \
-    if (this->tsnGradScheme_().corrected())                                  \
-    {                                                                        \
-        if (mesh.fluxRequired(vf.name()))                                    \
-        {                                                                    \
-            fvm.faceFluxCorrectionPtr() = new                                \
-            GeometricField<Type, fvsPatchField, surfaceMesh>                 \
-            (                                                                \
-                gammaMagSf*this->tsnGradScheme_().correction(vf)             \
-            );                                                               \
-                                                                             \
-            fvm.source() -=                                                  \
-                mesh.V()*                                                    \
-                fvc::div                                                     \
-                (                                                            \
-                    *fvm.faceFluxCorrectionPtr()                             \
-                )().internalField();                                         \
-        }                                                                    \
-        else                                                                 \
-        {                                                                    \
-            fvm.source() -=                                                  \
-                mesh.V()*                                                    \
-                fvc::div                                                     \
-                (                                                            \
-                    gammaMagSf*this->tsnGradScheme_().correction(vf)         \
-                )().internalField();                                         \
-        }                                                                    \
-    }                                                                        \
-                                                                             \
-    return tfvm;                                                             \
-}                                                                            \
-                                                                             \
-                                                                             \
-template<>                                                                   \
-Foam::tmp<Foam::GeometricField<Foam::Type, Foam::fvPatchField, Foam::volMesh> >\
-Foam::fv::gaussLaplacianScheme<Foam::Type, Foam::scalar>::fvcLaplacian       \
-(                                                                            \
-    const GeometricField<scalar, fvsPatchField, surfaceMesh>& gamma,         \
-    const GeometricField<Type, fvPatchField, volMesh>& vf                    \
-)                                                                            \
-{                                                                            \
-    const fvMesh& mesh = this->mesh();                                       \
-                                                                             \
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tLaplacian             \
-    (                                                                        \
-        fvc::div(gamma*this->tsnGradScheme_().snGrad(vf)*mesh.magSf())       \
-    );                                                                       \
-                                                                             \
-    tLaplacian().rename("laplacian(" + gamma.name() + ',' + vf.name() + ')');\
-                                                                             \
-    return tLaplacian;                                                       \
+#define declareFvmLaplacianScalarGamma(Type)                                   \
+                                                                               \
+template<>                                                                     \
+Foam::tmp<Foam::fvMatrix<Foam::Type>>                                          \
+Foam::fv::gaussLaplacianScheme<Foam::Type, Foam::scalar>::fvmLaplacian         \
+(                                                                              \
+    const GeometricField<scalar, fvsPatchField, surfaceMesh>& gamma,           \
+    const GeometricField<Type, fvPatchField, volMesh>& vf                      \
+)                                                                              \
+{                                                                              \
+    const fvMesh& mesh = this->mesh();                                         \
+                                                                               \
+    GeometricField<scalar, fvsPatchField, surfaceMesh> gammaMagSf              \
+    (                                                                          \
+        gamma*mesh.magSf()                                                     \
+    );                                                                         \
+                                                                               \
+    tmp<fvMatrix<Type>> tfvm = fvmLaplacianUncorrected                         \
+    (                                                                          \
+        gammaMagSf,                                                            \
+        this->tsnGradScheme_().deltaCoeffs(vf),                                \
+        vf                                                                     \
+    );                                                                         \
+    fvMatrix<Type>& fvm = tfvm.ref();                                          \
+                                                                               \
+    if (this->tsnGradScheme_().corrected())                                    \
+    {                                                                          \
+        if (mesh.fluxRequired(vf.name()))                                      \
+        {                                                                      \
+            fvm.faceFluxCorrectionPtr() = new                                  \
+            GeometricField<Type, fvsPatchField, surfaceMesh>                   \
+            (                                                                  \
+                gammaMagSf*this->tsnGradScheme_().correction(vf)               \
+            );                                                                 \
+                                                                               \
+            fvm.source() -=                                                    \
+                mesh.V()*                                                      \
+                fvc::div                                                       \
+                (                                                              \
+                    *fvm.faceFluxCorrectionPtr()                               \
+                )().internalField();                                           \
+        }                                                                      \
+        else                                                                   \
+        {                                                                      \
+            fvm.source() -=                                                    \
+                mesh.V()*                                                      \
+                fvc::div                                                       \
+                (                                                              \
+                    gammaMagSf*this->tsnGradScheme_().correction(vf)           \
+                )().internalField();                                           \
+        }                                                                      \
+    }                                                                          \
+                                                                               \
+    return tfvm;                                                               \
+}                                                                              \
+                                                                               \
+                                                                               \
+template<>                                                                     \
+Foam::tmp<Foam::GeometricField<Foam::Type, Foam::fvPatchField, Foam::volMesh>>\
+Foam::fv::gaussLaplacianScheme<Foam::Type, Foam::scalar>::fvcLaplacian         \
+(                                                                              \
+    const GeometricField<scalar, fvsPatchField, surfaceMesh>& gamma,           \
+    const GeometricField<Type, fvPatchField, volMesh>& vf                      \
+)                                                                              \
+{                                                                              \
+    const fvMesh& mesh = this->mesh();                                         \
+                                                                               \
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tLaplacian                \
+    (                                                                          \
+        fvc::div(gamma*this->tsnGradScheme_().snGrad(vf)*mesh.magSf())         \
+    );                                                                         \
+                                                                               \
+    tLaplacian.ref().rename                                                    \
+    (                                                                          \
+        "laplacian(" + gamma.name() + ',' + vf.name() + ')'                    \
+    );                                                                         \
+                                                                               \
+    return tLaplacian;                                                         \
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C
index 09c7def17834c215861a0d8eaebe7c1a81929326..fc24a6221e3646b8cf51d4d51e045a28034844d2 100644
--- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C
+++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<laplacianScheme<Type, GType> > laplacianScheme<Type, GType>::New
+tmp<laplacianScheme<Type, GType>> laplacianScheme<Type, GType>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -49,9 +49,7 @@ tmp<laplacianScheme<Type, GType> > laplacianScheme<Type, GType>::New
 {
     if (fv::debug)
     {
-        Info<< "laplacianScheme<Type, GType>::New(const fvMesh&, Istream&) : "
-               "constructing laplacianScheme<Type, GType>"
-            << endl;
+        InfoInFunction << "Constructing laplacianScheme<Type, GType>" << endl;
     }
 
     if (schemeData.eof())
@@ -95,7 +93,7 @@ laplacianScheme<Type, GType>::~laplacianScheme()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type, class GType>
-tmp<fvMatrix<Type> >
+tmp<fvMatrix<Type>>
 laplacianScheme<Type, GType>::fvmLaplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
@@ -107,7 +105,7 @@ laplacianScheme<Type, GType>::fvmLaplacian
 
 
 template<class Type, class GType>
-tmp<GeometricField<Type, fvPatchField, volMesh> >
+tmp<GeometricField<Type, fvPatchField, volMesh>>
 laplacianScheme<Type, GType>::fvcLaplacian
 (
     const GeometricField<GType, fvPatchField, volMesh>& gamma,
diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H
index 781d2044d5b3f3a436d15fe8e14691a266ebc6a2..c88282da1765e0614c2f04a4632dc0c6f519dfa3 100644
--- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H
+++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,7 +65,7 @@ namespace fv
 template<class Type, class GType>
 class laplacianScheme
 :
-    public refCount
+    public tmp<laplacianScheme<Type, GType>>::refCount
 {
 
 protected:
@@ -73,10 +73,12 @@ protected:
     // Protected data
 
         const fvMesh& mesh_;
-        tmp<surfaceInterpolationScheme<GType> > tinterpGammaScheme_;
-        tmp<snGradScheme<Type> > tsnGradScheme_;
+        tmp<surfaceInterpolationScheme<GType>> tinterpGammaScheme_;
+        tmp<snGradScheme<Type>> tsnGradScheme_;
 
 
+private:
+
     // Private Member Functions
 
         //- Disallow copy construct
@@ -121,12 +123,12 @@ public:
             tinterpGammaScheme_(NULL),
             tsnGradScheme_(NULL)
         {
-            tinterpGammaScheme_ = tmp<surfaceInterpolationScheme<GType> >
+            tinterpGammaScheme_ = tmp<surfaceInterpolationScheme<GType>>
             (
                 surfaceInterpolationScheme<GType>::New(mesh, is)
             );
 
-            tsnGradScheme_ = tmp<snGradScheme<Type> >
+            tsnGradScheme_ = tmp<snGradScheme<Type>>
             (
                 snGradScheme<Type>::New(mesh, is)
             );
@@ -136,8 +138,8 @@ public:
         laplacianScheme
         (
             const fvMesh& mesh,
-            const tmp<surfaceInterpolationScheme<GType> >& igs,
-            const tmp<snGradScheme<Type> >& sngs
+            const tmp<surfaceInterpolationScheme<GType>>& igs,
+            const tmp<snGradScheme<Type>>& sngs
         )
         :
             mesh_(mesh),
@@ -149,7 +151,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new laplacianScheme created on freestore
-        static tmp<laplacianScheme<Type, GType> > New
+        static tmp<laplacianScheme<Type, GType>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
@@ -168,30 +170,30 @@ public:
             return mesh_;
         }
 
-        virtual tmp<fvMatrix<Type> > fvmLaplacian
+        virtual tmp<fvMatrix<Type>> fvmLaplacian
         (
             const GeometricField<GType, fvsPatchField, surfaceMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<fvMatrix<Type> > fvmLaplacian
+        virtual tmp<fvMatrix<Type>> fvmLaplacian
         (
             const GeometricField<GType, fvPatchField, volMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         );
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcLaplacian
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcLaplacian
         (
             const GeometricField<GType, fvsPatchField, surfaceMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
         ) = 0;
 
-        virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian
+        virtual tmp<GeometricField<Type, fvPatchField, volMesh>> fvcLaplacian
         (
             const GeometricField<GType, fvPatchField, volMesh>&,
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -222,7 +224,7 @@ public:
             typedef SS<Type, GType> SS##Type##GType;                           \
                                                                                \
             laplacianScheme<Type, GType>::                                     \
-                addIstreamConstructorToTable<SS<Type, GType> >                 \
+                addIstreamConstructorToTable<SS<Type, GType>>                  \
                 add##SS##Type##GType##IstreamConstructorToTable_;              \
         }                                                                      \
     }
@@ -249,7 +251,7 @@ makeFvLaplacianTypeScheme(SS, tensor, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "laplacianScheme.C"
+    #include "laplacianScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianSchemes.C b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianSchemes.C
index 9da25a2cb0a800d7f88139c4885cc2ab4f5f5d66..87b20c53db2372334fa71e6ac2609425a0d7ca4c 100644
--- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianSchemes.C
+++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,13 +38,13 @@ namespace fv
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 // Define the constructor function hash tables
 
-#define makeLaplacianGTypeScheme(Type, GType)                                 \
-    typedef laplacianScheme<Type, GType> laplacianScheme##Type##GType;        \
+#define makeLaplacianGTypeScheme(Type, GType)                                  \
+    typedef laplacianScheme<Type, GType> laplacianScheme##Type##GType;         \
     defineTemplateRunTimeSelectionTable(laplacianScheme##Type##GType, Istream);
 
-#define makeLaplacianScheme(Type)                                             \
-    makeLaplacianGTypeScheme(Type, scalar);                                   \
-    makeLaplacianGTypeScheme(Type, symmTensor);                               \
+#define makeLaplacianScheme(Type)                                              \
+    makeLaplacianGTypeScheme(Type, scalar);                                    \
+    makeLaplacianGTypeScheme(Type, symmTensor);                                \
     makeLaplacianGTypeScheme(Type, tensor);
 
 makeLaplacianScheme(scalar);
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C
index f71471dc9ad5e6a1c24879a6f79f218c22801db5..b1bf85aa8ec1bbf63974af8e39bca52360d4174c 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,16 +52,15 @@ Foam::CentredFitSnGradData<Polynomial>::CentredFitSnGradData
 {
     if (debug)
     {
-        Info<< "Contructing CentredFitSnGradData<Polynomial>" << endl;
+        InfoInFunction
+            << "Contructing CentredFitSnGradData<Polynomial>" << endl;
     }
 
     calcFit();
 
     if (debug)
     {
-        Info<< "CentredFitSnGradData<Polynomial>::CentredFitSnGradData() :"
-            << "Finished constructing polynomialFit data"
-            << endl;
+        Info<< "    Finished constructing polynomialFit data" << endl;
     }
 }
 
@@ -121,10 +120,10 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit
     }
 
     // Additional weighting for constant and linear terms
-    for (label i = 0; i < B.n(); i++)
+    for (label i = 0; i < B.m(); i++)
     {
-        B[i][0] *= wts[0];
-        B[i][1] *= wts[0];
+        B(i, 0) *= wts[0];
+        B(i, 1) *= wts[0];
     }
 
     // Set the fit
@@ -138,14 +137,14 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit
 
         for (label i=0; i<stencilSize; i++)
         {
-            coeffsi[i] = wts[1]*wts[i]*svd.VSinvUt()[1][i]/scale;
+            coeffsi[i] = wts[1]*wts[i]*svd.VSinvUt()(1, i)/scale;
         }
 
         goodFit =
         (
-            mag(wts[0]*wts[0]*svd.VSinvUt()[0][0] - wLin)
+            mag(wts[0]*wts[0]*svd.VSinvUt()(0, 0) - wLin)
           < this->linearLimitFactor()*wLin)
-         && (mag(wts[0]*wts[1]*svd.VSinvUt()[0][1] - (1 - wLin)
+         && (mag(wts[0]*wts[1]*svd.VSinvUt()(0, 1) - (1 - wLin)
         ) < this->linearLimitFactor()*(1 - wLin))
          && coeffsi[0] < 0 && coeffsi[1] > 0
          && mag(coeffsi[0] + deltaCoeff) < 0.5*deltaCoeff
@@ -164,25 +163,25 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit
                 << "    deltaCoeff " << deltaCoeff << nl
                 << "    sing vals " << svd.S() << nl
                 << "Components of goodFit:\n"
-                << "    wts[0]*wts[0]*svd.VSinvUt()[0][0] = "
-                << wts[0]*wts[0]*svd.VSinvUt()[0][0] << nl
-                << "    wts[0]*wts[1]*svd.VSinvUt()[0][1] = "
-                << wts[0]*wts[1]*svd.VSinvUt()[0][1]
+                << "    wts[0]*wts[0]*svd.VSinvUt()(0, 0) = "
+                << wts[0]*wts[0]*svd.VSinvUt()(0, 0) << nl
+                << "    wts[0]*wts[1]*svd.VSinvUt()(0, 1) = "
+                << wts[0]*wts[1]*svd.VSinvUt()(0, 1)
                 << " dim = " << this->dim() << endl;
 
             wts[0] *= 10;
             wts[1] *= 10;
 
-            for (label j = 0; j < B.m(); j++)
+            for (label j = 0; j < B.n(); j++)
             {
-                B[0][j] *= 10;
-                B[1][j] *= 10;
+                B(0, j) *= 10;
+                B(1, j) *= 10;
             }
 
-            for (label i = 0; i < B.n(); i++)
+            for (label i = 0; i < B.m(); i++)
             {
-                B[i][0] *= 10;
-                B[i][1] *= 10;
+                B(i, 0) *= 10;
+                B(i, 1) *= 10;
             }
         }
     }
@@ -213,7 +212,7 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit()
     // Get the cell/face centres in stencil order.
     // Centred face stencils no good for triangles or tets.
     // Need bigger stencils
-    List<List<point> > stencilPoints(mesh.nFaces());
+    List<List<point>> stencilPoints(mesh.nFaces());
     this->stencil().collectData(mesh.C(), stencilPoints);
 
     // find the fit coefficients for every face in the mesh
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.H b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.H
index be834684a7bbd4f536cfd4d6316d08633be5fb8f..369f195f3c70dd91944deea33f68c7d1f989cae5 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CentredFitSnGradData.C"
+    #include "CentredFitSnGradData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradScheme.H
index 4cebfa3e7b3fb10aa83d77a232d4bd61db31af84..f06951f10982cc9082898d1909d4a9e82ddee54f 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradScheme.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -132,12 +132,12 @@ public:
                     centralWeight_
                 );
 
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > sft
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> sft
             (
                 stencil.weightedSum(vf, cfd.coeffs())
             );
 
-            sft().dimensions() /= dimLength;
+            sft.ref().dimensions() /= dimLength;
 
             return sft;
         }
@@ -169,7 +169,7 @@ public:
         namespace fv                                                           \
         {                                                                      \
             snGradScheme<TYPE>::addMeshConstructorToTable                      \
-                <CentredFitSnGradScheme<TYPE, POLYNOMIAL, STENCIL> >           \
+                <CentredFitSnGradScheme<TYPE, POLYNOMIAL, STENCIL>>            \
                 add##SS##STENCIL##TYPE##MeshConstructorToTable_;               \
         }                                                                      \
     }
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C
index 56d087107e07e1c008615ee06261bc6db653dae3..305743076c27f4c6c8873b2ba4e1bb2018bf98c2 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ Foam::fv::correctedSnGrad<Type>::~correctedSnGrad()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fv::correctedSnGrad<Type>::fullGradCorrection
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -49,24 +49,24 @@ Foam::fv::correctedSnGrad<Type>::fullGradCorrection
     const fvMesh& mesh = this->mesh();
 
     // construct GeometricField<Type, fvsPatchField, surfaceMesh>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tssf =
-        mesh.nonOrthCorrectionVectors()
-      & linear<typename outerProduct<vector, Type>::type>(mesh).interpolate
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tssf =
+        linear<typename outerProduct<vector, Type>::type>(mesh).dotInterpolate
         (
+            mesh.nonOrthCorrectionVectors(),
             gradScheme<Type>::New
             (
                 mesh,
                 mesh.gradScheme("grad(" + vf.name() + ')')
             )().grad(vf, "grad(" + vf.name() + ')')
         );
-    tssf().rename("snGradCorr(" + vf.name() + ')');
+    tssf.ref().rename("snGradCorr(" + vf.name() + ')');
 
     return tssf;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fv::correctedSnGrad<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -75,7 +75,7 @@ Foam::fv::correctedSnGrad<Type>::correction
     const fvMesh& mesh = this->mesh();
 
     // construct GeometricField<Type, fvsPatchField, surfaceMesh>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tssf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tssf
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -91,7 +91,7 @@ Foam::fv::correctedSnGrad<Type>::correction
             vf.dimensions()*mesh.nonOrthDeltaCoeffs().dimensions()
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tssf();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tssf.ref();
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.H b/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.H
index 1361ed9de27fdce7db5c39374d1ea3ee4e821039..57224578dc091ebfc6d9d74db7fa643b19fcbb7a 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/correctedSnGrad/correctedSnGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
 
         //- Return the explicit correction to the correctedSnGrad
         //  for the given field using the gradient of the field
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         fullGradCorrection
         (
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -115,7 +115,7 @@ public:
 
         //- Return the explicit correction to the correctedSnGrad
         //  for the given field using the gradients of the field components
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const;
 };
 
@@ -147,7 +147,7 @@ tmp<surfaceVectorField> correctedSnGrad<vector>::correction
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "correctedSnGrad.C"
+    #include "correctedSnGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C
index 6b04bb2efb4be28927c3b500fd98b2ee4837f615..e67bc081e32b0900df110eebcb49469b3f9ca281 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::~faceCorrectedSnGrad()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -51,7 +51,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
     );
 
     // construct GeometricField<Type, fvsPatchField, surfaceMesh>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -68,7 +68,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
         )
     );
 
-    Field<Type>& sfCorr = tsfCorr().internalField();
+    Field<Type>& sfCorr = tsfCorr.ref().internalField();
 
     const pointField& points = mesh.points();
     const faceList& faces = mesh.faces();
@@ -116,14 +116,14 @@ Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
         sfCorr[facei] = dCorr&fgrad;
     }
 
-    tsfCorr().boundaryField() = pTraits<Type>::zero;
+    tsfCorr.ref().boundaryField() = Zero;
 
     return tsfCorr;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fv::faceCorrectedSnGrad<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -132,7 +132,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::correction
     const fvMesh& mesh = this->mesh();
 
     // construct GeometricField<Type, fvsPatchField, surfaceMesh>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tssf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tssf
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -148,7 +148,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::correction
             vf.dimensions()*mesh.nonOrthDeltaCoeffs().dimensions()
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tssf();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tssf.ref();
 
     for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
     {
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.H b/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.H
index a13dd62d18e2c6ccb775d549ea1d98542ec21981..fcbcfd6089f76ed2f7b61bf8e32b8d0f670e70cc 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
 
         //- Return the explicit correction to the faceCorrectedSnGrad
         //  for the given field using the gradient of the field
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         fullGradCorrection
         (
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -115,7 +115,7 @@ public:
 
         //- Return the explicit correction to the faceCorrectedSnGrad
         //  for the given field using the gradients of the field components
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const;
 };
 
@@ -147,7 +147,7 @@ tmp<surfaceVectorField> faceCorrectedSnGrad<vector>::correction
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "faceCorrectedSnGrad.C"
+    #include "faceCorrectedSnGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.C
index 63d81a996fd67637df168092f9d30de8f3c82db7..308ad6cad7aa7bad30b1a4b904569de4bd72d05c 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ limitedSnGrad<Type>::~limitedSnGrad()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 limitedSnGrad<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -76,7 +76,8 @@ limitedSnGrad<Type>::correction
 
     if (fv::debug)
     {
-        Info<< "limitedSnGrad :: limiter min: " << min(limiter.internalField())
+        InfoInFunction
+            << "limiter min: " << min(limiter.internalField())
             << " max: "<< max(limiter.internalField())
             << " avg: " << average(limiter.internalField()) << endl;
     }
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.H b/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.H
index ca9b2a8a5d00fbcfe2c7bb48173f6bfe6920561f..a2c836bc0042de3954f17b258a5ddb9dd78ad2cd 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/limitedSnGrad/limitedSnGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ class limitedSnGrad
 {
     // Private data
 
-        tmp<snGradScheme<Type> > correctedScheme_;
+        tmp<snGradScheme<Type>> correctedScheme_;
 
         scalar limitCoeff_;
 
@@ -83,14 +83,14 @@ class limitedSnGrad
 
         //- Lookup function for the corrected to support backward compatibility
         //  of dictionary specification
-        tmp<snGradScheme<Type> > lookupCorrectedScheme(Istream& schemeData)
+        tmp<snGradScheme<Type>> lookupCorrectedScheme(Istream& schemeData)
         {
             token nextToken(schemeData);
 
             if (nextToken.isNumber())
             {
                 limitCoeff_ = nextToken.number();
-                return tmp<snGradScheme<Type> >
+                return tmp<snGradScheme<Type>>
                 (
                     new correctedSnGrad<Type>(this->mesh())
                 );
@@ -98,7 +98,7 @@ class limitedSnGrad
             else
             {
                 schemeData.putBack(nextToken);
-                tmp<snGradScheme<Type> > tcorrectedScheme
+                tmp<snGradScheme<Type>> tcorrectedScheme
                 (
                     fv::snGradScheme<Type>::New(this->mesh(), schemeData)
                 );
@@ -168,7 +168,7 @@ public:
 
         //- Return the explicit correction to the limitedSnGrad
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const;
 };
 
@@ -184,7 +184,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "limitedSnGrad.C"
+    #include "limitedSnGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C
index 8ae3b152432716bbdbd25ff624cbbbd7e4924c4d..f1249ad65fae13a33f97bd9e9900468f1b186d4d 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,14 +50,14 @@ orthogonalSnGrad<Type>::~orthogonalSnGrad()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 orthogonalSnGrad<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>&
 ) const
 {
     NotImplemented;
-    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >(NULL);
+    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL);
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.H b/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.H
index b903298162f7032a6f8095043182d5410be9c084..2c08e57162f53e967bf111294e26f0ea7891909a 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/orthogonalSnGrad/orthogonalSnGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
 
         //- Return the explicit correction to the orthogonalSnGrad
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const;
 };
 
@@ -123,7 +123,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "orthogonalSnGrad.C"
+    #include "orthogonalSnGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C
index 7484c060a27be33033c36ef08584500b6450a411..f5c28f080c517a1e39dfa655ef6e874659fe33f9 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ namespace fv
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<snGradScheme<Type> > snGradScheme<Type>::New
+tmp<snGradScheme<Type>> snGradScheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -50,9 +50,7 @@ tmp<snGradScheme<Type> > snGradScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "snGradScheme<Type>::New(const fvMesh&, Istream&)"
-               " : constructing snGradScheme<Type>"
-            << endl;
+        InfoInFunction << "Constructing snGradScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
@@ -98,7 +96,7 @@ snGradScheme<Type>::~snGradScheme()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGradScheme<Type>::snGrad
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
@@ -109,7 +107,7 @@ snGradScheme<Type>::snGrad
     const fvMesh& mesh = vf.mesh();
 
     // construct GeometricField<Type, fvsPatchField, surfaceMesh>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -125,7 +123,7 @@ snGradScheme<Type>::snGrad
             vf.dimensions()*tdeltaCoeffs().dimensions()
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tsf();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tsf.ref();
 
     // set reference to difference factors array
     const scalarField& deltaCoeffs = tdeltaCoeffs().internalField();
@@ -160,7 +158,7 @@ snGradScheme<Type>::snGrad
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGradScheme<Type>::sndGrad
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
@@ -171,39 +169,35 @@ snGradScheme<Type>::sndGrad
 }
 
 
-//- Return the face-snGrad of the given cell field
-//  with explicit correction
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGradScheme<Type>::snGrad
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
     (
         snGrad(vf, deltaCoeffs(vf))
     );
 
     if (corrected())
     {
-        tsf() += correction(vf);
+        tsf.ref() += correction(vf);
     }
 
     return tsf;
 }
 
 
-//- Return the face-snGrad of the given cell field
-//  with explicit correction
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 snGradScheme<Type>::snGrad
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 ) const
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
     (
         snGrad(tvf())
     );
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H
index e507cc837f914dbd54e2d36993e12d93a67c87ec..db7ad52082ccae1a155d09052c29adbf312e2116 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ namespace fv
 template<class Type>
 class snGradScheme
 :
-    public refCount
+    public tmp<snGradScheme<Type>>::refCount
 {
     // Private data
 
@@ -70,6 +70,9 @@ class snGradScheme
 
     // Private Member Functions
 
+        //- Disallow copy construct
+        snGradScheme(const snGradScheme&);
+
         //- Disallow default bitwise assignment
         void operator=(const snGradScheme&);
 
@@ -104,7 +107,7 @@ public:
     // Selectors
 
         //- Return new tmp interpolation scheme
-        static tmp<snGradScheme<Type> > New
+        static tmp<snGradScheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
@@ -125,7 +128,7 @@ public:
 
 
         //- Return the snGrad of the given cell field with the given deltaCoeffs
-        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         snGrad
         (
             const GeometricField<Type, fvPatchField, volMesh>&,
@@ -134,7 +137,7 @@ public:
         );
 
         //- Return the sndGrad of the given cell field
-        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         sndGrad
         (
             const GeometricField<Type, fvPatchField, volMesh>&,
@@ -155,23 +158,23 @@ public:
 
         //- Return the explicit correction to the snGrad
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const
         {
-            return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >(NULL);
+            return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL);
         }
 
         //- Return the snGrad of the given cell field
         //  with explicit correction
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         snGrad(const GeometricField<Type, fvPatchField, volMesh>&) const;
 
         //- Return the snGrad of the given tmp cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         snGrad
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 };
 
@@ -195,7 +198,7 @@ public:
     {                                                                          \
         namespace fv                                                           \
         {                                                                      \
-            snGradScheme<Type>::addMeshConstructorToTable<SS<Type> >           \
+            snGradScheme<Type>::addMeshConstructorToTable<SS<Type>>            \
                 add##SS##Type##MeshConstructorToTable_;                        \
         }                                                                      \
     }
@@ -212,7 +215,7 @@ makeSnGradTypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "snGradScheme.C"
+    #include "snGradScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C
index 32344459fd1234cd57ec7ed6b95b683bdd98b62d..5693e6cb7fad0902d22b7826da8dd546c30ef342 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,14 +50,14 @@ uncorrectedSnGrad<Type>::~uncorrectedSnGrad()
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 uncorrectedSnGrad<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>&
 ) const
 {
     NotImplemented;
-    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >(NULL);
+    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL);
 }
 
 
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.H b/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.H
index 082eeabbd0af37c9f5295878037503314f419b66..9ed87c76d207bed99e822fb49e4e9d37a0839792 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.H
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/uncorrectedSnGrad/uncorrectedSnGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
 
         //- Return the explicit correction to the uncorrectedSnGrad
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const;
 };
 
@@ -123,7 +123,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "uncorrectedSnGrad.C"
+    #include "uncorrectedSnGrad.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
index 882517721888accc78479d358c6a88a0b1c6b8dc..1d1e9ee52976e47471bf229106f9b134dbcd1473 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 #include "volFields.H"
 #include "surfaceFields.H"
 #include "calculatedFvPatchFields.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "coupledFvPatchFields.H"
 #include "UIndirectList.H"
 
@@ -60,7 +60,7 @@ template<class Type2>
 void Foam::fvMatrix<Type>::addToInternalField
 (
     const labelUList& addr,
-    const tmp<Field<Type2> >& tpf,
+    const tmp<Field<Type2>>& tpf,
     Field<Type2>& intf
 ) const
 {
@@ -97,7 +97,7 @@ template<class Type2>
 void Foam::fvMatrix<Type>::subtractFromInternalField
 (
     const labelUList& addr,
-    const tmp<Field<Type2> >& tpf,
+    const tmp<Field<Type2>>& tpf,
     Field<Type2>& intf
 ) const
 {
@@ -158,7 +158,7 @@ void Foam::fvMatrix<Type>::addBoundarySource
         }
         else if (couples)
         {
-            tmp<Field<Type> > tpnf = ptf.patchNeighbourField();
+            const tmp<Field<Type>> tpnf = ptf.patchNeighbourField();
             const Field<Type>& pnf = tpnf();
 
             const labelUList& addr = lduAddr().patchAddr(patchI);
@@ -249,10 +249,10 @@ void Foam::fvMatrix<Type>::setValuesFromList
                             mesh.boundaryMesh()[patchi].whichFace(facei);
 
                         internalCoeffs_[patchi][patchFacei] =
-                            pTraits<Type>::zero;
+                            Zero;
 
                         boundaryCoeffs_[patchi][patchFacei] =
-                            pTraits<Type>::zero;
+                            Zero;
                     }
                 }
             }
@@ -273,17 +273,15 @@ Foam::fvMatrix<Type>::fvMatrix
     lduMatrix(psi.mesh()),
     psi_(psi),
     dimensions_(ds),
-    source_(psi.size(), pTraits<Type>::zero),
+    source_(psi.size(), Zero),
     internalCoeffs_(psi.mesh().boundary().size()),
     boundaryCoeffs_(psi.mesh().boundary().size()),
     faceFluxCorrectionPtr_(NULL)
 {
     if (debug)
     {
-        Info<< "fvMatrix<Type>(GeometricField<Type, fvPatchField, volMesh>&,"
-               " const dimensionSet&) : "
-               "constructing fvMatrix<Type> for field " << psi_.name()
-            << endl;
+        InfoInFunction
+            << "Constructing fvMatrix<Type> for field " << psi_.name() << endl;
     }
 
     // Initialise coupling coefficients
@@ -295,7 +293,7 @@ Foam::fvMatrix<Type>::fvMatrix
             new Field<Type>
             (
                 psi.mesh().boundary()[patchI].size(),
-                pTraits<Type>::zero
+                Zero
             )
         );
 
@@ -305,7 +303,7 @@ Foam::fvMatrix<Type>::fvMatrix
             new Field<Type>
             (
                 psi.mesh().boundary()[patchI].size(),
-                pTraits<Type>::zero
+                Zero
             )
         );
     }
@@ -323,7 +321,7 @@ Foam::fvMatrix<Type>::fvMatrix
 template<class Type>
 Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
 :
-    refCount(),
+    tmp<fvMatrix<Type>>::refCount(),
     lduMatrix(fvm),
     psi_(fvm.psi_),
     dimensions_(fvm.dimensions_),
@@ -334,9 +332,8 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
 {
     if (debug)
     {
-        Info<< "fvMatrix<Type>::fvMatrix(const fvMatrix<Type>&) : "
-            << "copying fvMatrix<Type> for field " << psi_.name()
-            << endl;
+        InfoInFunction
+            << "Copying fvMatrix<Type> for field " << psi_.name() << endl;
     }
 
     if (fvm.faceFluxCorrectionPtr_)
@@ -352,9 +349,8 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
 
 #ifndef NoConstructFromTmp
 template<class Type>
-Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type> >& tfvm)
+Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm)
 :
-    refCount(),
     lduMatrix
     (
         const_cast<fvMatrix<Type>&>(tfvm()),
@@ -381,9 +377,8 @@ Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type> >& tfvm)
 {
     if (debug)
     {
-        Info<< "fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type> >&) : "
-            << "copying fvMatrix<Type> for field " << psi_.name()
-            << endl;
+        InfoInFunction
+            << "Copying fvMatrix<Type> for field " << psi_.name() << endl;
     }
 
     if (tfvm().faceFluxCorrectionPtr_)
@@ -425,10 +420,8 @@ Foam::fvMatrix<Type>::fvMatrix
 {
     if (debug)
     {
-        Info<< "fvMatrix<Type>"
-               "(GeometricField<Type, fvPatchField, volMesh>&, Istream&) : "
-               "constructing fvMatrix<Type> for field " << psi_.name()
-            << endl;
+        InfoInFunction
+            << "Constructing fvMatrix<Type> for field " << psi_.name() << endl;
     }
 
     // Initialise coupling coefficients
@@ -440,7 +433,7 @@ Foam::fvMatrix<Type>::fvMatrix
             new Field<Type>
             (
                 psi.mesh().boundary()[patchI].size(),
-                pTraits<Type>::zero
+                Zero
             )
         );
 
@@ -450,7 +443,7 @@ Foam::fvMatrix<Type>::fvMatrix
             new Field<Type>
             (
                 psi.mesh().boundary()[patchI].size(),
-                pTraits<Type>::zero
+                Zero
             )
         );
     }
@@ -463,9 +456,8 @@ Foam::fvMatrix<Type>::~fvMatrix()
 {
     if (debug)
     {
-        Info<< "fvMatrix<Type>::~fvMatrix<Type>() : "
-            << "destroying fvMatrix<Type> for field " << psi_.name()
-            << endl;
+        InfoInFunction
+            << "Destroying fvMatrix<Type> for field " << psi_.name() << endl;
     }
 
     if (faceFluxCorrectionPtr_)
@@ -526,8 +518,7 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha)
     if (debug)
     {
         InfoInFunction
-            << "Relaxing " << psi_.name() << " by " << alpha
-            << endl;
+            << "Relaxing " << psi_.name() << " by " << alpha << endl;
     }
 
     Field<Type>& S = source();
@@ -701,15 +692,15 @@ template<class Type>
 Foam::tmp<Foam::scalarField> Foam::fvMatrix<Type>::D() const
 {
     tmp<scalarField> tdiag(new scalarField(diag()));
-    addCmptAvBoundaryDiag(tdiag());
+    addCmptAvBoundaryDiag(tdiag.ref());
     return tdiag;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::DD() const
+Foam::tmp<Foam::Field<Type>> Foam::fvMatrix<Type>::DD() const
 {
-    tmp<Field<Type> > tdiag(pTraits<Type>::one*diag());
+    tmp<Field<Type>> tdiag(pTraits<Type>::one*diag());
 
     forAll(psi_.boundaryField(), patchI)
     {
@@ -721,7 +712,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::DD() const
             (
                 lduAddr().patchAddr(patchI),
                 internalCoeffs_[patchI],
-                tdiag()
+                tdiag.ref()
             );
         }
     }
@@ -747,22 +738,22 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::A() const
             ),
             psi_.mesh(),
             dimensions_/psi_.dimensions()/dimVol,
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    tAphi().internalField() = D()/psi_.mesh().V();
-    tAphi().correctBoundaryConditions();
+    tAphi.ref().internalField() = D()/psi_.mesh().V();
+    tAphi.ref().correctBoundaryConditions();
 
     return tAphi;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::fvMatrix<Type>::H() const
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tHphi
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tHphi
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -776,10 +767,10 @@ Foam::fvMatrix<Type>::H() const
             ),
             psi_.mesh(),
             dimensions_/dimVol,
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& Hphi = tHphi();
+    GeometricField<Type, fvPatchField, volMesh>& Hphi = tHphi.ref();
 
     // Loop over field components
     for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
@@ -838,10 +829,10 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::H1() const
             ),
             psi_.mesh(),
             dimensions_/(dimVol*psi_.dimensions()),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
-    volScalarField& H1_ = tH1();
+    volScalarField& H1_ = tH1.ref();
 
     H1_.internalField() = lduMatrix::H1();
 
@@ -868,7 +859,7 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::H1() const
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fvMatrix<Type>::
 flux() const
 {
@@ -882,7 +873,7 @@ flux() const
     }
 
     // construct GeometricField<Type, fvsPatchField, surfaceMesh>
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tfieldFlux
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tfieldFlux
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -898,7 +889,8 @@ flux() const
             dimensions()
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& fieldFlux = tfieldFlux();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& fieldFlux =
+        tfieldFlux.ref();
 
     for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
     {
@@ -990,7 +982,7 @@ void Foam::fvMatrix<Type>::operator=(const fvMatrix<Type>& fvmv)
 
 
 template<class Type>
-void Foam::fvMatrix<Type>::operator=(const tmp<fvMatrix<Type> >& tfvmv)
+void Foam::fvMatrix<Type>::operator=(const tmp<fvMatrix<Type>>& tfvmv)
 {
     operator=(tfvmv());
     tfvmv.clear();
@@ -1039,7 +1031,7 @@ void Foam::fvMatrix<Type>::operator+=(const fvMatrix<Type>& fvmv)
 
 
 template<class Type>
-void Foam::fvMatrix<Type>::operator+=(const tmp<fvMatrix<Type> >& tfvmv)
+void Foam::fvMatrix<Type>::operator+=(const tmp<fvMatrix<Type>>& tfvmv)
 {
     operator+=(tfvmv());
     tfvmv.clear();
@@ -1071,7 +1063,7 @@ void Foam::fvMatrix<Type>::operator-=(const fvMatrix<Type>& fvmv)
 
 
 template<class Type>
-void Foam::fvMatrix<Type>::operator-=(const tmp<fvMatrix<Type> >& tfvmv)
+void Foam::fvMatrix<Type>::operator-=(const tmp<fvMatrix<Type>>& tfvmv)
 {
     operator-=(tfvmv());
     tfvmv.clear();
@@ -1092,7 +1084,7 @@ void Foam::fvMatrix<Type>::operator+=
 template<class Type>
 void Foam::fvMatrix<Type>::operator+=
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     operator+=(tsu());
@@ -1103,7 +1095,7 @@ void Foam::fvMatrix<Type>::operator+=
 template<class Type>
 void Foam::fvMatrix<Type>::operator+=
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     operator+=(tsu());
@@ -1125,7 +1117,7 @@ void Foam::fvMatrix<Type>::operator-=
 template<class Type>
 void Foam::fvMatrix<Type>::operator-=
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     operator-=(tsu());
@@ -1136,7 +1128,7 @@ void Foam::fvMatrix<Type>::operator-=
 template<class Type>
 void Foam::fvMatrix<Type>::operator-=
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     operator-=(tsu());
@@ -1213,7 +1205,7 @@ void Foam::fvMatrix<Type>::operator*=
 template<class Type>
 void Foam::fvMatrix<Type>::operator*=
 (
-    const tmp<DimensionedField<scalar, volMesh> >& tdsf
+    const tmp<DimensionedField<scalar, volMesh>>& tdsf
 )
 {
     operator*=(tdsf());
@@ -1339,7 +1331,7 @@ Foam::SolverPerformance<Type> Foam::solve
 template<class Type>
 Foam::SolverPerformance<Type> Foam::solve
 (
-    const tmp<fvMatrix<Type> >& tfvm,
+    const tmp<fvMatrix<Type>>& tfvm,
     const dictionary& solverControls
 )
 {
@@ -1359,7 +1351,7 @@ Foam::SolverPerformance<Type> Foam::solve(fvMatrix<Type>& fvm)
 }
 
 template<class Type>
-Foam::SolverPerformance<Type> Foam::solve(const tmp<fvMatrix<Type> >& tfvm)
+Foam::SolverPerformance<Type> Foam::solve(const tmp<fvMatrix<Type>>& tfvm)
 {
     SolverPerformance<Type> solverPerf =
         const_cast<fvMatrix<Type>&>(tfvm()).solve();
@@ -1371,12 +1363,12 @@ Foam::SolverPerformance<Type> Foam::solve(const tmp<fvMatrix<Type> >& tfvm)
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
+Foam::tmp<Foam::fvMatrix<Type>> Foam::correction
 (
     const fvMatrix<Type>& A
 )
 {
-    tmp<Foam::fvMatrix<Type> > tAcorr = A - (A & A.psi());
+    tmp<Foam::fvMatrix<Type>> tAcorr = A - (A & A.psi());
 
     if
     (
@@ -1392,12 +1384,12 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
+Foam::tmp<Foam::fvMatrix<Type>> Foam::correction
 (
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
-    tmp<Foam::fvMatrix<Type> > tAcorr = tA - (tA() & tA().psi());
+    tmp<Foam::fvMatrix<Type>> tAcorr = tA - (tA() & tA().psi());
 
     // Note the matrix coefficients are still that of matrix A
     const fvMatrix<Type>& A = tAcorr();
@@ -1408,7 +1400,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
      && A.psi().mesh().fluxRequired(A.psi().name())
     )
     {
-        tAcorr().faceFluxCorrectionPtr() = (-A.flux()).ptr();
+        tAcorr.ref().faceFluxCorrectionPtr() = (-A.flux()).ptr();
     }
 
     return tAcorr;
@@ -1418,7 +1410,7 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
     const fvMatrix<Type>& B
@@ -1429,9 +1421,9 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const fvMatrix<Type>& B
 )
 {
@@ -1440,10 +1432,10 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
-    const tmp<fvMatrix<Type> >& tB
+    const tmp<fvMatrix<Type>>& tB
 )
 {
     checkMethod(A, tB(), "==");
@@ -1451,10 +1443,10 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<fvMatrix<Type> >& tB
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<fvMatrix<Type>>& tB
 )
 {
     checkMethod(tA(), tB(), "==");
@@ -1462,115 +1454,115 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
     const DimensionedField<Type, volMesh>& su
 )
 {
     checkMethod(A, su, "==");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     checkMethod(A, tsu(), "==");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     checkMethod(A, tsu(), "==");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const DimensionedField<Type, volMesh>& su
 )
 {
     checkMethod(tA(), su, "==");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     checkMethod(tA(), tsu(), "==");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     checkMethod(tA(), tsu(), "==");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
     const dimensioned<Type>& su
 )
 {
     checkMethod(A, su, "==");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += A.psi().mesh().V()*su.value();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += A.psi().mesh().V()*su.value();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const dimensioned<Type>& su
 )
 {
     checkMethod(tA(), su, "==");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += tC().psi().mesh().V()*su.value();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += tC().psi().mesh().V()*su.value();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
     const fvMatrix<Type>& A,
     const zero&
@@ -1581,9 +1573,9 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator==
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const zero&
 )
 {
@@ -1592,683 +1584,683 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::operator==
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A
 )
 {
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().negate();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().negate();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().negate();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().negate();
     return tC;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const fvMatrix<Type>& A,
     const fvMatrix<Type>& B
 )
 {
     checkMethod(A, B, "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC() += B;
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref() += B;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const fvMatrix<Type>& B
 )
 {
     checkMethod(tA(), B, "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() += B;
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() += B;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const fvMatrix<Type>& A,
-    const tmp<fvMatrix<Type> >& tB
+    const tmp<fvMatrix<Type>>& tB
 )
 {
     checkMethod(A, tB(), "+");
-    tmp<fvMatrix<Type> > tC(tB.ptr());
-    tC() += A;
+    tmp<fvMatrix<Type>> tC(tB.ptr());
+    tC.ref() += A;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<fvMatrix<Type> >& tB
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<fvMatrix<Type>>& tB
 )
 {
     checkMethod(tA(), tB(), "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() += tB();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() += tB();
     tB.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const fvMatrix<Type>& A,
     const DimensionedField<Type, volMesh>& su
 )
 {
     checkMethod(A, su, "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const fvMatrix<Type>& A,
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     checkMethod(A, tsu(), "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const fvMatrix<Type>& A,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     checkMethod(A, tsu(), "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const DimensionedField<Type, volMesh>& su
 )
 {
     checkMethod(tA(), su, "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     checkMethod(tA(), tsu(), "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     checkMethod(tA(), tsu(), "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const DimensionedField<Type, volMesh>& su,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, su, "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu,
+    const tmp<DimensionedField<Type, volMesh>>& tsu,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, tsu(), "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, tsu(), "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const DimensionedField<Type, volMesh>& su,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), su, "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<DimensionedField<Type, volMesh>>& tsu,
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), tsu(), "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), tsu(), "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A,
     const fvMatrix<Type>& B
 )
 {
     checkMethod(A, B, "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC() -= B;
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref() -= B;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const fvMatrix<Type>& B
 )
 {
     checkMethod(tA(), B, "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() -= B;
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() -= B;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A,
-    const tmp<fvMatrix<Type> >& tB
+    const tmp<fvMatrix<Type>>& tB
 )
 {
     checkMethod(A, tB(), "-");
-    tmp<fvMatrix<Type> > tC(tB.ptr());
-    tC() -= A;
-    tC().negate();
+    tmp<fvMatrix<Type>> tC(tB.ptr());
+    tC.ref() -= A;
+    tC.ref().negate();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<fvMatrix<Type> >& tB
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<fvMatrix<Type>>& tB
 )
 {
     checkMethod(tA(), tB(), "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() -= tB();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() -= tB();
     tB.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A,
     const DimensionedField<Type, volMesh>& su
 )
 {
     checkMethod(A, su, "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A,
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     checkMethod(A, tsu(), "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     checkMethod(A, tsu(), "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const DimensionedField<Type, volMesh>& su
 )
 {
     checkMethod(tA(), su, "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<DimensionedField<Type, volMesh> >& tsu
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<DimensionedField<Type, volMesh>>& tsu
 )
 {
     checkMethod(tA(), tsu(), "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu
+    const tmp<fvMatrix<Type>>& tA,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu
 )
 {
     checkMethod(tA(), tsu(), "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const DimensionedField<Type, volMesh>& su,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, su, "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().negate();
-    tC().source() -= su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().negate();
+    tC.ref().source() -= su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu,
+    const tmp<DimensionedField<Type, volMesh>>& tsu,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, tsu(), "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().negate();
-    tC().source() -= tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().negate();
+    tC.ref().source() -= tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, tsu(), "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().negate();
-    tC().source() -= tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().negate();
+    tC.ref().source() -= tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const DimensionedField<Type, volMesh>& su,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), su, "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().negate();
-    tC().source() -= su.mesh().V()*su.field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().negate();
+    tC.ref().source() -= su.mesh().V()*su.field();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<DimensionedField<Type, volMesh> >& tsu,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<DimensionedField<Type, volMesh>>& tsu,
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), tsu(), "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().negate();
-    tC().source() -= tsu().mesh().V()*tsu().field();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().negate();
+    tC.ref().source() -= tsu().mesh().V()*tsu().field();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tsu,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), tsu(), "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().negate();
-    tC().source() -= tsu().mesh().V()*tsu().internalField();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().negate();
+    tC.ref().source() -= tsu().mesh().V()*tsu().internalField();
     tsu.clear();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const fvMatrix<Type>& A,
     const dimensioned<Type>& su
 )
 {
     checkMethod(A, su, "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= su.value()*A.psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= su.value()*A.psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const dimensioned<Type>& su
 )
 {
     checkMethod(tA(), su, "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= su.value()*tC().psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= su.value()*tC().psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const dimensioned<Type>& su,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, su, "+");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() -= su.value()*A.psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() -= su.value()*A.psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator+
 (
     const dimensioned<Type>& su,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), su, "+");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() -= su.value()*tC().psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() -= su.value()*tC().psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const fvMatrix<Type>& A,
     const dimensioned<Type>& su
 )
 {
     checkMethod(A, su, "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().source() += su.value()*tC().psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().source() += su.value()*tC().psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
-    const tmp<fvMatrix<Type> >& tA,
+    const tmp<fvMatrix<Type>>& tA,
     const dimensioned<Type>& su
 )
 {
     checkMethod(tA(), su, "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().source() += su.value()*tC().psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().source() += su.value()*tC().psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const dimensioned<Type>& su,
     const fvMatrix<Type>& A
 )
 {
     checkMethod(A, su, "-");
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC().negate();
-    tC().source() -= su.value()*A.psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref().negate();
+    tC.ref().source() -= su.value()*A.psi().mesh().V();
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator-
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator-
 (
     const dimensioned<Type>& su,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
     checkMethod(tA(), su, "-");
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC().negate();
-    tC().source() -= su.value()*tC().psi().mesh().V();
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref().negate();
+    tC.ref().source() -= su.value()*tC().psi().mesh().V();
     return tC;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
     const DimensionedField<scalar, volMesh>& dsf,
     const fvMatrix<Type>& A
 )
 {
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC() *= dsf;
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref() *= dsf;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
-    const tmp< DimensionedField<scalar, volMesh> >& tdsf,
+    const tmp<DimensionedField<scalar, volMesh>>& tdsf,
     const fvMatrix<Type>& A
 )
 {
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC() *= tdsf;
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref() *= tdsf;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
     const tmp<volScalarField>& tvsf,
     const fvMatrix<Type>& A
 )
 {
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC() *= tvsf;
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref() *= tvsf;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
     const DimensionedField<scalar, volMesh>& dsf,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() *= dsf;
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() *= dsf;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
-    const tmp<DimensionedField<scalar, volMesh> >& tdsf,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<DimensionedField<scalar, volMesh>>& tdsf,
+    const tmp<fvMatrix<Type>>& tA
 )
 {
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() *= tdsf;
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() *= tdsf;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
     const tmp<volScalarField>& tvsf,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() *= tvsf;
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() *= tvsf;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
     const dimensioned<scalar>& ds,
     const fvMatrix<Type>& A
 )
 {
-    tmp<fvMatrix<Type> > tC(new fvMatrix<Type>(A));
-    tC() *= ds;
+    tmp<fvMatrix<Type>> tC(new fvMatrix<Type>(A));
+    tC.ref() *= ds;
     return tC;
 }
 
 template<class Type>
-Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*
+Foam::tmp<Foam::fvMatrix<Type>> Foam::operator*
 (
     const dimensioned<scalar>& ds,
-    const tmp<fvMatrix<Type> >& tA
+    const tmp<fvMatrix<Type>>& tA
 )
 {
-    tmp<fvMatrix<Type> > tC(tA.ptr());
-    tC() *= ds;
+    tmp<fvMatrix<Type>> tC(tA.ptr());
+    tC.ref() *= ds;
     return tC;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::operator&
 (
     const fvMatrix<Type>& M,
     const DimensionedField<Type, volMesh>& psi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tMphi
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tMphi
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -2282,10 +2274,10 @@ Foam::operator&
             ),
             psi.mesh(),
             M.dimensions()/dimVol,
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& Mphi = tMphi();
+    GeometricField<Type, fvPatchField, volMesh>& Mphi = tMphi.ref();
 
     // Loop over field components
     if (M.hasDiag())
@@ -2300,7 +2292,7 @@ Foam::operator&
     }
     else
     {
-        Mphi.internalField() = pTraits<Type>::zero;
+        Mphi.internalField() = Zero;
     }
 
     Mphi.internalField() += M.lduMatrix::H(psi.field()) + M.source();
@@ -2313,67 +2305,67 @@ Foam::operator&
 }
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::operator&
 (
     const fvMatrix<Type>& M,
-    const tmp<DimensionedField<Type, volMesh> >& tpsi
+    const tmp<DimensionedField<Type, volMesh>>& tpsi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tMpsi = M & tpsi();
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tMpsi = M & tpsi();
     tpsi.clear();
     return tMpsi;
 }
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::operator&
 (
     const fvMatrix<Type>& M,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tpsi
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tpsi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tMpsi = M & tpsi();
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tMpsi = M & tpsi();
     tpsi.clear();
     return tMpsi;
 }
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::operator&
 (
-    const tmp<fvMatrix<Type> >& tM,
+    const tmp<fvMatrix<Type>>& tM,
     const DimensionedField<Type, volMesh>& psi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tMpsi = tM() & psi;
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tMpsi = tM() & psi;
     tM.clear();
     return tMpsi;
 }
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::operator&
 (
-    const tmp<fvMatrix<Type> >& tM,
-    const tmp<DimensionedField<Type, volMesh> >& tpsi
+    const tmp<fvMatrix<Type>>& tM,
+    const tmp<DimensionedField<Type, volMesh>>& tpsi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tMpsi = tM() & tpsi();
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tMpsi = tM() & tpsi();
     tM.clear();
     tpsi.clear();
     return tMpsi;
 }
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::operator&
 (
-    const tmp<fvMatrix<Type> >& tM,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tpsi
+    const tmp<fvMatrix<Type>>& tM,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tpsi
 )
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tMpsi = tM() & tpsi();
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tMpsi = tM() & tpsi();
     tM.clear();
     tpsi.clear();
     return tMpsi;
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H
index 32596afc13f4967cfc7398d6d5818ea0be265aff..ec2084bd273903e4d18697ba93e7c4a49206c279 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,45 +60,45 @@ template<class Type>
 class fvMatrix;
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > operator&
+tmp<GeometricField<Type, fvPatchField, volMesh>> operator&
 (
     const fvMatrix<Type>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > operator&
+tmp<GeometricField<Type, fvPatchField, volMesh>> operator&
 (
     const fvMatrix<Type>&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > operator&
+tmp<GeometricField<Type, fvPatchField, volMesh>> operator&
 (
     const fvMatrix<Type>&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > operator&
+tmp<GeometricField<Type, fvPatchField, volMesh>> operator&
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > operator&
+tmp<GeometricField<Type, fvPatchField, volMesh>> operator&
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > operator&
+tmp<GeometricField<Type, fvPatchField, volMesh>> operator&
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
@@ -114,7 +114,7 @@ template<class T> class UIndirectList;
 template<class Type>
 class fvMatrix
 :
-    public refCount,
+    public tmp<fvMatrix<Type>>::refCount,
     public lduMatrix
 {
     // Private data
@@ -163,7 +163,7 @@ protected:
         void addToInternalField
         (
             const labelUList& addr,
-            const tmp<Field<Type2> >& tpf,
+            const tmp<Field<Type2>>& tpf,
             Field<Type2>& intf
         ) const;
 
@@ -180,7 +180,7 @@ protected:
         void subtractFromInternalField
         (
             const labelUList& addr,
-            const tmp<Field<Type2> >& tpf,
+            const tmp<Field<Type2>>& tpf,
             Field<Type2>& intf
         ) const;
 
@@ -262,9 +262,9 @@ public:
         //- Construct as copy
         fvMatrix(const fvMatrix<Type>&);
 
-        //- Construct as copy of tmp<fvMatrix<Type> > deleting argument
+        //- Construct as copy of tmp<fvMatrix<Type>> deleting argument
         #ifndef NoConstructFromTmp
-        fvMatrix(const tmp<fvMatrix<Type> >&);
+        fvMatrix(const tmp<fvMatrix<Type>>&);
         #endif
 
         //- Construct from Istream given field to solve for
@@ -404,40 +404,40 @@ public:
             SolverPerformance<Type> solve();
 
             //- Return the matrix residual
-            tmp<Field<Type> > residual() const;
+            tmp<Field<Type>> residual() const;
 
             //- Return the matrix scalar diagonal
             tmp<scalarField> D() const;
 
             //- Return the matrix Type diagonal
-            tmp<Field<Type> > DD() const;
+            tmp<Field<Type>> DD() const;
 
             //- Return the central coefficient
             tmp<volScalarField> A() const;
 
             //- Return the H operation source
-            tmp<GeometricField<Type, fvPatchField, volMesh> > H() const;
+            tmp<GeometricField<Type, fvPatchField, volMesh>> H() const;
 
             //- Return H(1)
             tmp<volScalarField> H1() const;
 
             //- Return the face-flux field from the matrix
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 flux() const;
 
 
     // Member operators
 
         void operator=(const fvMatrix<Type>&);
-        void operator=(const tmp<fvMatrix<Type> >&);
+        void operator=(const tmp<fvMatrix<Type>>&);
 
         void negate();
 
         void operator+=(const fvMatrix<Type>&);
-        void operator+=(const tmp<fvMatrix<Type> >&);
+        void operator+=(const tmp<fvMatrix<Type>>&);
 
         void operator-=(const fvMatrix<Type>&);
-        void operator-=(const tmp<fvMatrix<Type> >&);
+        void operator-=(const tmp<fvMatrix<Type>>&);
 
         void operator+=
         (
@@ -445,11 +445,11 @@ public:
         );
         void operator+=
         (
-            const tmp<DimensionedField<Type, volMesh> >&
+            const tmp<DimensionedField<Type, volMesh>>&
         );
         void operator+=
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         );
 
         void operator-=
@@ -458,11 +458,11 @@ public:
         );
         void operator-=
         (
-            const tmp<DimensionedField<Type, volMesh> >&
+            const tmp<DimensionedField<Type, volMesh>>&
         );
         void operator-=
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         );
 
         void operator+=(const dimensioned<Type>&);
@@ -472,7 +472,7 @@ public:
         void operator-=(const zero&);
 
         void operator*=(const DimensionedField<scalar, volMesh>&);
-        void operator*=(const tmp<DimensionedField<scalar, volMesh> >&);
+        void operator*=(const tmp<DimensionedField<scalar, volMesh>>&);
         void operator*=(const tmp<volScalarField>&);
 
         void operator*=(const dimensioned<scalar>&);
@@ -480,32 +480,32 @@ public:
 
     // Friend operators
 
-        friend tmp<GeometricField<Type, fvPatchField, volMesh> >
+        friend tmp<GeometricField<Type, fvPatchField, volMesh>>
         operator& <Type>
         (
             const fvMatrix<Type>&,
             const DimensionedField<Type, volMesh>&
         );
 
-        friend tmp<GeometricField<Type, fvPatchField, volMesh> >
+        friend tmp<GeometricField<Type, fvPatchField, volMesh>>
         operator& <Type>
         (
             const fvMatrix<Type>&,
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         );
 
-        friend tmp<GeometricField<Type, fvPatchField, volMesh> >
+        friend tmp<GeometricField<Type, fvPatchField, volMesh>>
         operator& <Type>
         (
-            const tmp<fvMatrix<Type> >&,
+            const tmp<fvMatrix<Type>>&,
             const DimensionedField<Type, volMesh>&
         );
 
-        friend tmp<GeometricField<Type, fvPatchField, volMesh> >
+        friend tmp<GeometricField<Type, fvPatchField, volMesh>>
         operator& <Type>
         (
-            const tmp<fvMatrix<Type> >&,
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<fvMatrix<Type>>&,
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         );
 
 
@@ -558,7 +558,7 @@ SolverPerformance<Type> solve(fvMatrix<Type>&, const dictionary&);
 template<class Type>
 SolverPerformance<Type> solve
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const dictionary&
 );
 
@@ -573,478 +573,478 @@ SolverPerformance<Type> solve(fvMatrix<Type>&);
 //  deleting temporary matrix after solution.
 //  Solver controls read fvSolution
 template<class Type>
-SolverPerformance<Type> solve(const tmp<fvMatrix<Type> >&);
+SolverPerformance<Type> solve(const tmp<fvMatrix<Type>>&);
 
 
 //- Return the correction form of the given matrix
 //  by subtracting the matrix multiplied by the current field
 template<class Type>
-tmp<fvMatrix<Type> > correction(const fvMatrix<Type>&);
+tmp<fvMatrix<Type>> correction(const fvMatrix<Type>&);
 
 
 //- Return the correction form of the given temporary matrix
 //  by subtracting the matrix multiplied by the current field
 template<class Type>
-tmp<fvMatrix<Type> > correction(const tmp<fvMatrix<Type> >&);
+tmp<fvMatrix<Type>> correction(const tmp<fvMatrix<Type>>&);
 
 
 // * * * * * * * * * * * * * * * Global operators  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
     const dimensioned<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const dimensioned<Type>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
     const fvMatrix<Type>&,
     const zero&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator==
+tmp<fvMatrix<Type>> operator==
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const zero&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const fvMatrix<Type>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const fvMatrix<Type>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const fvMatrix<Type>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const fvMatrix<Type>&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const fvMatrix<Type>&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const DimensionedField<Type, volMesh>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<DimensionedField<Type, volMesh> >&,
+    const tmp<DimensionedField<Type, volMesh>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const DimensionedField<Type, volMesh>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<DimensionedField<Type, volMesh> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<DimensionedField<Type, volMesh>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const fvMatrix<Type>&,
     const dimensioned<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const dimensioned<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const dimensioned<Type>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator+
+tmp<fvMatrix<Type>> operator+
 (
     const dimensioned<Type>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const DimensionedField<Type, volMesh>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<DimensionedField<Type, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<DimensionedField<Type, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+    const tmp<fvMatrix<Type>>&,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const DimensionedField<Type, volMesh>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<DimensionedField<Type, volMesh> >&,
+    const tmp<DimensionedField<Type, volMesh>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const DimensionedField<Type, volMesh>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<DimensionedField<Type, volMesh> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<DimensionedField<Type, volMesh>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const fvMatrix<Type>&,
     const dimensioned<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
-    const tmp<fvMatrix<Type> >&,
+    const tmp<fvMatrix<Type>>&,
     const dimensioned<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const dimensioned<Type>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator-
+tmp<fvMatrix<Type>> operator-
 (
     const dimensioned<Type>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
     const DimensionedField<scalar, volMesh>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
-    const tmp<DimensionedField<scalar, volMesh> >&,
+    const tmp<DimensionedField<scalar, volMesh>>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
     const tmp<volScalarField>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
     const DimensionedField<scalar, volMesh>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
-    const tmp<DimensionedField<scalar, volMesh> >&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<DimensionedField<scalar, volMesh>>&,
+    const tmp<fvMatrix<Type>>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
     const tmp<volScalarField>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
     const dimensioned<scalar>&,
     const fvMatrix<Type>&
 );
 
 template<class Type>
-tmp<fvMatrix<Type> > operator*
+tmp<fvMatrix<Type>> operator*
 (
     const dimensioned<scalar>&,
-    const tmp<fvMatrix<Type> >&
+    const tmp<fvMatrix<Type>>&
 );
 
 
@@ -1055,7 +1055,7 @@ tmp<fvMatrix<Type> > operator*
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMatrix.C"
+    #include "fvMatrix.C"
 #endif
 
 // Specialisation for scalars
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
index ff588e947f74dd8fca29dbae8d900beb8c25f918..26dab20b7533194799866abbe8152f760394506e 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -327,9 +327,9 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solve()
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::residual() const
+Foam::tmp<Foam::Field<Type>> Foam::fvMatrix<Type>::residual() const
 {
-    tmp<Field<Type> > tres(new Field<Type>(source_));
+    tmp<Field<Type>> tres(new Field<Type>(source_));
     Field<Type>& res = tres();
 
     addBoundarySource(res);
diff --git a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C
index 8dc91d4d17c9ca7b7c4d2bd47d8145a36f4b6f5c..46fa555289aa536ae1fd477089fec20a9bfafbcd 100644
--- a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C
+++ b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "fvScalarMatrix.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
@@ -201,7 +201,7 @@ Foam::tmp<Foam::scalarField> Foam::fvMatrix<Foam::scalar>::residual() const
         )
     );
 
-    addBoundarySource(tres());
+    addBoundarySource(tres.ref());
 
     return tres;
 }
@@ -224,10 +224,10 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Foam::scalar>::H() const
             ),
             psi_.mesh(),
             dimensions_/dimVol,
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
-    volScalarField& Hphi = tHphi();
+    volScalarField& Hphi = tHphi.ref();
 
     Hphi.internalField() = (lduMatrix::H(psi_.internalField()) + source_);
     addBoundarySource(Hphi.internalField());
@@ -256,10 +256,10 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Foam::scalar>::H1() const
             ),
             psi_.mesh(),
             dimensions_/(dimVol*psi_.dimensions()),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
-    volScalarField& H1_ = tH1();
+    volScalarField& H1_ = tH1.ref();
 
     H1_.internalField() = lduMatrix::H1();
     //addBoundarySource(Hphi.internalField());
diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/CMULES.H b/src/finiteVolume/fvMatrices/solvers/MULES/CMULES.H
index fe0d353c70c59ec09c9149652c2c52481434ad59..fd76c9f2fdb9b3b8cfb0f2eb1802fb957fe0a0bf 100644
--- a/src/finiteVolume/fvMatrices/solvers/MULES/CMULES.H
+++ b/src/finiteVolume/fvMatrices/solvers/MULES/CMULES.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -132,7 +132,7 @@ void limitCorr
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CMULESTemplates.C"
+    #include "CMULESTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/IMULES.H b/src/finiteVolume/fvMatrices/solvers/MULES/IMULES.H
index 2d6e4a26a0860e196f46fe1e4921373f505d2db3..fdef6b283b9a00d8d91c9fad28352d2a8eb3ad7b 100644
--- a/src/finiteVolume/fvMatrices/solvers/MULES/IMULES.H
+++ b/src/finiteVolume/fvMatrices/solvers/MULES/IMULES.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ void implicitSolve
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IMULESTemplates.C"
+    #include "IMULESTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULES.H b/src/finiteVolume/fvMatrices/solvers/MULES/MULES.H
index 47a44542163157f9b46df6814ec4efa79d70f5c4..5ece4fefcb721f1e5dada6ff152334815e417dd7 100644
--- a/src/finiteVolume/fvMatrices/solvers/MULES/MULES.H
+++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULES.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -148,7 +148,7 @@ void limitSum(SurfaceScalarFieldList& phiPsiCorrs);
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MULESTemplates.C"
+    #include "MULESTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
index f3bb5432a52912232cf8ed3de76ad504c99773d2..61e0d885504e8f55a3b4330a289aa05853a82911 100644
--- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
+++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
@@ -89,8 +89,17 @@ void Foam::MULES::explicitSolve
 )
 {
     const fvMesh& mesh = psi.mesh();
-    const scalar rDeltaT = 1.0/mesh.time().deltaTValue();
-    explicitSolve(rDeltaT, rho, psi, phiPsi, Sp, Su);
+
+    if (fv::localEulerDdt::enabled(mesh))
+    {
+        const volScalarField& rDeltaT = fv::localEulerDdt::localRDeltaT(mesh);
+        explicitSolve(rDeltaT, rho, psi, phiPsi, Sp, Su);
+    }
+    else
+    {
+        const scalar rDeltaT = 1.0/mesh.time().deltaTValue();
+        explicitSolve(rDeltaT, rho, psi, phiPsi, Sp, Su);
+    }
 }
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H
index dee4ee411c34960aa2d7c04ef24ba07651d833de..d408c992655972abf75987f19a24052831f779c9 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ public:
             const mapDistribute& map,
             const labelListList& stencil,
             const GeometricField<Type, fvPatchField, volMesh>& fld,
-            const List<List<WeightType> >& stencilWeights
+            const List<List<WeightType>>& stencilWeights
         );
 };
 
@@ -96,7 +96,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "extendedCellToCellStencilTemplates.C"
+    #include "extendedCellToCellStencilTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C
index 2a066403702c8ad32e8535641e41ac5830c6ef46..77eead6d4839f2a3b684b3b14ffb54f999e5484b 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ Foam::tmp
     const mapDistribute& map,
     const labelListList& stencil,
     const GeometricField<Type, fvPatchField, volMesh>& fld,
-    const List<List<WeightType> >& stencilWeights
+    const List<List<WeightType>>& stencilWeights
 )
 {
     typedef typename outerProduct<WeightType, Type>::type WeightedType;
@@ -52,7 +52,7 @@ Foam::tmp
     const fvMesh& mesh = fld.mesh();
 
     // Collect internal and boundary values
-    List<List<Type> > stencilFld;
+    List<List<Type>> stencilFld;
     extendedCellToFaceStencil::collectData(map, stencil, fld, stencilFld);
 
     tmp<WeightedFieldType> twf
@@ -70,7 +70,7 @@ Foam::tmp
             (
                 fld.name(),
                 fld.dimensions(),
-                pTraits<WeightedType>::zero
+                Zero
             )
         )
     );
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C
index f1969f2af18e3c3ca0a1472cd5850d63323f1600..1b9c347b6f18784488c4e7e1e187e97abff3802e 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ Foam::extendedCentredCellToCellStencil::extendedCentredCellToCellStencil
     stencil_(stencil)
 {
     // Calculate distribute map (also renumbers elements in stencil)
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
     mapPtr_.reset
     (
         new mapDistribute
@@ -53,7 +53,6 @@ Foam::extendedCentredCellToCellStencil::extendedCentredCellToCellStencil
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Per cell which elements of the stencil to keep.
 void Foam::extendedCentredCellToCellStencil::compact()
 {
     boolList isInStencil(map().constructSize(), false);
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H
index f325a1fcc83c050cbccbe548f9f4e73b4381927a..b38e53594124858158fbd6f904b2224f29c6629f 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ public:
         void collectData
         (
             const GeometricField<Type, fvPatchField, volMesh>& fld,
-            List<List<Type> >& stencilFld
+            List<List<Type>>& stencilFld
         ) const
         {
             extendedCellToFaceStencil::collectData
@@ -128,7 +128,7 @@ public:
         > weightedSum
         (
             const GeometricField<Type, fvPatchField, volMesh>& fld,
-            const List<List<WeightType> >& stencilWeights
+            const List<List<WeightType>>& stencilWeights
         ) const
         {
             return extendedCellToCellStencil::weightedSum
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C
index 7d2d6648c45ddce45c58f5f40aaf61ae881d28af..41e03b552d0f8534e241dfaeee255dc552914251 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per edge the neighbour data (= edgeCells)
 void Foam::CECCellToCellStencil::calcEdgeBoundaryData
 (
     const boolList& isValidBFace,
@@ -61,8 +60,6 @@ void Foam::CECCellToCellStencil::calcEdgeBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
 void Foam::CECCellToCellStencil::calcCellStencil
 (
     labelListList& globalCellCells
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H
index df7733c46dc002c2dbe2c0c63e0dba99ff313afc..4cd4ac138964cbabb3f4d69e526368a7050e4038 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,6 +63,9 @@ class CECCellToCellStencil
             EdgeMap<labelList>& neiGlobal
         ) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellCells) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
index d034b9549cf3a71b3df205fbcc0c8c7265569928..7cbde7abf8f9a110066e6ede9efd4b7aa44f955a 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per face the neighbour data (= cell or boundary face)
 void Foam::CFCCellToCellStencil::calcFaceBoundaryData
 (
     labelList& neiGlobal
@@ -82,10 +81,10 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
-void Foam::CFCCellToCellStencil::calcCellStencil(labelListList& globalCellCells)
- const
+void Foam::CFCCellToCellStencil::calcCellStencil
+(
+    labelListList& globalCellCells
+) const
 {
     const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
     const labelList& own = mesh().faceOwner();
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H
index 6c7edac71e1918d4018647bd27c28e3c399b3123..fde8b11ca0cf0fd9835a367286281dbe85d2b78d 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,8 +51,12 @@ class CFCCellToCellStencil
 {
     // Private Member Functions
 
+        //- Calculates per face the neighbour data (= cell or boundary face)
         void calcFaceBoundaryData(labelList& neiGlobal) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellCells) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C
index 024bb7e2acffded88d0ef387457b39db9bf6d69c..660a04d6d66327d63f55f25477772b968d4c24d6 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per point the neighbour data (= pointCells)
 void Foam::CPCCellToCellStencil::calcPointBoundaryData
 (
     const boolList& isValidBFace,
@@ -67,8 +66,6 @@ void Foam::CPCCellToCellStencil::calcPointBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
 void Foam::CPCCellToCellStencil::calcCellStencil
 (
     labelListList& globalCellCells
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H
index 4bb75f2ddf479284031f5a4b65d1e7702bab190e..6d82a432a8661d6ec7f81864860172461838115f 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,6 +62,9 @@ class CPCCellToCellStencil
             Map<labelList>& neiGlobal
         ) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellCells) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
index fd48842f436a6f425e08c9b23fde73b6ad8bb6e1..1aad1b4e20cb51b6dc52c7aaa00aa7bf52f748b9 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Merge two list and guarantee global0,global1 are first.
 void Foam::cellToCellStencil::merge
 (
     const label global0,
@@ -131,7 +130,6 @@ void Foam::cellToCellStencil::merge
 }
 
 
-// Merge two list and guarantee globalI is first.
 void Foam::cellToCellStencil::merge
 (
     const label globalI,
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H
index cb8dd8592763d33085046e0d0cb3437ccd0d0d7a..8360178c2de68d60af73948776a66b5ad150e127 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,16 +67,22 @@ class cellToCellStencil
 protected:
 
         //- Merge two lists.
+        //  Guarantee global0, global1 are first.
         static void merge
         (
-            const label,
-            const label,
-            const labelList&,
-            labelList&
+            const label global0,
+            const label global1,
+            const labelList& listA,
+            labelList& listB
         );
 
-        //- Merge two lists.
-        static void merge(const label, const labelList&, labelList&);
+        //- Merge two lists and guarantee globalI is first.
+        static void merge
+        (
+            const label globalI,
+            const labelList& pGlobals,
+            labelList& cCells
+        );
 
         //- Valid boundary faces (not empty and not coupled)
         void validBoundaryFaces(boolList& isValidBFace) const;
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H
index dd6d2f01a682dd580c591796a6842ff0b7674ccc..c3c57bc7fd4a50963c359d9f52879b6b5b686e09 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,18 +103,18 @@ public:
             const mapDistribute& map,
             const labelListList& stencil,
             const GeometricField<T, fvPatchField, volMesh>& fld,
-            List<List<T> >& stencilFld
+            List<List<T>>& stencilFld
         );
 
         //- Sum vol field contributions to create face values
         template<class Type>
-        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         weightedSum
         (
             const mapDistribute& map,
             const labelListList& stencil,
             const GeometricField<Type, fvPatchField, volMesh>& fld,
-            const List<List<scalar> >& stencilWeights
+            const List<List<scalar>>& stencilWeights
         );
 };
 
@@ -126,7 +126,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "extendedCellToFaceStencilTemplates.C"
+    #include "extendedCellToFaceStencilTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C
index 4fc0d1f2bbc035484dc24b2e7f3cee8fe89522f3..d6aac47191f66ff7ebd1e6a04ac274c7df6b6909 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,11 +33,11 @@ void Foam::extendedCellToFaceStencil::collectData
     const mapDistribute& map,
     const labelListList& stencil,
     const GeometricField<Type, fvPatchField, volMesh>& fld,
-    List<List<Type> >& stencilFld
+    List<List<Type>>& stencilFld
 )
 {
     // 1. Construct cell data in compact addressing
-    List<Type> flatFld(map.constructSize(), pTraits<Type>::zero);
+    List<Type> flatFld(map.constructSize(), Zero);
 
     // Insert my internal values
     forAll(fld, cellI)
@@ -81,22 +81,22 @@ void Foam::extendedCellToFaceStencil::collectData
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::extendedCellToFaceStencil::weightedSum
 (
     const mapDistribute& map,
     const labelListList& stencil,
     const GeometricField<Type, fvPatchField, volMesh>& fld,
-    const List<List<scalar> >& stencilWeights
+    const List<List<scalar>>& stencilWeights
 )
 {
     const fvMesh& mesh = fld.mesh();
 
     // Collect internal and boundary values
-    List<List<Type> > stencilFld;
+    List<List<Type>> stencilFld;
     collectData(map, stencil, fld, stencilFld);
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -114,11 +114,11 @@ Foam::extendedCellToFaceStencil::weightedSum
             (
                 fld.name(),
                 fld.dimensions(),
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref();
 
     // Internal faces
     for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C
index 60408678555af4422b60f4e6dae563cce5399d53..5fe891d07884df4238f033aef82a0af0e3682626 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ Foam::extendedCentredCellToFaceStencil::extendedCentredCellToFaceStencil
     stencil_(stencil)
 {
     // Calculate distribute map (also renumbers elements in stencil)
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
     mapPtr_.reset
     (
         new mapDistribute
@@ -53,9 +53,10 @@ Foam::extendedCentredCellToFaceStencil::extendedCentredCellToFaceStencil
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Per face which elements of the stencil to keep.
 void Foam::extendedCentredCellToFaceStencil::compact()
 {
+    // Per face which elements of the stencil to keep.
+
     boolList isInStencil(map().constructSize(), false);
 
     forAll(stencil_, faceI)
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H
index a8f99be1e859781356064205208ec66172a6fce7..f1a7ce9ebac375fb6bb8f6096fee379557d48b05 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ public:
         void collectData
         (
             const GeometricField<T, fvPatchField, volMesh>& fld,
-            List<List<T> >& stencilFld
+            List<List<T>>& stencilFld
         ) const
         {
             extendedCellToFaceStencil::collectData
@@ -116,10 +116,10 @@ public:
 
         //- Sum vol field contributions to create face values
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > weightedSum
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> weightedSum
         (
             const GeometricField<Type, fvPatchField, volMesh>& fld,
-            const List<List<scalar> >& stencilWeights
+            const List<List<scalar>>& stencilWeights
         ) const
         {
             return extendedCellToFaceStencil::weightedSum
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C
index e3f4c79ebd4c37169444213fd82a7877fe050e9c..61e0de79f37d8445b666f4d63a531730b541a0d9 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -424,7 +424,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil
     );
 
     {
-        List<Map<label> > compactMap(Pstream::nProcs());
+        List<Map<label>> compactMap(Pstream::nProcs());
         ownMapPtr_.reset
         (
             new mapDistribute
@@ -438,7 +438,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil
 
     {
 
-        List<Map<label> > compactMap(Pstream::nProcs());
+        List<Map<label>> compactMap(Pstream::nProcs());
         neiMapPtr_.reset
         (
             new mapDistribute
@@ -455,7 +455,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil
     {
         const fvMesh& mesh = dynamic_cast<const fvMesh&>(stencil.mesh());
 
-        List<List<point> > stencilPoints(ownStencil_.size());
+        List<List<point>> stencilPoints(ownStencil_.size());
 
         // Owner stencil
         // ~~~~~~~~~~~~~
@@ -533,7 +533,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil
     ownStencil_ = stencil;
 
     {
-        List<Map<label> > compactMap(Pstream::nProcs());
+        List<Map<label>> compactMap(Pstream::nProcs());
         ownMapPtr_.reset
         (
             new mapDistribute
@@ -547,7 +547,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil
 
     const fvMesh& mesh = dynamic_cast<const fvMesh&>(stencil.mesh());
 
-    List<List<point> > stencilPoints(ownStencil_.size());
+    List<List<point>> stencilPoints(ownStencil_.size());
     collectData(ownMapPtr_(), ownStencil_, mesh.C(), stencilPoints);
 
     // Split stencil into owner and neighbour
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H
index 3ddf4bd79cf751f8b2ca1045e5bfda19606bbc01..e7aa86a8ba36f29bfa3fd711c9699b7e702e80d6 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -175,12 +175,12 @@ public:
 
         //- Sum vol field contributions to create face values
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > weightedSum
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> weightedSum
         (
             const surfaceScalarField& phi,
             const GeometricField<Type, fvPatchField, volMesh>& fld,
-            const List<List<scalar> >& ownWeights,
-            const List<List<scalar> >& neiWeights
+            const List<List<scalar>>& ownWeights,
+            const List<List<scalar>>& neiWeights
         ) const;
 
 };
@@ -193,7 +193,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "extendedUpwindCellToFaceStencilTemplates.C"
+    #include "extendedUpwindCellToFaceStencilTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C
index 99ec07d58bc0cf18e8e78b28c5de959cdcfa79d0..e47683cb481f928e972c350bbd83377ff1811a0c 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,24 +28,24 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::extendedUpwindCellToFaceStencil::weightedSum
 (
     const surfaceScalarField& phi,
     const GeometricField<Type, fvPatchField, volMesh>& fld,
-    const List<List<scalar> >& ownWeights,
-    const List<List<scalar> >& neiWeights
+    const List<List<scalar>>& ownWeights,
+    const List<List<scalar>>& neiWeights
 ) const
 {
     const fvMesh& mesh = fld.mesh();
 
     // Collect internal and boundary values
-    List<List<Type> > ownFld;
+    List<List<Type>> ownFld;
     collectData(ownMap(), ownStencil(), fld, ownFld);
-    List<List<Type> > neiFld;
+    List<List<Type>> neiFld;
     collectData(neiMap(), neiStencil(), fld, neiFld);
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -63,11 +63,11 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum
             (
                 fld.name(),
                 fld.dimensions(),
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref();
 
     // Internal faces
     for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
index 235091fa3ac28d8d1d242e9aa7a7f7ead2b54777..29f929c01f3e06761b3cf4a66db6e1110c27ff2f 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per edge the neighbour data (= edgeCells)
 void Foam::FECCellToFaceStencil::calcEdgeBoundaryData
 (
     const boolList& isValidBFace,
@@ -62,8 +61,6 @@ void Foam::FECCellToFaceStencil::calcEdgeBoundaryData
 }
 
 
-// Calculates per face the edge connected data (= cell or boundary in global
-// numbering).
 void Foam::FECCellToFaceStencil::calcFaceStencil
 (
     labelListList& faceStencil
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H
index 6d85ea414e51d51f3ea094ff15f3a12c8b839d67..d7c6d5c5b699f5d3f2045f2a73be2682f58db3a0 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,6 +61,8 @@ class FECCellToFaceStencil
             EdgeMap<labelList>& neiGlobal
         ) const;
 
+        //- Calculates per face the edge connected data
+        //  (= cell or boundary in global numbering).
         void calcFaceStencil(labelListList& faceStencil) const;
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
index f61744941e4a42c91ead985c4397da64465229c4..c9ac094164b228a24d728edbd21a760af185249d 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Merge two list and guarantee global0,global1 are first.
 void Foam::cellToFaceStencil::merge
 (
     const label global0,
@@ -132,7 +131,6 @@ void Foam::cellToFaceStencil::merge
 }
 
 
-// Merge two list and guarantee globalI is first.
 void Foam::cellToFaceStencil::merge
 (
     const label globalI,
@@ -338,13 +336,14 @@ Foam::labelList Foam::cellToFaceStencil::calcFaceCells
 }
 
 
-// Calculates per face a list of global cell/face indices.
 void Foam::cellToFaceStencil::calcFaceStencil
 (
     const labelListList& globalCellCells,
     labelListList& faceStencil
 ) const
 {
+    // Calculates per face a list of global cell/face indices.
+
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
     const label nBnd = mesh_.nFaces()-mesh_.nInternalFaces();
     const labelList& own = mesh_.faceOwner();
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H
index 1b325ac3f54d3fd7e7253029845382a234bb807e..62b7db6f81082839a1d7d3bb7071148ab73cf161 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,16 +67,22 @@ class cellToFaceStencil
 protected:
 
         //- Merge two lists.
+        //  Guarantee global0, global1 are first.
         static void merge
         (
-            const label,
-            const label,
-            const labelList&,
-            labelList&
+            const label global0,
+            const label global1,
+            const labelList& listA,
+            labelList& listB
         );
 
-        //- Merge two lists.
-        static void merge(const label, const labelList&, labelList&);
+        //- Merge two lists and guarantee globalI is first.
+        static void merge
+        (
+            const label globalI,
+            const labelList& pGlobals,
+            labelList& cCells
+        );
 
         //- Valid boundary faces (not empty and not coupled)
         void validBoundaryFaces(boolList& isValidBFace) const;
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C
index fd04606fa6ce1d53aabf1199867b9af967e29727..a2d40b587195a3e1d90560604af8c6520d7a1ca4 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ Foam::extendedCentredFaceToCellStencil::extendedCentredFaceToCellStencil
     stencil_(stencil)
 {
     // Calculate distribute map (also renumbers elements in stencil)
-    List<Map<label> > compactMap(Pstream::nProcs());
+    List<Map<label>> compactMap(Pstream::nProcs());
     mapPtr_.reset
     (
         new mapDistribute
@@ -53,7 +53,6 @@ Foam::extendedCentredFaceToCellStencil::extendedCentredFaceToCellStencil
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Per face which elements of the stencil to keep.
 void Foam::extendedCentredFaceToCellStencil::compact()
 {
     boolList isInStencil(map().constructSize(), false);
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H
index d9072ef280273c5d0892ee0a56cb35dcb153fd3d..3e3f01f50e204b86ab0c55bf3c546f75651d0a17 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ public:
         void collectData
         (
             const GeometricField<T, fvsPatchField, surfaceMesh>& fld,
-            List<List<T> >& stencilFld
+            List<List<T>>& stencilFld
         ) const
         {
             extendedFaceToCellStencil::collectData
@@ -116,10 +116,10 @@ public:
 
         //- Sum surface field contributions to create cell values
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum
+        tmp<GeometricField<Type, fvPatchField, volMesh>> weightedSum
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>& fld,
-            const List<List<scalar> >& stencilWeights
+            const List<List<scalar>>& stencilWeights
         ) const
         {
             return extendedFaceToCellStencil::weightedSum
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H
index 9e7f11b1b8c78d16e3f09eb890b831aa37c268c9..25a46ab9fa62979f3785c2997bfda1e34d7ac47a 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,17 +77,17 @@ public:
             const mapDistribute& map,
             const labelListList& stencil,
             const GeometricField<T, fvsPatchField, surfaceMesh>& fld,
-            List<List<T> >& stencilFld
+            List<List<T>>& stencilFld
         );
 
         //- Sum surface field contributions to create cell values
         template<class Type>
-        static tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum
+        static tmp<GeometricField<Type, fvPatchField, volMesh>> weightedSum
         (
             const mapDistribute& map,
             const labelListList& stencil,
             const GeometricField<Type, fvsPatchField, surfaceMesh>& fld,
-            const List<List<scalar> >& stencilWeights
+            const List<List<scalar>>& stencilWeights
         );
 };
 
@@ -99,7 +99,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "extendedFaceToCellStencilTemplates.C"
+    #include "extendedFaceToCellStencilTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C
index 8449ba6f1944cfbc720ef45a4b481b9d3c536ec8..0535e0548d016099bbea8924638e2d0db17741fc 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,11 +33,11 @@ void Foam::extendedFaceToCellStencil::collectData
     const mapDistribute& map,
     const labelListList& stencil,
     const GeometricField<Type, fvsPatchField, surfaceMesh>& fld,
-    List<List<Type> >& stencilFld
+    List<List<Type>>& stencilFld
 )
 {
     // 1. Construct face data in compact addressing
-    List<Type> flatFld(map.constructSize(), pTraits<Type>::zero);
+    List<Type> flatFld(map.constructSize(), Zero);
 
     // Insert my internal values
     forAll(fld, cellI)
@@ -78,22 +78,22 @@ void Foam::extendedFaceToCellStencil::collectData
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::extendedFaceToCellStencil::weightedSum
 (
     const mapDistribute& map,
     const labelListList& stencil,
     const GeometricField<Type, fvsPatchField, surfaceMesh>& fld,
-    const List<List<scalar> >& stencilWeights
+    const List<List<scalar>>& stencilWeights
 )
 {
     const fvMesh& mesh = fld.mesh();
 
     // Collect internal and boundary values
-    List<List<Type> > stencilFld;
+    List<List<Type>> stencilFld;
     collectData(map, stencil, fld, stencilFld);
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tsfCorr
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tsfCorr
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -108,11 +108,11 @@ Foam::extendedFaceToCellStencil::weightedSum
             (
                 fld.name(),
                 fld.dimensions(),
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr();
+    GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr.ref();
 
     // cells
     forAll(sf, cellI)
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
index 7e49959a8bad1d9686826ea14e203607100b5724..8a60abd4375c20201b8ba97b4311eb9cf2e779a7 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,8 +30,6 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Calculates per face the neighbour data (= faces of cell). Leaves out the
-// face itself since this is already in stencil.
 void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
 (
     labelListList& neiGlobal
@@ -81,7 +79,7 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
             // Do nothing since face itself already in stencil
         }
     }
-    //syncTools::swapBoundaryFaceList(mesh(), neiGlobal);
+
     syncTools::syncBoundaryFaceList
     (
         mesh(),
@@ -92,10 +90,10 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
 }
 
 
-// Calculates per cell the neighbour data (= cell or boundary in global
-// numbering). First element is always cell itself!
-void Foam::CFCFaceToCellStencil::calcCellStencil(labelListList& globalCellFaces)
- const
+void Foam::CFCFaceToCellStencil::calcCellStencil
+(
+    labelListList& globalCellFaces
+) const
 {
     const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
     const labelList& own = mesh().faceOwner();
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H
index 29c083449e8a39f867a72d049360f6fbc26afc27..b451b6e67383e70f5883ed2a96e9484ba0f66870 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,8 +51,13 @@ class CFCFaceToCellStencil
 {
     // Private Member Functions
 
+        //- Calculates per face the neighbour data (= faces of cell).
+        //  Leaves out the face itself since this is already in stencil.
         void calcFaceBoundaryData(labelListList& neiGlobal) const;
 
+        //- Calculates per cell the neighbour data
+        //  (= cell or boundary in global numbering).
+        //  First element is always cell itself!
         void calcCellStencil(labelListList& globalCellFaces) const;
 
 
diff --git a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H
index df9616855150870848d5fc40798ecc1884c9956f..cf9ee4c35f8da24917c45acaa72d68b325d8133f 100644
--- a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H
+++ b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ class fvBoundaryMesh
 
     // Private Member Functions
 
-        //- Disable default copy construct
+        //- Disallow default copy construct
         fvBoundaryMesh(const fvBoundaryMesh&);
 
         //- Disallow assignment
diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C
index dc19051e71ed66c633d5ebfbbe9faadf6e5b8e08..1b26f9a55dee1ab260e4f80cd88e81d2657551bd 100644
--- a/src/finiteVolume/fvMesh/fvMesh.C
+++ b/src/finiteVolume/fvMesh/fvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,8 +125,7 @@ void Foam::fvMesh::clearAddressing(const bool isMeshUpdate)
 {
     if (debug)
     {
-        Info<< "fvMesh::clearAddressing(const bool) :"
-            << " isMeshUpdate:" << isMeshUpdate << endl;
+        InfoInFunction << "isMeshUpdate: " << isMeshUpdate << endl;
     }
 
     if (isMeshUpdate)
@@ -167,7 +166,7 @@ void Foam::fvMesh::storeOldVol(const scalarField& V)
     {
         if (debug)
         {
-            Info<< "fvMesh::storeOldVol(const scalarField&) :"
+            InfoInFunction
                 << " Storing old time volumes since from time " << curTimeIndex_
                 << " and time now " << time().timeIndex()
                 << " V:" << V.size()
@@ -214,12 +213,12 @@ void Foam::fvMesh::storeOldVol(const scalarField& V)
 
         if (debug)
         {
-            Info<< "fvMesh::storeOldVol() :"
+            InfoInFunction
                 << " Stored old time volumes V0:" << V0Ptr_->size()
                 << endl;
             if (V00Ptr_)
             {
-                Info<< "fvMesh::storeOldVol() :"
+                InfoInFunction
                     << " Stored oldold time volumes V00:" << V00Ptr_->size()
                     << endl;
             }
@@ -265,8 +264,7 @@ Foam::fvMesh::fvMesh(const IOobject& io)
 {
     if (debug)
     {
-        Info<< "Constructing fvMesh from IOobject"
-            << endl;
+        InfoInFunction << "Constructing fvMesh from IOobject" << endl;
     }
 
     // Check the existance of the cell volumes and read if present
@@ -376,7 +374,7 @@ Foam::fvMesh::fvMesh
 {
     if (debug)
     {
-        Info<< "Constructing fvMesh from cellShapes" << endl;
+        InfoInFunction << "Constructing fvMesh from cellShapes" << endl;
     }
 }
 
@@ -410,7 +408,7 @@ Foam::fvMesh::fvMesh
 {
     if (debug)
     {
-        Info<< "Constructing fvMesh from components" << endl;
+        InfoInFunction << "Constructing fvMesh from components" << endl;
     }
 }
 
@@ -443,7 +441,7 @@ Foam::fvMesh::fvMesh
 {
     if (debug)
     {
-        Info<< "Constructing fvMesh from components" << endl;
+        InfoInFunction << "Constructing fvMesh from components" << endl;
     }
 }
 
@@ -481,9 +479,7 @@ void Foam::fvMesh::removeFvBoundary()
 {
     if (debug)
     {
-        Info<< "void fvMesh::removeFvBoundary(): "
-            << "Removing boundary patches."
-            << endl;
+        InfoInFunction << "Removing boundary patches." << endl;
     }
 
     // Remove fvBoundaryMesh data first.
@@ -499,8 +495,7 @@ Foam::polyMesh::readUpdateState Foam::fvMesh::readUpdate()
 {
     if (debug)
     {
-        Info<< "polyMesh::readUpdateState fvMesh::readUpdate() : "
-            << "Updating fvMesh.  ";
+        InfoInFunction << "Updating fvMesh.  ";
     }
 
     polyMesh::readUpdateState state = polyMesh::readUpdate();
@@ -568,7 +563,7 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap)
 {
     if (debug)
     {
-        Info<< "fvMesh::mapFields :"
+        InfoInFunction
             << " nOldCells:" << meshMap.nOldCells()
             << " nCells:" << nCells()
             << " nOldFaces:" << meshMap.nOldFaces()
@@ -766,7 +761,7 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p)
     scalar rDeltaT = 1.0/time().deltaTValue();
 
     tmp<scalarField> tsweptVols = polyMesh::movePoints(p);
-    scalarField& sweptVols = tsweptVols();
+    scalarField& sweptVols = tsweptVols.ref();
 
     phi.internalField() = scalarField::subField(sweptVols, nInternalFaces());
     phi.internalField() *= rDeltaT;
@@ -869,7 +864,6 @@ bool Foam::fvMesh::writeObjects
 }
 
 
-//- Write mesh using IO settings from the time
 bool Foam::fvMesh::write() const
 {
     bool ok = true;
diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H
index 268e76939d880e125474ae9da033ebd09cda53d0..d2e326dd350a1d70e2163e3fe2329ce86a3159e2 100644
--- a/src/finiteVolume/fvMesh/fvMesh.H
+++ b/src/finiteVolume/fvMesh/fvMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -301,10 +301,10 @@ public:
             const DimensionedField<scalar, volMesh>& V00() const;
 
             //- Return sub-cycle cell volumes
-            tmp<DimensionedField<scalar, volMesh> > Vsc() const;
+            tmp<DimensionedField<scalar, volMesh>> Vsc() const;
 
             //- Return sub-cycl old-time cell volumes
-            tmp<DimensionedField<scalar, volMesh> > Vsc0() const;
+            tmp<DimensionedField<scalar, volMesh>> Vsc0() const;
 
             //- Return cell face area vectors
             const surfaceVectorField& Sf() const;
@@ -389,8 +389,8 @@ fvMesh::validComponents<sphericalTensor>() const;
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMeshTemplates.C"
-#   include "fvPatchFvMeshTemplates.C"
+    #include "fvMeshTemplates.C"
+    #include "fvPatchFvMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C
index b16164fa53693a8473e0d8aad749c28292761f3b..8cdeca38a43e971ae3b8cf27ad6aded7197605c7 100644
--- a/src/finiteVolume/fvMesh/fvMeshGeometry.C
+++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,20 +33,13 @@ License
 #include "cyclicFvPatchFields.H"
 #include "cyclicAMIFvPatchFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void fvMesh::makeSf() const
+void Foam::fvMesh::makeSf() const
 {
     if (debug)
     {
-        Info<< "void fvMesh::makeSf() : "
-            << "assembling face areas"
-            << endl;
+        InfoInFunction << "Assembling face areas" << endl;
     }
 
     // It is an error to attempt to recalculate
@@ -77,13 +70,11 @@ void fvMesh::makeSf() const
 }
 
 
-void fvMesh::makeMagSf() const
+void Foam::fvMesh::makeMagSf() const
 {
     if (debug)
     {
-        Info<< "void fvMesh::makeMagSf() : "
-            << "assembling mag face areas"
-            << endl;
+        InfoInFunction << "Assembling mag face areas" << endl;
     }
 
     // It is an error to attempt to recalculate
@@ -115,13 +106,11 @@ void fvMesh::makeMagSf() const
 }
 
 
-void fvMesh::makeC() const
+void Foam::fvMesh::makeC() const
 {
     if (debug)
     {
-        Info<< "void fvMesh::makeC() : "
-            << "assembling cell centres"
-            << endl;
+        InfoInFunction << "Assembling cell centres" << endl;
     }
 
     // It is an error to attempt to recalculate
@@ -157,13 +146,11 @@ void fvMesh::makeC() const
 }
 
 
-void fvMesh::makeCf() const
+void Foam::fvMesh::makeCf() const
 {
     if (debug)
     {
-        Info<< "void fvMesh::makeCf() : "
-            << "assembling face centres"
-            << endl;
+        InfoInFunction << "Assembling face centres" << endl;
     }
 
     // It is an error to attempt to recalculate
@@ -196,15 +183,14 @@ void fvMesh::makeCf() const
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-const volScalarField::DimensionedInternalField& fvMesh::V() const
+const Foam::volScalarField::DimensionedInternalField& Foam::fvMesh::V() const
 {
     if (!VPtr_)
     {
         if (debug)
         {
-            Info<< "fvMesh::V() const: "
-                << "constructing from primitiveMesh::cellVolumes()"
-                << endl;
+            InfoInFunction
+                << "Constructing from primitiveMesh::cellVolumes()" << endl;
         }
 
         VPtr_ = new slicedVolScalarField::DimensionedInternalField
@@ -228,7 +214,7 @@ const volScalarField::DimensionedInternalField& fvMesh::V() const
 }
 
 
-const volScalarField::DimensionedInternalField& fvMesh::V0() const
+const Foam::volScalarField::DimensionedInternalField& Foam::fvMesh::V0() const
 {
     if (!V0Ptr_)
     {
@@ -241,7 +227,7 @@ const volScalarField::DimensionedInternalField& fvMesh::V0() const
 }
 
 
-volScalarField::DimensionedInternalField& fvMesh::setV0()
+Foam::volScalarField::DimensionedInternalField& Foam::fvMesh::setV0()
 {
     if (!V0Ptr_)
     {
@@ -254,15 +240,13 @@ volScalarField::DimensionedInternalField& fvMesh::setV0()
 }
 
 
-const volScalarField::DimensionedInternalField& fvMesh::V00() const
+const Foam::volScalarField::DimensionedInternalField& Foam::fvMesh::V00() const
 {
     if (!V00Ptr_)
     {
         if (debug)
         {
-            Info<< "fvMesh::V00() const: "
-                << "constructing from V0"
-                << endl;
+            InfoInFunction << "Constructing from V0" << endl;
         }
 
         V00Ptr_ = new DimensionedField<scalar, volMesh>
@@ -287,7 +271,8 @@ const volScalarField::DimensionedInternalField& fvMesh::V00() const
 }
 
 
-tmp<volScalarField::DimensionedInternalField> fvMesh::Vsc() const
+Foam::tmp<Foam::volScalarField::DimensionedInternalField>
+Foam::fvMesh::Vsc() const
 {
     if (moving() && time().subCycling())
     {
@@ -315,7 +300,8 @@ tmp<volScalarField::DimensionedInternalField> fvMesh::Vsc() const
 }
 
 
-tmp<volScalarField::DimensionedInternalField> fvMesh::Vsc0() const
+Foam::tmp<Foam::volScalarField::DimensionedInternalField>
+Foam::fvMesh::Vsc0() const
 {
     if (moving() && time().subCycling())
     {
@@ -344,7 +330,7 @@ tmp<volScalarField::DimensionedInternalField> fvMesh::Vsc0() const
 }
 
 
-const surfaceVectorField& fvMesh::Sf() const
+const Foam::surfaceVectorField& Foam::fvMesh::Sf() const
 {
     if (!SfPtr_)
     {
@@ -355,7 +341,7 @@ const surfaceVectorField& fvMesh::Sf() const
 }
 
 
-const surfaceScalarField& fvMesh::magSf() const
+const Foam::surfaceScalarField& Foam::fvMesh::magSf() const
 {
     if (!magSfPtr_)
     {
@@ -366,7 +352,7 @@ const surfaceScalarField& fvMesh::magSf() const
 }
 
 
-const volVectorField& fvMesh::C() const
+const Foam::volVectorField& Foam::fvMesh::C() const
 {
     if (!CPtr_)
     {
@@ -377,7 +363,7 @@ const volVectorField& fvMesh::C() const
 }
 
 
-const surfaceVectorField& fvMesh::Cf() const
+const Foam::surfaceVectorField& Foam::fvMesh::Cf() const
 {
     if (!CfPtr_)
     {
@@ -388,13 +374,11 @@ const surfaceVectorField& fvMesh::Cf() const
 }
 
 
-tmp<surfaceVectorField> fvMesh::delta() const
+Foam::tmp<Foam::surfaceVectorField> Foam::fvMesh::delta() const
 {
     if (debug)
     {
-        Info<< "void fvMesh::delta() : "
-            << "calculating face deltas"
-            << endl;
+        InfoInFunction << "Calculating face deltas" << endl;
     }
 
     tmp<surfaceVectorField> tdelta
@@ -415,7 +399,7 @@ tmp<surfaceVectorField> fvMesh::delta() const
             dimLength
         )
     );
-    surfaceVectorField& delta = tdelta();
+    surfaceVectorField& delta = tdelta.ref();
 
     const volVectorField& C = this->C();
     const labelUList& owner = this->owner();
@@ -435,7 +419,7 @@ tmp<surfaceVectorField> fvMesh::delta() const
 }
 
 
-const surfaceScalarField& fvMesh::phi() const
+const Foam::surfaceScalarField& Foam::fvMesh::phi() const
 {
     if (!phiPtr_)
     {
@@ -455,7 +439,7 @@ const surfaceScalarField& fvMesh::phi() const
 }
 
 
-surfaceScalarField& fvMesh::setPhi()
+Foam::surfaceScalarField& Foam::fvMesh::setPhi()
 {
     if (!phiPtr_)
     {
@@ -468,8 +452,4 @@ surfaceScalarField& fvMesh::setPhi()
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C
index a1039f2a71b54e87146a16ee774b1d4c3021d59c..cd7502a100927fff33dd43b4b525aa3d77a11671 100644
--- a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C
+++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,14 +156,6 @@ void Foam::fvPatchMapper::calcAddressing() const
                     }
                 }
 
-                //// Cater for bad mapping
-                //if (nActive == 0)
-                //{
-                //    newAddr[nActive] = 0;
-                //    newWeights[nActive] = 1;
-                //    nActive++;
-                //}
-
                 newAddr.setSize(nActive);
                 newWeights.setSize(nActive);
 
@@ -211,7 +203,6 @@ void Foam::fvPatchMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::fvPatchMapper::fvPatchMapper
 (
     const fvPatch& patch,
diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C
index c9889b70301d15692c25f4761376e1a7d6ce37bf..c2d5fbcfcabb69b7c8260cc0138e52f0fe2bc9e4 100644
--- a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C
+++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -144,7 +144,6 @@ void Foam::fvSurfaceMapper::clearOut()
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 Foam::fvSurfaceMapper::fvSurfaceMapper
 (
     const fvMesh& mesh,
diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C
index 5b6ed73144675f19d52bac221012e407d7e9180f..9b5a2aaf4459f1c4735ff7924c75e9aee4ae91d6 100644
--- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C
+++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclic/cyclicFvPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ Foam::tmp<Foam::vectorField> Foam::cyclicFvPatch::delta() const
     const vectorField nbrPatchD(neighbFvPatch().coupledFvPatch::delta());
 
     tmp<vectorField> tpdv(new vectorField(patchD.size()));
-    vectorField& pdv = tpdv();
+    vectorField& pdv = tpdv.ref();
 
     // To the transformation if necessary
     if (parallel())
diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C
index b87157e34335a9914a7999cbd612c130733f350d..174372192db4e1581976891fcbaa4a0545c64833 100644
--- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C
+++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -140,7 +140,7 @@ Foam::tmp<Foam::vectorField> Foam::cyclicACMIFvPatch::delta() const
         (
             interpolate
             (
-                vectorField(nbrPatchCoupled.size(), vector::zero),
+                vectorField(nbrPatchCoupled.size(), Zero),
                 nbrPatchNonOverlap.delta()()
             )
         );
@@ -148,7 +148,7 @@ Foam::tmp<Foam::vectorField> Foam::cyclicACMIFvPatch::delta() const
         nbrPatchD -= nbrPatchD0;
 
         tmp<vectorField> tpdv(new vectorField(patchD.size()));
-        vectorField& pdv = tpdv();
+        vectorField& pdv = tpdv.ref();
 
         // do the transformation if necessary
         if (parallel())
diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.H
index 7ed1693696535d5d6b76f8b491d63979b72f450c..f4bfb00ad15d45552dfb5fcc059a0198e819619e 100644
--- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.H
+++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -175,7 +175,7 @@ public:
             virtual tmp<vectorField> delta() const;
 
             template<class Type>
-            tmp<Field<Type> > interpolate
+            tmp<Field<Type>> interpolate
             (
                 const Field<Type>& fldCoupled
             ) const
@@ -190,9 +190,9 @@ public:
             }
 
             template<class Type>
-            tmp<Field<Type> > interpolate
+            tmp<Field<Type>> interpolate
             (
-                const tmp<Field<Type> >& tfldCoupled
+                const tmp<Field<Type>>& tfldCoupled
             ) const
             {
                 updateAreas();
@@ -205,7 +205,7 @@ public:
             }
 
             template<class Type>
-            tmp<Field<Type> > interpolate
+            tmp<Field<Type>> interpolate
             (
                 const Field<Type>& fldCoupled,
                 const Field<Type>& fldNonOverlap
@@ -222,10 +222,10 @@ public:
             }
 
             template<class Type>
-            tmp<Field<Type> > interpolate
+            tmp<Field<Type>> interpolate
             (
-                const tmp<Field<Type> >& tFldCoupled,
-                const tmp<Field<Type> >& tFldNonOverlap
+                const tmp<Field<Type>>& tFldCoupled,
+                const tmp<Field<Type>>& tFldNonOverlap
             ) const
             {
                 updateAreas();
diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C
index 0f6064471f86ac3236d9a2d3787e4d417e503de2..d1be92d8b14eb0fbc6b3bf3fc1a5c31655359de1 100644
--- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C
+++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -109,7 +109,7 @@ Foam::tmp<Foam::vectorField> Foam::cyclicAMIFvPatch::delta() const
                 interpolate
                 (
                     nbrPatch.coupledFvPatch::delta(),
-                    vectorField(this->size(), vector::zero)
+                    vectorField(this->size(), Zero)
                 );
         }
         else
@@ -120,7 +120,7 @@ Foam::tmp<Foam::vectorField> Foam::cyclicAMIFvPatch::delta() const
         const vectorField& nbrPatchD = tnbrPatchD();
 
         tmp<vectorField> tpdv(new vectorField(patchD.size()));
-        vectorField& pdv = tpdv();
+        vectorField& pdv = tpdv.ref();
 
         // do the transformation if necessary
         if (parallel())
diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.H
index 6ba8ed4356f3929c0b75ae752c20ac8444348ce0..0f7553734d1ebd89598dc91ad0821c61fa776a46 100644
--- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.H
+++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -162,7 +162,7 @@ public:
             virtual tmp<vectorField> delta() const;
 
             template<class Type>
-            tmp<Field<Type> > interpolate
+            tmp<Field<Type>> interpolate
             (
                 const Field<Type>& fld,
                 const UList<Type>& defaultValues = UList<Type>()
@@ -172,9 +172,9 @@ public:
             }
 
             template<class Type>
-            tmp<Field<Type> > interpolate
+            tmp<Field<Type>> interpolate
             (
-                const tmp<Field<Type> >& tFld,
+                const tmp<Field<Type>>& tFld,
                 const UList<Type>& defaultValues = UList<Type>()
             ) const
             {
diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C
index d7f1bcd39e4e5756f15402ecc1096e6769bb10e1..a3a9a2dd77c1f73dc69b7dca00bab5e97c9c2e06 100644
--- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C
+++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ const Foam::vectorField& Foam::fvPatch::Cf() const
 Foam::tmp<Foam::vectorField> Foam::fvPatch::Cn() const
 {
     tmp<vectorField> tcc(new vectorField(size()));
-    vectorField& cc = tcc();
+    vectorField& cc = tcc.ref();
 
     const labelUList& faceCells = this->faceCells();
 
diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H
index f8cef73a787683f80340c5757e80885cfa4220c7..95be079ad6a0ef51ea7be8bbd6cdad74e17bbc62 100644
--- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H
+++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -237,7 +237,7 @@ public:
 
             //- Return given internal field next to patch as patch field
             template<class Type>
-            tmp<Field<Type> > patchInternalField(const UList<Type>&) const;
+            tmp<Field<Type>> patchInternalField(const UList<Type>&) const;
 
             //- Return given internal field next to patch as patch field
             template<class Type>
@@ -272,7 +272,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvPatchTemplates.C"
+    #include "fvPatchTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C
index 257825ea6197616c22f3950d0348ebc11dd0cf4d..ad52725ee9eb86e8503b88cd007ed542981ee2f4 100644
--- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C
+++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,9 +37,7 @@ Foam::autoPtr<Foam::fvPatch> Foam::fvPatch::New
 {
     if (debug)
     {
-        Info<< "fvPatch::New(const polyPatch&, const fvBoundaryMesh&) : "
-            << "constructing fvPatch"
-            << endl;
+        InfoInFunction << "Constructing fvPatch" << endl;
     }
 
     polyPatchConstructorTable::iterator cstrIter =
diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchTemplates.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchTemplates.C
index f9459a7718008c2d4e4dc53781ad6681d9ed801f..f3862fdc0a9b0542384c4f0bc98d2f945fe3dfee 100644
--- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchTemplates.C
+++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,13 +28,13 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fvPatch::patchInternalField
+Foam::tmp<Foam::Field<Type>> Foam::fvPatch::patchInternalField
 (
     const UList<Type>& f
 ) const
 {
-    tmp<Field<Type> > tpif(new Field<Type>(size()));
-    Field<Type>& pif = tpif();
+    tmp<Field<Type>> tpif(new Field<Type>(size()));
+    Field<Type>& pif = tpif.ref();
 
     const labelUList& faceCells = this->faceCells();
 
diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
index 6cb95ee928b9fb30f691baf50901b1533bfbd604..a4287b86756e36aaaeaa612d4ebd11d218a9585b 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,16 +29,17 @@ License
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Conversion is a two step process:
-// - from original (fine) patch faces to agglomerations (aggloms might not
-//   be in correct patch order)
-// - from agglomerations to coarse patch faces
 void Foam::singleCellFvMesh::agglomerateMesh
 (
     const fvMesh& mesh,
     const labelListList& agglom
 )
 {
+    // Conversion is a two step process:
+    // - from original (fine) patch faces to agglomerations (aggloms might not
+    //   be in correct patch order)
+    // - from agglomerations to coarse patch faces
+
     const polyBoundaryMesh& oldPatches = mesh.boundaryMesh();
 
     // Check agglomeration within patch face range and continuous
diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H
index 073ac268e07bc467fa49d0d273303116a745681c..f439b425a4b18ea7f11200a2957e952cf807e530 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -202,7 +202,7 @@ public:
         //- Map volField. Internal field set to average, patch fields straight
         //  copies.
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> >
+        tmp<GeometricField<Type, fvPatchField, volMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -218,7 +218,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "singleCellFvMeshInterpolate.C"
+    #include "singleCellFvMeshInterpolate.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
index 93ef66101f49f913c94ae92b4d4b2d3465589c41..171e47ecd4409fcac99ce989e0a6677f941ec7fd 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,13 +36,13 @@ namespace Foam
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<GeometricField<Type, fvPatchField, volMesh> > singleCellFvMesh::interpolate
+tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
 {
     // 1. Create the complete field with dummy patch fields
-    PtrList<fvPatchField<Type> > patchFields(vf.boundaryField().size());
+    PtrList<fvPatchField<Type>> patchFields(vf.boundaryField().size());
 
     forAll(patchFields, patchI)
     {
@@ -59,7 +59,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > singleCellFvMesh::interpolate
     }
 
     // Create the complete field from the pieces
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tresF
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tresF
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -77,7 +77,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > singleCellFvMesh::interpolate
             patchFields
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
+    GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvPatchFields to the correct type using a mapper
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C
index d93e64dea6ee2f664725cd933658e2e2ac8e325e..03e03c6dfebf21ebbb6d2a686b2190c2317c0d55 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,8 +94,7 @@ bool Foam::patchDistMethods::Poisson::correct
             )
         );
     }
-
-    volScalarField& yPsi = tyPsi_();
+    volScalarField& yPsi = tyPsi_.ref();
 
     solve(fvm::laplacian(yPsi) == dimensionedScalar("1", dimless, -1.0));
 
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C
index 88955afa565ef0b68f9b116a90b21d2525b3cfd6..87ca3336d12fb33e0b0e606ba4dc11608e7eac03 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ bool Foam::patchDistMethods::advectionDiffusion::correct
             false
         ),
         mesh_,
-        dimensionedVector("ny", dimless, vector::zero),
+        dimensionedVector("ny", dimless, Zero),
         patchTypes<vector>(mesh_, patchIDs_)
     );
 
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C
index 861fdf446585844277ab9ee58816f7fb3e92cb15..7893341b27b611ec45fb215fcbe195179922a52d 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,7 +118,7 @@ bool Foam::patchDistMethods::meshWave::correct
     }
 
     // Do mesh wave
-    patchDataWave<wallPointData<vector> > wave
+    patchDataWave<wallPointData<vector>> wave
     (
         mesh_,
         patchIDs_,
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
index 913f116dca35fc9783023029de6c30c4d0f58f81..4c105b1025a120d56340bd7bc9d8d7c455ec3f9d 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,6 @@ License
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from components
 template<class TransferType>
 Foam::wallDistData<TransferType>::wallDistData
 (
@@ -68,7 +67,6 @@ Foam::wallDistData<TransferType>::~wallDistData()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-// Correct for mesh geom/topo changes
 template<class TransferType>
 void Foam::wallDistData<TransferType>::correct()
 {
@@ -82,7 +80,7 @@ void Foam::wallDistData<TransferType>::correct()
     labelHashSet wallPatchIDs(getPatchIDs<wallPolyPatch>());
 
     // Collect pointers to data on patches
-    UPtrList<Field<Type> > patchData(mesh.boundaryMesh().size());
+    UPtrList<Field<Type>> patchData(mesh.boundaryMesh().size());
 
     forAll(field_.boundaryField(), patchI)
     {
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.H b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.H
index 8d7aa1312aa39ae20f43e2d8190cd62599795211..3c1052fab78ce4ab8be7c57d8b7900a8151f305d 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.H
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -137,7 +137,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "wallDistData.C"
+    #include "wallDistData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.H b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.H
index 1ba9585ba04315bbbdbf666613886c2c897a113d..6f23e3ae7efb815f9844c30be349105147e800e5 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.H
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethod.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -168,7 +168,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "patchDistMethodTemplates.C"
+    #include "patchDistMethodTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C
index b84c345a140a4a1cb2dd3abd8a9fdfb19411d37a..ae5be722b1b3e4d1716ba409ce80f7c4100ba6b9 100644
--- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C
+++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ void Foam::wallDist::constructn() const
                 mesh()
             ),
             mesh(),
-            dimensionedVector("n" & patchTypeName_, dimless, vector::zero),
+            dimensionedVector("n" & patchTypeName_, dimless, Zero),
             patchDistMethod::patchTypes<vector>(mesh(), patchIDs_)
         )
     );
@@ -59,7 +59,7 @@ void Foam::wallDist::constructn() const
     forAllConstIter(labelHashSet, patchIDs_, iter)
     {
         label patchi = iter.key();
-        n_().boundaryField()[patchi] == patches[patchi].nf();
+        n_.ref().boundaryField()[patchi] == patches[patchi].nf();
     }
 }
 
@@ -176,7 +176,7 @@ const Foam::volVectorField& Foam::wallDist::n() const
 
         nRequired_ = true;
         constructn();
-        pdm_->correct(y_, n_());
+        pdm_->correct(y_, n_.ref());
     }
 
     return n_();
@@ -189,7 +189,7 @@ bool Foam::wallDist::movePoints()
     {
         if (nRequired_)
         {
-            return pdm_->correct(y_, n_());
+            return pdm_->correct(y_, n_.ref());
         }
         else
         {
diff --git a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H
index 469cc86f4591f7532cd64e955ae089dde7ac66c5..ecd615b9f8478518999a8444009be15bcd19ec4d 100644
--- a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H
+++ b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -146,7 +146,7 @@ public:
 template<>
 inline bool contiguous<wallPointYPlus>()
 {
-    return contiguous<wallPointData<scalar> >();
+    return contiguous<wallPointData<scalar>>();
 }
 
 
diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C
index 43833826406e6321c727d5347a0fbcbb703cdc5d..83936a51c449826a49c2e2af0a47c18a856138c0 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,15 +28,10 @@ License
 #include "polyMesh.H"
 #include "calculatedPointPatchFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 template<class Type>
-interpolation<Type>::interpolation
+Foam::interpolation<Type>::interpolation
 (
     const GeometricField<Type, fvPatchField, volMesh>& psi
 )
@@ -52,10 +47,6 @@ interpolation<Type>::interpolation
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#   include "interpolationNew.C"
+#include "interpolationNew.C"
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H
index 4f5e34434f1a65416d879ef2bed7a0884cdd89d1..bb3a6afbce5602bc3453babadacd572bec4568fb 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,14 +91,14 @@ public:
     // Selectors
 
         //- Return a reference to the specified interpolation scheme
-        static autoPtr<interpolation<Type> > New
+        static autoPtr<interpolation<Type>> New
         (
             const word& interpolationType,
             const GeometricField<Type, fvPatchField, volMesh>& psi
         );
 
         //- Return a reference to the selected interpolation scheme
-        static autoPtr<interpolation<Type> > New
+        static autoPtr<interpolation<Type>> New
         (
             const dictionary& interpolationSchemes,
             const GeometricField<Type, fvPatchField, volMesh>& psi
@@ -161,7 +161,7 @@ public:
                                                                                \
 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                              \
                                                                                \
-interpolation<Type>::adddictionaryConstructorToTable<SS<Type> >                \
+interpolation<Type>::adddictionaryConstructorToTable<SS<Type>>                 \
     add##SS##Type##ConstructorToTable_;
 
 
@@ -177,7 +177,7 @@ makeInterpolationType(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolation.C"
+    #include "interpolation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C
index 341ad891244b0f97e56935a914fe08ede8ddf36f..99544f2e6a1faec3d3d3a3a0b73b4513b1f3610e 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr<Foam::interpolation<Type> > Foam::interpolation<Type>::New
+Foam::autoPtr<Foam::interpolation<Type>> Foam::interpolation<Type>::New
 (
     const word& interpolationType,
     const GeometricField<Type, fvPatchField, volMesh>& psi
@@ -48,12 +48,12 @@ Foam::autoPtr<Foam::interpolation<Type> > Foam::interpolation<Type>::New
             << exit(FatalError);
     }
 
-    return autoPtr<interpolation<Type> >(cstrIter()(psi));
+    return autoPtr<interpolation<Type>>(cstrIter()(psi));
 }
 
 
 template<class Type>
-Foam::autoPtr<Foam::interpolation<Type> > Foam::interpolation<Type>::New
+Foam::autoPtr<Foam::interpolation<Type>> Foam::interpolation<Type>::New
 (
     const dictionary& interpolationSchemes,
     const GeometricField<Type, fvPatchField, volMesh>& psi
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C
index 7a623378f78c8f0212a76c5fdce2f31e67eab0c4..82356d91aa436113446977e9ca30e8792b8cc075 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "interpolationCell.H"
 #include "volFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 template<class Type>
-interpolationCell<Type>::interpolationCell
+Foam::interpolationCell<Type>::interpolationCell
 (
     const GeometricField<Type, fvPatchField, volMesh>& psi
 )
@@ -46,7 +41,7 @@ interpolationCell<Type>::interpolationCell
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Type interpolationCell<Type>::interpolate
+Type Foam::interpolationCell<Type>::interpolate
 (
     const vector&,
     const label cellI,
@@ -57,8 +52,4 @@ Type interpolationCell<Type>::interpolate
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H
index cad83f56666653a03ced5e751b829177580588d2..209f3d3ea66058e7b252277397077d563b0e10f9 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationCell.C"
+    #include "interpolationCell.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCell/makeInterpolationCell.C b/src/finiteVolume/interpolation/interpolation/interpolationCell/makeInterpolationCell.C
index 462e0e14c30706f92bd13ca5ee13c9ac85567a8a..6ba82128b8f0e92630da7b6eb84b3b32350822f6 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCell/makeInterpolationCell.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCell/makeInterpolationCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,13 +29,7 @@ License
 
 namespace Foam
 {
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-makeInterpolation(interpolationCell);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
+    makeInterpolation(interpolationCell);
+}
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C
index 34fac09627ba1fbae9bc1830ecf67223e0a43997..3f6bfb5a90d29f63a1e130dadf720a068257eae2 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "interpolationCellPatchConstrained.H"
 #include "volFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 template<class Type>
-interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
+Foam::interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
 (
     const GeometricField<Type, fvPatchField, volMesh>& psi
 )
@@ -46,7 +41,7 @@ interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Type interpolationCellPatchConstrained<Type>::interpolate
+Type Foam::interpolationCellPatchConstrained<Type>::interpolate
 (
     const vector& pt,
     const label cellI,
@@ -69,8 +64,4 @@ Type interpolationCellPatchConstrained<Type>::interpolate
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H
index ba76c1ad894cc42143c482f1b115c812c5ccee5b..4f8babdfd211cd0705d88da2c5a2ecb05d10db60 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationCellPatchConstrained.C"
+    #include "interpolationCellPatchConstrained.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C
index d0cba41cdbdc365c0a38ffda6dedd53154e48766..bd0303464d105d2e6b7157fc8aab7591afea4997 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,13 +29,7 @@ License
 
 namespace Foam
 {
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-makeInterpolation(interpolationCellPatchConstrained);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
+    makeInterpolation(interpolationCellPatchConstrained);
+}
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H
index 842b46c79d37a6f66ead0a392fe0afce2571ae52..4cb6804597c38ad82772e76ccb394ce1c4b6b004 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationCellPoint.C"
+    #include "interpolationCellPoint.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C
index a1256eb36e13ed809fdc8b16e26f69a3804a3e9b..deecb80321dcd3fabe0bcb220230e60ba99213c9 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,15 +31,10 @@ License
 #include "findCellPointFaceTet.H"
 #include "findCellPointFaceTriangle.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
 
 template<class Type>
-interpolationCellPointFace<Type>::interpolationCellPointFace
+Foam::interpolationCellPointFace<Type>::interpolationCellPointFace
 (
     const GeometricField<Type, fvPatchField, volMesh>& psi
 )
@@ -61,7 +56,7 @@ interpolationCellPointFace<Type>::interpolationCellPointFace
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Type interpolationCellPointFace<Type>::interpolate
+Type Foam::interpolationCellPointFace<Type>::interpolate
 (
     const vector& position,
     const label cellI,
@@ -73,7 +68,7 @@ Type interpolationCellPointFace<Type>::interpolate
     scalar phi[4], phiCandidate[4];
     label tetLabelCandidate[2], tetPointLabels[2];
 
-    Type t = pTraits<Type>::zero;
+    Type t = Zero;
 
     // only use face information when the position is on a face
     if (faceI < 0)
@@ -258,8 +253,7 @@ Type interpolationCellPointFace<Type>::interpolate
         }
         else
         {
-            Info<< "interpolationCellPointFace<Type>::interpolate"
-                << "(const vector&, const label cellI) const : "
+            InfoInFunction
                 << "search failed; using closest cellFace value" << endl
                 << "cell number " << cellI << tab
                 << "position " << position << endl;
@@ -363,8 +357,4 @@ Type interpolationCellPointFace<Type>::interpolate
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H
index 54a659626660f9170be05acea5f6712d0f000bf5..e26b2e5f64c565c6438a6ad9e33b84997a833acd 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,7 +112,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationCellPointFace.C"
+    #include "interpolationCellPointFace.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/makeInterpolationCellPointFace.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/makeInterpolationCellPointFace.C
index 8acd4f186432f8c13c56ba5d64d3ea1229e59f9c..0732e5dcaae7ea2ef8384bd94b54cd567ae0e84b 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/makeInterpolationCellPointFace.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/makeInterpolationCellPointFace.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,13 +29,7 @@ License
 
 namespace Foam
 {
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-makeInterpolation(interpolationCellPointFace);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
+    makeInterpolation(interpolationCellPointFace);
+}
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H
index 377f04485829940061365575a1266e7291887f4f..2af0957cd724ebca277015a581d58d06ca39e7a8 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationCellPointWallModified.C"
+    #include "interpolationCellPointWallModified.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H
index 134e2ade9721f654283e8ef0ab5b17503d76447e..81028eccbf73d81f359749e96c4ff0193c98e643 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "interpolationPointMVC.C"
+    #include "interpolationPointMVC.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C
index d77af00d4efb3d27e8ca395153f2066870b462c7..66604147168fcae637abdb89d949e56882b37403 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C
+++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C
@@ -112,7 +112,7 @@ void Foam::pointMVCWeight::calcWeights
             u(j) = uVec[toLocal[f[j]]];
         }
 
-        vector v(point::zero);
+        vector v(Zero);
         forAll(f, j)
         {
             label jPlus1 = f.fcIndex(j);
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H
index 47ea12bab9dd4bae1f48d09e3e61f2972eef4326..61f7cedb256302ea4c4b56e43ee6da54816c0499 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeightI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ inline Type Foam::pointMVCWeight::interpolate
 {
     const labelList& vertices = psip.mesh()().cellPoints()[cellIndex_];
 
-    Type t = pTraits<Type>::zero;
+    Type t = Zero;
     forAll(vertices, i)
     {
         t += psip[vertices[i]]*weights_[i];
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C
index e4f0d4db5c96d055d9a402ea242387d0b71ee7f3..f966abf7f290da865bad40e311c25c9c8d6cacc0 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C
@@ -27,16 +27,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
-namespace limitFuncs
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 template<class Type>
-inline tmp<volScalarField> magSqr<Type>::operator()
+inline Foam::tmp<Foam::volScalarField>
+Foam::limitFuncs::magSqr<Type>::operator()
 (
     const GeometricField<Type, fvPatchField, volMesh>& phi
 ) const
@@ -46,7 +39,8 @@ inline tmp<volScalarField> magSqr<Type>::operator()
 
 
 template<>
-inline tmp<volScalarField> magSqr<scalar>::operator()
+inline Foam::tmp<Foam::volScalarField>
+Foam::limitFuncs::magSqr<Foam::scalar>::operator()
 (
     const volScalarField& phi
 ) const
@@ -56,7 +50,8 @@ inline tmp<volScalarField> magSqr<scalar>::operator()
 
 
 template<>
-inline tmp<volScalarField> magSqr<symmTensor>::operator()
+inline Foam::tmp<Foam::volScalarField>
+Foam::limitFuncs::magSqr<Foam::symmTensor>::operator()
 (
     const volSymmTensorField& phi
 ) const
@@ -66,7 +61,8 @@ inline tmp<volScalarField> magSqr<symmTensor>::operator()
 
 
 template<>
-inline tmp<volScalarField> magSqr<tensor>::operator()
+inline Foam::tmp<Foam::volScalarField>
+Foam::limitFuncs::magSqr<Foam::tensor>::operator()
 (
     const volTensorField& phi
 ) const
@@ -76,7 +72,8 @@ inline tmp<volScalarField> magSqr<tensor>::operator()
 
 
 template<class Type>
-inline tmp<volScalarField> rhoMagSqr<Type>::operator()
+inline Foam::tmp<Foam::volScalarField>
+Foam::limitFuncs::rhoMagSqr<Type>::operator()
 (
     const GeometricField<Type, fvPatchField, volMesh>& phi
 ) const
@@ -88,7 +85,8 @@ inline tmp<volScalarField> rhoMagSqr<Type>::operator()
 
 
 template<>
-inline tmp<volScalarField> rhoMagSqr<scalar>::operator()
+inline Foam::tmp<Foam::volScalarField>
+Foam::limitFuncs::rhoMagSqr<Foam::scalar>::operator()
 (
     const volScalarField& phi
 ) const
@@ -99,9 +97,4 @@ inline tmp<volScalarField> rhoMagSqr<scalar>::operator()
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace limitFuncs
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.H
index d3726edb60ac22d865351aa23c39e2a709d536e1..32834c4f5836d077cad942257ee23c8906faf152 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ public:
     null()
     {}
 
-    inline tmp<GeometricField<Type, fvPatchField, volMesh> > operator()
+    inline tmp<GeometricField<Type, fvPatchField, volMesh>> operator()
     (
         const GeometricField<Type, fvPatchField, volMesh>& phi
     ) const
@@ -95,6 +95,24 @@ public:
     ) const;
 };
 
+template<>
+inline tmp<volScalarField> magSqr<scalar>::operator()
+(
+    const volScalarField& phi
+) const;
+
+template<>
+inline tmp<volScalarField> magSqr<symmTensor>::operator()
+(
+    const volSymmTensorField& phi
+) const;
+
+template<>
+inline tmp<volScalarField> magSqr<tensor>::operator()
+(
+    const volTensorField& phi
+) const;
+
 
 template<class Type>
 class rhoMagSqr
@@ -110,6 +128,12 @@ public:
     ) const;
 };
 
+template<>
+inline tmp<volScalarField> rhoMagSqr<scalar>::operator()
+(
+    const volScalarField& phi
+) const;
+
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -119,7 +143,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LimitFuncs.C"
+    #include "LimitFuncs.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C
index 5471da9006e9736162b3e2bdf333841a9b9e8068..8b523015e14c6a2cdcf5710bcef0e409a764d968 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,13 +39,13 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
 {
     const fvMesh& mesh = this->mesh();
 
-    tmp<GeometricField<typename Limiter::phiType, fvPatchField, volMesh> >
+    tmp<GeometricField<typename Limiter::phiType, fvPatchField, volMesh>>
         tlPhi = LimitFunc<Type>()(phi);
 
     const GeometricField<typename Limiter::phiType, fvPatchField, volMesh>&
         lPhi = tlPhi();
 
-    tmp<GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh> >
+    tmp<GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>>
         tgradc(fvc::grad(lPhi));
     const GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>&
         gradc = tgradc();
@@ -198,7 +198,7 @@ Foam::LimitedScheme<Type, Limiter, LimitFunc>::limiter
             )
         );
 
-        calcLimiter(phi, tlimiterField());
+        calcLimiter(phi, tlimiterField.ref());
 
         return tlimiterField;
     }
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.H
index e41b280a122067c88465ca984451f6d12d626423..09421775cb79fd95aa520aee76f2845917d4187a 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -148,92 +148,92 @@ public:
 // Add the patch constructor functions to the hash tables
 
 #define makeLimitedSurfaceInterpolationTypeScheme\
-(                                                                             \
-    SS,                                                                       \
-    LIMITER,                                                                  \
-    NVDTVD,                                                                   \
-    LIMFUNC,                                                                  \
-    TYPE                                                                      \
-)                                                                             \
-                                                                              \
-typedef LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC>             \
-    LimitedScheme##TYPE##LIMITER##NVDTVD##LIMFUNC##_;                         \
-defineTemplateTypeNameAndDebugWithName                                        \
-    (LimitedScheme##TYPE##LIMITER##NVDTVD##LIMFUNC##_, #SS, 0);               \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                   \
-<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC> >                  \
-    add##SS##LIMFUNC##TYPE##MeshConstructorToTable_;                          \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable               \
-<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC> >                  \
-    add##SS##LIMFUNC##TYPE##MeshFluxConstructorToTable_;                      \
-                                                                              \
-limitedSurfaceInterpolationScheme<TYPE>::addMeshConstructorToTable            \
-<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC> >                  \
-    add##SS##LIMFUNC##TYPE##MeshConstructorToLimitedTable_;                   \
-                                                                              \
-limitedSurfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable        \
-<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC> >                  \
+(                                                                              \
+    SS,                                                                        \
+    LIMITER,                                                                   \
+    NVDTVD,                                                                    \
+    LIMFUNC,                                                                   \
+    TYPE                                                                       \
+)                                                                              \
+                                                                               \
+typedef LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC>              \
+    LimitedScheme##TYPE##LIMITER##NVDTVD##LIMFUNC##_;                          \
+defineTemplateTypeNameAndDebugWithName                                         \
+    (LimitedScheme##TYPE##LIMITER##NVDTVD##LIMFUNC##_, #SS, 0);                \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                    \
+<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC>>                    \
+    add##SS##LIMFUNC##TYPE##MeshConstructorToTable_;                           \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable                \
+<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC>>                    \
+    add##SS##LIMFUNC##TYPE##MeshFluxConstructorToTable_;                       \
+                                                                               \
+limitedSurfaceInterpolationScheme<TYPE>::addMeshConstructorToTable             \
+<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC>>                    \
+    add##SS##LIMFUNC##TYPE##MeshConstructorToLimitedTable_;                    \
+                                                                               \
+limitedSurfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable         \
+<LimitedScheme<TYPE, LIMITER<NVDTVD>, limitFuncs::LIMFUNC>>                    \
     add##SS##LIMFUNC##TYPE##MeshFluxConstructorToLimitedTable_;
 
 
-#define makeLimitedSurfaceInterpolationScheme(SS, LIMITER)                    \
-                                                                              \
-makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDTVD,magSqr,scalar)    \
-makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDTVD,magSqr,vector)    \
-makeLimitedSurfaceInterpolationTypeScheme                                     \
-(                                                                             \
-    SS,                                                                       \
-    LIMITER,                                                                  \
-    NVDTVD,                                                                   \
-    magSqr,                                                                   \
-    sphericalTensor                                                           \
-)                                                                             \
+#define makeLimitedSurfaceInterpolationScheme(SS, LIMITER)                     \
+                                                                               \
+makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDTVD,magSqr,scalar)     \
+makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDTVD,magSqr,vector)     \
+makeLimitedSurfaceInterpolationTypeScheme                                      \
+(                                                                              \
+    SS,                                                                        \
+    LIMITER,                                                                   \
+    NVDTVD,                                                                    \
+    magSqr,                                                                    \
+    sphericalTensor                                                            \
+)                                                                              \
 makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDTVD,magSqr,symmTensor)\
 makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDTVD,magSqr,tensor)
 
 
-#define makeLimitedVSurfaceInterpolationScheme(SS, LIMITER)                   \
+#define makeLimitedVSurfaceInterpolationScheme(SS, LIMITER)                    \
 makeLimitedSurfaceInterpolationTypeScheme(SS,LIMITER,NVDVTVDV,null,vector)
 
 
 #define makeLLimitedSurfaceInterpolationTypeScheme\
-(                                                                             \
-    SS,                                                                       \
-    LLIMITER,                                                                 \
-    LIMITER,                                                                  \
-    NVDTVD,                                                                   \
-    LIMFUNC,                                                                  \
-    TYPE                                                                      \
-)                                                                             \
-                                                                              \
-typedef LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC>  \
-    LimitedScheme##TYPE##LLIMITER##LIMITER##NVDTVD##LIMFUNC##_;               \
-defineTemplateTypeNameAndDebugWithName                                        \
-    (LimitedScheme##TYPE##LLIMITER##LIMITER##NVDTVD##LIMFUNC##_, #SS, 0);     \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                   \
-<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC> >       \
-    add##SS##LIMFUNC##TYPE##MeshConstructorToTable_;                          \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable               \
-<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC> >       \
-    add##SS##LIMFUNC##TYPE##MeshFluxConstructorToTable_;                      \
-                                                                              \
-limitedSurfaceInterpolationScheme<TYPE>::addMeshConstructorToTable            \
-<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC> >       \
-    add##SS##LIMFUNC##TYPE##MeshConstructorToLimitedTable_;                   \
-                                                                              \
-limitedSurfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable        \
-<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC> >       \
+(                                                                              \
+    SS,                                                                        \
+    LLIMITER,                                                                  \
+    LIMITER,                                                                   \
+    NVDTVD,                                                                    \
+    LIMFUNC,                                                                   \
+    TYPE                                                                       \
+)                                                                              \
+                                                                               \
+typedef LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC>    \
+    LimitedScheme##TYPE##LLIMITER##LIMITER##NVDTVD##LIMFUNC##_;                \
+defineTemplateTypeNameAndDebugWithName                                         \
+    (LimitedScheme##TYPE##LLIMITER##LIMITER##NVDTVD##LIMFUNC##_, #SS, 0);      \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                    \
+<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC>>          \
+    add##SS##LIMFUNC##TYPE##MeshConstructorToTable_;                           \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable                \
+<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC>>          \
+    add##SS##LIMFUNC##TYPE##MeshFluxConstructorToTable_;                       \
+                                                                               \
+limitedSurfaceInterpolationScheme<TYPE>::addMeshConstructorToTable             \
+<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC>>          \
+    add##SS##LIMFUNC##TYPE##MeshConstructorToLimitedTable_;                    \
+                                                                               \
+limitedSurfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable         \
+<LimitedScheme<TYPE, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC>>          \
     add##SS##LIMFUNC##TYPE##MeshFluxConstructorToLimitedTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LimitedScheme.C"
+    #include "LimitedScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C
index 28cc9fa1dbb522d513557de4b8dee70101c08723..3101d60893e3fb134b9d28400cec4fac0bce72a8 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ Foam::PhiScheme<Type, PhiLimiter>::limiter
             dimless
         )
     );
-    surfaceScalarField& Limiter = tLimiter();
+    surfaceScalarField& Limiter = tLimiter.ref();
 
     const surfaceScalarField& CDweights = mesh.surfaceInterpolation::weights();
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.H
index 358c17e47351ce40f30f795f9d93a02fc3d1edb3..c18beaf685b968f5018d2038c3c1297c2cd2d5a4 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -141,21 +141,21 @@ typedef PhiScheme<TYPE, WEIGHT> Phischeme##WEIGHT_;                            \
 defineTemplateTypeNameAndDebugWithName(Phischeme##WEIGHT_, #SS, 0);            \
                                                                                \
 surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                    \
-<PhiScheme<TYPE, WEIGHT> > add##SS##TYPE##MeshConstructorToTable_;             \
+<PhiScheme<TYPE, WEIGHT>> add##SS##TYPE##MeshConstructorToTable_;              \
                                                                                \
 surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable                \
-<PhiScheme<TYPE, WEIGHT> > add##SS##TYPE##MeshFluxConstructorToTable_;         \
+<PhiScheme<TYPE, WEIGHT>> add##SS##TYPE##MeshFluxConstructorToTable_;          \
                                                                                \
 limitedSurfaceInterpolationScheme<TYPE>::addMeshConstructorToTable             \
-<PhiScheme<TYPE, WEIGHT> > add##SS##TYPE##MeshConstructorToLimitedTable_;      \
+<PhiScheme<TYPE, WEIGHT>> add##SS##TYPE##MeshConstructorToLimitedTable_;       \
                                                                                \
 limitedSurfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable         \
-<PhiScheme<TYPE, WEIGHT> > add##SS##TYPE##MeshFluxConstructorToLimitedTable_;
+<PhiScheme<TYPE, WEIGHT>> add##SS##TYPE##MeshFluxConstructorToLimitedTable_;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PhiScheme.C"
+    #include "PhiScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitWith/limitWith.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitWith/limitWith.H
index 0c33e74d871d39696d0cb645b1a81ede73c3a1fd..111a2400416ef659e77af68b8a57fcd9edc3c527 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitWith/limitWith.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitWith/limitWith.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,10 +56,10 @@ class limitWith
     // Private Member Functions
 
         //- Interpolation scheme
-        tmp<surfaceInterpolationScheme<Type> > tInterp_;
+        tmp<surfaceInterpolationScheme<Type>> tInterp_;
 
         //- Limiter
-        tmp<limitedSurfaceInterpolationScheme<Type> > tLimiter_;
+        tmp<limitedSurfaceInterpolationScheme<Type>> tLimiter_;
 
 
         //- Disallow default bitwise copy construct
@@ -141,7 +141,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>& vf) const
         {
             return tLimiter_().limiter(vf)*tInterp_().correction(vf);
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C
index fa92112352149baebe3bf360ccfca2dd16630d75..138fad0ee760487a563954035b80ca4d5493ba79 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,16 +28,11 @@ License
 #include "surfaceFields.H"
 #include "coupledFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<limitedSurfaceInterpolationScheme<Type> >
-limitedSurfaceInterpolationScheme<Type>::New
+Foam::tmp<Foam::limitedSurfaceInterpolationScheme<Type>>
+Foam::limitedSurfaceInterpolationScheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -45,10 +40,8 @@ limitedSurfaceInterpolationScheme<Type>::New
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "limitedSurfaceInterpolationScheme<Type>::"
-               "New(const fvMesh&, Istream&)"
-               " : constructing limitedSurfaceInterpolationScheme<Type>"
-            << endl;
+        InfoInFunction
+            << "Constructing limitedSurfaceInterpolationScheme<Type>" << endl;
     }
 
     if (schemeData.eof())
@@ -84,10 +77,9 @@ limitedSurfaceInterpolationScheme<Type>::New
 }
 
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<limitedSurfaceInterpolationScheme<Type> >
-limitedSurfaceInterpolationScheme<Type>::New
+Foam::tmp<Foam::limitedSurfaceInterpolationScheme<Type>>
+Foam::limitedSurfaceInterpolationScheme<Type>::New
 (
     const fvMesh& mesh,
     const surfaceScalarField& faceFlux,
@@ -96,9 +88,8 @@ limitedSurfaceInterpolationScheme<Type>::New
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "limitedSurfaceInterpolationScheme<Type>::New"
-               "(const fvMesh&, const surfaceScalarField&, Istream&) : "
-               "constructing limitedSurfaceInterpolationScheme<Type>"
+        InfoInFunction
+            << "Constructing limitedSurfaceInterpolationScheme<Type>"
             << endl;
     }
 
@@ -138,14 +129,16 @@ limitedSurfaceInterpolationScheme<Type>::New
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-limitedSurfaceInterpolationScheme<Type>::~limitedSurfaceInterpolationScheme()
+Foam::limitedSurfaceInterpolationScheme<Type>::
+~limitedSurfaceInterpolationScheme()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
+Foam::tmp<Foam::surfaceScalarField>
+Foam::limitedSurfaceInterpolationScheme<Type>::weights
 (
     const GeometricField<Type, fvPatchField, volMesh>& phi,
     const surfaceScalarField& CDweights,
@@ -154,7 +147,7 @@ tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
 {
     // Note that here the weights field is initialised as the limiter
     // from which the weight is calculated using the limiter value
-    surfaceScalarField& Weights = tLimiter();
+    surfaceScalarField& Weights = tLimiter.ref();
 
     scalarField& pWeights = Weights.internalField();
 
@@ -187,7 +180,8 @@ tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
 }
 
 template<class Type>
-tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
+Foam::tmp<Foam::surfaceScalarField>
+Foam::limitedSurfaceInterpolationScheme<Type>::weights
 (
     const GeometricField<Type, fvPatchField, volMesh>& phi
 ) const
@@ -201,8 +195,8 @@ tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
 }
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-limitedSurfaceInterpolationScheme<Type>::flux
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::limitedSurfaceInterpolationScheme<Type>::flux
 (
     const GeometricField<Type, fvPatchField, volMesh>& phi
 ) const
@@ -211,8 +205,4 @@ limitedSurfaceInterpolationScheme<Type>::flux
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.H
index 322608fc99a58a5fa87024a29420376ecf72609a..26099218722681e44a7b5aa8ede4c8fb3ba3a323 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -141,14 +141,14 @@ public:
     // Selectors
 
         //- Return new tmp interpolation scheme
-        static tmp<limitedSurfaceInterpolationScheme<Type> > New
+        static tmp<limitedSurfaceInterpolationScheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
         );
 
         //- Return new tmp interpolation scheme
-        static tmp<limitedSurfaceInterpolationScheme<Type> > New
+        static tmp<limitedSurfaceInterpolationScheme<Type>> New
         (
             const fvMesh& mesh,
             const surfaceScalarField& faceFlux,
@@ -184,7 +184,7 @@ public:
         ) const;
 
         //- Return the interpolation weighting factors
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         flux
         (
             const GeometricField<Type, fvPatchField, volMesh>&
@@ -204,17 +204,17 @@ public:
                                                                                \
 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                              \
                                                                                \
-surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> >         \
+surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type>>          \
     add##SS##Type##MeshConstructorToTable_;                                    \
                                                                                \
-surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> >     \
+surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type>>      \
     add##SS##Type##MeshFluxConstructorToTable_;                                \
                                                                                \
-limitedSurfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> >  \
+limitedSurfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type>>   \
     add##SS##Type##MeshConstructorToLimitedTable_;                             \
                                                                                \
 limitedSurfaceInterpolationScheme<Type>::                                      \
-    addMeshFluxConstructorToTable<SS<Type> >                                   \
+    addMeshFluxConstructorToTable<SS<Type>>                                    \
     add##SS##Type##MeshFluxConstructorToLimitedTable_;
 
 #define makelimitedSurfaceInterpolationScheme(SS)                              \
@@ -229,7 +229,7 @@ makelimitedSurfaceInterpolationTypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "limitedSurfaceInterpolationScheme.C"
+    #include "limitedSurfaceInterpolationScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C
index e2d9325ca4217026c2956c4e073fdbead73e014d..a382967fb2fc8bb4689fa9371fd977e169e1bd6c 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,24 +32,24 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeBaseLimitedSurfaceInterpolationScheme(Type)                       \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug                                           \
-(                                                                             \
-    limitedSurfaceInterpolationScheme<Type>,                                  \
-    0                                                                         \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    limitedSurfaceInterpolationScheme<Type>,                                  \
-    Mesh                                                                      \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    limitedSurfaceInterpolationScheme<Type>,                                  \
-    MeshFlux                                                                  \
+#define makeBaseLimitedSurfaceInterpolationScheme(Type)                        \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug                                            \
+(                                                                              \
+    limitedSurfaceInterpolationScheme<Type>,                                   \
+    0                                                                          \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    limitedSurfaceInterpolationScheme<Type>,                                   \
+    Mesh                                                                       \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    limitedSurfaceInterpolationScheme<Type>,                                   \
+    MeshFlux                                                                   \
 );
 
 makeBaseLimitedSurfaceInterpolationScheme(scalar)
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentScheme.H
index 61a91dcc485556d54591af585e16407c3ff8a7b4..d255170cfe7f235f58944de32429c2da938964cc 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ public:
 
     // Member Operators
 
-        tmp<surfaceInterpolationScheme<Type> > operator()
+        tmp<surfaceInterpolationScheme<Type>> operator()
         (
             const GeometricField<Type, fvPatchField, volMesh>& field
         ) const
@@ -116,7 +116,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "multivariateIndependentScheme.C"
+    #include "multivariateIndependentScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentSchemes.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentSchemes.C
index 1d6f297ada7bc52e578a18a6e7ed5dfe36de3f7d..765770e60593e399d5a36e5c074ad3de7cef6747 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentSchemes.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateIndependentScheme/multivariateIndependentSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ namespace Foam
 defineNamedTemplateTypeNameAndDebug(multivariateIndependentScheme<scalar>, 0);
 
 multivariateSurfaceInterpolationScheme<scalar>::addIstreamConstructorToTable
-    <multivariateIndependentScheme<scalar> >
+    <multivariateIndependentScheme<scalar>>
     addMultivariateIndependentSchemeScalarConstructorToTable_;
 
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateScheme/multivariateScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateScheme/multivariateScheme.H
index cb1164c8a7cf25e6a939e8b6fc12febd52c8ad92..e6e71c0cf368989cd741be77f22217f3d2481eda 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateScheme/multivariateScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateScheme/multivariateScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,12 +129,12 @@ public:
                 }
         };
 
-        tmp<surfaceInterpolationScheme<Type> > operator()
+        tmp<surfaceInterpolationScheme<Type>> operator()
         (
             const GeometricField<Type, fvPatchField, volMesh>& field
         ) const
         {
-            return tmp<surfaceInterpolationScheme<Type> >
+            return tmp<surfaceInterpolationScheme<Type>>
             (
                 new fieldScheme(field, weights_)
             );
@@ -181,7 +181,7 @@ multivariateSurfaceInterpolationScheme<scalar>::addIstreamConstructorToTable   \
 typedef multivariateScheme                                                     \
 <                                                                              \
     scalar,                                                                    \
-    LimitedScheme<scalar, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC>     \
+    LimitedScheme<scalar, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC>      \
 >                                                                              \
     multivariateScheme##LLIMITER##LIMITER##NVDTVD##LIMFUNC##_;                 \
 defineTemplateTypeNameAndDebugWithName                                         \
@@ -196,7 +196,7 @@ multivariateSurfaceInterpolationScheme<scalar>::addIstreamConstructorToTable   \
     multivariateScheme                                                         \
     <                                                                          \
         scalar,                                                                \
-        LimitedScheme<scalar, LLIMITER<LIMITER<NVDTVD> >, limitFuncs::LIMFUNC> \
+        LimitedScheme<scalar, LLIMITER<LIMITER<NVDTVD>>, limitFuncs::LIMFUNC> \
     >                                                                          \
 >                                                                              \
     addMultivariate##SS##ConstructorToTable_;
@@ -204,7 +204,7 @@ multivariateSurfaceInterpolationScheme<scalar>::addIstreamConstructorToTable   \
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "multivariateScheme.C"
+    #include "multivariateScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionScheme.H
index 7da65455302255135bc0611f0ebf958ba8ca01b8..fec04468e40e7e6fa15baeacf44612d303f889d6 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,12 +128,12 @@ public:
                 }
         };
 
-        tmp<surfaceInterpolationScheme<Type> > operator()
+        tmp<surfaceInterpolationScheme<Type>> operator()
         (
             const GeometricField<Type, fvPatchField, volMesh>& field
         ) const
         {
-            return tmp<surfaceInterpolationScheme<Type> >
+            return tmp<surfaceInterpolationScheme<Type>>
             (
                 new fieldScheme(field, weights_)
             );
@@ -148,7 +148,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "multivariateSelectionScheme.C"
+    #include "multivariateSelectionScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionSchemes.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionSchemes.C
index 3a93c9cb198b18c597539ab79ac56aa2cbd068e6..701936836b5a1a4bfa11c54e1403154c76f4aff0 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionSchemes.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSelectionScheme/multivariateSelectionSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ namespace Foam
 defineNamedTemplateTypeNameAndDebug(multivariateSelectionScheme<scalar>, 0);
 
 multivariateSurfaceInterpolationScheme<scalar>::addIstreamConstructorToTable
-    <multivariateSelectionScheme<scalar> >
+    <multivariateSelectionScheme<scalar>>
     addMultivariateSelectionSchemeScalarConstructorToTable_;
 
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C
index b2f683dac23f35a02e1477c8cb81d7c29775e447..62288018b0cd21861361a54470e52d9cd4287381 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,16 +31,10 @@ Description
 #include "volFields.H"
 #include "surfaceFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-//- Construct from face-flux field and coefficient
 template<class Type>
-multivariateSurfaceInterpolationScheme<Type>::
+Foam::multivariateSurfaceInterpolationScheme<Type>::
 multivariateSurfaceInterpolationScheme
 (
     const fvMesh& mesh,
@@ -56,10 +50,9 @@ multivariateSurfaceInterpolationScheme
 
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<multivariateSurfaceInterpolationScheme<Type> >
-multivariateSurfaceInterpolationScheme<Type>::New
+Foam::tmp<Foam::multivariateSurfaceInterpolationScheme<Type>>
+Foam::multivariateSurfaceInterpolationScheme<Type>::New
 (
     const fvMesh& mesh,
     const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs,
@@ -69,11 +62,8 @@ multivariateSurfaceInterpolationScheme<Type>::New
 {
     if (fv::debug)
     {
-        Info<< "multivariateSurfaceInterpolationScheme<Type>::New"
-               "(const fvMesh& mesh, const fieldTable&, "
-               "const surfaceScalarField&, Istream&) : "
-               "constructing surfaceInterpolationScheme<Type>"
-            << endl;
+        InfoInFunction
+            << "Constructing surfaceInterpolationScheme<Type>" << endl;
     }
 
     const word schemeName(schemeData);
@@ -99,13 +89,9 @@ multivariateSurfaceInterpolationScheme<Type>::New
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-multivariateSurfaceInterpolationScheme<Type>::
+Foam::multivariateSurfaceInterpolationScheme<Type>::
 ~multivariateSurfaceInterpolationScheme()
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H
index aaea76b2a979cf40e745d92da808d0335efc0979..4669b43d63ce0cca5f22c32c47e52b4e1f6a96cc 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ namespace Foam
 template<class Type>
 class multivariateSurfaceInterpolationScheme
 :
-    public refCount
+    public tmp<multivariateSurfaceInterpolationScheme<Type>>::refCount
 {
 
 public:
@@ -133,7 +133,7 @@ public:
     // Selectors
 
         //- Return a pointer to a new gradScheme created on freestore
-        static tmp<multivariateSurfaceInterpolationScheme<Type> > New
+        static tmp<multivariateSurfaceInterpolationScheme<Type>> New
         (
             const fvMesh& mesh,
             const fieldTable& fields,
@@ -192,7 +192,7 @@ public:
                 ) const = 0;
         };
 
-        virtual tmp<surfaceInterpolationScheme<Type> > operator()
+        virtual tmp<surfaceInterpolationScheme<Type>> operator()
         (
             const GeometricField<Type, fvPatchField, volMesh>& field
         ) const = 0;
@@ -212,7 +212,7 @@ public:
 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                              \
                                                                                \
 multivariateSurfaceInterpolationScheme<Type>::                                 \
-addIstreamConstructorToTable<SS<Type> >                                        \
+addIstreamConstructorToTable<SS<Type>>                                         \
     add##SS##Type##ConstructorToTable_;
 
 
@@ -228,7 +228,7 @@ makeMultivariateSurfaceInterpolationTypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "multivariateSurfaceInterpolationScheme.C"
+    #include "multivariateSurfaceInterpolationScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H
index b680975aca5fde25b1fe836f6f9ed567137fd0d4..504d542eab0ccf449c248a9ca0ee1c6c46a0f101 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,12 +135,12 @@ public:
                 }
         };
 
-        tmp<surfaceInterpolationScheme<Type> > operator()
+        tmp<surfaceInterpolationScheme<Type>> operator()
         (
             const GeometricField<Type, fvPatchField, volMesh>& field
         ) const
         {
-            return tmp<surfaceInterpolationScheme<Type> >
+            return tmp<surfaceInterpolationScheme<Type>>
             (
                 new fieldScheme(field, faceFlux_)
             );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C
index 7aefde8875b9c392d352739b59734b395d9c4f83..975e397805dea6c596068f7032b5fac1a39267e3 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,16 +54,14 @@ Foam::CentredFitData<Polynomial>::CentredFitData
 {
     if (debug)
     {
-        Info<< "Contructing CentredFitData<Polynomial>" << endl;
+        InfoInFunction << "Contructing CentredFitData<Polynomial>" << endl;
     }
 
     calcFit();
 
     if (debug)
     {
-        Info<< "CentredFitData<Polynomial>::CentredFitData() :"
-            << "Finished constructing polynomialFit data"
-            << endl;
+        Info<<     "Finished constructing polynomialFit data" << endl;
     }
 }
 
@@ -78,7 +76,7 @@ void Foam::CentredFitData<Polynomial>::calcFit()
     // Get the cell/face centres in stencil order.
     // Centred face stencils no good for triangles or tets.
     // Need bigger stencils
-    List<List<point> > stencilPoints(mesh.nFaces());
+    List<List<point>> stencilPoints(mesh.nFaces());
     this->stencil().collectData(mesh.C(), stencilPoints);
 
     // find the fit coefficients for every face in the mesh
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H
index 41aac91b291707335491afd2a6e17f227bf581c5..7c3bac7a930dc35243472d4a2ba0f22bef59983e 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CentredFitData.C"
+    #include "CentredFitData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H
index 8d6bd3a1f42c29bd3159575974185c28dcc44db9..e094ab9a7489ea9a65831ffe6bcbf91c071f93e7 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -148,37 +148,37 @@ public:
 // Add the patch constructor functions to the hash tables
 
 #define makeCentredFitSurfaceInterpolationTypeScheme\
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    TYPE                                                                      \
-)                                                                             \
-                                                                              \
-typedef CentredFitScheme<TYPE, POLYNOMIAL, STENCIL>                           \
-    CentredFitScheme##TYPE##POLYNOMIAL##STENCIL##_;                           \
-defineTemplateTypeNameAndDebugWithName                                        \
-    (CentredFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0);                 \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                   \
-<CentredFitScheme<TYPE, POLYNOMIAL, STENCIL> >                                \
-    add##SS##STENCIL##TYPE##MeshConstructorToTable_;                          \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable               \
-<CentredFitScheme<TYPE, POLYNOMIAL, STENCIL> >                                \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    TYPE                                                                       \
+)                                                                              \
+                                                                               \
+typedef CentredFitScheme<TYPE, POLYNOMIAL, STENCIL>                            \
+    CentredFitScheme##TYPE##POLYNOMIAL##STENCIL##_;                            \
+defineTemplateTypeNameAndDebugWithName                                         \
+    (CentredFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0);                  \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                    \
+<CentredFitScheme<TYPE, POLYNOMIAL, STENCIL>>                                  \
+    add##SS##STENCIL##TYPE##MeshConstructorToTable_;                           \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable                \
+<CentredFitScheme<TYPE, POLYNOMIAL, STENCIL>>                                  \
     add##SS##STENCIL##TYPE##MeshFluxConstructorToTable_;
 
-#define makeCentredFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL)     \
-                                                                              \
-makeCentredFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar)    \
-makeCentredFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector)    \
-makeCentredFitSurfaceInterpolationTypeScheme                                  \
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    sphericalTensor                                                           \
-)                                                                             \
+#define makeCentredFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL)      \
+                                                                               \
+makeCentredFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar)     \
+makeCentredFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector)     \
+makeCentredFitSurfaceInterpolationTypeScheme                                   \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    sphericalTensor                                                            \
+)                                                                              \
 makeCentredFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,symmTensor)\
 makeCentredFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,tensor)
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H
index c2aa8498f91afa396578c45f7dbf1c2980afcb7c..73cc5ab710613a3b203d9ba2c06308b9a5fc56b0 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,13 +87,13 @@ class CoBlended
         const scalar Co1_;
 
         //- Scheme 1
-        tmp<surfaceInterpolationScheme<Type> > tScheme1_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme1_;
 
         //- Courant number above which scheme2 is used
         const scalar Co2_;
 
         //- Scheme 2
-        tmp<surfaceInterpolationScheme<Type> > tScheme2_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme2_;
 
         //- The face-flux used to compute the face Courant number
         const surfaceScalarField& faceFlux_;
@@ -251,7 +251,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -274,7 +274,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -313,7 +313,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C
index ba213d0d08e6289378da8bbb21f4b912ee255ee1..eb6da09f1929c41538b290c4ce716e29d44dafb3 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -194,10 +194,10 @@ 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.m(); i++)
     {
-        B[i][0] *= wts[0];
-        B[i][1] *= wts[0];
+        B(i, 0) *= wts[0];
+        B(i, 1) *= wts[0];
     }
 
     // Set the fit
@@ -214,7 +214,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
 
         for (label i=0; i<stencilSize; i++)
         {
-            coeffsi[i] = wts[0]*wts[i]*svd.VSinvUt()[0][i];
+            coeffsi[i] = wts[0]*wts[i]*svd.VSinvUt()(0, i);
             if (mag(coeffsi[i]) > maxCoeff)
             {
                 maxCoeff = mag(coeffsi[i]);
@@ -267,16 +267,16 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
                 wts[1] *= 10;
             }
 
-            for (label j = 0; j < B.m(); j++)
+            for (label j = 0; j < B.n(); j++)
             {
-                B[0][j] *= 10;
-                B[1][j] *= 10;
+                B(0, j) *= 10;
+                B(1, j) *= 10;
             }
 
-            for (label i = 0; i < B.n(); i++)
+            for (label i = 0; i < B.m(); i++)
             {
-                B[i][0] *= 10;
-                B[i][1] *= 10;
+                B(i, 0) *= 10;
+                B(i, 1) *= 10;
             }
         }
     }
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H
index 5faeed6eb1932616b28c6d13cace0c5408cd4e9b..711d2f4df16f31dd991710dc1c4c8de7ea2cd5cc 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,7 +173,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FitData.C"
+    #include "FitData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H
index 1c407f8a8c535e1e8d764f081f44dcf8b43f91c7..7d97f00bd7c09e6222c65e1dea1c90513a67bfbc 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H
index 2070b5ae07170d28d6c35ea0713c624c4aa0570b..6732a066ffbcd06771ea690697b2e5866afe42a9 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -155,44 +155,44 @@ public:
 // Add the patch constructor functions to the hash tables
 
 #define makePureUpwindFitSurfaceInterpolationTypeScheme\
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    TYPE                                                                      \
-)                                                                             \
-                                                                              \
-typedef PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>                        \
-    PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_;                        \
-defineTemplateTypeNameAndDebugWithName                                        \
-    (PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0);              \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                   \
-<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> >                             \
-    add##SS##STENCIL##TYPE##MeshConstructorToTable_;                          \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable               \
-<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> >                             \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    TYPE                                                                       \
+)                                                                              \
+                                                                               \
+typedef PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>                         \
+    PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_;                         \
+defineTemplateTypeNameAndDebugWithName                                         \
+    (PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0);               \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                    \
+<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>>                               \
+    add##SS##STENCIL##TYPE##MeshConstructorToTable_;                           \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable                \
+<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>>                               \
     add##SS##STENCIL##TYPE##MeshFluxConstructorToTable_;
 
-#define makePureUpwindFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL)  \
-                                                                              \
+#define makePureUpwindFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL)   \
+                                                                               \
 makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar) \
 makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector) \
-makePureUpwindFitSurfaceInterpolationTypeScheme                               \
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    sphericalTensor                                                           \
-)                                                                             \
-makePureUpwindFitSurfaceInterpolationTypeScheme                               \
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    symmTensor                                                                \
-)                                                                             \
+makePureUpwindFitSurfaceInterpolationTypeScheme                                \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    sphericalTensor                                                            \
+)                                                                              \
+makePureUpwindFitSurfaceInterpolationTypeScheme                                \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    symmTensor                                                                 \
+)                                                                              \
 makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,tensor)
 
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C
index 40499a5c8f29003932faf04bf97018b6ee081217..6136f0d6fc926e6a9582e57f1ea1637ffb0d75d7 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,16 +55,14 @@ Foam::UpwindFitData<Polynomial>::UpwindFitData
 {
     if (debug)
     {
-        Info<< "Contructing UpwindFitData<Polynomial>" << endl;
+        InfoInFunction << "Contructing UpwindFitData<Polynomial>" << endl;
     }
 
     calcFit();
 
     if (debug)
     {
-        Info<< "UpwindFitData<Polynomial>::UpwindFitData() :"
-            << "Finished constructing polynomialFit data"
-            << endl;
+        Info<< "    Finished constructing polynomialFit data" << endl;
     }
 }
 
@@ -83,7 +81,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
     // ~~~~~~~~~~~~~~~~~~~~~
 
     // Get the cell/face centres in stencil order.
-    List<List<point> > stencilPoints(mesh.nFaces());
+    List<List<point>> stencilPoints(mesh.nFaces());
     this->stencil().collectData
     (
         this->stencil().ownMap(),
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H
index 35dfafc969ee362a7c27a3667534e067523b7275..dfe329ac6bcb38875db957964c9f81e3524e447b 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UpwindFitData.C"
+    #include "UpwindFitData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H
index 62ff6b660335704c2b9f05c7d10cc526076cc1a3..6f5ddf57e6295f354f3a4f766d13d088dcb0a93b 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -159,37 +159,37 @@ public:
 // Add the patch constructor functions to the hash tables
 
 #define makeUpwindFitSurfaceInterpolationTypeScheme\
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    TYPE                                                                      \
-)                                                                             \
-                                                                              \
-typedef UpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>                            \
-    UpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_;                            \
-defineTemplateTypeNameAndDebugWithName                                        \
-    (UpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0);                  \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                   \
-<UpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> >                                 \
-    add##SS##STENCIL##TYPE##MeshConstructorToTable_;                          \
-                                                                              \
-surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable               \
-<UpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> >                                 \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    TYPE                                                                       \
+)                                                                              \
+                                                                               \
+typedef UpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>                             \
+    UpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_;                             \
+defineTemplateTypeNameAndDebugWithName                                         \
+    (UpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0);                   \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable                    \
+<UpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>>                                   \
+    add##SS##STENCIL##TYPE##MeshConstructorToTable_;                           \
+                                                                               \
+surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable                \
+<UpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>>                                   \
     add##SS##STENCIL##TYPE##MeshFluxConstructorToTable_;
 
-#define makeUpwindFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL)      \
-                                                                              \
-makeUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar)     \
-makeUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector)     \
-makeUpwindFitSurfaceInterpolationTypeScheme                                   \
-(                                                                             \
-    SS,                                                                       \
-    POLYNOMIAL,                                                               \
-    STENCIL,                                                                  \
-    sphericalTensor                                                           \
-)                                                                             \
+#define makeUpwindFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL)       \
+                                                                               \
+makeUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar)      \
+makeUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector)      \
+makeUpwindFitSurfaceInterpolationTypeScheme                                    \
+(                                                                              \
+    SS,                                                                        \
+    POLYNOMIAL,                                                                \
+    STENCIL,                                                                   \
+    sphericalTensor                                                            \
+)                                                                              \
 makeUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,symmTensor) \
 makeUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,tensor)
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H
index 11e24700a43770d66c2a8fd4e4996c32befc18b1..fbeb1eef1a7cad895061a1e3281652f3908f9385 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ SourceFiles
 #include "surfaceInterpolationScheme.H"
 #include "blendedSchemeBase.H"
 #include "surfaceInterpolate.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "fvcSurfaceIntegrate.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -97,13 +97,13 @@ class cellCoBlended
         const scalar Co1_;
 
         //- Scheme 1
-        tmp<surfaceInterpolationScheme<Type> > tScheme1_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme1_;
 
         //- Courant number above which scheme2 is used
         const scalar Co2_;
 
         //- Scheme 2
-        tmp<surfaceInterpolationScheme<Type> > tScheme2_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme2_;
 
         //- The face-flux used to compute the face Courant number
         const surfaceScalarField& faceFlux_;
@@ -230,7 +230,7 @@ public:
                 ),
                 mesh,
                 dimensionedScalar("Co", dimless, 0),
-                zeroGradientFvPatchScalarField::typeName
+                extrapolatedCalculatedFvPatchScalarField::typeName
             );
 
             scalarField sumPhi
@@ -279,7 +279,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -302,7 +302,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -341,7 +341,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H
index b704841a40dc1557218426de64a8a0c3f4479c0e..59ffd4bac333dea891effae485c40bab4e495451 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -150,7 +150,8 @@ public:
                     dimless
                 )
             );
-            surfaceScalarField& clippedLinearWeights = tclippedLinearWeights();
+            surfaceScalarField& clippedLinearWeights =
+                tclippedLinearWeights.ref();
 
             clippedLinearWeights.internalField() =
                 max(min(cdWeights.internalField(), 1 - wfLimit_), wfLimit_);
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubic/cubic.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubic/cubic.H
index b1148be4b71b51a0ceb0d2037770e11f87760ebd..18b767b002f8e1832b476f152e568602db098886 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubic/cubic.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubic/cubic.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -126,7 +126,7 @@ public:
             const surfaceScalarField kVecP(sqr(scalar(1) - lambda)*lambda);
             const surfaceScalarField kVecN(sqr(lambda)*(lambda - scalar(1)));
 
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
             (
                 new GeometricField<Type, fvsPatchField, surfaceMesh>
                 (
@@ -142,9 +142,8 @@ public:
                     surfaceInterpolationScheme<Type>::interpolate(vf, kSc, -kSc)
                 )
             );
-
             GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr =
-                tsfCorr();
+                tsfCorr.ref();
 
             for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
             {
@@ -176,7 +175,7 @@ public:
             {
                 if (!sfCorr.boundaryField()[pi].coupled())
                 {
-                    sfCorr.boundaryField()[pi] = pTraits<Type>::zero;
+                    sfCorr.boundaryField()[pi] = Zero;
                 }
             }
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H
index d521157dad922bd028322436c3035fc65c20390f..2d28a4958441101b6b3a8628b4c0c1ae4ceb1dda 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/fixedBlended/fixedBlended.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,10 +66,10 @@ class fixedBlended
     // Private Member Functions
 
         //- Scheme 1
-        tmp<surfaceInterpolationScheme<Type> > tScheme1_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme1_;
 
         //- Scheme 2
-        tmp<surfaceInterpolationScheme<Type> > tScheme2_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme2_;
 
 
         //- Disallow default bitwise copy construct
@@ -179,7 +179,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -200,7 +200,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -237,7 +237,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H
index 4dd2e87ba364fde469fa2c207b5cdd122beef238..61b93499131c8fc281a6920f4738da32598e45c4 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/harmonic/harmonic.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ public:
         }
 
         //- Return the face-interpolate of the given cell field
-        virtual tmp<GeometricField<scalar, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<scalar, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<scalar, fvPatchField, volMesh>& vf
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H
index 169036e337d2052c5e8083fdaddb16e719e70588..de4294da11e5ebc9a8c996076bcbb66d12747d85 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/limiterBlended/limiterBlended.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,13 +60,13 @@ class limiterBlended
     // Private Member Functions
 
         //- Limited scheme providing the limiter
-        tmp<limitedSurfaceInterpolationScheme<Type> > tLimitedScheme_;
+        tmp<limitedSurfaceInterpolationScheme<Type>> tLimitedScheme_;
 
         //- Scheme 1
-        tmp<surfaceInterpolationScheme<Type> > tScheme1_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme1_;
 
         //- Scheme 2
-        tmp<surfaceInterpolationScheme<Type> > tScheme2_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme2_;
 
 
         //- Disallow default bitwise copy construct
@@ -152,7 +152,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate(const GeometricField<Type, fvPatchField, volMesh>& vf) const
         {
             surfaceScalarField blendingFactor
@@ -175,7 +175,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -217,7 +217,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linear/linear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linear/linear.H
index 99234939e70613c88c2e8e6862a3ecdb77725e7c..7d06caf18b21fc8e3143dfc6c480ce860c5898f2 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linear/linear.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linear/linear.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ public:
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
 linearInterpolate(const GeometricField<Type, fvPatchField, volMesh>& vf)
 {
     return surfaceInterpolationScheme<Type>::interpolate
@@ -116,10 +116,10 @@ linearInterpolate(const GeometricField<Type, fvPatchField, volMesh>& vf)
 
 
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-linearInterpolate(const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf)
+tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
+linearInterpolate(const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf)
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterp =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tinterp =
         linearInterpolate(tvf());
     tvf.clear();
     return tinterp;
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C
index 84f6865c4c6657cf8dd40edbb4856b37bde0cced..6dad60e254f0e05fa05c5d58edae74a2f57af516 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::linearUpwind<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -37,7 +37,7 @@ Foam::linearUpwind<Type>::correction
 {
     const fvMesh& mesh = this->mesh();
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -51,11 +51,11 @@ Foam::linearUpwind<Type>::correction
                 false
             ),
             mesh,
-            dimensioned<Type>(vf.name(), vf.dimensions(), pTraits<Type>::zero)
+            dimensioned<Type>(vf.name(), vf.dimensions(), Zero)
         )
     );
 
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr.ref();
 
     const surfaceScalarField& faceFlux = this->faceFlux_;
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H
index 1ef0c000f7840e31c7b8cf9be542afcf8d11f83e..6039f416a76f32a4c3827a72b4aba83f7c722e41 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ class linearUpwind
     // Private Data
 
         word gradSchemeName_;
-        tmp<fv::gradScheme<Type> > gradScheme_;
+        tmp<fv::gradScheme<Type>> gradScheme_;
 
 
     // Private Member Functions
@@ -143,7 +143,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>&
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C
index 22a04bff7b4a7c0a56c286f306d8c48c580d5c7d..f8237e1d3521fb254d825bf1459d27cbace7ed59 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::linearUpwindV<Type>::correction
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -39,7 +39,7 @@ Foam::linearUpwindV<Type>::correction
 {
     const fvMesh& mesh = this->mesh();
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -57,12 +57,12 @@ Foam::linearUpwindV<Type>::correction
             (
                 vf.name(),
                 vf.dimensions(),
-                pTraits<Type>::zero
+                Zero
             )
         )
     );
 
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr.ref();
 
     const surfaceScalarField& faceFlux = this->faceFlux_;
     const surfaceScalarField& w = mesh.weights();
@@ -118,7 +118,7 @@ Foam::linearUpwindV<Type>::correction
         {
             if (maxCorrs < 0)
             {
-                sfCorr[facei] = vector::zero;
+                sfCorr[facei] = Zero;
             }
             else if (sfCorrs > maxCorrs)
             {
@@ -185,7 +185,7 @@ Foam::linearUpwindV<Type>::correction
                 {
                     if (maxCorrs < 0)
                     {
-                        pSfCorr[facei] = vector::zero;
+                        pSfCorr[facei] = Zero;
                     }
                     else if (pSfCorrs > maxCorrs)
                     {
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H
index 88034a7de9cea44b04d3136ec251f780321dad5d..99277ccb6d0480cfc9ba2388367d9768da1e8914 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,7 +56,7 @@ class linearUpwindV
     // Private Data
 
         word gradSchemeName_;
-        tmp<fv::gradScheme<Type> > gradScheme_;
+        tmp<fv::gradScheme<Type>> gradScheme_;
 
 
     // Private Member Functions
@@ -142,7 +142,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>&
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H
index 0e85f0ea7620ff97734e3ec8012a91e420194664..03fa6647123216ee316e3fc3f4b022c3bfa18c9f 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localBlended/localBlended.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,10 +56,10 @@ class localBlended
     // Private Member Functions
 
         //- Scheme 1
-        tmp<surfaceInterpolationScheme<Type> > tScheme1_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme1_;
 
         //- Scheme 2
-        tmp<surfaceInterpolationScheme<Type> > tScheme2_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme2_;
 
 
         //- Disallow default bitwise copy construct
@@ -158,7 +158,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate(const GeometricField<Type, fvPatchField, volMesh>& vf) const
         {
             const surfaceScalarField& blendingFactor =
@@ -185,7 +185,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -229,7 +229,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H
index e6d5849bd4f36062eed7c36a1f3349bd6d31643d..e081db91e0b9c66fc8d3d3c1b036bc063b27b591 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ public:
         }
 
         //- Return the face-interpolate of the given cell field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -122,7 +122,7 @@ public:
         {
             const fvMesh& mesh = vf.mesh();
 
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tvff
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tvff
             (
                 new GeometricField<Type, fvsPatchField, surfaceMesh>
                 (
@@ -136,7 +136,7 @@ public:
                     vf.dimensions()
                 )
             );
-            GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff();
+            GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff.ref();
 
             forAll(vff.boundaryField(), patchi)
             {
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H
index 9cd25a8352fb3092702be67761db352836f8d13e..7099656dddb7883cc064faee1faedfb954d2063a 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ public:
         }
 
         //- Return the face-interpolate of the given cell field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -122,7 +122,7 @@ public:
         {
             const fvMesh& mesh = vf.mesh();
 
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tvff
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tvff
             (
                 new GeometricField<Type, fvsPatchField, surfaceMesh>
                 (
@@ -136,7 +136,7 @@ public:
                     vf.dimensions()
                 )
             );
-            GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff();
+            GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff.ref();
 
             forAll(vff.boundaryField(), patchi)
             {
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H
index 1841b832db398ffb7fa60b579ce7bcbca1a7dd1c..021abd76859a382728f02dcc81913e995f68c09f 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ public:
             );
 
             surfaceScalarField::GeometricBoundaryField& awbf =
-                taw().boundaryField();
+                taw.ref().boundaryField();
 
             forAll(awbf, patchi)
             {
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H
index 2860aeb60e81642c13834f34af8da6fe2f4cea0c..dbdebfa7d2ca9a4444ca5df71dca8481458acb9c 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,6 +44,7 @@ SourceFiles
 #include "skewCorrectionVectors.H"
 #include "linear.H"
 #include "gaussGrad.H"
+#include "zeroGradientFvPatchField.H"
 #include "mixedFvPatchField.H"
 #include "directionMixedFvPatchField.H"
 
@@ -64,7 +65,7 @@ class outletStabilised
     // Private member data
 
         const surfaceScalarField& faceFlux_;
-        tmp<surfaceInterpolationScheme<Type> > tScheme_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme_;
 
 
     // Private Member Functions
@@ -132,7 +133,7 @@ public:
         ) const
         {
             tmp<surfaceScalarField> tw = tScheme_().weights(vf);
-            surfaceScalarField& w = tw();
+            surfaceScalarField& w = tw.ref();
 
             const fvMesh& mesh_ = this->mesh();
             const cellList& cells = mesh_.cells();
@@ -141,10 +142,10 @@ public:
             {
                 if
                 (
-                    isA<zeroGradientFvPatchField<Type> >
+                    isA<zeroGradientFvPatchField<Type>>
                         (vf.boundaryField()[patchi])
-                 || isA<mixedFvPatchField<Type> >(vf.boundaryField()[patchi])
-                 || isA<directionMixedFvPatchField<Type> >
+                 || isA<mixedFvPatchField<Type>>(vf.boundaryField()[patchi])
+                 || isA<directionMixedFvPatchField<Type>>
                     (vf.boundaryField()[patchi])
                 )
                 {
@@ -180,7 +181,7 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  set to zero on the near-boundary faces where upwinf is applied
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -188,11 +189,11 @@ public:
         {
             if (tScheme_().corrected())
             {
-                tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tcorr =
+                tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tcorr =
                     tScheme_().correction(vf);
 
                 GeometricField<Type, fvsPatchField, surfaceMesh>& corr =
-                    tcorr();
+                    tcorr.ref();
 
                 const fvMesh& mesh_ = this->mesh();
                 const cellList& cells = mesh_.cells();
@@ -201,9 +202,9 @@ public:
                 {
                     if
                     (
-                        isA<zeroGradientFvPatchField<Type> >
+                        isA<zeroGradientFvPatchField<Type>>
                             (vf.boundaryField()[patchi])
-                     || isA<mixedFvPatchField<Type> >
+                     || isA<mixedFvPatchField<Type>>
                             (vf.boundaryField()[patchi])
                     )
                     {
@@ -221,7 +222,7 @@ public:
                                 if (mesh_.isInternalFace(facei))
                                 {
                                     // Remove correction
-                                    corr[facei] = pTraits<Type>::zero;
+                                    corr[facei] = Zero;
                                 }
                             }
                         }
@@ -232,7 +233,7 @@ public:
             }
             else
             {
-                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                 (
                     NULL
                 );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C
index ef87cb898fc062cab801596b6b3032cf52fe1747..303421fcf6a616f8e9db8633f9021fd2d1c57b7c 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::pointLinear<Type>::
 correction
 (
@@ -45,10 +45,10 @@ correction
         volPointInterpolation::New(mesh).interpolate(vf)
     );
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr =
         linearInterpolate(vf);
 
-    Field<Type>& sfCorr = tsfCorr().internalField();
+    Field<Type>& sfCorr = tsfCorr.ref().internalField();
 
     const pointField& points = mesh.points();
     const pointField& C = mesh.C().internalField();
@@ -104,7 +104,7 @@ correction
 
 
     typename GeometricField<Type, fvsPatchField, surfaceMesh>::
-        GeometricBoundaryField& bSfCorr = tsfCorr().boundaryField();
+        GeometricBoundaryField& bSfCorr = tsfCorr.ref().boundaryField();
 
     forAll(bSfCorr, patchi)
     {
@@ -166,7 +166,7 @@ correction
         }
         else
         {
-            pSfCorr = pTraits<Type>::zero;
+            pSfCorr = Zero;
         }
     }
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.H
index e95997d55dde0b44569d40f11408aa599cc014c6..106125d5d1c3c6f523264008654fab53180a8528 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ public:
         }
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H
index 3f3cae05fedc836c7db478aba8e0e0b92f27f78f..e84e66f2512a3d636acce3c9f3fc94a11478477c 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,8 @@ public:
                     dimless
                 )
             );
-            surfaceScalarField& reverseLinearWeights = treverseLinearWeights();
+            surfaceScalarField& reverseLinearWeights =
+                treverseLinearWeights.ref();
 
             reverseLinearWeights.internalField() =
                 1.0 - cdWeights.internalField();
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H
index 2adde6c23ee458fd54ee87435fbd27b2e701866a..28649caa75dacbc0dcb1f557f83cfded3fb3a037 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ class skewCorrected
 {
     // Private member data
 
-        tmp<surfaceInterpolationScheme<Type> > tScheme_;
+        tmp<surfaceInterpolationScheme<Type>> tScheme_;
 
 
     // Private Member Functions
@@ -127,7 +127,7 @@ public:
              || skewCorrectionVectors::New(this->mesh()).skew();
         }
 
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         skewCorrection
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -137,7 +137,7 @@ public:
 
             const skewCorrectionVectors& scv = skewCorrectionVectors::New(mesh);
 
-            tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr
+            tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsfCorr
             (
                 new GeometricField<Type, fvsPatchField, surfaceMesh>
                 (
@@ -152,14 +152,14 @@ public:
                     (
                         vf.name(),
                         vf.dimensions(),
-                        pTraits<Type>::zero
+                        Zero
                     )
                 )
             );
 
             for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
             {
-                tsfCorr().replace
+                tsfCorr.ref().replace
                 (
                     cmpt,
                     scv() & linear
@@ -182,7 +182,7 @@ public:
 
 
         //- Return the explicit correction to the face-interpolate
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
@@ -207,7 +207,7 @@ public:
             else
             {
                 return
-                    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+                    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
                     (
                         NULL
                     );
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C
index 9ba9be2b31437488ab77fb6ba7ad0a82daca681e..4e7bf60dd4f69f2a0d5925d88ead22120279c7e3 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,9 +67,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
 {
     if (debug)
     {
-        Info<< "surfaceInterpolation::calcSkewCorrectionVectors() : "
-            << "Calculating skew correction vectors"
-            << endl;
+        InfoInFunction << "Calculating skew correction vectors" << endl;
     }
 
     // Set local references to mesh data
@@ -100,7 +98,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
 
         if (!patchSkewCorrVecs.coupled())
         {
-            patchSkewCorrVecs = vector::zero;
+            patchSkewCorrVecs = Zero;
         }
         else
         {
@@ -135,8 +133,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
 
     if (debug)
     {
-        Info<< "surfaceInterpolation::calcSkewCorrectionVectors() : "
-            << "skew coefficient = " << skewCoeff << endl;
+        InfoInFunction << "skew coefficient = " << skewCoeff << endl;
     }
 
     if (skewCoeff < 1e-5)
@@ -150,9 +147,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors()
 
     if (debug)
     {
-        Info<< "surfaceInterpolation::calcSkewCorrectionVectors() : "
-            << "Finished constructing skew correction vectors"
-            << endl;
+        Info<< "    Finished constructing skew correction vectors" << endl;
     }
 }
 
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C
index 1cb9326e32ac25746c86a38cea94a154c3719d54..6a2af46f669d210aa6affe36fbc4130dea879853 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,19 +27,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace fvc
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<surfaceInterpolationScheme<Type> > scheme
+Foam::tmp<Foam::surfaceInterpolationScheme<Type>>
+Foam::fvc::scheme
 (
     const surfaceScalarField& faceFlux,
     Istream& streamData
@@ -54,9 +44,8 @@ tmp<surfaceInterpolationScheme<Type> > scheme
 }
 
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<surfaceInterpolationScheme<Type> > scheme
+Foam::tmp<Foam::surfaceInterpolationScheme<Type>> Foam::fvc::scheme
 (
     const surfaceScalarField& faceFlux,
     const word& name
@@ -71,9 +60,8 @@ tmp<surfaceInterpolationScheme<Type> > scheme
 }
 
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<surfaceInterpolationScheme<Type> > scheme
+Foam::tmp<Foam::surfaceInterpolationScheme<Type>> Foam::fvc::scheme
 (
     const fvMesh& mesh,
     Istream& streamData
@@ -87,9 +75,8 @@ tmp<surfaceInterpolationScheme<Type> > scheme
 }
 
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<surfaceInterpolationScheme<Type> > scheme
+Foam::tmp<Foam::surfaceInterpolationScheme<Type>> Foam::fvc::scheme
 (
     const fvMesh& mesh,
     const word& name
@@ -103,10 +90,9 @@ tmp<surfaceInterpolationScheme<Type> > scheme
 }
 
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const surfaceScalarField& faceFlux,
@@ -115,21 +101,18 @@ interpolate
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "interpolate"
-            << "(const GeometricField<Type, fvPatchField, volMesh>&, "
-            << "const surfaceScalarField&, Istream&) : "
+        InfoInFunction
             << "interpolating GeometricField<Type, fvPatchField, volMesh> "
-            << endl;
+            << vf.name() << endl;
     }
 
     return scheme<Type>(faceFlux, schemeData)().interpolate(vf);
 }
 
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const surfaceScalarField& faceFlux,
@@ -138,28 +121,24 @@ interpolate
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "interpolate"
-            << "(const GeometricField<Type, fvPatchField, volMesh>&, "
-            << "const surfaceScalarField&, const word&) : "
+        InfoInFunction
             << "interpolating GeometricField<Type, fvPatchField, volMesh> "
-            << "using " << name
-            << endl;
+            << vf.name() << " using " << name << endl;
     }
 
     return scheme<Type>(faceFlux, name)().interpolate(vf);
 }
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const surfaceScalarField& faceFlux,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf =
         interpolate(tvf(), faceFlux, name);
 
     tvf.clear();
@@ -167,17 +146,16 @@ interpolate
     return tsf;
 }
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const tmp<surfaceScalarField>& tFaceFlux,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf =
         interpolate(vf, tFaceFlux(), name);
 
     tFaceFlux.clear();
@@ -185,17 +163,16 @@ interpolate
     return tsf;
 }
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const tmp<surfaceScalarField>& tFaceFlux,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf =
         interpolate(tvf(), tFaceFlux(), name);
 
     tvf.clear();
@@ -205,10 +182,9 @@ interpolate
 }
 
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     Istream& schemeData
@@ -216,20 +192,17 @@ interpolate
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "interpolate"
-            << "(const GeometricField<Type, fvPatchField, volMesh>&, "
-            << "Istream&) : "
+        InfoInFunction
             << "interpolating GeometricField<Type, fvPatchField, volMesh> "
-            << endl;
+            << vf.name() << endl;
     }
 
     return scheme<Type>(vf.mesh(), schemeData)().interpolate(vf);
 }
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const word& name
@@ -237,27 +210,24 @@ interpolate
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "interpolate"
-            << "(const GeometricField<Type, fvPatchField, volMesh>&, "
-            << "const word&) : "
+        InfoInFunction
             << "interpolating GeometricField<Type, fvPatchField, volMesh> "
-            << "using " << name
+            << vf.name() << " using " << name
             << endl;
     }
 
     return scheme<Type>(vf.mesh(), name)().interpolate(vf);
 }
 
-// Interpolate field onto faces using scheme given by name in dictionary
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const word& name
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf =
         interpolate(tvf(), name);
 
     tvf.clear();
@@ -266,20 +236,18 @@ interpolate
 }
 
 
-// Interpolate field onto faces using central differencing
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 )
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "interpolate"
-            << "(const GeometricField<Type, fvPatchField, volMesh>&) : "
+        InfoInFunction
             << "interpolating GeometricField<Type, fvPatchField, volMesh> "
-            << "using run-time selected scheme"
+            << vf.name() << " using run-time selected scheme"
             << endl;
     }
 
@@ -287,15 +255,14 @@ interpolate
 }
 
 
-// Interpolate field onto faces using central differencing
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::fvc::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 )
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf =
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf =
         interpolate(tvf());
     tvf.clear();
     return tsf;
@@ -303,7 +270,8 @@ interpolate
 
 
 template<class Type>
-tmp<FieldField<fvsPatchField, Type> > interpolate
+Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Type>>
+Foam::fvc::interpolate
 (
     const FieldField<fvPatchField, Type>& fvpff
 )
@@ -323,28 +291,83 @@ tmp<FieldField<fvsPatchField, Type> > interpolate
         (*fvspffPtr)[patchi] = fvpff[patchi];
     }
 
-    return tmp<FieldField<fvsPatchField, Type> >(fvspffPtr);
+    return tmp<FieldField<fvsPatchField, Type>>(fvspffPtr);
 }
 
 
 template<class Type>
-tmp<FieldField<fvsPatchField, Type> > interpolate
+Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Type>>
+Foam::fvc::interpolate
 (
-    const tmp<FieldField<fvPatchField, Type> >& tfvpff
+    const tmp<FieldField<fvPatchField, Type>>& tfvpff
 )
 {
-    tmp<FieldField<fvsPatchField, Type> > tfvspff = interpolate(tfvpff());
+    tmp<FieldField<fvsPatchField, Type>> tfvspff = interpolate(tfvpff());
     tfvpff.clear();
     return tfvspff;
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+template<class Type>
+Foam::tmp
+<
+    Foam::GeometricField
+    <
+        typename Foam::innerProduct<Foam::vector, Type>::type,
+        Foam::fvsPatchField,
+        Foam::surfaceMesh
+    >
+>
+Foam::fvc::dotInterpolate
+(
+    const surfaceVectorField& Sf,
+    const GeometricField<Type, fvPatchField, volMesh>& vf
+)
+{
+    if (surfaceInterpolation::debug)
+    {
+        InfoInFunction
+            << "interpolating GeometricField<Type, fvPatchField, volMesh> "
+            << vf.name() << " using run-time selected scheme"
+            << endl;
+    }
 
-} // End namespace fvc
+    return scheme<Type>
+    (
+        vf.mesh(),
+        "dotInterpolate(" + Sf.name() + ',' + vf.name() + ')'
+    )().dotInterpolate(Sf, vf);
+}
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-} // End namespace Foam
+template<class Type>
+Foam::tmp
+<
+    Foam::GeometricField
+    <
+        typename Foam::innerProduct<Foam::vector, Type>::type,
+        Foam::fvsPatchField,
+        Foam::surfaceMesh
+    >
+>
+Foam::fvc::dotInterpolate
+(
+    const surfaceVectorField& Sf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
+)
+{
+    tmp
+    <
+        GeometricField
+        <
+            typename Foam::innerProduct<Foam::vector, Type>::type,
+            fvsPatchField,
+            surfaceMesh
+        >
+    > tsf = dotInterpolate(Sf, tvf());
+    tvf.clear();
+    return tsf;
+}
+
 
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H
index 66dce3de5938c9350e794ccab2cd4ea696d3cc66..185284d21ecc2ad267c59f0327028c6989645702 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ namespace fvc
 {
     //- Return weighting factors for scheme given from Istream
     template<class Type>
-    static tmp<surfaceInterpolationScheme<Type> > scheme
+    static tmp<surfaceInterpolationScheme<Type>> scheme
     (
         const surfaceScalarField& faceFlux,
         Istream& schemeData
@@ -62,7 +62,7 @@ namespace fvc
 
     //- Return weighting factors for scheme given by name in dictionary
     template<class Type>
-    static tmp<surfaceInterpolationScheme<Type> > scheme
+    static tmp<surfaceInterpolationScheme<Type>> scheme
     (
         const surfaceScalarField& faceFlux,
         const word& name
@@ -71,7 +71,7 @@ namespace fvc
 
     //- Return weighting factors for scheme given from Istream
     template<class Type>
-    static tmp<surfaceInterpolationScheme<Type> > scheme
+    static tmp<surfaceInterpolationScheme<Type>> scheme
     (
         const fvMesh& mesh,
         Istream& schemeData
@@ -79,7 +79,7 @@ namespace fvc
 
     //- Return weighting factors for scheme given by name in dictionary
     template<class Type>
-    static tmp<surfaceInterpolationScheme<Type> > scheme
+    static tmp<surfaceInterpolationScheme<Type>> scheme
     (
         const fvMesh& mesh,
         const word& name
@@ -88,7 +88,7 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by Istream
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
         const GeometricField<Type, fvPatchField, volMesh>& tvf,
         const surfaceScalarField& faceFlux,
@@ -97,7 +97,7 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by name in fvSchemes
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
         const GeometricField<Type, fvPatchField, volMesh>& tvf,
         const surfaceScalarField& faceFlux,
@@ -106,16 +106,16 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by name in fvSchemes
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
         const surfaceScalarField& faceFlux,
         const word& name
     );
 
     //- Interpolate field onto faces using scheme given by name in fvSchemes
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
         const GeometricField<Type, fvPatchField, volMesh>& tvf,
         const tmp<surfaceScalarField>& faceFlux,
@@ -124,9 +124,9 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by name in fvSchemes
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
         const tmp<surfaceScalarField>& faceFlux,
         const word& name
     );
@@ -134,7 +134,7 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by Istream
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
         const GeometricField<Type, fvPatchField, volMesh>& tvf,
         Istream& schemeData
@@ -142,7 +142,7 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by name in fvSchemes
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
         const GeometricField<Type, fvPatchField, volMesh>& tvf,
         const word& name
@@ -150,39 +150,40 @@ namespace fvc
 
     //- Interpolate field onto faces using scheme given by name in fvSchemes
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
         const word& name
     );
 
 
-    //- Interpolate tmp field onto faces using 'interpolate(\<name\>)'
+    //- Interpolate field onto faces using 'interpolate(\<name\>)'
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
-        const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+        const GeometricField<Type, fvPatchField, volMesh>& tvf
     );
 
-    //- Interpolate field onto faces using 'interpolate(\<name\>)'
+    //- Interpolate tmp field onto faces using 'interpolate(\<name\>)'
     template<class Type>
-    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate
+    static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
     (
-        const GeometricField<Type, fvPatchField, volMesh>& tvf
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
     );
 
+
     //- Interpolate boundary field onto faces (simply a type conversion)
     template<class Type>
-    static tmp<FieldField<fvsPatchField, Type> > interpolate
+    static tmp<FieldField<fvsPatchField, Type>> interpolate
     (
         const FieldField<fvPatchField, Type>& fvpff
     );
 
     //- Interpolate boundary field onto faces (simply a type conversion)
     template<class Type>
-    static tmp<FieldField<fvsPatchField, Type> > interpolate
+    static tmp<FieldField<fvsPatchField, Type>> interpolate
     (
-        const tmp<FieldField<fvPatchField, Type> >& tfvpff
+        const tmp<FieldField<fvPatchField, Type>>& tfvpff
     );
 
     //- Interpolate 'one' returning 'one'
@@ -190,6 +191,43 @@ namespace fvc
     {
         return one();
     }
+
+
+    //- Interpolate field onto faces
+    //  and 'dot' with given surfaceVectorField Sf
+    template<class Type>
+    static
+    tmp
+    <
+        GeometricField
+        <
+            typename innerProduct<vector, Type>::type,
+            fvsPatchField,
+            surfaceMesh
+            >
+    > dotInterpolate
+    (
+        const surfaceVectorField& Sf,
+        const GeometricField<Type, fvPatchField, volMesh>& tvf
+    );
+
+    //- Interpolate tmp field onto faces
+    //  and 'dot' with given surfaceVectorField Sf
+    template<class Type>
+    static
+    tmp
+    <
+        GeometricField
+        <
+            typename innerProduct<vector, Type>::type,
+            fvsPatchField,
+            surfaceMesh
+            >
+    > dotInterpolate
+    (
+        const surfaceVectorField& Sf,
+        const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
+    );
 }
 
 
@@ -200,7 +238,7 @@ namespace fvc
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "surfaceInterpolate.C"
+    #include "surfaceInterpolate.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
index 5fc0b4fa9d22e2917647636f9adccc279a0409d0..6195180a8764fd0b43467452f0254a6325ece178 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,7 +121,6 @@ Foam::surfaceInterpolation::nonOrthCorrectionVectors() const
 }
 
 
-// Do what is neccessary if the mesh has moved
 bool Foam::surfaceInterpolation::movePoints()
 {
     deleteDemandDrivenData(weights_);
@@ -365,7 +364,7 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const
 
         if (!patchCorrVecs.coupled())
         {
-            patchCorrVecs = vector::zero;
+            patchCorrVecs = Zero;
         }
         else
         {
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C
index 906821251733d340c7d8f4e75eed04b04ab44e3e..4f6a79c9a2c77c0dfc86af8309415bd4b68e6c28 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -21,26 +21,19 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
-Description
-    Abstract base class for surface interpolation schemes.
-
 \*---------------------------------------------------------------------------*/
 
 #include "surfaceInterpolationScheme.H"
 #include "volFields.H"
 #include "surfaceFields.H"
+#include "geometricOneField.H"
 #include "coupledFvPatchField.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
+Foam::tmp<Foam::surfaceInterpolationScheme<Type>>
+Foam::surfaceInterpolationScheme<Type>::New
 (
     const fvMesh& mesh,
     Istream& schemeData
@@ -62,11 +55,7 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
 
     if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug)
     {
-        Info<< "surfaceInterpolationScheme<Type>::New"
-               "(const fvMesh&, Istream&)"
-               " : discretisation scheme = "
-            << schemeName
-            << endl;
+        InfoInFunction << "Discretisation scheme = " << schemeName << endl;
     }
 
     typename MeshConstructorTable::iterator constructorIter =
@@ -88,9 +77,9 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
 }
 
 
-// Return weighting factors for scheme given by name in dictionary
 template<class Type>
-tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
+Foam::tmp<Foam::surfaceInterpolationScheme<Type>>
+Foam::surfaceInterpolationScheme<Type>::New
 (
     const fvMesh& mesh,
     const surfaceScalarField& faceFlux,
@@ -113,11 +102,8 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
 
     if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug)
     {
-        Info<< "surfaceInterpolationScheme<Type>::New"
-               "(const fvMesh&, const surfaceScalarField&, Istream&)"
-               " : discretisation scheme = "
-            << schemeName
-            << endl;
+        InfoInFunction
+            << "Discretisation scheme = " << schemeName << endl;
     }
 
     typename MeshFluxConstructorTable::iterator constructorIter =
@@ -142,17 +128,15 @@ tmp<surfaceInterpolationScheme<Type> > surfaceInterpolationScheme<Type>::New
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 template<class Type>
-surfaceInterpolationScheme<Type>::~surfaceInterpolationScheme()
+Foam::surfaceInterpolationScheme<Type>::~surfaceInterpolationScheme()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-//- Return the face-interpolate of the given cell field
-//  with the given owner and neighbour weighting factors
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-surfaceInterpolationScheme<Type>::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::surfaceInterpolationScheme<Type>::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const tmp<surfaceScalarField>& tlambdas,
@@ -161,11 +145,8 @@ surfaceInterpolationScheme<Type>::interpolate
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "surfaceInterpolationScheme<Type>::uncorrectedInterpolate"
-               "(const GeometricField<Type, fvPatchField, volMesh>&, "
-               "const tmp<surfaceScalarField>&, "
-               "const tmp<surfaceScalarField>&) : "
-               "interpolating "
+        InfoInFunction
+            << "Interpolating "
             << vf.type() << " "
             << vf.name()
             << " from cells to faces "
@@ -184,7 +165,7 @@ surfaceInterpolationScheme<Type>::interpolate
     const labelUList& P = mesh.owner();
     const labelUList& N = mesh.neighbour();
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -198,7 +179,7 @@ surfaceInterpolationScheme<Type>::interpolate
             vf.dimensions()
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf.ref();
 
     Field<Type>& sfi = sf.internalField();
 
@@ -234,22 +215,28 @@ surfaceInterpolationScheme<Type>::interpolate
 }
 
 
-//- Return the face-interpolate of the given cell field
-//  with the given weighting factors
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-surfaceInterpolationScheme<Type>::interpolate
+template<class SFType>
+Foam::tmp
+<
+    Foam::GeometricField
+    <
+        typename Foam::innerProduct<typename SFType::value_type, Type>::type,
+        Foam::fvsPatchField,
+        Foam::surfaceMesh
+    >
+>
+Foam::surfaceInterpolationScheme<Type>::dotInterpolate
 (
+    const SFType& Sf,
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const tmp<surfaceScalarField>& tlambdas
 )
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "surfaceInterpolationScheme<Type>::interpolate"
-               "(const GeometricField<Type, fvPatchField, volMesh>&, "
-               "const tmp<surfaceScalarField>&) : "
-               "interpolating "
+        InfoInFunction
+            << "Interpolating "
             << vf.type() << " "
             << vf.name()
             << " from cells to faces "
@@ -257,6 +244,9 @@ surfaceInterpolationScheme<Type>::interpolate
             << endl;
     }
 
+    typedef typename Foam::innerProduct<typename SFType::value_type, Type>::type
+        RetType;
+
     const surfaceScalarField& lambdas = tlambdas();
 
     const Field<Type>& vfi = vf.internalField();
@@ -266,9 +256,9 @@ surfaceInterpolationScheme<Type>::interpolate
     const labelUList& P = mesh.owner();
     const labelUList& N = mesh.neighbour();
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<RetType, fvsPatchField, surfaceMesh>> tsf
     (
-        new GeometricField<Type, fvsPatchField, surfaceMesh>
+        new GeometricField<RetType, fvsPatchField, surfaceMesh>
         (
             IOobject
             (
@@ -277,16 +267,18 @@ surfaceInterpolationScheme<Type>::interpolate
                 vf.db()
             ),
             mesh,
-            vf.dimensions()
+            Sf.dimensions()*vf.dimensions()
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf();
+    GeometricField<RetType, fvsPatchField, surfaceMesh>& sf = tsf.ref();
 
-    Field<Type>& sfi = sf.internalField();
+    Field<RetType>& sfi = sf.internalField();
+
+    const typename SFType::InternalField& Sfi = Sf.internalField();
 
     for (label fi=0; fi<P.size(); fi++)
     {
-        sfi[fi] = lambda[fi]*(vfi[P[fi]] - vfi[N[fi]]) + vfi[N[fi]];
+        sfi[fi] = Sfi[fi] & (lambda[fi]*(vfi[P[fi]] - vfi[N[fi]]) + vfi[N[fi]]);
     }
 
     // Interpolate across coupled patches using given lambdas
@@ -294,16 +286,21 @@ surfaceInterpolationScheme<Type>::interpolate
     forAll(lambdas.boundaryField(), pi)
     {
         const fvsPatchScalarField& pLambda = lambdas.boundaryField()[pi];
+        const typename SFType::PatchFieldType& pSf = Sf.boundaryField()[pi];
+        fvsPatchField<RetType>& psf = sf.boundaryField()[pi];
 
         if (vf.boundaryField()[pi].coupled())
         {
-            tsf().boundaryField()[pi] =
-                pLambda*vf.boundaryField()[pi].patchInternalField()
-             + (1.0 - pLambda)*vf.boundaryField()[pi].patchNeighbourField();
+            psf =
+                pSf
+              & (
+                    pLambda*vf.boundaryField()[pi].patchInternalField()
+                  + (1.0 - pLambda)*vf.boundaryField()[pi].patchNeighbourField()
+                );
         }
         else
         {
-            sf.boundaryField()[pi] = vf.boundaryField()[pi];
+            psf = pSf & vf.boundaryField()[pi];
         }
     }
 
@@ -313,56 +310,134 @@ surfaceInterpolationScheme<Type>::interpolate
 }
 
 
-//- Return the face-interpolate of the given cell field
-//  with explicit correction
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-surfaceInterpolationScheme<Type>::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::surfaceInterpolationScheme<Type>::interpolate
+(
+    const GeometricField<Type, fvPatchField, volMesh>& vf,
+    const tmp<surfaceScalarField>& tlambdas
+)
+{
+    return dotInterpolate(geometricOneField(), vf, tlambdas);
+}
+
+
+template<class Type>
+Foam::tmp
+<
+    Foam::GeometricField
+    <
+        typename Foam::innerProduct<Foam::vector, Type>::type,
+        Foam::fvsPatchField,
+        Foam::surfaceMesh
+    >
+>
+Foam::surfaceInterpolationScheme<Type>::dotInterpolate
+(
+    const surfaceVectorField& Sf,
+    const GeometricField<Type, fvPatchField, volMesh>& vf
+) const
+{
+    if (surfaceInterpolation::debug)
+    {
+        InfoInFunction
+            << "Interpolating "
+            << vf.type() << " "
+            << vf.name()
+            << " from cells to faces"
+            << endl;
+    }
+
+    tmp
+    <
+        GeometricField
+        <
+            typename Foam::innerProduct<Foam::vector, Type>::type,
+            fvsPatchField,
+            surfaceMesh
+        >
+    > tsf = dotInterpolate(Sf, vf, weights(vf));
+
+    if (corrected())
+    {
+        tsf.ref() += Sf & correction(vf);
+    }
+
+    return tsf;
+}
+
+
+template<class Type>
+Foam::tmp
+<
+    Foam::GeometricField
+    <
+        typename Foam::innerProduct<Foam::vector, Type>::type,
+        Foam::fvsPatchField,
+        Foam::surfaceMesh
+    >
+>
+Foam::surfaceInterpolationScheme<Type>::dotInterpolate
+(
+    const surfaceVectorField& Sf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
+) const
+{
+    tmp
+    <
+        GeometricField
+        <
+            typename Foam::innerProduct<Foam::vector, Type>::type,
+            fvsPatchField,
+            surfaceMesh
+        >
+    > tSfDotinterpVf = dotInterpolate(Sf, tvf());
+    tvf.clear();
+    return tSfDotinterpVf;
+}
+
+
+template<class Type>
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::surfaceInterpolationScheme<Type>::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
 {
     if (surfaceInterpolation::debug)
     {
-        Info<< "surfaceInterpolationScheme<Type>::interpolate"
-               "(const GeometricField<Type, fvPatchField, volMesh>&) : "
-               "interpolating "
+        InfoInFunction
+            << "Interpolating "
             << vf.type() << " "
             << vf.name()
             << " from cells to faces"
             << endl;
     }
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
         = interpolate(vf, weights(vf));
 
     if (corrected())
     {
-        tsf() += correction(vf);
+        tsf.ref() += correction(vf);
     }
 
     return tsf;
 }
 
 
-//- Return the face-interpolate of the given cell field
-//  with explicit correction
 template<class Type>
-tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
-surfaceInterpolationScheme<Type>::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
+Foam::surfaceInterpolationScheme<Type>::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 ) const
 {
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterpVf
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tinterpVf
         = interpolate(tvf());
     tvf.clear();
     return tinterpVf;
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H
index fa8c1a5c4ed4a96daca957304492489c0aaf6559..da6a64fbfff4039506fb4ec41853f1d4e869df5c 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ class fvMesh;
 template<class Type>
 class surfaceInterpolationScheme
 :
-    public refCount
+    public tmp<surfaceInterpolationScheme<Type>>::refCount
 {
     // Private data
 
@@ -118,14 +118,14 @@ public:
     // Selectors
 
         //- Return new tmp interpolation scheme
-        static tmp<surfaceInterpolationScheme<Type> > New
+        static tmp<surfaceInterpolationScheme<Type>> New
         (
             const fvMesh& mesh,
             Istream& schemeData
         );
 
         //- Return new tmp interpolation scheme
-        static tmp<surfaceInterpolationScheme<Type> > New
+        static tmp<surfaceInterpolationScheme<Type>> New
         (
             const fvMesh& mesh,
             const surfaceScalarField& faceFlux,
@@ -148,7 +148,7 @@ public:
 
         //- Return the face-interpolate of the given cell field
         //  with the given owner and neighbour weigting factors
-        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>&,
@@ -156,16 +156,34 @@ public:
             const tmp<surfaceScalarField>&
         );
 
+        //- Return the face-interpolate of the given cell field
+        //  with the given weighting factors dotted with given field Sf
+        template<class SFType>
+        static tmp
+        <
+            GeometricField
+            <
+                typename innerProduct<typename SFType::value_type, Type>::type,
+                fvsPatchField,
+                surfaceMesh
+            >
+        >
+        dotInterpolate
+        (
+            const SFType& Sf,
+            const GeometricField<Type, fvPatchField, volMesh>& vf,
+            const tmp<surfaceScalarField>& tlambdas
+        );
+
         //- Return the face-interpolate of the given cell field
         //  with the given weighting factors
-        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>&,
             const tmp<surfaceScalarField>&
         );
 
-
         //- Return the interpolation weighting factors for the given field
         virtual tmp<surfaceScalarField> weights
         (
@@ -180,27 +198,79 @@ public:
 
         //- Return the explicit correction to the face-interpolate
         //  for the given field
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         correction(const GeometricField<Type, fvPatchField, volMesh>&) const
         {
-            return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >(NULL);
+            return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>(NULL);
         }
 
+        //- Return the face-interpolate of the given cell field
+        //  with explicit correction dotted with given field Sf
+        virtual
+        tmp
+        <
+            GeometricField
+            <
+                typename innerProduct<vector, Type>::type,
+                fvsPatchField,
+                surfaceMesh
+            >
+        >
+        dotInterpolate
+        (
+            const surfaceVectorField& Sf,
+            const GeometricField<Type, fvPatchField, volMesh>& vf
+        ) const;
+
+        //- Return the face-interpolate of the given tmp cell field
+        //  with explicit correction dotted with given field Sf
+        tmp
+        <
+            GeometricField
+            <
+                typename innerProduct<vector, Type>::type,
+                fvsPatchField,
+                surfaceMesh
+            >
+        >
+        dotInterpolate
+        (
+            const surfaceVectorField& Sf,
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
+        ) const;
+
         //- Return the face-interpolate of the given cell field
         //  with explicit correction
-        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate(const GeometricField<Type, fvPatchField, volMesh>&) const;
 
         //- Return the face-interpolate of the given tmp cell field
         //  with explicit correction
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         interpolate
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 };
 
 
+template<>
+tmp
+<
+    GeometricField
+    <
+        typename innerProduct<vector, scalar>::type,
+        fvsPatchField,
+        surfaceMesh
+    >
+>
+surfaceInterpolationScheme<scalar>::dotInterpolate
+(
+    const surfaceVectorField& Sf,
+    const GeometricField<scalar, fvPatchField, volMesh>&
+) const;
+
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
@@ -213,10 +283,10 @@ public:
                                                                                \
 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                              \
                                                                                \
-surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> >         \
+surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type>>          \
     add##SS##Type##MeshConstructorToTable_;                                    \
                                                                                \
-surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> >     \
+surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type>>      \
     add##SS##Type##MeshFluxConstructorToTable_;
 
 #define makeSurfaceInterpolationScheme(SS)                                     \
@@ -231,7 +301,7 @@ makeSurfaceInterpolationTypeScheme(SS, tensor)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "surfaceInterpolationScheme.C"
+    #include "surfaceInterpolationScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationSchemes.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationSchemes.C
index fdbc5a977ab11efb73bd3a54779b645f768adf4b..a6da1c8678b0e1230bfa1b0931c6e1ad01eb663d 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationSchemes.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationSchemes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,20 +32,20 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeBaseSurfaceInterpolationScheme(Type)                              \
-                                                                              \
-defineNamedTemplateTypeNameAndDebug(surfaceInterpolationScheme<Type>, 0);     \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    surfaceInterpolationScheme<Type>,                                         \
-    Mesh                                                                      \
-);                                                                            \
-                                                                              \
-defineTemplateRunTimeSelectionTable                                           \
-(                                                                             \
-    surfaceInterpolationScheme<Type>,                                         \
-    MeshFlux                                                                  \
+#define makeBaseSurfaceInterpolationScheme(Type)                               \
+                                                                               \
+defineNamedTemplateTypeNameAndDebug(surfaceInterpolationScheme<Type>, 0);      \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    surfaceInterpolationScheme<Type>,                                          \
+    Mesh                                                                       \
+);                                                                             \
+                                                                               \
+defineTemplateRunTimeSelectionTable                                            \
+(                                                                              \
+    surfaceInterpolationScheme<Type>,                                          \
+    MeshFlux                                                                   \
 );
 
 makeBaseSurfaceInterpolationScheme(scalar)
@@ -54,9 +54,49 @@ makeBaseSurfaceInterpolationScheme(sphericalTensor)
 makeBaseSurfaceInterpolationScheme(symmTensor)
 makeBaseSurfaceInterpolationScheme(tensor)
 
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace Foam
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+template<>
+Foam::tmp
+<
+    Foam::GeometricField
+    <
+        typename Foam::innerProduct<Foam::vector, Foam::scalar>::type,
+        Foam::fvsPatchField,
+        Foam::surfaceMesh
+    >
+>
+Foam::surfaceInterpolationScheme<Foam::scalar>::dotInterpolate
+(
+    const surfaceVectorField& Sf,
+    const GeometricField<scalar, fvPatchField, volMesh>&
+) const
+{
+    NotImplemented;
+
+    return
+        tmp
+        <
+            GeometricField
+            <
+                typename innerProduct<vector, scalar>::type,
+                fvsPatchField,
+                surfaceMesh
+            >
+        >
+        (
+            GeometricField
+            <
+                typename innerProduct<vector, scalar>::type,
+                fvsPatchField,
+                surfaceMesh
+            >::null()
+        );
+}
+
+
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C
index 28d3332c1d622830c1f6eacb45708d3588f70823..480d93c97c2bef77e3b5bc2d03d20095cff25f0e 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,19 +30,17 @@ License
 #include "globalMeshData.H"
 #include "twoDPointCorrector.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-defineTypeNameAndDebug(pointConstraints, 0);
+    defineTypeNameAndDebug(pointConstraints, 0);
+}
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void pointConstraints::makePatchPatchAddressing()
+void Foam::pointConstraints::makePatchPatchAddressing()
 {
     if (debug)
     {
@@ -325,7 +323,7 @@ void pointConstraints::makePatchPatchAddressing()
 
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
 
-pointConstraints::pointConstraints(const pointMesh& pm)
+Foam::pointConstraints::pointConstraints(const pointMesh& pm)
 :
     MeshObject<pointMesh, Foam::UpdateableMeshObject, pointConstraints>(pm)
 {
@@ -342,7 +340,7 @@ pointConstraints::pointConstraints(const pointMesh& pm)
 
 // * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * * //
 
-pointConstraints::~pointConstraints()
+Foam::pointConstraints::~pointConstraints()
 {
     if (debug)
     {
@@ -353,19 +351,19 @@ pointConstraints::~pointConstraints()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void pointConstraints::updateMesh(const mapPolyMesh&)
+void Foam::pointConstraints::updateMesh(const mapPolyMesh&)
 {
     makePatchPatchAddressing();
 }
 
 
-bool pointConstraints::movePoints()
+bool Foam::pointConstraints::movePoints()
 {
     return true;
 }
 
 
-void pointConstraints::constrainDisplacement
+void Foam::pointConstraints::constrainDisplacement
 (
     pointVectorField& pf,
     const bool overrideFixedValue
@@ -402,10 +400,8 @@ void pointConstraints::constrainDisplacement
 }
 
 
-// Specialisation of constrainCorners for scalars because
-// no constraint need be applied
 template<>
-void pointConstraints::constrainCorners<scalar>
+void Foam::pointConstraints::constrainCorners<Foam::scalar>
 (
     GeometricField<scalar, pointPatchField, pointMesh>& pf
 ) const
@@ -413,15 +409,11 @@ void pointConstraints::constrainCorners<scalar>
 
 
 template<>
-void pointConstraints::constrainCorners<label>
+void Foam::pointConstraints::constrainCorners<Foam::label>
 (
     GeometricField<label, pointPatchField, pointMesh>& pf
 ) const
 {}
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H
index 06515ba003b58673103035ccacd551457003c452..f34ae6f304e217a27d3d0391f508093458bd3cbf 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H
+++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -204,7 +204,7 @@ void pointConstraints::constrainCorners<label>
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "pointConstraintsTemplates.C"
+    #include "pointConstraintsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C
index 724d827e7ffec97fab2bed41bd132bd374a398f4..85491c2688345d7d4761d141393e86e53165096f 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,13 +29,8 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 template<class Type, class CombineOp>
-void pointConstraints::syncUntransformedData
+void Foam::pointConstraints::syncUntransformedData
 (
     const polyMesh& mesh,
     List<Type>& pointData,
@@ -91,7 +86,7 @@ void pointConstraints::syncUntransformedData
 
 
 template<class Type>
-void pointConstraints::setPatchFields
+void Foam::pointConstraints::setPatchFields
 (
     GeometricField<Type, pointPatchField, pointMesh>& pf
 )
@@ -100,9 +95,9 @@ void pointConstraints::setPatchFields
     {
         pointPatchField<Type>& ppf = pf.boundaryField()[patchI];
 
-        if (isA<valuePointPatchField<Type> >(ppf))
+        if (isA<valuePointPatchField<Type>>(ppf))
         {
-            refCast<valuePointPatchField<Type> >(ppf) =
+            refCast<valuePointPatchField<Type>>(ppf) =
                 ppf.patchInternalField();
         }
     }
@@ -110,7 +105,7 @@ void pointConstraints::setPatchFields
 
 
 template<class Type>
-void pointConstraints::constrainCorners
+void Foam::pointConstraints::constrainCorners
 (
     GeometricField<Type, pointPatchField, pointMesh>& pf
 ) const
@@ -127,7 +122,7 @@ void pointConstraints::constrainCorners
 
 
 template<class Type>
-void pointConstraints::constrain
+void Foam::pointConstraints::constrain
 (
     GeometricField<Type, pointPatchField, pointMesh>& pf,
     const bool overrideFixedValue
@@ -151,8 +146,4 @@ void pointConstraints::constrain
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C
index 8e9f390892c791c5e120a1186e27e7d594bb54c0..0f95e18a8f664ecff1ebde74aca2a79074bb0de8 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -32,13 +32,8 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
 template<class Type>
-void volPointInterpolation::pushUntransformedData
+void Foam::volPointInterpolation::pushUntransformedData
 (
     List<Type>& pointData
 ) const
@@ -81,7 +76,7 @@ void volPointInterpolation::pushUntransformedData
 
 
 template<class Type>
-void volPointInterpolation::addSeparated
+void Foam::volPointInterpolation::addSeparated
 (
     GeometricField<Type, pointPatchField, pointMesh>& pf
 ) const
@@ -95,7 +90,7 @@ void volPointInterpolation::addSeparated
     {
         if (pf.boundaryField()[patchI].coupled())
         {
-            refCast<coupledPointPatchField<Type> >
+            refCast<coupledPointPatchField<Type>>
                 (pf.boundaryField()[patchI]).initSwapAddSeparated
                 (
                     Pstream::nonBlocking,
@@ -111,7 +106,7 @@ void volPointInterpolation::addSeparated
     {
         if (pf.boundaryField()[patchI].coupled())
         {
-            refCast<coupledPointPatchField<Type> >
+            refCast<coupledPointPatchField<Type>>
                 (pf.boundaryField()[patchI]).swapAddSeparated
                 (
                     Pstream::nonBlocking,
@@ -123,7 +118,7 @@ void volPointInterpolation::addSeparated
 
 
 template<class Type>
-void volPointInterpolation::interpolateInternalField
+void Foam::volPointInterpolation::interpolateInternalField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     GeometricField<Type, pointPatchField, pointMesh>& pf
@@ -148,7 +143,7 @@ void volPointInterpolation::interpolateInternalField
             const scalarList& pw = pointWeights_[pointi];
             const labelList& ppc = pointCells[pointi];
 
-            pf[pointi] = pTraits<Type>::zero;
+            pf[pointi] = Zero;
 
             forAll(ppc, pointCelli)
             {
@@ -160,7 +155,7 @@ void volPointInterpolation::interpolateInternalField
 
 
 template<class Type>
-void volPointInterpolation::interpolateDimensionedInternalField
+void Foam::volPointInterpolation::interpolateDimensionedInternalField
 (
     const DimensionedField<Type, volMesh>& vf,
     DimensionedField<Type, pointMesh>& pf
@@ -191,7 +186,7 @@ void volPointInterpolation::interpolateDimensionedInternalField
     {
         const labelList& ppc = pointCells[pointi];
 
-        pf[pointi] = pTraits<Type>::zero;
+        pf[pointi] = Type(Zero);
 
         forAll(ppc, pointCelli)
         {
@@ -220,7 +215,7 @@ void volPointInterpolation::interpolateDimensionedInternalField
 
 
 template<class Type>
-tmp<Field<Type> > volPointInterpolation::flatBoundaryField
+Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
@@ -228,11 +223,11 @@ tmp<Field<Type> > volPointInterpolation::flatBoundaryField
     const fvMesh& mesh = vf.mesh();
     const fvBoundaryMesh& bm = mesh.boundary();
 
-    tmp<Field<Type> > tboundaryVals
+    tmp<Field<Type>> tboundaryVals
     (
         new Field<Type>(mesh.nFaces()-mesh.nInternalFaces())
     );
-    Field<Type>& boundaryVals = tboundaryVals();
+    Field<Type>& boundaryVals = tboundaryVals.ref();
 
     forAll(vf.boundaryField(), patchI)
     {
@@ -249,7 +244,7 @@ tmp<Field<Type> > volPointInterpolation::flatBoundaryField
                 boundaryVals,
                 vf.boundaryField()[patchI].size(),
                 bFaceI
-            ).assign(vf.boundaryField()[patchI]);
+            ) = vf.boundaryField()[patchI];
         }
         else
         {
@@ -257,7 +252,7 @@ tmp<Field<Type> > volPointInterpolation::flatBoundaryField
 
             forAll(pp, i)
             {
-                boundaryVals[bFaceI++] = pTraits<Type>::zero;
+                boundaryVals[bFaceI++] = Zero;
             }
         }
     }
@@ -267,7 +262,7 @@ tmp<Field<Type> > volPointInterpolation::flatBoundaryField
 
 
 template<class Type>
-void volPointInterpolation::interpolateBoundaryField
+void Foam::volPointInterpolation::interpolateBoundaryField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     GeometricField<Type, pointPatchField, pointMesh>& pf
@@ -278,7 +273,7 @@ void volPointInterpolation::interpolateBoundaryField
     Field<Type>& pfi = pf.internalField();
 
     // Get face data in flat list
-    tmp<Field<Type> > tboundaryVals(flatBoundaryField(vf));
+    tmp<Field<Type>> tboundaryVals(flatBoundaryField(vf));
     const Field<Type>& boundaryVals = tboundaryVals();
 
 
@@ -296,7 +291,7 @@ void volPointInterpolation::interpolateBoundaryField
 
             Type& val = pfi[pointI];
 
-            val = pTraits<Type>::zero;
+            val = Zero;
             forAll(pFaces, j)
             {
                 if (boundaryIsPatchFace_[pFaces[j]])
@@ -321,7 +316,7 @@ void volPointInterpolation::interpolateBoundaryField
 
 
 template<class Type>
-void volPointInterpolation::interpolateBoundaryField
+void Foam::volPointInterpolation::interpolateBoundaryField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     GeometricField<Type, pointPatchField, pointMesh>& pf,
@@ -338,7 +333,7 @@ void volPointInterpolation::interpolateBoundaryField
 
 
 template<class Type>
-void volPointInterpolation::interpolate
+void Foam::volPointInterpolation::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     GeometricField<Type, pointPatchField, pointMesh>& pf
@@ -361,8 +356,8 @@ void volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const wordList& patchFieldTypes
@@ -371,7 +366,7 @@ volPointInterpolation::interpolate
     const pointMesh& pm = pointMesh::New(vf.mesh());
 
     // Construct tmp<pointField>
-    tmp<GeometricField<Type, pointPatchField, pointMesh> > tpf
+    tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf
     (
         new GeometricField<Type, pointPatchField, pointMesh>
         (
@@ -387,25 +382,25 @@ volPointInterpolation::interpolate
         )
     );
 
-    interpolateInternalField(vf, tpf());
+    interpolateInternalField(vf, tpf.ref());
 
     // Interpolate to the patches overriding fixed value BCs
-    interpolateBoundaryField(vf, tpf(), true);
+    interpolateBoundaryField(vf, tpf.ref(), true);
 
     return tpf;
 }
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
     const wordList& patchFieldTypes
 ) const
 {
     // Construct tmp<pointField>
-    tmp<GeometricField<Type, pointPatchField, pointMesh> > tpf =
+    tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf =
         interpolate(tvf(), patchFieldTypes);
     tvf.clear();
     return tpf;
@@ -413,8 +408,8 @@ volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf,
     const word& name,
@@ -445,7 +440,7 @@ volPointInterpolation::interpolate
         }
 
 
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > tpf
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf
         (
             new GeometricField<Type, pointPatchField, pointMesh>
             (
@@ -460,7 +455,7 @@ volPointInterpolation::interpolate
             )
         );
 
-        interpolate(vf, tpf());
+        interpolate(vf, tpf.ref());
 
         return tpf;
     }
@@ -497,8 +492,8 @@ volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& vf
 ) const
@@ -508,14 +503,14 @@ volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<GeometricField<Type, pointPatchField, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
 ) const
 {
     // Construct tmp<pointField>
-    tmp<GeometricField<Type, pointPatchField, pointMesh> > tpf =
+    tmp<GeometricField<Type, pointPatchField, pointMesh>> tpf =
         interpolate(tvf());
     tvf.clear();
     return tpf;
@@ -523,8 +518,8 @@ volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<DimensionedField<Type, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
     const DimensionedField<Type, volMesh>& vf,
     const word& name,
@@ -555,7 +550,7 @@ volPointInterpolation::interpolate
         }
 
 
-        tmp<DimensionedField<Type, pointMesh> > tpf
+        tmp<DimensionedField<Type, pointMesh>> tpf
         (
             new DimensionedField<Type, pointMesh>
             (
@@ -570,7 +565,7 @@ volPointInterpolation::interpolate
             )
         );
 
-        interpolateDimensionedInternalField(vf, tpf());
+        interpolateDimensionedInternalField(vf, tpf.ref());
 
         return tpf;
     }
@@ -608,8 +603,8 @@ volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<DimensionedField<Type, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
     const DimensionedField<Type, volMesh>& vf
 ) const
@@ -619,21 +614,17 @@ volPointInterpolation::interpolate
 
 
 template<class Type>
-tmp<DimensionedField<Type, pointMesh> >
-volPointInterpolation::interpolate
+Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh>>
+Foam::volPointInterpolation::interpolate
 (
-    const tmp<DimensionedField<Type, volMesh> >& tvf
+    const tmp<DimensionedField<Type, volMesh>>& tvf
 ) const
 {
     // Construct tmp<pointField>
-    tmp<DimensionedField<Type, pointMesh> > tpf = interpolate(tvf());
+    tmp<DimensionedField<Type, pointMesh>> tpf = interpolate(tvf.ref());
     tvf.clear();
     return tpf;
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C
index 7a307d31ae697aa52b00b76d949ddf59c72cacc0..12ca3fea5b6cf072ba3290cebb0fc9cdfa921865 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,19 +31,17 @@ License
 #include "pointConstraints.H"
 #include "surfaceFields.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
 namespace Foam
 {
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-defineTypeNameAndDebug(volPointInterpolation, 0);
+    defineTypeNameAndDebug(volPointInterpolation, 0);
+}
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-void volPointInterpolation::calcBoundaryAddressing()
+void Foam::volPointInterpolation::calcBoundaryAddressing()
 {
     if (debug)
     {
@@ -154,7 +152,7 @@ void volPointInterpolation::calcBoundaryAddressing()
 }
 
 
-void volPointInterpolation::makeInternalWeights(scalarField& sumWeights)
+void Foam::volPointInterpolation::makeInternalWeights(scalarField& sumWeights)
 {
     if (debug)
     {
@@ -194,7 +192,7 @@ void volPointInterpolation::makeInternalWeights(scalarField& sumWeights)
 }
 
 
-void volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights)
+void Foam::volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights)
 {
     if (debug)
     {
@@ -242,7 +240,7 @@ void volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights)
 }
 
 
-void volPointInterpolation::makeWeights()
+void Foam::volPointInterpolation::makeWeights()
 {
     if (debug)
     {
@@ -348,7 +346,7 @@ void volPointInterpolation::makeWeights()
 
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
 
-volPointInterpolation::volPointInterpolation(const fvMesh& vm)
+Foam::volPointInterpolation::volPointInterpolation(const fvMesh& vm)
 :
     MeshObject<fvMesh, Foam::UpdateableMeshObject, volPointInterpolation>(vm)
 {
@@ -358,19 +356,19 @@ volPointInterpolation::volPointInterpolation(const fvMesh& vm)
 
 // * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * * //
 
-volPointInterpolation::~volPointInterpolation()
+Foam::volPointInterpolation::~volPointInterpolation()
 {}
 
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void volPointInterpolation::updateMesh(const mapPolyMesh&)
+void Foam::volPointInterpolation::updateMesh(const mapPolyMesh&)
 {
     makeWeights();
 }
 
 
-bool volPointInterpolation::movePoints()
+bool Foam::volPointInterpolation::movePoints()
 {
     makeWeights();
 
@@ -378,7 +376,7 @@ bool volPointInterpolation::movePoints()
 }
 
 
-void volPointInterpolation::interpolateDisplacement
+void Foam::volPointInterpolation::interpolateDisplacement
 (
     const volVectorField& vf,
     pointVectorField& pf
@@ -396,8 +394,4 @@ void volPointInterpolation::interpolateDisplacement
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H
index f04e6ae1ff4cf6033208e86f102104f1def492c1..823d389e93d91de58b7d18a923e82b8f229091a9 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H
+++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -101,7 +101,7 @@ class volPointInterpolation
         //- Get boundary field in same order as boundary faces. Field is
         //  zero on all coupled and empty patches
         template<class Type>
-        tmp<Field<Type> > flatBoundaryField
+        tmp<Field<Type>> flatBoundaryField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vf
         ) const;
@@ -152,7 +152,7 @@ public:
         //- Interpolate volField using inverse distance weighting
         //  returning pointField
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
@@ -160,9 +160,9 @@ public:
         //- Interpolate tmp<volField> using inverse distance weighting
         //  returning pointField
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 
         //- Interpolate volField using inverse distance weighting
@@ -170,7 +170,7 @@ public:
         //  to any fixedValue boundary conditions to make them consistent
         //  with internal field
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>&,
             const wordList& patchFieldTypes
@@ -181,16 +181,16 @@ public:
         //  to any fixedValue boundary conditions to make them consistent
         //  with internal field
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
         (
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
             const wordList& patchFieldTypes
         ) const;
 
         //- Interpolate dimensionedField using inverse distance weighting
         //  returning pointField
         template<class Type>
-        tmp<DimensionedField<Type, pointMesh> > interpolate
+        tmp<DimensionedField<Type, pointMesh>> interpolate
         (
             const DimensionedField<Type, volMesh>&
         ) const;
@@ -198,9 +198,9 @@ public:
         //- Interpolate tmp<dimensionedField> using inverse distance
         //  weighting returning pointField
         template<class Type>
-        tmp<DimensionedField<Type, pointMesh> > interpolate
+        tmp<DimensionedField<Type, pointMesh>> interpolate
         (
-            const tmp<DimensionedField<Type, volMesh> >&
+            const tmp<DimensionedField<Type, volMesh>>&
         ) const;
 
 
@@ -245,7 +245,7 @@ public:
             //- Interpolate volField using inverse distance weighting
             //  returning pointField with name. Optionally caches
             template<class Type>
-            tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
+            tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
             (
                 const GeometricField<Type, fvPatchField, volMesh>&,
                 const word& name,
@@ -264,7 +264,7 @@ public:
             //- Interpolate dimensionedField using inverse distance weighting
             //  returning pointField with name. Optionally caches
             template<class Type>
-            tmp<DimensionedField<Type, pointMesh> > interpolate
+            tmp<DimensionedField<Type, pointMesh>> interpolate
             (
                 const DimensionedField<Type, volMesh>&,
                 const word& name,
@@ -291,7 +291,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "volPointInterpolate.C"
+    #include "volPointInterpolate.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake
index 16340f0efb879c170c914e7e939f03d4d2c35a33..f5cfa2cc5b88ecd698f30d349e0cc06c8892b5b7 100755
--- a/src/fvAgglomerationMethods/Allwmake
+++ b/src/fvAgglomerationMethods/Allwmake
@@ -17,15 +17,15 @@ wmake $targetType pairPatchAgglomeration
 
 
 ## get SCOTCH_VERSION, SCOTCH_ARCH_PATH
-if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
+if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
 then
     . $settings
     echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
 else
     echo
-    echo "Error: no config/scotch.sh settings"
+    echo "Error: no config.sh/scotch settings"
     echo
 fi
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H
index 21090e7513c653d0d71bed5c18ad3a1f941e2e03..34fe51a0342531c367c1583789720c0e9f0978ed 100644
--- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H
+++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ SourceFiles
 
 extern "C"
 {
-#   include "mgridgen.h"
+    #include "mgridgen.h"
 }
 
 
diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C
index 33c19f801ae58d11210ae1129208f714bf46a2cc..32bf9efa12bb85432342565777c285da39328056 100644
--- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C
+++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,7 +114,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights
     const label nCoarseI =  max(fineToCoarse) + 1;
     labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse));
 
-    HashSet<edge, Hash<edge> > fineFeaturedFaces(coarsePatch.nEdges()/10);
+    HashSet<edge, Hash<edge>> fineFeaturedFaces(coarsePatch.nEdges()/10);
 
     // Map fine faces with featured edge into coarse faces
     forAllConstIter(EdgeMap<scalar>, facePairWeight_, iter)
@@ -254,7 +254,7 @@ void Foam::pairPatchAgglomeration::mapBaseToTopAgglom
 )
 {
     const labelList& fineToCoarse = restrictAddressing_[fineLevelIndex];
-    forAll (restrictTopBottomAddressing_, i)
+    forAll(restrictTopBottomAddressing_, i)
     {
         restrictTopBottomAddressing_[i] =
             fineToCoarse[restrictTopBottomAddressing_[i]];
@@ -440,7 +440,7 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel
     const label nFineFaces = patch.size();
 
     tmp<labelField> tcoarseCellMap(new labelField(nFineFaces, -1));
-    labelField& coarseCellMap = tcoarseCellMap();
+    labelField& coarseCellMap = tcoarseCellMap.ref();
 
     const labelListList& faceFaces = patch.faceFaces();
 
diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H
index f0a654151f20d3ed4892698319bb5305bc1e5288..c9bfaead50dd761a5971382cc311df2eaeee0ac9 100644
--- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H
+++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -210,7 +210,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "pairPatchAgglomerationTemplates.C"
+    #include "pairPatchAgglomerationTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomerationTemplates.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomerationTemplates.C
index 9ddc691bb7be19b7eeb6060e85365beb85f26f42..5943814b4cc64c27153bf81e0cc5553cb507e17f 100644
--- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomerationTemplates.C
+++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomerationTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ void Foam::pairPatchAgglomeration::restrictField
             << abort(FatalError);
     }
 
-    cf = pTraits<Type>::zero;
+    cf = Zero;
 
     forAll(ff, i)
     {
diff --git a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C
index cf0d6713e6b9b6bf4f78fd5c6fdf92b27ec268ad..4ea7e716405ae9dcc07eee63fbe2afac98cf9702 100644
--- a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -194,8 +194,9 @@ Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
     else
     {
         tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
+        pointField& curPoints = tcurPoints.ref();
 
-        tcurPoints().replace
+        curPoints.replace
         (
             cmpt_,
             points0_ + pointDisplacement_.internalField()
@@ -210,11 +211,11 @@ Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
             {
                 label pointI = pz[i];
 
-                tcurPoints()[pointI][cmpt_] = points0_[pointI];
+                curPoints[pointI][cmpt_] = points0_[pointI];
             }
         }
 
-        twoDCorrectPoints(tcurPoints());
+        twoDCorrectPoints(curPoints);
 
         return tcurPoints;
     }
diff --git a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C
index 64237e43399d59a957a30d2b9d321358350f4f7c..194af13519d4b3ae76860f981359d9b8cf3415f2 100644
--- a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,14 +107,14 @@ Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
 
     tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
 
-    tcurPoints().replace
+    tcurPoints.ref().replace
     (
         cmpt_,
         tcurPoints().component(cmpt_)
       + fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
     );
 
-    twoDCorrectPoints(tcurPoints());
+    twoDCorrectPoints(tcurPoints.ref());
 
     return tcurPoints;
 }
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C
index fd8bdb4472bf856aa52f95c10ff7a33c1e71964d..2b26d8d58a908741ab0361e9d89ba6162045741c 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver
         (
             "cellDisplacement",
             pointDisplacement().dimensions(),
-            vector::zero
+            Zero
         ),
         cellMotionBoundaryTypes<vector>(pointDisplacement().boundaryField())
     ),
@@ -124,7 +124,7 @@ displacementSBRStressFvMotionSolver
         (
             "cellDisplacement",
             displacementMotionSolver::pointDisplacement().dimensions(),
-            vector::zero
+            Zero
         ),
         cellMotionBoundaryTypes<vector>
         (
@@ -167,7 +167,7 @@ Foam::displacementSBRStressFvMotionSolver::curPoints() const
         points0() + pointDisplacement().internalField()
     );
 
-    twoDCorrectPoints(tcurPoints());
+    twoDCorrectPoints(tcurPoints.ref());
 
     return tcurPoints;
 }
@@ -199,9 +199,10 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
         (
             Df
            *(
+               fvc::dotInterpolate
                (
-                   cellDisplacement_.mesh().Sf()
-                 & fvc::interpolate(gradCd.T() - gradCd)
+                   cellDisplacement_.mesh().Sf(),
+                   gradCd.T() - gradCd
                )
 
                // Solid-body rotation "lambda" term
@@ -221,9 +222,10 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
         (
             Df
            *(
+               fvc::dotInterpolate
                (
-                   cellDisplacement_.mesh().Sf()
-                 & fvc::interpolate(gradCd + gradCd.T())
+                   cellDisplacement_.mesh().Sf(),
+                   gradCd + gradCd.T()
                )
 
                // Solid-body rotation "lambda" term
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C
index 44bd43d7e535248796ca0d1e9f7e1b173e59f1af..e0ff309339801e07773ebdc998d61bded94589db 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ namespace Foam
     );
 
     template<>
-    const word GlobalIOList<Tuple2<scalar, vector> >::typeName
+    const word GlobalIOList<Tuple2<scalar, vector>>::typeName
     (
         "scalarVectorTable"
     );
@@ -66,7 +66,7 @@ void Foam::displacementInterpolationMotionSolver::calcInterpolation()
     // Get zones and their interpolation tables for displacement
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    List<Pair<word> > faceZoneToTable
+    List<Pair<word>> faceZoneToTable
     (
         coeffDict().lookup("interpolationTables")
     );
@@ -91,7 +91,7 @@ void Foam::displacementInterpolationMotionSolver::calcInterpolation()
 
         const word& tableName = faceZoneToTable[i][1];
 
-        GlobalIOList<Tuple2<scalar, vector> > table
+        GlobalIOList<Tuple2<scalar, vector>> table
         (
             IOobject
             (
@@ -344,10 +344,10 @@ Foam::displacementInterpolationMotionSolver::curPoints() const
     }
 
     tmp<pointField> tcurPoints(new pointField(points0()));
-    pointField& curPoints = tcurPoints();
+    pointField& curPoints = tcurPoints.ref();
 
     // Interpolate the displacement of the face zones.
-    vectorField zoneDisp(displacements_.size(), vector::zero);
+    vectorField zoneDisp(displacements_.size(), Zero);
     forAll(zoneDisp, zoneI)
     {
         if (times_[zoneI].size())
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C
index 976c13270f69ba9438b7f2d41e09f9dc8f6e5eca..3d5f22d09d91e0ad0f1d51e7b74745e8c2d05482 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -79,7 +79,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
         (
             "cellDisplacement",
             pointDisplacement_.dimensions(),
-            vector::zero
+            Zero
         ),
         cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField())
     ),
@@ -169,7 +169,7 @@ displacementLaplacianFvMotionSolver
         (
             "cellDisplacement",
             pointDisplacement_.dimensions(),
-            vector::zero
+            Zero
         ),
         cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField())
     ),
@@ -303,6 +303,7 @@ Foam::displacementLaplacianFvMotionSolver::curPoints() const
         (
             points0() + pointDisplacement_.internalField()
         );
+        pointField& curPoints = tcurPoints.ref();
 
         // Implement frozen points
         if (frozenPointsZone_ != -1)
@@ -311,11 +312,11 @@ Foam::displacementLaplacianFvMotionSolver::curPoints() const
 
             forAll(pz, i)
             {
-                tcurPoints()[pz[i]] = points0()[pz[i]];
+                curPoints[pz[i]] = points0()[pz[i]];
             }
         }
 
-        twoDCorrectPoints(tcurPoints());
+        twoDCorrectPoints(curPoints);
 
         return tcurPoints;
     }
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C
index a676438f7b73d3b7258032eef68e3e1311f2f36f..425d087e29d668b0c8aa1037bc4b679f4711ce20 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -171,7 +171,7 @@ void Foam::displacementLayeredMotionMotionSolver::walkStructured
                 points0()[pointI],  // location of data
                 vector::max,        // not valid
                 0.0,
-                vector::zero        // passive data
+                Zero        // passive data
             );
         }
     }
@@ -189,7 +189,7 @@ void Foam::displacementLayeredMotionMotionSolver::walkStructured
                 mesh().edges()[edgeI].centre(points0()),    // location of data
                 vector::max,                                // not valid
                 0.0,
-                vector::zero
+                Zero
             );
         }
     }
@@ -230,7 +230,7 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate
 ) const
 {
     tmp<vectorField> tfld(new vectorField(meshPoints.size()));
-    vectorField& fld = tfld();
+    vectorField& fld = tfld.ref();
 
     const word type(dict.lookup("type"));
 
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H
index d65fcc672bfe6314345109f705bda907ef46fc55..a01394dd7a35a099eeae586c6a11c74f59a70fc0 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ inline Foam::pointEdgeStructuredWalk::pointEdgeStructuredWalk()
     point0_(vector::max),
     previousPoint_(vector::max),
     dist_(0),
-    data_(vector::zero)
+    data_(Zero)
 {}
 
 
diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C
index 3593db771f53f52b8325b6014104b5836e165f36..7a342f19984b1b89288ae86ee0453e32259f9ffc 100644
--- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C
@@ -74,7 +74,7 @@ surfaceAlignedSBRStressFvMotionSolver
             IOobject::NO_WRITE
         ),
         fvMesh_,
-        dimensionedVector("zero", dimless, vector::zero)
+        dimensionedVector("zero", dimless, Zero)
     ),
     maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)),
     minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)),
@@ -93,11 +93,11 @@ surfaceAlignedSBRStressFvMotionSolver
             IOobject::NO_WRITE
         ),
         fvMesh_,
-        dimensionedSymmTensor("zero", dimless, symmTensor::zero)
+        dimensionedSymmTensor("zero", dimless, Zero)
     ),
     minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4))
 {
-    forAll (surfaceNames_, i)
+    forAll(surfaceNames_, i)
     {
         surfaceMesh_.set
         (
@@ -131,8 +131,8 @@ Foam::surfaceAlignedSBRStressFvMotionSolver::
 
 void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
 {
-    cellRot_.internalField() = vector::zero;
-    pointDisplacement_.internalField() = vector::zero;
+    cellRot_.internalField() = Zero;
+    pointDisplacement_.internalField() = Zero;
 
     // Find intersections
     pointField start(fvMesh_.nInternalFaces());
@@ -146,7 +146,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
 
     DynamicList<label> hitCells;
 
-    forAll (surfaceMesh_, surfI)
+    forAll(surfaceMesh_, surfI)
     {
         List<pointIndexHit> hit(start.size());
         surfaceMesh_[surfI].findLineAny(start, end, hit);
@@ -260,7 +260,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
                             const labelList& cPoints =
                                 fvMesh_.cellPoints(rotCellId);
 
-                            forAll (cPoints, j)
+                            forAll(cPoints, j)
                             {
                                 const label pointId = cPoints[j];
 
@@ -279,7 +279,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
             }
         }
 
-        forAll (pointDisplacement_.internalField(), iPoint)
+        forAll(pointDisplacement_.internalField(), iPoint)
         {
             vector& point = pointDisplacement_.internalField()[iPoint];
             point /= pointsCount[iPoint];
@@ -316,7 +316,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
                 IOobject::NO_WRITE
             ),
             fvMesh_,
-            dimensionedVector("zero", dimLength, vector::zero),
+            dimensionedVector("zero", dimLength, Zero),
             cellMotionBoundaryTypes<vector>
             (
                 pointDisplacement().boundaryField()
@@ -324,10 +324,10 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
         )
     );
 
-    volVectorField& Ud = tUd();
+    volVectorField& Ud = tUd.ref();
 
     const vectorList& C = fvMesh_.C();
-    forAll (Ud, i)
+    forAll(Ud, i)
     {
         pointMVCWeight pointInter(fvMesh_, C[i], i);
         Ud[i] = pointInter.interpolate(pointDisplacement_);
@@ -364,7 +364,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
             dimensionedScalar("zero", dimless, 0.0)
         )
     );
-    volScalarField& mu =  tmu();
+    volScalarField& mu =  tmu.ref();
 
     const scalarList& V = fvMesh_.V();
     mu.internalField() = (1.0/V);
diff --git a/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCore.H b/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCore.H
index b91dd80121a07a11c6ff5003f97fb10b84d69e9a..d6a3418e7e89147e6d926a861266bdeac8841d4b 100644
--- a/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCore.H
+++ b/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCore.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvMotionSolverCoreTemplates.C"
+    #include "fvMotionSolverCoreTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCoreTemplates.C b/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCoreTemplates.C
index 71dbdaa69f2c3bfeb62cf317941296a25001d91d..35ae23788b0d681c54e7035f05422986763120df 100644
--- a/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCoreTemplates.C
+++ b/src/fvMotionSolver/fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCoreTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ Foam::wordList Foam::fvMotionSolverCore::cellMotionBoundaryTypes
 
     forAll(cmUbf, patchi)
     {
-        if (isA<fixedValuePointPatchField<Type> >(pmUbf[patchi]))
+        if (isA<fixedValuePointPatchField<Type>>(pmUbf[patchi]))
         {
             cmUbf[patchi] = cellMotionFvPatchField<Type>::typeName;
         }
diff --git a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C
index e0cb85b91f2a471eb974fcbeede38fc3782fbf02..d59107c132126fe1aef17c3c0da0524619d11dc7 100644
--- a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C
+++ b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ Foam::velocityLaplacianFvMotionSolver::velocityLaplacianFvMotionSolver
         (
             "cellMotionU",
             pointMotionU_.dimensions(),
-            vector::zero
+            Zero
         ),
         cellMotionBoundaryTypes<vector>(pointMotionU_.boundaryField())
     ),
@@ -109,7 +109,7 @@ Foam::velocityLaplacianFvMotionSolver::curPoints() const
       + fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
     );
 
-    twoDCorrectPoints(tcurPoints());
+    twoDCorrectPoints(tcurPoints.ref());
 
     return tcurPoints;
 }
diff --git a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C
index 3c8ba89c37cb7ae2ecb5f02b8c06261697979370..299ee35293f87ec2b94926f041935c6e940fb4bd 100644
--- a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C
+++ b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ void Foam::cellMotionFvPatchField<Type>::updateCoeffs()
 
     const GeometricField<Type, pointPatchField, pointMesh>& pointMotion =
         this->db().objectRegistry::template
-            lookupObject<GeometricField<Type, pointPatchField, pointMesh> >
+            lookupObject<GeometricField<Type, pointPatchField, pointMesh>>
             (pfName);
 
     forAll(p, i)
diff --git a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H
index 559b2500e41892db864c425f3e2728fd4f37f5b9..e255f0a36725d9cae949c34a50a1f8b6899ae273 100644
--- a/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H
+++ b/src/fvMotionSolver/fvPatchFields/derived/cellMotion/cellMotionFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cellMotionFvPatchField<Type>(*this)
             );
@@ -109,12 +109,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new cellMotionFvPatchField<Type>(*this, iF)
             );
@@ -138,7 +138,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cellMotionFvPatchField.C"
+    #include "cellMotionFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H b/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H
index 67580082c825e992a183ef58994685caea264f20..06487f714fe5b2350d07fc5462079cf43dfb8f69 100644
--- a/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H
+++ b/src/fvMotionSolver/fvPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,9 +107,9 @@ public:
         {}
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new surfaceSlipDisplacementFvPatchField<Type>(*this)
             );
@@ -126,12 +126,12 @@ public:
         {}
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new surfaceSlipDisplacementFvPatchField<Type>(*this, iF)
             );
diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C
index a389e7e08c4e5a68ebffa3c9e9fd5f3feb0578bc..3dce6db7396b0b0d8759a17734bbb95aad34014c 100644
--- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C
+++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolation.C
@@ -48,7 +48,7 @@ Foam::labelListList Foam::patchCorrectedInterpolation::getPatchGroups
     Istream& entry
 ) const
 {
-    List<List<word> > patchGroupNames(entry);
+    List<List<word>> patchGroupNames(entry);
 
     labelListList patchGroups(patchGroupNames.size());
 
diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C
index af6411e5f4bcad9da7dd5aed85067b50d22eae6c..b5eee19c000709b069b7d15da4b17190c57bf07c 100644
--- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C
+++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -106,7 +106,7 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups
         dimensionedScalar("zero", dimless, 0),
         zeroGradientPointPatchField<scalar>::typeName
     );
-    data = dimensioned<Type>("zero", data.dimensions(), pTraits<Type>::zero);
+    data = dimensioned<Type>("zero", data.dimensions(), Type(Zero));
 
     forAll(patchGroups_, patchGroupI)
     {
@@ -168,7 +168,7 @@ void Foam::patchCorrectedInterpolation::propagateDataFromPatchGroup
 
     // Generate the seed labels and info
     labelList seedLabels(nSeedInfo);
-    List<PointData<Type> > seedInfo(nSeedInfo);
+    List<PointData<Type>> seedInfo(nSeedInfo);
     nSeedInfo = 0;
     forAll(patchGroup, patchGroupI)
     {
@@ -200,9 +200,9 @@ void Foam::patchCorrectedInterpolation::propagateDataFromPatchGroup
     }
 
     // Wave the data through the mesh
-    List<PointData<Type> > allPointInfo(mesh().nPoints());
-    List<PointData<Type> > allEdgeInfo(mesh().nEdges());
-    PointEdgeWave<PointData<Type> >
+    List<PointData<Type>> allPointInfo(mesh().nPoints());
+    List<PointData<Type>> allEdgeInfo(mesh().nEdges());
+    PointEdgeWave<PointData<Type>>
     (
         mesh(),
         seedLabels,
diff --git a/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C b/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C
index 22c9d28c32e74c62dbdc100d141fb94ab91ef245..331c73c858886cfdb0de46fa743f0d14dee7b76b 100644
--- a/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C
+++ b/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C
@@ -123,11 +123,11 @@ void Foam::patchTransformedInterpolation::interpolate
 
     pointDisplacement.correctBoundaryConditions();
 
-    vectorField pointRotation(nPoints, vector::zero);
+    vectorField pointRotation(nPoints, Zero);
     scalarField pointExpansion(nPoints, scalar(0));
 
     labelList pointDisplacementNSum(nPoints, 0);
-    vectorField pointDisplacementSum(nPoints, vector::zero);
+    vectorField pointDisplacementSum(nPoints, Zero);
 
     forAll(patches_, patchI)
     {
diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
index d3514243de2bc33429ed11609ab383d622c3216d..c30708bf170e69b458b6882d9404e479263822e4 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,8 +44,8 @@ angularOscillatingDisplacementPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF),
-    axis_(vector::zero),
-    origin_(vector::zero),
+    axis_(Zero),
+    origin_(Zero),
     angle0_(0.0),
     amplitude_(0.0),
     omega_(0.0),
diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H
index a6835327ab4b4a77c96b16db4828270d39841ba4..8deae1e6d1b9801617c568411c8f2bd9984ba3bb 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,9 +94,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new angularOscillatingDisplacementPointPatchVectorField
                 (
@@ -113,12 +113,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new angularOscillatingDisplacementPointPatchVectorField
                 (
diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C
index 2192763c5d2ae14de760e94859cf925778be33aa..607189f57efaca7e43d30eb8f1de8f45c86cd8a9 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,8 +44,8 @@ angularOscillatingVelocityPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF),
-    axis_(vector::zero),
-    origin_(vector::zero),
+    axis_(Zero),
+    origin_(Zero),
     angle0_(0.0),
     amplitude_(0.0),
     omega_(0.0),
diff --git a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H
index b69fb3f5d20133bd58bf8e94141d1b25cd21a441..7016e88925d2a30f6654516b378d569227d5da9a 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/angularOscillatingVelocity/angularOscillatingVelocityPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,9 +94,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new angularOscillatingVelocityPointPatchVectorField
                 (
@@ -113,12 +113,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new angularOscillatingVelocityPointPatchVectorField
                 (
diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C
index 6e5811d3887504be7bb87f3cfb69222a69a418f2..50c25c9977e8d897c7c3bdd776df3a4029bf8f1f 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ oscillatingDisplacementPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF),
-    amplitude_(vector::zero),
+    amplitude_(Zero),
     omega_(0.0)
 {}
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H
index 9c298a7302c3cc0575ad01de1c0fbdef9222c806..ffa5b7c31b5322d9d4af3975f7244c4f02323f34 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,9 +89,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new oscillatingDisplacementPointPatchVectorField
                 (
@@ -108,12 +108,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new oscillatingDisplacementPointPatchVectorField
                 (
diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C
index fdccc34d4f88781de510a416344deeba95364bd2..fdc13505bf16658448fd4019b7c0b0d642fb2ac7 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ oscillatingVelocityPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF),
-    amplitude_(vector::zero),
+    amplitude_(Zero),
     omega_(0.0),
     p0_(p.localPoints())
 {}
diff --git a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H
index 1ba4ec5872503a045c9854ac60dd2d11c4c15974..48a590cd08f17f4d8d8cbfbe50a67091841399b7 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/oscillatingVelocity/oscillatingVelocityPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,9 +91,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new oscillatingVelocityPointPatchVectorField
                 (
@@ -110,12 +110,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new oscillatingVelocityPointPatchVectorField
                 (
diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
index 00a99a90569d6c6c6ac5c6bba345c946050fec9a..b2f3b353177b3df3ac252e6b0e08badfa806a5e5 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection
     const scalar projectLen = mag(mesh.bounds().max()-mesh.bounds().min());
 
     // For case of fixed projection vector:
-    vector projectVec(vector::zero);
+    vector projectVec(Zero);
     if (projectMode_ == FIXEDNORMAL)
     {
         vector n = projectDir_/mag(projectDir_);
@@ -308,9 +308,9 @@ surfaceDisplacementPointPatchVectorField
 )
 :
     fixedValuePointPatchVectorField(p, iF),
-    velocity_(vector::zero),
+    velocity_(Zero),
     projectMode_(NEAREST),
-    projectDir_(vector::zero),
+    projectDir_(Zero),
     wedgePlane_(-1)
 {}
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
index 3117758565c3d54e9a8e20de436281b91b9e35ad..68cbdf0458afd3c1948828f49fb66c14ae3f116a 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -308,7 +308,7 @@ surfaceSlipDisplacementPointPatchVectorField
 :
     pointPatchVectorField(p, iF),
     projectMode_(NEAREST),
-    projectDir_(vector::zero),
+    projectDir_(Zero),
     wedgePlane_(-1)
 {}
 
diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
index 0053ad452a45dfc881d713d1b88b4cd84ffaf21c..93e7c28221bc233348004a0ecfba137038f4b2fa 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,10 +46,10 @@ timeVaryingMappedFixedValuePointPatchField
     sampleTimes_(0),
     startSampleTime_(-1),
     startSampledValues_(0),
-    startAverage_(pTraits<Type>::zero),
+    startAverage_(Zero),
     endSampleTime_(-1),
     endSampledValues_(0),
-    endAverage_(pTraits<Type>::zero),
+    endAverage_(Zero),
     offset_()
 {}
 
@@ -74,10 +74,10 @@ timeVaryingMappedFixedValuePointPatchField
     sampleTimes_(0),
     startSampleTime_(-1),
     startSampledValues_(0),
-    startAverage_(pTraits<Type>::zero),
+    startAverage_(Zero),
     endSampleTime_(-1),
     endSampledValues_(0),
-    endAverage_(pTraits<Type>::zero),
+    endAverage_(Zero),
     offset_
     (
         ptf.offset_.valid()
@@ -113,15 +113,15 @@ timeVaryingMappedFixedValuePointPatchField
     sampleTimes_(0),
     startSampleTime_(-1),
     startSampledValues_(0),
-    startAverage_(pTraits<Type>::zero),
+    startAverage_(Zero),
     endSampleTime_(-1),
     endSampledValues_(0),
-    endAverage_(pTraits<Type>::zero),
+    endAverage_(Zero),
     offset_()
 {
     if (dict.found("offset"))
     {
-        offset_ = DataEntry<Type>::New("offset", dict);
+        offset_ = Function1<Type>::New("offset", dict);
     }
 
     dict.readIfPresent("fieldTableName", fieldTableName_);
@@ -236,7 +236,7 @@ void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::rmap
     fixedValuePointPatchField<Type>::rmap(ptf, addr);
 
     const timeVaryingMappedFixedValuePointPatchField<Type>& tiptf =
-        refCast<const timeVaryingMappedFixedValuePointPatchField<Type> >(ptf);
+        refCast<const timeVaryingMappedFixedValuePointPatchField<Type>>(ptf);
 
     startSampledValues_.rmap(tiptf.startSampledValues_, addr);
     endSampledValues_.rmap(tiptf.endSampledValues_, addr);
diff --git a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H
index 012ac08d3c4284d7bda0eac1ee25089e59828af1..7eaaec39ee7324f21f1a4413ced021c53ee89569 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValuePointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ SourceFiles
 #include "fixedValuePointPatchField.H"
 #include "instantList.H"
 #include "pointToPointPlanarInterpolation.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -96,7 +96,7 @@ class timeVaryingMappedFixedValuePointPatchField
         Type endAverage_;
 
         //- Time varying offset values to interpolated data
-        autoPtr<DataEntry<Type> > offset_;
+        autoPtr<Function1<Type>> offset_;
 
 
 public:
@@ -138,9 +138,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new timeVaryingMappedFixedValuePointPatchField<Type>(*this)
             );
@@ -154,12 +154,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new timeVaryingMappedFixedValuePointPatchField<Type>(*this, iF)
             );
@@ -209,7 +209,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "timeVaryingMappedFixedValuePointPatchField.C"
+    #include "timeVaryingMappedFixedValuePointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H
index bd1beb36ff6523c2dff32677a679c8938f4e8f21..2b73df7ebd0105aff2f86890f9c3fd3cafc75b62 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,8 +27,12 @@ Class
 Description
     Interpolates pre-specified motion.
 
-    Motion specified as pointVectorFields. E.g.
+    Motion specified as pointVectorFields.
 
+    \heading Patch usage
+
+    Example:
+    \verbatim
     walls
     {
         type                uniformInterpolatedDisplacement;
@@ -36,9 +40,10 @@ Description
         fieldName           wantedDisplacement;
         interpolationScheme linear;
     }
+    \endverbatim
 
-    This will scan the case for 'wantedDisplacement' pointVectorFields
-    and interpolate those in time (using 'linear' interpolation) to
+    This will scan the case for \a wantedDisplacement pointVectorFields
+    and interpolate those in time (using \c linear interpolation) to
     obtain the current displacement.
     The advantage of specifying displacement in this way is that it
     automatically works through decomposePar.
@@ -124,9 +129,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new uniformInterpolatedDisplacementPointPatchVectorField
                 (
@@ -143,12 +148,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new uniformInterpolatedDisplacementPointPatchVectorField
                 (
diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C
index 43a5cd92693670078d833609f17f4cd3ecafd322..51d6921ef5e3f965015b7a186ff9fb33231c0cd1 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C
+++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,9 +39,9 @@ waveDisplacementPointPatchVectorField
 )
 :
     fixedValuePointPatchField<vector>(p, iF),
-    amplitude_(vector::zero),
+    amplitude_(Zero),
     omega_(0.0),
-    waveNumber_(vector::zero)
+    waveNumber_(Zero)
 {}
 
 
@@ -56,7 +56,7 @@ waveDisplacementPointPatchVectorField
     fixedValuePointPatchField<vector>(p, iF, dict),
     amplitude_(dict.lookup("amplitude")),
     omega_(readScalar(dict.lookup("omega"))),
-    waveNumber_(dict.lookupOrDefault<vector>("waveNumber", vector::zero))
+    waveNumber_(dict.lookupOrDefault<vector>("waveNumber", Zero))
 {
     if (!dict.found("value"))
     {
diff --git a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H
index 70d2f6c7f76be1d1b61d59b14dc50b601eedd2d2..c27323b4c10c96d61df5210cde2a585327d38234 100644
--- a/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H
+++ b/src/fvMotionSolver/pointPatchFields/derived/waveDisplacement/waveDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,9 +90,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new waveDisplacementPointPatchVectorField
                 (
@@ -109,12 +109,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new waveDisplacementPointPatchVectorField
                 (
diff --git a/src/fvOptions/Make/files b/src/fvOptions/Make/files
index a32c5351776fd86cee990271910897399a4af3ae..6e74683868e4d575219757c8034002aaff62a8ce 100644
--- a/src/fvOptions/Make/files
+++ b/src/fvOptions/Make/files
@@ -13,6 +13,12 @@ $(generalSources)/semiImplicitSource/semiImplicitSource.C
 
 derivedSources=sources/derived
 $(derivedSources)/actuationDiskSource/actuationDiskSource.C
+$(derivedSources)/buoyancyForce/buoyancyForce.C
+$(derivedSources)/buoyancyForce/buoyancyForceIO.C
+$(derivedSources)/buoyancyEnergy/buoyancyEnergy.C
+$(derivedSources)/buoyancyEnergy/buoyancyEnergyIO.C
+$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
+$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSourceIO.C
 $(derivedSources)/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C
 $(derivedSources)/explicitPorositySource/explicitPorositySource.C
 $(derivedSources)/meanVelocityForce/meanVelocityForce.C
@@ -33,14 +39,6 @@ $(derivedSources)/solidificationMeltingSource/solidificationMeltingSource.C
 $(derivedSources)/solidificationMeltingSource/solidificationMeltingSourceIO.C
 $(derivedSources)/tabulatedAccelerationSource/tabulatedAccelerationSource.C
 $(derivedSources)/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C
-/*
-$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
-$(derivedSources)/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSourceIO.C
-*/
-$(derivedSources)/buoyancyForce/buoyancyForce.C
-$(derivedSources)/buoyancyForce/buoyancyForceIO.C
-$(derivedSources)/buoyancyEnergy/buoyancyEnergy.C
-$(derivedSources)/buoyancyEnergy/buoyancyEnergyIO.C
 
 interRegion = sources/interRegion
 $(interRegion)/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C
@@ -62,4 +60,8 @@ $(derivedConstraints)/fixedTemperatureConstraint/fixedTemperatureConstraint.C
 $(derivedConstraints)/velocityDampingConstraint/velocityDampingConstraint.C
 
 
+/* Corrections */
+
+corrections/limitTemperature/limitTemperature.C
+
 LIB = $(FOAM_LIBBIN)/libfvOptions
diff --git a/src/fvOptions/cellSetOption/cellSetOption.H b/src/fvOptions/cellSetOption/cellSetOption.H
index 6dcbe17886aae00dff6f7074722f884d08fa515c..dd07b2e87f633f93e812c7bce411770a6bfd189f 100644
--- a/src/fvOptions/cellSetOption/cellSetOption.H
+++ b/src/fvOptions/cellSetOption/cellSetOption.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,8 +26,8 @@ Class
 
 Description
     Cell-set options abtract base class.  Provides a base set of controls,
-    e.g.
-
+    e.g.:
+    \verbatim
         type            scalarExplicitSource    // Source type
         active          on;                     // on/off switch
 
@@ -40,8 +40,9 @@ Description
             .
             .
         }
+    \endverbatim
 
-Note:
+Note
     Source/sink options are to be added to the equation R.H.S.
 
 SourceFiles
diff --git a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C
index f982abbb40a403bc6ea31eff0dd83dfc75f6ac2c..b95e2f8b2e72ffefe404e4646832257c554905ad 100644
--- a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C
+++ b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint
         {
             Tuniform_.reset
             (
-                DataEntry<scalar>::New("temperature", coeffs_).ptr()
+                Function1<scalar>::New("temperature", coeffs_).ptr()
             );
             break;
         }
@@ -153,7 +153,7 @@ bool Foam::fv::fixedTemperatureConstraint::read(const dictionary& dict)
         {
             Tuniform_.reset
             (
-                DataEntry<scalar>::New(Tuniform_->name(), dict).ptr()
+                Function1<scalar>::New(Tuniform_->name(), dict).ptr()
             );
         }
 
diff --git a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.H b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.H
index 7ca1285a7b59901ca61dccef770e3533bda6ce07..f2b7029425a58d3ddf87b585a7507d92c18b2718 100644
--- a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.H
+++ b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ Description
 
 Note:
     The 'uniform' option allows the use of a time-varying uniform temperature
-    by means of the DataEntry type.
+    by means of the Function1 type.
 
 SourceFiles
     fvOption.C
@@ -54,7 +54,7 @@ SourceFiles
 
 #include "cellSetOption.H"
 #include "NamedEnum.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -94,7 +94,7 @@ protected:
         temperatureMode mode_;
 
         //- Uniform temperature [K]
-        autoPtr<DataEntry<scalar> > Tuniform_;
+        autoPtr<Function1<scalar>> Tuniform_;
 
         //- Temperature field name
         word TName_;
diff --git a/src/fvOptions/constraints/general/explicitSetValue/ExplicitSetValue.H b/src/fvOptions/constraints/general/explicitSetValue/ExplicitSetValue.H
index 7e3bb15c33520ba111eaaa7007a68afe2a1459b0..780ff55787f7c2aa42d18ed7a8cb04a39e44b44c 100644
--- a/src/fvOptions/constraints/general/explicitSetValue/ExplicitSetValue.H
+++ b/src/fvOptions/constraints/general/explicitSetValue/ExplicitSetValue.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,8 +126,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ExplicitSetValue.C"
-#   include "ExplicitSetValueIO.C"
+    #include "ExplicitSetValue.C"
+    #include "ExplicitSetValueIO.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H b/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H
index 45ae16693abfc5398891ea34e528ff5c86b57dd7..c825d0fd272d10d9a6c63a0b33df6644e37b7868 100644
--- a/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H
+++ b/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -220,7 +220,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "actuationDiskSourceTemplates.C"
+    #include "actuationDiskSourceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSourceTemplates.C b/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSourceTemplates.C
index 191bf9286fe46773955e762ee7ac0c609867e779..78a1572df6cdcdf40b25579c7ea5f6a3cf34ad95 100644
--- a/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSourceTemplates.C
+++ b/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSourceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ void Foam::fv::actuationDiskSource::addActuationDiskAxialInertialResistance
 {
     scalar a = 1.0 - Cp_/Ct_;
     vector uniDiskDir = diskDir_/mag(diskDir_);
-    tensor E(tensor::zero);
+    tensor E(Zero);
     E.xx() = uniDiskDir.x();
     E.yy() = uniDiskDir.y();
     E.zz() = uniDiskDir.z();
diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
index fec009d7f8525a092a66d09cb7cfd7ab761b046e..2c170d976bf4b32a989b8c35c5ca8fa16143388f 100644
--- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
+++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C
@@ -179,9 +179,9 @@ directionalPressureGradientExplicitSource
 :
     cellSetOption(sourceName, modelType, dict, mesh),
     model_(PressureDropModelNames_.read(coeffs_.lookup("model"))),
-    gradP0_(cells_.size(), vector::zero),
-    dGradP_(cells_.size(), vector::zero),
-    gradPporous_(cells_.size(), vector::zero),
+    gradP0_(cells_.size(), Zero),
+    dGradP_(cells_.size(), Zero),
+    gradPporous_(cells_.size(), Zero),
     flowDir_(coeffs_.lookup("flowDir")),
     invAPtr_(NULL),
     D_(0),
@@ -386,7 +386,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct
     }
 
     // Accumulate 'upstream' velocity into cells
-    vectorField UfCells(cells_.size(), vector::zero);
+    vectorField UfCells(cells_.size(), Zero);
     scalarField UfCellWeights(cells_.size(), 0.0);
 
     const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
@@ -486,7 +486,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::addSup
             IOobject::NO_WRITE
         ),
         mesh_,
-        dimensionedVector("zero", eqn.dimensions()/dimVolume, vector::zero)
+        dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero)
     );
 
     UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_;
@@ -536,7 +536,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::constrain
     }
 
     gradP0_ += dGradP_;
-    dGradP_ = vector::zero;
+    dGradP_ = Zero;
 }
 
 
diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H
index 663e81de658265e5851bac4177e42b3f75b8eae9..a1629d9624f76cf7f43706a436ddd39469b2a4e3 100644
--- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H
+++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -169,7 +169,7 @@ protected:
 
         //- 2D look up table efficiency = function of primary and secondary
         // mass flow rates [kg/s]
-        autoPtr<interpolation2DTable<scalar> > eTable_;
+        autoPtr<interpolation2DTable<scalar>> eTable_;
 
         //- Name of velocity field; default = U
         word UName_;
diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C
index f4a6ca68e61e1e66c65a38e7fac4d8065a3eb81a..65af46d7acadb92083451b79be96d5c8ea34384f 100644
--- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C
+++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -204,7 +204,7 @@ void Foam::fv::meanVelocityForce::addSup
             IOobject::NO_WRITE
         ),
         mesh_,
-        dimensionedVector("zero", eqn.dimensions()/dimVolume, vector::zero)
+        dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero)
     );
 
     scalar gradP = gradP0_ + dGradP_;
diff --git a/src/fvOptions/sources/derived/meanVelocityForce/patchMeanVelocityForce/patchMeanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/patchMeanVelocityForce/patchMeanVelocityForce.C
index 9b1acd02b36f28e959919360a8023d81e6719da0..a305326fa55ee4abb6c302f4e1514e527f910344 100644
--- a/src/fvOptions/sources/derived/meanVelocityForce/patchMeanVelocityForce/patchMeanVelocityForce.C
+++ b/src/fvOptions/sources/derived/meanVelocityForce/patchMeanVelocityForce/patchMeanVelocityForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "patchMeanVelocityForce.H"
+#include "processorCyclicPolyPatch.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
@@ -74,12 +75,47 @@ Foam::scalar Foam::fv::patchMeanVelocityForce::magUbarAve
     const volVectorField& U
 ) const
 {
-    return
-        gSum
+    vector2D sumAmagUsumA
+    (
+        sum
         (
             (flowDir_ & U.boundaryField()[patchi_])
            *mesh_.boundary()[patchi_].magSf()
-        )/gSum(mesh_.boundary()[patchi_].magSf());
+        ),
+        sum(mesh_.boundary()[patchi_].magSf())
+    );
+
+
+    // If the mean velocity force is applied to a cyclic patch
+    // for parallel runs include contributions from processorCyclic patches
+    // generated from the decomposition of the cyclic patch
+    const polyBoundaryMesh& patches = mesh_.boundaryMesh();
+
+    if (Pstream::parRun() && isA<cyclicPolyPatch>(patches[patchi_]))
+    {
+        labelList processorCyclicPatches
+        (
+            processorCyclicPolyPatch::patchIDs(patch_, patches)
+        );
+
+        forAll(processorCyclicPatches, pcpi)
+        {
+            const label patchi = processorCyclicPatches[pcpi];
+
+            sumAmagUsumA.x() +=
+                sum
+                (
+                    (flowDir_ & U.boundaryField()[patchi])
+                   *mesh_.boundary()[patchi].magSf()
+                );
+
+            sumAmagUsumA.y() += sum(mesh_.boundary()[patchi].magSf());
+        }
+    }
+
+    mesh_.reduce(sumAmagUsumA, sumOp<vector2D>());
+
+    return sumAmagUsumA.x()/sumAmagUsumA.y();
 }
 
 
diff --git a/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H b/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H
index 92e619999c92bad9caf9edacf4d45df8d4b111c4..0df0d1347ccf852aaff9e0600b444360fefeaeb6 100644
--- a/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H
+++ b/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -176,7 +176,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "radialActuationDiskSourceTemplates.C"
+    #include "radialActuationDiskSourceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSourceTemplates.C b/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSourceTemplates.C
index 65290d600f68fd3880b2fa83566c0c87936a0c92..d475cb73166c54947893605bfe4fbac6532b0d3e 100644
--- a/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSourceTemplates.C
+++ b/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSourceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ addRadialActuationDiskAxialInertialResistance
     scalarField Tr(cells.size());
     const vector uniDiskDir = diskDir_/mag(diskDir_);
 
-    tensor E(tensor::zero);
+    tensor E(Zero);
     E.xx() = uniDiskDir.x();
     E.yy() = uniDiskDir.y();
     E.zz() = uniDiskDir.z();
diff --git a/src/fvOptions/sources/derived/rotorDiskSource/bladeModel/bladeModel.C b/src/fvOptions/sources/derived/rotorDiskSource/bladeModel/bladeModel.C
index e716ccd03a5d9a6af3eb5b21bf3823a73e411103..14a8c44de176a45affbe1d390ff0318fd186d4f8 100644
--- a/src/fvOptions/sources/derived/rotorDiskSource/bladeModel/bladeModel.C
+++ b/src/fvOptions/sources/derived/rotorDiskSource/bladeModel/bladeModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ Foam::bladeModel::bladeModel(const dictionary& dict)
     chord_(),
     fName_(fileName::null)
 {
-    List<Tuple2<word, vector> > data;
+    List<Tuple2<word, vector>> data;
     if (readFromFile())
     {
         IFstream is(fName_);
diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C
index e88c02c664fa4e4404ccbdc9167ea3aebde7278e..1806a7acc0928b0e2cbf556ba3c8dee505a74799 100644
--- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C
+++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,7 +135,7 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct)
     const vectorField& Sf = mesh_.Sf();
     const scalarField& magSf = mesh_.magSf();
 
-    vector n = vector::zero;
+    vector n = Zero;
 
     // Calculate cell addressing for selected cells
     labelList cellAddr(mesh_.nCells(), -1);
@@ -263,9 +263,9 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct)
 void Foam::fv::rotorDiskSource::createCoordinateSystem()
 {
     // Construct the local rotor co-prdinate system
-    vector origin(vector::zero);
-    vector axis(vector::zero);
-    vector refDir(vector::zero);
+    vector origin(Zero);
+    vector axis(Zero);
+    vector refDir(Zero);
 
     geometryModeType gm =
         geometryModeTypeNames_.read(coeffs_.lookup("geometryMode"));
@@ -289,7 +289,7 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem()
             origin /= sumV;
 
             // Determine first radial vector
-            vector dx1(vector::zero);
+            vector dx1(Zero);
             scalar magR = -GREAT;
             forAll(cells_, i)
             {
@@ -459,7 +459,7 @@ Foam::tmp<Foam::vectorField> Foam::fv::rotorDiskSource::inflowVelocity
         }
     }
 
-    return tmp<vectorField>(new vectorField(mesh_.nCells(), vector::zero));
+    return tmp<vectorField>(new vectorField(mesh_.nCells(), Zero));
 }
 
 
@@ -479,10 +479,10 @@ Foam::fv::rotorDiskSource::rotorDiskSource
     omega_(0.0),
     nBlades_(0),
     inletFlow_(ifLocal),
-    inletVelocity_(vector::zero),
+    inletVelocity_(Zero),
     tipEffect_(1.0),
     flap_(),
-    x_(cells_.size(), vector::zero),
+    x_(cells_.size(), Zero),
     R_(cells_.size(), I),
     invR_(cells_.size(), I),
     area_(cells_.size(), 0.0),
@@ -524,7 +524,7 @@ void Foam::fv::rotorDiskSource::addSup
         (
             "zero",
             eqn.dimensions()/dimVolume,
-            vector::zero
+            Zero
         )
     );
 
@@ -565,7 +565,7 @@ void Foam::fv::rotorDiskSource::addSup
         (
             "zero",
             eqn.dimensions()/dimVolume,
-            vector::zero
+            Zero
         )
     );
 
diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C
index 181db2575e4549a5662000c52966153f15735269..0d757a57c8144f90cf5be560ca866a1a4cdde32b 100644
--- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C
+++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -182,11 +182,11 @@ void Foam::fv::rotorDiskSource::writeField
                     IOobject::NO_WRITE
                 ),
                 mesh_,
-                dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
+                dimensioned<Type>("zero", dimless, Zero)
             )
         );
 
-        Field<Type>& field = tfield().internalField();
+        Field<Type>& field = tfield.ref().internalField();
 
         if (cells_.size() != values.size())
         {
diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C
index 7ac47f1b2b2e6626f3aee28fadbfc2e2f407092d..e23a0643fd78d82232ef8b539b336fd7c37369ad 100644
--- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C
+++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ Foam::vector Foam::targetCoeffTrim::calcCoeffs
 
     scalar coeff1 = alpha_*sqr(rotor_.omega())*mathematical::pi;
 
-    vector cf(vector::zero);
+    vector cf(Zero);
     forAll(cells, i)
     {
         label cellI = cells[i];
@@ -119,9 +119,9 @@ void Foam::targetCoeffTrim::correctTrim
         // iterate to find new pitch angles to achieve target force
         scalar err = GREAT;
         label iter = 0;
-        tensor J(tensor::zero);
+        tensor J(Zero);
 
-        vector old = vector::zero;
+        vector old = Zero;
         while ((err > tol_) && (iter < nIter_))
         {
             // cache initial theta vector
@@ -199,8 +199,8 @@ Foam::targetCoeffTrim::targetCoeffTrim
     trimModel(rotor, dict, typeName),
     calcFrequency_(-1),
     useCoeffs_(true),
-    target_(vector::zero),
-    theta_(vector::zero),
+    target_(Zero),
+    theta_(Zero),
     nIter_(50),
     tol_(1e-8),
     relax_(1.0),
@@ -260,7 +260,7 @@ Foam::tmp<Foam::scalarField> Foam::targetCoeffTrim::thetag() const
     const List<vector>& x = rotor_.x();
 
     tmp<scalarField> ttheta(new scalarField(x.size()));
-    scalarField& t = ttheta();
+    scalarField& t = ttheta.ref();
 
     forAll(t, i)
     {
diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C
index f7ce048afa261b412654cd1c46bb6bccaefc060c..5ed89df046d08e26cd78db642a01ace2bb2cb695 100644
--- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C
+++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,6 +28,7 @@ License
 #include "basicThermo.H"
 #include "uniformDimensionedFields.H"
 #include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 #include "geometricOneField.H"
 
@@ -103,7 +104,7 @@ Foam::fv::solidificationMeltingSource::Cp() const
                             dimEnergy/dimMass/dimTemperature,
                             CpRef
                         ),
-                        zeroGradientFvPatchScalarField::typeName
+                        extrapolatedCalculatedFvPatchScalarField::typeName
                     )
                 );
             }
diff --git a/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C b/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C
index aae2e1e07aa587201a2fb5316aeddf93672c24f1..a605ac13a62feccc778828edd93d3bb8cf8fbdbd 100644
--- a/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C
+++ b/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulated6DoFAcceleration/tabulated6DoFAcceleration.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,7 +89,7 @@ Foam::tabulated6DoFAcceleration::acceleration() const
         values_
     );
 
-    Info<< "tabulated6DoFAcceleration::acceleration(): "
+    InfoInFunction
         << "Time = " << t << " accelerations: " << avs << endl;
 
     return avs;
@@ -118,7 +118,7 @@ bool Foam::tabulated6DoFAcceleration::read
 
         if (dataStream.good())
         {
-            List<Tuple2<scalar, accelerationVectors> > timeValues
+            List<Tuple2<scalar, accelerationVectors>> timeValues
             (
                 dataStream
             );
diff --git a/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C b/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C
index 6c23ae848ab3e5f0b2c0bf8fdcc586a6eb519158..5b70fbfbfcf735f2cf2e8d0553337227d9f9621b 100644
--- a/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C
+++ b/src/fvOptions/sources/derived/tabulatedAccelerationSource/tabulatedAccelerationSource.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ Foam::fv::tabulatedAccelerationSource::tabulatedAccelerationSource
     option(name, modelType, dict, mesh),
     motion_(coeffs_, mesh.time()),
     UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
-    g0_("g0", dimAcceleration, vector::zero)
+    g0_("g0", dimAcceleration, Zero)
 {
     fieldNames_.setSize(1, UName_);
     applied_.setSize(1, false);
diff --git a/src/fvOptions/sources/general/codedSource/CodedSource.H b/src/fvOptions/sources/general/codedSource/CodedSource.H
index 516ec81de7f4f24b59c2b839433615fb7f12abac..6961faffbdb0538e7b12464344ad1ad5408d57b2 100644
--- a/src/fvOptions/sources/general/codedSource/CodedSource.H
+++ b/src/fvOptions/sources/general/codedSource/CodedSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -239,8 +239,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CodedSource.C"
-#   include "CodedSourceIO.C"
+    #include "CodedSource.C"
+    #include "CodedSourceIO.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
index c7643dd71af68c09193be3cbcc90a921e87b85a3..459ded8cd9ab1d2d52bf71365e816dc360470369 100644
--- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
+++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
         (
             "zero",
             eqn.dimensions()/dimVolume,
-            pTraits<Type>::zero
+            Zero
         ),
         false
     );
diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H
index ce0df4a70eb6bedc1df5e5e17366c3ae18c8a3f2..9a61f1b94a42aba073abbe26c5366d38026e75da 100644
--- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H
+++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,7 +129,7 @@ protected:
         scalar VDash_;
 
         //- Source field values
-        List<Tuple2<Type, scalar> > injectionRate_;
+        List<Tuple2<Type, scalar>> injectionRate_;
 
 
     // Protected functions
@@ -170,7 +170,7 @@ public:
             inline const volumeModeType& volumeMode() const;
 
             //- Return const access to the source field values
-            inline const List<Tuple2<Type, scalar> >& injectionRate() const;
+            inline const List<Tuple2<Type, scalar>>& injectionRate() const;
 
 
         // Edit
@@ -179,7 +179,7 @@ public:
             inline volumeModeType& volumeMode();
 
             //- Return access to the source field values
-            inline List<Tuple2<Type, scalar> >& injectionRate();
+            inline List<Tuple2<Type, scalar>>& injectionRate();
 
 
         // Evaluation
@@ -215,8 +215,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SemiImplicitSource.C"
-#   include "SemiImplicitSourceIO.C"
+    #include "SemiImplicitSource.C"
+    #include "SemiImplicitSourceIO.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSourceI.H b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSourceI.H
index fd1fbf79582a49e7d1935a53444db17cbc616764..1e1f85054b6e739eb7fc78465aa8902dfbe3f8aa 100644
--- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSourceI.H
+++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSourceI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ Foam::fv::SemiImplicitSource<Type>::volumeMode() const
 
 
 template<class Type>
-inline const Foam::List<Foam::Tuple2<Type, Foam::scalar> >&
+inline const Foam::List<Foam::Tuple2<Type, Foam::scalar>>&
 Foam::fv::SemiImplicitSource<Type>::injectionRate() const
 {
     return injectionRate_;
@@ -53,7 +53,7 @@ Foam::fv::SemiImplicitSource<Type>::volumeMode()
 
 template<class Type>
 inline Foam::List<Foam::Tuple2<Type,
-Foam::scalar> >& Foam::fv::SemiImplicitSource<Type>::injectionRate()
+Foam::scalar>>& Foam::fv::SemiImplicitSource<Type>::injectionRate()
 {
     return injectionRate_;
 }
diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C
index 10636cf4a2e7dbb7d146ef7fbe11f462c3c9ce18..8c51b741ecf347159828122f52695d0d4f4b7a62 100644
--- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C
+++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ void Foam::fv::interRegionExplicitPorositySource::initialise()
             new cellZone
             (
                 zoneName,
-                nbrMesh.faceNeighbour(), // neighbour internal cells
+                nbrMesh.faceNeighbour(), // Neighbour internal cells
                 zoneID,
                 cellZones
             )
@@ -117,7 +117,7 @@ Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource
 :
     interRegionOption(name, modelType, dict, mesh),
     porosityPtr_(NULL),
-    firstIter_(-1),
+    firstIter_(true),
     UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
     muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu"))
 {
@@ -154,10 +154,10 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
             IOobject::NO_WRITE
         ),
         nbrMesh,
-        dimensionedVector("zero", U.dimensions(), vector::zero)
+        dimensionedVector("zero", U.dimensions(), Zero)
     );
 
-    // map local velocity onto neighbour region
+    // Map local velocity onto neighbour region
     meshInterp().mapSrcToTgt
     (
         U.internalField(),
@@ -169,13 +169,13 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
 
     porosityPtr_->addResistance(nbrEqn);
 
-    // convert source from neighbour to local region
+    // Convert source from neighbour to local region
     fvMatrix<vector> porosityEqn(U, eqn.dimensions());
     scalarField& Udiag = porosityEqn.diag();
     vectorField& Usource = porosityEqn.source();
 
     Udiag.setSize(eqn.diag().size(), 0.0);
-    Usource.setSize(eqn.source().size(), vector::zero);
+    Usource.setSize(eqn.source().size(), Zero);
 
     meshInterp().mapTgtToSrc(nbrEqn.diag(), plusEqOp<scalar>(), Udiag);
     meshInterp().mapTgtToSrc(nbrEqn.source(), plusEqOp<vector>(), Usource);
@@ -208,10 +208,10 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
             IOobject::NO_WRITE
         ),
         nbrMesh,
-        dimensionedVector("zero", U.dimensions(), vector::zero)
+        dimensionedVector("zero", U.dimensions(), Zero)
     );
 
-    // map local velocity onto neighbour region
+    // Map local velocity onto neighbour region
     meshInterp().mapSrcToTgt
     (
         U.internalField(),
@@ -252,7 +252,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
     const volScalarField& mu =
         mesh_.lookupObject<volScalarField>(muName_);
 
-    // map local rho onto neighbour region
+    // Map local rho onto neighbour region
     meshInterp().mapSrcToTgt
     (
         rho.internalField(),
@@ -260,7 +260,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
         rhoNbr.internalField()
     );
 
-    // map local mu onto neighbour region
+    // Map local mu onto neighbour region
     meshInterp().mapSrcToTgt
     (
         mu.internalField(),
@@ -270,13 +270,13 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
 
     porosityPtr_->addResistance(nbrEqn, rhoNbr, muNbr);
 
-    // convert source from neighbour to local region
+    // Convert source from neighbour to local region
     fvMatrix<vector> porosityEqn(U, eqn.dimensions());
     scalarField& Udiag = porosityEqn.diag();
     vectorField& Usource = porosityEqn.source();
 
     Udiag.setSize(eqn.diag().size(), 0.0);
-    Usource.setSize(eqn.source().size(), vector::zero);
+    Usource.setSize(eqn.source().size(), Zero);
 
     meshInterp().mapTgtToSrc(nbrEqn.diag(), plusEqOp<scalar>(), Udiag);
     meshInterp().mapTgtToSrc(nbrEqn.source(), plusEqOp<vector>(), Usource);
@@ -292,7 +292,7 @@ bool Foam::fv::interRegionExplicitPorositySource::read(const dictionary& dict)
         coeffs_.readIfPresent("UName", UName_);
         coeffs_.readIfPresent("muName", muName_);
 
-        // reset the porosity model?
+        // Reset the porosity model?
 
         return true;
     }
diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H
index eafb1b384e8e713be53579b51025f0ea47fb32af..93f50a39306b2230287d85395216dc794a721b29 100644
--- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H
+++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,27 +25,29 @@ Class
     Foam::fv::interRegionExplicitPorositySource
 
 Description
-    Inter-region explicit porosity source
+    Inter-region explicit porosity source.
 
     Sources described by, for example using the DarcyForchheimer model:
 
-        interRegionExplicitPorositySourceCoeffs
+    \verbatim
+    interRegionExplicitPorositySourceCoeffs
+    {
+        type            DarcyForchheimer;
+        DarcyForchheimerCoeffs
         {
-            type            DarcyForchheimer;
-            DarcyForchheimerCoeffs
+            d   d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
+            f   f [0 -1 0 0 0 0 0] (0 0 0);
+
+            coordinateSystem
             {
-                d   d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
-                f   f [0 -1 0 0 0 0 0] (0 0 0);
-
-                coordinateSystem
-                {
-                    e1  (0.70710678 0.70710678 0);
-                    e2  (0 0 1);
-                }
+                e1  (0.70710678 0.70710678 0);
+                e2  (0 0 1);
             }
         }
+    }
+    \endverbatim
 
-Note:
+Note
     The porous region must be selected as a cellZone.
 
 SourceFiles
diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C
index 170f72517ba967766ed22287a185f2ec177b21cc..ee213ae246f4718ee07a742e656c43b32ff86388 100644
--- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C
+++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -194,7 +194,7 @@ void Foam::fv::interRegionHeatTransferModel::addSup
         )
     );
 
-    volScalarField& Tmapped = tTmapped();
+    volScalarField& Tmapped = tTmapped.ref();
 
     const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName_);
 
diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.H b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.H
index f24bbad67060e3e9bcd4915494cbb5250b8e3a72..c5810cc321aea9a33e5b47455bc8404e6bab2e31 100644
--- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.H
+++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ protected:
 
         //- Interpolate field with nbrModel specified
         template<class Type>
-        tmp<Field<Type> > interpolate
+        tmp<Field<Type>> interpolate
         (
             const interRegionHeatTransferModel& nbrModel,
             const Field<Type>& field
@@ -106,7 +106,7 @@ protected:
 
         //- Interpolate field without nbrModel specified
         template<class Type>
-        tmp<Field<Type> > interpolate
+        tmp<Field<Type>> interpolate
         (
             const Field<Type>& field
         ) const;
diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C
index 96694477f3205ea5ef75229312ac14378d3f2998..230cb40c5b3d3621bcc52f82495204f06a58c227 100644
--- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C
+++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::fv::interRegionHeatTransferModel::interpolate
 (
     const interRegionHeatTransferModel& nbrModel,
@@ -43,7 +43,7 @@ Foam::fv::interRegionHeatTransferModel::interpolate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::fv::interRegionHeatTransferModel::interpolate
 (
     const Field<Type>& field
diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.H b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.H
index 3f2be053f8b4a1fe9b75b886a6bcec5689a9cd6d..888f1e97a24bf61b1b246f1afaff18c6b9b30e10 100644
--- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.H
+++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedHeatTransfer/tabulatedHeatTransfer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ private:
         word UNbrName_;
 
         //- 2D look up table
-        autoPtr<interpolation2DTable<scalar> > hTable_;
+        autoPtr<interpolation2DTable<scalar>> hTable_;
 
         //- Area per unit volume of heat exchanger
         autoPtr<volScalarField> AoV_;
diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.H b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.H
index 777d533af4564f87b44090375dbf05e68188aa33..1343dd4ac65a1b268976f1aca766eb88de68f333 100644
--- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.H
+++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/tabulatedNTUHeatTransfer/tabulatedNTUHeatTransfer.H
@@ -151,7 +151,7 @@ private:
         word rhoNbrName_;
 
         //- Pointer to 2-D look-up table of NTU f(mDot1, mDot2)
-        autoPtr<interpolation2DTable<scalar> > ntuTable_;
+        autoPtr<interpolation2DTable<scalar>> ntuTable_;
 
         //- Geometry input mode
         geometryModeType geometryMode_;
diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C
index 0a7afe5cb2e1691e28b8b0d71937ace30a52e3a3..374aa5eac6cd7bedc586b7653846a152b1d48153 100644
--- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C
+++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,13 +130,13 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<scalar> >::typeName
+                     == token::Compound<List<scalar>>::typeName
                     )
                     {
                         scalarField* fPtr = new scalarField;
                         fPtr->transfer
                         (
-                            dynamicCast<token::Compound<List<scalar> > >
+                            dynamicCast<token::Compound<List<scalar>>>
                             (
                                 fieldToken.transferCompoundToken(is)
                             )
@@ -164,13 +164,13 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<vector> >::typeName
+                     == token::Compound<List<vector>>::typeName
                     )
                     {
                         vectorField* fPtr = new vectorField;
                         fPtr->transfer
                         (
-                            dynamicCast<token::Compound<List<vector> > >
+                            dynamicCast<token::Compound<List<vector>>>
                             (
                                 fieldToken.transferCompoundToken(is)
                             )
@@ -198,7 +198,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<sphericalTensor> >::typeName
+                     == token::Compound<List<sphericalTensor>>::typeName
                     )
                     {
                         sphericalTensorField* fPtr = new sphericalTensorField;
@@ -206,7 +206,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                         (
                             dynamicCast
                             <
-                                token::Compound<List<sphericalTensor> >
+                                token::Compound<List<sphericalTensor>>
                             >
                             (
                                 fieldToken.transferCompoundToken(is)
@@ -235,7 +235,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<symmTensor> >::typeName
+                     == token::Compound<List<symmTensor>>::typeName
                     )
                     {
                         symmTensorField* fPtr = new symmTensorField;
@@ -243,7 +243,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                         (
                             dynamicCast
                             <
-                                token::Compound<List<symmTensor> >
+                                token::Compound<List<symmTensor>>
                             >
                             (
                                 fieldToken.transferCompoundToken(is)
@@ -272,13 +272,13 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<tensor> >::typeName
+                     == token::Compound<List<tensor>>::typeName
                     )
                     {
                         tensorField* fPtr = new tensorField;
                         fPtr->transfer
                         (
-                            dynamicCast<token::Compound<List<tensor> > >
+                            dynamicCast<token::Compound<List<tensor>>>
                             (
                                 fieldToken.transferCompoundToken(is)
                             )
@@ -603,7 +603,7 @@ void Foam::genericFvPatchField<Type>::rmap
     calculatedFvPatchField<Type>::rmap(ptf, addr);
 
     const genericFvPatchField<Type>& dptf =
-        refCast<const genericFvPatchField<Type> >(ptf);
+        refCast<const genericFvPatchField<Type>>(ptf);
 
     forAllIter
     (
@@ -688,7 +688,7 @@ void Foam::genericFvPatchField<Type>::rmap
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::genericFvPatchField<Type>::valueInternalCoeffs
 (
     const tmp<scalarField>&
@@ -702,14 +702,14 @@ Foam::genericFvPatchField<Type>::valueInternalCoeffs
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "generic boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::genericFvPatchField<Type>::valueBoundaryCoeffs
 (
     const tmp<scalarField>&
@@ -723,14 +723,14 @@ Foam::genericFvPatchField<Type>::valueBoundaryCoeffs
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "generic boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::genericFvPatchField<Type>::gradientInternalCoeffs() const
 {
     FatalErrorInFunction
@@ -741,13 +741,13 @@ Foam::genericFvPatchField<Type>::gradientInternalCoeffs() const
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "generic boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
 {
     FatalErrorInFunction
@@ -758,7 +758,7 @@ Foam::genericFvPatchField<Type>::gradientBoundaryCoeffs() const
         << " in file " << this->dimensionedInternalField().objectPath()
         << "\n    You are probably trying to solve for a field with a "
            "generic boundary condition."
-        << exit(FatalError);
+        << abort(FatalError);
 
     return *this;
 }
diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H
index c032a32fc271966e1fd8dbff68ee6ee40e5c3285..ec3be385b42172f4d6d0f63a48b1ad77890eec05 100644
--- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H
+++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,9 +108,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new genericFvPatchField<Type>(*this)
             );
@@ -124,12 +124,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new genericFvPatchField<Type>(*this, iF)
             );
@@ -158,25 +158,25 @@ public:
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueInternalCoeffs
+            virtual tmp<Field<Type>> valueInternalCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the value of this patchField with given weights
-            virtual tmp<Field<Type> > valueBoundaryCoeffs
+            virtual tmp<Field<Type>> valueBoundaryCoeffs
             (
                 const tmp<scalarField>&
             ) const;
 
             //- Return the matrix diagonal coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            tmp<Field<Type> > gradientInternalCoeffs() const;
+            tmp<Field<Type>> gradientInternalCoeffs() const;
 
             //- Return the matrix source coefficients corresponding to the
             //  evaluation of the gradient of this patchField
-            tmp<Field<Type> > gradientBoundaryCoeffs() const;
+            tmp<Field<Type>> gradientBoundaryCoeffs() const;
 
 
         //- Write
@@ -191,7 +191,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "genericFvPatchField.C"
+    #include "genericFvPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C
index 08b254e658cfc480ffbef877043efbd78c93e516..8f4970855f4fedd51c8f6d90fbac4d44a1757b50 100644
--- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C
+++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,15 +26,10 @@ License
 #include "genericPointPatchField.H"
 #include "pointPatchFieldMapper.H"
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-genericPointPatchField<Type>::genericPointPatchField
+Foam::genericPointPatchField<Type>::genericPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF
@@ -47,7 +42,7 @@ genericPointPatchField<Type>::genericPointPatchField
 
 
 template<class Type>
-genericPointPatchField<Type>::genericPointPatchField
+Foam::genericPointPatchField<Type>::genericPointPatchField
 (
     const pointPatch& p,
     const DimensionedField<Type, pointMesh>& iF,
@@ -113,13 +108,13 @@ genericPointPatchField<Type>::genericPointPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<scalar> >::typeName
+                     == token::Compound<List<scalar>>::typeName
                     )
                     {
                         scalarField* fPtr = new scalarField;
                         fPtr->transfer
                         (
-                            dynamicCast<token::Compound<List<scalar> > >
+                            dynamicCast<token::Compound<List<scalar>>>
                             (
                                 fieldToken.transferCompoundToken(is)
                             )
@@ -147,13 +142,13 @@ genericPointPatchField<Type>::genericPointPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<vector> >::typeName
+                     == token::Compound<List<vector>>::typeName
                     )
                     {
                         vectorField* fPtr = new vectorField;
                         fPtr->transfer
                         (
-                            dynamicCast<token::Compound<List<vector> > >
+                            dynamicCast<token::Compound<List<vector>>>
                             (
                                 fieldToken.transferCompoundToken(is)
                             )
@@ -181,7 +176,7 @@ genericPointPatchField<Type>::genericPointPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<sphericalTensor> >::typeName
+                     == token::Compound<List<sphericalTensor>>::typeName
                     )
                     {
                         sphericalTensorField* fPtr = new sphericalTensorField;
@@ -189,7 +184,7 @@ genericPointPatchField<Type>::genericPointPatchField
                         (
                             dynamicCast
                             <
-                                token::Compound<List<sphericalTensor> >
+                                token::Compound<List<sphericalTensor>>
                             >
                             (
                                 fieldToken.transferCompoundToken(is)
@@ -218,7 +213,7 @@ genericPointPatchField<Type>::genericPointPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<symmTensor> >::typeName
+                     == token::Compound<List<symmTensor>>::typeName
                     )
                     {
                         symmTensorField* fPtr = new symmTensorField;
@@ -226,7 +221,7 @@ genericPointPatchField<Type>::genericPointPatchField
                         (
                             dynamicCast
                             <
-                                token::Compound<List<symmTensor> >
+                                token::Compound<List<symmTensor>>
                             >
                             (
                                 fieldToken.transferCompoundToken(is)
@@ -255,13 +250,13 @@ genericPointPatchField<Type>::genericPointPatchField
                     else if
                     (
                         fieldToken.compoundToken().type()
-                     == token::Compound<List<tensor> >::typeName
+                     == token::Compound<List<tensor>>::typeName
                     )
                     {
                         tensorField* fPtr = new tensorField;
                         fPtr->transfer
                         (
-                            dynamicCast<token::Compound<List<tensor> > >
+                            dynamicCast<token::Compound<List<tensor>>>
                             (
                                 fieldToken.transferCompoundToken(is)
                             )
@@ -308,7 +303,7 @@ genericPointPatchField<Type>::genericPointPatchField
 
 
 template<class Type>
-genericPointPatchField<Type>::genericPointPatchField
+Foam::genericPointPatchField<Type>::genericPointPatchField
 (
     const genericPointPatchField<Type>& ptf,
     const pointPatch& p,
@@ -393,7 +388,7 @@ genericPointPatchField<Type>::genericPointPatchField
 
 
 template<class Type>
-genericPointPatchField<Type>::genericPointPatchField
+Foam::genericPointPatchField<Type>::genericPointPatchField
 (
     const genericPointPatchField<Type>& ptf,
     const DimensionedField<Type, pointMesh>& iF
@@ -413,7 +408,7 @@ genericPointPatchField<Type>::genericPointPatchField
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-void genericPointPatchField<Type>::autoMap
+void Foam::genericPointPatchField<Type>::autoMap
 (
     const pointPatchFieldMapper& m
 )
@@ -471,14 +466,14 @@ void genericPointPatchField<Type>::autoMap
 
 
 template<class Type>
-void genericPointPatchField<Type>::rmap
+void Foam::genericPointPatchField<Type>::rmap
 (
     const pointPatchField<Type>& ptf,
     const labelList& addr
 )
 {
     const genericPointPatchField<Type>& dptf =
-        refCast<const genericPointPatchField<Type> >(ptf);
+        refCast<const genericPointPatchField<Type>>(ptf);
 
     forAllIter
     (
@@ -563,7 +558,7 @@ void genericPointPatchField<Type>::rmap
 
 
 template<class Type>
-void genericPointPatchField<Type>::write(Ostream& os) const
+void Foam::genericPointPatchField<Type>::write(Ostream& os) const
 {
     os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;
 
@@ -614,8 +609,4 @@ void genericPointPatchField<Type>::write(Ostream& os) const
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H
index a7d3f7c6d90dccec2add4bc1b2b645492c039920..e68ce631b13cc342766c0ae6b7fcadd1a8b046f7 100644
--- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H
+++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,9 +98,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new genericPointPatchField<Type>
                 (
@@ -117,12 +117,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new genericPointPatchField<Type>
                 (
@@ -163,7 +163,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "genericPointPatchField.C"
+    #include "genericPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index 909ec9f4edb0d46c137cb4eddcf94da481b9e572..b1460c7db4d2b70b5e25a472bb381b4c29d68c61 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -17,4 +17,4 @@ wmake $targetType coalCombustion
 
 molecularDynamics/Allwmake $targetType $*
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C
index 3cc13ad356db43c844f87e37ff70f0309f39e437..e635f1864c581404b0b464ca6a21161b77475225 100644
--- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C
+++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -221,7 +221,7 @@ void Foam::DSMCCloud<ParcelType>::collisions()
     }
 
     // Temporary storage for subCells
-    List<DynamicList<label> > subCells(8);
+    List<DynamicList<label>> subCells(8);
 
     scalar deltaT = mesh().time().deltaTValue();
 
@@ -392,7 +392,7 @@ void Foam::DSMCCloud<ParcelType>::resetFields()
     (
         "zero",
         dimensionSet(1, -1, -2, 0, 0),
-        vector::zero
+        Zero
     );
 
     rhoN_ = dimensionedScalar("zero",  dimensionSet(0, -3, 0, 0, 0), VSMALL);
@@ -406,7 +406,7 @@ void Foam::DSMCCloud<ParcelType>::resetFields()
     (
         "zero",
         dimensionSet(1, -2, -1, 0, 0),
-        vector::zero
+        Zero
     );
 }
 
@@ -681,7 +681,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud
     ),
     binaryCollisionModel_
     (
-        BinaryCollisionModel<DSMCCloud<ParcelType> >::New
+        BinaryCollisionModel<DSMCCloud<ParcelType>>::New
         (
             particleProperties_,
             *this
@@ -689,7 +689,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud
     ),
     wallInteractionModel_
     (
-        WallInteractionModel<DSMCCloud<ParcelType> >::New
+        WallInteractionModel<DSMCCloud<ParcelType>>::New
         (
             particleProperties_,
             *this
@@ -697,7 +697,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud
     ),
     inflowBoundaryModel_
     (
-        InflowBoundaryModel<DSMCCloud<ParcelType> >::New
+        InflowBoundaryModel<DSMCCloud<ParcelType>>::New
         (
             particleProperties_,
             *this
@@ -800,7 +800,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud
         (
             "zero",
             dimensionSet(1, -1, -2, 0, 0),
-            vector::zero
+            Zero
         )
     ),
     rhoN_
@@ -896,7 +896,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud
         (
             "zero",
             dimensionSet(1, -2, -1, 0, 0),
-            vector::zero
+            Zero
         )
     ),
     constProps_(),
@@ -934,7 +934,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud
             (
                 "zero",
                 dimensionSet(0, 1, -1, 0, 0),
-                vector::zero
+                Zero
             )
         )
     ),
diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H
index 6b57ae1ed7decbc068273b7e9a84ef1ae3c85cab..bdd2f07926db6b216024ff6a081b33c52180187a 100644
--- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H
+++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,7 +93,7 @@ class DSMCCloud
         scalar nParticle_;
 
         //- A data structure holding which particles are in which cell
-        List<DynamicList<ParcelType*> > cellOccupancy_;
+        List<DynamicList<ParcelType*>> cellOccupancy_;
 
         //- A field holding the value of (sigmaT * cR)max for each
         //  cell (see Bird p220). Initialised with the parcels,
@@ -149,15 +149,15 @@ class DSMCCloud
         // References to the cloud sub-models
 
             //- Binary collision model
-            autoPtr<BinaryCollisionModel<DSMCCloud<ParcelType> > >
+            autoPtr<BinaryCollisionModel<DSMCCloud<ParcelType>>>
                 binaryCollisionModel_;
 
             //- Wall interaction model
-            autoPtr<WallInteractionModel<DSMCCloud<ParcelType> > >
+            autoPtr<WallInteractionModel<DSMCCloud<ParcelType>>>
                 wallInteractionModel_;
 
             //- Inflow boundary model
-            autoPtr<InflowBoundaryModel<DSMCCloud<ParcelType> > >
+            autoPtr<InflowBoundaryModel<DSMCCloud<ParcelType>>>
                 inflowBoundaryModel_;
 
 
@@ -244,7 +244,7 @@ public:
                 inline scalar nParticle() const;
 
                 //- Return the cell occupancy addressing
-                inline const List<DynamicList<ParcelType*> >&
+                inline const List<DynamicList<ParcelType*>>&
                     cellOccupancy() const;
 
                 //- Return the sigmaTcRMax field.  non-const access to allow
@@ -398,27 +398,27 @@ public:
             // Sub-models
 
                 //- Return reference to binary elastic collision model
-                inline const BinaryCollisionModel<DSMCCloud<ParcelType> >&
+                inline const BinaryCollisionModel<DSMCCloud<ParcelType>>&
                     binaryCollision() const;
 
                 //- Return non-const reference to binary elastic collision model
-                inline BinaryCollisionModel<DSMCCloud<ParcelType> >&
+                inline BinaryCollisionModel<DSMCCloud<ParcelType>>&
                     binaryCollision();
 
                 //- Return reference to wall interaction model
-                inline const WallInteractionModel<DSMCCloud<ParcelType> >&
+                inline const WallInteractionModel<DSMCCloud<ParcelType>>&
                     wallInteraction() const;
 
                 //- Return non-const reference to wall interaction model
-                inline WallInteractionModel<DSMCCloud<ParcelType> >&
+                inline WallInteractionModel<DSMCCloud<ParcelType>>&
                     wallInteraction();
 
                 //- Return reference to wall interaction model
-                inline const InflowBoundaryModel<DSMCCloud<ParcelType> >&
+                inline const InflowBoundaryModel<DSMCCloud<ParcelType>>&
                     inflowBoundary() const;
 
                 //- Return non-const reference to wall interaction model
-                inline InflowBoundaryModel<DSMCCloud<ParcelType> >&
+                inline InflowBoundaryModel<DSMCCloud<ParcelType>>&
                     inflowBoundary();
 
 
@@ -484,7 +484,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DSMCCloud.C"
+    #include "DSMCCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H
index 16801a7bf7892922c7cb5f14b8ad225436b9257a..58fec016331c7558aa642cc2618bfe08485e5275 100644
--- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H
+++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,7 +68,7 @@ inline Foam::scalar Foam::DSMCCloud<ParcelType>::nParticle() const
 
 
 template<class ParcelType>
-inline const Foam::List<Foam::DynamicList<ParcelType*> >&
+inline const Foam::List<Foam::DynamicList<ParcelType*>>&
 Foam::DSMCCloud<ParcelType>::cellOccupancy() const
 {
     return cellOccupancy_;
@@ -205,7 +205,7 @@ Foam::DSMCCloud<ParcelType>::boundaryU() const
 
 
 template<class ParcelType>
-inline const Foam::BinaryCollisionModel<Foam::DSMCCloud<ParcelType> >&
+inline const Foam::BinaryCollisionModel<Foam::DSMCCloud<ParcelType>>&
 Foam::DSMCCloud<ParcelType>::binaryCollision() const
 {
     return binaryCollisionModel_;
@@ -213,7 +213,7 @@ Foam::DSMCCloud<ParcelType>::binaryCollision() const
 
 
 template<class ParcelType>
-inline Foam::BinaryCollisionModel<Foam::DSMCCloud<ParcelType> >&
+inline Foam::BinaryCollisionModel<Foam::DSMCCloud<ParcelType>>&
 Foam::DSMCCloud<ParcelType>::binaryCollision()
 {
     return binaryCollisionModel_();
@@ -221,7 +221,7 @@ Foam::DSMCCloud<ParcelType>::binaryCollision()
 
 
 template<class ParcelType>
-inline const Foam::WallInteractionModel<Foam::DSMCCloud<ParcelType> >&
+inline const Foam::WallInteractionModel<Foam::DSMCCloud<ParcelType>>&
 Foam::DSMCCloud<ParcelType>::wallInteraction() const
 {
     return wallInteractionModel_;
@@ -229,7 +229,7 @@ Foam::DSMCCloud<ParcelType>::wallInteraction() const
 
 
 template<class ParcelType>
-inline Foam::WallInteractionModel<Foam::DSMCCloud<ParcelType> >&
+inline Foam::WallInteractionModel<Foam::DSMCCloud<ParcelType>>&
 Foam::DSMCCloud<ParcelType>::wallInteraction()
 {
     return wallInteractionModel_();
@@ -237,7 +237,7 @@ Foam::DSMCCloud<ParcelType>::wallInteraction()
 
 
 template<class ParcelType>
-inline const Foam::InflowBoundaryModel<Foam::DSMCCloud<ParcelType> >&
+inline const Foam::InflowBoundaryModel<Foam::DSMCCloud<ParcelType>>&
 Foam::DSMCCloud<ParcelType>::inflowBoundary() const
 {
     return inflowBoundaryModel_;
@@ -245,7 +245,7 @@ Foam::DSMCCloud<ParcelType>::inflowBoundary() const
 
 
 template<class ParcelType>
-inline Foam::InflowBoundaryModel<Foam::DSMCCloud<ParcelType> >&
+inline Foam::InflowBoundaryModel<Foam::DSMCCloud<ParcelType>>&
 Foam::DSMCCloud<ParcelType>::inflowBoundary()
 {
     return inflowBoundaryModel_();
@@ -276,7 +276,7 @@ inline Foam::scalar Foam::DSMCCloud<ParcelType>::massInSystem() const
 template<class ParcelType>
 inline Foam::vector Foam::DSMCCloud<ParcelType>::linearMomentumOfSystem() const
 {
-    vector linearMomentum(vector::zero);
+    vector linearMomentum(Zero);
 
     forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
     {
diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H
index 10d93b50ddbb48a4ab15ad5145dceef44982acc7..fc540a3d122a7413c9198b557b0c6af12da41ac5 100644
--- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H
+++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,16 +130,16 @@ public:
     //- Class used to pass kinematic tracking data to the trackToFace function
     class trackingData
     :
-        public particle::TrackingData<DSMCCloud<DSMCParcel<ParcelType> > >
+        public particle::TrackingData<DSMCCloud<DSMCParcel<ParcelType>>>
     {
     public:
 
         // Constructors
 
             //- Construct from components
-            trackingData(DSMCCloud<DSMCParcel<ParcelType> >& cloud)
+            trackingData(DSMCCloud<DSMCParcel<ParcelType>>& cloud)
             :
-                particle::TrackingData<DSMCCloud<DSMCParcel<ParcelType> > >
+                particle::TrackingData<DSMCCloud<DSMCParcel<ParcelType>>>
                 (
                     cloud
                 )
@@ -214,9 +214,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<DSMCParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<DSMCParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<DSMCParcel<ParcelType> >
+                return autoPtr<DSMCParcel<ParcelType>>
                 (
                     new DSMCParcel<ParcelType>(mesh_, is, true)
                 );
@@ -307,9 +307,9 @@ public:
 
         // I-O
 
-            static void readFields(Cloud<DSMCParcel<ParcelType> >& c);
+            static void readFields(Cloud<DSMCParcel<ParcelType>>& c);
 
-            static void writeFields(const Cloud<DSMCParcel<ParcelType> >& c);
+            static void writeFields(const Cloud<DSMCParcel<ParcelType>>& c);
 
 
     // Ostream Operator
diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelIO.C b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelIO.C
index 6c6c545ae95fd3ae382611b46518c054df457323..c47e7bff39feb55fa5300669c3f496b42ce5829d 100644
--- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelIO.C
+++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,7 +48,7 @@ Foam::DSMCParcel<ParcelType>::DSMCParcel
 )
 :
     ParcelType(mesh, is, readFields),
-    U_(vector::zero),
+    U_(Zero),
     Ei_(0.0),
     typeId_(-1)
 {
@@ -76,7 +76,7 @@ Foam::DSMCParcel<ParcelType>::DSMCParcel
 
 
 template<class ParcelType>
-void Foam::DSMCParcel<ParcelType>::readFields(Cloud<DSMCParcel<ParcelType> >& c)
+void Foam::DSMCParcel<ParcelType>::readFields(Cloud<DSMCParcel<ParcelType>>& c)
 {
     if (!c.size())
     {
@@ -95,7 +95,7 @@ void Foam::DSMCParcel<ParcelType>::readFields(Cloud<DSMCParcel<ParcelType> >& c)
     c.checkFieldIOobject(c, typeId);
 
     label i = 0;
-    forAllIter(typename Cloud<DSMCParcel<ParcelType> >, c, iter)
+    forAllIter(typename Cloud<DSMCParcel<ParcelType>>, c, iter)
     {
         DSMCParcel<ParcelType>& p = iter();
 
@@ -110,7 +110,7 @@ void Foam::DSMCParcel<ParcelType>::readFields(Cloud<DSMCParcel<ParcelType> >& c)
 template<class ParcelType>
 void Foam::DSMCParcel<ParcelType>::writeFields
 (
-    const Cloud<DSMCParcel<ParcelType> >& c
+    const Cloud<DSMCParcel<ParcelType>>& c
 )
 {
     ParcelType::writeFields(c);
@@ -122,7 +122,7 @@ void Foam::DSMCParcel<ParcelType>::writeFields
     IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
 
     label i = 0;
-    forAllConstIter(typename Cloud<DSMCParcel<ParcelType> >, c, iter)
+    forAllConstIter(typename Cloud<DSMCParcel<ParcelType>>, c, iter)
     {
         const DSMCParcel<ParcelType>& p = iter();
 
diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H
index cc90269276c80898695918d71ca9745419549cfe..1d27613fc35cf90acbd468256d014849fa833dac 100644
--- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H
+++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ public:
 
 
     //- Selector
-    static autoPtr<BinaryCollisionModel<CloudType> > New
+    static autoPtr<BinaryCollisionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -151,34 +151,34 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeBinaryCollisionModel(CloudType)                                   \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        BinaryCollisionModel<CloudType>,                                      \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    defineTemplateRunTimeSelectionTable                                       \
-    (                                                                         \
-        BinaryCollisionModel<CloudType>,                                      \
-        dictionary                                                            \
+#define makeBinaryCollisionModel(CloudType)                                    \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        BinaryCollisionModel<CloudType>,                                       \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    defineTemplateRunTimeSelectionTable                                        \
+    (                                                                          \
+        BinaryCollisionModel<CloudType>,                                       \
+        dictionary                                                             \
     );
 
 
-#define makeBinaryCollisionModelType(SS, CloudType)                           \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0);                    \
-                                                                              \
-    BinaryCollisionModel<CloudType>::                                         \
-        adddictionaryConstructorToTable<SS<CloudType> >                       \
+#define makeBinaryCollisionModelType(SS, CloudType)                            \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0);                     \
+                                                                               \
+    BinaryCollisionModel<CloudType>::                                          \
+        adddictionaryConstructorToTable<SS<CloudType>>                         \
             add##SS##CloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "BinaryCollisionModel.C"
+    #include "BinaryCollisionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C
index 4d528d0304f0363df74d0ed0857f46db8d99eead..d01df91c787f9fd6252569af51dd84d9b41ae12b 100644
--- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C
+++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::BinaryCollisionModel<CloudType> >
+Foam::autoPtr<Foam::BinaryCollisionModel<CloudType>>
 Foam::BinaryCollisionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::BinaryCollisionModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<BinaryCollisionModel<CloudType> >
+    return autoPtr<BinaryCollisionModel<CloudType>>
     (
         cstrIter()(dict, owner)
     );
diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H
index d802e3976afb30be42ef58ed76036d7c62825d8f..8575cac5f4d88121cd0e2278e54116db8b2ce02a 100644
--- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H
+++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LarsenBorgnakkeVariableHardSphere.C"
+    #include "LarsenBorgnakkeVariableHardSphere.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H
index ec5364921a90780fe6180dc6e1e0f0be944dfa86..edf1ac106b7a4181ba19c574bc3bf7b2ce8bbc14 100644
--- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H
+++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoBinaryCollision.C"
+    #include "NoBinaryCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H
index 9edca634bb388d1eee23bb8d04c1876317faeccf..29e409d1f605deed987aebeb142a145eed8d63db 100644
--- a/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H
+++ b/src/lagrangian/DSMC/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "VariableHardSphere.C"
+    #include "VariableHardSphere.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C
index 7fd2bc75370db91b449cdf12f98a2eb9ea182680..6df7c26b1556b6ceea5619d83d85ab919d84f6fc 100644
--- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C
+++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ Foam::FreeStream<CloudType>::FreeStream
     {
         const polyPatch& patch = cloud.mesh().boundaryMesh()[patches_[p]];
 
-        particleFluxAccumulators_[p] = List<Field<scalar> >
+        particleFluxAccumulators_[p] = List<Field<scalar>>
         (
             molecules.size(),
             Field<scalar>(patch.size(), 0.0)
@@ -128,7 +128,7 @@ void Foam::FreeStream<CloudType>::autoMap(const mapPolyMesh& mapper)
         label patchi = patches_[p];
 
         const polyPatch& patch = mesh.boundaryMesh()[patchi];
-        List<Field<scalar> >& pFA = particleFluxAccumulators_[p];
+        List<Field<scalar>>& pFA = particleFluxAccumulators_[p];
 
         forAll(pFA, facei)
         {
@@ -174,7 +174,7 @@ void Foam::FreeStream<CloudType>::inflow()
         // velocity to point flux into the domain.
 
         // Take a reference to the particleFluxAccumulator for this patch
-        List<Field<scalar> >& pFA = particleFluxAccumulators_[p];
+        List<Field<scalar>>& pFA = particleFluxAccumulators_[p];
 
         forAll(pFA, i)
         {
diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.H b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.H
index eb0ff4ab40807f37bec0189ed450ffdd1fdba044..d1b69a71dff148f2176d7b8fc0f3c0bb9d4e6a79 100644
--- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.H
+++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,7 +68,7 @@ class FreeStream
         // + Inner List - one Field for every species to be introduced
         // + Each field entry corresponding to a face to be injected across
         //   with a particular species
-        List<List<Field<scalar> > > particleFluxAccumulators_;
+        List<List<Field<scalar>>> particleFluxAccumulators_;
 
 
 public:
@@ -110,7 +110,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FreeStream.C"
+    #include "FreeStream.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H
index 3f600f6a6d626e4398930b29f5affaa70b312728..625682b6632fe4d458c21759ff5dd56d3f9d5c17 100644
--- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H
+++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ public:
 
 
     //- Selector
-    static autoPtr<InflowBoundaryModel<CloudType> > New
+    static autoPtr<InflowBoundaryModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -141,30 +141,30 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeInflowBoundaryModel(CloudType)                                    \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(InflowBoundaryModel<CloudType>, 0);   \
-                                                                              \
-    defineTemplateRunTimeSelectionTable                                       \
-    (                                                                         \
-        InflowBoundaryModel<CloudType>,                                       \
-        dictionary                                                            \
+#define makeInflowBoundaryModel(CloudType)                                     \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(InflowBoundaryModel<CloudType>, 0);    \
+                                                                               \
+    defineTemplateRunTimeSelectionTable                                        \
+    (                                                                          \
+        InflowBoundaryModel<CloudType>,                                        \
+        dictionary                                                             \
     );
 
 
-#define makeInflowBoundaryModelType(SS, CloudType)                            \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0);                    \
-                                                                              \
-    InflowBoundaryModel<CloudType>::                                          \
-        adddictionaryConstructorToTable<SS<CloudType> >                       \
+#define makeInflowBoundaryModelType(SS, CloudType)                             \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0);                     \
+                                                                               \
+    InflowBoundaryModel<CloudType>::                                           \
+        adddictionaryConstructorToTable<SS<CloudType>>                         \
             add##SS##CloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InflowBoundaryModel.C"
+    #include "InflowBoundaryModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C
index 9fd145d10447fd46f0f2c863b1c6ff7609080ca9..4527542382c8e16b1dfa4da331fcdc53645f5877 100644
--- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C
+++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::InflowBoundaryModel<CloudType> >
+Foam::autoPtr<Foam::InflowBoundaryModel<CloudType>>
 Foam::InflowBoundaryModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::InflowBoundaryModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<InflowBoundaryModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<InflowBoundaryModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/NoInflow/NoInflow.H b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/NoInflow/NoInflow.H
index 914ea8ca424004b16444d8b1df96121557af5a5c..524797440b2c63f786a5ac5fb6e65d461cfcff74 100644
--- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/NoInflow/NoInflow.H
+++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/NoInflow/NoInflow.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoInflow.C"
+    #include "NoInflow.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H b/src/lagrangian/DSMC/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H
index e9d3d9f5328b6ed8ef0bebf5e5f9e07ea5676948..7cb6d28654d8262f5300b0ebf4057bc64d3d12b4 100644
--- a/src/lagrangian/DSMC/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H
+++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MaxwellianThermal.C"
+    #include "MaxwellianThermal.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.H b/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.H
index 66698f2a8b93eee756c969097f2d68db9f33c3e1..db3999a6bdb0001a43c1ddf993ad253d5ebd3cf2 100644
--- a/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.H
+++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/MixedDiffuseSpecular/MixedDiffuseSpecular.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MixedDiffuseSpecular.C"
+    #include "MixedDiffuseSpecular.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H b/src/lagrangian/DSMC/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H
index 861ff44e1e602c26f229eabc38ae4f59ba5efd9d..91f256d432db7d44e27ffed28b05c879234fee89 100644
--- a/src/lagrangian/DSMC/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H
+++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SpecularReflection.C"
+    #include "SpecularReflection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H
index e37f16902f4aa9d39674d6b3e75a8517270f936a..8befbaeb6aac986f4780307745ff24b1e28100bb 100644
--- a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H
+++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,7 +102,7 @@ public:
 
 
     //- Selector
-    static autoPtr<WallInteractionModel<CloudType> > New
+    static autoPtr<WallInteractionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -141,30 +141,30 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeWallInteractionModel(CloudType)                                   \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(WallInteractionModel<CloudType>, 0);  \
-                                                                              \
-    defineTemplateRunTimeSelectionTable                                       \
-    (                                                                         \
-        WallInteractionModel<CloudType>,                                      \
-        dictionary                                                            \
+#define makeWallInteractionModel(CloudType)                                    \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(WallInteractionModel<CloudType>, 0);   \
+                                                                               \
+    defineTemplateRunTimeSelectionTable                                        \
+    (                                                                          \
+        WallInteractionModel<CloudType>,                                       \
+        dictionary                                                             \
     );
 
 
-#define makeWallInteractionModelType(SS, CloudType)                           \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0);                    \
-                                                                              \
-    WallInteractionModel<CloudType>::                                         \
-        adddictionaryConstructorToTable<SS<CloudType> >                       \
+#define makeWallInteractionModelType(SS, CloudType)                            \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0);                     \
+                                                                               \
+    WallInteractionModel<CloudType>::                                          \
+        adddictionaryConstructorToTable<SS<CloudType>>                         \
             add##SS##CloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WallInteractionModel.C"
+    #include "WallInteractionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C
index 179bdc6d593e757fefa4678898ae2efb8e00d553..1652caac6c6fd3c07a6dd0b692c7be649dc001a6 100644
--- a/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C
+++ b/src/lagrangian/DSMC/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::WallInteractionModel<CloudType> >
+Foam::autoPtr<Foam::WallInteractionModel<CloudType>>
 Foam::WallInteractionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::WallInteractionModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<WallInteractionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<WallInteractionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C
index c42136c92de0063a6c97c958a1fd30f3d9d52554..0ea3551bb1a31f11cbc52e036c4a85e103641760 100644
--- a/src/lagrangian/basic/Cloud/Cloud.C
+++ b/src/lagrangian/basic/Cloud/Cloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -222,14 +222,14 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime)
 
     // List of lists of particles to be transfered for all of the
     // neighbour processors
-    List<IDLList<ParticleType> > particleTransferLists
+    List<IDLList<ParticleType>> particleTransferLists
     (
         neighbourProcs.size()
     );
 
     // List of destination processorPatches indices for all of the
     // neighbour processors
-    List<DynamicList<label> > patchIndexTransferLists
+    List<DynamicList<label>> patchIndexTransferLists
     (
         neighbourProcs.size()
     );
@@ -322,7 +322,7 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime)
 
 
         // Start sending. Sets number of bytes transferred
-        labelListList allNTrans(Pstream::nProcs());
+        labelList allNTrans(Pstream::nProcs());
         pBufs.finishedSends(allNTrans);
 
 
@@ -330,15 +330,13 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime)
 
         forAll(allNTrans, i)
         {
-            forAll(allNTrans[i], j)
+            if (allNTrans[i])
             {
-                if (allNTrans[i][j])
-                {
-                    transfered = true;
-                    break;
-                }
+                transfered = true;
+                break;
             }
         }
+        reduce(transfered, orOp<bool>());
 
         if (!transfered)
         {
@@ -350,7 +348,7 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime)
         {
             label neighbProci = neighbourProcs[i];
 
-            label nRec = allNTrans[neighbProci][Pstream::myProcNo()];
+            label nRec = allNTrans[neighbProci];
 
             if (nRec)
             {
@@ -402,15 +400,14 @@ void Foam::Cloud<ParticleType>::autoMap
 {
     if (cloud::debug)
     {
-        Info<< "Cloud<ParticleType>::autoMap(TrackData&, const mapPolyMesh&) "
-            << "for lagrangian cloud " << cloud::name() << endl;
+        InfoInFunction << "for lagrangian cloud " << cloud::name() << endl;
     }
 
     const labelList& reverseCellMap = mapper.reverseCellMap();
     const labelList& reverseFaceMap = mapper.reverseFaceMap();
 
     // Reset stored data that relies on the mesh
-//    polyMesh_.clearCellTree();
+    //    polyMesh_.clearCellTree();
     cellWallFacesPtr_.clear();
 
     // Ask for the tetBasePtIs to trigger all processors to build
diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H
index c295a18e248d7ee7f901807672b97adc156dcfe0..1c9998327c9aa606fe93d74b2c2b214c87029415 100644
--- a/src/lagrangian/basic/Cloud/Cloud.H
+++ b/src/lagrangian/basic/Cloud/Cloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -339,7 +339,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Cloud.C"
+    #include "Cloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C
index 2d0c0b2601f5ce93fd9ecc951711ac35aecae121..01655d3a710de8a166d6c8e6b998cdb89e651503 100644
--- a/src/lagrangian/basic/Cloud/CloudIO.C
+++ b/src/lagrangian/basic/Cloud/CloudIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ void Foam::Cloud<ParticleType>::initCloud(const bool checkClass)
 {
     readCloudUniformProperties();
 
-    IOPosition<Cloud<ParticleType> > ioP(*this);
+    IOPosition<Cloud<ParticleType>> ioP(*this);
 
     if (ioP.headerOk())
     {
diff --git a/src/lagrangian/basic/IOPosition/IOPosition.H b/src/lagrangian/basic/IOPosition/IOPosition.H
index 4eff22391feedaf35cc24f1ea110aa2edff8351c..002e4e2ac9a7d5806593857975dd8a7c1121662b 100644
--- a/src/lagrangian/basic/IOPosition/IOPosition.H
+++ b/src/lagrangian/basic/IOPosition/IOPosition.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IOPosition.C"
+    #include "IOPosition.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C
index ec2967ee4465816a2240df3f6b0c26e388e9f81f..4b250dd7b8fa4978978388ff290b691253302827 100644
--- a/src/lagrangian/basic/InteractionLists/InteractionLists.C
+++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -287,7 +287,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
     rilInverse_.setSize(mesh_.nCells());
 
     // Temporary Dynamic lists for accumulation
-    List<DynamicList<label> > rilInverseTemp(rilInverse_.size());
+    List<DynamicList<label>> rilInverseTemp(rilInverse_.size());
 
     // Loop over all referred cells
     forAll(ril_, refCellI)
@@ -504,7 +504,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
     rwfilInverse_.setSize(mesh_.nCells());
 
     // Temporary Dynamic lists for accumulation
-    List<DynamicList<label> > rwfilInverseTemp(rwfilInverse_.size());
+    List<DynamicList<label>> rwfilInverseTemp(rwfilInverse_.size());
 
     // Loop over all referred wall faces
     forAll(rwfil_, refWallFaceI)
@@ -844,15 +844,6 @@ void Foam::InteractionLists<ParticleType>::buildMap
         nSend[procI]++;
     }
 
-    // Send over how many I need to receive
-    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    labelListList sendSizes(Pstream::nProcs());
-
-    sendSizes[Pstream::myProcNo()] = nSend;
-
-    combineReduce(sendSizes, UPstream::listEq());
-
     // 2. Size sendMap
     labelListList sendMap(Pstream::nProcs());
 
@@ -871,6 +862,11 @@ void Foam::InteractionLists<ParticleType>::buildMap
         sendMap[procI][nSend[procI]++] = i;
     }
 
+    // 4. Send over how many I need to receive
+    labelList recvSizes;
+    Pstream::exchangeSizes(sendMap, recvSizes);
+
+
     // Determine receive map
     // ~~~~~~~~~~~~~~~~~~~~~
 
@@ -888,7 +884,7 @@ void Foam::InteractionLists<ParticleType>::buildMap
     {
         if (procI != Pstream::myProcNo())
         {
-            label nRecv = sendSizes[procI][Pstream::myProcNo()];
+            label nRecv = recvSizes[procI];
 
             constructMap[procI].setSize(nRecv);
 
@@ -914,7 +910,7 @@ void Foam::InteractionLists<ParticleType>::buildMap
 template<class ParticleType>
 void Foam::InteractionLists<ParticleType>::prepareParticlesToRefer
 (
-    const List<DynamicList<ParticleType*> >& cellOccupancy
+    const List<DynamicList<ParticleType*>>& cellOccupancy
 )
 {
     const globalIndexAndTransform& globalTransforms =
@@ -1159,7 +1155,7 @@ Foam::InteractionLists<ParticleType>::~InteractionLists()
 template<class ParticleType>
 void Foam::InteractionLists<ParticleType>::sendReferredData
 (
-    const List<DynamicList<ParticleType*> >& cellOccupancy,
+    const List<DynamicList<ParticleType*>>& cellOccupancy,
     PstreamBuffers& pBufs
 )
 {
@@ -1184,7 +1180,7 @@ void Foam::InteractionLists<ParticleType>::sendReferredData
         {
             UOPstream toDomain(domain, pBufs);
 
-            UIndirectList<IDLList<ParticleType> > subMappedParticles
+            UIndirectList<IDLList<ParticleType>> subMappedParticles
             (
                 referredParticles_,
                 subMap
diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.H b/src/lagrangian/basic/InteractionLists/InteractionLists.H
index bcbac057a272fa278893706c50ee5ef7b5e30f65..613c5fd31fb55063c9ce0103ec53d31504243399 100644
--- a/src/lagrangian/basic/InteractionLists/InteractionLists.H
+++ b/src/lagrangian/basic/InteractionLists/InteractionLists.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ Description
     Requiring data:
 
     \verbatim
-    List<DynamicList<typename CloudType::parcelType*> > cellOccupancy_;
+    List<DynamicList<typename CloudType::parcelType*>> cellOccupancy_;
     \endverbatim
 
 SourceFiles
@@ -146,7 +146,7 @@ class InteractionLists
         List<vector> referredWallData_;
 
         //- Referred particle container
-        List<IDLList<ParticleType> > referredParticles_;
+        List<IDLList<ParticleType>> referredParticles_;
 
 
     // Private Member Functions
@@ -178,7 +178,7 @@ class InteractionLists
         //  will be referred
         void prepareParticlesToRefer
         (
-            const List<DynamicList<ParticleType*> >& cellOccupancy
+            const List<DynamicList<ParticleType*>>& cellOccupancy
         );
 
         //- Prepare particle to be referred
@@ -233,7 +233,7 @@ public:
         //  nonBlocking communication
         void sendReferredData
         (
-            const List<DynamicList<ParticleType*> >& cellOccupancy,
+            const List<DynamicList<ParticleType*>>& cellOccupancy,
             PstreamBuffers& pBufs
         );
 
@@ -293,11 +293,11 @@ public:
             inline const List<vector>& referredWallData() const;
 
             //- Return access to the referred particle container
-            inline const List<IDLList<ParticleType> >&
+            inline const List<IDLList<ParticleType>>&
             referredParticles() const;
 
             //- Return non-const access to the referred particle container
-            inline List<IDLList<ParticleType> >& referredParticles();
+            inline List<IDLList<ParticleType>>& referredParticles();
 };
 
 
@@ -312,7 +312,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InteractionLists.C"
+    #include "InteractionLists.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/basic/InteractionLists/InteractionListsI.H b/src/lagrangian/basic/InteractionLists/InteractionListsI.H
index 6eaa438587c0a7a8fdb48f303276a5a53fb01605..979367cd377b8079b25c22ccde3e87cdce3d7c67 100644
--- a/src/lagrangian/basic/InteractionLists/InteractionListsI.H
+++ b/src/lagrangian/basic/InteractionLists/InteractionListsI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -136,7 +136,7 @@ Foam::InteractionLists<ParticleType>::referredWallData() const
 
 
 template<class ParticleType>
-const Foam::List<Foam::IDLList<ParticleType> >&
+const Foam::List<Foam::IDLList<ParticleType>>&
 Foam::InteractionLists<ParticleType>::referredParticles() const
 {
     return referredParticles_;
@@ -144,7 +144,7 @@ Foam::InteractionLists<ParticleType>::referredParticles() const
 
 
 template<class ParticleType>
-Foam::List<Foam::IDLList<ParticleType> >&
+Foam::List<Foam::IDLList<ParticleType>>&
 Foam::InteractionLists<ParticleType>::referredParticles()
 {
     return referredParticles_;
diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C
index c71559d042eb11f53d5a146546ea20dd26265884..9bf602eaba0ae72b04ed8d8155ed4378114601b1 100644
--- a/src/lagrangian/basic/particle/particle.C
+++ b/src/lagrangian/basic/particle/particle.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,8 +130,6 @@ void Foam::particle::transformProperties(const vector&)
 
 Foam::scalar Foam::particle::wallImpactDistance(const vector&) const
 {
-    Info<< "particle::wallImpactDistance" << endl;
-
     return 0.0;
 }
 
diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H
index cbc29774a427fa169c59c0d588d8bd4c12e5f38d..4bbd17bcc4716ed903627c4f2a9da7a22b1e539d 100644
--- a/src/lagrangian/basic/particle/particle.H
+++ b/src/lagrangian/basic/particle/particle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -313,7 +313,11 @@ public:
         TypeName("particle");
 
         //- String representation of properties
-        DefinePropertyList("(Px Py Pz) cellI tetFaceI tetPtI origProc origId");
+        DefinePropertyList
+        (
+            "(Px Py Pz) cellI faceI stepFraction "
+            "tetFaceI tetPtI origProc origId"
+        );
 
         //- Cumulative particle counter - used to provode unique ID
         static label particleCount_;
@@ -589,7 +593,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "particleTemplates.C"
+    #include "particleTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/basic/particle/particleI.H b/src/lagrangian/basic/particle/particleI.H
index c1960b37d0189325f4fb35630421860f0a2781c0..ca68468eb2286b0ddc9cb87d89201d336695d195 100644
--- a/src/lagrangian/basic/particle/particleI.H
+++ b/src/lagrangian/basic/particle/particleI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,7 +166,7 @@ inline Foam::scalar Foam::particle::movingTetLambda
     point b0 = b00 + stepFraction_*(b - b00);
 
     // Normal of plane at start of tracking portion
-    vector n0 = vector::zero;
+    vector n0 = Zero;
 
     {
         tetIndices tetIs(cellI, tetFaceI, tetPtI, mesh_);
diff --git a/src/lagrangian/basic/particle/particleMacros.H b/src/lagrangian/basic/particle/particleMacros.H
index 2e46f2a74798933edd4db87fc8427015f8370d33..3d95f1fbcbf6d88a334907fad5ccb725a0078d0b 100644
--- a/src/lagrangian/basic/particle/particleMacros.H
+++ b/src/lagrangian/basic/particle/particleMacros.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,23 +39,23 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define DefinePropertyList(str)                                               \
-                                                                              \
-    static string propertyList_;                                              \
-                                                                              \
-    static string propertyList()                                              \
-    {                                                                         \
-        return str;                                                           \
+#define DefinePropertyList(str)                                                \
+                                                                               \
+    static string propertyList_;                                               \
+                                                                               \
+    static string propertyList()                                               \
+    {                                                                          \
+        return str;                                                            \
     }
 
 
-#define AddToPropertyList(ParcelType, str)                                    \
-                                                                              \
-    static string propertyList_;                                              \
-                                                                              \
-    static string propertyList()                                              \
-    {                                                                         \
-        return ParcelType::propertyList() + str;                              \
+#define AddToPropertyList(ParcelType, str)                                     \
+                                                                               \
+    static string propertyList_;                                               \
+                                                                               \
+    static string propertyList()                                               \
+    {                                                                          \
+        return ParcelType::propertyList() + str;                               \
     }
 
 
diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C
index f6b992e6555ea489a0e7e78eb79ac69ae99f19b6..9eb6929e47eb5588c9f82d48f261549400e178ed 100644
--- a/src/lagrangian/basic/particle/particleTemplates.C
+++ b/src/lagrangian/basic/particle/particleTemplates.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -135,7 +135,7 @@ void Foam::particle::readFields(CloudType& c)
 
     IOobject procIO(c.fieldIOobject("origProcId", IOobject::MUST_READ));
 
-    if (procIO.typeHeaderOk<IOField<label> >(true))
+    if (procIO.typeHeaderOk<IOField<label>>(true))
     {
         IOField<label> origProcId(procIO);
         c.checkFieldIOobject(c, origProcId);
@@ -820,7 +820,7 @@ void Foam::particle::hitWallFaces
                     lambdaDistanceTolerance
                 );
 
-                pointHit hitInfo(vector::zero);
+                pointHit hitInfo(Zero);
 
                 if (mesh_.moving())
                 {
diff --git a/src/lagrangian/coalCombustion/coalCloudList/coalCloudList.H b/src/lagrangian/coalCombustion/coalCloudList/coalCloudList.H
index 1a023e27ba0771113f3f2298fcc6cd0035ddbca1..20658beffb57bad9228cb7ae9c2e4862206c7617 100644
--- a/src/lagrangian/coalCombustion/coalCloudList/coalCloudList.H
+++ b/src/lagrangian/coalCombustion/coalCloudList/coalCloudList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,13 +73,13 @@ public:
         // Source terms
 
             //- Return const reference to momentum source
-            inline tmp<DimensionedField<vector, volMesh> > UTrans() const;
+            inline tmp<DimensionedField<vector, volMesh>> UTrans() const;
 
             //- Return tmp momentum source term
             inline tmp<fvVectorMatrix> SU(volVectorField& U) const;
 
             //- Sensible enthalpy transfer [J/kg]
-            inline tmp<DimensionedField<scalar, volMesh> > hsTrans() const;
+            inline tmp<DimensionedField<scalar, volMesh>> hsTrans() const;
 
             //- Return sensible enthalpy source term [J/kg/m3/s]
             inline tmp<fvScalarMatrix> Sh(volScalarField& hs) const;
@@ -93,15 +93,15 @@ public:
             ) const;
 
             //- Return total mass transfer [kg/m3]
-            inline tmp<DimensionedField<scalar, volMesh> > rhoTrans() const;
+            inline tmp<DimensionedField<scalar, volMesh>> rhoTrans() const;
 
             //- Return tmp total mass source for carrier phase
             //  - fully explicit
-            inline tmp<DimensionedField<scalar, volMesh> > Srho() const;
+            inline tmp<DimensionedField<scalar, volMesh>> Srho() const;
 
             //- Return tmp total mass source for carrier phase specie i
             //  - fully explicit
-            inline tmp<DimensionedField<scalar, volMesh> > Srho
+            inline tmp<DimensionedField<scalar, volMesh>> Srho
             (
                 const label i
             ) const;
diff --git a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H
index 005d9ef604e0d114a2f5dca2b3fe361fd939cb77..c476221ece10857778245f11accdd6d1220338b9 100644
--- a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H
+++ b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,10 +27,10 @@ License
 #include "volFields.H"
 #include "DimensionedField.H"
 
-Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh>>
 Foam::coalCloudList::UTrans() const
 {
-    tmp<DimensionedField<vector, volMesh> > tfld
+    tmp<DimensionedField<vector, volMesh>> tfld
     (
         new DimensionedField<vector, volMesh>
         (
@@ -43,11 +43,11 @@ Foam::coalCloudList::UTrans() const
                 IOobject::NO_WRITE
             ),
             mesh_,
-            dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
+            dimensionedVector("zero", dimMass*dimVelocity, Zero)
         )
     );
 
-    DimensionedField<vector, volMesh>& fld = tfld();
+    DimensionedField<vector, volMesh>& fld = tfld.ref();
 
     forAll(*this, i)
     {
@@ -64,7 +64,7 @@ Foam::tmp<Foam::fvVectorMatrix> Foam::coalCloudList::SU
 ) const
 {
     tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce));
-    fvVectorMatrix& fvm = tfvm();
+    fvVectorMatrix& fvm = tfvm.ref();
 
     forAll(*this, i)
     {
@@ -75,10 +75,10 @@ Foam::tmp<Foam::fvVectorMatrix> Foam::coalCloudList::SU
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::coalCloudList::hsTrans() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tfld
+    tmp<DimensionedField<scalar, volMesh>> tfld
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -95,7 +95,7 @@ Foam::coalCloudList::hsTrans() const
         )
     );
 
-    DimensionedField<scalar, volMesh>& fld = tfld();
+    DimensionedField<scalar, volMesh>& fld = tfld.ref();
 
     forAll(*this, i)
     {
@@ -112,7 +112,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::Sh
 ) const
 {
     tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(hs, dimEnergy/dimTime));
-    fvScalarMatrix& fvm = tfvm();
+    fvScalarMatrix& fvm = tfvm.ref();
 
     forAll(*this, i)
     {
@@ -130,7 +130,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::SYi
 ) const
 {
     tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(Yi, dimMass/dimTime));
-    fvScalarMatrix& fvm = tfvm();
+    fvScalarMatrix& fvm = tfvm.ref();
 
     forAll(*this, i)
     {
@@ -141,10 +141,10 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::SYi
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::coalCloudList::rhoTrans() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tfld
+    tmp<DimensionedField<scalar, volMesh>> tfld
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -161,7 +161,7 @@ Foam::coalCloudList::rhoTrans() const
         )
     );
 
-    DimensionedField<scalar, volMesh>& fld = tfld();
+    DimensionedField<scalar, volMesh>& fld = tfld.ref();
 
     forAll(*this, i)
     {
@@ -177,10 +177,10 @@ Foam::coalCloudList::rhoTrans() const
 
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::coalCloudList::Srho() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tfld
+    tmp<DimensionedField<scalar, volMesh>> tfld
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -197,7 +197,7 @@ Foam::coalCloudList::Srho() const
         )
     );
 
-    DimensionedField<scalar, volMesh>& fld = tfld();
+    DimensionedField<scalar, volMesh>& fld = tfld.ref();
 
     forAll(*this, i)
     {
@@ -208,13 +208,13 @@ Foam::coalCloudList::Srho() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::coalCloudList::Srho
 (
     const label i
 ) const
 {
-    tmp<DimensionedField<scalar, volMesh> > tfld
+    tmp<DimensionedField<scalar, volMesh>> tfld
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -231,7 +231,7 @@ Foam::coalCloudList::Srho
         )
     );
 
-    DimensionedField<scalar, volMesh>& fld = tfld();
+    DimensionedField<scalar, volMesh>& fld = tfld.ref();
 
     forAll(*this, j)
     {
@@ -248,7 +248,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::Srho
 ) const
 {
     tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
-    fvScalarMatrix& fvm = tfvm();
+    fvScalarMatrix& fvm = tfvm.ref();
 
     forAll(*this, i)
     {
diff --git a/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H b/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H
index 44b67217dda183bfd4c513827a81817ea6b13b48..6aa801f6962671749b8b7844c332c1a46dba9e59 100644
--- a/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H
+++ b/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,16 +37,16 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeCoalParcelSurfaceReactionModels(CloudType)                        \
-                                                                              \
-    makeSurfaceReactionModelType(COxidationDiffusionLimitedRate, CloudType);  \
-    makeSurfaceReactionModelType                                              \
-    (                                                                         \
-        COxidationKineticDiffusionLimitedRate,                                \
-        CloudType                                                             \
-    );                                                                        \
-    makeSurfaceReactionModelType(COxidationIntrinsicRate, CloudType);         \
-    makeSurfaceReactionModelType(COxidationHurtMitchell, CloudType);          \
+#define makeCoalParcelSurfaceReactionModels(CloudType)                         \
+                                                                               \
+    makeSurfaceReactionModelType(COxidationDiffusionLimitedRate, CloudType);   \
+    makeSurfaceReactionModelType                                               \
+    (                                                                          \
+        COxidationKineticDiffusionLimitedRate,                                 \
+        CloudType                                                              \
+    );                                                                         \
+    makeSurfaceReactionModelType(COxidationIntrinsicRate, CloudType);          \
+    makeSurfaceReactionModelType(COxidationHurtMitchell, CloudType);           \
     makeSurfaceReactionModelType(COxidationMurphyShaddix, CloudType);
 
 
diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H
index 26a741062c17d04edd7bf1d29f0f055c22f2259c..ea95e7a9fe885235766769822e604f7e7bb6635c 100644
--- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H
+++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,9 +115,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceReactionModel<CloudType> >
+            return autoPtr<SurfaceReactionModel<CloudType>>
             (
                 new COxidationDiffusionLimitedRate<CloudType>(*this)
             );
diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H
index 08e20f74c876998908c718c06cec416ea416a26a..c5022db82a3204e75c5249f3b28c99c4bcbb423f 100644
--- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H
+++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,9 +128,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceReactionModel<CloudType> >
+            return autoPtr<SurfaceReactionModel<CloudType>>
             (
                 new COxidationHurtMitchell<CloudType>(*this)
             );
diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H
index ead8d85d26d50f7a07e9a3d4de684598c6e3dbc2..7b7ba48292c98403bd5be989b3cd03c861a03e7a 100644
--- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H
+++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,9 +133,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceReactionModel<CloudType> >
+            return autoPtr<SurfaceReactionModel<CloudType>>
             (
                 new COxidationIntrinsicRate<CloudType>(*this)
             );
diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H
index a57c847799e0c923c25e51f22223ccfaa8afa5a8..d565d76902bb06ba53be04a8a1f877d0107f6cea 100644
--- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H
+++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceReactionModel<CloudType> >
+            return autoPtr<SurfaceReactionModel<CloudType>>
             (
                 new COxidationKineticDiffusionLimitedRate<CloudType>(*this)
             );
diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H
index 95dd8b2bcef1d87318306a9a77a805bec500f888..29558edfc36744f55cb167eec12131660c35f806 100644
--- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H
+++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -141,9 +141,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceReactionModel<CloudType> >
+            return autoPtr<SurfaceReactionModel<CloudType>>
             (
                 new COxidationMurphyShaddix<CloudType>(*this)
             );
diff --git a/src/lagrangian/distributionModels/Make/options b/src/lagrangian/distributionModels/Make/options
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..41306609f208806f0c6f42a2426867d3e10d4897 100644
--- a/src/lagrangian/distributionModels/Make/options
+++ b/src/lagrangian/distributionModels/Make/options
@@ -0,0 +1 @@
+EXE_INC =
diff --git a/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H b/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H
index 89acd8013305fbe3b3923deedcbfb6580fbdf5c8..84f8c98b6e7b90d75508c6d9865edd4222d024e4 100644
--- a/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H
+++ b/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,9 +63,9 @@ public:
         Analytical(const Analytical& is);
 
         //- Construct and return clone
-        virtual autoPtr<IntegrationScheme<Type> > clone() const
+        virtual autoPtr<IntegrationScheme<Type>> clone() const
         {
-            return autoPtr<IntegrationScheme<Type> >
+            return autoPtr<IntegrationScheme<Type>>
             (
                 new Analytical<Type>(*this)
             );
@@ -96,7 +96,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Analytical.C"
+    #include "Analytical.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H b/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H
index 0f15aef896a3eb1c2cbb6dd805008ea296af2761..efd91eea25aaf6b69ac2b590c71710a4e9c96c1e 100644
--- a/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H
+++ b/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,9 +63,9 @@ public:
         Euler(const Euler& is);
 
         //- Construct and return clone
-        virtual autoPtr<IntegrationScheme<Type> > clone() const
+        virtual autoPtr<IntegrationScheme<Type>> clone() const
         {
-            return autoPtr<IntegrationScheme<Type> >(new Euler<Type>(*this));
+            return autoPtr<IntegrationScheme<Type>>(new Euler<Type>(*this));
         }
 
 
@@ -93,7 +93,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Euler.C"
+    #include "Euler.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H
index 836371dcddaf13527b4add90c9093b9ce819da08..88326f8c2b92cc47d3efa3bb277ee2b006a6f719 100644
--- a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H
+++ b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,8 +69,8 @@ public:
         //- Constructor
         integrationResult()
         :
-            value_(pTraits<Type>::zero),
-            average_(pTraits<Type>::zero)
+            value_(Zero),
+            average_(Zero)
         {}
 
 
@@ -154,7 +154,7 @@ public:
         IntegrationScheme(const IntegrationScheme& is);
 
         //- Construct and return clone
-        virtual autoPtr<IntegrationScheme<Type> > clone() const = 0;
+        virtual autoPtr<IntegrationScheme<Type>> clone() const = 0;
 
 
     // Selectors
@@ -190,29 +190,29 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeIntegrationScheme(Type)                                           \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(IntegrationScheme<Type>, 0);          \
-                                                                              \
-    defineTemplateRunTimeSelectionTable                                       \
-    (                                                                         \
-        IntegrationScheme<Type>,                                              \
-        dictionary                                                            \
+#define makeIntegrationScheme(Type)                                            \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(IntegrationScheme<Type>, 0);           \
+                                                                               \
+    defineTemplateRunTimeSelectionTable                                        \
+    (                                                                          \
+        IntegrationScheme<Type>,                                               \
+        dictionary                                                             \
     );
 
 
-#define makeIntegrationSchemeType(SS, Type)                                   \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                         \
-                                                                              \
-    IntegrationScheme<Type>::adddictionaryConstructorToTable<SS<Type> >       \
+#define makeIntegrationSchemeType(SS, Type)                                    \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(SS<Type>, 0);                          \
+                                                                               \
+    IntegrationScheme<Type>::adddictionaryConstructorToTable<SS<Type>>         \
         add##SS##Type##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IntegrationScheme.C"
+    #include "IntegrationScheme.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C
index 1e8f9517411fe3efed0fced755aeb2144abe1938..b85a24c61be3adccddaabfbfb64549fa92575b3c 100644
--- a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C
+++ b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr<Foam::IntegrationScheme<Type> >
+Foam::autoPtr<Foam::IntegrationScheme<Type>>
 Foam::IntegrationScheme<Type>::New
 (
     const word& phiName,
@@ -54,7 +54,7 @@ Foam::IntegrationScheme<Type>::New
             << exit(FatalError);
     }
 
-    return autoPtr<IntegrationScheme<Type> >(cstrIter()(phiName, dict));
+    return autoPtr<IntegrationScheme<Type>>(cstrIter()(phiName, dict));
 }
 
 // ************************************************************************* //
diff --git a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C
index f89ee163cf9b103219b01ebfd6c2774733780b5e..58662a716cb9dbc6a5f1474bdb7fdd92ccf20201 100644
--- a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ void Foam::CollidingCloud<CloudType>::setModels()
 {
     collisionModel_.reset
     (
-        CollisionModel<CollidingCloud<CloudType> >::New
+        CollisionModel<CollidingCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -182,7 +182,7 @@ void Foam::CollidingCloud<CloudType>::evolve()
     if (this->solution().canEvolve())
     {
         typename parcelType::template
-            TrackingData<CollidingCloud<CloudType> > td(*this);
+            TrackingData<CollidingCloud<CloudType>> td(*this);
 
         this->solve(td);
     }
diff --git a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.H b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.H
index ceac587e933e8fdf7184dc4fc7691da109501846..009f36ba2e5df04bd45c56b59427ea8b39ae80ca 100644
--- a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.H
+++ b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<CollidingCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<CollidingCloud<CloudType>> cloudCopyPtr_;
 
 
     // Private Member Functions
@@ -104,7 +104,7 @@ protected:
         // References to the cloud sub-models
 
             //- Collision model
-            autoPtr<CollisionModel<CollidingCloud<CloudType> > >
+            autoPtr<CollisionModel<CollidingCloud<CloudType>>>
                 collisionModel_;
 
 
@@ -155,18 +155,18 @@ public:
         );
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new CollidingCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new CollidingCloud(this->mesh(), name, *this)
             );
@@ -199,11 +199,11 @@ public:
             // Sub-models
 
                 //- Return const access to the collision model
-                inline const CollisionModel<CollidingCloud<CloudType> >&
+                inline const CollisionModel<CollidingCloud<CloudType>>&
                     collision() const;
 
                 //- Return reference to the collision model
-                inline CollisionModel<CollidingCloud<CloudType> >&
+                inline CollisionModel<CollidingCloud<CloudType>>&
                     collision();
 
         // Check
@@ -246,7 +246,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CollidingCloud.C"
+    #include "CollidingCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloudI.H
index f22610f967463064a4ab3bb63137f5ebd68effe9..cb4ec402a1d648323c1cdabdf0fade100ed93422 100644
--- a/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloudI.H
+++ b/src/lagrangian/intermediate/clouds/Templates/CollidingCloud/CollidingCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ Foam::CollidingCloud<CloudType>::constProps() const
 
 
 template<class CloudType>
-inline const Foam::CollisionModel<Foam::CollidingCloud<CloudType> >&
+inline const Foam::CollisionModel<Foam::CollidingCloud<CloudType>>&
 Foam::CollidingCloud<CloudType>::collision() const
 {
     return collisionModel_();
@@ -50,7 +50,7 @@ Foam::CollidingCloud<CloudType>::collision() const
 
 
 template<class CloudType>
-inline Foam::CollisionModel<Foam::CollidingCloud<CloudType> >&
+inline Foam::CollisionModel<Foam::CollidingCloud<CloudType>>&
 Foam::CollidingCloud<CloudType>::collision()
 {
     return collisionModel_();
diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
index 42cced7658919002b4468a82a60d115e04ac1899..aa72f933dc61fc71f168621a5eb5523ce4b2d34e 100644
--- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ void Foam::KinematicCloud<CloudType>::setModels()
 {
     dispersionModel_.reset
     (
-        DispersionModel<KinematicCloud<CloudType> >::New
+        DispersionModel<KinematicCloud<CloudType>>::New
         (
             subModelProperties_,
             *this
@@ -50,7 +50,7 @@ void Foam::KinematicCloud<CloudType>::setModels()
 
     patchInteractionModel_.reset
     (
-        PatchInteractionModel<KinematicCloud<CloudType> >::New
+        PatchInteractionModel<KinematicCloud<CloudType>>::New
         (
             subModelProperties_,
             *this
@@ -59,7 +59,7 @@ void Foam::KinematicCloud<CloudType>::setModels()
 
     stochasticCollisionModel_.reset
     (
-        StochasticCollisionModel<KinematicCloud<CloudType> >::New
+        StochasticCollisionModel<KinematicCloud<CloudType>>::New
         (
             subModelProperties_,
             *this
@@ -68,7 +68,7 @@ void Foam::KinematicCloud<CloudType>::setModels()
 
     surfaceFilmModel_.reset
     (
-        SurfaceFilmModel<KinematicCloud<CloudType> >::New
+        SurfaceFilmModel<KinematicCloud<CloudType>>::New
         (
             subModelProperties_,
             *this
@@ -133,7 +133,7 @@ void Foam::KinematicCloud<CloudType>::buildCellOccupancy()
     {
         cellOccupancyPtr_.reset
         (
-            new List<DynamicList<parcelType*> >(mesh_.nCells())
+            new List<DynamicList<parcelType*>>(mesh_.nCells())
         );
     }
     else if (cellOccupancyPtr_().size() != mesh_.nCells())
@@ -144,7 +144,7 @@ void Foam::KinematicCloud<CloudType>::buildCellOccupancy()
         cellOccupancyPtr_().setSize(mesh_.nCells());
     }
 
-    List<DynamicList<parcelType*> >& cellOccupancy = cellOccupancyPtr_();
+    List<DynamicList<parcelType*>>& cellOccupancy = cellOccupancyPtr_();
 
     forAll(cellOccupancy, cO)
     {
@@ -367,7 +367,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
                 IOobject::AUTO_WRITE
             ),
             mesh_,
-            dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
+            dimensionedVector("zero", dimMass*dimVelocity, Zero)
         )
     ),
     UCoeff_
@@ -601,7 +601,7 @@ void Foam::KinematicCloud<CloudType>::restoreState()
 template<class CloudType>
 void Foam::KinematicCloud<CloudType>::resetSourceTerms()
 {
-    UTrans().field() = vector::zero;
+    UTrans().field() = Zero;
     UCoeff().field() = 0.0;
 }
 
@@ -678,7 +678,7 @@ void Foam::KinematicCloud<CloudType>::evolve()
     if (solution_.canEvolve())
     {
         typename parcelType::template
-            TrackingData<KinematicCloud<CloudType> > td(*this);
+            TrackingData<KinematicCloud<CloudType>> td(*this);
 
         solve(td);
     }
@@ -729,7 +729,7 @@ void Foam::KinematicCloud<CloudType>::patchData
         }
         else
         {
-            Up = vector::zero;
+            Up = Zero;
         }
     }
     else
@@ -739,7 +739,7 @@ void Foam::KinematicCloud<CloudType>::patchData
         vector n00 = tetIs.oldFaceTri(mesh_).normal();
 
         // Difference in normal over timestep
-        vector dn = vector::zero;
+        vector dn = Zero;
 
         if (mag(n00) > SMALL)
         {
@@ -854,7 +854,7 @@ void Foam::KinematicCloud<CloudType>::updateMesh()
 template<class CloudType>
 void Foam::KinematicCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
 {
-    typedef typename particle::TrackingData<KinematicCloud<CloudType> > tdType;
+    typedef typename particle::TrackingData<KinematicCloud<CloudType>> tdType;
 
     tdType td(*this);
 
diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H
index 9c2a75157b9f562aed954c1bba148b7f6ed5303b..209165406745897d1440c8bc9f4a41d070324cf2 100644
--- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H
+++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,10 +113,10 @@ public:
         typedef KinematicCloud<CloudType> kinematicCloudType;
 
         //- Force models type
-        typedef ParticleForceList<KinematicCloud<CloudType> > forceType;
+        typedef ParticleForceList<KinematicCloud<CloudType>> forceType;
 
         //- Function object type
-        typedef CloudFunctionObjectList<KinematicCloud<CloudType> >
+        typedef CloudFunctionObjectList<KinematicCloud<CloudType>>
             functionType;
 
 
@@ -125,7 +125,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<KinematicCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<KinematicCloud<CloudType>> cloudCopyPtr_;
 
 
     // Private Member Functions
@@ -163,7 +163,7 @@ protected:
         cachedRandom rndGen_;
 
         //- Cell occupancy information for each parcel, (demand driven)
-        autoPtr<List<DynamicList<parcelType*> > > cellOccupancyPtr_;
+        autoPtr<List<DynamicList<parcelType*>>> cellOccupancyPtr_;
 
         //- Cell length scale
         scalarField cellLengthScale_;
@@ -200,22 +200,22 @@ protected:
         // References to the cloud sub-models
 
             //- Injector models
-            InjectionModelList<KinematicCloud<CloudType> > injectors_;
+            InjectionModelList<KinematicCloud<CloudType>> injectors_;
 
             //- Dispersion model
-            autoPtr<DispersionModel<KinematicCloud<CloudType> > >
+            autoPtr<DispersionModel<KinematicCloud<CloudType>>>
                 dispersionModel_;
 
             //- Patch interaction model
-            autoPtr<PatchInteractionModel<KinematicCloud<CloudType> > >
+            autoPtr<PatchInteractionModel<KinematicCloud<CloudType>>>
                 patchInteractionModel_;
 
             //- Stochastic collision model
-            autoPtr<StochasticCollisionModel<KinematicCloud<CloudType> > >
+            autoPtr<StochasticCollisionModel<KinematicCloud<CloudType>>>
                 stochasticCollisionModel_;
 
             //- Surface film model
-            autoPtr<SurfaceFilmModel<KinematicCloud<CloudType> > >
+            autoPtr<SurfaceFilmModel<KinematicCloud<CloudType>>>
                 surfaceFilmModel_;
 
 
@@ -228,10 +228,10 @@ protected:
         // Sources
 
             //- Momentum
-            autoPtr<DimensionedField<vector, volMesh> > UTrans_;
+            autoPtr<DimensionedField<vector, volMesh>> UTrans_;
 
             //- Coefficient for carrier phase U equation
-            autoPtr<DimensionedField<scalar, volMesh> > UCoeff_;
+            autoPtr<DimensionedField<scalar, volMesh>> UCoeff_;
 
 
         // Initialisation
@@ -295,18 +295,18 @@ public:
         );
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new KinematicCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new KinematicCloud(this->mesh(), name, *this)
             );
@@ -369,7 +369,7 @@ public:
                 //  parcel, non-const access, the caller is
                 //  responsible for updating it for its own purposes
                 //  if particles are removed or created.
-                inline List<DynamicList<parcelType*> >& cellOccupancy();
+                inline List<DynamicList<parcelType*>>& cellOccupancy();
 
                 //- Return the cell length scale
                 inline const scalarField& cellLengthScale() const;
@@ -400,7 +400,6 @@ public:
 
 
             //- Optional particle forces
-//            inline const typename parcelType::forceType& forces() const;
             inline const forceType& forces() const;
 
             //- Return the optional particle forces
@@ -413,44 +412,44 @@ public:
             // Sub-models
 
                 //- Return const access to the injection model
-                inline const InjectionModelList<KinematicCloud<CloudType> >&
+                inline const InjectionModelList<KinematicCloud<CloudType>>&
                     injectors() const;
 
                 //- Return reference to the injection model
-                inline InjectionModelList<KinematicCloud<CloudType> >&
+                inline InjectionModelList<KinematicCloud<CloudType>>&
                     injectors();
 
                 //- Return const-access to the dispersion model
-                inline const DispersionModel<KinematicCloud<CloudType> >&
+                inline const DispersionModel<KinematicCloud<CloudType>>&
                     dispersion() const;
 
                 //- Return reference to the dispersion model
-                inline DispersionModel<KinematicCloud<CloudType> >&
+                inline DispersionModel<KinematicCloud<CloudType>>&
                     dispersion();
 
                 //- Return const-access to the patch interaction model
-                inline const PatchInteractionModel<KinematicCloud<CloudType> >&
+                inline const PatchInteractionModel<KinematicCloud<CloudType>>&
                     patchInteraction() const;
 
                 //- Return reference to the patch interaction model
-                inline PatchInteractionModel<KinematicCloud<CloudType> >&
+                inline PatchInteractionModel<KinematicCloud<CloudType>>&
                     patchInteraction();
 
                 //- Return const-access to the stochastic collision model
                 inline const
-                    StochasticCollisionModel<KinematicCloud<CloudType> >&
+                    StochasticCollisionModel<KinematicCloud<CloudType>>&
                     stochasticCollision() const;
 
                 //- Return reference to the stochastic collision model
-                inline StochasticCollisionModel<KinematicCloud<CloudType> >&
+                inline StochasticCollisionModel<KinematicCloud<CloudType>>&
                     stochasticCollision();
 
                 //- Return const-access to the surface film model
-                inline const SurfaceFilmModel<KinematicCloud<CloudType> >&
+                inline const SurfaceFilmModel<KinematicCloud<CloudType>>&
                     surfaceFilm() const;
 
                 //- Return reference to the surface film model
-                inline SurfaceFilmModel<KinematicCloud<CloudType> >&
+                inline SurfaceFilmModel<KinematicCloud<CloudType>>&
                     surfaceFilm();
 
 
@@ -499,9 +498,6 @@ public:
             //- Total rotational kinetic energy in the system
             inline scalar rotationalKineticEnergyOfSystem() const;
 
-            //- Penetration for fraction [0-1] of the current total mass
-            inline scalar penetration(const scalar fraction) const;
-
             //- Mean diameter Dij
             inline scalar Dij(const label i, const label j) const;
 
@@ -627,7 +623,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "KinematicCloud.C"
+    #include "KinematicCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H
index 626d2070701d54a6938f49edfd2a3a2f94e47de2..48b2a3a5565f793d72078e32249612e7eea797bf 100644
--- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H
+++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,7 +173,7 @@ Foam::KinematicCloud<CloudType>::functions()
 
 
 template<class CloudType>
-inline const Foam::InjectionModelList<Foam::KinematicCloud<CloudType> >&
+inline const Foam::InjectionModelList<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::injectors() const
 {
     return injectors_;
@@ -181,7 +181,7 @@ Foam::KinematicCloud<CloudType>::injectors() const
 
 
 template<class CloudType>
-inline Foam::InjectionModelList<Foam::KinematicCloud<CloudType> >&
+inline Foam::InjectionModelList<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::injectors()
 {
     return injectors_;
@@ -189,7 +189,7 @@ Foam::KinematicCloud<CloudType>::injectors()
 
 
 template<class CloudType>
-inline const Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
+inline const Foam::DispersionModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::dispersion() const
 {
     return dispersionModel_;
@@ -197,7 +197,7 @@ Foam::KinematicCloud<CloudType>::dispersion() const
 
 
 template<class CloudType>
-inline Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
+inline Foam::DispersionModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::dispersion()
 {
     return dispersionModel_();
@@ -205,7 +205,7 @@ Foam::KinematicCloud<CloudType>::dispersion()
 
 
 template<class CloudType>
-inline const Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType> >&
+inline const Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::patchInteraction() const
 {
     return patchInteractionModel_;
@@ -213,7 +213,7 @@ Foam::KinematicCloud<CloudType>::patchInteraction() const
 
 
 template<class CloudType>
-inline Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType> >&
+inline Foam::PatchInteractionModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::patchInteraction()
 {
     return patchInteractionModel_();
@@ -221,7 +221,7 @@ Foam::KinematicCloud<CloudType>::patchInteraction()
 
 
 template<class CloudType>
-inline const Foam::StochasticCollisionModel<Foam::KinematicCloud<CloudType> >&
+inline const Foam::StochasticCollisionModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::stochasticCollision() const
 {
     return stochasticCollisionModel_();
@@ -229,7 +229,7 @@ Foam::KinematicCloud<CloudType>::stochasticCollision() const
 
 
 template<class CloudType>
-inline Foam::StochasticCollisionModel<Foam::KinematicCloud<CloudType> >&
+inline Foam::StochasticCollisionModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::stochasticCollision()
 {
     return stochasticCollisionModel_();
@@ -237,7 +237,7 @@ Foam::KinematicCloud<CloudType>::stochasticCollision()
 
 
 template<class CloudType>
-inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
+inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::surfaceFilm() const
 {
     return surfaceFilmModel_();
@@ -245,7 +245,7 @@ Foam::KinematicCloud<CloudType>::surfaceFilm() const
 
 
 template<class CloudType>
-inline Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
+inline Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType>>&
 Foam::KinematicCloud<CloudType>::surfaceFilm()
 {
     return surfaceFilmModel_();
@@ -285,7 +285,7 @@ template<class CloudType>
 inline Foam::vector
 Foam::KinematicCloud<CloudType>::linearMomentumOfSystem() const
 {
-    vector linearMomentum(vector::zero);
+    vector linearMomentum(Zero);
 
     forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
     {
@@ -355,142 +355,6 @@ inline Foam::scalar Foam::KinematicCloud<CloudType>::Dmax() const
 }
 
 
-template<class CloudType>
-inline Foam::scalar Foam::KinematicCloud<CloudType>::penetration
-(
-    const scalar fraction
-) const
-{
-    if ((fraction < 0) || (fraction > 1))
-    {
-        FatalErrorInFunction
-            << "fraction should be in the range 0 < fraction < 1"
-            << exit(FatalError);
-    }
-
-    scalar distance = 0.0;
-
-    const label nParcel = this->size();
-    globalIndex globalParcels(nParcel);
-    const label nParcelSum = globalParcels.size();
-
-    if (nParcelSum == 0)
-    {
-        return distance;
-    }
-
-    // lists of parcels mass and distance from initial injection point
-    List<List<scalar> > procMass(Pstream::nProcs());
-    List<List<scalar> > procDist(Pstream::nProcs());
-
-    List<scalar>& mass = procMass[Pstream::myProcNo()];
-    List<scalar>& dist = procDist[Pstream::myProcNo()];
-
-    mass.setSize(nParcel);
-    dist.setSize(nParcel);
-
-    label i = 0;
-    scalar mSum = 0.0;
-    forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
-    {
-        const parcelType& p = iter();
-        scalar m = p.nParticle()*p.mass();
-        scalar d = mag(p.position() - p.position0());
-        mSum += m;
-
-        mass[i] = m;
-        dist[i] = d;
-
-        i++;
-    }
-
-    // calculate total mass across all processors
-    reduce(mSum, sumOp<scalar>());
-    Pstream::gatherList(procMass);
-    Pstream::gatherList(procDist);
-
-    if (Pstream::master())
-    {
-        // flatten the mass lists
-        List<scalar> allMass(nParcelSum, 0.0);
-        SortableList<scalar> allDist(nParcelSum, 0.0);
-        for (label procI = 0; procI < Pstream::nProcs(); procI++)
-        {
-            SubList<scalar>
-            (
-                allMass,
-                globalParcels.localSize(procI),
-                globalParcels.offset(procI)
-            ).assign(procMass[procI]);
-
-            // flatten the distance list
-            SubList<scalar>
-            (
-                allDist,
-                globalParcels.localSize(procI),
-                globalParcels.offset(procI)
-            ).assign(procDist[procI]);
-        }
-
-        // sort allDist distances into ascending order
-        // note: allMass masses are left unsorted
-        allDist.sort();
-
-        if (nParcelSum > 1)
-        {
-            const scalar mLimit = fraction*mSum;
-            const labelList& indices = allDist.indices();
-
-            if (mLimit > (mSum - allMass[indices.last()]))
-            {
-                distance = allDist.last();
-            }
-            else
-            {
-                // assuming that 'fraction' is generally closer to 1 than 0,
-                // loop through in reverse distance order
-                const scalar mThreshold = (1.0 - fraction)*mSum;
-                scalar mCurrent = 0.0;
-                label i0 = 0;
-
-                forAllReverse(indices, i)
-                {
-                    label indI = indices[i];
-
-                    mCurrent += allMass[indI];
-
-                    if (mCurrent > mThreshold)
-                    {
-                        i0 = i;
-                        break;
-                    }
-                }
-
-                if (i0 == indices.size() - 1)
-                {
-                    distance = allDist.last();
-                }
-                else
-                {
-                    // linearly interpolate to determine distance
-                    scalar alpha = (mCurrent - mThreshold)/allMass[indices[i0]];
-                    distance =
-                        allDist[i0] + alpha*(allDist[i0+1] - allDist[i0]);
-                }
-            }
-        }
-        else
-        {
-            distance = allDist.first();
-        }
-    }
-
-    Pstream::scatter(distance);
-
-    return distance;
-}
-
-
 template<class CloudType>
 inline Foam::cachedRandom& Foam::KinematicCloud<CloudType>::rndGen()
 {
@@ -499,7 +363,7 @@ inline Foam::cachedRandom& Foam::KinematicCloud<CloudType>::rndGen()
 
 
 template<class CloudType>
-inline Foam::List<Foam::DynamicList<typename CloudType::particleType*> >&
+inline Foam::List<Foam::DynamicList<typename CloudType::particleType*>>&
 Foam::KinematicCloud<CloudType>::cellOccupancy()
 {
     if (cellOccupancyPtr_.empty())
@@ -575,7 +439,7 @@ Foam::KinematicCloud<CloudType>::SU(volVectorField& U) const
         else
         {
             tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce));
-            fvVectorMatrix& fvm = tfvm();
+            fvVectorMatrix& fvm = tfvm.ref();
 
             fvm.source() = -UTrans()/(this->db().time().deltaT());
 
@@ -606,11 +470,11 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const
             ),
             mesh_,
             dimensionedScalar("zero", dimless/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    volScalarField& vDotSweep = tvDotSweep();
+    volScalarField& vDotSweep = tvDotSweep.ref();
     forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
     {
         const parcelType& p = iter();
@@ -645,11 +509,11 @@ Foam::KinematicCloud<CloudType>::theta() const
             ),
             mesh_,
             dimensionedScalar("zero", dimless, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    volScalarField& theta = ttheta();
+    volScalarField& theta = ttheta.ref();
     forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
     {
         const parcelType& p = iter();
@@ -687,7 +551,7 @@ Foam::KinematicCloud<CloudType>::alpha() const
         )
     );
 
-    scalarField& alpha = talpha().internalField();
+    scalarField& alpha = talpha.ref().internalField();
     forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
     {
         const parcelType& p = iter();
@@ -724,7 +588,7 @@ Foam::KinematicCloud<CloudType>::rhoEff() const
         )
     );
 
-    scalarField& rhoEff = trhoEff().internalField();
+    scalarField& rhoEff = trhoEff.ref().internalField();
     forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
     {
         const parcelType& p = iter();
diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H
index 01e5c880253441b132131e7569315cf9f7cbbc89..151a79bec1327a0c75d1f7c463023cb36435e0ce 100644
--- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H
+++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ class cloudSolution
             Switch resetSourcesOnStartup_;
 
             //- List schemes, e.g. U semiImplicit 1
-            List<Tuple2<word, Tuple2<bool, scalar> > > schemes_;
+            List<Tuple2<word, Tuple2<bool, scalar>>> schemes_;
 
 
     // Private Member Functions
diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C
index b5715726b4ad9013c6cdd08122e95af896042249..901e2eb6d64703c000d43a19d03efec7843b5d76 100644
--- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ void Foam::MPPICCloud<CloudType>::setModels()
 {
     packingModel_.reset
     (
-        PackingModel<MPPICCloud<CloudType> >::New
+        PackingModel<MPPICCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -45,7 +45,7 @@ void Foam::MPPICCloud<CloudType>::setModels()
     );
     dampingModel_.reset
     (
-        DampingModel<MPPICCloud<CloudType> >::New
+        DampingModel<MPPICCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -53,7 +53,7 @@ void Foam::MPPICCloud<CloudType>::setModels()
     );
     isotropyModel_.reset
     (
-        IsotropyModel<MPPICCloud<CloudType> >::New
+        IsotropyModel<MPPICCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -164,7 +164,7 @@ void Foam::MPPICCloud<CloudType>::evolve()
     if (this->solution().canEvolve())
     {
         typename parcelType::template
-            TrackingData<MPPICCloud<CloudType> > td(*this);
+            TrackingData<MPPICCloud<CloudType>> td(*this);
 
         this->solve(td);
     }
diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H
index 8583f6b73972ee994cba68911987c9352a6e507a..1d34b686edfeeb03a2d89a758dd8ba9b78d3557e 100644
--- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H
+++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<MPPICCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<MPPICCloud<CloudType>> cloudCopyPtr_;
 
 
     // Private Member Functions
@@ -106,14 +106,14 @@ protected:
         // References to the cloud sub-models
 
             //- Packing model
-            autoPtr<PackingModel<MPPICCloud<CloudType> > > packingModel_;
+            autoPtr<PackingModel<MPPICCloud<CloudType>>> packingModel_;
 
             //- Damping model
-            autoPtr<DampingModel<MPPICCloud<CloudType> > >
+            autoPtr<DampingModel<MPPICCloud<CloudType>>>
                 dampingModel_;
 
             //- Exchange model
-            autoPtr<IsotropyModel<MPPICCloud<CloudType> > >
+            autoPtr<IsotropyModel<MPPICCloud<CloudType>>>
                 isotropyModel_;
 
 
@@ -154,18 +154,18 @@ public:
         );
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new MPPICCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new MPPICCloud(this->mesh(), name, *this)
             );
@@ -184,25 +184,25 @@ public:
             inline const MPPICCloud& cloudCopy() const;
 
             //- Return const access to the packing model
-            inline const PackingModel<MPPICCloud<CloudType> >&
+            inline const PackingModel<MPPICCloud<CloudType>>&
                 packingModel() const;
 
             //- Return a reference to the packing model
-            inline PackingModel<MPPICCloud<CloudType> >& packingModel();
+            inline PackingModel<MPPICCloud<CloudType>>& packingModel();
 
             //- Return condt access to the damping model
-            inline const DampingModel<MPPICCloud<CloudType> >&
+            inline const DampingModel<MPPICCloud<CloudType>>&
                 dampingModel() const;
 
             //- Return a reference to the damping model
-            inline DampingModel<MPPICCloud<CloudType> >& dampingModel();
+            inline DampingModel<MPPICCloud<CloudType>>& dampingModel();
 
             //- Return condt access to the isotropy model
-            inline const IsotropyModel<MPPICCloud<CloudType> >&
+            inline const IsotropyModel<MPPICCloud<CloudType>>&
                 isotropyModel() const;
 
             //- Return a reference to the isotropy model
-            inline IsotropyModel<MPPICCloud<CloudType> >& isotropyModel();
+            inline IsotropyModel<MPPICCloud<CloudType>>& isotropyModel();
 
 
         // Cloud evolution functions
@@ -239,7 +239,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MPPICCloud.C"
+    #include "MPPICCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloudI.H b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloudI.H
index 5211f8700276135f180f91122d98ba7c46cbd4de..7d8dee80b9709097632f48d44a21d3acc738201c 100644
--- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloudI.H
+++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ Foam::MPPICCloud<CloudType>::cloudCopy() const
 
 
 template<class CloudType>
-inline const Foam::PackingModel<Foam::MPPICCloud<CloudType> >&
+inline const Foam::PackingModel<Foam::MPPICCloud<CloudType>>&
 Foam::MPPICCloud<CloudType>::packingModel() const
 {
     return packingModel_();
@@ -42,7 +42,7 @@ Foam::MPPICCloud<CloudType>::packingModel() const
 
 
 template<class CloudType>
-inline Foam::PackingModel<Foam::MPPICCloud<CloudType> >&
+inline Foam::PackingModel<Foam::MPPICCloud<CloudType>>&
 Foam::MPPICCloud<CloudType>::packingModel()
 {
     return packingModel_();
@@ -50,7 +50,7 @@ Foam::MPPICCloud<CloudType>::packingModel()
 
 
 template<class CloudType>
-inline const Foam::DampingModel<Foam::MPPICCloud<CloudType> >&
+inline const Foam::DampingModel<Foam::MPPICCloud<CloudType>>&
 Foam::MPPICCloud<CloudType>::dampingModel() const
 {
     return dampingModel_();
@@ -58,7 +58,7 @@ Foam::MPPICCloud<CloudType>::dampingModel() const
 
 
 template<class CloudType>
-inline Foam::DampingModel<Foam::MPPICCloud<CloudType> >&
+inline Foam::DampingModel<Foam::MPPICCloud<CloudType>>&
 Foam::MPPICCloud<CloudType>::dampingModel()
 {
     return dampingModel_();
@@ -66,7 +66,7 @@ Foam::MPPICCloud<CloudType>::dampingModel()
 
 
 template<class CloudType>
-inline const Foam::IsotropyModel<Foam::MPPICCloud<CloudType> >&
+inline const Foam::IsotropyModel<Foam::MPPICCloud<CloudType>>&
 Foam::MPPICCloud<CloudType>::isotropyModel() const
 {
     return isotropyModel_();
@@ -74,7 +74,7 @@ Foam::MPPICCloud<CloudType>::isotropyModel() const
 
 
 template<class CloudType>
-inline Foam::IsotropyModel<Foam::MPPICCloud<CloudType> >&
+inline Foam::IsotropyModel<Foam::MPPICCloud<CloudType>>&
 Foam::MPPICCloud<CloudType>::isotropyModel()
 {
     return isotropyModel_();
diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C
index fee005bb2911eeb2c26e926fdcf9576f8b27487d..15dfe5f6f3e1d45bfb5ec6b60fa075c93893f42f 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ void Foam::ReactingCloud<CloudType>::setModels()
 {
     compositionModel_.reset
     (
-        CompositionModel<ReactingCloud<CloudType> >::New
+        CompositionModel<ReactingCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -44,7 +44,7 @@ void Foam::ReactingCloud<CloudType>::setModels()
 
     phaseChangeModel_.reset
     (
-        PhaseChangeModel<ReactingCloud<CloudType> >::New
+        PhaseChangeModel<ReactingCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -322,7 +322,7 @@ void Foam::ReactingCloud<CloudType>::evolve()
     if (this->solution().canEvolve())
     {
         typename parcelType::template
-            TrackingData<ReactingCloud<CloudType> > td(*this);
+            TrackingData<ReactingCloud<CloudType>> td(*this);
 
         this->solve(td);
     }
@@ -332,7 +332,7 @@ void Foam::ReactingCloud<CloudType>::evolve()
 template<class CloudType>
 void Foam::ReactingCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
 {
-    typedef typename particle::TrackingData<ReactingCloud<CloudType> > tdType;
+    typedef typename particle::TrackingData<ReactingCloud<CloudType>> tdType;
 
     tdType td(*this);
 
diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H
index ed7d0202cbb06640f39f0ff0f236f56c949ae83e..f7d66a06631aa9399a4e1c919f74ffd9eb498c09 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H
+++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<ReactingCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<ReactingCloud<CloudType>> cloudCopyPtr_;
 
 
     // Private member functions
@@ -107,18 +107,18 @@ protected:
         // References to the cloud sub-models
 
             //- Reacting composition model
-            autoPtr<CompositionModel<ReactingCloud<CloudType> > >
+            autoPtr<CompositionModel<ReactingCloud<CloudType>>>
                 compositionModel_;
 
             //- Reacting phase change model
-            autoPtr<PhaseChangeModel<ReactingCloud<CloudType> > >
+            autoPtr<PhaseChangeModel<ReactingCloud<CloudType>>>
                 phaseChangeModel_;
 
 
         // Sources
 
             //- Mass transfer fields - one per carrier phase specie
-            PtrList<DimensionedField<scalar, volMesh> > rhoTrans_;
+            PtrList<DimensionedField<scalar, volMesh>> rhoTrans_;
 
 
     // Protected Member Functions
@@ -173,18 +173,18 @@ public:
         );
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new ReactingCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new ReactingCloud(this->mesh(), name, *this)
             );
@@ -213,15 +213,15 @@ public:
             // Sub-models
 
                 //- Return const access to reacting composition model
-                inline const CompositionModel<ReactingCloud<CloudType> >&
+                inline const CompositionModel<ReactingCloud<CloudType>>&
                     composition() const;
 
                 //- Return const access to reacting phase change model
-                inline const PhaseChangeModel<ReactingCloud<CloudType> >&
+                inline const PhaseChangeModel<ReactingCloud<CloudType>>&
                     phaseChange() const;
 
                 //- Return reference to reacting phase change model
-                inline PhaseChangeModel<ReactingCloud<CloudType> >&
+                inline PhaseChangeModel<ReactingCloud<CloudType>>&
                     phaseChange();
 
 
@@ -234,11 +234,11 @@ public:
                         rhoTrans(const label i);
 
                     //- Return const access to mass source fields
-                    inline const PtrList<DimensionedField<scalar, volMesh> >&
+                    inline const PtrList<DimensionedField<scalar, volMesh>>&
                         rhoTrans() const;
 
                     //- Return reference to mass source fields
-                    inline PtrList<DimensionedField<scalar, volMesh> >&
+                    inline PtrList<DimensionedField<scalar, volMesh>>&
                         rhoTrans();
 
                     //- Return mass source term for specie i - specie eqn
@@ -249,12 +249,12 @@ public:
                     ) const;
 
                     //- Return tmp mass source for field i - fully explicit
-                    inline tmp<DimensionedField<scalar, volMesh> >
+                    inline tmp<DimensionedField<scalar, volMesh>>
                         Srho(const label i) const;
 
                     //- Return tmp total mass source for carrier phase
                     //  - fully explicit
-                    inline tmp<DimensionedField<scalar, volMesh> > Srho() const;
+                    inline tmp<DimensionedField<scalar, volMesh>> Srho() const;
 
                     //- Return total mass source term [kg/m3/s]
                     inline tmp<fvScalarMatrix> Srho(volScalarField& rho) const;
@@ -324,7 +324,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReactingCloud.C"
+    #include "ReactingCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H
index 7abbc9f54a45ab01bb18ee2167dced235eee3c6d..1c9907ecdb3702c48ea0982143789a96d802eba8 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H
+++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ Foam::ReactingCloud<CloudType>::constProps()
 
 
 template<class CloudType>
-inline const Foam::CompositionModel<Foam::ReactingCloud<CloudType> >&
+inline const Foam::CompositionModel<Foam::ReactingCloud<CloudType>>&
 Foam::ReactingCloud<CloudType>::composition() const
 {
     return compositionModel_;
@@ -58,7 +58,7 @@ Foam::ReactingCloud<CloudType>::composition() const
 
 
 template<class CloudType>
-inline const Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType> >&
+inline const Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType>>&
 Foam::ReactingCloud<CloudType>::phaseChange() const
 {
     return phaseChangeModel_;
@@ -66,7 +66,7 @@ Foam::ReactingCloud<CloudType>::phaseChange() const
 
 
 template<class CloudType>
-inline Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType> >&
+inline Foam::PhaseChangeModel<Foam::ReactingCloud<CloudType>>&
 Foam::ReactingCloud<CloudType>::phaseChange()
 {
     return phaseChangeModel_();
@@ -83,7 +83,7 @@ Foam::ReactingCloud<CloudType>::rhoTrans(const label i)
 
 template<class CloudType>
 inline
-const Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
+const Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>&
 Foam::ReactingCloud<CloudType>::rhoTrans() const
 {
     return rhoTrans_;
@@ -91,7 +91,7 @@ Foam::ReactingCloud<CloudType>::rhoTrans() const
 
 
 template<class CloudType>
-inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
+inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>&
 Foam::ReactingCloud<CloudType>::rhoTrans()
 {
     return rhoTrans_;
@@ -127,7 +127,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
                 )
             );
 
-            volScalarField& sourceField = trhoTrans();
+            volScalarField& sourceField = trhoTrans.ref();
 
             sourceField.internalField() =
                 rhoTrans_[i]/(this->db().time().deltaTValue()*this->mesh().V());
@@ -141,7 +141,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
         else
         {
             tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(Yi, dimMass/dimTime));
-            fvScalarMatrix& fvm = tfvm();
+            fvScalarMatrix& fvm = tfvm.ref();
 
             fvm.source() = -rhoTrans_[i]/this->db().time().deltaTValue();
 
@@ -154,10 +154,10 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
 
 
 template<class CloudType>
-inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::ReactingCloud<CloudType>::Srho(const label i) const
 {
-    tmp<DimensionedField<scalar, volMesh> > tRhoi
+    tmp<DimensionedField<scalar, volMesh>> tRhoi
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -182,7 +182,7 @@ Foam::ReactingCloud<CloudType>::Srho(const label i) const
 
     if (this->solution().coupled())
     {
-        scalarField& rhoi = tRhoi();
+        scalarField& rhoi = tRhoi.ref();
         rhoi = rhoTrans_[i]/(this->db().time().deltaTValue()*this->mesh().V());
     }
 
@@ -191,10 +191,10 @@ Foam::ReactingCloud<CloudType>::Srho(const label i) const
 
 
 template<class CloudType>
-inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::ReactingCloud<CloudType>::Srho() const
 {
-    tmp<DimensionedField<scalar, volMesh> > trhoTrans
+    tmp<DimensionedField<scalar, volMesh>> trhoTrans
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -219,7 +219,7 @@ Foam::ReactingCloud<CloudType>::Srho() const
 
     if (this->solution().coupled())
     {
-        scalarField& sourceField = trhoTrans();
+        scalarField& sourceField = trhoTrans.ref();
         forAll(rhoTrans_, i)
         {
             sourceField += rhoTrans_[i];
@@ -256,7 +256,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
             )
         );
 
-        scalarField& sourceField = trhoTrans();
+        scalarField& sourceField = trhoTrans.ref();
 
         if (this->solution().semiImplicit("rho"))
         {
@@ -272,7 +272,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
         else
         {
             tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
-            fvScalarMatrix& fvm = tfvm();
+            fvScalarMatrix& fvm = tfvm.ref();
 
             forAll(rhoTrans_, i)
             {
diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C
index 963cd985b25b02dffa0bf768ed5d0422be7a1a38..c70e8f04c7d64233055ce8fcb6877f4b8d95a267 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ void Foam::ReactingMultiphaseCloud<CloudType>::setModels()
 {
     devolatilisationModel_.reset
     (
-        DevolatilisationModel<ReactingMultiphaseCloud<CloudType> >::New
+        DevolatilisationModel<ReactingMultiphaseCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -44,7 +44,7 @@ void Foam::ReactingMultiphaseCloud<CloudType>::setModels()
 
     surfaceReactionModel_.reset
     (
-        SurfaceReactionModel<ReactingMultiphaseCloud<CloudType> >::New
+        SurfaceReactionModel<ReactingMultiphaseCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -245,7 +245,7 @@ void Foam::ReactingMultiphaseCloud<CloudType>::evolve()
     if (this->solution().canEvolve())
     {
         typename parcelType::template
-            TrackingData<ReactingMultiphaseCloud<CloudType> > td(*this);
+            TrackingData<ReactingMultiphaseCloud<CloudType>> td(*this);
 
         this->solve(td);
     }
@@ -258,7 +258,7 @@ void Foam::ReactingMultiphaseCloud<CloudType>::autoMap
     const mapPolyMesh& mapper
 )
 {
-    typedef typename particle::TrackingData<ReactingMultiphaseCloud<CloudType> >
+    typedef typename particle::TrackingData<ReactingMultiphaseCloud<CloudType>>
         tdType;
 
     tdType td(*this);
diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H
index de157da3437fee70be4bc11fdc3f7bf91321130c..bc846e136e6953c434dba92d13d612c7ad6fb00c 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H
+++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<ReactingMultiphaseCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<ReactingMultiphaseCloud<CloudType>> cloudCopyPtr_;
 
 
     // Private member functions
@@ -110,14 +110,14 @@ protected:
             //- Devolatilisation model
             autoPtr
             <
-                DevolatilisationModel<ReactingMultiphaseCloud<CloudType> >
+                DevolatilisationModel<ReactingMultiphaseCloud<CloudType>>
             >
             devolatilisationModel_;
 
             //- Surface reaction model
             autoPtr
             <
-                SurfaceReactionModel<ReactingMultiphaseCloud<CloudType> >
+                SurfaceReactionModel<ReactingMultiphaseCloud<CloudType>>
             >
             surfaceReactionModel_;
 
@@ -178,18 +178,18 @@ public:
         );
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new ReactingMultiphaseCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new ReactingMultiphaseCloud(this->mesh(), name, *this)
             );
@@ -304,7 +304,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReactingMultiphaseCloud.C"
+    #include "ReactingMultiphaseCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C
index 24c9cc1b9d04cb1e871e5d3713ef53f634ccee19..c0040c77670722cb4c14706177c4c05e57212311 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C
+++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ void Foam::ThermoCloud<CloudType>::setModels()
 {
     heatTransferModel_.reset
     (
-        HeatTransferModel<ThermoCloud<CloudType> >::New
+        HeatTransferModel<ThermoCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -469,7 +469,7 @@ void Foam::ThermoCloud<CloudType>::evolve()
     if (this->solution().canEvolve())
     {
         typename parcelType::template
-            TrackingData<ThermoCloud<CloudType> > td(*this);
+            TrackingData<ThermoCloud<CloudType>> td(*this);
 
         this->solve(td);
     }
@@ -479,7 +479,7 @@ void Foam::ThermoCloud<CloudType>::evolve()
 template<class CloudType>
 void Foam::ThermoCloud<CloudType>::autoMap(const mapPolyMesh& mapper)
 {
-    typedef typename particle::TrackingData<ThermoCloud<CloudType> > tdType;
+    typedef typename particle::TrackingData<ThermoCloud<CloudType>> tdType;
 
     tdType td(*this);
 
diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H
index 4f858d6643c5fd981205d0db20e968f36ffbb87e..441c6d671a85baa5b9b137a254f85e72d314ea36 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H
+++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<ThermoCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<ThermoCloud<CloudType>> cloudCopyPtr_;
 
 
     // Private member functions
@@ -117,7 +117,7 @@ protected:
         // References to the cloud sub-models
 
             //- Heat transfer model
-            autoPtr<HeatTransferModel<ThermoCloud<CloudType> > >
+            autoPtr<HeatTransferModel<ThermoCloud<CloudType>>>
                 heatTransferModel_;
 
 
@@ -133,22 +133,22 @@ protected:
             Switch radiation_;
 
             //- Radiation sum of parcel projected areas
-            autoPtr<DimensionedField<scalar, volMesh> > radAreaP_;
+            autoPtr<DimensionedField<scalar, volMesh>> radAreaP_;
 
             //- Radiation sum of parcel temperature^4
-            autoPtr<DimensionedField<scalar, volMesh> > radT4_;
+            autoPtr<DimensionedField<scalar, volMesh>> radT4_;
 
             //- Radiation sum of parcel projected areas * temperature^4
-            autoPtr<DimensionedField<scalar, volMesh> > radAreaPT4_;
+            autoPtr<DimensionedField<scalar, volMesh>> radAreaPT4_;
 
 
         // Sources
 
             //- Sensible enthalpy transfer [J/kg]
-            autoPtr<DimensionedField<scalar, volMesh> > hsTrans_;
+            autoPtr<DimensionedField<scalar, volMesh>> hsTrans_;
 
             //- Coefficient for carrier phase hs equation [W/K]
-            autoPtr<DimensionedField<scalar, volMesh> > hsCoeff_;
+            autoPtr<DimensionedField<scalar, volMesh>> hsCoeff_;
 
 
     // Protected Member Functions
@@ -192,18 +192,18 @@ public:
         );
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new ThermoCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new ThermoCloud(this->mesh(), name, *this)
             );
@@ -241,7 +241,7 @@ public:
             // Sub-models
 
                 //- Return reference to heat transfer model
-                inline const HeatTransferModel<ThermoCloud<CloudType> >&
+                inline const HeatTransferModel<ThermoCloud<CloudType>>&
                     heatTransfer() const;
 
 
@@ -384,7 +384,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ThermoCloud.C"
+    #include "ThermoCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H
index ceab06a387ad3158546a9b7a497b18e86e5db3b0..d23371cb8213b3b9d03e3bed796e9ad560b24920 100644
--- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H
+++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ inline const Foam::volScalarField& Foam::ThermoCloud<CloudType>::p() const
 
 
 template<class CloudType>
-inline const Foam::HeatTransferModel<Foam::ThermoCloud<CloudType> >&
+inline const Foam::HeatTransferModel<Foam::ThermoCloud<CloudType>>&
 Foam::ThermoCloud<CloudType>::heatTransfer() const
 {
     return heatTransferModel_;
@@ -247,7 +247,7 @@ Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const
         else
         {
             tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(hs, dimEnergy/dimTime));
-            fvScalarMatrix& fvm = tfvm();
+            fvScalarMatrix& fvm = tfvm.ref();
 
             fvm.source() = -hsTrans()/(this->db().time().deltaT());
 
@@ -282,7 +282,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const
 
     if (radiation_)
     {
-        scalarField& Ep = tEp().internalField();
+        scalarField& Ep = tEp.ref().internalField();
         const scalar dt = this->db().time().deltaTValue();
         const scalarField& V = this->mesh().V();
         const scalar epsilon = constProps_.epsilon0();
@@ -318,7 +318,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const
 
     if (radiation_)
     {
-        scalarField& ap = tap().internalField();
+        scalarField& ap = tap.ref().internalField();
         const scalar dt = this->db().time().deltaTValue();
         const scalarField& V = this->mesh().V();
         const scalar epsilon = constProps_.epsilon0();
@@ -355,7 +355,7 @@ Foam::ThermoCloud<CloudType>::sigmap() const
 
     if (radiation_)
     {
-        scalarField& sigmap = tsigmap().internalField();
+        scalarField& sigmap = tsigmap.ref().internalField();
         const scalar dt = this->db().time().deltaTValue();
         const scalarField& V = this->mesh().V();
         const scalar epsilon = constProps_.epsilon0();
diff --git a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H
index 07bcd970b07f501b685ec4fbfdbdbac32fb381fa..b3caba28d26520d800bc3fc4e968a257b719c5ee 100644
--- a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H
+++ b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,12 +85,6 @@ public:
             //- Total linear kinetic energy in the system
             virtual scalar linearKineticEnergyOfSystem() const = 0;
 
-            //- Total rotational kinetic energy in the system
-//            virtual scalar rotationalKineticEnergyOfSystem() const = 0;
-
-            //- Penetration for percentage of the current total mass
-//            virtual scalar penetration(const scalar& fraction) const = 0;
-
             //- Mean diameter Dij
             virtual scalar Dij(const label i, const label j) const = 0;
 
diff --git a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H
index 6335b744b0db46f8ee064f305a07b79cb6fdc1ff..c42e9401e3621e56740c09571eafde4b7616d860 100644
--- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H
+++ b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,7 +40,7 @@ Description
 
 namespace Foam
 {
-    typedef KinematicCloud<Cloud<basicKinematicParcel> > basicKinematicCloud;
+    typedef KinematicCloud<Cloud<basicKinematicParcel>> basicKinematicCloud;
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H
index ae98aae256abef06afc784bc3389be8aff953c7d..5bc6051ccc09c96d692379661f2232f86d144701 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -232,9 +232,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<CollidingParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<CollidingParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<CollidingParcel<ParcelType> >
+                return autoPtr<CollidingParcel<ParcelType>>
                 (
                     new CollidingParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H
index cc5940fcda835fe44a10116fa0dde82b6f3c2e21..f94242542914d7c793f9a07afb1e4af4cb1c3cc7 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,9 +70,9 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
 )
 :
     ParcelType(owner, position, cellI, tetFaceI, tetPtI),
-    f_(vector::zero),
-    angularMomentum_(vector::zero),
-    torque_(vector::zero),
+    f_(Zero),
+    angularMomentum_(Zero),
+    torque_(Zero),
     collisionRecords_()
 {}
 
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C
index 25aee6fa839a62d43308ccb18ede9915ae821490..f0c2007e481455e4785b31f816f993dab8cfac89 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,9 +52,9 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
 )
 :
     ParcelType(mesh, is, readFields),
-    f_(vector::zero),
-    angularMomentum_(vector::zero),
-    torque_(vector::zero),
+    f_(Zero),
+    angularMomentum_(Zero),
+    torque_(Zero),
     collisionRecords_()
 {
     if (readFields)
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C
index d72a7fc49eb82a9e82847189afdaba3594032bb6..d8622ad69a45a71cf8716d99f6721a75cd802494 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -355,7 +355,7 @@ template<class PairType, class WallType>
 void Foam::CollisionRecordList<PairType, WallType>::update()
 {
     {
-        DynamicList<PairCollisionRecord<PairType> > updatedRecords;
+        DynamicList<PairCollisionRecord<PairType>> updatedRecords;
 
         forAll(pairRecords_, i)
         {
@@ -371,7 +371,7 @@ void Foam::CollisionRecordList<PairType, WallType>::update()
     }
 
     {
-        DynamicList<WallCollisionRecord<WallType> > updatedRecords;
+        DynamicList<WallCollisionRecord<WallType>> updatedRecords;
 
         forAll(wallRecords_, i)
         {
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H
index 57546dfc2e50506e123d1f1200fae019bebd6140..44e444dd88fea418a5159c308eb0bac320e75d59 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,10 +80,10 @@ class CollisionRecordList
     // Private data
 
         //- List of active pair collisions
-        DynamicList<PairCollisionRecord<PairType> > pairRecords_;
+        DynamicList<PairCollisionRecord<PairType>> pairRecords_;
 
         //- List of active wall collisions
-        DynamicList<WallCollisionRecord<WallType> > wallRecords_;
+        DynamicList<WallCollisionRecord<WallType>> wallRecords_;
 
 
 public:
@@ -115,11 +115,11 @@ public:
     // Member Functions
 
         //- Return the active pair collisions
-        inline const DynamicList<PairCollisionRecord<PairType> >&
+        inline const DynamicList<PairCollisionRecord<PairType>>&
             pairRecords() const;
 
         //- Return the active wall collisions
-        inline const DynamicList<WallCollisionRecord<WallType> >&
+        inline const DynamicList<WallCollisionRecord<WallType>>&
             wallRecords() const;
 
         // Fields representing the data from each record, i.e if the
@@ -241,7 +241,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CollisionRecordList.C"
+    #include "CollisionRecordList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordListI.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordListI.H
index e2dd165a31b115b320983aa46f5eca31e591ff5b..43170cf91426cb99634219616662e07a621cdfbb 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordListI.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/CollisionRecordListI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class PairType, class WallType>
-const Foam::DynamicList<Foam::PairCollisionRecord<PairType> >&
+const Foam::DynamicList<Foam::PairCollisionRecord<PairType>>&
 Foam::CollisionRecordList<PairType, WallType>::pairRecords() const
 {
     return pairRecords_;
@@ -36,7 +36,7 @@ Foam::CollisionRecordList<PairType, WallType>::pairRecords() const
 
 
 template<class PairType, class WallType>
-const Foam::DynamicList<Foam::WallCollisionRecord<WallType> >&
+const Foam::DynamicList<Foam::WallCollisionRecord<WallType>>&
 Foam::CollisionRecordList<PairType, WallType>::wallRecords() const
 {
     return wallRecords_;
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C
index 572e5a41d012bc903d05bcc6c1d12f03e0aa731b..7f27ff8438aff5fb126a16a1318a85c17cfeea35 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ Foam::PairCollisionRecord<Type>::PairCollisionRecord()
 :
     origProcOfOther_(0),
     origIdOfOther_(-1),
-    data_(pTraits<Type>::zero)
+    data_(Zero)
 {}
 
 
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H
index a60d7f64ab82c212e98b76ad44a682eff0171354..ea189f704bfd57cb6f07ea79d3b17f3420001bc6 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
             bool accessed,
             label origProcOfOther,
             label origIdOfOther,
-            const Type& data = pTraits<Type>::zero
+            const Type& data = Type(Zero)
         );
 
         //- Construct from Istream
@@ -122,7 +122,7 @@ public:
 
 
     //- Destructor
-        ~PairCollisionRecord();
+    ~PairCollisionRecord();
 
 
     // Member Functions
@@ -211,7 +211,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PairCollisionRecord.C"
+    #include "PairCollisionRecord.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C
index 3e4470eaf3fdc1044c35c77e9cdd5978a183a890..ed533633f0fa062ea14511ccca469ffb19f0779b 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ Foam::WallCollisionRecord<Type>::WallCollisionRecord()
 :
     accessed_(false),
     pRel_(),
-    data_(pTraits<Type>::zero)
+    data_(Zero)
 {}
 
 
diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H
index 7bbd40de33cc5b405e5c47b93b8a946dc5f49cee..7b29f50b37e91ffd2b9495f99c5d35145c2476af 100644
--- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H
+++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ public:
         (
             bool accessed,
             const vector& pRel,
-            const Type& data = pTraits<Type>::zero
+            const Type& data = Type(Zero)
         );
 
         //- Construct from Istream
@@ -201,7 +201,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WallCollisionRecord.C"
+    #include "WallCollisionRecord.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
index 8595876eb41f22ce1c9ca4feb581dedeecce3015..62f5d501624ff42c224717bd4ee589c25e22ef3a 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,13 +114,13 @@ void Foam::KinematicParcel<ParcelType>::calc
     //~~~~~~~~
 
     // Explicit momentum source for particle
-    vector Su = vector::zero;
+    vector Su = Zero;
 
     // Linearised momentum source coefficient
     scalar Spu = 0.0;
 
     // Momentum transfer from the particle to the carrier phase
-    vector dUTrans = vector::zero;
+    vector dUTrans = Zero;
 
 
     // Motion
diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
index 85d48c5982ffd1f4013728afb950f20b4dc673af..864bbb1bbd2b18de9f4ba86212bb6e68579c1d2b 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,13 +173,13 @@ public:
             // Interpolators for continuous phase fields
 
                 //- Density interpolator
-                autoPtr<interpolation<scalar> > rhoInterp_;
+                autoPtr<interpolation<scalar>> rhoInterp_;
 
                 //- Velocity interpolator
-                autoPtr<interpolation<vector> > UInterp_;
+                autoPtr<interpolation<vector>> UInterp_;
 
                 //- Dynamic viscosity interpolator
-                autoPtr<interpolation<scalar> > muInterp_;
+                autoPtr<interpolation<scalar>> muInterp_;
 
 
             //- Local gravitational or other body-force acceleration
@@ -386,9 +386,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<KinematicParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<KinematicParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<KinematicParcel<ParcelType> >
+                return autoPtr<KinematicParcel<ParcelType>>
                 (
                     new KinematicParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H
index 2f998dd3a124dacdf7ee0f8714b0a37b57d9db60..ca445b3f647c422ddd2553d22175b0c4a80ec13c 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,13 +85,13 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
     nParticle_(0),
     d_(0.0),
     dTarget_(0.0),
-    U_(vector::zero),
+    U_(Zero),
     rho_(0.0),
     age_(0.0),
     tTurb_(0.0),
-    UTurb_(vector::zero),
+    UTurb_(Zero),
     rhoc_(0.0),
-    Uc_(vector::zero),
+    Uc_(Zero),
     muc_(0.0)
 {}
 
@@ -122,9 +122,9 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
     rho_(constProps.rho0()),
     age_(0.0),
     tTurb_(0.0),
-    UTurb_(vector::zero),
+    UTurb_(Zero),
     rhoc_(0.0),
-    Uc_(vector::zero),
+    Uc_(Zero),
     muc_(0.0)
 {}
 
diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C
index 79ef7f29fa88c30b15bdb6f547e1dd14722eccd5..9015582842965a531f7a9a96043ca8866bcdae37 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,13 +58,13 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
     nParticle_(0.0),
     d_(0.0),
     dTarget_(0.0),
-    U_(vector::zero),
+    U_(Zero),
     rho_(0.0),
     age_(0.0),
     tTurb_(0.0),
-    UTurb_(vector::zero),
+    UTurb_(Zero),
     rhoc_(0.0),
-    Uc_(vector::zero),
+    Uc_(Zero),
     muc_(0.0)
 {
     if (readFields)
diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H
index b4d6573ea4a7b1120eef6112151bae47458a9990..38c2ceb4e41bed7f65a2c1ca18094d9313bbdb12 100644
--- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,25 +105,25 @@ public:
             // MPPIC Averages
 
                 //- Volume average
-                autoPtr<AveragingMethod<scalar> > volumeAverage_;
+                autoPtr<AveragingMethod<scalar>> volumeAverage_;
 
                 //- Radius average [ volume^(1/3) ]
-                autoPtr<AveragingMethod<scalar> > radiusAverage_;
+                autoPtr<AveragingMethod<scalar>> radiusAverage_;
 
                 //- Density average
-                autoPtr<AveragingMethod<scalar> > rhoAverage_;
+                autoPtr<AveragingMethod<scalar>> rhoAverage_;
 
                 //- Velocity average
-                autoPtr<AveragingMethod<vector> > uAverage_;
+                autoPtr<AveragingMethod<vector>> uAverage_;
 
                 //- Magnitude velocity sqyuared average
-                autoPtr<AveragingMethod<scalar> > uSqrAverage_;
+                autoPtr<AveragingMethod<scalar>> uSqrAverage_;
 
                 //- Frequency average
-                autoPtr<AveragingMethod<scalar> > frequencyAverage_;
+                autoPtr<AveragingMethod<scalar>> frequencyAverage_;
 
                 //- Mass average
-                autoPtr<AveragingMethod<scalar> > massAverage_;
+                autoPtr<AveragingMethod<scalar>> massAverage_;
 
 
             //- Label specifying the current part of the tracking process
@@ -248,9 +248,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<MPPICParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<MPPICParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<MPPICParcel<ParcelType> >
+                return autoPtr<MPPICParcel<ParcelType>>
                 (
                     new MPPICParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H
index ab01a6421d0d1df011c253368faaab6411ab2fe5..1311ee5bab1003a747fc65466e619fa8fb3d7ed2 100644
--- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H
+++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel
 )
 :
     ParcelType(owner, position, cellI, tetFaceI, tetPtI),
-    UCorrect_(vector::zero)
+    UCorrect_(Zero)
 {}
 
 
diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelIO.C
index 78ec2af314fe7d7eee1d566c7cbae52a93918ec1..ab4eb3e0c90c9bad0ef9105d1b7c58171d1fedbe 100644
--- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelIO.C
+++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ Foam::MPPICParcel<ParcelType>::MPPICParcel
 )
 :
     ParcelType(mesh, is, readFields),
-    UCorrect_(vector::zero)
+    UCorrect_(Zero)
 {
     if (readFields)
     {
diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelTrackingDataI.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelTrackingDataI.H
index 4f5edcc47e5e7398bf9ad74d9d0214b6f7d76fb7..2be585ba414194850767c77be4affaa7695ca4b2 100644
--- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelTrackingDataI.H
+++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelTrackingDataI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -150,13 +150,13 @@ Foam::MPPICParcel<ParcelType>::TrackingData<CloudType>::updateAverages
     volumeAverage_() = 0;
     radiusAverage_() = 0;
     rhoAverage_() = 0;
-    uAverage_() = vector::zero;
+    uAverage_() = Zero;
     uSqrAverage_() = 0;
     frequencyAverage_() = 0;
     massAverage_() = 0;
 
     // temporary weights
-    autoPtr<AveragingMethod<scalar> > weightAveragePtr
+    autoPtr<AveragingMethod<scalar>> weightAveragePtr
     (
         AveragingMethod<scalar>::New
         (
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C
index 5516e7c9476bf3f946865b0fd0f9aef62b678572..a85916cdb09fbd132276b2ddb7aa85bb63480c4d 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -202,13 +202,13 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
     //~~~~~~~~
 
     // Explicit momentum source for particle
-    vector Su = vector::zero;
+    vector Su = Zero;
 
     // Linearised momentum source coefficient
     scalar Spu = 0.0;
 
     // Momentum transfer from the particle to the carrier phase
-    vector dUTrans = vector::zero;
+    vector dUTrans = Zero;
 
     // Explicit enthalpy source for particle
     scalar Sh = 0.0;
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H
index 4539dc3cb292568ffdd0159602b9b178f2c2d378..b431e368662e87d9d535ec707a92db635c4b8dd8 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -348,12 +348,12 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<ReactingMultiphaseParcel<ParcelType> > operator()
+            autoPtr<ReactingMultiphaseParcel<ParcelType>> operator()
             (
                 Istream& is
             ) const
             {
-                return autoPtr<ReactingMultiphaseParcel<ParcelType> >
+                return autoPtr<ReactingMultiphaseParcel<ParcelType>>
                 (
                     new ReactingMultiphaseParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C
index 77dd06b7b80af5709fada338d41cebe7350b9209..e219f5ee95953f704fb204b370ea9c3aaa737f34 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
     const wordList& stateLabels = compModel.stateLabels();
 
     // Set storage for each Y... for each parcel
-    forAllIter(typename Cloud<ReactingMultiphaseParcel<ParcelType> >, c, iter)
+    forAllIter(typename Cloud<ReactingMultiphaseParcel<ParcelType>>, c, iter)
     {
         ReactingMultiphaseParcel<ParcelType>& p = iter();
         p.YGas_.setSize(gasNames.size(), 0.0);
@@ -148,7 +148,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
         label i = 0;
         forAllIter
         (
-            typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
+            typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
             c,
             iter
         )
@@ -172,7 +172,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
         label i = 0;
         forAllIter
         (
-            typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
+            typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
             c,
             iter
         )
@@ -196,7 +196,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
         label i = 0;
         forAllIter
         (
-            typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
+            typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
             c,
             iter
         )
@@ -250,7 +250,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
             label i = 0;
             forAllConstIter
             (
-                typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
+                typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
                 c,
                 iter
             )
@@ -279,7 +279,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
             label i = 0;
             forAllConstIter
             (
-                typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
+                typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
                 c,
                 iter
             )
@@ -308,7 +308,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
             label i = 0;
             forAllConstIter
             (
-                typename Cloud<ReactingMultiphaseParcel<ParcelType> >,
+                typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
                 c,
                 iter
             )
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C
index b5b7f1cf1fc13211f4e5ed4c01eb72efd0a34a1f..2480f736497063827b73cdf8473e0f0001b8fb40 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -416,13 +416,13 @@ void Foam::ReactingParcel<ParcelType>::calc
     // ~~~~~~~
 
     // Explicit momentum source for particle
-    vector Su = vector::zero;
+    vector Su = Zero;
 
     // Linearised momentum source coefficient
     scalar Spu = 0.0;
 
     // Momentum transfer from the particle to the carrier phase
-    vector dUTrans = vector::zero;
+    vector dUTrans = Zero;
 
     // Explicit enthalpy source for particle
     scalar Sh = 0.0;
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
index c077a29bb44b87f53a1f931cbce4472081ea423a..a89bc9c4cf7dd193b5d4248821e383227e1e879b 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ public:
             // Interpolators for continuous phase fields
 
                 //- Interpolator for continuous phase pressure field
-                autoPtr<interpolation<scalar> > pInterp_;
+                autoPtr<interpolation<scalar>> pInterp_;
 
 
     public:
@@ -301,9 +301,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<ReactingParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<ReactingParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<ReactingParcel<ParcelType> >
+                return autoPtr<ReactingParcel<ParcelType>>
                 (
                     new ReactingParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C
index 4a1133accf49d394a47765678ca15d4314b9a634..f0254656cfbe6c491285542220daccbdc5f6ca6b 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
     c.checkFieldIOobject(c, mass0);
 
     label i = 0;
-    forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
+    forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
     {
         ReactingParcel<ParcelType>& p = iter();
         p.mass0_ = mass0[i++];
@@ -133,7 +133,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
 
 
     // Set storage for each Y... for each parcel
-    forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
+    forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
     {
         ReactingParcel<ParcelType>& p = iter();
         p.Y_.setSize(nPhases, 0.0);
@@ -152,7 +152,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
         );
 
         label i = 0;
-        forAllIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
+        forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
         {
             ReactingParcel<ParcelType>& p = iter();
             p.Y_[j] = Y[i++];
@@ -186,7 +186,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
         IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
 
         label i = 0;
-        forAllConstIter(typename Cloud<ReactingParcel<ParcelType> >, c, iter)
+        forAllConstIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
         {
             const ReactingParcel<ParcelType>& p = iter();
             mass0[i++] = p.mass0_;
@@ -215,7 +215,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
             label i = 0;
             forAllConstIter
             (
-                typename Cloud<ReactingParcel<ParcelType> >,
+                typename Cloud<ReactingParcel<ParcelType>>,
                 c,
                 iter
             )
diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
index 98e0c16756fb069908f84eea22e689effee66f1d..988324f80158a8a049f7a6407c5ab5c9d5439a65 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
+++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,13 +166,13 @@ void Foam::ThermoParcel<ParcelType>::calc
     // ~~~~~~~
 
     // Explicit momentum source for particle
-    vector Su = vector::zero;
+    vector Su = Zero;
 
     // Linearised momentum source coefficient
     scalar Spu = 0.0;
 
     // Momentum transfer from the particle to the carrier phase
-    vector dUTrans = vector::zero;
+    vector dUTrans = Zero;
 
     // Explicit enthalpy source for particle
     scalar Sh = 0.0;
diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
index 47424b0820bbf481c2b82d5dc4147c89d74b74a8..3ea797ff8d8eeb7451a42103268c77b38b15ca54 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,16 +167,16 @@ public:
             // Interpolators for continuous phase fields
 
                 //- Temperature field interpolator
-                autoPtr<interpolation<scalar> > TInterp_;
+                autoPtr<interpolation<scalar>> TInterp_;
 
                 //- Specific heat capacity field interpolator
-                autoPtr<interpolation<scalar> > CpInterp_;
+                autoPtr<interpolation<scalar>> CpInterp_;
 
                 //- Thermal conductivity field interpolator
-                autoPtr<interpolation<scalar> > kappaInterp_;
+                autoPtr<interpolation<scalar>> kappaInterp_;
 
                 //- Radiation field interpolator
-                autoPtr<interpolation<scalar> > GInterp_;
+                autoPtr<interpolation<scalar>> GInterp_;
 
 
     public:
@@ -349,9 +349,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<ThermoParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<ThermoParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<ThermoParcel<ParcelType> >
+                return autoPtr<ThermoParcel<ParcelType>>
                 (
                     new ThermoParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C
index 0cf0be0bb61e3cc36c54d5429acfdd1f10fec107..93e60505b81ff7e4df92aea2ef72483ac2f417c2 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C
+++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ void Foam::ThermoParcel<ParcelType>::readFields(CloudType& c)
 
 
     label i = 0;
-    forAllIter(typename Cloud<ThermoParcel<ParcelType> >, c, iter)
+    forAllIter(typename Cloud<ThermoParcel<ParcelType>>, c, iter)
     {
         ThermoParcel<ParcelType>& p = iter();
 
@@ -119,7 +119,7 @@ void Foam::ThermoParcel<ParcelType>::writeFields(const CloudType& c)
     IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np);
 
     label i = 0;
-    forAllConstIter(typename Cloud<ThermoParcel<ParcelType> >, c, iter)
+    forAllConstIter(typename Cloud<ThermoParcel<ParcelType>>, c, iter)
     {
         const ThermoParcel<ParcelType>& p = iter();
 
diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicCollidingParcel/basicKinematicCollidingParcel.H b/src/lagrangian/intermediate/parcels/derived/basicKinematicCollidingParcel/basicKinematicCollidingParcel.H
index 7207cba0f69b5e74299e320d729d826607c83cf5..80317598acf80807ce590c31d728d7125b7086cc 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicKinematicCollidingParcel/basicKinematicCollidingParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicCollidingParcel/basicKinematicCollidingParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ SourceFiles
 
 namespace Foam
 {
-    typedef CollidingParcel<KinematicParcel<particle> >
+    typedef CollidingParcel<KinematicParcel<particle>>
         basicKinematicCollidingParcel;
 
     template<>
diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H b/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H
index d72dd5366142fb4795085b2eb00192ab30351fd2..894c10c986306232a6983c4aad96677bcf6af3e6 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicMPPICParcel/basicKinematicMPPICParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ SourceFiles
 
 namespace Foam
 {
-    typedef MPPICParcel<KinematicParcel<particle> > basicKinematicMPPICParcel;
+    typedef MPPICParcel<KinematicParcel<particle>> basicKinematicMPPICParcel;
 
     template<>
     inline bool contiguous<basicKinematicMPPICParcel>()
diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H
index e1fe62df4d7f47eede769908d0b4a3637f25a237..1a1c45954e63dddf563ab35b50f8c3faa284a106 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ SourceFiles
 
 namespace Foam
 {
-    typedef ReactingParcel<ThermoParcel<KinematicParcel<particle> > >
+    typedef ReactingParcel<ThermoParcel<KinematicParcel<particle>>>
         basicReactingParcel;
 
     template<>
diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H
index c7778ac1cfe8d76e2f4ab676c41820703b2966e6..31e8f6f4f67ce72df8754841ae592557900f5a9c 100644
--- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H
+++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ SourceFiles
 
 namespace Foam
 {
-    typedef ThermoParcel<KinematicParcel<particle> > basicThermoParcel;
+    typedef ThermoParcel<KinematicParcel<particle>> basicThermoParcel;
 
     template<>
     inline bool contiguous<basicThermoParcel>()
diff --git a/src/lagrangian/intermediate/parcels/include/makeMPPICParcelDampingModels.H b/src/lagrangian/intermediate/parcels/include/makeMPPICParcelDampingModels.H
index 61011a66a6bfff53d77e9b02fa9195ba6a3d8e96..fc7361fb7b47d7b16915bca2284d2232f936cf9d 100644
--- a/src/lagrangian/intermediate/parcels/include/makeMPPICParcelDampingModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeMPPICParcelDampingModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,11 +34,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeMPPICParcelDampingModels(CloudType)                               \
-                                                                              \
-    makeDampingModel(CloudType);                                              \
-                                                                              \
-    makeDampingModelType(NoDamping, CloudType);                               \
+#define makeMPPICParcelDampingModels(CloudType)                                \
+                                                                               \
+    makeDampingModel(CloudType);                                               \
+                                                                               \
+    makeDampingModelType(NoDamping, CloudType);                                \
     makeDampingModelType(Relaxation, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeMPPICParcelIsotropyModels.H b/src/lagrangian/intermediate/parcels/include/makeMPPICParcelIsotropyModels.H
index 0780a03d6bde746e9a9eff1ce26f2c26e7cbcaf1..b84189e225483d7878057dc777e66c89c9ac1860 100644
--- a/src/lagrangian/intermediate/parcels/include/makeMPPICParcelIsotropyModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeMPPICParcelIsotropyModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,11 +33,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeMPPICParcelIsotropyModels(CloudType)                              \
-                                                                              \
-    makeIsotropyModel(CloudType);                                             \
-                                                                              \
-    makeIsotropyModelType(NoIsotropy, CloudType);                             \
+#define makeMPPICParcelIsotropyModels(CloudType)                               \
+                                                                               \
+    makeIsotropyModel(CloudType);                                              \
+                                                                               \
+    makeIsotropyModelType(NoIsotropy, CloudType);                              \
     makeIsotropyModelType(Stochastic, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeMPPICParcelPackingModels.H b/src/lagrangian/intermediate/parcels/include/makeMPPICParcelPackingModels.H
index cdcbf17aa87e6028e96c5293668b09186e7dac1d..b7ff5714ea3e3e0945b484860966ca0490b02272 100644
--- a/src/lagrangian/intermediate/parcels/include/makeMPPICParcelPackingModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeMPPICParcelPackingModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,12 +34,12 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeMPPICParcelPackingModels(CloudType)                               \
-                                                                              \
-    makePackingModel(CloudType);                                              \
-                                                                              \
-    makePackingModelType(NoPacking, CloudType);                               \
-    makePackingModelType(Explicit, CloudType);                                \
+#define makeMPPICParcelPackingModels(CloudType)                                \
+                                                                               \
+    makePackingModel(CloudType);                                               \
+                                                                               \
+    makePackingModelType(NoPacking, CloudType);                                \
+    makePackingModelType(Explicit, CloudType);                                 \
     makePackingModelType(Implicit, CloudType);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H b/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H
index a181ae19b15e223e4f1d9402cbcb5b40a16d1ef4..e56970999cf007c8c48b59a7de98ad56862ec63e 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,17 +39,16 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelCloudFunctionObjects(CloudType)                             \
-                                                                              \
-    makeCloudFunctionObject(CloudType);                                       \
-                                                                              \
-    makeCloudFunctionObjectType(CloudToVTK, CloudType);                       \
-    makeCloudFunctionObjectType(FacePostProcessing, CloudType);               \
-    makeCloudFunctionObjectType(ParticleCollector, CloudType);                \
-    makeCloudFunctionObjectType(ParticleErosion, CloudType);                  \
-    makeCloudFunctionObjectType(ParticleTracks, CloudType);                   \
-    makeCloudFunctionObjectType(ParticleTrap, CloudType);                     \
-    makeCloudFunctionObjectType(PatchPostProcessing, CloudType);              \
+#define makeParcelCloudFunctionObjects(CloudType)                              \
+                                                                               \
+    makeCloudFunctionObject(CloudType);                                        \
+                                                                               \
+    makeCloudFunctionObjectType(FacePostProcessing, CloudType);                \
+    makeCloudFunctionObjectType(ParticleCollector, CloudType);                 \
+    makeCloudFunctionObjectType(ParticleErosion, CloudType);                   \
+    makeCloudFunctionObjectType(ParticleTracks, CloudType);                    \
+    makeCloudFunctionObjectType(ParticleTrap, CloudType);                      \
+    makeCloudFunctionObjectType(PatchPostProcessing, CloudType);               \
     makeCloudFunctionObjectType(VoidFraction, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelCollisionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelCollisionModels.H
index ae5688c765e6bdbb6acc888d82b347ae96422932..62501a9f08c53ca54ee2f7f892060fa0661b6492 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelCollisionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelCollisionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,17 +38,17 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelCollisionModels(CloudType)                                  \
-                                                                              \
-    makeCollisionModel(CloudType);                                            \
-    makeCollisionModelType(NoCollision, CloudType);                           \
-    makeCollisionModelType(PairCollision, CloudType);                         \
-                                                                              \
-    makePairModel(CloudType);                                                 \
-    makePairModelType(PairSpringSliderDashpot, CloudType);                    \
-                                                                              \
-    makeWallModel(CloudType);                                                 \
-    makeWallModelType(WallSpringSliderDashpot, CloudType);                    \
+#define makeParcelCollisionModels(CloudType)                                   \
+                                                                               \
+    makeCollisionModel(CloudType);                                             \
+    makeCollisionModelType(NoCollision, CloudType);                            \
+    makeCollisionModelType(PairCollision, CloudType);                          \
+                                                                               \
+    makePairModel(CloudType);                                                  \
+    makePairModelType(PairSpringSliderDashpot, CloudType);                     \
+                                                                               \
+    makeWallModel(CloudType);                                                  \
+    makeWallModelType(WallSpringSliderDashpot, CloudType);                     \
     makeWallModelType(WallLocalSpringSliderDashpot, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H
index fac015c7e8977910848356f77d7ebb71fb77e50c..855d307277a4ad2389b604523be19aebc026b3b5 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelDispersionModels(CloudType)                                 \
-                                                                              \
-    makeDispersionModel(CloudType);                                           \
+#define makeParcelDispersionModels(CloudType)                                  \
+                                                                               \
+    makeDispersionModel(CloudType);                                            \
     makeDispersionModelType(NoDispersion, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelForces.H b/src/lagrangian/intermediate/parcels/include/makeParcelForces.H
index 47486897ba39c45fb87706eaf0ce026efb7c056f..bab2f42a9c5a41d228c8df3aa7f207da2db681c7 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelForces.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelForces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,21 +46,21 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelForces(CloudType)                                           \
-                                                                              \
-    makeParticleForceModel(CloudType);                                        \
-    makeParticleForceModelType(SphereDragForce, CloudType);                   \
-    makeParticleForceModelType(NonSphereDragForce, CloudType);                \
-    makeParticleForceModelType(WenYuDragForce, CloudType);                    \
-    makeParticleForceModelType(ErgunWenYuDragForce, CloudType);               \
-    makeParticleForceModelType(PlessisMasliyahDragForce, CloudType);          \
-    makeParticleForceModelType(SaffmanMeiLiftForce, CloudType);               \
-    makeParticleForceModelType(TomiyamaLiftForce, CloudType);                 \
-    makeParticleForceModelType(GravityForce, CloudType);                      \
-    makeParticleForceModelType(NonInertialFrameForce, CloudType);             \
-    makeParticleForceModelType(ParamagneticForce, CloudType);                 \
-    makeParticleForceModelType(PressureGradientForce, CloudType);             \
-    makeParticleForceModelType(SRFForce, CloudType);                          \
+#define makeParcelForces(CloudType)                                            \
+                                                                               \
+    makeParticleForceModel(CloudType);                                         \
+    makeParticleForceModelType(SphereDragForce, CloudType);                    \
+    makeParticleForceModelType(NonSphereDragForce, CloudType);                 \
+    makeParticleForceModelType(WenYuDragForce, CloudType);                     \
+    makeParticleForceModelType(ErgunWenYuDragForce, CloudType);                \
+    makeParticleForceModelType(PlessisMasliyahDragForce, CloudType);           \
+    makeParticleForceModelType(SaffmanMeiLiftForce, CloudType);                \
+    makeParticleForceModelType(TomiyamaLiftForce, CloudType);                  \
+    makeParticleForceModelType(GravityForce, CloudType);                       \
+    makeParticleForceModelType(NonInertialFrameForce, CloudType);              \
+    makeParticleForceModelType(ParamagneticForce, CloudType);                  \
+    makeParticleForceModelType(PressureGradientForce, CloudType);              \
+    makeParticleForceModelType(SRFForce, CloudType);                           \
     makeParticleForceModelType(VirtualMassForce, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H
index 0ef9ff98dffe6ccd87bffc8ef4c34008842b35d0..d81765d88c632d25dbd8b3db028a8720ab2ab3d9 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,11 +33,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelHeatTransferModels(CloudType)                               \
-                                                                              \
-    makeHeatTransferModel(CloudType);                                         \
-                                                                              \
-    makeHeatTransferModelType(NoHeatTransfer, CloudType);                     \
+#define makeParcelHeatTransferModels(CloudType)                                \
+                                                                               \
+    makeHeatTransferModel(CloudType);                                          \
+                                                                               \
+    makeHeatTransferModelType(NoHeatTransfer, CloudType);                      \
     makeHeatTransferModelType(RanzMarshall, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H
index 07b00f8d936c04a828635fd23917f7042b0a9731..d8136ca4c56eeaf41274db342a4174c327dcc1ca 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,19 +41,19 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelInjectionModels(CloudType)                                  \
-                                                                              \
-    makeInjectionModel(CloudType);                                            \
-                                                                              \
-    makeInjectionModelType(CellZoneInjection, CloudType);                     \
-    makeInjectionModelType(ConeInjection, CloudType);                         \
-    makeInjectionModelType(ConeNozzleInjection, CloudType);                   \
-    makeInjectionModelType(FieldActivatedInjection, CloudType);               \
-    makeInjectionModelType(InflationInjection, CloudType);                    \
-    makeInjectionModelType(KinematicLookupTableInjection, CloudType);         \
-    makeInjectionModelType(ManualInjection, CloudType);                       \
-    makeInjectionModelType(NoInjection, CloudType);                           \
-    makeInjectionModelType(PatchInjection, CloudType);                        \
+#define makeParcelInjectionModels(CloudType)                                   \
+                                                                               \
+    makeInjectionModel(CloudType);                                             \
+                                                                               \
+    makeInjectionModelType(CellZoneInjection, CloudType);                      \
+    makeInjectionModelType(ConeInjection, CloudType);                          \
+    makeInjectionModelType(ConeNozzleInjection, CloudType);                    \
+    makeInjectionModelType(FieldActivatedInjection, CloudType);                \
+    makeInjectionModelType(InflationInjection, CloudType);                     \
+    makeInjectionModelType(KinematicLookupTableInjection, CloudType);          \
+    makeInjectionModelType(ManualInjection, CloudType);                        \
+    makeInjectionModelType(NoInjection, CloudType);                            \
+    makeInjectionModelType(PatchInjection, CloudType);                         \
     makeInjectionModelType(PatchFlowRateInjection, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H
index 16d163ed8ed851ff0209fd57ef04847656a7236d..3f53216a3f81f7a9f07329bdfa8702b8d2e883a5 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,14 +36,14 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelPatchInteractionModels(CloudType)                           \
-                                                                              \
-    makePatchInteractionModel(CloudType);                                     \
-                                                                              \
-    makePatchInteractionModelType(LocalInteraction, CloudType);               \
-    makePatchInteractionModelType(NoInteraction, CloudType);                  \
-    makePatchInteractionModelType(Rebound, CloudType);                        \
-    makePatchInteractionModelType(StandardWallInteraction, CloudType);        \
+#define makeParcelPatchInteractionModels(CloudType)                            \
+                                                                               \
+    makePatchInteractionModel(CloudType);                                      \
+                                                                               \
+    makePatchInteractionModelType(LocalInteraction, CloudType);                \
+    makePatchInteractionModelType(NoInteraction, CloudType);                   \
+    makePatchInteractionModelType(Rebound, CloudType);                         \
+    makePatchInteractionModelType(StandardWallInteraction, CloudType);         \
     makePatchInteractionModelType(MultiInteraction, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelStochasticCollisionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelStochasticCollisionModels.H
index d661155657fb0c0eb38c778bd5aaf34c44402549..8a4eb6dfb7ec21f601d25e5a599bce9e68be2e20 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelStochasticCollisionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelStochasticCollisionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelStochasticCollisionModels(CloudType)                        \
-                                                                              \
-    makeStochasticCollisionModel(CloudType);                                  \
+#define makeParcelStochasticCollisionModels(CloudType)                         \
+                                                                               \
+    makeStochasticCollisionModel(CloudType);                                   \
     makeStochasticCollisionModelType(NoStochasticCollision, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H
index bb233574715e2c47dab453b977136f2b9acf74e7..717acab45880737160f8f1de9eed3e464317d6a7 100644
--- a/src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelSurfaceFilmModels(CloudType)                                \
-                                                                              \
-    makeSurfaceFilmModel(CloudType);                                          \
+#define makeParcelSurfaceFilmModels(CloudType)                                 \
+                                                                               \
+    makeSurfaceFilmModel(CloudType);                                           \
     makeSurfaceFilmModelType(NoSurfaceFilm, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H
index 1e518d61d700d6de53987da225d25191fb04d09d..01fa83d79b5b7c354a9f5ce20b2697fb57e6e4fe 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,10 +33,10 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingMultiphaseParcelCompositionModels(CloudType)              \
-                                                                              \
-    makeCompositionModel(CloudType);                                          \
-    makeCompositionModelType(NoComposition, CloudType);                       \
+#define makeReactingMultiphaseParcelCompositionModels(CloudType)               \
+                                                                               \
+    makeCompositionModel(CloudType);                                           \
+    makeCompositionModelType(NoComposition, CloudType);                        \
     makeCompositionModelType(SingleMixtureFraction, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H
index 3c2cc8bc27673e1d359a4f01c866cd656e2231de..3ba75db83f3d9cec6ccd31c9d5445c782435b94d 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,15 +34,15 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingMultiphaseParcelDevolatilisationModels(CloudType)         \
-                                                                              \
-    makeDevolatilisationModel(CloudType);                                     \
-    makeDevolatilisationModelType(ConstantRateDevolatilisation, CloudType);   \
-    makeDevolatilisationModelType(NoDevolatilisation, CloudType);             \
-    makeDevolatilisationModelType                                             \
-    (                                                                         \
-        SingleKineticRateDevolatilisation,                                    \
-        CloudType                                                             \
+#define makeReactingMultiphaseParcelDevolatilisationModels(CloudType)          \
+                                                                               \
+    makeDevolatilisationModel(CloudType);                                      \
+    makeDevolatilisationModelType(ConstantRateDevolatilisation, CloudType);    \
+    makeDevolatilisationModelType(NoDevolatilisation, CloudType);              \
+    makeDevolatilisationModelType                                              \
+    (                                                                          \
+        SingleKineticRateDevolatilisation,                                     \
+        CloudType                                                              \
     );
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H
index 711f88459feea3eb262b39b10c7b80bea111b368..fe2608b5f21bece6979e7cb28b0e3faff363a118 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,17 +40,17 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingMultiphaseParcelInjectionModels(CloudType)                \
-                                                                              \
-    makeInjectionModel(CloudType);                                            \
-    makeInjectionModelType(CellZoneInjection, CloudType);                     \
-    makeInjectionModelType(ConeInjection, CloudType);                         \
-    makeInjectionModelType(ConeNozzleInjection, CloudType);                   \
-    makeInjectionModelType(FieldActivatedInjection, CloudType);               \
-    makeInjectionModelType(ManualInjection, CloudType);                       \
-    makeInjectionModelType(NoInjection, CloudType);                           \
-    makeInjectionModelType(PatchInjection, CloudType);                        \
-    makeInjectionModelType(PatchFlowRateInjection, CloudType);                \
+#define makeReactingMultiphaseParcelInjectionModels(CloudType)                 \
+                                                                               \
+    makeInjectionModel(CloudType);                                             \
+    makeInjectionModelType(CellZoneInjection, CloudType);                      \
+    makeInjectionModelType(ConeInjection, CloudType);                          \
+    makeInjectionModelType(ConeNozzleInjection, CloudType);                    \
+    makeInjectionModelType(FieldActivatedInjection, CloudType);                \
+    makeInjectionModelType(ManualInjection, CloudType);                        \
+    makeInjectionModelType(NoInjection, CloudType);                            \
+    makeInjectionModelType(PatchInjection, CloudType);                         \
+    makeInjectionModelType(PatchFlowRateInjection, CloudType);                 \
     makeInjectionModelType(ReactingMultiphaseLookupTableInjection, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelStochasticCollisionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelStochasticCollisionModels.H
index ea8436b119d0c55cc3e26f23569bcd8afdb012ea..74f6267648b658e37325ec9f34b5f4f222546ce8 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelStochasticCollisionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelStochasticCollisionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,10 +33,10 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingMultiphaseParcelStochasticCollisionModels(CloudType)      \
-                                                                              \
-    makeStochasticCollisionModel(CloudType);                                  \
-    makeStochasticCollisionModelType(NoStochasticCollision, CloudType);       \
+#define makeReactingMultiphaseParcelStochasticCollisionModels(CloudType)       \
+                                                                               \
+    makeStochasticCollisionModel(CloudType);                                   \
+    makeStochasticCollisionModelType(NoStochasticCollision, CloudType);        \
     makeStochasticCollisionModelType(SuppressionCollision, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H
index 95249a6a573ac8bf29c1200553b873629b507534..9eea5af471763a242d92723d93ff2d230b25890a 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,9 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingMultiphaseParcelSurfaceReactionModels(CloudType)          \
-                                                                              \
-    makeSurfaceReactionModel(CloudType);                                      \
+#define makeReactingMultiphaseParcelSurfaceReactionModels(CloudType)           \
+                                                                               \
+    makeSurfaceReactionModel(CloudType);                                       \
     makeSurfaceReactionModelType(NoSurfaceReaction, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H
index c8a17037d474416fbcf3f1943a3bfa96a4a62de2..f17cfc55589d576c664fbe8c82f59b1b8e1084b9 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,10 +33,10 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingParcelCompositionModels(CloudType)                        \
-                                                                              \
-    makeCompositionModel(CloudType);                                          \
-    makeCompositionModelType(NoComposition, CloudType);                       \
+#define makeReactingParcelCompositionModels(CloudType)                         \
+                                                                               \
+    makeCompositionModel(CloudType);                                           \
+    makeCompositionModelType(NoComposition, CloudType);                        \
     makeCompositionModelType(SinglePhaseMixture, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H
index 5fb4c6d56258f246e3a08eee1b17adc732bf5045..6ede4d483c36244da10ad8e0f32d8bde63d76e92 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,17 +40,17 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingParcelInjectionModels(CloudType)                          \
-                                                                              \
-    makeInjectionModel(CloudType);                                            \
-    makeInjectionModelType(CellZoneInjection, CloudType);                     \
-    makeInjectionModelType(ConeInjection, CloudType);                         \
-    makeInjectionModelType(ConeNozzleInjection, CloudType);                   \
-    makeInjectionModelType(FieldActivatedInjection, CloudType);               \
-    makeInjectionModelType(ManualInjection, CloudType);                       \
-    makeInjectionModelType(NoInjection, CloudType);                           \
-    makeInjectionModelType(PatchInjection, CloudType);                        \
-    makeInjectionModelType(PatchFlowRateInjection, CloudType);                \
+#define makeReactingParcelInjectionModels(CloudType)                           \
+                                                                               \
+    makeInjectionModel(CloudType);                                             \
+    makeInjectionModelType(CellZoneInjection, CloudType);                      \
+    makeInjectionModelType(ConeInjection, CloudType);                          \
+    makeInjectionModelType(ConeNozzleInjection, CloudType);                    \
+    makeInjectionModelType(FieldActivatedInjection, CloudType);                \
+    makeInjectionModelType(ManualInjection, CloudType);                        \
+    makeInjectionModelType(NoInjection, CloudType);                            \
+    makeInjectionModelType(PatchInjection, CloudType);                         \
+    makeInjectionModelType(PatchFlowRateInjection, CloudType);                 \
     makeInjectionModelType(ReactingLookupTableInjection, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H
index 47d4899e9d83515cd8e7d228c1029c59d4a9ffcf..b2556cba13bb25757f06f16d603c7558de3ed4f4 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,11 +34,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingParcelPhaseChangeModels(CloudType)                        \
-                                                                              \
-    makePhaseChangeModel(CloudType);                                          \
-    makePhaseChangeModelType(NoPhaseChange, CloudType);                       \
-    makePhaseChangeModelType(LiquidEvaporation, CloudType);                   \
+#define makeReactingParcelPhaseChangeModels(CloudType)                         \
+                                                                               \
+    makePhaseChangeModel(CloudType);                                           \
+    makePhaseChangeModelType(NoPhaseChange, CloudType);                        \
+    makePhaseChangeModelType(LiquidEvaporation, CloudType);                    \
     makePhaseChangeModelType(LiquidEvaporationBoil, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H
index 99d56fc8e93228683942858dd9f6455f79dc6353..c4ba34ef04204933674fa1c14cc3f4b240c5806d 100644
--- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,10 +33,10 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReactingParcelSurfaceFilmModels(CloudType)                        \
-                                                                              \
-    makeSurfaceFilmModel(CloudType);                                          \
-    makeSurfaceFilmModelType(NoSurfaceFilm, CloudType);                       \
+#define makeReactingParcelSurfaceFilmModels(CloudType)                         \
+                                                                               \
+    makeSurfaceFilmModel(CloudType);                                           \
+    makeSurfaceFilmModelType(NoSurfaceFilm, CloudType);                        \
     makeSurfaceFilmModelType(ThermoSurfaceFilm, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H b/src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H
index 6045ae28276594e6d3835b3304fd40b8044689cc..0d1165397f756ac20212d911a885a9c37b14ed5b 100644
--- a/src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H
+++ b/src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,18 +43,18 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeThermoParcelForces(CloudType)                                     \
-                                                                              \
-    makeParticleForceModel(CloudType);                                        \
-    makeParticleForceModelType(SphereDragForce, CloudType);                   \
-    makeParticleForceModelType(NonSphereDragForce, CloudType);                \
-    makeParticleForceModelType(SaffmanMeiLiftForce, CloudType);               \
-    makeParticleForceModelType(TomiyamaLiftForce, CloudType);                 \
-    makeParticleForceModelType(GravityForce, CloudType);                      \
-    makeParticleForceModelType(NonInertialFrameForce, CloudType);             \
-    makeParticleForceModelType(ParamagneticForce, CloudType);                 \
-    makeParticleForceModelType(PressureGradientForce, CloudType);             \
-    makeParticleForceModelType(SRFForce, CloudType);                          \
+#define makeThermoParcelForces(CloudType)                                      \
+                                                                               \
+    makeParticleForceModel(CloudType);                                         \
+    makeParticleForceModelType(SphereDragForce, CloudType);                    \
+    makeParticleForceModelType(NonSphereDragForce, CloudType);                 \
+    makeParticleForceModelType(SaffmanMeiLiftForce, CloudType);                \
+    makeParticleForceModelType(TomiyamaLiftForce, CloudType);                  \
+    makeParticleForceModelType(GravityForce, CloudType);                       \
+    makeParticleForceModelType(NonInertialFrameForce, CloudType);              \
+    makeParticleForceModelType(ParamagneticForce, CloudType);                  \
+    makeParticleForceModelType(PressureGradientForce, CloudType);              \
+    makeParticleForceModelType(SRFForce, CloudType);                           \
     makeParticleForceModelType(VirtualMassForce, CloudType);
 
 
diff --git a/src/lagrangian/intermediate/parcels/include/makeThermoParcelSurfaceFilmModels.H b/src/lagrangian/intermediate/parcels/include/makeThermoParcelSurfaceFilmModels.H
index 867eab608d69c3a6d7d17723b2fe4a9897b38b72..83a56fdb9d7c53c796c8b347e21b3aee07bf5911 100644
--- a/src/lagrangian/intermediate/parcels/include/makeThermoParcelSurfaceFilmModels.H
+++ b/src/lagrangian/intermediate/parcels/include/makeThermoParcelSurfaceFilmModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,11 +33,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelSurfaceFilmModels(CloudType)                                \
-                                                                              \
-    makeSurfaceFilmModel(CloudType);                                          \
-                                                                              \
-    makeSurfaceFilmModelType(NoSurfaceFilm, CloudType);                       \
+#define makeParcelSurfaceFilmModels(CloudType)                                 \
+                                                                               \
+    makeSurfaceFilmModel(CloudType);                                           \
+                                                                               \
+    makeSurfaceFilmModelType(NoSurfaceFilm, CloudType);                        \
     makeSurfaceFilmModelType(ThermoSurfaceFilm, CloudType);
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H
index 523f818e0610b6344eb2ddee0af8790d620aa73f..e05b3ca86a07f4947ae0a45f7153c623b7b2d11b 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,9 +111,9 @@ public:
         CloudFunctionObject(const CloudFunctionObject<CloudType>& ppm);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new CloudFunctionObject<CloudType>(*this)
             );
@@ -125,7 +125,7 @@ public:
 
 
     //- Selector
-    static autoPtr<CloudFunctionObject<CloudType> > New
+    static autoPtr<CloudFunctionObject<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner,
@@ -213,14 +213,14 @@ public:
     defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
                                                                                \
     Foam::CloudFunctionObject<kinematicCloudType>::                            \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >         \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CloudFunctionObject.C"
+    #include "CloudFunctionObject.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C
index dd9b77145e28fae160f511dfb6370ff7619d9086..1a5998b391440a6d3262691a0fcd676098c2ed95 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObjectNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::CloudFunctionObject<CloudType> >
+Foam::autoPtr<Foam::CloudFunctionObject<CloudType>>
 Foam::CloudFunctionObject<CloudType>::New
 (
     const dictionary& dict,
@@ -53,7 +53,7 @@ Foam::CloudFunctionObject<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<CloudFunctionObject<CloudType> >
+    return autoPtr<CloudFunctionObject<CloudType>>
     (
         cstrIter()
         (
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C
index 84d2c7d41e42e2365380104b3d991cc214a83401..18113a3a611f9a2d3cc6d3b52c79ec919ede7323 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
     CloudType& owner
 )
 :
-    PtrList<CloudFunctionObject<CloudType> >(),
+    PtrList<CloudFunctionObject<CloudType>>(),
     owner_(owner),
     dict_(dictionary::null)
 {}
@@ -48,7 +48,7 @@ Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
     const bool readFields
 )
 :
-    PtrList<CloudFunctionObject<CloudType> >(),
+    PtrList<CloudFunctionObject<CloudType>>(),
     owner_(owner),
     dict_(dict)
 {
@@ -98,7 +98,7 @@ Foam::CloudFunctionObjectList<CloudType>::CloudFunctionObjectList
     const CloudFunctionObjectList& cfol
 )
 :
-    PtrList<CloudFunctionObject<CloudType> >(cfol),
+    PtrList<CloudFunctionObject<CloudType>>(cfol),
     owner_(cfol.owner_),
     dict_(cfol.dict_)
 {}
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H
index 9448d2559ca5e934c250d4a7c286a0241d5c5b91..675d1941d3ddb2ec5c5dcc1102eaa0e2769f97b7 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ namespace Foam
 template<class CloudType>
 class CloudFunctionObjectList
 :
-    public PtrList<CloudFunctionObject<CloudType> >
+    public PtrList<CloudFunctionObject<CloudType>>
 {
 protected:
 
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.C
index 240154edf3e02c9b86f85700f3507ab664f66b98..68c71b7f7de9adc4abd91b2557b410553c69c475 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.C
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -39,14 +39,14 @@ void Foam::CloudToVTK<CloudType>::writeData
 {
     const label procI = Pstream::myProcNo();
 
-    List<List<floatScalar> > allProcData(Pstream::nProcs());
+    List<List<floatScalar>> allProcData(Pstream::nProcs());
     allProcData[procI] = data;
     Pstream::gatherList(allProcData);
     List<floatScalar> allData =
-        ListListOps::combine<List<floatScalar> >
+        ListListOps::combine<List<floatScalar>>
         (
             allProcData,
-            accessOp<List<floatScalar> >()
+            accessOp<List<floatScalar>>()
         );
 
     vtkTools::write(vtkOs, binary, allData);
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.H
index 13a68f1879d87f725fb9c6db75bba8d5296a1f6e..370785b32734e63bd9d8a9a13002cc09093116ff 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudToVTK/CloudToVTK.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -107,9 +107,9 @@ public:
         CloudToVTK(const CloudToVTK<CloudType>& c);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new CloudToVTK<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H
index 4db5ed16b2fc448e8031d794ec956a79902683b9..132509ad66e8d0dbdd092b06700e50e35c06b014 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,9 +135,9 @@ public:
         FacePostProcessing(const FacePostProcessing<CloudType>& ppm);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new FacePostProcessing<CloudType>(*this)
             );
@@ -179,7 +179,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FacePostProcessing.C"
+    #include "FacePostProcessing.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C
index 745fe0b31cef4598023f1f5b276862c36a6e3584..3276a5bdc44cb1f3cfb98ab6344118182bf4130d 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ void Foam::ParticleCollector<CloudType>::makeLogFile
 template<class CloudType>
 void Foam::ParticleCollector<CloudType>::initPolygons
 (
-    const List<Field<point> >& polygons
+    const List<Field<point>>& polygons
 )
 {
     mode_ = mtPolygon;
@@ -174,7 +174,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
         // set 4 quadrants for single sector cases
         nS = 4;
 
-        vector tangent = vector::zero;
+        vector tangent = Zero;
         scalar magTangent = 0.0;
 
         Random rnd(1234);
@@ -553,7 +553,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
     word mode(this->coeffDict().lookup("mode"));
     if (mode == "polygon")
     {
-        List<Field<point> > polygons(this->coeffDict().lookup("polygons"));
+        List<Field<point>> polygons(this->coeffDict().lookup("polygons"));
 
         initPolygons(polygons);
 
@@ -562,12 +562,12 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
     }
     else if (mode == "polygonWithNormal")
     {
-        List<Tuple2<Field<point>, vector> > polygonAndNormal
+        List<Tuple2<Field<point>, vector>> polygonAndNormal
         (
             this->coeffDict().lookup("polygons")
         );
 
-        List<Field<point> > polygons(polygonAndNormal.size());
+        List<Field<point>> polygons(polygonAndNormal.size());
         normal_.setSize(polygonAndNormal.size());
 
         forAll(polygons, polyI)
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H
index e7ed170e97df90e93c769ddbe6d6fe1ee31448be..7cce69b9d3f8950c14c8c1a402e1d8587b8e19b3 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -147,7 +147,7 @@ private:
         // Polygon collector
 
             //- Triangulation of faces
-            List<List<face> > faceTris_;
+            List<List<face>> faceTris_;
 
         // Concentric circles collector
 
@@ -212,7 +212,7 @@ private:
         );
 
         //- Initialise polygon collectors
-        void initPolygons(const List<Field<point> >& polygons);
+        void initPolygons(const List<Field<point>>& polygons);
 
         //- Initialise concentric circle collectors
         void initConcentricCircles();
@@ -260,9 +260,9 @@ public:
         ParticleCollector(const ParticleCollector<CloudType>& pc);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new ParticleCollector<CloudType>(*this)
             );
@@ -306,7 +306,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ParticleCollector.C"
+    #include "ParticleCollector.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H
index 5e4e0db1cb47a7ceedae553e769aef0c5495dc7e..ab6bec14b8eb95405abef709d7d8d389de9f7352 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,9 +107,9 @@ public:
         ParticleErosion(const ParticleErosion<CloudType>& pe);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new ParticleErosion<CloudType>(*this)
             );
@@ -146,7 +146,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ParticleErosion.C"
+    #include "ParticleErosion.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C
index b1057c92bce773f65a7d6ee83e3f629173ee4049..14ac5b13668779b39b96135cd0e729d43d5a80c5 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,8 +46,7 @@ void Foam::ParticleTracks<CloudType>::write()
     {
         if (debug)
         {
-            Info<< "void Foam::ParticleTracks<CloudType>::write()" << nl
-                << "cloupPtr invalid" << endl;
+            InfoInFunction << "cloupPtr invalid" << endl;
         }
     }
 }
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H
index 4bf65edd53651e85a1db741bed7f97ca735a6d30..fb4ac9c0608482027ee23340ae60e4642729f737 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ class ParticleTracks
             typedef typename CloudType::parcelType parcelType;
 
             //- Convenience typedef for hash hit-table
-            typedef HashTable<label, labelPair, typename labelPair::Hash<> >
+            typedef HashTable<label, labelPair, typename labelPair::Hash<>>
                 hitTableType;
 
         //- Number of face-hit intervals between storing parcel data
@@ -75,7 +75,7 @@ class ParticleTracks
         hitTableType faceHitCounter_;
 
         //- Pointer to the cloud storage
-        autoPtr<Cloud<parcelType> > cloudPtr_;
+        autoPtr<Cloud<parcelType>> cloudPtr_;
 
 
 protected:
@@ -106,9 +106,9 @@ public:
         ParticleTracks(const ParticleTracks<CloudType>& ppm);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new ParticleTracks<CloudType>(*this)
             );
@@ -165,7 +165,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ParticleTracks.C"
+    #include "ParticleTracks.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H
index fc03b0c91a641b5796a985708cc34d7766bcbe99..85c55a516a5e7bc376d6d563a850b0c880a158b0 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,16 +25,17 @@ Class
     Foam::ParticleTrap
 
 Description
-    Traps particles within a given phase fraction for multi-phase cases
+    Traps particles within a given phase fraction for multi-phase cases.
 
     Model is activated using:
-
-        particleTrap1
-        {
-            type        particleTrap;
-            alphaName   alpha;      // name volume fraction field
-            threshold   0.95;       // alpha value below which model is active
-        }
+    \verbatim
+    particleTrap1
+    {
+        type        particleTrap;
+        alphaName   alpha;      // name volume fraction field
+        threshold   0.95;       // alpha value below which model is active
+    }
+    \endverbatim
 
 
 SourceFiles
@@ -103,9 +104,9 @@ public:
         ParticleTrap(const ParticleTrap<CloudType>& pe);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new ParticleTrap<CloudType>(*this)
             );
@@ -145,7 +146,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ParticleTrap.C"
+    #include "ParticleTrap.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C
index d037b32b61d031d462a2db4b3e9f772758d4c003..b19f347fb54d59f921c40502d66e359e84853b12 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,11 +56,11 @@ void Foam::PatchPostProcessing<CloudType>::write()
 {
     forAll(patchData_, i)
     {
-        List<List<scalar> > procTimes(Pstream::nProcs());
+        List<List<scalar>> procTimes(Pstream::nProcs());
         procTimes[Pstream::myProcNo()] = times_[i];
         Pstream::gatherList(procTimes);
 
-        List<List<string> > procData(Pstream::nProcs());
+        List<List<string>> procData(Pstream::nProcs());
         procData[Pstream::myProcNo()] = patchData_[i];
         Pstream::gatherList(procData);
 
@@ -82,17 +82,17 @@ void Foam::PatchPostProcessing<CloudType>::write()
             );
 
             List<string> globalData;
-            globalData = ListListOps::combine<List<string> >
+            globalData = ListListOps::combine<List<string>>
             (
                 procData,
-                accessOp<List<string> >()
+                accessOp<List<string>>()
             );
 
             List<scalar> globalTimes;
-            globalTimes = ListListOps::combine<List<scalar> >
+            globalTimes = ListListOps::combine<List<scalar>>
             (
                 procTimes,
-                accessOp<List<scalar> >()
+                accessOp<List<scalar>>()
             );
 
             labelList indices;
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H
index 9b023a87e278cfe5ef8078c86673d22c5102bdb7..902e186b1d523319fee5fe90c63adcc4b4020961 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,10 +62,10 @@ class PatchPostProcessing
         labelList patchIDs_;
 
         //- List of time for each data record
-        List<DynamicList<scalar> > times_;
+        List<DynamicList<scalar>> times_;
 
         //- List of output data per patch
-        List<DynamicList<string> > patchData_;
+        List<DynamicList<string>> patchData_;
 
 
     // Private Member Functions
@@ -102,9 +102,9 @@ public:
         PatchPostProcessing(const PatchPostProcessing<CloudType>& ppm);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new PatchPostProcessing<CloudType>(*this)
             );
@@ -151,7 +151,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PatchPostProcessing.C"
+    #include "PatchPostProcessing.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H
index a5fb87265f032e65793e5432a85e358a9a7f4900..e42461241890215021f6efd7bf02635f4f503403 100644
--- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H
+++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         VoidFraction(const VoidFraction<CloudType>& vf);
 
         //- Construct and return a clone
-        virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
+        virtual autoPtr<CloudFunctionObject<CloudType>> clone() const
         {
-            return autoPtr<CloudFunctionObject<CloudType> >
+            return autoPtr<CloudFunctionObject<CloudType>>
             (
                 new VoidFraction<CloudType>(*this)
             );
@@ -134,7 +134,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "VoidFraction.C"
+    #include "VoidFraction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/CloudSubModelBase.H b/src/lagrangian/intermediate/submodels/CloudSubModelBase.H
index 443612e018d6870f853c9bcd33efe5366f05cd6b..f96b8f5d5d41ade815b6b1865c95bf30c589a54d 100644
--- a/src/lagrangian/intermediate/submodels/CloudSubModelBase.H
+++ b/src/lagrangian/intermediate/submodels/CloudSubModelBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CloudSubModelBase.C"
+    #include "CloudSubModelBase.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C
index 81fced59a8ead743e82a58de05c59d02558a7087..9ecc679c2469e50a99e2d99f0285daa57c89a9f6 100644
--- a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C
+++ b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,7 +35,7 @@ Foam::ParticleForceList<CloudType>::ParticleForceList
     const fvMesh& mesh
 )
 :
-    PtrList<ParticleForce<CloudType> >(),
+    PtrList<ParticleForce<CloudType>>(),
     owner_(owner),
     mesh_(mesh),
     dict_(dictionary::null),
@@ -53,7 +53,7 @@ Foam::ParticleForceList<CloudType>::ParticleForceList
     const bool readFields
 )
 :
-    PtrList<ParticleForce<CloudType> >(),
+    PtrList<ParticleForce<CloudType>>(),
     owner_(owner),
     mesh_(mesh),
     dict_(dict),
@@ -118,7 +118,7 @@ Foam::ParticleForceList<CloudType>::ParticleForceList
     const ParticleForceList& pf
 )
 :
-    PtrList<ParticleForce<CloudType> >(pf),
+    PtrList<ParticleForce<CloudType>>(pf),
     owner_(pf.owner_),
     mesh_(pf.mesh_),
     dict_(pf.dict_)
@@ -154,7 +154,7 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     if (calcCoupled_)
     {
@@ -178,7 +178,7 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcNonCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     if (calcNonCoupled_)
     {
diff --git a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.H b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.H
index 0c7b08a7ed793763c906af42afab886877f51a7f..9b115cbf8869102a222e56850ee167a3641d497e 100644
--- a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.H
+++ b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ namespace Foam
 template<class CloudType>
 class ParticleForceList
 :
-    public PtrList<ParticleForce<CloudType> >
+    public PtrList<ParticleForce<CloudType>>
 {
     // Private data
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H
index 9134745f62c004f092d0e7ba3bb4cd2111ed98f9..243d82df36009e16924be0f14943d6779f692856 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ public:
         CollisionModel(const CollisionModel<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CollisionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<CollisionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -105,7 +105,7 @@ public:
 
 
     //- Selector
-    static autoPtr<CollisionModel<CloudType> > New
+    static autoPtr<CollisionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -133,38 +133,38 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeCollisionModel(CloudType)                                         \
-                                                                              \
-    typedef Foam::CloudType::collidingCloudType collidingCloudType;           \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::CollisionModel<collidingCloudType>,                             \
-        0                                                                     \
-    );                                                                        \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            CollisionModel<collidingCloudType>,                               \
-            dictionary                                                        \
-        );                                                                    \
+#define makeCollisionModel(CloudType)                                          \
+                                                                               \
+    typedef Foam::CloudType::collidingCloudType collidingCloudType;            \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::CollisionModel<collidingCloudType>,                              \
+        0                                                                      \
+    );                                                                         \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            CollisionModel<collidingCloudType>,                                \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeCollisionModelType(SS, CloudType)                                 \
-                                                                              \
-    typedef Foam::CloudType::collidingCloudType collidingCloudType;           \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<collidingCloudType>, 0);     \
-                                                                              \
-    Foam::CollisionModel<collidingCloudType>::                                \
-        adddictionaryConstructorToTable<Foam::SS<collidingCloudType> >        \
+#define makeCollisionModelType(SS, CloudType)                                  \
+                                                                               \
+    typedef Foam::CloudType::collidingCloudType collidingCloudType;            \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<collidingCloudType>, 0);      \
+                                                                               \
+    Foam::CollisionModel<collidingCloudType>::                                 \
+        adddictionaryConstructorToTable<Foam::SS<collidingCloudType>>          \
             add##SS##CloudType##collidingCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CollisionModel.C"
+    #include "CollisionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C
index 5c0d407586f4deb5108be0877758bf46b1a2fafc..3237690f6f151ae279d108a07fde512d3fcf161d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::CollisionModel<CloudType> >
+Foam::autoPtr<Foam::CollisionModel<CloudType>>
 Foam::CollisionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -51,7 +51,7 @@ Foam::CollisionModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<CollisionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<CollisionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/NoCollision/NoCollision.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/NoCollision/NoCollision.H
index 95b029f6d8e73b8f104e58a3cf6eeb722b29a67e..5c7a857e37390482f9254142838457ba31d44732 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/NoCollision/NoCollision.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/NoCollision/NoCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,9 +67,9 @@ public:
         NoCollision(const NoCollision<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CollisionModel<CloudType> > clone() const
+        virtual autoPtr<CollisionModel<CloudType>> clone() const
         {
-            return autoPtr<CollisionModel<CloudType> >
+            return autoPtr<CollisionModel<CloudType>>
             (
                 new NoCollision<CloudType>(*this)
             );
@@ -106,7 +106,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoCollision.C"
+    #include "NoCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C
index 185bfb2f52532f31afd6b8c209635566e89ea120..fd21059d900ac92bccd0fd2a884fb1042f31aa90 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,9 +47,9 @@ void Foam::PairCollision<CloudType>::preInteraction()
     {
         typename CloudType::parcelType& p = iter();
 
-        p.f() = vector::zero;
+        p.f() = Zero;
 
-        p.torque() = vector::zero;
+        p.torque() = Zero;
     }
 }
 
@@ -80,7 +80,7 @@ void Foam::PairCollision<CloudType>::realRealInteraction()
     typename CloudType::parcelType* pA_ptr = NULL;
     typename CloudType::parcelType* pB_ptr = NULL;
 
-    List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
+    List<DynamicList<typename CloudType::parcelType*>>& cellOccupancy =
         this->owner().cellOccupancy();
 
     forAll(dil, realCellI)
@@ -127,10 +127,10 @@ void Foam::PairCollision<CloudType>::realReferredInteraction()
     // Referred interaction list (ril)
     const labelListList& ril = il_.ril();
 
-    List<IDLList<typename CloudType::parcelType> >& referredParticles =
+    List<IDLList<typename CloudType::parcelType>>& referredParticles =
         il_.referredParticles();
 
-    List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
+    List<DynamicList<typename CloudType::parcelType*>>& cellOccupancy =
         this->owner().cellOccupancy();
 
     // Loop over all referred cells
@@ -185,19 +185,19 @@ void Foam::PairCollision<CloudType>::wallInteraction()
 
     const volVectorField& U = mesh.lookupObject<volVectorField>(il_.UName());
 
-    List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
+    List<DynamicList<typename CloudType::parcelType*>>& cellOccupancy =
         this->owner().cellOccupancy();
 
     // Storage for the wall interaction sites
     DynamicList<point> flatSitePoints;
     DynamicList<scalar> flatSiteExclusionDistancesSqr;
-    DynamicList<WallSiteData<vector> > flatSiteData;
+    DynamicList<WallSiteData<vector>> flatSiteData;
     DynamicList<point> otherSitePoints;
     DynamicList<scalar> otherSiteDistances;
-    DynamicList<WallSiteData<vector> > otherSiteData;
+    DynamicList<WallSiteData<vector>> otherSiteData;
     DynamicList<point> sharpSitePoints;
     DynamicList<scalar> sharpSiteExclusionDistancesSqr;
-    DynamicList<WallSiteData<vector> > sharpSiteData;
+    DynamicList<WallSiteData<vector>> sharpSiteData;
 
     forAll(dil, realCellI)
     {
@@ -246,7 +246,7 @@ void Foam::PairCollision<CloudType>::wallInteraction()
 
                     vector pW = nearPt - pos;
 
-                    scalar normalAlignment = normal & pW/mag(pW);
+                    scalar normalAlignment = normal & pW/(mag(pW) + SMALL);
 
                     // Find the patchIndex and wallData for WallSiteData object
                     label patchI = patchID[realFaceI - mesh.nInternalFaces()];
@@ -537,9 +537,9 @@ void Foam::PairCollision<CloudType>::evaluateWall
 (
     typename CloudType::parcelType& p,
     const List<point>& flatSitePoints,
-    const List<WallSiteData<vector> >& flatSiteData,
+    const List<WallSiteData<vector>>& flatSiteData,
     const List<point>& sharpSitePoints,
-    const List<WallSiteData<vector> >& sharpSiteData
+    const List<WallSiteData<vector>>& sharpSiteData
 ) const
 {
     wallModel_->evaluateWall
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.H
index d17e0af9c71f4859ae64eed0fe9e6e6bfdc07130..bb6449e84334e4d8cc472b1ecf92baa2d52a1f5b 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,10 +77,10 @@ class PairCollision
     // Private data
 
         //- PairModel to calculate the interaction between two parcels
-        autoPtr<PairModel<CloudType> > pairModel_;
+        autoPtr<PairModel<CloudType>> pairModel_;
 
         //- WallModel to calculate the interaction between the parcel and walls
-        autoPtr<WallModel<CloudType> > wallModel_;
+        autoPtr<WallModel<CloudType>> wallModel_;
 
         //- Interactions lists determining which cells are in
         //  interaction range of each other
@@ -133,9 +133,9 @@ class PairCollision
         (
             typename CloudType::parcelType& p,
             const List<point>& flatSitePoints,
-            const List<WallSiteData<vector> >& flatSiteData,
+            const List<WallSiteData<vector>>& flatSiteData,
             const List<point>& sharpSitePoints,
-            const List<WallSiteData<vector> >& sharpSiteData
+            const List<WallSiteData<vector>>& sharpSiteData
         ) const;
 
 
@@ -154,9 +154,9 @@ public:
         PairCollision(const PairCollision<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CollisionModel<CloudType> > clone() const
+        virtual autoPtr<CollisionModel<CloudType>> clone() const
         {
-            return autoPtr<CollisionModel<CloudType> >
+            return autoPtr<CollisionModel<CloudType>>
             (
                 new PairCollision<CloudType>(*this)
             );
@@ -189,7 +189,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PairCollision.C"
+    #include "PairCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.H
index 1be43b5080c3b7dac071969d53dd285033dc4929..36c7e0fa3bdfc4fefe3e58ef8baae11c8276213e 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ public:
 
 
     //- Selector
-    static autoPtr<PairModel<CloudType> > New
+    static autoPtr<PairModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -144,33 +144,33 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makePairModel(CloudType)                                              \
-                                                                              \
+#define makePairModel(CloudType)                                               \
+                                                                               \
     defineNamedTemplateTypeNameAndDebug(Foam::PairModel<Foam::CloudType>, 0); \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            PairModel<Foam::CloudType>,                                       \
-            dictionary                                                        \
-        );                                                                    \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            PairModel<Foam::CloudType>,                                        \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makePairModelType(SS, CloudType)                                      \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<Foam::CloudType>, 0);        \
-                                                                              \
-    Foam::PairModel<Foam::CloudType>::                                        \
-        adddictionaryConstructorToTable<Foam::SS<Foam::CloudType> >           \
+#define makePairModelType(SS, CloudType)                                       \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<Foam::CloudType>, 0);         \
+                                                                               \
+    Foam::PairModel<Foam::CloudType>::                                         \
+        adddictionaryConstructorToTable<Foam::SS<Foam::CloudType>>             \
         add##SS##CloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PairModel.C"
+    #include "PairModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C
index f06dcbd813ecc5d4034e0d16efc23ddc7c73390e..a9f5b47f5c5b720c10441a95e1212d14883d65c9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairModel/PairModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::PairModel<CloudType> >
+Foam::autoPtr<Foam::PairModel<CloudType>>
 Foam::PairModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::PairModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<PairModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<PairModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C
index e2b92e630d617c86d869342ddc756802edf814de..21064f7b853530234230c6775dff6f3d03ec7a9f 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -271,8 +271,8 @@ void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair
 
                 fT_AB = -mu_*mag(fN_AB)*USlip_AB/mag(USlip_AB);
 
-                tangentialOverlap_AB = vector::zero;
-                tangentialOverlap_BA = vector::zero;
+                tangentialOverlap_AB = Zero;
+                tangentialOverlap_BA = Zero;
             }
             else
             {
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H
index 01336c85185515e2648951ed4ea8943636742a13..a0bddd2682e07ce5d0576ac672cd595bb7066f3f 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -140,7 +140,7 @@ public:
         //  centres separated by a distance rAB.  Assumes rAB < (rA + rB).
         inline scalar overlapArea(scalar rA, scalar rB, scalar rAB) const
         {
-            // From:
+            // Reference:
             // http://mathworld.wolfram.com/Sphere-SphereIntersection.html
             return
                 mathematical::pi/4.0
@@ -178,7 +178,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PairSpringSliderDashpot.C"
+    #include "PairSpringSliderDashpot.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C
index eee940121e14d8424df5cb03a6b2ca295c253620..cbc6db32342cbd5139b4a3c39a90e66fdcd80e0d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -151,7 +151,7 @@ void Foam::WallLocalSpringSliderDashpot<CloudType>::evaluateWall
 
             fT_PW = -mu*mag(fN_PW)*USlip_PW/mag(USlip_PW);
 
-            tangentialOverlap_PW = vector::zero;
+            tangentialOverlap_PW = Zero;
         }
         else
         {
@@ -337,9 +337,9 @@ void Foam::WallLocalSpringSliderDashpot<CloudType>::evaluateWall
 (
     typename CloudType::parcelType& p,
     const List<point>& flatSitePoints,
-    const List<WallSiteData<vector> >& flatSiteData,
+    const List<WallSiteData<vector>>& flatSiteData,
     const List<point>& sharpSitePoints,
-    const List<WallSiteData<vector> >& sharpSiteData
+    const List<WallSiteData<vector>>& sharpSiteData
 ) const
 {
     scalar pREff = this->pREff(p);
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.H
index 699c9cda2c871493109cd0ee6756ce83f6552c90..712825580e8ff8f11795cc7c72df56b96dc4a9f4 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,9 +167,9 @@ public:
         (
             typename CloudType::parcelType& p,
             const List<point>& flatSitePoints,
-            const List<WallSiteData<vector> >& flatSiteData,
+            const List<WallSiteData<vector>>& flatSiteData,
             const List<point>& sharpSitePoints,
-            const List<WallSiteData<vector> >& sharpSiteData
+            const List<WallSiteData<vector>>& sharpSiteData
         ) const;
 };
 
@@ -181,7 +181,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WallLocalSpringSliderDashpot.C"
+    #include "WallLocalSpringSliderDashpot.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModel.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModel.H
index 93ff310ba2af754a49ab079e3d3f51d8d006a5b0..d5979f5aa6ce264cfdc3373ed8cdd127ce68c1f7 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ public:
 
 
     //- Selector
-    static autoPtr<WallModel<CloudType> > New
+    static autoPtr<WallModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -141,9 +141,9 @@ public:
         (
             typename CloudType::parcelType& p,
             const List<point>& flatSitePoints,
-            const List<WallSiteData<vector> >& flatSiteData,
+            const List<WallSiteData<vector>>& flatSiteData,
             const List<point>& sharpSitePoints,
-            const List<WallSiteData<vector> >& sharpSiteData
+            const List<WallSiteData<vector>>& sharpSiteData
         ) const = 0;
 };
 
@@ -154,33 +154,33 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeWallModel(CloudType)                                              \
-                                                                              \
+#define makeWallModel(CloudType)                                               \
+                                                                               \
     defineNamedTemplateTypeNameAndDebug(Foam::WallModel<Foam::CloudType>, 0); \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            WallModel<Foam::CloudType>,                                       \
-            dictionary                                                        \
-        );                                                                    \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            WallModel<Foam::CloudType>,                                        \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeWallModelType(SS, CloudType)                                      \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<Foam::CloudType>, 0);        \
-                                                                              \
-    Foam::WallModel<Foam::CloudType>::                                        \
-        adddictionaryConstructorToTable<Foam::SS<Foam::CloudType> >           \
+#define makeWallModelType(SS, CloudType)                                       \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<Foam::CloudType>, 0);         \
+                                                                               \
+    Foam::WallModel<Foam::CloudType>::                                         \
+        adddictionaryConstructorToTable<Foam::SS<Foam::CloudType>>             \
             add##SS##CloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WallModel.C"
+    #include "WallModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C
index f53ffd0094b690c8a9a2db08c5291dc79d2eda35..ec49454ff1c113fbc2a5ae55b9c2f19c1750e158 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallModel/WallModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::WallModel<CloudType> >
+Foam::autoPtr<Foam::WallModel<CloudType>>
 Foam::WallModel<CloudType>::New
 (
     const dictionary& dict,
@@ -51,7 +51,7 @@ Foam::WallModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<WallModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<WallModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C
index 625a3d54e301441a8ccea95394750500164a0ebd..f41e124836f125450ca95f486202aa1c418cf0cb 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -138,7 +138,7 @@ void Foam::WallSpringSliderDashpot<CloudType>::evaluateWall
 
             fT_PW = -mu_*mag(fN_PW)*USlip_PW/mag(USlip_PW);
 
-            tangentialOverlap_PW = vector::zero;
+            tangentialOverlap_PW = Zero;
         }
         else
         {
@@ -269,9 +269,9 @@ void Foam::WallSpringSliderDashpot<CloudType>::evaluateWall
 (
     typename CloudType::parcelType& p,
     const List<point>& flatSitePoints,
-    const List<WallSiteData<vector> >& flatSiteData,
+    const List<WallSiteData<vector>>& flatSiteData,
     const List<point>& sharpSitePoints,
-    const List<WallSiteData<vector> >& sharpSiteData
+    const List<WallSiteData<vector>>& sharpSiteData
 ) const
 {
     scalar pREff = this->pREff(p);
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.H
index 0087d011978773c003e394ad77c248e672380f0e..e76b064e0ac00d8752ed41e398359b7c77c7946f 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -162,9 +162,9 @@ public:
         (
             typename CloudType::parcelType& p,
             const List<point>& flatSitePoints,
-            const List<WallSiteData<vector> >& flatSiteData,
+            const List<WallSiteData<vector>>& flatSiteData,
             const List<point>& sharpSitePoints,
-            const List<WallSiteData<vector> >& sharpSiteData
+            const List<WallSiteData<vector>>& sharpSiteData
         ) const;
 };
 
@@ -176,7 +176,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WallSpringSliderDashpot.C"
+    #include "WallSpringSliderDashpot.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallSiteData/WallSiteData.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallSiteData/WallSiteData.H
index 4cf4979c186070dbc7cf4fc1b3ca7dad2aa43379..cb169750d541039f53298f772d172136dd2990e0 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallSiteData/WallSiteData.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallSiteData/WallSiteData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -134,7 +134,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WallSiteData.C"
+    #include "WallSiteData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H
index 1af0caeb511bbfe7f463b01eba9b09f64356a593..138bff4396ad32ac87b79149ede409470d0aa4a3 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ public:
         DispersionModel(const DispersionModel<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DispersionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<DispersionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -96,7 +96,7 @@ public:
 
 
     //- Selector
-    static autoPtr<DispersionModel<CloudType> > New
+    static autoPtr<DispersionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -124,35 +124,35 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeDispersionModel(CloudType)                                        \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineTemplateTypeNameAndDebug                                            \
-        (Foam::DispersionModel<kinematicCloudType>, 0);                       \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            DispersionModel<kinematicCloudType>,                              \
-            dictionary                                                        \
-        );                                                                    \
+#define makeDispersionModel(CloudType)                                         \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineTemplateTypeNameAndDebug                                             \
+        (Foam::DispersionModel<kinematicCloudType>, 0);                        \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            DispersionModel<kinematicCloudType>,                               \
+            dictionary                                                         \
+        );                                                                     \
     }
 
-#define makeDispersionModelType(SS, CloudType)                                \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);     \
-                                                                              \
-    Foam::DispersionModel<kinematicCloudType>::                               \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >        \
+#define makeDispersionModelType(SS, CloudType)                                 \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
+                                                                               \
+    Foam::DispersionModel<kinematicCloudType>::                                \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DispersionModel.C"
+    #include "DispersionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C
index 7a3ddd981090065aa8cc82805e95e98697497f11..70422ee16b86965c5725210bf920a0bd65725f94 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::DispersionModel<CloudType> >
+Foam::autoPtr<Foam::DispersionModel<CloudType>>
 Foam::DispersionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::DispersionModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<DispersionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<DispersionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H
index 887c1b02f9640850399ae7098c3e0b1186d0fe5a..721868f3c4b54363d7c12647db859ee523741798 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,9 +63,9 @@ public:
         NoDispersion(const NoDispersion<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DispersionModel<CloudType> > clone() const
+        virtual autoPtr<DispersionModel<CloudType>> clone() const
         {
-            return autoPtr<DispersionModel<CloudType> >
+            return autoPtr<DispersionModel<CloudType>>
             (
                 new NoDispersion<CloudType>(*this)
             );
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoDispersion.C"
+    #include "NoDispersion.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C
index c6375d1dd9ba1308f475481be0630da6fd40af7f..ed459c5579a8dffeace7e1dbbd167fcecb686309 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -115,7 +115,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions
         allPositions,
         globalPositions.localSize(Pstream::myProcNo()),
         globalPositions.offset(Pstream::myProcNo())
-    ).assign(positions);
+    ) = positions;
 
     Pstream::listCombineGather(allPositions, minEqOp<point>());
     Pstream::listCombineScatter(allPositions);
@@ -126,19 +126,19 @@ void Foam::CellZoneInjection<CloudType>::setPositions
         allInjectorCells,
         globalPositions.localSize(Pstream::myProcNo()),
         globalPositions.offset(Pstream::myProcNo())
-    ).assign(injectorCells);
+    ) = injectorCells;
     SubList<label>
     (
         allInjectorTetFaces,
         globalPositions.localSize(Pstream::myProcNo()),
         globalPositions.offset(Pstream::myProcNo())
-    ).assign(injectorTetFaces);
+    ) = injectorTetFaces;
     SubList<label>
     (
         allInjectorTetPts,
         globalPositions.localSize(Pstream::myProcNo()),
         globalPositions.offset(Pstream::myProcNo())
-    ).assign(injectorTetPts);
+    ) = injectorTetPts;
 
     // Transfer data
     positions_.transfer(allPositions);
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H
index ece119404dce6e58bd5d403be8a783d2a335d439..343129837045aa79acb3b6a129f426d6bf7dad8d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,16 +25,17 @@ Class
     Foam::CellZoneInjection
 
 Description
-    Injection positions specified by a particle number density within a cell set
+    Injection positions specified by a particle number density within a cell
+    set.
 
-    User specifies
-    - Number density of particles in cell set (effective)
-    - Total mass to inject
-    - Initial parcel velocity
+    \li User specifies:
+        - Number density of particles in cell set (effective)
+        - Total mass to inject
+        - Initial parcel velocity
 
-    Additional
-    - Parcel diameters obtained by PDF model
-    - All parcels introduced at SOI
+    \li Parcel diameters obtained by PDF model
+
+    \li All parcels introduced at SOI
 
 SourceFiles
     CellZoneInjection.C
@@ -117,9 +118,9 @@ public:
         CellZoneInjection(const CellZoneInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new CellZoneInjection<CloudType>(*this)
             );
@@ -184,7 +185,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CellZoneInjection.C"
+    #include "CellZoneInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C
index 0cca8f321ecc3d079aca76b9e01ac58ccebe8113..cc597bba304951b574e13226ff28da205cf954d7 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "ConeInjection.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 #include "mathematicalConstants.H"
 #include "unitConversion.H"
 
@@ -52,7 +52,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
     ),
     flowRateProfile_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "flowRateProfile",
@@ -61,7 +61,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
     ),
     Umag_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "Umag",
@@ -70,7 +70,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
     ),
     thetaInner_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "thetaInner",
@@ -79,7 +79,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
     ),
     thetaOuter_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "thetaOuter",
@@ -107,7 +107,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
 
         axis /= mag(axis);
 
-        vector tangent = vector::zero;
+        vector tangent = Zero;
         scalar magTangent = 0.0;
 
         cachedRandom& rnd = this->owner().rndGen();
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H
index 56519243e4822b0ab89f94931e9d4f191a375da8..56fb18d4135d4981f06585d7c3d3731fb7217b99 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,17 +25,16 @@ Class
     Foam::ConeInjection
 
 Description
-    Multi-point cone injection model
+    Multi-point cone injection model.
 
-    User specifies
-    - time of start of injection
-    - list of injector positions and directions (along injection axes)
-    - number of parcels to inject per injector
-    - parcel velocities
-    - inner and outer half-cone angles
+    \li User specifies:
+        - time of start of injection
+        - list of injector positions and directions (along injection axes)
+        - number of parcels to inject per injector
+        - parcel velocities
+        - inner and outer half-cone angles
 
-    Additional
-    - Parcel diameters obtained by distribution model
+    \li Parcel diameters obtained by distribution model
 
 SourceFiles
     ConeInjection.C
@@ -48,7 +47,7 @@ SourceFiles
 #include "InjectionModel.H"
 #include "distributionModel.H"
 #include "vectorList.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -67,7 +66,7 @@ class ConeInjection
     // Private data
 
         //- List of position and axis for each injector
-        List<Tuple2<vector, vector> > positionAxis_;
+        List<Tuple2<vector, vector>> positionAxis_;
 
         //- List of cell labels corresponding to injector positions
         labelList injectorCells_;
@@ -85,16 +84,16 @@ class ConeInjection
         const label parcelsPerInjector_;
 
         //- Flow rate profile relative to SOI []
-        const TimeDataEntry<scalar> flowRateProfile_;
+        const TimeFunction1<scalar> flowRateProfile_;
 
         //- Parcel velocity magnitude relative to SOI [m/s]
-        const TimeDataEntry<scalar> Umag_;
+        const TimeFunction1<scalar> Umag_;
 
         //- Inner half-cone angle relative to SOI [deg]
-        const TimeDataEntry<scalar> thetaInner_;
+        const TimeFunction1<scalar> thetaInner_;
 
         //- Outer half-cone angle relative to SOI [deg]
-        const TimeDataEntry<scalar> thetaOuter_;
+        const TimeFunction1<scalar> thetaOuter_;
 
         //- Parcel size distribution model
         const autoPtr<distributionModels::distributionModel> sizeDistribution_;
@@ -132,9 +131,9 @@ public:
         ConeInjection(const ConeInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new ConeInjection<CloudType>(*this)
             );
@@ -200,7 +199,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ConeInjection.C"
+    #include "ConeInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C
index c748a8684b13f124756795040b33e3eb87cc3718..6ca6f336128816e71648397d4e1cb21208dc4c97 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "ConeNozzleInjection.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 #include "mathematicalConstants.H"
 #include "distributionModel.H"
 
@@ -119,7 +119,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
     ),
     flowRateProfile_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "flowRateProfile",
@@ -128,7 +128,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
     ),
     thetaInner_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "thetaInner",
@@ -137,7 +137,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
     ),
     thetaOuter_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "thetaOuter",
@@ -152,9 +152,9 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
             owner.rndGen()
         )
     ),
-    tanVec1_(vector::zero),
-    tanVec2_(vector::zero),
-    normal_(vector::zero),
+    tanVec1_(Zero),
+    tanVec2_(Zero),
+    normal_(Zero),
 
     UMag_(0.0),
     Cd_(owner.db().time(), "Cd"),
@@ -181,7 +181,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
     direction_ /= mag(direction_);
 
     // Determine direction vectors tangential to direction
-    vector tangent = vector::zero;
+    vector tangent = Zero;
     scalar magTangent = 0.0;
 
     while(magTangent < SMALL)
@@ -225,7 +225,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
     thetaOuter_(im.thetaOuter_),
     sizeDistribution_(im.sizeDistribution_, false),
     tanVec1_(im.tanVec1_),
-    tanVec2_(im.tanVec1_),
+    tanVec2_(im.tanVec2_),
     normal_(im.normal_),
     UMag_(im.UMag_),
     Cd_(im.Cd_),
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H
index 9490c31128a252c6248d4c562b746293e2295127..5b1e74a8eb1e36c18969b34a899d590172f14fd3 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,24 +25,32 @@ Class
     Foam::ConeNozzleInjection
 
 Description
-    Cone injection
-
-    User specifies
-    - time of start of injection
-    - injector position
-    - direction (along injection axis)
-    - parcel flow rate
-    - inner and outer half-cone angles
-
-    Additional
-    - Parcel diameters obtained by size distribution model
-    - Parcel velocity is calculated as:
-        - Constant velocity
-            U = \<specified by user\>
-        - Pressure driven velocity
-            U = sqrt(2*(Pinj - Pamb)/rho)
-        - Flow rate and discharge
-            U = V_dot/(A*Cd)
+    Cone injection.
+
+    \li User specifies:
+        - time of start of injection
+        - injector position
+        - direction (along injection axis)
+        - parcel flow rate
+        - inner and outer half-cone angles
+
+    \li Parcel diameters obtained by size distribution model
+
+    \li Parcel velocity is calculated as:
+        - Constant velocity:
+        \verbatim
+        U = \<specified by user\>
+        \endverbatim
+
+        - Pressure driven velocity:
+        \verbatim
+        U = sqrt(2*(Pinj - Pamb)/rho)
+        \endverbatim
+
+        - Flow rate and discharge:
+        \verbatim
+        U = V_dot/(A*Cd)
+        \endverbatim
 
 SourceFiles
     ConeNozzleInjection.C
@@ -62,7 +70,7 @@ namespace Foam
 // Forward declaration of classes
 
 template<class Type>
-class TimeDataEntry;
+class TimeFunction1;
 
 class distributionModel;
 
@@ -131,13 +139,13 @@ private:
         const label parcelsPerSecond_;
 
         //- Flow rate profile relative to SOI []
-        const TimeDataEntry<scalar> flowRateProfile_;
+        const TimeFunction1<scalar> flowRateProfile_;
 
         //- Inner half-cone angle relative to SOI [deg]
-        const TimeDataEntry<scalar> thetaInner_;
+        const TimeFunction1<scalar> thetaInner_;
 
         //- Outer half-cone angle relative to SOI [deg]
-        const TimeDataEntry<scalar> thetaOuter_;
+        const TimeFunction1<scalar> thetaOuter_;
 
         //- Parcel size PDF model
         const autoPtr<distributionModels::distributionModel> sizeDistribution_;
@@ -161,10 +169,10 @@ private:
             scalar UMag_;
 
             //- Discharge coefficient, relative to SOI [m/s]
-            TimeDataEntry<scalar> Cd_;
+            TimeFunction1<scalar> Cd_;
 
             //- Injection pressure [Pa]
-            TimeDataEntry<scalar> Pinj_;
+            TimeFunction1<scalar> Pinj_;
 
 
     // Private Member Functions
@@ -196,9 +204,9 @@ public:
         ConeNozzleInjection(const ConeNozzleInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new ConeNozzleInjection<CloudType>(*this)
             );
@@ -263,7 +271,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ConeNozzleInjection.C"
+    #include "ConeNozzleInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H
index 4c402929980c1c8eb23013809d97dea2e885bf66..f39d5a9bd685f01cb3299a7956240c1663353201 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,17 +27,16 @@ Class
 Description
     Conditional injection at specified positions.
 
-    For injection to be allowed, the equality must be satisfied:
-
+    \li for injection to be allowed
+        \verbatim
         factor*referenceField[cellI] >= thresholdField[cellI]
+        \endverbatim
+        where:
+        - \c referenceField is the field used to supply the look-up values
+        - \c thresholdField supplies the values beyond which the injection is
+            permitted.
 
-        Where:
-        - referenceField is the field used to supply the look-up values
-        - thresholdField supplies the values beyond which the injection is
-            permitted
-
-    Note:
-    - Limited to a user-supplied number of injections per injector location
+    \li limited to a user-supllied number of injections per injector location
 
 SourceFiles
     FieldActivatedInjection.C
@@ -137,9 +136,9 @@ public:
         FieldActivatedInjection(const FieldActivatedInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new FieldActivatedInjection<CloudType>(*this)
             );
@@ -204,7 +203,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FieldActivatedInjection.C"
+    #include "FieldActivatedInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C
index f3442fc61d21ca7b697e05568073165bdc5cce1b..cced2992c83eebabde2af7c06f7c3e7d6bb69038 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
     duration_(readScalar(this->coeffDict().lookup("duration"))),
     flowRateProfile_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "flowRateProfile",
@@ -58,7 +58,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
     ),
     growthRate_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "growthRate",
@@ -176,7 +176,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
 {
     const polyMesh& mesh = this->owner().mesh();
 
-    List<DynamicList<typename CloudType::parcelType*> >& cellOccupancy =
+    List<DynamicList<typename CloudType::parcelType*>>& cellOccupancy =
         this->owner().cellOccupancy();
 
     scalar gR = growthRate_.value(time1);
@@ -266,7 +266,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
                 (
                     vectorPairScalarPair
                     (
-                        Pair<vector>(mesh.cellCentres()[cI], vector::zero),
+                        Pair<vector>(mesh.cellCentres()[cI], Zero),
                         Pair<scalar>(dSeed_, dNew)
                     )
                 );
@@ -387,7 +387,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
 
     if (Pstream::parRun())
     {
-        List<List<vectorPairScalarPair> > gatheredNewParticles
+        List<List<vectorPairScalarPair>> gatheredNewParticles
         (
             Pstream::nProcs()
         );
@@ -400,10 +400,10 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
         // Combine
         List<vectorPairScalarPair> combinedNewParticles
         (
-            ListListOps::combine<List<vectorPairScalarPair> >
+            ListListOps::combine<List<vectorPairScalarPair>>
             (
                 gatheredNewParticles,
-                accessOp<List<vectorPairScalarPair> >()
+                accessOp<List<vectorPairScalarPair>>()
             )
         );
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H
index 8d3dd8dcc7b5501de0f1fd5b4ccc2f9164d2e53b..f408ac4728b0d045ee32452caa4bd42cc3e1978b 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ namespace Foam
 // + diameter = vectorPairScalarPair::second().first()
 // + target diameter = vectorPairScalarPair::second().second()
 // One structure to allow single operation parallel comms
-typedef Tuple2<Pair<vector>, Pair<scalar> > vectorPairScalarPair;
+typedef Tuple2<Pair<vector>, Pair<scalar>> vectorPairScalarPair;
 
 
 /*---------------------------------------------------------------------------*\
@@ -84,10 +84,10 @@ class InflationInjection
         scalar duration_;
 
         //- Flow rate profile relative to SOI [m3/s]
-        TimeDataEntry<scalar> flowRateProfile_;
+        TimeFunction1<scalar> flowRateProfile_;
 
         //- Growth rate of particle diameters towards target [m/s]
-        TimeDataEntry<scalar> growthRate_;
+        TimeFunction1<scalar> growthRate_;
 
         //- Positions, velocities, diameters and target diameters of
         //  new particles after splitting
@@ -131,9 +131,9 @@ public:
         InflationInjection(const InflationInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new InflationInjection<CloudType>(*this)
             );
@@ -198,7 +198,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InflationInjection.C"
+    #include "InflationInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C
index c1ea66b90c0dbb487e6391f4c9b1e93bf7fbd8b7..b174acdc43c7ab3d2f4deb81774eb8f473f6207b 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -455,7 +455,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
                 label tetFaceI = -1;
                 label tetPtI = -1;
 
-                vector pos = vector::zero;
+                vector pos = Zero;
 
                 setPositionAndCell
                 (
@@ -583,7 +583,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
         label tetFaceI = -1;
         label tetPtI = -1;
 
-        vector pos = vector::zero;
+        vector pos = Zero;
 
         setPositionAndCell
         (
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H
index fc0e285608c3835b4e24d4d2dfeeb7c44ef493b7..0ebe88741ce327f01a21aae3ded06b4bfc53216a 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ SourceFiles
 #include "runTimeSelectionTables.H"
 #include "CloudSubModelBase.H"
 #include "vector.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -104,7 +104,7 @@ protected:
             scalar massTotal_;
 
             //- Mass flow rate profile for steady calculations
-            TimeDataEntry<scalar> massFlowRate_;
+            TimeFunction1<scalar> massFlowRate_;
 
             //- Total mass injected to date [kg]
             scalar massInjected_;
@@ -223,7 +223,7 @@ public:
         InjectionModel(const InjectionModel<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<InjectionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -233,14 +233,14 @@ public:
     // Selectors
 
         //- Selector with lookup from dictionary
-        static autoPtr<InjectionModel<CloudType> > New
+        static autoPtr<InjectionModel<CloudType>> New
         (
             const dictionary& dict,
             CloudType& owner
         );
 
         //- Selector with name and type
-        static autoPtr<InjectionModel<CloudType> > New
+        static autoPtr<InjectionModel<CloudType>> New
         (
             const dictionary& dict,
             const word& modelName,
@@ -352,32 +352,32 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeInjectionModel(CloudType)                                         \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::InjectionModel<kinematicCloudType>,                             \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            InjectionModel<kinematicCloudType>,                               \
-            dictionary                                                        \
-        );                                                                    \
+#define makeInjectionModel(CloudType)                                          \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::InjectionModel<kinematicCloudType>,                              \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            InjectionModel<kinematicCloudType>,                                \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeInjectionModelType(SS, CloudType)                                 \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);     \
-                                                                              \
-    Foam::InjectionModel<kinematicCloudType>::                                \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >        \
+#define makeInjectionModelType(SS, CloudType)                                  \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
+                                                                               \
+    Foam::InjectionModel<kinematicCloudType>::                                 \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
@@ -388,7 +388,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InjectionModel.C"
+    #include "InjectionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.C
index ff7f3bdec396f852c397d4b7d2f2592fcb2e48ee..8fa0cce097a4fb8ca8c02d5003771e150f1ece79 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 template<class CloudType>
 Foam::InjectionModelList<CloudType>::InjectionModelList(CloudType& owner)
 :
-    PtrList<InjectionModel<CloudType> >()
+    PtrList<InjectionModel<CloudType>>()
 {}
 
 
@@ -41,7 +41,7 @@ Foam::InjectionModelList<CloudType>::InjectionModelList
     CloudType& owner
 )
 :
-    PtrList<InjectionModel<CloudType> >()
+    PtrList<InjectionModel<CloudType>>()
 {
     wordList modelNames(dict.toc());
 
@@ -96,7 +96,7 @@ Foam::InjectionModelList<CloudType>::InjectionModelList
     const InjectionModelList<CloudType>& iml
 )
 :
-    PtrList<InjectionModel<CloudType> >(iml)
+    PtrList<InjectionModel<CloudType>>(iml)
 {}
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.H
index 48de98a7e05924a44ad501dc96c6df7c0a0c0605..84e6c1989197999fa577731a721c518620890a60 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ namespace Foam
 template<class CloudType>
 class InjectionModelList
 :
-    public PtrList<InjectionModel<CloudType> >
+    public PtrList<InjectionModel<CloudType>>
 {
 public:
 
@@ -66,9 +66,9 @@ public:
         InjectionModelList(const InjectionModelList<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModelList<CloudType> > clone() const
+        virtual autoPtr<InjectionModelList<CloudType>> clone() const
         {
-            return autoPtr<InjectionModelList<CloudType> >
+            return autoPtr<InjectionModelList<CloudType>>
             (
                 new InjectionModelList<CloudType>(*this)
             );
@@ -128,7 +128,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "InjectionModelList.C"
+    #include "InjectionModelList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C
index e9a8af2f082cd32543f2b3ee0164c6ef001647ca..934b86f17f2dd344bdf8b5266e84230f4e1892d4 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::InjectionModel<CloudType> >
+Foam::autoPtr<Foam::InjectionModel<CloudType>>
 Foam::InjectionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -51,12 +51,12 @@ Foam::InjectionModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<InjectionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<InjectionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
 template<class CloudType>
-Foam::autoPtr<Foam::InjectionModel<CloudType> >
+Foam::autoPtr<Foam::InjectionModel<CloudType>>
 Foam::InjectionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -80,7 +80,7 @@ Foam::InjectionModel<CloudType>::New
     }
 
     return
-        autoPtr<InjectionModel<CloudType> >
+        autoPtr<InjectionModel<CloudType>>
         (
             cstrIter()
             (
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H
index f17410bc1dd5d4b97b7c4db699c8fc346590c94a..b03a8b6617798989d40f7bc08e9dd2a10e805c3d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,19 +28,23 @@ Description
     Particle injection sources read from look-up table. Each row corresponds to
     an injection site.
 
+    \verbatim
     (
         (x y z) (u v w) d rho mDot   // injector 1
         (x y z) (u v w) d rho mDot   // injector 2
         ...
         (x y z) (u v w) d rho mDot   // injector N
     );
+    \endverbatim
 
     where:
-        x, y, z = global cartesian co-ordinates [m]
-        u, v, w = global cartesian velocity components [m/s]
-        d       = diameter [m]
-        rho     = density [kg/m3]
-        mDot    = mass flow rate [kg/m3]
+    \plaintable
+        x, y, z | global cartesian co-ordinates [m]
+        u, v, w | global cartesian velocity components [m/s]
+        d       | diameter [m]
+        rho     | density [kg/m3]
+        mDot    | mass flow rate [kg/m3]
+    \endplaintable
 
 SourceFiles
     KinematicLookupTableInjection.C
@@ -117,9 +121,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new KinematicLookupTableInjection<CloudType>(*this)
             );
@@ -184,7 +188,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "KinematicLookupTableInjection.C"
+    #include "KinematicLookupTableInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C
index f245d62751830e5d8453cadae18177b7e8b729d9..a831d77283e244b51ebb70a8bf9698276d27a4e9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionData.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,8 +36,8 @@ namespace Foam
 
 Foam::kinematicParcelInjectionData::kinematicParcelInjectionData()
 :
-    x_(point::zero),
-    U_(vector::zero),
+    x_(Zero),
+    U_(Zero),
     d_(0.0),
     rho_(0.0),
     mDot_(0.0)
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H
index 0169381c6de97cfc622f30582b961f2947d3e123..604672dcfd013d000d48cdf81c57d2d29dc02750 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,16 +25,16 @@ Class
     Foam::ManualInjection
 
 Description
-    Manual injection
+    Manual injection.
 
-    User specifies
-    - Total mass to inject
-    - Parcel positions in file \c positionsFile
-    - Initial parcel velocity
+    \li User specifies:
+        - Total mass to inject
+        - Parcel positions in file \c positionsFile
+        - Initial parcel velocity
 
-    Additional
-    - Parcel diameters obtained by distribution model
-    - All parcels introduced at SOI
+    \li Parcel diameters obtained by distribution model
+
+    \li All parcels introduced at SOI
 
 SourceFiles
     ManualInjection.C
@@ -113,9 +113,9 @@ public:
         ManualInjection(const ManualInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new ManualInjection<CloudType>(*this)
             );
@@ -180,7 +180,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ManualInjection.C"
+    #include "ManualInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C
index cd28712ee89f1c3d487a2f49a700b1495e2a9700..6200468ad9df8745e595a9b15155bd183fed40bc 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -116,7 +116,7 @@ void Foam::NoInjection<CloudType>::setProperties
 )
 {
     // set particle velocity
-    parcel.U() = vector::zero;
+    parcel.U() = Zero;
 
     // set particle diameter
     parcel.d() = 0.0;
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H
index 938e8cfad2e8a6556b9be52e327a91c384a8ac41..96ffac0d7135f6df6933942f63bb30175c48739a 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,9 +67,9 @@ public:
         NoInjection(const NoInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new NoInjection<CloudType>(*this)
             );
@@ -133,7 +133,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoInjection.C"
+    #include "NoInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C
index 11f6a28ca03e0e13dcf7495f70a272eab9142b42..f6b784bf378a93822b9cf6cc6e720232b1290525 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PatchFlowRateInjection.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 #include "distributionModel.H"
 #include "mathematicalConstants.H"
 #include "surfaceFields.H"
@@ -46,7 +46,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection
     duration_(readScalar(this->coeffDict().lookup("duration"))),
     concentration_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "concentration",
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H
index 72ea50e261b0da8c4a64ec245b8255206ad0f067..6525f092e62f02cb10ea84f1391beb57101981cc 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,17 +25,17 @@ Class
     Foam::PatchFlowRateInjection
 
 Description
-    Patch injection
-    - uses patch flow rate to determine concentration and velociy
-
-    - User specifies
-      - Total mass to inject
-      - Name of patch
-      - Injection duration
-      - Injection target concentration/carrier volume flow rate
-    - Initial parcel velocity given by local flow velocity
-    - Parcel diameters obtained by distribution model
-    - Parcels injected randomly across the patch
+    Patch injection, by using patch flow rate to determine concentration and
+    velocity.
+
+    \li User specifies
+        - Total mass to inject
+        - Name of patch
+        - Injection duration
+        - Injection target concentration/carrier volume flow rate
+    \li Initial parcel velocity given by local flow velocity
+    \li Parcel diameters obtained by distribution model
+    \li Parcels injected randomly across the patch
 
 SourceFiles
     PatchFlowRateInjection.C
@@ -47,7 +47,7 @@ SourceFiles
 
 #include "InjectionModel.H"
 #include "patchInjectionBase.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -78,7 +78,7 @@ class PatchFlowRateInjection
         scalar duration_;
 
         //- Concentration profile of particle volume to carrier volume [-]
-        const TimeDataEntry<scalar> concentration_;
+        const TimeFunction1<scalar> concentration_;
 
         //- Parcels to introduce per unit volume flow rate m3 [n/m3]
         const scalar parcelConcentration_;
@@ -107,9 +107,9 @@ public:
         PatchFlowRateInjection(const PatchFlowRateInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new PatchFlowRateInjection<CloudType>(*this)
             );
@@ -182,7 +182,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PatchFlowRateInjection.C"
+    #include "PatchFlowRateInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C
index 57c8f915375e75c86e5cb6ab6831854657645a97..b8eae93c6a92cb95aa9e994b20174d3b3c0a30b7 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PatchInjection.H"
-#include "TimeDataEntry.H"
+#include "TimeFunction1.H"
 #include "distributionModel.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
@@ -47,7 +47,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
     U0_(this->coeffDict().lookup("U0")),
     flowRateProfile_
     (
-        TimeDataEntry<scalar>
+        TimeFunction1<scalar>
         (
             owner.db().time(),
             "flowRateProfile",
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H
index e32b2918513b5591f8ad12bbb4fb3888bd503250..93f4c012d8ed9abfc7be746f5c48a46be1427786 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,18 +25,16 @@ Class
     Foam::PatchInjection
 
 Description
-    Patch injection
+    Patch injection.
 
-    User specifies
-    - Total mass to inject
-    - Name of patch
-    - Injection duration
-    - Initial parcel velocity
-    - Injection volume flow rate
-
-    Additional
-    - Parcel diameters obtained by distribution model
-    - Parcels injected randomly across the patch
+    \li User specifies:
+        - Total mass to inject
+        - Name of patch
+        - Injection duration
+        - Initial parcel velocity
+        - Injection volume flow rate
+    \li Parcel diameters obtained by distribution model
+    \li Parcels injected randomly across the patch
 
 SourceFiles
     PatchInjection.C
@@ -55,7 +53,7 @@ namespace Foam
 {
 
 template<class Type>
-class TimeDataEntry;
+class TimeFunction1;
 
 class distributionModel;
 
@@ -81,7 +79,7 @@ class PatchInjection
         const vector U0_;
 
         //- Flow rate profile relative to SOI []
-        const TimeDataEntry<scalar> flowRateProfile_;
+        const TimeFunction1<scalar> flowRateProfile_;
 
         //- Parcel size distribution model
         const autoPtr<distributionModels::distributionModel> sizeDistribution_;
@@ -107,9 +105,9 @@ public:
         PatchInjection(const PatchInjection<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new PatchInjection<CloudType>(*this)
             );
@@ -179,7 +177,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PatchInjection.C"
+    #include "PatchInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C
index 7a3ec75ebd100dfdae47e88d2e0c64303130ecde..7d66ae2b37fc02ad6b44c23f6b9e6a52c06a81ba 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ Foam::forceSuSp Foam::DistortedSphereDragForce<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     // Limit the drop distortion to y=0 (sphere) and y=1 (disk)
     scalar y = min(max(p.y(), 0), 1);
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.H
index eb9dd62d5da22eaef21e61fe144b1d0f4ad501c8..4aed131ed465b27e67a2479b8b8e70482e24f9d0 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,9 +81,9 @@ public:
         DistortedSphereDragForce(const DistortedSphereDragForce<CloudType>& df);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new DistortedSphereDragForce<CloudType>(*this)
             );
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DistortedSphereDragForce.C"
+    #include "DistortedSphereDragForce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.C
index a18ffbecdbcc04d69384a02803b5fad5dc5bb4d7..fde0072ae270301679ff8e9224ab229dffbfdaea 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ Foam::forceSuSp Foam::ErgunWenYuDragForce<CloudType>::calcCoupled
     {
         return forceSuSp
         (
-            vector::zero,
+            Zero,
             (mass/p.rho())
            *(150.0*(1.0 - alphac)/alphac + 1.75*Re)*muc/(alphac*sqr(p.d()))
         );
@@ -117,7 +117,7 @@ Foam::forceSuSp Foam::ErgunWenYuDragForce<CloudType>::calcCoupled
     {
         return forceSuSp
         (
-            vector::zero,
+            Zero,
             (mass/p.rho())
            *0.75*CdRe(alphac*Re)*muc*pow(alphac, -2.65)/(alphac*sqr(p.d()))
         );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.H
index 1d10ea6b42fb26ce0a71824cd29320c8d559bacf..04686a7c783b82dacd7c06d6d30e75d4afe974f5 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,9 +81,9 @@ public:
         ErgunWenYuDragForce(const ErgunWenYuDragForce<CloudType>& df);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new ErgunWenYuDragForce<CloudType>(*this)
             );
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ErgunWenYuDragForce.C"
+    #include "ErgunWenYuDragForce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C
index 489079f524e7a86139e7f8dc81c365ff1b978441..3cbccc478734c44f27e0227f2cb909cc1a881af1 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ Foam::forceSuSp Foam::NonSphereDragForce<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     value.Sp() = mass*0.75*muc*CdRe(Re)/(p.rho()*sqr(p.d()));
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H
index 3655ec78cb7f3376856e24f3201056b885a6a95e..1bfc4bcb9fd1a7f0ba4b2abf6ab3554d49f152c7 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,9 +121,9 @@ public:
         NonSphereDragForce(const NonSphereDragForce<CloudType>& df);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new NonSphereDragForce<CloudType>(*this)
             );
@@ -157,7 +157,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NonSphereDragForce.C"
+    #include "NonSphereDragForce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.C
index 0dd49b7f0ae47c9f6a332ec4a39d046429457853..2afe4f620f216c7cbf4fcad62e57b18445e89c47 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,7 +121,7 @@ Foam::forceSuSp Foam::PlessisMasliyahDragForce<CloudType>::calcCoupled
 
     return forceSuSp
     (
-        vector::zero,
+        Zero,
         (mass/p.rho())
        *(A*(1.0 - alphac)/alphac + B*Re)*muc/(alphac*sqr(p.d()))
     );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.H
index 5bd9be8e453bc07e18aa691a0ec8e6658315b3ca..2e53bd0c1168a6d0549b79678437b3fa754f1b52 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,9 +81,9 @@ public:
         PlessisMasliyahDragForce(const PlessisMasliyahDragForce<CloudType>& df);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new PlessisMasliyahDragForce<CloudType>(*this)
             );
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PlessisMasliyahDragForce.C"
+    #include "PlessisMasliyahDragForce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C
index 4cb63e4781149b0159bee5772494afcb6b9fba1b..b93c2650aac17f375e8234edfe5ceb0556109e6c 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ Foam::forceSuSp Foam::SphereDragForce<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     value.Sp() = mass*0.75*muc*CdRe(Re)/(p.rho()*sqr(p.d()));
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.H
index 6b2a084f0ba0aee186be4edac3edf72aa1cab658..485f0ad8acad635080b51417c2f92b5f9f14e08d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,9 +73,9 @@ public:
         SphereDragForce(const SphereDragForce<CloudType>& df);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new SphereDragForce<CloudType>(*this)
             );
@@ -109,7 +109,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SphereDragForce.C"
+    #include "SphereDragForce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.C
index 57356aa147a080a1e50e450a7805a3c81d9b5033..c6747ce76804498c1ef848df7cb2d82f30de54bf 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ Foam::forceSuSp Foam::WenYuDragForce<CloudType>::calcCoupled
 
     return forceSuSp
     (
-        vector::zero,
+        Zero,
         (mass/p.rho())
        *0.75*CdRe(alphac*Re)*muc*pow(alphac, -2.65)/(alphac*sqr(p.d()))
     );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.H
index 46a6ff5e19f7b050d6cfed43685d61a722a3aeec..631b073854bb71bf1f117c98963726f5421fcca3 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,9 +81,9 @@ public:
         WenYuDragForce(const WenYuDragForce<CloudType>& df);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new WenYuDragForce<CloudType>(*this)
             );
@@ -117,7 +117,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WenYuDragForce.C"
+    #include "WenYuDragForce.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C
index d2bb31bc0374f2031d96ec58a36fcc4baa575099..54f7dc9c63cef7d38fd5ebcdfd5bf3da85f1650e 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ Foam::forceSuSp Foam::GravityForce<CloudType>::calcNonCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     value.Su() = mass*g_*(1.0 - p.rhoc()/p.rho());
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.H
index cfb201779429dcd588e76d438322ebb48183eb4e..709a73a93a4f62c42c1b206f69110a0cc844fdd9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,9 +80,9 @@ public:
         GravityForce(const GravityForce& gf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new GravityForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C
index a4faceeec75275b79c7621249697635058b4c5e4..5ffcb390a02d18866d9ed3f0b7ff5c4444bd970b 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -134,7 +134,7 @@ Foam::forceSuSp Foam::LiftForce<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     vector curlUc =
         curlUcInterp().interpolate(p.position(), p.currentTetIndices());
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.H
index 13cab0ac544f73021962186710cdf2642c9fc8c0..2a1036f8e43c87633a417487ee3d1bd376067b90 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ protected:
         const word UName_;
 
         //- Curk of carrier phase velocity interpolator
-        autoPtr<interpolation<vector> > curlUcInterpPtr_;
+        autoPtr<interpolation<vector>> curlUcInterpPtr_;
 
 
     // Potected Member Functions
@@ -94,9 +94,9 @@ public:
         LiftForce(const LiftForce& lf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new LiftForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/SaffmanMeiLift/SaffmanMeiLiftForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/SaffmanMeiLift/SaffmanMeiLiftForce.H
index 66d29416b922fd7b4224ce8731a6bcfadf840c5c..49cf39377a39f7c7269d8ad6cd911a00743d2ca7 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/SaffmanMeiLift/SaffmanMeiLiftForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/SaffmanMeiLift/SaffmanMeiLiftForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,9 +86,9 @@ public:
         SaffmanMeiLiftForce(const SaffmanMeiLiftForce& lf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new SaffmanMeiLiftForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.H
index 3edf43b0a3fac9cf92ecf37b83c5d40df5358e48..c84620a1341da89ede67be4ba4b56010fc259ab1 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/TomiyamaLift/TomiyamaLiftForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         TomiyamaLiftForce(const TomiyamaLiftForce& lf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new TomiyamaLiftForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C
index d0edd8a2283f8eecc52017f7f10d3ec5c8f23c0c..9630f242b28d292dff2e60addf237e663f1868b6 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
             "linearAcceleration"
         )
     ),
-    W_(vector::zero),
+    W_(Zero),
     omegaName_
     (
         this->coeffs().template lookupOrDefault<word>
@@ -54,7 +54,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
             "angularVelocity"
         )
     ),
-    omega_(vector::zero),
+    omega_(Zero),
     omegaDotName_
     (
         this->coeffs().template lookupOrDefault<word>
@@ -63,7 +63,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
             "angularAcceleration"
         )
     ),
-    omegaDot_(vector::zero),
+    omegaDot_(Zero),
     centreOfRotationName_
     (
         this->coeffs().template lookupOrDefault<word>
@@ -72,7 +72,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
             "centreOfRotation"
         )
     ),
-    centreOfRotation_(vector::zero)
+    centreOfRotation_(Zero)
 {}
 
 
@@ -106,10 +106,10 @@ Foam::NonInertialFrameForce<CloudType>::~NonInertialFrameForce()
 template<class CloudType>
 void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
 {
-    W_ = vector::zero;
-    omega_ = vector::zero;
-    omegaDot_ = vector::zero;
-    centreOfRotation_ = vector::zero;
+    W_ = Zero;
+    omega_ = Zero;
+    omegaDot_ = Zero;
+    centreOfRotation_ = Zero;
 
     if (store)
     {
@@ -186,7 +186,7 @@ Foam::forceSuSp Foam::NonInertialFrameForce<CloudType>::calcNonCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     const vector r = p.position() - centreOfRotation_;
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.H
index 7c411002cf9f4bb4b3c6a0cbfd19870cd15c70c0..df4edc1180a82a28f59c3f1d6024b07e99921525 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,9 +101,9 @@ public:
         NonInertialFrameForce(const NonInertialFrameForce& niff);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new ParticleForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C
index 62628e61788fa33e00d33313960feb060ded9338..00737cc110bb0a443918cb51082604a20298a1e9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ Foam::forceSuSp Foam::ParamagneticForce<CloudType>::calcNonCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     const interpolation<vector>& HdotGradHInterp = *HdotGradHInterpPtr_;
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.H
index 2d24eb8c1b38d00dccdf8357831a7656a432ca42..fef02cdbb5eca868898222c74c8946442b2c8b76 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,9 +87,9 @@ public:
         ParamagneticForce(const ParamagneticForce& gf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new ParamagneticForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.C
index a5a07d7baa96aaa73114e479f548a0253b75355b..b337b4222ffbfa3ecdc7288d528744b841263851 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ Foam::forceSuSp Foam::ParticleForce<CloudType>::calcCoupled
 ) const
 {
     forceSuSp value;
-    value.Su() = vector::zero;
+    value.Su() = Zero;
     value.Sp() = 0.0;
 
     return value;
@@ -104,7 +104,7 @@ Foam::forceSuSp Foam::ParticleForce<CloudType>::calcNonCoupled
 ) const
 {
     forceSuSp value;
-    value.Su() = vector::zero;
+    value.Su() = Zero;
     value.Sp() = 0.0;
 
     return value;
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.H
index c2ef62d5361a2a6cf86d5c4e7117401e5f2d0210..9ae5e67f830875f5350a91f39326eac50e1990de 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,9 +105,9 @@ public:
         ParticleForce(const ParticleForce& pf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new ParticleForce<CloudType>(*this)
             );
@@ -119,7 +119,7 @@ public:
 
 
     //- Selector
-    static autoPtr<ParticleForce<CloudType> > New
+    static autoPtr<ParticleForce<CloudType>> New
     (
         CloudType& owner,
         const fvMesh& mesh,
@@ -215,7 +215,7 @@ public:
     defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
                                                                                \
     Foam::ParticleForce<kinematicCloudType>::                                  \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >         \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C
index 7e37875658473c28c527ce879a4a234de1e2c70c..d30f34bb99bb9065992c546fe1a2bfbe2d68c5df 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/ParticleForce/ParticleForceNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::ParticleForce<CloudType> >
+Foam::autoPtr<Foam::ParticleForce<CloudType>>
 Foam::ParticleForce<CloudType>::New
 (
     CloudType& owner,
@@ -53,7 +53,7 @@ Foam::ParticleForce<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<ParticleForce<CloudType> >
+    return autoPtr<ParticleForce<CloudType>>
     (
         cstrIter()
         (
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C
index 4949ed7bf1dbd30c7b41418ff3fcb3471e3d0f94..eac19829f0750793a119512ef903289f76c3491e 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,7 +125,7 @@ Foam::forceSuSp Foam::PressureGradientForce<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     vector DUcDt =
         DUcDtInterp().interpolate(p.position(), p.currentTetIndices());
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H
index c4768d047825e032f4e878ede920ca4d120d81ed..31de00f9f6b048ee03e5e5c1b02416d38eca50ea 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ protected:
         const word UName_;
 
         //- Rate of change of carrier phase velocity interpolator
-        autoPtr<interpolation<vector> > DUcDtInterpPtr_;
+        autoPtr<interpolation<vector>> DUcDtInterpPtr_;
 
 
 public:
@@ -86,9 +86,9 @@ public:
         PressureGradientForce(const PressureGradientForce& pgf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new PressureGradientForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C
index eed0c800d08d30ade1ba1f33d9f48f37f267adc2..82fdca98e106646ddeb2f15ed377c1db0a486af2 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     const typename SRF::SRFModel& srf = *srfPtr_;
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.H
index 5c9927473ab3261b8a58353f9382cd01b686965e..91620ab1845c2094921d9ef1ab707c0782f093b9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,9 +80,9 @@ public:
         SRFForce(const SRFForce& srff);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new ParticleForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H
index ea0d5809324da2d5bd2024ea6a40e34aafa5c527..a0c29ed9bf3266c45d34aa97ca475fe08445459b 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,9 +78,9 @@ public:
         VirtualMassForce(const VirtualMassForce& pgf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new VirtualMassForce<CloudType>(*this)
             );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C
index 8f3f43b7e40eadff33d9bbbc8aa4ee3faf3e9269..37982290910c16971a5c189ed7e2b8f9c9caa3fc 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -197,7 +197,7 @@ bool Foam::LocalInteraction<CloudType>::correct
 
                 keepParticle = false;
                 active = false;
-                U = vector::zero;
+                U = Zero;
                 nEscape_[patchI]++;
                 massEscape_[patchI] += dm;
                 if (writeFields_)
@@ -214,7 +214,7 @@ bool Foam::LocalInteraction<CloudType>::correct
 
                 keepParticle = true;
                 active = false;
-                U = vector::zero;
+                U = Zero;
                 nStick_[patchI]++;
                 massStick_[patchI] += dm;
                 if (writeFields_)
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H
index 3a8c7767763161541425d5af7dc687ac0a1a627a..fa4bb84566dd1c8bd864eeeca2e9f19f17d96a38 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,9 +95,9 @@ public:
         LocalInteraction(const LocalInteraction<CloudType>& pim);
 
         //- Construct and return a clone using supplied owner cloud
-        virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
+        virtual autoPtr<PatchInteractionModel<CloudType>> clone() const
         {
-            return autoPtr<PatchInteractionModel<CloudType> >
+            return autoPtr<PatchInteractionModel<CloudType>>
             (
                 new LocalInteraction<CloudType>(*this)
             );
@@ -142,7 +142,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LocalInteraction.C"
+    #include "LocalInteraction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C
index 30aa85357f84af3ff498ae152a6731cf1a90c3c3..4c7739a07005218db645881fe0e17786766ddf2a 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "patchInteractionDataList.H"
 #include "stringListOps.H"
 #include "emptyPolyPatch.H"
+#include "cyclicAMIPolyPatch.H"
 
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
 
@@ -73,6 +74,7 @@ Foam::patchInteractionDataList::patchInteractionDataList
         (
             !pp.coupled()
          && !isA<emptyPolyPatch>(pp)
+         && !isA<cyclicAMIPolyPatch>(pp)
          && applyToPatch(pp.index()) < 0
         )
         {
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H
index 673cd325ed3aff32b16a0bf17cd358c90ba2f860..8fda4432fccbb90676ecde4c464547df74f8e3cb 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ class MultiInteraction
         Switch oneInteractionOnly_;
 
         //- Submodels
-        PtrList<PatchInteractionModel<CloudType> > models_;
+        PtrList<PatchInteractionModel<CloudType>> models_;
 
 
     // Private Member Functions
@@ -117,9 +117,9 @@ public:
         MultiInteraction(const MultiInteraction<CloudType>& pim);
 
         //- Construct and return a clone using supplied owner cloud
-        virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
+        virtual autoPtr<PatchInteractionModel<CloudType>> clone() const
         {
-            return autoPtr<PatchInteractionModel<CloudType> >
+            return autoPtr<PatchInteractionModel<CloudType>>
             (
                 new MultiInteraction<CloudType>(*this)
             );
@@ -155,7 +155,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MultiInteraction.C"
+    #include "MultiInteraction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/NoInteraction/NoInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/NoInteraction/NoInteraction.H
index 41a43685f8f4dd0bea10327ef97b4f8ce00a6d22..3817b5b8c9e686ba022c5e4fe3ade6de7e470fe4 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/NoInteraction/NoInteraction.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/NoInteraction/NoInteraction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,9 +63,9 @@ public:
         NoInteraction(const NoInteraction<CloudType>& pim);
 
         //- Construct and return a clone
-        virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
+        virtual autoPtr<PatchInteractionModel<CloudType>> clone() const
         {
-            return autoPtr<PatchInteractionModel<CloudType> >
+            return autoPtr<PatchInteractionModel<CloudType>>
             (
                 new NoInteraction<CloudType>(*this)
             );
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoInteraction.C"
+    #include "NoInteraction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H
index 66fc753f07ab375b72eec774b7c77726962b2180..d57bf95be844f68ba681bfcd0915d96b263487b9 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ public:
         PatchInteractionModel(const PatchInteractionModel<CloudType>& pim);
 
         //- Construct and return a clone
-        virtual autoPtr<PatchInteractionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<PatchInteractionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -136,7 +136,7 @@ public:
 
 
     //- Selector
-    static autoPtr<PatchInteractionModel<CloudType> > New
+    static autoPtr<PatchInteractionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -185,39 +185,39 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makePatchInteractionModel(CloudType)                                  \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::PatchInteractionModel<kinematicCloudType>,                      \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            PatchInteractionModel<kinematicCloudType>,                        \
-            dictionary                                                        \
-        );                                                                    \
+#define makePatchInteractionModel(CloudType)                                   \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::PatchInteractionModel<kinematicCloudType>,                       \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            PatchInteractionModel<kinematicCloudType>,                         \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makePatchInteractionModelType(SS, CloudType)                          \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);     \
-                                                                              \
-    Foam::PatchInteractionModel<kinematicCloudType>::                         \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >        \
+#define makePatchInteractionModelType(SS, CloudType)                           \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
+                                                                               \
+    Foam::PatchInteractionModel<kinematicCloudType>::                          \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PatchInteractionModel.C"
+    #include "PatchInteractionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C
index 82c1ada60c9315c9e7828010dc99feacd99f8917..1c711dba1187d4f745f76c0c981e66651e464bf8 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::PatchInteractionModel<CloudType> >
+Foam::autoPtr<Foam::PatchInteractionModel<CloudType>>
 Foam::PatchInteractionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::PatchInteractionModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<PatchInteractionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<PatchInteractionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H
index d9414b83d4f479a78dc734e85d9cdcfc891d60fd..38627da57bd609fd72c3c2b66f0355522e9337c8 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,9 +69,9 @@ public:
         Rebound(const Rebound<CloudType>& pim);
 
         //- Construct and return a clone
-        virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
+        virtual autoPtr<PatchInteractionModel<CloudType>> clone() const
         {
-            return autoPtr<PatchInteractionModel<CloudType> >
+            return autoPtr<PatchInteractionModel<CloudType>>
             (
                 new Rebound<CloudType>(*this)
             );
@@ -103,7 +103,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Rebound.C"
+    #include "Rebound.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
index d24a3f6b7d142e05340da3c5f3e1b62da0032cb8..38b57a272147e47d4247b487fe6785344fb9db93 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
             {
                 keepParticle = false;
                 active = false;
-                U = vector::zero;
+                U = Zero;
                 nEscape_++;
                 massEscape_ += p.nParticle()*p.mass();
                 break;
@@ -131,7 +131,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
             {
                 keepParticle = true;
                 active = false;
-                U = vector::zero;
+                U = Zero;
                 nStick_++;
                 massStick_ += p.nParticle()*p.mass();
                 break;
@@ -205,16 +205,9 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
     if (this->outputTime())
     {
         this->setModelProperty("nEscape", npe);
-        nEscape_ = 0;
-
         this->setModelProperty("massEscape", mpe);
-        massEscape_ = 0.0;
-
         this->setModelProperty("nStick", nps);
-        nStick_ = 0;
-
         this->setModelProperty("massStick", mps);
-        massStick_ = 0.0;
     }
 }
 
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H
index 68a5a8965bcd5f337c3c1e27aa8f11a911ea3a4c..a5abf354a660868c21a74fec4dedda62895d290d 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,18 +26,20 @@ Class
 
 Description
     Wall interaction model. Three choices:
-    - rebound - optionally specify elasticity and resitution coefficients
-    - stick   - particles assigined zero velocity
-    - escape  - remove particle from the domain
 
-    Example usage:
+    \li \c rebound - optionally specify elasticity and restitution coefficients
+    \li \c stick   - particles assigned zero velocity
+    \li \c escape  - remove particle from the domain
 
-        StandardWallInteractionCoeffs
-        {
-            type        rebound; // stick, escape
-            e           1;       // optional - elasticity coeff
-            mu          0;       // optional - restitution coeff
-        }
+    Example usage:
+    \verbatim
+    StandardWallInteractionCoeffs
+    {
+        type        rebound; // stick, escape
+        e           1;       // optional - elasticity coeff
+        mu          0;       // optional - restitution coeff
+    }
+    \endverbatim
 
 \*---------------------------------------------------------------------------*/
 
@@ -104,9 +106,9 @@ public:
         StandardWallInteraction(const StandardWallInteraction<CloudType>& pim);
 
         //- Construct and return a clone using supplied owner cloud
-        virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
+        virtual autoPtr<PatchInteractionModel<CloudType>> clone() const
         {
-            return autoPtr<PatchInteractionModel<CloudType> >
+            return autoPtr<PatchInteractionModel<CloudType>>
             (
                 new StandardWallInteraction<CloudType>(*this)
             );
@@ -145,7 +147,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "StandardWallInteraction.C"
+    #include "StandardWallInteraction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/NoStochasticCollision/NoStochasticCollision.H b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/NoStochasticCollision/NoStochasticCollision.H
index 81338611e340330ca23965dfe9c2b28619ca8d0a..7edc3603419e5f9ec25341cfd3a7ca0c2cc47255 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/NoStochasticCollision/NoStochasticCollision.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/NoStochasticCollision/NoStochasticCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,9 +70,9 @@ public:
         NoStochasticCollision(const NoStochasticCollision<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const
+        virtual autoPtr<StochasticCollisionModel<CloudType>> clone() const
         {
-            return autoPtr<StochasticCollisionModel<CloudType> >
+            return autoPtr<StochasticCollisionModel<CloudType>>
             (
                 new NoStochasticCollision<CloudType>(*this)
             );
@@ -97,7 +97,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoStochasticCollision.C"
+    #include "NoStochasticCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModel.H
index 140c9d310d26fc80491202edcd337c0db0eb842d..578852b6dbb35fbddbc685cf8370355e1182a9af 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ public:
         StochasticCollisionModel(const StochasticCollisionModel<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<StochasticCollisionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -105,7 +105,7 @@ public:
 
 
     //- Selector
-    static autoPtr<StochasticCollisionModel<CloudType> > New
+    static autoPtr<StochasticCollisionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -143,13 +143,13 @@ public:
     }
 
 
-#define makeStochasticCollisionModelType(SS, CloudType)                       \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);     \
-                                                                              \
-    Foam::StochasticCollisionModel<kinematicCloudType>::                      \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >        \
+#define makeStochasticCollisionModelType(SS, CloudType)                        \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
+                                                                               \
+    Foam::StochasticCollisionModel<kinematicCloudType>::                       \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
@@ -157,7 +157,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "StochasticCollisionModel.C"
+    #include "StochasticCollisionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C
index 8faa120fe2adca7480fef8b2faf1929095128f0e..9faff867b59cea9899edbd3cecc6802a13a4b799 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/StochasticCollision/StochasticCollisionModel/StochasticCollisionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::StochasticCollisionModel<CloudType> >
+Foam::autoPtr<Foam::StochasticCollisionModel<CloudType>>
 Foam::StochasticCollisionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -51,7 +51,7 @@ Foam::StochasticCollisionModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<StochasticCollisionModel<CloudType> >
+    return autoPtr<StochasticCollisionModel<CloudType>>
     (
         cstrIter()(dict, owner)
     );
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H
index b2fd4e7cd20b80888dd0c620642447de1ea879ae..6e1bd9dc7676d24163273f5ae227dfe97672de6b 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,9 +74,9 @@ public:
         NoSurfaceFilm(const NoSurfaceFilm<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceFilmModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceFilmModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceFilmModel<CloudType> >
+            return autoPtr<SurfaceFilmModel<CloudType>>
             (
                 new NoSurfaceFilm<CloudType>(*this)
             );
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoSurfaceFilm.C"
+    #include "NoSurfaceFilm.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H
index 4f93dde5274a0b8c6a982b3df31632636ce41989..03fbffe3da077687263d965bb28c91b2ab754e64 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ public:
         SurfaceFilmModel(const SurfaceFilmModel<CloudType>& sfm);
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceFilmModel<CloudType> > clone() const = 0;
+        virtual autoPtr<SurfaceFilmModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -169,7 +169,7 @@ public:
 
 
     //- Selector
-    static autoPtr<SurfaceFilmModel<CloudType> > New
+    static autoPtr<SurfaceFilmModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -253,7 +253,7 @@ public:
     defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0);      \
                                                                                \
     Foam::SurfaceFilmModel<kinematicCloudType>::                               \
-        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType> >         \
+        adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>>          \
             add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
 
 
@@ -264,7 +264,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SurfaceFilmModel.C"
+    #include "SurfaceFilmModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C
index 492a1e1f37f0201714d2a2d2bcdda6e21da37e93..516641d06649c95b7dc4bbb13064622cfc435712 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::SurfaceFilmModel<CloudType> >
+Foam::autoPtr<Foam::SurfaceFilmModel<CloudType>>
 Foam::SurfaceFilmModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::SurfaceFilmModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<SurfaceFilmModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<SurfaceFilmModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C
index 7ef6edb34d0d5589f8c586a2fc935956bf72f156..2fa9f5b72aa4bf50988971fe21c927826485f5e3 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ Foam::AveragingMethod<Type>::AveragingMethod
     {
         FieldField<Field, Type>::append
         (
-            new Field<Type>(size[i], pTraits<Type>::zero)
+            new Field<Type>(size[i], Zero)
         );
     }
 }
@@ -69,7 +69,7 @@ Foam::AveragingMethod<Type>::AveragingMethod
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::autoPtr<Foam::AveragingMethod<Type> >
+Foam::autoPtr<Foam::AveragingMethod<Type>>
 Foam::AveragingMethod<Type>::New
 (
     const IOobject& io,
@@ -95,7 +95,7 @@ Foam::AveragingMethod<Type>::New
             << abort(FatalError);
     }
 
-    return autoPtr<AveragingMethod<Type> >(cstrIter()(io, dict, mesh));
+    return autoPtr<AveragingMethod<Type>>(cstrIter()(io, dict, mesh));
 }
 
 
@@ -161,7 +161,7 @@ bool Foam::AveragingMethod<Type>::write() const
             mesh_
         ),
         mesh_,
-        dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
+        dimensioned<Type>("zero", dimless, Zero)
     );
     GeometricField<TypeGrad, fvPatchField, volMesh> cellGrad
     (
@@ -172,7 +172,7 @@ bool Foam::AveragingMethod<Type>::write() const
             mesh_
         ),
         mesh_,
-        dimensioned<TypeGrad>("zero", dimless, pTraits<TypeGrad>::zero)
+        dimensioned<TypeGrad>("zero", dimless, Zero)
     );
     GeometricField<Type, pointPatchField, pointMesh> pointValue
     (
@@ -183,7 +183,7 @@ bool Foam::AveragingMethod<Type>::write() const
             mesh_
         ),
         pointMesh_,
-        dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
+        dimensioned<Type>("zero", dimless, Zero)
     );
     GeometricField<TypeGrad, pointPatchField, pointMesh> pointGrad
     (
@@ -194,7 +194,7 @@ bool Foam::AveragingMethod<Type>::write() const
             mesh_
         ),
         pointMesh_,
-        dimensioned<TypeGrad>("zero", dimless, pTraits<TypeGrad>::zero)
+        dimensioned<TypeGrad>("zero", dimless, Zero)
     );
 
     // tet-volume weighted sums
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.H
index dddcea6f1a34ff8a8762fce67009d77be89d2ee6..dacaa9f644770bd81f96f5a7194b715bda165475 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,11 +113,11 @@ public:
         AveragingMethod(const AveragingMethod<Type>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AveragingMethod<Type> > clone() const = 0;
+        virtual autoPtr<AveragingMethod<Type>> clone() const = 0;
 
 
     //- Selector
-    static autoPtr<AveragingMethod<Type> > New
+    static autoPtr<AveragingMethod<Type>> New
     (
         const IOobject& io,
         const dictionary& dict,
@@ -164,7 +164,7 @@ public:
         virtual bool write() const;
 
         //- Return an internal field of the average
-        virtual tmp<Field<Type> > internalField() const = 0;
+        virtual tmp<Field<Type>> internalField() const = 0;
 
         //- Assign to another average
         inline void operator=(const AveragingMethod<Type>& x);
@@ -173,16 +173,16 @@ public:
         inline void operator=(const Type& x);
 
         //- Assign to tmp
-        inline void operator=(tmp<FieldField<Field, Type> > x);
+        inline void operator=(tmp<FieldField<Field, Type>> x);
 
         //- Add-equal tmp
-        inline void operator+=(tmp<FieldField<Field, Type> > x);
+        inline void operator+=(tmp<FieldField<Field, Type>> x);
 
         //- Multiply-equal tmp
-        inline void operator*=(tmp<FieldField<Field, Type> > x);
+        inline void operator*=(tmp<FieldField<Field, Type>> x);
 
         //- Divide-equal tmp
-        inline void operator/=(tmp<FieldField<Field, scalar> > x);
+        inline void operator/=(tmp<FieldField<Field, scalar>> x);
 };
 
 
@@ -197,7 +197,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AveragingMethod.C"
+    #include "AveragingMethod.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethodI.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethodI.H
index 87bc4ac904aee5fcf0ad6691864e8aaf2f764869..8ebcf68b38438717a023d36b03dfd67a37b8d77f 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethodI.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethodI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ inline void Foam::AveragingMethod<Type>::operator=
 template<class Type>
 inline void Foam::AveragingMethod<Type>::operator=
 (
-    tmp<FieldField<Field, Type> > x
+    tmp<FieldField<Field, Type>> x
 )
 {
     FieldField<Field, Type>::operator=(x());
@@ -61,7 +61,7 @@ inline void Foam::AveragingMethod<Type>::operator=
 template<class Type>
 inline void Foam::AveragingMethod<Type>::operator+=
 (
-    tmp<FieldField<Field, Type> > x
+    tmp<FieldField<Field, Type>> x
 )
 {
     FieldField<Field, Type>::operator+=(x());
@@ -72,7 +72,7 @@ inline void Foam::AveragingMethod<Type>::operator+=
 template<class Type>
 inline void Foam::AveragingMethod<Type>::operator*=
 (
-    tmp<FieldField<Field, Type> > x
+    tmp<FieldField<Field, Type>> x
 )
 {
     FieldField<Field, Type>::operator*=(x());
@@ -83,7 +83,7 @@ inline void Foam::AveragingMethod<Type>::operator*=
 template<class Type>
 inline void Foam::AveragingMethod<Type>::operator/=
 (
-    tmp<FieldField<Field, scalar> > x
+    tmp<FieldField<Field, scalar>> x
 )
 {
     FieldField<Field, Type>::operator/=(x());
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C
index 576153d96d9c2d8b5adbba8377ef0c3e4150119d..b921b0042d46c14ee830acdbee0a9aceb23c1593 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "Basic.H"
+#include "zeroGradientFvPatchField.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -76,7 +77,7 @@ void Foam::AveragingMethods::Basic<Type>::updateGrad()
             false
         ),
         this->mesh_,
-        dimensioned<Type>("zero", dimless, pTraits<Type>::zero),
+        dimensioned<Type>("zero", dimless, Zero),
         zeroGradientFvPatchField<Type>::typeName
     );
     tempData.internalField() = data_;
@@ -123,10 +124,10 @@ Foam::AveragingMethods::Basic<Type>::interpolateGrad
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AveragingMethods::Basic<Type>::internalField() const
 {
-    return tmp<Field<Type> >(data_);
+    return tmp<Field<Type>>(data_);
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.H
index 515e018c6ce61bb74471861affe1b67a23289c70..4696b336419a8a5dccc9fecf11ea2393b20b8063 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,9 +107,9 @@ public:
         Basic(const Basic<Type>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AveragingMethod<Type> > clone() const
+        virtual autoPtr<AveragingMethod<Type>> clone() const
         {
-            return autoPtr<AveragingMethod<Type> >
+            return autoPtr<AveragingMethod<Type>>
             (
                 new Basic<Type>(*this)
             );
@@ -145,10 +145,10 @@ public:
         ) const;
 
         //- Return an internal field of the average
-        tmp<Field<Type> > internalField() const;
+        tmp<Field<Type>> internalField() const;
 
         //- Return an internal field of the gradient
-        tmp<Field<TypeGrad> > internalFieldGrad() const;
+        tmp<Field<TypeGrad>> internalFieldGrad() const;
 };
 
 
@@ -160,7 +160,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Basic.C"
+    #include "Basic.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C
index 54f0749c8fe977747f8ac31be214e4deca697ec4..fe3d4776557300414370de8dd39965b2f2049d86 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -243,10 +243,10 @@ void Foam::AveragingMethods::Dual<Type>::average
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AveragingMethods::Dual<Type>::internalField() const
 {
-    return tmp<Field<Type> >(dataCell_);
+    return tmp<Field<Type>>(dataCell_);
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H
index a3c7579e7796a9dda1e58ece7cf95a0a16c35ba4..f7d52bd3e1c9723d44ab0fad2b4cef3b4689d081 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -136,9 +136,9 @@ public:
         Dual(const Dual<Type>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AveragingMethod<Type> > clone() const
+        virtual autoPtr<AveragingMethod<Type>> clone() const
         {
-            return autoPtr<AveragingMethod<Type> >
+            return autoPtr<AveragingMethod<Type>>
             (
                 new Dual<Type>(*this)
             );
@@ -178,10 +178,10 @@ public:
         void average(const AveragingMethod<scalar>& weight);
 
         //- Return an internal field of the average
-        tmp<Field<Type> > internalField() const;
+        tmp<Field<Type>> internalField() const;
 
         //- Return an internal field of the gradient
-        tmp<Field<TypeGrad> > internalFieldGrad() const;
+        tmp<Field<TypeGrad>> internalFieldGrad() const;
 };
 
 
@@ -193,7 +193,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Dual.C"
+    #include "Dual.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C
index a71e746a1d2b781358ffaf87dec32d381ba1462c..6fbade1dbf69cb22c54828ca685c5eb478d4502b 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ Foam::AveragingMethods::Moment<Type>::Moment
     dataX_(FieldField<Field, Type>::operator[](1)),
     dataY_(FieldField<Field, Type>::operator[](2)),
     dataZ_(FieldField<Field, Type>::operator[](3)),
-    transform_(mesh.nCells(), symmTensor::zero),
+    transform_(mesh.nCells(), Zero),
     scale_(0.5*pow(mesh.V(), 1.0/3.0))
 {
     scalar a = 1.0/24.0;
@@ -65,7 +65,7 @@ Foam::AveragingMethods::Moment<Type>::Moment
         const List<tetIndices> cellTets =
             polyMeshTetDecomposition::cellTetIndices(mesh, cellI);
 
-        symmTensor A(symmTensor::zero);
+        symmTensor A(Zero);
 
         forAll(cellTets, tetI)
         {
@@ -197,10 +197,10 @@ Foam::AveragingMethods::Moment<Type>::interpolateGrad
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AveragingMethods::Moment<Type>::internalField() const
 {
-    return tmp<Field<Type> >(data_);
+    return tmp<Field<Type>>(data_);
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H
index e429ed43ec42f9c9332c0aa9424a4e6807610d14..cc62a5e5c3a49b1b963aa0c2e9277a78446e204b 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         Moment(const Moment<Type>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AveragingMethod<Type> > clone() const
+        virtual autoPtr<AveragingMethod<Type>> clone() const
         {
-            return autoPtr<AveragingMethod<Type> >
+            return autoPtr<AveragingMethod<Type>>
             (
                 new Moment<Type>(*this)
             );
@@ -158,10 +158,10 @@ public:
         ) const;
 
         //- Return an internal field of the average
-        tmp<Field<Type> > internalField() const;
+        tmp<Field<Type>> internalField() const;
 
         //- Return an internal field of the gradient
-        tmp<Field<TypeGrad> > internalFieldGrad() const;
+        tmp<Field<TypeGrad>> internalFieldGrad() const;
 };
 
 
@@ -173,7 +173,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Moment.C"
+    #include "Moment.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/makeAveragingMethods.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/makeAveragingMethods.C
index dac7edc27aa3d2e0749fda500f270e71c6af92a8..5eccf6c485c903203bba09c3035d8cfb1c51e1f7 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/makeAveragingMethods.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/makeAveragingMethods.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ defineNamedTemplateTypeNameAndDebug
     0
 );
 Foam::AveragingMethod<Foam::scalar>::
-adddictionaryConstructorToTable<Foam::AveragingMethods::Basic<Foam::scalar> >
+adddictionaryConstructorToTable<Foam::AveragingMethods::Basic<Foam::scalar>>
     addBasicscalarConstructorToTable_;
 
 defineNamedTemplateTypeNameAndDebug
@@ -70,7 +70,7 @@ defineNamedTemplateTypeNameAndDebug
     0
 );
 Foam::AveragingMethod<Foam::vector>::
-adddictionaryConstructorToTable<Foam::AveragingMethods::Basic<Foam::vector> >
+adddictionaryConstructorToTable<Foam::AveragingMethods::Basic<Foam::vector>>
     addBasicvectorConstructorToTable_;
 
 
@@ -81,7 +81,7 @@ defineNamedTemplateTypeNameAndDebug
     0
 );
 Foam::AveragingMethod<Foam::scalar>::
-adddictionaryConstructorToTable<Foam::AveragingMethods::Dual<Foam::scalar> >
+adddictionaryConstructorToTable<Foam::AveragingMethods::Dual<Foam::scalar>>
     addDualscalarConstructorToTable_;
 
 defineNamedTemplateTypeNameAndDebug
@@ -90,7 +90,7 @@ defineNamedTemplateTypeNameAndDebug
     0
 );
 Foam::AveragingMethod<Foam::vector>::
-adddictionaryConstructorToTable<Foam::AveragingMethods::Dual<Foam::vector> >
+adddictionaryConstructorToTable<Foam::AveragingMethods::Dual<Foam::vector>>
     addDualvectorConstructorToTable_;
 
 
@@ -101,7 +101,7 @@ defineNamedTemplateTypeNameAndDebug
     0
 );
 Foam::AveragingMethod<Foam::scalar>::
-adddictionaryConstructorToTable<Foam::AveragingMethods::Moment<Foam::scalar> >
+adddictionaryConstructorToTable<Foam::AveragingMethods::Moment<Foam::scalar>>
     addMomentscalarConstructorToTable_;
 
 defineNamedTemplateTypeNameAndDebug
@@ -110,7 +110,7 @@ defineNamedTemplateTypeNameAndDebug
     0
 );
 Foam::AveragingMethod<Foam::vector>::
-adddictionaryConstructorToTable<Foam::AveragingMethods::Moment<Foam::vector> >
+adddictionaryConstructorToTable<Foam::AveragingMethods::Moment<Foam::vector>>
     addMomentvectorConstructorToTable_;
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C
index 4c765da9c439affda8e3ee260ec737905bf9b02f..d823496d7ef0b9e20aae1b473753d0ea1cbe31f4 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ Foam::DampingModel<CloudType>::~DampingModel()
 // * * * * * * * * * * * * * * * *  Selector * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::DampingModel<CloudType> >
+Foam::autoPtr<Foam::DampingModel<CloudType>>
 Foam::DampingModel<CloudType>::New
 (
     const dictionary& dict,
@@ -98,7 +98,7 @@ Foam::DampingModel<CloudType>::New
     }
 
     return
-        autoPtr<DampingModel<CloudType> >
+        autoPtr<DampingModel<CloudType>>
         (
             cstrIter()(dict, owner)
         );
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.H b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.H
index 9c8e14293819702c3c9e6ef2c5a526aaf5e0ce3f..226a9c0881b0929654f405898a583cf51e7ec2c3 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/DampingModel/DampingModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,7 @@ public:
         DampingModel(const DampingModel<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<DampingModel<CloudType> > clone() const = 0;
+        virtual autoPtr<DampingModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -111,7 +111,7 @@ public:
 
 
     //- Selector
-    static autoPtr<DampingModel<CloudType> > New
+    static autoPtr<DampingModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -162,14 +162,14 @@ public:
                                                                                \
     Foam::DampingModel<MPPICCloudType>::                                       \
         adddictionaryConstructorToTable                                        \
-        <Foam::DampingModels::SS<MPPICCloudType> >                             \
+        <Foam::DampingModels::SS<MPPICCloudType>>                              \
             add##SS##CloudType##MPPICCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DampingModel.C"
+    #include "DampingModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.C b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.C
index c49bf78aa53c28cee404fdbc2281bb9aa10e29d8..5d59f601478271ac9646c7e3b5040b4c0698c4a5 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ Foam::vector Foam::DampingModels::NoDamping<CloudType>::velocityCorrection
     const scalar deltaT
 ) const
 {
-    return vector::zero;
+    return Zero;
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.H b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.H
index 34f2b9a967fc86d8da824667d3f6faa20faf622c..aced198b7cd7502c3346e77eeadd2646156e79b6 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/NoDamping/NoDamping.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,9 +66,9 @@ public:
         NoDamping(const NoDamping<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<DampingModel<CloudType> > clone() const
+        virtual autoPtr<DampingModel<CloudType>> clone() const
         {
-            return autoPtr<DampingModel<CloudType> >
+            return autoPtr<DampingModel<CloudType>>
             (
                 new NoDamping<CloudType>(*this)
             );
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoDamping.C"
+    #include "NoDamping.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C
index fadd26c67faba234322fd0180a1287f29dedd3cc..3e37bb61ad175cce60ea51329913d3eb062cde18 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,27 +71,27 @@ void Foam::DampingModels::Relaxation<CloudType>::cacheFields(const bool store)
         const word& cloudName = this->owner().name();
 
         const AveragingMethod<scalar>& volumeAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":volumeAverage"
             );
         const AveragingMethod<scalar>& radiusAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":radiusAverage"
             );
         const AveragingMethod<vector>& uAverage =
-            mesh.lookupObject<AveragingMethod<vector> >
+            mesh.lookupObject<AveragingMethod<vector>>
             (
                 cloudName + ":uAverage"
             );
         const AveragingMethod<scalar>& uSqrAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":uSqrAverage"
             );
         const AveragingMethod<scalar>& frequencyAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":frequencyAverage"
             );
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.H b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.H
index d9f6e07e5785c5a9acda7d6a2748f151cd7c75cf..ff543439c4938c4dc56087c609f5007feaedeb82 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/DampingModels/Relaxation/Relaxation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ private:
         const AveragingMethod<vector>* uAverage_;
 
         //- Reciprocal of the time scale average
-        autoPtr<AveragingMethod<scalar> > oneByTimeScaleAverage_;
+        autoPtr<AveragingMethod<scalar>> oneByTimeScaleAverage_;
 
 
 public:
@@ -90,9 +90,9 @@ public:
         Relaxation(const Relaxation<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<DampingModel<CloudType> > clone() const
+        virtual autoPtr<DampingModel<CloudType>> clone() const
         {
-            return autoPtr<DampingModel<CloudType> >
+            return autoPtr<DampingModel<CloudType>>
             (
                 new Relaxation<CloudType>(*this)
             );
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Relaxation.C"
+    #include "Relaxation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C
index eb52e2e5c5b35103ea10943ef32047f816b8c1fa..50cad5b9dcb861e3ffdf6d1802a42de0be32011c 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ Foam::IsotropyModel<CloudType>::~IsotropyModel()
 // * * * * * * * * * * * * * * * *  Selector * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::IsotropyModel<CloudType> >
+Foam::autoPtr<Foam::IsotropyModel<CloudType>>
 Foam::IsotropyModel<CloudType>::New
 (
     const dictionary& dict,
@@ -102,7 +102,7 @@ Foam::IsotropyModel<CloudType>::New
     }
 
     return
-        autoPtr<IsotropyModel<CloudType> >
+        autoPtr<IsotropyModel<CloudType>>
         (
             cstrIter()(dict, owner)
         );
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H
index 3523effa8f8a65547c3f8e2418a1cbc60d6c372b..3e5f5d8f4cf2250abe41a0776af6ed841ba25d9f 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/IsotropyModel/IsotropyModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ public:
         IsotropyModel(const IsotropyModel<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<IsotropyModel<CloudType> > clone() const = 0;
+        virtual autoPtr<IsotropyModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -109,7 +109,7 @@ public:
 
 
     //- Selector
-    static autoPtr<IsotropyModel<CloudType> > New
+    static autoPtr<IsotropyModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -156,14 +156,14 @@ public:
                                                                                \
     Foam::IsotropyModel<MPPICCloudType>::                                      \
         adddictionaryConstructorToTable                                        \
-        <Foam::IsotropyModels::SS<MPPICCloudType> >                            \
+        <Foam::IsotropyModels::SS<MPPICCloudType>>                             \
             add##SS##CloudType##MPPICCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IsotropyModel.C"
+    #include "IsotropyModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/NoIsotropy/NoIsotropy.H b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/NoIsotropy/NoIsotropy.H
index 749b77ae781d740e1df5057c2adc88a5eb76b8d2..c3b1bca064039b4752265f02a0c51190eecd30ae 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/NoIsotropy/NoIsotropy.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/NoIsotropy/NoIsotropy.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,9 +66,9 @@ public:
         NoIsotropy(const NoIsotropy<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<IsotropyModel<CloudType> > clone() const
+        virtual autoPtr<IsotropyModel<CloudType>> clone() const
         {
-            return autoPtr<IsotropyModel<CloudType> >
+            return autoPtr<IsotropyModel<CloudType>>
             (
                 new NoIsotropy<CloudType>(*this)
             );
@@ -97,7 +97,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoIsotropy.C"
+    #include "NoIsotropy.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.C b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.C
index 820b6d2ecf42ced1142c1e4ac9580003ab571c68..6aa5354455416db0f41e045a98c4bda4aa4db0f9 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,38 +103,38 @@ void Foam::IsotropyModels::Stochastic<CloudType>::calculate()
     const scalar oneBySqrtThree = sqrt(1.0/3.0);
 
     const AveragingMethod<scalar>& volumeAverage =
-        mesh.lookupObject<AveragingMethod<scalar> >
+        mesh.lookupObject<AveragingMethod<scalar>>
         (
             this->owner().name() + ":volumeAverage"
         );
     const AveragingMethod<scalar>& radiusAverage =
-        mesh.lookupObject<AveragingMethod<scalar> >
+        mesh.lookupObject<AveragingMethod<scalar>>
         (
             this->owner().name() + ":radiusAverage"
         );
     const AveragingMethod<vector>& uAverage =
-        mesh.lookupObject<AveragingMethod<vector> >
+        mesh.lookupObject<AveragingMethod<vector>>
         (
             this->owner().name() + ":uAverage"
         );
     const AveragingMethod<scalar>& uSqrAverage =
-        mesh.lookupObject<AveragingMethod<scalar> >
+        mesh.lookupObject<AveragingMethod<scalar>>
         (
             this->owner().name() + ":uSqrAverage"
         );
     const AveragingMethod<scalar>& frequencyAverage =
-        mesh.lookupObject<AveragingMethod<scalar> >
+        mesh.lookupObject<AveragingMethod<scalar>>
         (
             this->owner().name() + ":frequencyAverage"
         );
     const AveragingMethod<scalar>& massAverage =
-        mesh.lookupObject<AveragingMethod<scalar> >
+        mesh.lookupObject<AveragingMethod<scalar>>
         (
             this->owner().name() + ":massAverage"
         );
 
     // calculate time scales and pdf exponent
-    autoPtr<AveragingMethod<scalar> > exponentAveragePtr
+    autoPtr<AveragingMethod<scalar>> exponentAveragePtr
     (
         AveragingMethod<scalar>::New
         (
@@ -183,7 +183,7 @@ void Foam::IsotropyModels::Stochastic<CloudType>::calculate()
     }
 
     // correction velocity averages
-    autoPtr<AveragingMethod<vector> > uTildeAveragePtr
+    autoPtr<AveragingMethod<vector>> uTildeAveragePtr
     (
         AveragingMethod<vector>::New
         (
@@ -206,7 +206,7 @@ void Foam::IsotropyModels::Stochastic<CloudType>::calculate()
     }
     uTildeAverage.average(massAverage);
 
-    autoPtr<AveragingMethod<scalar> > uTildeSqrAveragePtr
+    autoPtr<AveragingMethod<scalar>> uTildeSqrAveragePtr
     (
         AveragingMethod<scalar>::New
         (
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.H b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.H
index f1e06f64de2b9c51206427a07451460bf4ff95f7..ed9031cb81560661a22a8efb5a7858cd0ad21668 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/IsotropyModels/Stochastic/Stochastic.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,9 +91,9 @@ public:
         Stochastic(const Stochastic<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<IsotropyModel<CloudType> > clone() const
+        virtual autoPtr<IsotropyModel<CloudType>> clone() const
         {
-            return autoPtr<IsotropyModel<CloudType> >
+            return autoPtr<IsotropyModel<CloudType>>
             (
                 new Stochastic<CloudType>(*this)
             );
@@ -119,7 +119,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Stochastic.C"
+    #include "Stochastic.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C
index 41707410a698728411a38dc7e7094733ecc8b7d6..f4d5d0fa582ec561212371e8b869323a517ba405 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,22 +81,22 @@ void Foam::PackingModels::Explicit<CloudType>::cacheFields(const bool store)
         const word& cloudName = this->owner().name();
 
         const AveragingMethod<scalar>& volumeAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":volumeAverage"
             );
         const AveragingMethod<scalar>& rhoAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":rhoAverage"
             );
         const AveragingMethod<vector>& uAverage =
-            mesh.lookupObject<AveragingMethod<vector> >
+            mesh.lookupObject<AveragingMethod<vector>>
             (
                 cloudName + ":uAverage"
             );
         const AveragingMethod<scalar>& uSqrAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":uSqrAverage"
             );
@@ -162,7 +162,7 @@ Foam::vector Foam::PackingModels::Explicit<CloudType>::velocityCorrection
     const vector uRelative = p.U() - uMean;
 
     // correction velocity
-    vector dU = vector::zero;
+    vector dU = Zero;
 
     //// existing forces
     //const scalar Re = p.Re(p.U(), p.d(), p.rhoc(), p.muc());
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.H b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.H
index 15937ffb69aa73afd85c70a453f32d8e987081b9..d5dd9cdbba5593400dad81e4d860e61a30e8e04b 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Explicit/Explicit.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ private:
         const AveragingMethod<vector>* uAverage_;
 
         //- Stress average field
-        autoPtr<AveragingMethod<scalar> > stressAverage_;
+        autoPtr<AveragingMethod<scalar>> stressAverage_;
 
         //- Correction limiter
         autoPtr<CorrectionLimitingMethod> correctionLimiting_;
@@ -98,9 +98,9 @@ public:
         Explicit(const Explicit<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<PackingModel<CloudType> > clone() const
+        virtual autoPtr<PackingModel<CloudType>> clone() const
         {
-            return autoPtr<PackingModel<CloudType> >
+            return autoPtr<PackingModel<CloudType>>
             (
                 new Explicit<CloudType>(*this)
             );
@@ -133,7 +133,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Explicit.C"
+    #include "Explicit.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C
index 43d7745abc6cec11dae25cbdd817fd581353c49c..f5d7cfbb7ba439284227878100c33451afafa3bf 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,6 +30,7 @@ License
 #include "fvmLaplacian.H"
 #include "fvcReconstruct.H"
 #include "volPointInterpolation.H"
+#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -43,15 +44,26 @@ Foam::PackingModels::Implicit<CloudType>::Implicit
     PackingModel<CloudType>(dict, owner, typeName),
     alpha_
     (
-        this->owner().name() + ":alpha",
-        this->owner().theta()
+        IOobject
+        (
+            this->owner().name() + ":alpha",
+            this->owner().db().time().timeName(),
+            this->owner().mesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE
+        ),
+        this->owner().mesh(),
+        dimensionedScalar("zero", dimless, 0.0),
+        zeroGradientFvPatchScalarField::typeName
     ),
     phiCorrect_(NULL),
     uCorrect_(NULL),
+    applyLimiting_(this->coeffDict().lookup("applyLimiting")),
     applyGravity_(this->coeffDict().lookup("applyGravity")),
     alphaMin_(readScalar(this->coeffDict().lookup("alphaMin"))),
     rhoMin_(readScalar(this->coeffDict().lookup("rhoMin")))
 {
+    alpha_ = this->owner().theta();
     alpha_.oldTime();
 }
 
@@ -66,6 +78,7 @@ Foam::PackingModels::Implicit<CloudType>::Implicit
     alpha_(cm.alpha_),
     phiCorrect_(cm.phiCorrect_()),
     uCorrect_(cm.uCorrect_()),
+    applyLimiting_(cm.applyLimiting_),
     applyGravity_(cm.applyGravity_),
     alphaMin_(cm.alphaMin_),
     rhoMin_(cm.rhoMin_)
@@ -98,12 +111,17 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
         const volScalarField& rhoc = this->owner().rho();
 
         const AveragingMethod<scalar>& rhoAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":rhoAverage"
             );
+        const AveragingMethod<vector>& uAverage =
+            mesh.lookupObject<AveragingMethod<vector>>
+            (
+                cloudName + ":uAverage"
+            );
         const AveragingMethod<scalar>& uSqrAverage =
-            mesh.lookupObject<AveragingMethod<scalar> >
+            mesh.lookupObject<AveragingMethod<scalar>>
             (
                 cloudName + ":uSqrAverage"
             );
@@ -135,13 +153,6 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
         rho.internalField() = max(rhoAverage.internalField(), rhoMin_);
         rho.correctBoundaryConditions();
 
-        //Info << "       x: " << mesh.C().internalField().component(2) << endl;
-        //Info << "   alpha: " << alpha_.internalField() << endl;
-        //Info << "alphaOld: " << alpha_.oldTime().internalField() << endl;
-        //Info << "     rho: " << rho.internalField() << endl;
-        //Info << endl;
-
-
         // Stress field
         // ~~~~~~~~~~~~
 
@@ -172,6 +183,24 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
         tauPrime.correctBoundaryConditions();
 
 
+        // Gravity flux
+        // ~~~~~~~~~~~~
+
+        tmp<surfaceScalarField> phiGByA;
+
+        if (applyGravity_)
+        (
+            phiGByA = tmp<surfaceScalarField>
+            (
+                new surfaceScalarField
+                (
+                    "phiGByA",
+                    deltaT*(g & mesh.Sf())*fvc::interpolate(1.0 - rhoc/rho)
+                )
+            )
+        );
+
+
         // Implicit solution for the volume fraction
         // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -191,14 +220,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
 
         if (applyGravity_)
         {
-            surfaceScalarField
-                phiGByA
-                (
-                    "phiGByA",
-                    deltaT*(g & mesh.Sf())*fvc::interpolate(1.0 - rhoc/rho)
-                );
-
-            alphaEqn += fvm::div(phiGByA, alpha_);
+            alphaEqn += fvm::div(phiGByA(), alpha_);
         }
 
         alphaEqn.solve();
@@ -217,6 +239,67 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
             )
         );
 
+        // limit the correction flux
+        if (applyLimiting_)
+        {
+            volVectorField U
+            (
+                IOobject
+                (
+                    cloudName + ":U",
+                    this->owner().db().time().timeName(),
+                    mesh,
+                    IOobject::NO_READ,
+                    IOobject::NO_WRITE
+                ),
+                mesh,
+                dimensionedVector("zero", dimVelocity, Zero),
+                fixedValueFvPatchField<vector>::typeName
+            );
+            U.internalField() = uAverage.internalField();
+            U.correctBoundaryConditions();
+
+            surfaceScalarField phi
+            (
+                cloudName + ":phi",
+                linearInterpolate(U) & mesh.Sf()
+            );
+
+            if (applyGravity_)
+            {
+                phiCorrect_.ref() -= phiGByA();
+            }
+
+            forAll(phiCorrect_(), faceI)
+            {
+                // Current and correction fluxes
+                const scalar phiCurr = phi[faceI];
+                scalar& phiCorr = phiCorrect_.ref()[faceI];
+
+                // Don't limit if the correction is in the opposite direction to
+                // the flux. We need all the help we can get in this state.
+                if (phiCurr*phiCorr < 0)
+                {}
+
+                // If the correction and the flux are in the same direction then
+                // don't apply any more correction than is already present in
+                // the flux.
+                else if (phiCorr > 0)
+                {
+                    phiCorr = max(phiCorr - phiCurr, 0);
+                }
+                else
+                {
+                    phiCorr = min(phiCorr - phiCurr, 0);
+                }
+            }
+
+            if (applyGravity_)
+            {
+                phiCorrect_.ref() += phiGByA();
+            }
+        }
+
         // correction velocity
         uCorrect_ = tmp<volVectorField>
         (
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H
index 566fd95654bd98776f0ceae81826f43442f764ed..85e6c75d5cdb4ee674214d0f63b50420705c1643 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,8 +58,6 @@ class Implicit
 :
     public PackingModel<CloudType>
 {
-private:
-
     //- Private data
 
         //- Volume fraction field
@@ -71,6 +69,9 @@ private:
         //- Correction cell-centred velocity
         tmp<volVectorField> uCorrect_;
 
+        //- Flag to indicate whether implicit limiting is applied
+        Switch applyLimiting_;
+
         //- Flag to indicate whether gravity is applied
         Switch applyGravity_;
 
@@ -95,9 +96,9 @@ public:
         Implicit(const Implicit<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<PackingModel<CloudType> > clone() const
+        virtual autoPtr<PackingModel<CloudType>> clone() const
         {
-            return autoPtr<PackingModel<CloudType> >
+            return autoPtr<PackingModel<CloudType>>
             (
                 new Implicit<CloudType>(*this)
             );
@@ -130,7 +131,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Implicit.C"
+    #include "Implicit.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.C
index 92adbba777f9ab3ecaca7c038e30a8bb6d2ab309..bbd3327002a2f0b1934e2d25ae12215ccaba8660 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ Foam::vector Foam::PackingModels::NoPacking<CloudType>::velocityCorrection
     const scalar deltaT
 ) const
 {
-    return vector::zero;
+    return Zero;
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.H b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.H
index 67bb37bf5d435ecb32531bea87e8fb2ec2f23a7d..280dd0bb36cf972c789380cfd7c67b648d3ac6d9 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/NoPacking/NoPacking.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,9 +66,9 @@ public:
         NoPacking(const NoPacking<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<PackingModel<CloudType> > clone() const
+        virtual autoPtr<PackingModel<CloudType>> clone() const
         {
-            return autoPtr<PackingModel<CloudType> >
+            return autoPtr<PackingModel<CloudType>>
             (
                 new NoPacking<CloudType>(*this)
             );
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoPacking.C"
+    #include "NoPacking.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C
index bacf4d0bc9b087c043d356ef327477a7c7596d55..e412380d638494fabdd9b90ba389ac3c271dbd8f 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ Foam::PackingModel<CloudType>::~PackingModel()
 // * * * * * * * * * * * * * * * * Selector  * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::PackingModel<CloudType> >
+Foam::autoPtr<Foam::PackingModel<CloudType>>
 Foam::PackingModel<CloudType>::New
 (
     const dictionary& dict,
@@ -99,7 +99,7 @@ Foam::PackingModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<PackingModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<PackingModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.H b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.H
index 4258773a4922dc6aff464b4ab343e780f858dfb3..40e30198e662f3f81351f39a8bf7671209939af5 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/PackingModel/PackingModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ class ParticleStressModel;
 
 class CorrectionLimitingMethod;
 
-template <class Type>
+template<class Type>
 class AveragingMethod;
 
 /*---------------------------------------------------------------------------*\
@@ -108,7 +108,7 @@ public:
         PackingModel(const PackingModel<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<PackingModel<CloudType> > clone() const = 0;
+        virtual autoPtr<PackingModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -116,7 +116,7 @@ public:
 
 
     //- Selector
-    static autoPtr<PackingModel<CloudType> > New
+    static autoPtr<PackingModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -167,14 +167,14 @@ public:
                                                                                \
     Foam::PackingModel<MPPICCloudType>::                                       \
         adddictionaryConstructorToTable                                        \
-        <Foam::PackingModels::SS<MPPICCloudType> >                             \
+        <Foam::PackingModels::SS<MPPICCloudType>>                              \
             add##SS##CloudType##MPPICCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PackingModel.C"
+    #include "PackingModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C
index ec7715d230c093c8248dd8abefa32ab207b36809..2600555aa3e22f33da33eb6b65921f9418cbed5d 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ Foam::ParticleStressModels::HarrisCrighton::~HarrisCrighton()
 
 // * * * * * * * * * * * * * Privare Member Functions  * * * * * * * * * * * //
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::HarrisCrighton::denominator
 (
     const Field<scalar>& alpha
@@ -95,7 +95,7 @@ Foam::ParticleStressModels::HarrisCrighton::denominator
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::HarrisCrighton::tau
 (
     const Field<scalar>& alpha,
@@ -112,7 +112,7 @@ Foam::ParticleStressModels::HarrisCrighton::tau
 }
 
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::HarrisCrighton::dTaudTheta
 (
     const Field<scalar>& alpha,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.H b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.H
index 9fe56cc95423a7a46d32a464d16d36d40aa018cf..c2997f59ab318f4b5b7db9d49074911a6c36451e 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/HarrisCrighton/HarrisCrighton.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,7 +85,7 @@ class HarrisCrighton
     // Private member functions
 
         //- Return the limited denominator of the radial distribution function
-        tmp<Field<scalar> > denominator(const Field<scalar>& alpha) const;
+        tmp<Field<scalar>> denominator(const Field<scalar>& alpha) const;
 
 
 public:
@@ -119,7 +119,7 @@ public:
     //- Member Functions
 
         //- Collision stress
-        tmp<Field<scalar> > tau
+        tmp<Field<scalar>> tau
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
@@ -127,7 +127,7 @@ public:
         ) const;
 
         //- Collision stress derivaive w.r.t. the volume fraction
-        tmp<Field<scalar> > dTaudTheta
+        tmp<Field<scalar>> dTaudTheta
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C
index 90f36037733716a841d8e16778d8628a501acdf4..038d11284d2bcae170300b46dafa8a683aec3a2c 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ Foam::ParticleStressModels::Lun::~Lun()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::Lun::tau
 (
     const Field<scalar>& alpha,
@@ -84,7 +84,7 @@ Foam::ParticleStressModels::Lun::tau
     const Field<scalar>& uSqr
 ) const
 {
-    tmp<Field<scalar> > g0
+    tmp<Field<scalar>> g0
     (
         0.6
       / max
@@ -94,13 +94,13 @@ Foam::ParticleStressModels::Lun::tau
         )
     );
 
-    tmp<Field<scalar> > gT(uSqr/3.0);
+    tmp<Field<scalar>> gT(uSqr/3.0);
 
     return alpha*rho*(1.0 + alpha*(1.0 + e_)*g0)*gT;
 }
 
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::Lun::dTaudTheta
 (
     const Field<scalar>& alpha,
@@ -110,7 +110,7 @@ Foam::ParticleStressModels::Lun::dTaudTheta
 {
     NotImplemented;
 
-    return tmp<Field<scalar> >(NULL);
+    return tmp<Field<scalar>>(NULL);
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.H b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.H
index 02e686c0bcda61db213366548eea41aae742e92b..369639fa92ec6ce4ac5b77619c5e6f275a658e94 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ public:
     //- Member Functions
 
         //- Collision stress
-        tmp<Field<scalar> > tau
+        tmp<Field<scalar>> tau
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
@@ -119,7 +119,7 @@ public:
         ) const;
 
         //- Collision stress derivaive w.r.t. the volume fraction
-        tmp<Field<scalar> > dTaudTheta
+        tmp<Field<scalar>> dTaudTheta
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C
index 0f0c8d6556a1a8009aa7568d45f4364bd404f726..7f9509e8989221b089873cc63c8db82424f4dd07 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ Foam::scalar Foam::ParticleStressModel::alphaPacked() const
 }
 
 
-Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar> >
+Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
 Foam::ParticleStressModel::tau
 (
     const FieldField<Field, scalar>& alpha,
@@ -106,7 +106,7 @@ Foam::ParticleStressModel::tau
     const FieldField<Field, scalar>& uRms
 ) const
 {
-    tmp<FieldField<Field, scalar> > value
+    tmp<FieldField<Field, scalar>> value
     (
         new FieldField<Field, scalar>(alpha.size())
     );
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H
index 61b117c9f89e0045ea78a9e506c82cca47c4a5d7..477e76ef2e9d3b5195a8dbce4eb66dd935de7e3c 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/ParticleStressModel/ParticleStressModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,7 +112,7 @@ public:
         scalar alphaPacked() const;
 
         //- Collision stress
-        virtual tmp<Field<scalar> > tau
+        virtual tmp<Field<scalar>> tau
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
@@ -120,7 +120,7 @@ public:
         ) const = 0;
 
         //- Collision stress derivaive w.r.t. the volume fraction
-        virtual tmp<Field<scalar> > dTaudTheta
+        virtual tmp<Field<scalar>> dTaudTheta
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
@@ -128,7 +128,7 @@ public:
         ) const = 0;
 
         //- Collision stress using FieldFields
-        tmp<FieldField<Field, scalar> > tau
+        tmp<FieldField<Field, scalar>> tau
         (
             const FieldField<Field, scalar>& alpha,
             const FieldField<Field, scalar>& rho,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C
index 2ac8811fca75269affaddb0119ede31da9312b24..a589fc16ba8208a33d4b2aea72d48a74f6a3e85e 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ Foam::ParticleStressModels::exponential::~exponential()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::exponential::tau
 (
     const Field<scalar>& alpha,
@@ -90,7 +90,7 @@ Foam::ParticleStressModels::exponential::tau
 }
 
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::ParticleStressModels::exponential::dTaudTheta
 (
     const Field<scalar>& alpha,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.H b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.H
index 5d989622feb7cbb2d757e380092f10765e277f69..f99c6cc1d19cf8f93892c77607b29648f81ce286 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/exponential/exponential.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ public:
     //- Member Functions
 
         //- Collision stress
-        tmp<Field<scalar> > tau
+        tmp<Field<scalar>> tau
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
@@ -104,7 +104,7 @@ public:
         ) const;
 
         //- Collision stress derivaive w.r.t. the volume fraction
-        tmp<Field<scalar> > dTaudTheta
+        tmp<Field<scalar>> dTaudTheta
         (
             const Field<scalar>& alpha,
             const Field<scalar>& rho,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.H b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.H
index 6a8e6bef50c8350d30fc6986fd6d08db94a3ab2c..99ec3e99523fe405526e67c5babe71d1608676a7 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/TimeScaleModel/TimeScaleModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,7 +113,7 @@ public:
     //- Member Functions
 
         //- Time scale
-        virtual tmp<FieldField<Field, scalar> > oneByTau
+        virtual tmp<FieldField<Field, scalar>> oneByTau
         (
             const FieldField<Field, scalar>& alpha,
             const FieldField<Field, scalar>& r32,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.C b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.C
index eee7d5ab897ab482f69472ceadb1201612ef41a5..b9265b898c1b27bf334826f2f1632e8e1d036d8e 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ Foam::TimeScaleModels::equilibrium::~equilibrium()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar> >
+Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
 Foam::TimeScaleModels::equilibrium::oneByTau
 (
     const FieldField<Field, scalar>& alpha,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.H b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.H
index a8036d2711e3ede7a3b94035c2b875af28257e0d..808ac60b84ebcf5b6e6b32e86baf523aa59b0989 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/equilibrium/equilibrium.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,7 +92,7 @@ public:
     //- Member Functions
 
         //- Time scale
-        tmp<FieldField<Field, scalar> > oneByTau
+        tmp<FieldField<Field, scalar>> oneByTau
         (
             const FieldField<Field, scalar>& alpha,
             const FieldField<Field, scalar>& r32,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.C b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.C
index bb8219e2aeb43963969b2a206b1ada55cf18bcd1..9beb2f35ce84a7e9c6420c375b4bc49cf214d9a3 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ Foam::TimeScaleModels::isotropic::~isotropic()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar> >
+Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
 Foam::TimeScaleModels::isotropic::oneByTau
 (
     const FieldField<Field, scalar>& alpha,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.H b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.H
index 31e0fc3ef126dda20d97b09f1ffa226dfc8056dd..c056f9449c1f3a7d789715ae5c2c7b99c4035ac7 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/isotropic/isotropic.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,7 +92,7 @@ public:
     //- Member Functions
 
         //- Time scale
-        tmp<FieldField<Field, scalar> > oneByTau
+        tmp<FieldField<Field, scalar>> oneByTau
         (
             const FieldField<Field, scalar>& alpha,
             const FieldField<Field, scalar>& r32,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.C b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.C
index d7462e813a53213e369fc8ea35213fdf83d3b6a1..0521000ec0e778d348632de6921169009202fb28 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.C
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,7 +72,7 @@ Foam::TimeScaleModels::nonEquilibrium::~nonEquilibrium()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar> >
+Foam::tmp<Foam::FieldField<Foam::Field, Foam::scalar>>
 Foam::TimeScaleModels::nonEquilibrium::oneByTau
 (
     const FieldField<Field, scalar>& alpha,
diff --git a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.H b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.H
index 1c48f9bed13ea98279b135861f946359af2261f2..ef4e9a93d7b7a027f52cc383da7748b9c76c56ce 100644
--- a/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.H
+++ b/src/lagrangian/intermediate/submodels/MPPIC/TimeScaleModels/nonEquilibrium/nonEquilibrium.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ public:
     //- Member Functions
 
         //- Time scale
-        tmp<FieldField<Field, scalar> > oneByTau
+        tmp<FieldField<Field, scalar>> oneByTau
         (
             const FieldField<Field, scalar>& alpha,
             const FieldField<Field, scalar>& r32,
diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H
index 97aa1c5c7c3ab925fb10bd3640ed764155287cd9..02cebfb4a221dd21bac15edce46e168c31eac835 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,7 +107,7 @@ public:
         CompositionModel(const CompositionModel<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CompositionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<CompositionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -115,7 +115,7 @@ public:
 
 
     //- Selector
-    static autoPtr<CompositionModel<CloudType> > New
+    static autoPtr<CompositionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -269,38 +269,38 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeCompositionModel(CloudType)                                       \
-                                                                              \
-    typedef Foam::CloudType::reactingCloudType reactingCloudType;             \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::CompositionModel<reactingCloudType>,                            \
-        0                                                                     \
-    );                                                                        \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            CompositionModel<reactingCloudType>,                              \
-            dictionary                                                        \
-        );                                                                    \
+#define makeCompositionModel(CloudType)                                        \
+                                                                               \
+    typedef Foam::CloudType::reactingCloudType reactingCloudType;              \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::CompositionModel<reactingCloudType>,                             \
+        0                                                                      \
+    );                                                                         \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            CompositionModel<reactingCloudType>,                               \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeCompositionModelType(SS, CloudType)                               \
-                                                                              \
-    typedef Foam::CloudType::reactingCloudType reactingCloudType;             \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<reactingCloudType>, 0);      \
-                                                                              \
-    Foam::CompositionModel<reactingCloudType>::                               \
-        adddictionaryConstructorToTable<Foam::SS<reactingCloudType> >         \
+#define makeCompositionModelType(SS, CloudType)                                \
+                                                                               \
+    typedef Foam::CloudType::reactingCloudType reactingCloudType;              \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<reactingCloudType>, 0);       \
+                                                                               \
+    Foam::CompositionModel<reactingCloudType>::                                \
+        adddictionaryConstructorToTable<Foam::SS<reactingCloudType>>           \
             add##SS##CloudType##reactingCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "CompositionModel.C"
+    #include "CompositionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C
index a21bcddea8c74b01a81a8c24c1d3d582ea37eb05..0323115fd799d2887254a79ada5ad4bcc2b5fe29 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::CompositionModel<CloudType> >
+Foam::autoPtr<Foam::CompositionModel<CloudType>>
 Foam::CompositionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::CompositionModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<CompositionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<CompositionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/NoComposition/NoComposition.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/NoComposition/NoComposition.H
index 716352dc74f5e213f6f635dc3e4e407e56c059f5..cea8a6aae0bef2cac8da4871b493bf6b73dc126c 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/NoComposition/NoComposition.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/NoComposition/NoComposition.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,9 +67,9 @@ public:
         NoComposition(const NoComposition<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CompositionModel<CloudType> > clone() const
+        virtual autoPtr<CompositionModel<CloudType>> clone() const
         {
-            return autoPtr<CompositionModel<CloudType> >
+            return autoPtr<CompositionModel<CloudType>>
             (
                 new NoComposition<CloudType>(*this)
             );
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoComposition.C"
+    #include "NoComposition.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H
index 1f2e1f8104d41d75dba2984cfe1aa188de5c3ca5..942ef85acc8278469d5e3f29ef5ee2641fb1c275 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ public:
         SingleMixtureFraction(const SingleMixtureFraction<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CompositionModel<CloudType> > clone() const
+        virtual autoPtr<CompositionModel<CloudType>> clone() const
         {
-            return autoPtr<CompositionModel<CloudType> >
+            return autoPtr<CompositionModel<CloudType>>
             (
                 new SingleMixtureFraction<CloudType>(*this)
             );
@@ -132,7 +132,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SingleMixtureFraction.C"
+    #include "SingleMixtureFraction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H
index 239384cfb2a948f9f63814bb878e2023e914a252..35dce6e4017565f710e432b77b10dfa09fb57f30 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,9 +87,9 @@ public:
         SinglePhaseMixture(const SinglePhaseMixture<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<CompositionModel<CloudType> > clone() const
+        virtual autoPtr<CompositionModel<CloudType>> clone() const
         {
-            return autoPtr<CompositionModel<CloudType> >
+            return autoPtr<CompositionModel<CloudType>>
             (
                 new SinglePhaseMixture<CloudType>(*this)
             );
@@ -130,7 +130,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SinglePhaseMixture.C"
+    #include "SinglePhaseMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H
index 654109c509b8bc96c1b3cdfda46d94d1259da086..08b9d327559c069c1a8295ff53ce1c800056fd9c 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new ReactingLookupTableInjection<CloudType>(*this)
             );
@@ -188,7 +188,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReactingLookupTableInjection.C"
+    #include "ReactingLookupTableInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H
index f1c3d9583006510492322e474f5e164b5637ef67..8416919bca362670cd3fcea559b8f8fbfb91f9c3 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,9 +90,9 @@ public:
         LiquidEvaporation(const LiquidEvaporation<CloudType>& pcm);
 
         //- Construct and return a clone
-        virtual autoPtr<PhaseChangeModel<CloudType> > clone() const
+        virtual autoPtr<PhaseChangeModel<CloudType>> clone() const
         {
-            return autoPtr<PhaseChangeModel<CloudType> >
+            return autoPtr<PhaseChangeModel<CloudType>>
             (
                 new LiquidEvaporation<CloudType>(*this)
             );
@@ -146,7 +146,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LiquidEvaporation.C"
+    #include "LiquidEvaporation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H
index f92af8147d08a6c8e7d61917ad46851056a12a2b..b92f44e7ab52e6f0d66423bcbae6801cb6a2180d 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,9 +100,9 @@ public:
         LiquidEvaporationBoil(const LiquidEvaporationBoil<CloudType>& pcm);
 
         //- Construct and return a clone
-        virtual autoPtr<PhaseChangeModel<CloudType> > clone() const
+        virtual autoPtr<PhaseChangeModel<CloudType>> clone() const
         {
-            return autoPtr<PhaseChangeModel<CloudType> >
+            return autoPtr<PhaseChangeModel<CloudType>>
             (
                 new LiquidEvaporationBoil<CloudType>(*this)
             );
@@ -156,7 +156,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LiquidEvaporationBoil.C"
+    #include "LiquidEvaporationBoil.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H
index f0d3e459fdfd331958f6ea3005d099672eb018ac..7b1d714c22d6dbf83eeacd3111f88b864949df4d 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,9 +62,9 @@ public:
         NoPhaseChange(const NoPhaseChange<CloudType>& pcm);
 
         //- Construct and return a clone
-        virtual autoPtr<PhaseChangeModel<CloudType> > clone() const
+        virtual autoPtr<PhaseChangeModel<CloudType>> clone() const
         {
-            return autoPtr<PhaseChangeModel<CloudType> >
+            return autoPtr<PhaseChangeModel<CloudType>>
             (
                 new NoPhaseChange<CloudType>(*this)
             );
@@ -106,7 +106,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoPhaseChange.C"
+    #include "NoPhaseChange.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H
index 6c6ebce20b967d4ac156b990344fbc16483f4fb9..91f45b595f27a109c3417649d1509deb181a1c75 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H
+++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,7 +129,7 @@ public:
         PhaseChangeModel(const PhaseChangeModel<CloudType>& pcm);
 
         //- Construct and return a clone
-        virtual autoPtr<PhaseChangeModel<CloudType> > clone() const = 0;
+        virtual autoPtr<PhaseChangeModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -137,7 +137,7 @@ public:
 
 
     //- Selector
-    static autoPtr<PhaseChangeModel<CloudType> > New
+    static autoPtr<PhaseChangeModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -201,38 +201,38 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makePhaseChangeModel(CloudType)                                       \
-                                                                              \
-    typedef Foam::CloudType::reactingCloudType reactingCloudType;             \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::PhaseChangeModel<reactingCloudType>,                            \
-        0                                                                     \
-    );                                                                        \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            PhaseChangeModel<reactingCloudType>,                              \
-            dictionary                                                        \
-        );                                                                    \
+#define makePhaseChangeModel(CloudType)                                        \
+                                                                               \
+    typedef Foam::CloudType::reactingCloudType reactingCloudType;              \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::PhaseChangeModel<reactingCloudType>,                             \
+        0                                                                      \
+    );                                                                         \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            PhaseChangeModel<reactingCloudType>,                               \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makePhaseChangeModelType(SS, CloudType)                               \
-                                                                              \
-    typedef Foam::CloudType::reactingCloudType reactingCloudType;             \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<reactingCloudType>, 0);      \
-                                                                              \
-    Foam::PhaseChangeModel<reactingCloudType>::                               \
-        adddictionaryConstructorToTable<Foam::SS<reactingCloudType> >         \
+#define makePhaseChangeModelType(SS, CloudType)                                \
+                                                                               \
+    typedef Foam::CloudType::reactingCloudType reactingCloudType;              \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<reactingCloudType>, 0);       \
+                                                                               \
+    Foam::PhaseChangeModel<reactingCloudType>::                                \
+        adddictionaryConstructorToTable<Foam::SS<reactingCloudType>>           \
             add##SS##CloudType##reactingCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PhaseChangeModel.C"
+    #include "PhaseChangeModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C
index dcacd8e4b6dea75e4bffd9dfbb16e6303effee20..bf8ff340bcb7d8e88fb93c7d064d123555d62489 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::PhaseChangeModel<CloudType> >
+Foam::autoPtr<Foam::PhaseChangeModel<CloudType>>
 Foam::PhaseChangeModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::PhaseChangeModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<PhaseChangeModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<PhaseChangeModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H
index 4b61de316d6add07753afe6a82ee60278b7bf995..581c647ffcadb12f32e8929be7399fa5d3ff0336 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,7 +53,7 @@ class ConstantRateDevolatilisation
         // Model constants
 
             //- List of volatile data - (name A0)
-            List<Tuple2<word, scalar> > volatileData_;
+            List<Tuple2<word, scalar>> volatileData_;
 
             //- List of initial volatile mass fractions
             List<scalar> YVolatile0_;
@@ -85,9 +85,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<DevolatilisationModel<CloudType> > clone() const
+        virtual autoPtr<DevolatilisationModel<CloudType>> clone() const
         {
-            return autoPtr<DevolatilisationModel<CloudType> >
+            return autoPtr<DevolatilisationModel<CloudType>>
             (
                 new ConstantRateDevolatilisation<CloudType>(*this)
             );
@@ -124,7 +124,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ConstantRateDevolatilisation.C"
+    #include "ConstantRateDevolatilisation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H
index 334d757b92a9358e4d1ff63a785abb8eeeef47bb..096b96e490c1c72d78221e65c65280637ebc0f02 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ public:
         DevolatilisationModel(const DevolatilisationModel<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DevolatilisationModel<CloudType> > clone() const = 0;
+        virtual autoPtr<DevolatilisationModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -107,7 +107,7 @@ public:
 
 
     //- Selector
-    static autoPtr<DevolatilisationModel<CloudType> > New
+    static autoPtr<DevolatilisationModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -148,42 +148,42 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeDevolatilisationModel(CloudType)                                  \
-                                                                              \
-    typedef Foam::CloudType::reactingMultiphaseCloudType                      \
-        reactingMultiphaseCloudType;                                          \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::DevolatilisationModel<reactingMultiphaseCloudType>,             \
-        0                                                                     \
-    );                                                                        \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            DevolatilisationModel<reactingMultiphaseCloudType>,               \
-            dictionary                                                        \
-        );                                                                    \
+#define makeDevolatilisationModel(CloudType)                                   \
+                                                                               \
+    typedef Foam::CloudType::reactingMultiphaseCloudType                       \
+        reactingMultiphaseCloudType;                                           \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::DevolatilisationModel<reactingMultiphaseCloudType>,              \
+        0                                                                      \
+    );                                                                         \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            DevolatilisationModel<reactingMultiphaseCloudType>,                \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeDevolatilisationModelType(SS, CloudType)                          \
-                                                                              \
-    typedef Foam::CloudType::reactingMultiphaseCloudType                      \
-        reactingMultiphaseCloudType;                                          \
-    defineNamedTemplateTypeNameAndDebug                                       \
-        (Foam::SS<reactingMultiphaseCloudType>, 0);                           \
-                                                                              \
-    Foam::DevolatilisationModel<reactingMultiphaseCloudType>::                \
-        adddictionaryConstructorToTable                                       \
-        <Foam::SS<reactingMultiphaseCloudType> >                              \
+#define makeDevolatilisationModelType(SS, CloudType)                           \
+                                                                               \
+    typedef Foam::CloudType::reactingMultiphaseCloudType                       \
+        reactingMultiphaseCloudType;                                           \
+    defineNamedTemplateTypeNameAndDebug                                        \
+        (Foam::SS<reactingMultiphaseCloudType>, 0);                            \
+                                                                               \
+    Foam::DevolatilisationModel<reactingMultiphaseCloudType>::                 \
+        adddictionaryConstructorToTable                                        \
+        <Foam::SS<reactingMultiphaseCloudType>>                                \
         add##SS##CloudType##reactingMultiphaseCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DevolatilisationModel.C"
+    #include "DevolatilisationModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C
index 8e7970ac49ff7c8e48a248cadb690f437a19b581..4388b0498670e6998c858a72085a9387802e0a1c 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::DevolatilisationModel<CloudType> >
+Foam::autoPtr<Foam::DevolatilisationModel<CloudType>>
 Foam::DevolatilisationModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::DevolatilisationModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<DevolatilisationModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<DevolatilisationModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H
index dab9b47dab16c65885196d50d76fc35ab5d5b90b..804e09c88a07f0c83951425cd94c0c2cf5e85822 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,9 +63,9 @@ public:
         NoDevolatilisation(const NoDevolatilisation<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DevolatilisationModel<CloudType> > clone() const
+        virtual autoPtr<DevolatilisationModel<CloudType>> clone() const
         {
-            return autoPtr<DevolatilisationModel<CloudType> >
+            return autoPtr<DevolatilisationModel<CloudType>>
             (
                 new NoDevolatilisation<CloudType>(*this)
             );
@@ -105,7 +105,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoDevolatilisation.C"
+    #include "NoDevolatilisation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H
index 6b4802c8f655cc05bae95dc56587b33631656eee..78f170fea086062102a395917daef6cd3e9e42be 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -210,9 +210,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<DevolatilisationModel<CloudType> > clone() const
+        virtual autoPtr<DevolatilisationModel<CloudType>> clone() const
         {
-            return autoPtr<DevolatilisationModel<CloudType> >
+            return autoPtr<DevolatilisationModel<CloudType>>
             (
                 new SingleKineticRateDevolatilisation<CloudType>(*this)
             );
@@ -249,7 +249,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SingleKineticRateDevolatilisation.C"
+    #include "SingleKineticRateDevolatilisation.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H
index 81f41d42ded505580b184d66fb714fb504a65ea6..6d1f9b7f2eb4b5bb054458b5f5f7a8244480cc17 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -123,9 +123,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new ReactingMultiphaseLookupTableInjection<CloudType>(*this)
             );
@@ -190,7 +190,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReactingMultiphaseLookupTableInjection.C"
+    #include "ReactingMultiphaseLookupTableInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.H
index 5d02ad48430d61c917773423658cf729c27f2071..d5917f440b794049b4dace54c026552abdfb099e 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,9 +80,9 @@ public:
         SuppressionCollision(const SuppressionCollision<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const
+        virtual autoPtr<StochasticCollisionModel<CloudType>> clone() const
         {
-            return autoPtr<StochasticCollisionModel<CloudType> >
+            return autoPtr<StochasticCollisionModel<CloudType>>
             (
                 new SuppressionCollision<CloudType>(*this)
             );
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SuppressionCollision.C"
+    #include "SuppressionCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H
index ae577e705becb66993b8ad2ab2f5d2120fdc984f..36e0c54f739b64d1a8d5d1e2209a5d22264cf552 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,9 +62,9 @@ public:
         NoSurfaceReaction(const NoSurfaceReaction<CloudType>& srm);
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceReactionModel<CloudType> >
+            return autoPtr<SurfaceReactionModel<CloudType>>
             (
                 new NoSurfaceReaction<CloudType>(*this)
             );
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoSurfaceReaction.C"
+    #include "NoSurfaceReaction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H
index a490a243238301a57183859011ad82406d9b4625..60f860c33c1b16774931d3ed3105d8eae972085d 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ public:
         SurfaceReactionModel(const SurfaceReactionModel<CloudType>& srm);
 
         //- Construct and return a clone
-        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<SurfaceReactionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -109,7 +109,7 @@ public:
 
 
     //- Selector
-    static autoPtr<SurfaceReactionModel<CloudType> > New
+    static autoPtr<SurfaceReactionModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& cloud
@@ -158,42 +158,42 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSurfaceReactionModel(CloudType)                                   \
-                                                                              \
-    typedef Foam::CloudType::reactingMultiphaseCloudType                      \
-        reactingMultiphaseCloudType;                                          \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::SurfaceReactionModel<reactingMultiphaseCloudType>,              \
-        0                                                                     \
-    );                                                                        \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            SurfaceReactionModel<reactingMultiphaseCloudType>,                \
-            dictionary                                                        \
-        );                                                                    \
+#define makeSurfaceReactionModel(CloudType)                                    \
+                                                                               \
+    typedef Foam::CloudType::reactingMultiphaseCloudType                       \
+        reactingMultiphaseCloudType;                                           \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::SurfaceReactionModel<reactingMultiphaseCloudType>,               \
+        0                                                                      \
+    );                                                                         \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            SurfaceReactionModel<reactingMultiphaseCloudType>,                 \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeSurfaceReactionModelType(SS, CloudType)                           \
-                                                                              \
-    typedef Foam::CloudType::reactingMultiphaseCloudType                      \
-        reactingMultiphaseCloudType;                                          \
-    defineNamedTemplateTypeNameAndDebug                                       \
-        (Foam::SS<reactingMultiphaseCloudType>, 0);                           \
-                                                                              \
-    Foam::SurfaceReactionModel<reactingMultiphaseCloudType>::                 \
-        adddictionaryConstructorToTable                                       \
-        <Foam::SS<reactingMultiphaseCloudType> >                              \
+#define makeSurfaceReactionModelType(SS, CloudType)                            \
+                                                                               \
+    typedef Foam::CloudType::reactingMultiphaseCloudType                       \
+        reactingMultiphaseCloudType;                                           \
+    defineNamedTemplateTypeNameAndDebug                                        \
+        (Foam::SS<reactingMultiphaseCloudType>, 0);                            \
+                                                                               \
+    Foam::SurfaceReactionModel<reactingMultiphaseCloudType>::                  \
+        adddictionaryConstructorToTable                                        \
+        <Foam::SS<reactingMultiphaseCloudType>>                                \
         add##SS##CloudType##reactingMultiphaseCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SurfaceReactionModel.C"
+    #include "SurfaceReactionModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C
index 935fd37e606623e0248aa8245f020b3e1f3c566f..4fd894b93c96745c78780eca8eb10b18bbc25bb6 100644
--- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C
+++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::SurfaceReactionModel<CloudType> >
+Foam::autoPtr<Foam::SurfaceReactionModel<CloudType>>
 Foam::SurfaceReactionModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::SurfaceReactionModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<SurfaceReactionModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<SurfaceReactionModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H
index b2dc21c5282b2440bff6582d56c492ca67d9d9c4..e31eaaf3495480a41d04be7a1cbec40ec7c8d817 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ public:
         HeatTransferModel(const HeatTransferModel<CloudType>& htm);
 
         //- Construct and return a clone
-        virtual autoPtr<HeatTransferModel<CloudType> > clone() const = 0;
+        virtual autoPtr<HeatTransferModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -105,7 +105,7 @@ public:
 
 
     //- Selector
-    static autoPtr<HeatTransferModel<CloudType> > New
+    static autoPtr<HeatTransferModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -147,38 +147,38 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeHeatTransferModel(CloudType)                                      \
-                                                                              \
-    typedef Foam::CloudType::thermoCloudType thermoCloudType;                 \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::HeatTransferModel<thermoCloudType>,                             \
-        0                                                                     \
-    );                                                                        \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            HeatTransferModel<thermoCloudType>,                               \
-            dictionary                                                        \
-        );                                                                    \
+#define makeHeatTransferModel(CloudType)                                       \
+                                                                               \
+    typedef Foam::CloudType::thermoCloudType thermoCloudType;                  \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::HeatTransferModel<thermoCloudType>,                              \
+        0                                                                      \
+    );                                                                         \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            HeatTransferModel<thermoCloudType>,                                \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeHeatTransferModelType(SS, CloudType)                              \
-                                                                              \
-    typedef Foam::CloudType::thermoCloudType thermoCloudType;                 \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<thermoCloudType>, 0);        \
-                                                                              \
-    Foam::HeatTransferModel<thermoCloudType>::                                \
-        adddictionaryConstructorToTable<Foam::SS<thermoCloudType> >           \
+#define makeHeatTransferModelType(SS, CloudType)                               \
+                                                                               \
+    typedef Foam::CloudType::thermoCloudType thermoCloudType;                  \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<thermoCloudType>, 0);         \
+                                                                               \
+    Foam::HeatTransferModel<thermoCloudType>::                                 \
+        adddictionaryConstructorToTable<Foam::SS<thermoCloudType>>             \
             add##SS##CloudType##thermoCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "HeatTransferModel.C"
+    #include "HeatTransferModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C
index 609a317e38e4a3a28751ebcdb79288d76fbd7312..6fae8667d23f329915a1fdb34fc12bd1bd35cf13 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::HeatTransferModel<CloudType> >
+Foam::autoPtr<Foam::HeatTransferModel<CloudType>>
 Foam::HeatTransferModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::HeatTransferModel<CloudType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<HeatTransferModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<HeatTransferModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H
index 6059489ab4c8d4164bfb1c6fd3fe3c5a18db9aca..b72648e5be71bbc7bb2be940a6fa3fac9bafb402 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,9 +63,9 @@ public:
         NoHeatTransfer(const NoHeatTransfer<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<HeatTransferModel<CloudType> > clone() const
+        virtual autoPtr<HeatTransferModel<CloudType>> clone() const
         {
-            return autoPtr<HeatTransferModel<CloudType> >
+            return autoPtr<HeatTransferModel<CloudType>>
             (
                 new NoHeatTransfer<CloudType>(*this)
             );
@@ -96,7 +96,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoHeatTransfer.C"
+    #include "NoHeatTransfer.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H
index d7669e4da6dd51fbe18d699591c58f8b6b3c4909..11a57a0f2d4f5df5ae7b28be54789f787681bba0 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,9 +64,9 @@ public:
         RanzMarshall(const RanzMarshall<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<HeatTransferModel<CloudType> > clone() const
+        virtual autoPtr<HeatTransferModel<CloudType>> clone() const
         {
-            return autoPtr<HeatTransferModel<CloudType> >
+            return autoPtr<HeatTransferModel<CloudType>>
             (
                 new RanzMarshall<CloudType>(*this)
             );
@@ -97,7 +97,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "RanzMarshall.C"
+    #include "RanzMarshall.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H
index 42c48f290dd88da1ce6b60f39c696c92fd2b4378..0f77e61be2a96b35b158315e0a2194c322975815 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone using supplied owner cloud
-        virtual autoPtr<InjectionModel<CloudType> > clone() const
+        virtual autoPtr<InjectionModel<CloudType>> clone() const
         {
-            return autoPtr<InjectionModel<CloudType> >
+            return autoPtr<InjectionModel<CloudType>>
             (
                 new ThermoLookupTableInjection<CloudType>(*this)
             );
@@ -191,7 +191,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ThermoLookupTableInjection.C"
+    #include "ThermoLookupTableInjection.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
index 2aa0da83ab0319999f1fd6dc7360ca8028e3d0e6..717a71c0348f60543b2fada9f6a3658540aad2ae 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ Foam::vector Foam::ThermoSurfaceFilm<CloudType>::tangentVector
     const vector& v
 ) const
 {
-    vector tangent = vector::zero;
+    vector tangent = Zero;
     scalar magTangent = 0.0;
 
     while (magTangent < SMALL)
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H
index dd434f1b36e92e95060e3f310d001f00bc286404..b6fb8f1a118a7f390c1b61ed6e0e1472cac16b26 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -254,9 +254,9 @@ public:
         ThermoSurfaceFilm(const ThermoSurfaceFilm<CloudType>& sfm);
 
         //- Construct and return a clone using supplied owner cloud
-        virtual autoPtr<SurfaceFilmModel<CloudType> > clone() const
+        virtual autoPtr<SurfaceFilmModel<CloudType>> clone() const
         {
-            return autoPtr<SurfaceFilmModel<CloudType> >
+            return autoPtr<SurfaceFilmModel<CloudType>>
             (
                 new ThermoSurfaceFilm<CloudType>(*this)
             );
@@ -295,7 +295,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ThermoSurfaceFilm.C"
+    #include "ThermoSurfaceFilm.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
index 56153ff88bcd4f3c19cddef902815a0e28726370..bf3a35272bd489105f436f38b01e1661bee706f0 100644
--- a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
+++ b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const
             mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
         );
 
-        ta() += tc.ap();
+        ta.ref() += tc.ap();
     }
 
     return ta;
@@ -155,7 +155,7 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const
             mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
         );
 
-        tE() += tc.Ep();
+        tE.ref() += tc.Ep();
     }
 
     // Total emission is 4 times the projected emission
diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C
index aa38692a769249afbc881bf6310787b2daf60027..0f88407b4e7b5cbd332e40e0426978a2200f9046 100644
--- a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C
+++ b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ Foam::radiation::cloudScatter::sigmaEff() const
             mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
         );
 
-        tsigma() += tc.sigmap();
+        tsigma.ref() += tc.sigmap();
     }
 
     return 3.0*tsigma;
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
index 2020afcadc4c5e74278d1465fee2dc68d84bbced..b8572066726b0c9eab0f62e98808b8c33dfe25df 100755
--- a/src/lagrangian/molecularDynamics/Allwmake
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -10,4 +10,4 @@ wmake $targetType potential
 wmake $targetType molecularMeasurements
 wmake $targetType molecule
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C
index f04b7363a45f1292179d42c0b4f144fc98b9d355..895ae8bfd0c0e43bc3d869c186c3e26104f4db6a 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ void Foam::bufferedAccumulator<Type>::accumulateAndResetBuffer(const label b)
 
     averagesTaken_++;
 
-    (*this)[b] = Field<Type>(bufferLength(), pTraits<Type>::zero);
+    (*this)[b] = Field<Type>(bufferLength(), Zero);
 
     bufferOffsets_[b] = 0;
 }
@@ -52,7 +52,7 @@ void Foam::bufferedAccumulator<Type>::accumulateAndResetBuffer(const label b)
 template<class Type>
 Foam::bufferedAccumulator<Type>::bufferedAccumulator()
 :
-    List< Field<Type> >(),
+    List<Field<Type>>(),
     averagesTaken_(),
     bufferOffsets_()
 {}
@@ -66,7 +66,7 @@ Foam::bufferedAccumulator<Type>::bufferedAccumulator
     const label bufferingInterval
 )
 :
-    List< Field<Type> >(),
+    List<Field<Type>>(),
     averagesTaken_(),
     bufferOffsets_()
 {
@@ -85,7 +85,7 @@ Foam::bufferedAccumulator<Type>::bufferedAccumulator
     const bufferedAccumulator<Type>& bA
 )
 :
-    List< Field<Type> >(static_cast< List< Field<Type> > >(bA)),
+    List<Field<Type>>(static_cast<List<Field<Type>>>(bA)),
     averagesTaken_(bA.averagesTaken()),
     bufferOffsets_(bA.bufferOffsets())
 {}
@@ -112,7 +112,7 @@ void Foam::bufferedAccumulator<Type>::setSizes
 
     forAll((*this), b)
     {
-        (*this)[b] = Field<Type>(bufferLength, pTraits<Type>::zero);
+        (*this)[b] = Field<Type>(bufferLength, Zero);
     }
 
     averagesTaken_ = 0;
@@ -187,7 +187,7 @@ Foam::Field<Type> Foam::bufferedAccumulator<Type>::averaged() const
             << ". Returning empty field."
             << endl;
 
-        return Field<Type>(bufferLength(), pTraits<Type>::zero);
+        return Field<Type>(bufferLength(), Zero);
     }
 }
 
@@ -195,7 +195,7 @@ Foam::Field<Type> Foam::bufferedAccumulator<Type>::averaged() const
 template<class Type>
 void Foam::bufferedAccumulator<Type>::resetAveraging()
 {
-    accumulationBuffer() = Field<Type>(bufferLength(), pTraits<Type>::zero);
+    accumulationBuffer() = Field<Type>(bufferLength(), Zero);
 
     averagesTaken_ = 0;
 }
@@ -217,7 +217,7 @@ void Foam::bufferedAccumulator<Type>::operator=
             << abort(FatalError);
     }
 
-    List< Field<Type> >::operator=(rhs);
+    List<Field<Type>>::operator=(rhs);
 
     averagesTaken_ = rhs.averagesTaken();
 
@@ -227,6 +227,6 @@ void Foam::bufferedAccumulator<Type>::operator=
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "bufferedAccumulatorIO.C"
+    #include "bufferedAccumulatorIO.C"
 
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.H b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.H
index 8d462902f48ce69cf294d90391b37e1407f4e720..98e7ef50b1106b573274da6e2be0d1e1a2d2efac 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.H
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulator.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ Ostream& operator<<
 template<class Type>
 class bufferedAccumulator
 :
-    public List< Field<Type> >
+    public List<Field<Type>>
 {
     // Private data
 
@@ -166,7 +166,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "bufferedAccumulator.C"
+    #include "bufferedAccumulator.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C
index 247fe3d37db15d852699271ebbbb9175ca4d977a..88d8888a49a4a8a6ac72e0e7886626ee7bd2ca3e 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/bufferedAccumulator/bufferedAccumulatorIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ Foam::operator<<(Ostream& os, const bufferedAccumulator<Type>& bA)
 {
 
     os  << bA.averagesTaken_
-        << static_cast<const List< Field<Type> >&>(bA)
+        << static_cast<const List<Field<Type>>&>(bA)
         << bA.bufferOffsets();
 
     // Check state of Ostream
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
index 54ac66d1fa1959d148704af68b57849086eb7988..a89c35333d0af07eda032bd3a21775768ab543ce 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,13 +62,13 @@ void Foam::correlationFunction<Type>::setTimesAndSizes
     );
 
     tZeroBuffers_ =
-        Field< Field<Type> >
+        Field<Field<Type>>
         (
             nBuffers,
             Field<Type>
             (
                 tZeroBufferSize,
-                pTraits<Type>::zero
+                Zero
             )
         );
 }
@@ -218,6 +218,6 @@ Foam::scalar Foam::correlationFunction<Type>::integral() const
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "correlationFunctionIO.C"
+    #include "correlationFunctionIO.C"
 
 // ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H
index 0c02e412df859d307e452e02b8ee85cda17e93d2..99647b4c2abc20165ed21de313190f20e9b5b371 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ class correlationFunction
 
         const polyMesh& mesh_;
 
-        Field< Field<Type> > tZeroBuffers_;
+        Field<Field<Type>> tZeroBuffers_;
 
         scalar duration_;
         scalar sampleInterval_;
@@ -137,7 +137,7 @@ public:
 
     // Access
 
-        inline const Field< Field<Type> >& tZeroBuffers() const;
+        inline const Field<Field<Type>>& tZeroBuffers() const;
 
         inline scalar duration() const;
 
@@ -171,7 +171,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "correlationFunction.C"
+    #include "correlationFunction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionI.H b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionI.H
index c3296a928ac06a6daab2f6bdd89ee2c30425917a..0be64171853bf0de56a24500b472dc08cab3ebbe 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionI.H
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunctionI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-inline const Foam::Field< Foam::Field<Type> >&
+inline const Foam::Field<Foam::Field<Type>>&
 Foam::correlationFunction<Type>::tZeroBuffers() const
 {
     return tZeroBuffers_;
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
index bc02f151a1fcabe5a092c36f40421e306fd3eff1..da37720b9c10fbfc302bea43290c325aa9ab7497 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ namespace Foam
 void Foam::distribution::write
 (
     const fileName& file,
-    const List<Pair<scalar> >& pairs
+    const List<Pair<scalar>>& pairs
 )
 {
     OFstream os(file);
@@ -68,7 +68,7 @@ Foam::distribution::distribution(const scalar binWidth)
 
 Foam::distribution::distribution(const distribution& d)
 :
-    Map<label>(static_cast< Map<label> >(d)),
+    Map<label>(static_cast<Map<label>>(d)),
     binWidth_(d.binWidth())
 {}
 
@@ -147,7 +147,7 @@ Foam::scalar Foam::distribution::mean() const
 
 Foam::scalar Foam::distribution::median()
 {
-    // From:
+    // Reference:
     // http://mathworld.wolfram.com/StatisticalMedian.html
     // The statistical median is the value of the distribution variable
     // where the cumulative distribution = 0.5.
@@ -156,7 +156,7 @@ Foam::scalar Foam::distribution::median()
 
     scalar runningSum = 0.0;
 
-    List<Pair<scalar> > normDist(normalised());
+    List<Pair<scalar>> normDist(normalised());
 
     if (normDist.size())
     {
@@ -268,7 +268,7 @@ void Foam::distribution::insertMissingKeys()
 }
 
 
-Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::normalised()
+Foam::List<Foam::Pair<Foam::scalar>> Foam::distribution::normalised()
 {
     scalar totEnt = approxTotalEntries();
 
@@ -278,7 +278,7 @@ Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::normalised()
 
     sort(keys);
 
-    List<Pair<scalar> > normDist(size());
+    List<Pair<scalar>> normDist(size());
 
     forAll(keys,k)
     {
@@ -298,20 +298,20 @@ Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::normalised()
 }
 
 
-Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::normalisedMinusMean()
+Foam::List<Foam::Pair<Foam::scalar>> Foam::distribution::normalisedMinusMean()
 {
     return normalisedShifted(mean());
 }
 
 
-Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::normalisedShifted
+Foam::List<Foam::Pair<Foam::scalar>> Foam::distribution::normalisedShifted
 (
     scalar shiftValue
 )
 {
-    List<Pair<scalar> > oldDist(normalised());
+    List<Pair<scalar>> oldDist(normalised());
 
-    List<Pair<scalar> > newDist(oldDist.size());
+    List<Pair<scalar>> newDist(oldDist.size());
 
     forAll(oldDist,u)
     {
@@ -416,7 +416,7 @@ Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::normalisedShifted
 }
 
 
-Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::raw()
+Foam::List<Foam::Pair<Foam::scalar>> Foam::distribution::raw()
 {
     insertMissingKeys();
 
@@ -424,7 +424,7 @@ Foam::List<Foam::Pair<Foam::scalar> > Foam::distribution::raw()
 
     sort(keys);
 
-    List<Pair<scalar> > rawDist(size());
+    List<Pair<scalar>> rawDist(size());
 
     forAll(keys,k)
     {
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H
index ed25c5e1f04d52e828c5d370f2e3f999779e6e7f..db3fe62f21b8397d66bda1434f3125c940b8724a 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/distribution/distribution.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -71,7 +71,7 @@ public:
             static void write
             (
                 const fileName& file,
-                const List<Pair<scalar> >& pairs
+                const List<Pair<scalar>>& pairs
             );
 
 
@@ -108,13 +108,13 @@ public:
 
         void insertMissingKeys();
 
-        List<Pair<scalar> > normalised();
+        List<Pair<scalar>> normalised();
 
-        List<Pair<scalar> > normalisedMinusMean();
+        List<Pair<scalar>> normalisedMinusMean();
 
-        List<Pair<scalar> > normalisedShifted(scalar shiftValue);
+        List<Pair<scalar>> normalisedShifted(scalar shiftValue);
 
-        List<Pair<scalar> > raw();
+        List<Pair<scalar>> raw();
 
 
         // Access
diff --git a/src/lagrangian/molecularDynamics/molecule/Make/options b/src/lagrangian/molecularDynamics/molecule/Make/options
index 5698f81a651a3be1d4ee7a32fe2c7867f3a343af..de95d1b75b80f1bfb1d186901e8eee45e6e29951 100644
--- a/src/lagrangian/molecularDynamics/molecule/Make/options
+++ b/src/lagrangian/molecularDynamics/molecule/Make/options
@@ -11,4 +11,3 @@ LIB_LIBS = \
     -llagrangian \
     -lpotential \
     -lmolecularMeasurements
-
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
index a19febe07b637ad81759ec08044641b6cb002772..fe512038aee4272cc2571f966ed23d17efa91947 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
@@ -41,7 +41,7 @@ if (runTime.outputTime())
         Bulk velocity
     \*-----------------------------------------------------------------------*/
 
-    vectorField totalMomentum_sum(mesh.nCells(), vector::zero);
+    vectorField totalMomentum_sum(mesh.nCells(), Zero);
 
     scalarField totalMass_sum(mesh.nCells(), 0.0);
 
@@ -71,7 +71,7 @@ if (runTime.outputTime())
             }
             else
             {
-                singleSpeciesVelocity[sSV] = vector::zero;
+                singleSpeciesVelocity[sSV] = Zero;
             }
         }
     }
@@ -87,7 +87,7 @@ if (runTime.outputTime())
         }
         else
         {
-            itotalVelocity[tV] = vector::zero;
+            itotalVelocity[tV] = Zero;
         }
     }
 
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H
index 4b46bdd0dfb3a3554ee55a74e3bc3a855fe56c84..29a94307ce7d8ee6ffd4146a6ae51e43820751ae 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateAutoCorrelationFunctions.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ if (mesh.time().timeIndex() % vacf.sampleSteps() == 0)
 
 if (mesh.time().timeIndex() % pacf.sampleSteps() == 0)
 {
-    vector p = vector::zero;
+    vector p = Zero;
 
     forAllConstIter(IDLList<molecule>, molecules, mol)
     {
@@ -61,7 +61,7 @@ if (mesh.time().timeIndex() % pacf.sampleSteps() == 0)
 
 if (mesh.time().timeIndex() % hfacf.sampleSteps() == 0)
 {
-    vector s = vector::zero;
+    vector s = Zero;
 
     forAllConstIter(IDLList<molecule>, molecules, mol)
     {
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateMDFields.H
index af5c938da43cf3308ea2caf8ded6466cc27d09ad..0099db3f3edb4bbae07b8e1f26a539d306771774 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/calculateMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/calculateMDFields.H
@@ -1,4 +1,4 @@
-const List<DynamicList<molecule*> >& cellOccupancy = molecules.cellOccupancy();
+const List<DynamicList<molecule*>>& cellOccupancy = molecules.cellOccupancy();
 
 forAll(cellOccupancy, cell)
 {
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H
index 6d6617d652084e773ca496e7bdcafa61e9cdaec5..83bcaa8ec754d6f0f16cbaa027b621e42a8ced43 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H
@@ -1,24 +1,24 @@
 // Fields for data gathering
 
-List< scalarField > allSpeciesN_RU
+List<scalarField> allSpeciesN_RU
 (
     molecules.potential().nIds(),
     scalarField (mesh.nCells(), 0.0)
 );
 
-List< scalarField > allSpeciesM_RU
+List<scalarField> allSpeciesM_RU
 (
     molecules.potential().nIds(),
     scalarField (mesh.nCells(), 0.0)
 );
 
-List< vectorField > allSpeciesVelocitySum_RU
+List<vectorField> allSpeciesVelocitySum_RU
 (
     molecules.potential().nIds(),
-    vectorField (mesh.nCells(), vector::zero)
+    vectorField (mesh.nCells(), Zero)
 );
 
-List< scalarField > allSpeciesVelocityMagSquaredSum_RU
+List<scalarField> allSpeciesVelocityMagSquaredSum_RU
 (
     molecules.potential().nIds(),
     scalarField (mesh.nCells(), 0.0)
@@ -171,7 +171,7 @@ forAll(allSpeciesVelocity, v)
         )
     );
     allSpeciesVelocity[v].internalField() =
-        vectorField (mesh.nCells(), vector::zero);
+        vectorField (mesh.nCells(), Zero);
     allSpeciesVelocity[v].correctBoundaryConditions();
 }
 
@@ -191,7 +191,7 @@ Info << "    Creating total velocity field" << endl;
 //     dimVelocity,
 //     "zeroGradient"
 // );
-// totalVelocity.internalField() = vectorField (mesh.nCells(), vector::zero);
+// totalVelocity.internalField() = vectorField (mesh.nCells(), Zero);
 // totalVelocity.correctBoundaryConditions();
 
 
@@ -209,7 +209,7 @@ volVectorField totalVelocity
 
     ),
     mesh,
-    dimensionedVector("zero", dimVelocity, vector::zero)
+    dimensionedVector("zero", dimVelocity, Zero)
 );
 
 /*---------------------------------------------------------------------------*\
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
index ae117cafc5709dea2c18d46f8f94edb110d0637d..a23468df1cad87528482679518932453bb980e95 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,9 +31,9 @@ Description
 \*---------------------------------------------------------------------------*/
 
 
-vector singleStepTotalLinearMomentum(vector::zero);
+vector singleStepTotalLinearMomentum(Zero);
 
-vector singleStepTotalAngularMomentum(vector::zero);
+vector singleStepTotalAngularMomentum(Zero);
 
 scalar singleStepMaxVelocityMag = 0.0;
 
@@ -47,7 +47,7 @@ scalar singleStepTotalPE = 0.0;
 
 scalar singleStepTotalrDotf = 0.0;
 
-//vector singleStepCentreOfMass(vector::zero);
+//vector singleStepCentreOfMass(Zero);
 
 label singleStepNMols = molecules.size();
 
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
index af0197b5fe4dc0fc2e75858e9f49ba86f3b0a273..ddf96d1ef0f3d99f46d0e3a63e2dc74750a3b091 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H
@@ -1,24 +1,24 @@
 if (runTime.outputTime())
 {
-    allSpeciesN_RU = List< scalarField >
+    allSpeciesN_RU = List<scalarField>
     (
         molecules.potential().nIds(),
         scalarField(mesh.nCells(), 0.0)
     );
 
-    allSpeciesM_RU = List< scalarField >
+    allSpeciesM_RU = List<scalarField>
     (
         molecules.potential().nIds(),
         scalarField(mesh.nCells(), 0.0)
     );
 
-    allSpeciesVelocitySum_RU = List< vectorField >
+    allSpeciesVelocitySum_RU = List<vectorField>
     (
         molecules.potential().nIds(),
-        vectorField(mesh.nCells(), vector::zero)
+        vectorField(mesh.nCells(), Zero)
     );
 
-    allSpeciesVelocityMagSquaredSum_RU = List< scalarField >
+    allSpeciesVelocityMagSquaredSum_RU = List<scalarField>
     (
         molecules.potential().nIds(),
         scalarField(mesh.nCells(), 0.0)
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
index df182244d21dd7d05b11d519b236e9694ccb0d26..6f32f0ec130c9fc3906ad39c5a12c837a12edc01 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,7 +90,7 @@ if (runTime.outputTime())
             << "no molecules in system" << endl;
     }
 
-    accumulatedTotalLinearMomentum = vector::zero;
+    accumulatedTotalLinearMomentum = Zero;
 
     accumulatedTotalMass = 0.0;
 
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressureVariables.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressureVariables.H
index d0aa0aabe8983afc3d87b9444b7ce6ec8f519b7a..0ce24f3da414f246f14ecde9b59d4cc3a4733026 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressureVariables.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressureVariables.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ Description
 
 \*---------------------------------------------------------------------------*/
 
-vector accumulatedTotalLinearMomentum(vector::zero);
+vector accumulatedTotalLinearMomentum(Zero);
 
 scalar accumulatedTotalMass = 0.0;
 
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C
index 75312848bd3c3ecf2c6aaff552f5b6e342142efb..a5ba420f34a8f88f5025afefbd8754fc82347157 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -147,9 +147,9 @@ bool Foam::molecule::move(molecule::trackingData& td, const scalar trackTime)
 
         scalar m = constProps.mass();
 
-        a_ = vector::zero;
+        a_ = Zero;
 
-        tau_ = vector::zero;
+        tau_ = Zero;
 
         forAll(siteForces_, s)
         {
@@ -166,9 +166,9 @@ bool Foam::molecule::move(molecule::trackingData& td, const scalar trackTime)
 
         if (constProps.pointMolecule())
         {
-            tau_ = vector::zero;
+            tau_ = Zero;
 
-            pi_ = vector::zero;
+            pi_ = Zero;
         }
 
         if (constProps.linearMolecule())
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
index 062395ba6b701ccf718f1e2303e1a750effa9c24..9430f22e62801ed4154de4a8f165028dc6aeeccb 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ inline Foam::molecule::constantProperties::constantProperties
 
     mass_ = sum(siteMasses_);
 
-    vector centreOfMass(vector::zero);
+    vector centreOfMass(Zero);
 
     // Calculate the centre of mass of the body and subtract it from each
     // position
@@ -80,7 +80,7 @@ inline Foam::molecule::constantProperties::constantProperties
     {
         // Single site molecule - no rotational motion.
 
-        siteReferencePositions_[0] = vector::zero;
+        siteReferencePositions_[0] = Zero;
 
         momentOfInertia_ = diagTensor(-1, -1, -1);
     }
@@ -101,7 +101,7 @@ inline Foam::molecule::constantProperties::constantProperties
         // The rotation was around the centre of mass but remove any
         // components that have crept in due to floating point errors
 
-        centreOfMass = vector::zero;
+        centreOfMass = Zero;
 
         forAll(siteReferencePositions_, i)
         {
@@ -112,7 +112,7 @@ inline Foam::molecule::constantProperties::constantProperties
 
         siteReferencePositions_ -= centreOfMass;
 
-        diagTensor momOfInertia = diagTensor::zero;
+        diagTensor momOfInertia = Zero;
 
         forAll(siteReferencePositions_, i)
         {
@@ -135,7 +135,7 @@ inline Foam::molecule::constantProperties::constantProperties
 
         // Calculate the inertia tensor in the current orientation
 
-        tensor momOfInertia(tensor::zero);
+        tensor momOfInertia(Zero);
 
         forAll(siteReferencePositions_, i)
         {
@@ -179,7 +179,7 @@ inline Foam::molecule::constantProperties::constantProperties
         // The rotation was around the centre of mass but remove any
         // components that have crept in due to floating point errors
 
-        centreOfMass = vector::zero;
+        centreOfMass = Zero;
 
         forAll(siteReferencePositions_, i)
         {
@@ -193,7 +193,7 @@ inline Foam::molecule::constantProperties::constantProperties
         // Calculate the moment of inertia in the principle component
         // reference frame
 
-        momOfInertia = tensor::zero;
+        momOfInertia = Zero;
 
         forAll(siteReferencePositions_, i)
         {
@@ -244,10 +244,10 @@ inline Foam::molecule::molecule
     tau_(tau),
     specialPosition_(specialPosition),
     potentialEnergy_(0.0),
-    rf_(tensor::zero),
+    rf_(Zero),
     special_(special),
     id_(id),
-    siteForces_(constProps.nSites(), vector::zero),
+    siteForces_(constProps.nSites(), Zero),
     sitePositions_(constProps.nSites())
 {
     setSitePositions(constProps);
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
index c7829e6958bfb24323bdc0c5d0597c0edad744d0..d6fd3cbd29e73270ac920ecc7f4dd7470447211a 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,14 +45,14 @@ Foam::molecule::molecule
 )
 :
     particle(mesh, is, readFields),
-    Q_(tensor::zero),
-    v_(vector::zero),
-    a_(vector::zero),
-    pi_(vector::zero),
-    tau_(vector::zero),
-    specialPosition_(vector::zero),
+    Q_(Zero),
+    v_(Zero),
+    a_(Zero),
+    pi_(Zero),
+    tau_(Zero),
+    specialPosition_(Zero),
     potentialEnergy_(0.0),
-    rf_(tensor::zero),
+    rf_(Zero),
     special_(0),
     id_(0),
     siteForces_(0),
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
index 3e48822f035a544172f6273d68da73035ac849b8..e4bc84a7dcc14dcd7ddc5b0ac772596a572bbad5 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -181,7 +181,7 @@ void Foam::moleculeCloud::calculatePairForce()
 
         const labelListList& ril = il_.ril();
 
-        List<IDLList<molecule> >& referredMols = il_.referredParticles();
+        List<IDLList<molecule>>& referredMols = il_.referredParticles();
 
         forAll(ril, r)
         {
@@ -376,7 +376,7 @@ void Foam::moleculeCloud::removeHighEnergyOverlaps()
 
         const labelListList& ril(il_.ril());
 
-        List<IDLList<molecule> >& referredMols = il_.referredParticles();
+        List<IDLList<molecule>>& referredMols = il_.referredParticles();
 
         forAll(ril, r)
         {
@@ -1016,7 +1016,7 @@ void Foam::moleculeCloud::createMolecule
             << abort(FatalError);
     }
 
-    point specialPosition(vector::zero);
+    point specialPosition(Zero);
 
     label special = 0;
 
@@ -1033,7 +1033,7 @@ void Foam::moleculeCloud::createMolecule
 
     v += bulkVelocity;
 
-    vector pi = vector::zero;
+    vector pi = Zero;
 
     tensor Q = I;
 
@@ -1072,9 +1072,9 @@ void Foam::moleculeCloud::createMolecule
             tetPt,
             Q,
             v,
-            vector::zero,
+            Zero,
             pi,
-            vector::zero,
+            Zero,
             specialPosition,
             constProps(id),
             special,
@@ -1184,11 +1184,11 @@ void Foam::moleculeCloud::calculateForce()
     // Set accumulated quantities to zero
     forAllIter(moleculeCloud, *this, mol)
     {
-        mol().siteForces() = vector::zero;
+        mol().siteForces() = Zero;
 
         mol().potentialEnergy() = 0.0;
 
-        mol().rf() = tensor::zero;
+        mol().rf() = Zero;
     }
 
     calculatePairForce();
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
index 16685b41329e35e8df77d4c8521e58df0c994d1d..35a109e940b8aab8e8510acc111321fd5c9fe467 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ private:
 
         const potential& pot_;
 
-        List<DynamicList<molecule*> > cellOccupancy_;
+        List<DynamicList<molecule*>> cellOccupancy_;
 
         InteractionLists<molecule> il_;
 
@@ -185,7 +185,7 @@ public:
 
             inline const potential& pot() const;
 
-            inline const List<DynamicList<molecule*> >& cellOccupancy() const;
+            inline const List<DynamicList<molecule*>>& cellOccupancy() const;
 
             inline const InteractionLists<molecule>& il() const;
 
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
index 553606bd9f93316672ec6c4d500219dec3ff2af2..63f89a69bd12d1ddb3e21d948edb41a876a3b8b2 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -353,7 +353,7 @@ inline const Foam::potential& Foam::moleculeCloud::pot() const
 }
 
 
-inline const Foam::List<Foam::DynamicList<Foam::molecule*> >&
+inline const Foam::List<Foam::DynamicList<Foam::molecule*>>&
     Foam::moleculeCloud::cellOccupancy() const
 {
     return cellOccupancy_;
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
index 0775247d7e8e8b79a3b4370f5fbb79d123616440..c2adf842213a9597e11f6277290617c95aaf2d9d 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,10 +113,10 @@ Foam::scalar Foam::pairPotential::force(const scalar r) const
 }
 
 
-Foam::List< Foam::Pair< Foam::scalar > >
+Foam::List<Foam::Pair<Foam::scalar>>
 Foam::pairPotential::forceTable() const
 {
-    List<Pair<scalar> > forceTab(forceLookup_.size());
+    List<Pair<scalar>> forceTab(forceLookup_.size());
 
     forAll(forceLookup_,k)
     {
@@ -150,10 +150,10 @@ Foam::scalar Foam::pairPotential::energy(const scalar r) const
 }
 
 
-Foam::List< Foam::Pair< Foam::scalar > >
+Foam::List<Foam::Pair<Foam::scalar>>
     Foam::pairPotential::energyTable() const
 {
-    List<Pair<scalar> > energyTab(energyLookup_.size());
+    List<Pair<scalar>> energyTab(energyLookup_.size());
 
     forAll(energyLookup_,k)
     {
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
index 9d093d2b8ed45e53e2cbd4b84d382308bc245e49..e75eaf624e24f1b203be2209687d752e804ca255 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -152,9 +152,9 @@ public:
 
         scalar force (const scalar r) const;
 
-        List<Pair<scalar> > energyTable() const;
+        List<Pair<scalar>> energyTable() const;
 
-        List<Pair<scalar> > forceTable() const;
+        List<Pair<scalar>> forceTable() const;
 
         inline bool writeTables() const;
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C
index b9483f579614c909a7e624af302630963e2e28c0..e6e604f5bdd5e0ae9530e83222d9cbfbce16e0b9 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,9 +31,9 @@ bool Foam::pairPotential::writeEnergyAndForceTables(Ostream& os) const
     Info<< "Writing energy and force tables to file for potential "
         << name_ << endl;
 
-    List< Pair <scalar> > eTab(energyTable());
+    List<Pair <scalar>> eTab(energyTable());
 
-    List< Pair <scalar> > fTab(forceTable());
+    List<Pair <scalar>> fTab(forceTable());
 
     forAll(eTab, e)
     {
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
index c08341dc9a1acc2124062ef6237dd38e1045c062..9b3705fd8fedc2636c1494bfd8de3d3b59fecc7e 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/azizChen/azizChen.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,23 +25,12 @@ Class
     Foam::pairPotentials::azizChen
 
 Description
-    Foam::pairPotentials::azizChen
 
-    From:
+    Reference:
     \verbatim
-        \article{MA_Aziz_Chen,
-        author = {R. A. Aziz and H. H. Chen},
-        collaboration = {},
-        title = {An accurate intermolecular potential for argon},
-        publisher = {AIP},
-        year = {1977},
-        journal = {The Journal of Chemical Physics},
-        volume = {67},
-        number = {12},
-        pages = {5719-5726},
-        url = {http://link.aip.org/link/?JCP/67/5719/1},
-        doi = {10.1063/1.434827}
-        }
+        Aziz, R. A. & Chen, H.H. (1977).
+        An Accurate Intermolecular Potential for Argon.
+        Journal of Chemical Physics, Vol. 67, No. 12, p. 5179.
     \endverbatim
 
 SourceFiles
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
index e766bfba3443f7760960fd41c9aa6327d1e64fe1..c3d944e6a3fed5815ea2648c4ef3ee1108d5c93b 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/maitlandSmith/maitlandSmith.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,33 +25,19 @@ Class
     Foam::pairPotentials::maitlandSmith
 
 Description
-    Foam::pairPotentials::maitlandSmith
 
-    From:
+    Reference:
     \verbatim
-        @ARTICLE{MA_Maitland_Smith,
-        author = {{Maitland}, G.~C. and {Smith}, E.~B.},
-        title = {A simplified representation of
-        intermolecular potential energy},
-        journal = {Chemical Physics Letters},
-        year = 1973,
-        month = oct,
-        volume = 22,
-        pages = {443-446},
-        adsurl = {http://adsabs.harvard.edu/abs/1973CPL....22..443M},
-        adsnote = {Provided by the SAO/NASA Astrophysics Data System}
-        }
+        Maitland, G. C., & Smith, E. B. (1973).
+        A simplified representation of intermolecular potential energy.
+        Chemical Physics Letters, 22(3), 443-446.
     \endverbatim
 
     Parameters for other monoatomics from:
     \verbatim
-        @BOOK{MD_Maitland_Rigby_Smith_Wakeham,
-        AUTHOR =       {Geoffrey C. Maitland and Maurice Rigby and
-        E. Brian Smith and William A. Wakeham},
-        TITLE =        {Intermolecular Forces: Their Origin and Determination},
-        PUBLISHER =    {Oxford University Press},
-        YEAR =         {1981}
-        }
+        Maitland, G. C., Rigby, M., Smith, E., Wakeham, W. (1981).
+        Intermolecular forces: Their origin and determination.
+        Oxford: Clarendon Press.
     \endverbatim
 
 SourceFiles
diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C
index b33d39987c4fe77a15b875f130c31f6f2b800351..8c8b04e8b916a03d823067f16643d345ff3062e8 100644
--- a/src/lagrangian/molecularDynamics/potential/potential/potential.C
+++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -225,7 +225,7 @@ void Foam::potential::potential::readPotentialDict()
     // *************************************************************************
     // External Forces
 
-    gravity_ = vector::zero;
+    gravity_ = Zero;
 
     if (potentialDict.found("external"))
     {
diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C
index 4bc55c989ec65a574d5f325127949e5c71dcf6b5..b6542dc3a7818637b847797e55e70b0681814140 100644
--- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C
+++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ void Foam::SprayCloud<CloudType>::setModels()
 {
     atomizationModel_.reset
     (
-        AtomizationModel<SprayCloud<CloudType> >::New
+        AtomizationModel<SprayCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -43,7 +43,7 @@ void Foam::SprayCloud<CloudType>::setModels()
 
     breakupModel_.reset
     (
-        BreakupModel<SprayCloud<CloudType> >::New
+        BreakupModel<SprayCloud<CloudType>>::New
         (
             this->subModelProperties(),
             *this
@@ -218,7 +218,7 @@ void Foam::SprayCloud<CloudType>::evolve()
     if (this->solution().canEvolve())
     {
         typename parcelType::template
-            TrackingData<SprayCloud<CloudType> > td(*this);
+            TrackingData<SprayCloud<CloudType>> td(*this);
 
         this->solve(td);
     }
diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H
index 2055c375e8242e91d06defe94e8b03068117c07f..6c0fa9f44f83fa4de907b78e15b7bea8832041ec 100644
--- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H
+++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,7 +79,7 @@ private:
     // Private data
 
         //- Cloud copy pointer
-        autoPtr<SprayCloud<CloudType> > cloudCopyPtr_;
+        autoPtr<SprayCloud<CloudType>> cloudCopyPtr_;
 
         //- Average parcel mass
         scalar averageParcelMass_;
@@ -101,11 +101,11 @@ protected:
         // References to the cloud sub-models
 
             //- Atomization model
-            autoPtr<AtomizationModel<SprayCloud<CloudType> > >
+            autoPtr<AtomizationModel<SprayCloud<CloudType>>>
                 atomizationModel_;
 
             //- Break-up model
-            autoPtr<BreakupModel<SprayCloud<CloudType> > > breakupModel_;
+            autoPtr<BreakupModel<SprayCloud<CloudType>>> breakupModel_;
 
 
     // Protected Member Functions
@@ -150,18 +150,18 @@ public:
 
 
         //- Construct and return clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > clone(const word& name)
+        virtual autoPtr<Cloud<parcelType>> clone(const word& name)
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new SprayCloud(*this, name)
             );
         }
 
         //- Construct and return bare clone based on (this) with new name
-        virtual autoPtr<Cloud<parcelType> > cloneBare(const word& name) const
+        virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
         {
-            return autoPtr<Cloud<parcelType> >
+            return autoPtr<Cloud<parcelType>>
             (
                 new SprayCloud(this->mesh(), name, *this)
             );
@@ -183,21 +183,27 @@ public:
             inline scalar averageParcelMass() const;
 
 
+        // Check
+
+            //- Penetration for fraction [0-1] of the current total mass
+            inline scalar penetration(const scalar fraction) const;
+
+
             // Sub-models
 
                 //- Return const-access to the atomization model
-                inline const AtomizationModel<SprayCloud<CloudType> >&
+                inline const AtomizationModel<SprayCloud<CloudType>>&
                     atomization() const;
 
                 //- Return reference to the atomization model
-                inline AtomizationModel<SprayCloud<CloudType> >& atomization();
+                inline AtomizationModel<SprayCloud<CloudType>>& atomization();
 
                 //- Return const-access to the breakup model
-                inline const BreakupModel<SprayCloud<CloudType> >&
+                inline const BreakupModel<SprayCloud<CloudType>>&
                     breakup() const;
 
                 //- Return reference to the breakup model
-                inline BreakupModel<SprayCloud<CloudType> >& breakup();
+                inline BreakupModel<SprayCloud<CloudType>>& breakup();
 
 
         // Cloud evolution functions
@@ -245,7 +251,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SprayCloud.C"
+    #include "SprayCloud.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H
index 834dbbddd415a61e7702b618063a6667b47b01c7..bd0ebdc0dce1b409e5d1d9ac4aa2af802cad8f72 100644
--- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H
+++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,7 @@ Foam::SprayCloud<CloudType>::cloudCopy() const
 
 
 template<class CloudType>
-inline const Foam::AtomizationModel<Foam::SprayCloud<CloudType> >&
+inline const Foam::AtomizationModel<Foam::SprayCloud<CloudType>>&
 Foam::SprayCloud<CloudType>::atomization() const
 {
     return atomizationModel_;
@@ -42,7 +42,7 @@ Foam::SprayCloud<CloudType>::atomization() const
 
 
 template<class CloudType>
-inline Foam::AtomizationModel<Foam::SprayCloud<CloudType> >&
+inline Foam::AtomizationModel<Foam::SprayCloud<CloudType>>&
 Foam::SprayCloud<CloudType>::atomization()
 {
     return atomizationModel_();
@@ -50,7 +50,7 @@ Foam::SprayCloud<CloudType>::atomization()
 
 
 template<class CloudType>
-inline const Foam::BreakupModel<Foam::SprayCloud<CloudType> >&
+inline const Foam::BreakupModel<Foam::SprayCloud<CloudType>>&
 Foam::SprayCloud<CloudType>::breakup() const
 {
     return breakupModel_;
@@ -58,7 +58,7 @@ Foam::SprayCloud<CloudType>::breakup() const
 
 
 template<class CloudType>
-inline Foam::BreakupModel<Foam::SprayCloud<CloudType> >&
+inline Foam::BreakupModel<Foam::SprayCloud<CloudType>>&
 Foam::SprayCloud<CloudType>::breakup()
 {
     return breakupModel_();
@@ -72,4 +72,140 @@ inline Foam::scalar Foam::SprayCloud<CloudType>::averageParcelMass() const
 }
 
 
+template<class CloudType>
+inline Foam::scalar Foam::SprayCloud<CloudType>::penetration
+(
+    const scalar fraction
+) const
+{
+    if ((fraction < 0) || (fraction > 1))
+    {
+        FatalErrorInFunction
+            << "fraction should be in the range 0 < fraction < 1"
+            << exit(FatalError);
+    }
+
+    scalar distance = 0.0;
+
+    const label nParcel = this->size();
+    globalIndex globalParcels(nParcel);
+    const label nParcelSum = globalParcels.size();
+
+    if (nParcelSum == 0)
+    {
+        return distance;
+    }
+
+    // lists of parcels mass and distance from initial injection point
+    List<List<scalar>> procMass(Pstream::nProcs());
+    List<List<scalar>> procDist(Pstream::nProcs());
+
+    List<scalar>& mass = procMass[Pstream::myProcNo()];
+    List<scalar>& dist = procDist[Pstream::myProcNo()];
+
+    mass.setSize(nParcel);
+    dist.setSize(nParcel);
+
+    label i = 0;
+    scalar mSum = 0.0;
+    forAllConstIter(typename SprayCloud<CloudType>, *this, iter)
+    {
+        const parcelType& p = iter();
+        scalar m = p.nParticle()*p.mass();
+        scalar d = mag(p.position() - p.position0());
+        mSum += m;
+
+        mass[i] = m;
+        dist[i] = d;
+
+        i++;
+    }
+
+    // calculate total mass across all processors
+    reduce(mSum, sumOp<scalar>());
+    Pstream::gatherList(procMass);
+    Pstream::gatherList(procDist);
+
+    if (Pstream::master())
+    {
+        // flatten the mass lists
+        List<scalar> allMass(nParcelSum, 0.0);
+        SortableList<scalar> allDist(nParcelSum, 0.0);
+        for (label procI = 0; procI < Pstream::nProcs(); procI++)
+        {
+            SubList<scalar>
+            (
+                allMass,
+                globalParcels.localSize(procI),
+                globalParcels.offset(procI)
+            ) = procMass[procI];
+
+            // flatten the distance list
+            SubList<scalar>
+            (
+                allDist,
+                globalParcels.localSize(procI),
+                globalParcels.offset(procI)
+            ) = procDist[procI];
+        }
+
+        // sort allDist distances into ascending order
+        // note: allMass masses are left unsorted
+        allDist.sort();
+
+        if (nParcelSum > 1)
+        {
+            const scalar mLimit = fraction*mSum;
+            const labelList& indices = allDist.indices();
+
+            if (mLimit > (mSum - allMass[indices.last()]))
+            {
+                distance = allDist.last();
+            }
+            else
+            {
+                // assuming that 'fraction' is generally closer to 1 than 0,
+                // loop through in reverse distance order
+                const scalar mThreshold = (1.0 - fraction)*mSum;
+                scalar mCurrent = 0.0;
+                label i0 = 0;
+
+                forAllReverse(indices, i)
+                {
+                    label indI = indices[i];
+
+                    mCurrent += allMass[indI];
+
+                    if (mCurrent > mThreshold)
+                    {
+                        i0 = i;
+                        break;
+                    }
+                }
+
+                if (i0 == indices.size() - 1)
+                {
+                    distance = allDist.last();
+                }
+                else
+                {
+                    // linearly interpolate to determine distance
+                    scalar alpha = (mCurrent - mThreshold)/allMass[indices[i0]];
+                    distance =
+                        allDist[i0] + alpha*(allDist[i0+1] - allDist[i0]);
+                }
+            }
+        }
+        else
+        {
+            distance = allDist.first();
+        }
+    }
+
+    Pstream::scatter(distance);
+
+    return distance;
+}
+
+
 // ************************************************************************* //
diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H
index 4d7f28926017cf141f3cecf1102aaf31330aa231..1acbc4a849732204679604214f334230ac2b12ea 100644
--- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H
+++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -289,9 +289,9 @@ public:
                 mesh_(mesh)
             {}
 
-            autoPtr<SprayParcel<ParcelType> > operator()(Istream& is) const
+            autoPtr<SprayParcel<ParcelType>> operator()(Istream& is) const
             {
-                return autoPtr<SprayParcel<ParcelType> >
+                return autoPtr<SprayParcel<ParcelType>>
                 (
                     new SprayParcel<ParcelType>(mesh_, is, true)
                 );
diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelIO.C b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelIO.C
index 6188ccf73552c8127f655385977b3fc21cc4da3d..f5510d10a77897f3d2becba33013733541cc7165 100644
--- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelIO.C
+++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ Foam::SprayParcel<ParcelType>::SprayParcel
 :
     ParcelType(mesh, is, readFields),
     d0_(0.0),
-    position0_(vector::zero),
+    position0_(Zero),
     sigma_(0.0),
     mu_(0.0),
     liquidCore_(0.0),
@@ -176,7 +176,7 @@ void Foam::SprayParcel<ParcelType>::readFields
     c.checkFieldIOobject(c, user);
 
     label i = 0;
-    forAllIter(typename Cloud<SprayParcel<ParcelType> >, c, iter)
+    forAllIter(typename Cloud<SprayParcel<ParcelType>>, c, iter)
     {
         SprayParcel<ParcelType>& p = iter();
         p.d0_ = d0[i];
@@ -244,7 +244,7 @@ void Foam::SprayParcel<ParcelType>::writeFields
     IOField<scalar> user(c.fieldIOobject("user", IOobject::NO_READ), np);
 
     label i = 0;
-    forAllConstIter(typename Cloud<SprayParcel<ParcelType> >, c, iter)
+    forAllConstIter(typename Cloud<SprayParcel<ParcelType>>, c, iter)
     {
         const SprayParcel<ParcelType>& p = iter();
         d0[i] = p.d0_;
diff --git a/src/lagrangian/spray/parcels/include/makeSprayParcelAtomizationModels.H b/src/lagrangian/spray/parcels/include/makeSprayParcelAtomizationModels.H
index 8d240232b93b215850c74cb611ce31e431d11bd1..78c4c58f9fd7869c5596b8bb25e4819c49f3aae0 100644
--- a/src/lagrangian/spray/parcels/include/makeSprayParcelAtomizationModels.H
+++ b/src/lagrangian/spray/parcels/include/makeSprayParcelAtomizationModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,11 +34,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSprayParcelAtomizationModels(CloudType)                           \
-                                                                              \
-    makeAtomizationModel(CloudType);                                          \
-    makeAtomizationModelType(NoAtomization, CloudType);                       \
-    makeAtomizationModelType(BlobsSheetAtomization, CloudType);               \
+#define makeSprayParcelAtomizationModels(CloudType)                            \
+                                                                               \
+    makeAtomizationModel(CloudType);                                           \
+    makeAtomizationModelType(NoAtomization, CloudType);                        \
+    makeAtomizationModelType(BlobsSheetAtomization, CloudType);                \
     makeAtomizationModelType(LISAAtomization, CloudType);
 
 
diff --git a/src/lagrangian/spray/parcels/include/makeSprayParcelBreakupModels.H b/src/lagrangian/spray/parcels/include/makeSprayParcelBreakupModels.H
index 0f822318e36a9b7d0707e59e5d038b4a0b8d74be..866a30dfc199ef974c244a80aaba70adc5cb5d17 100644
--- a/src/lagrangian/spray/parcels/include/makeSprayParcelBreakupModels.H
+++ b/src/lagrangian/spray/parcels/include/makeSprayParcelBreakupModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,15 +38,15 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSprayParcelBreakupModels(CloudType)                               \
-                                                                              \
-    makeBreakupModel(CloudType)                                               \
-    makeBreakupModelType(NoBreakup, CloudType);                               \
-    makeBreakupModelType(PilchErdman, CloudType);                             \
-    makeBreakupModelType(ReitzDiwakar, CloudType);                            \
-    makeBreakupModelType(ReitzKHRT, CloudType);                               \
-    makeBreakupModelType(TAB, CloudType);                                     \
-    makeBreakupModelType(ETAB, CloudType);                                    \
+#define makeSprayParcelBreakupModels(CloudType)                                \
+                                                                               \
+    makeBreakupModel(CloudType)                                                \
+    makeBreakupModelType(NoBreakup, CloudType);                                \
+    makeBreakupModelType(PilchErdman, CloudType);                              \
+    makeBreakupModelType(ReitzDiwakar, CloudType);                             \
+    makeBreakupModelType(ReitzKHRT, CloudType);                                \
+    makeBreakupModelType(TAB, CloudType);                                      \
+    makeBreakupModelType(ETAB, CloudType);                                     \
     makeBreakupModelType(SHF, CloudType);
 
 
diff --git a/src/lagrangian/spray/parcels/include/makeSprayParcelInjectionModels.H b/src/lagrangian/spray/parcels/include/makeSprayParcelInjectionModels.H
index dba5fa2e2df3512c5897475ee319e030ab0e9b88..0b6de500acd0f8f0fc252a1e1b1c52b9621c0ec5 100644
--- a/src/lagrangian/spray/parcels/include/makeSprayParcelInjectionModels.H
+++ b/src/lagrangian/spray/parcels/include/makeSprayParcelInjectionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -40,18 +40,18 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSprayParcelInjectionModels(CloudType)                             \
-                                                                              \
-    makeInjectionModel(CloudType);                                            \
-                                                                              \
-    makeInjectionModelType(CellZoneInjection, CloudType);                     \
-    makeInjectionModelType(ConeInjection, CloudType);                         \
-    makeInjectionModelType(ConeNozzleInjection, CloudType);                   \
-    makeInjectionModelType(FieldActivatedInjection, CloudType);               \
-    makeInjectionModelType(InflationInjection, CloudType);                    \
-    makeInjectionModelType(ManualInjection, CloudType);                       \
-    makeInjectionModelType(NoInjection, CloudType);                           \
-    makeInjectionModelType(PatchFlowRateInjection, CloudType);                \
+#define makeSprayParcelInjectionModels(CloudType)                              \
+                                                                               \
+    makeInjectionModel(CloudType);                                             \
+                                                                               \
+    makeInjectionModelType(CellZoneInjection, CloudType);                      \
+    makeInjectionModelType(ConeInjection, CloudType);                          \
+    makeInjectionModelType(ConeNozzleInjection, CloudType);                    \
+    makeInjectionModelType(FieldActivatedInjection, CloudType);                \
+    makeInjectionModelType(InflationInjection, CloudType);                     \
+    makeInjectionModelType(ManualInjection, CloudType);                        \
+    makeInjectionModelType(NoInjection, CloudType);                            \
+    makeInjectionModelType(PatchFlowRateInjection, CloudType);                 \
     makeInjectionModelType(PatchInjection, CloudType);
 
 
diff --git a/src/lagrangian/spray/parcels/include/makeSprayParcelStochasticCollisionModels.H b/src/lagrangian/spray/parcels/include/makeSprayParcelStochasticCollisionModels.H
index 2d9fdbf4a300ce62aac6994a912b58d00b252545..cf5cfca26e6e351ca955489a58b7ec4ac11c0c38 100644
--- a/src/lagrangian/spray/parcels/include/makeSprayParcelStochasticCollisionModels.H
+++ b/src/lagrangian/spray/parcels/include/makeSprayParcelStochasticCollisionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,11 +34,11 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSprayParcelStochasticCollisionModels(CloudType)                   \
-                                                                              \
-    makeStochasticCollisionModel(CloudType);                                  \
-    makeStochasticCollisionModelType(NoStochasticCollision, CloudType);       \
-    makeStochasticCollisionModelType(ORourkeCollision, CloudType);            \
+#define makeSprayParcelStochasticCollisionModels(CloudType)                    \
+                                                                               \
+    makeStochasticCollisionModel(CloudType);                                   \
+    makeStochasticCollisionModelType(NoStochasticCollision, CloudType);        \
+    makeStochasticCollisionModelType(ORourkeCollision, CloudType);             \
     makeStochasticCollisionModelType(TrajectoryCollision, CloudType);
 
 
diff --git a/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModel.H b/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModel.H
index d0e8ecacbfd3d174320776cbe650941faa170547..79c3a1afce2b0eaecaabebe3eeb54faabb41d6bf 100644
--- a/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModel.H
+++ b/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ public:
         AtomizationModel(const AtomizationModel<CloudType>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AtomizationModel<CloudType> > clone() const = 0;
+        virtual autoPtr<AtomizationModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -99,7 +99,7 @@ public:
 
 
     //- Selector
-    static autoPtr<AtomizationModel<CloudType> > New
+    static autoPtr<AtomizationModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -144,39 +144,39 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeAtomizationModel(CloudType)                                       \
-                                                                              \
-    typedef Foam::CloudType::sprayCloudType sprayCloudType;                   \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::AtomizationModel<sprayCloudType>,                               \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            AtomizationModel<sprayCloudType>,                                 \
-            dictionary                                                        \
-        );                                                                    \
+#define makeAtomizationModel(CloudType)                                        \
+                                                                               \
+    typedef Foam::CloudType::sprayCloudType sprayCloudType;                    \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::AtomizationModel<sprayCloudType>,                                \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            AtomizationModel<sprayCloudType>,                                  \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeAtomizationModelType(SS, CloudType)                               \
-                                                                              \
-    typedef Foam::CloudType::sprayCloudType sprayCloudType;                   \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<sprayCloudType>, 0);         \
-                                                                              \
-    Foam::AtomizationModel<sprayCloudType>::                                  \
-        adddictionaryConstructorToTable<Foam::SS<sprayCloudType> >            \
+#define makeAtomizationModelType(SS, CloudType)                                \
+                                                                               \
+    typedef Foam::CloudType::sprayCloudType sprayCloudType;                    \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<sprayCloudType>, 0);          \
+                                                                               \
+    Foam::AtomizationModel<sprayCloudType>::                                   \
+        adddictionaryConstructorToTable<Foam::SS<sprayCloudType>>              \
             add##SS##CloudType##sprayCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AtomizationModel.C"
+    #include "AtomizationModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C b/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C
index 3ef9a30928d0b7ddf47f552c5d3383535fe3035a..475f66f088ad0c724dbea3bfcfaaf2ad1ba7992c 100644
--- a/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C
+++ b/src/lagrangian/spray/submodels/AtomizationModel/AtomizationModel/AtomizationModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::AtomizationModel<CloudType> >
+Foam::autoPtr<Foam::AtomizationModel<CloudType>>
 Foam::AtomizationModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::AtomizationModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<AtomizationModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<AtomizationModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.H b/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.H
index f6a2af7093371c3146c47dcc964b15cd0369119c..68729f4611831c2eec4fa8847138ddedd04cc160 100644
--- a/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.H
+++ b/src/lagrangian/spray/submodels/AtomizationModel/BlobsSheetAtomization/BlobsSheetAtomization.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,9 +82,9 @@ public:
         BlobsSheetAtomization(const BlobsSheetAtomization<CloudType>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AtomizationModel<CloudType> > clone() const
+        virtual autoPtr<AtomizationModel<CloudType>> clone() const
         {
-            return autoPtr<AtomizationModel<CloudType> >
+            return autoPtr<AtomizationModel<CloudType>>
             (
                 new BlobsSheetAtomization<CloudType>(*this)
             );
@@ -131,7 +131,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "BlobsSheetAtomization.C"
+    #include "BlobsSheetAtomization.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C b/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C
index 33cda4093b969f7808646f77674ba7ff29fdf1c9..c21fdfd583b1b967d91adceb784975c7c15d2fdb 100644
--- a/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C
+++ b/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -225,7 +225,7 @@ void Foam::LISAAtomization<CloudType>::update
     }
     else
     {
-        k = rhoAv*sqr(Urel)/2.0*sigma;
+        k = rhoAv*sqr(Urel)/(2.0*sigma);
 
         scalar J = 0.5*traveledTime*hSheet;
 
diff --git a/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.H b/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.H
index a993c3e9112bbfc4093445276c84129f47a74cfb..63baffb983c088abb1fe19b9ebb9255ffa700ed0 100644
--- a/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.H
+++ b/src/lagrangian/spray/submodels/AtomizationModel/LISAAtomization/LISAAtomization.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,9 +102,9 @@ public:
         LISAAtomization(const LISAAtomization<CloudType>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AtomizationModel<CloudType> > clone() const
+        virtual autoPtr<AtomizationModel<CloudType>> clone() const
         {
-            return autoPtr<AtomizationModel<CloudType> >
+            return autoPtr<AtomizationModel<CloudType>>
             (
                 new LISAAtomization<CloudType>(*this)
             );
@@ -151,7 +151,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "LISAAtomization.C"
+    #include "LISAAtomization.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/AtomizationModel/NoAtomization/NoAtomization.H b/src/lagrangian/spray/submodels/AtomizationModel/NoAtomization/NoAtomization.H
index 077f544d12dbe53db76f92cdc4e574bd665c5f85..ee9dd85a8f755f5a847da18f23e498e82cc3c1d3 100644
--- a/src/lagrangian/spray/submodels/AtomizationModel/NoAtomization/NoAtomization.H
+++ b/src/lagrangian/spray/submodels/AtomizationModel/NoAtomization/NoAtomization.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,9 +62,9 @@ public:
         NoAtomization(const NoAtomization<CloudType>& am);
 
         //- Construct and return a clone
-        virtual autoPtr<AtomizationModel<CloudType> > clone() const
+        virtual autoPtr<AtomizationModel<CloudType>> clone() const
         {
-            return autoPtr<AtomizationModel<CloudType> >
+            return autoPtr<AtomizationModel<CloudType>>
             (
                 new NoAtomization<CloudType>(*this)
             );
@@ -114,7 +114,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoAtomization.C"
+    #include "NoAtomization.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.H b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.H
index 6300a8fcfa5424d49dc618f6107d7824e7ec7874..22df98c34bfec7ba4bf3d42ab7294ce99d36ef55 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,7 +106,7 @@ public:
         BreakupModel(const BreakupModel<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const = 0;
+        virtual autoPtr<BreakupModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -114,7 +114,7 @@ public:
 
 
     //- Selector
-    static autoPtr<BreakupModel<CloudType> > New
+    static autoPtr<BreakupModel<CloudType>> New
     (
         const dictionary& dict,
         CloudType& owner
@@ -191,39 +191,39 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeBreakupModel(CloudType)                                           \
-                                                                              \
-    typedef Foam::CloudType::sprayCloudType sprayCloudType;                   \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::BreakupModel<sprayCloudType>,                                   \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        defineTemplateRunTimeSelectionTable                                   \
-        (                                                                     \
-            BreakupModel<sprayCloudType>,                                     \
-            dictionary                                                        \
-        );                                                                    \
+#define makeBreakupModel(CloudType)                                            \
+                                                                               \
+    typedef Foam::CloudType::sprayCloudType sprayCloudType;                    \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::BreakupModel<sprayCloudType>,                                    \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        defineTemplateRunTimeSelectionTable                                    \
+        (                                                                      \
+            BreakupModel<sprayCloudType>,                                      \
+            dictionary                                                         \
+        );                                                                     \
     }
 
 
-#define makeBreakupModelType(SS, CloudType)                                   \
-                                                                              \
-    typedef Foam::CloudType::sprayCloudType sprayCloudType;                   \
-    defineNamedTemplateTypeNameAndDebug(Foam::SS<sprayCloudType>, 0);         \
-                                                                              \
-    Foam::BreakupModel<sprayCloudType>::                                      \
-        adddictionaryConstructorToTable<Foam::SS<sprayCloudType> >            \
+#define makeBreakupModelType(SS, CloudType)                                    \
+                                                                               \
+    typedef Foam::CloudType::sprayCloudType sprayCloudType;                    \
+    defineNamedTemplateTypeNameAndDebug(Foam::SS<sprayCloudType>, 0);          \
+                                                                               \
+    Foam::BreakupModel<sprayCloudType>::                                       \
+        adddictionaryConstructorToTable<Foam::SS<sprayCloudType>>              \
             add##SS##CloudType##sprayCloudType##ConstructorToTable_;
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "BreakupModel.C"
+    #include "BreakupModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C
index d60bfc051a6bd59eadda504450c1bf3508035c25..649b465b29407028018440f2ab018631d77793d2 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C
+++ b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModelNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class CloudType>
-Foam::autoPtr<Foam::BreakupModel<CloudType> >
+Foam::autoPtr<Foam::BreakupModel<CloudType>>
 Foam::BreakupModel<CloudType>::New
 (
     const dictionary& dict,
@@ -52,7 +52,7 @@ Foam::BreakupModel<CloudType>::New
             << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<BreakupModel<CloudType> >(cstrIter()(dict, owner));
+    return autoPtr<BreakupModel<CloudType>>(cstrIter()(dict, owner));
 }
 
 
diff --git a/src/lagrangian/spray/submodels/BreakupModel/ETAB/ETAB.H b/src/lagrangian/spray/submodels/BreakupModel/ETAB/ETAB.H
index 7a681c8dbeefee20637049333d762429a71407d2..3304802cae3cdf2e7d1ac90cbe53a884e2ab24cd 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/ETAB/ETAB.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/ETAB/ETAB.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,9 +92,9 @@ public:
         ETAB(const ETAB<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new ETAB<CloudType>(*this)
             );
@@ -142,7 +142,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ETAB.C"
+    #include "ETAB.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/NoBreakup/NoBreakup.H b/src/lagrangian/spray/submodels/BreakupModel/NoBreakup/NoBreakup.H
index 6371570638f39195eba1fa9c6ee8c084d8dc870c..3d9faf6e6e1edf1ad408c1082a4aa2974dc246b0 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/NoBreakup/NoBreakup.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/NoBreakup/NoBreakup.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,9 +62,9 @@ public:
         NoBreakup(const NoBreakup<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new NoBreakup<CloudType>(*this)
             );
@@ -115,7 +115,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NoBreakup.C"
+    #include "NoBreakup.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/PilchErdman/PilchErdman.H b/src/lagrangian/spray/submodels/BreakupModel/PilchErdman/PilchErdman.H
index 235c9d76c09cb92bd30501861064d456dd0bb2b4..0d968ff5dc2eee6c66abb5beb035d09c56296346 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/PilchErdman/PilchErdman.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/PilchErdman/PilchErdman.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,9 +96,9 @@ public:
         PilchErdman(const PilchErdman<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new PilchErdman<CloudType>(*this)
             );
@@ -146,7 +146,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PilchErdman.C"
+    #include "PilchErdman.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/ReitzDiwakar/ReitzDiwakar.H b/src/lagrangian/spray/submodels/BreakupModel/ReitzDiwakar/ReitzDiwakar.H
index 9d9081ab342cb7ffdc674418863889971d4831d0..6588b10ca04c356972c70aac9f5a73c07200f0c6 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/ReitzDiwakar/ReitzDiwakar.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/ReitzDiwakar/ReitzDiwakar.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,9 +90,9 @@ public:
         ReitzDiwakar(const ReitzDiwakar<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new ReitzDiwakar<CloudType>(*this)
             );
@@ -140,7 +140,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReitzDiwakar.C"
+    #include "ReitzDiwakar.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/ReitzKHRT/ReitzKHRT.H b/src/lagrangian/spray/submodels/BreakupModel/ReitzKHRT/ReitzKHRT.H
index 0cc56e87537c1101809a0f0900001a710fb26f0f..1e8c3c9991d577658d272a3fc0e6bfe707e4b0f0 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/ReitzKHRT/ReitzKHRT.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/ReitzKHRT/ReitzKHRT.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,9 +77,9 @@ public:
         ReitzKHRT(const ReitzKHRT<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new ReitzKHRT<CloudType>(*this)
             );
@@ -127,7 +127,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReitzKHRT.C"
+    #include "ReitzKHRT.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.H b/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.H
index 94456c64a8aff4b08d830f0e823c7e47095c786f..a9b121fb2a60ea6a0f38c7db498acde15082da39 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/SHF/SHF.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,9 +119,9 @@ public:
         SHF(const SHF<CloudType>& bum);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new SHF<CloudType>(*this)
             );
@@ -169,7 +169,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SHF.C"
+    #include "SHF.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/BreakupModel/TAB/TAB.H b/src/lagrangian/spray/submodels/BreakupModel/TAB/TAB.H
index f5f6b73c7156090f105ff9219c45b779e812af77..55c1e1b16db636da495dfde1fdecf07a0c79b3ce 100644
--- a/src/lagrangian/spray/submodels/BreakupModel/TAB/TAB.H
+++ b/src/lagrangian/spray/submodels/BreakupModel/TAB/TAB.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,9 +102,9 @@ public:
         TAB(const TAB<CloudType>& im);
 
         //- Construct and return a clone
-        virtual autoPtr<BreakupModel<CloudType> > clone() const
+        virtual autoPtr<BreakupModel<CloudType>> clone() const
         {
-            return autoPtr<BreakupModel<CloudType> >
+            return autoPtr<BreakupModel<CloudType>>
             (
                 new TAB<CloudType>(*this)
             );
@@ -152,7 +152,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TAB.C"
+    #include "TAB.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.H b/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.H
index 0e3381a9af40fb7443604f9acf641c5690afc665..aa26c45341512fb3db9c18ef83ba26a11d2063a2 100644
--- a/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.H
+++ b/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,9 +108,9 @@ public:
         ORourkeCollision(const ORourkeCollision<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const
+        virtual autoPtr<StochasticCollisionModel<CloudType>> clone() const
         {
-            return autoPtr<StochasticCollisionModel<CloudType> >
+            return autoPtr<StochasticCollisionModel<CloudType>>
             (
                 new ORourkeCollision<CloudType>(*this)
             );
@@ -129,7 +129,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ORourkeCollision.C"
+    #include "ORourkeCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.H b/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.H
index ebd23198a06b5d7969c55afbb144c35889b272bc..722ebd1db0f6a3a8b16bd61c818ae8ac43a55bb0 100644
--- a/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.H
+++ b/src/lagrangian/spray/submodels/StochasticCollision/TrajectoryCollision/TrajectoryCollision.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,9 +93,9 @@ public:
         TrajectoryCollision(const TrajectoryCollision<CloudType>& cm);
 
         //- Construct and return a clone
-        virtual autoPtr<StochasticCollisionModel<CloudType> > clone() const
+        virtual autoPtr<StochasticCollisionModel<CloudType>> clone() const
         {
-            return autoPtr<StochasticCollisionModel<CloudType> >
+            return autoPtr<StochasticCollisionModel<CloudType>>
             (
                 new TrajectoryCollision<CloudType>(*this)
             );
@@ -114,7 +114,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TrajectoryCollision.C"
+    #include "TrajectoryCollision.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/turbulence/parcels/include/makeParcelTurbulenceDispersionModels.H b/src/lagrangian/turbulence/parcels/include/makeParcelTurbulenceDispersionModels.H
index 5bcc0c68bf4f8e29611818910802eb68e261b46d..f10a12205700913037c7ed7d00f72602fd9b8a97 100644
--- a/src/lagrangian/turbulence/parcels/include/makeParcelTurbulenceDispersionModels.H
+++ b/src/lagrangian/turbulence/parcels/include/makeParcelTurbulenceDispersionModels.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,17 +33,17 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeParcelTurbulenceDispersionModels(CloudType)                       \
-                                                                              \
-    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;           \
-    defineNamedTemplateTypeNameAndDebug                                       \
-    (                                                                         \
-        Foam::DispersionRASModel<kinematicCloudType>,                         \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    makeDispersionModelType(GradientDispersionRAS, CloudType);                \
-    makeDispersionModelType(StochasticDispersionRAS, CloudType);              \
+#define makeParcelTurbulenceDispersionModels(CloudType)                        \
+                                                                               \
+    typedef Foam::CloudType::kinematicCloudType kinematicCloudType;            \
+    defineNamedTemplateTypeNameAndDebug                                        \
+    (                                                                          \
+        Foam::DispersionRASModel<kinematicCloudType>,                          \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    makeDispersionModelType(GradientDispersionRAS, CloudType);                 \
+    makeDispersionModelType(StochasticDispersionRAS, CloudType);               \
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/turbulence/parcels/include/makeThermoParcelTurbulenceForces.H b/src/lagrangian/turbulence/parcels/include/makeThermoParcelTurbulenceForces.H
index d7581110b51eff9914394b9feaa66a7629706c4f..db6d224dd318cfbc730c0661f3bb145559748fc9 100644
--- a/src/lagrangian/turbulence/parcels/include/makeThermoParcelTurbulenceForces.H
+++ b/src/lagrangian/turbulence/parcels/include/makeThermoParcelTurbulenceForces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,8 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeThermoParcelTurbulenceForces(CloudType)                           \
-                                                                              \
+#define makeThermoParcelTurbulenceForces(CloudType)                            \
+                                                                               \
     makeParticleForceModelType(BrownianMotionForce, CloudType);
 
 
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C
index b86451b1458bd41f49173b24250dd03cdcc2a98b..cccba17a2c0f08965d9ac9ba51ac24022d8cc3d0 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -147,7 +147,7 @@ void Foam::DispersionRASModel<CloudType>::cacheFields(const bool store)
         }
         else
         {
-            kPtr_ = tk.operator->();
+            kPtr_ = &tk();
             ownK_ = false;
         }
 
@@ -159,7 +159,7 @@ void Foam::DispersionRASModel<CloudType>::cacheFields(const bool store)
         }
         else
         {
-            epsilonPtr_ = tepsilon.operator->();
+            epsilonPtr_ = &tepsilon();
             ownEpsilon_ = false;
         }
     }
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H
index 278192e5062c0990c4774e07b58d1b7fd23a2c12..e987e653cfaa0ac41c91986787e23d021e3118da 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,7 +92,7 @@ public:
         DispersionRASModel(const DispersionRASModel<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DispersionModel<CloudType> > clone() const = 0;
+        virtual autoPtr<DispersionModel<CloudType>> clone() const = 0;
 
 
     //- Destructor
@@ -130,7 +130,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "DispersionRASModel.C"
+    #include "DispersionRASModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C
index da2d36baf1b90f45a64a8466da64007f9f9ba4bd..8469c76035efdb1c2c88dc1b613f6327856d1345 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -148,7 +148,7 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update
     else
     {
         tTurb = GREAT;
-        UTurb = vector::zero;
+        UTurb = Zero;
     }
 
     return Uc + UTurb;
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H
index c48025d41b7059fe0836d787365ef337361002cf..12820a2f6ac82d37ed9bf2d96359ff71840a6fff 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,9 +78,9 @@ public:
         GradientDispersionRAS(const GradientDispersionRAS<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DispersionModel<CloudType> > clone() const
+        virtual autoPtr<DispersionModel<CloudType>> clone() const
         {
-            return autoPtr<DispersionModel<CloudType> >
+            return autoPtr<DispersionModel<CloudType>>
             (
                 new GradientDispersionRAS<CloudType>(*this)
             );
@@ -116,7 +116,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "GradientDispersionRAS.C"
+    #include "GradientDispersionRAS.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C
index 554967aa99a157877d0f5c2bc16ec87963dd92e5..e5131b80071272775f1790f4db73b2fe33d1242d 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -111,7 +111,7 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update
     else
     {
         tTurb = GREAT;
-        UTurb = vector::zero;
+        UTurb = Zero;
     }
 
     return Uc + UTurb;
diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H
index fe6acc7ae00f897161a990a1390bcd8c75c4d95c..f031ed799c5eb7578cca30c56c29dc6bc735fca1 100644
--- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H
+++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,9 +65,9 @@ public:
         StochasticDispersionRAS(const StochasticDispersionRAS<CloudType>& dm);
 
         //- Construct and return a clone
-        virtual autoPtr<DispersionModel<CloudType> > clone() const
+        virtual autoPtr<DispersionModel<CloudType>> clone() const
         {
-            return autoPtr<DispersionModel<CloudType> >
+            return autoPtr<DispersionModel<CloudType>>
             (
                 new StochasticDispersionRAS<CloudType>(*this)
             );
@@ -100,7 +100,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "StochasticDispersionRAS.C"
+    #include "StochasticDispersionRAS.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C
index 563ab8c7360ca7f3a8eb06577cb91156c607c7d4..390309362895d189ebb7a6ad040e2c79d2818a0b 100644
--- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C
+++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,7 +139,7 @@ void Foam::BrownianMotionForce<CloudType>::cacheFields(const bool store)
             }
             else
             {
-                kPtr_ = tk.operator->();
+                kPtr_ = &tk();
                 ownK_ = false;
             }
         }
@@ -165,7 +165,7 @@ Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled
     const scalar muc
 ) const
 {
-    forceSuSp value(vector::zero, 0.0);
+    forceSuSp value(Zero, 0.0);
 
     const scalar dp = p.d();
     const scalar Tc = p.Tc();
@@ -187,9 +187,8 @@ Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled
     }
     else
     {
-        const scalar rhoRatio = p.rho()/p.rhoc();
         const scalar s0 =
-            216*muc*sigma*Tc/(sqr(mathematical::pi)*pow5(dp)*(rhoRatio)*cc);
+            216*muc*sigma*Tc/(sqr(mathematical::pi)*pow5(dp)*sqr(p.rho())*cc);
         f = eta*sqrt(mathematical::pi*s0/dt);
     }
 
diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H
index b3df4ac786ebf8519f5dc1592fd1f2fb3a2add01..0c7a5e89f7cbaf176227d228c78f181e051c15e5 100644
--- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H
+++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,16 @@ Class
     Foam::BrownianMotionForce
 
 Description
-    Calculates particle Brownian motion force
+    Calculates particle Brownian motion force.
+
+    Reference:
+    \verbatim
+        Li, A., & Ahmadi, G. (1992).
+        Dispersion and deposition of spherical particles from point sources
+        in a turbulent channel flow.
+        Aerosol science and technology,
+        16(4), 209-226.
+    \endverbatim
 
 SourceFiles
     BrownianMotionForceI.H
@@ -100,9 +109,9 @@ public:
         BrownianMotionForce(const BrownianMotionForce& bmf);
 
         //- Construct and return a clone
-        virtual autoPtr<ParticleForce<CloudType> > clone() const
+        virtual autoPtr<ParticleForce<CloudType>> clone() const
         {
-            return autoPtr<ParticleForce<CloudType> >
+            return autoPtr<ParticleForce<CloudType>>
             (
                 new BrownianMotionForce<CloudType>(*this)
             );
@@ -129,7 +138,7 @@ public:
             //- Cache fields
             virtual void cacheFields(const bool store);
 
-            //- Calculate the non-coupled force
+            //- Calculate the coupled force
             virtual forceSuSp calcCoupled
             (
                 const typename CloudType::parcelType& p,
diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake
index fef9e5c2bc6f092fd03665ef867a31fa6ff21a0a..a4e823f5544f7502c9f4e240f345e58e3cf76897 100755
--- a/src/mesh/Allwmake
+++ b/src/mesh/Allwmake
@@ -6,7 +6,7 @@ targetType=libso
 . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 set -x
 
-wmake $targetType autoMesh
+wmake $targetType snappyHexMesh
 wmake $targetType blockMesh
 wmake $targetType extrudeModel
 
diff --git a/src/mesh/autoMesh/Make/files b/src/mesh/autoMesh/Make/files
deleted file mode 100644
index 29001bafb78ee672699f01948483be8bf7772d89..0000000000000000000000000000000000000000
--- a/src/mesh/autoMesh/Make/files
+++ /dev/null
@@ -1,38 +0,0 @@
-autoHexMesh             = autoHexMesh
-autoHexMeshDriver       = $(autoHexMesh)/autoHexMeshDriver
-
-$(autoHexMeshDriver)/autoLayerDriver.C
-$(autoHexMeshDriver)/autoSnapDriver.C
-$(autoHexMeshDriver)/autoSnapDriverFeature.C
-$(autoHexMeshDriver)/autoRefineDriver.C
-
-$(autoHexMeshDriver)/layerParameters/layerParameters.C
-$(autoHexMeshDriver)/refinementParameters/refinementParameters.C
-$(autoHexMeshDriver)/snapParameters/snapParameters.C
-
-$(autoHexMesh)/meshRefinement/meshRefinementBaffles.C
-$(autoHexMesh)/meshRefinement/meshRefinement.C
-$(autoHexMesh)/meshRefinement/meshRefinementMerge.C
-$(autoHexMesh)/meshRefinement/meshRefinementProblemCells.C
-$(autoHexMesh)/meshRefinement/meshRefinementRefine.C
-$(autoHexMesh)/meshRefinement/meshRefinementGapRefine.C
-$(autoHexMesh)/meshRefinement/patchFaceOrientation.C
-
-$(autoHexMesh)/refinementFeatures/refinementFeatures.C
-$(autoHexMesh)/refinementSurfaces/surfaceZonesInfo.C
-$(autoHexMesh)/refinementSurfaces/refinementSurfaces.C
-$(autoHexMesh)/shellSurfaces/shellSurfaces.C
-$(autoHexMesh)/trackedParticle/trackedParticle.C
-$(autoHexMesh)/trackedParticle/trackedParticleCloud.C
-
-meshMover = $(autoHexMesh)/externalDisplacementMeshMover
-$(meshMover)/displacementMeshMoverMotionSolver.C
-$(meshMover)/externalDisplacementMeshMover.C
-$(meshMover)/medialAxisMeshMover.C
-$(meshMover)/displacementMotionSolverMeshMover.C
-/* $(meshMover)/pointSmoothingMeshMover.C */
-$(meshMover)/zeroFixedValue/zeroFixedValuePointPatchFields.C
-$(meshMover)/fieldSmoother/fieldSmoother.C
-
-LIB = $(FOAM_LIBBIN)/libautoMesh
-
diff --git a/src/mesh/blockMesh/block/blockCreate.C b/src/mesh/blockMesh/block/blockCreate.C
index 85c6c583b9eefdbbe3a92f625a2df1530d7197a1..b3ce7d3a31623552b2b29066cecb98392bd3c73d 100644
--- a/src/mesh/blockMesh/block/blockCreate.C
+++ b/src/mesh/blockMesh/block/blockCreate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ void Foam::block::createPoints() const
 
 
     // List of edge point and weighting factors
-    const List< List<point> >& p = blockEdgePoints();
+    const List<List<point>>& p = blockEdgePoints();
     const scalarListList& w = blockEdgeWeights();
 
     //
diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C
index 1357a9e5668e712ed8703d3c5cd940b00d863342..1bdb4a82d7ddc8af0b99449d6fb1be7a277550bc 100644
--- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C
+++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -186,7 +186,7 @@ const Foam::cellShape& Foam::blockDescriptor::blockShape() const
 }
 
 
-const Foam::List< Foam::List< Foam::point > >&
+const Foam::List<Foam::List<Foam::point>>&
 Foam::blockDescriptor::blockEdgePoints() const
 {
     return edgePoints_;
diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H
index df3bfa8a390b9acdf5788b2a2e6105311c09f167..a1e6e60798524d0e29731c9cb618d1e501353584 100644
--- a/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H
+++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ class blockDescriptor
         Vector<label> meshDensity_;
 
         //- Block edge points
-        List< List<point> > edgePoints_;
+        List<List<point>> edgePoints_;
 
         //- Block edge weighting factors
         scalarListList edgeWeights_;
@@ -155,7 +155,7 @@ public:
         const cellShape& blockShape() const;
 
         //- Return the block points along each edge
-        const List< List<point> >& blockEdgePoints() const;
+        const List<List<point>>& blockEdgePoints() const;
 
         //- Return the weightings along each edge
         const scalarListList& blockEdgeWeights() const;
diff --git a/src/mesh/blockMesh/blockMesh/blockMeshMergeFast.C b/src/mesh/blockMesh/blockMesh/blockMeshMergeFast.C
index 2936da2643a9899a472929d368fcce11c1580f8c..38f529968df2f76dd3e75aece457e070f7d1caf9 100644
--- a/src/mesh/blockMesh/blockMesh/blockMeshMergeFast.C
+++ b/src/mesh/blockMesh/blockMesh/blockMeshMergeFast.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -117,7 +117,7 @@ void setBlockFaceCorrespondence
     const cellList& topoCells,
     const faceList::subList& topoInternalFaces,
     const labelList& topoFaceCell,
-    List<Pair<label> >& mergeBlock
+    List<Pair<label>>& mergeBlock
 )
 {
     forAll(topoInternalFaces, topoFacei)
@@ -338,7 +338,7 @@ void Foam::blockMesh::calcMergeInfoFast()
         topology().nInternalFaces()
     );
 
-    List<Pair<label> > mergeBlockP(topoInternalFaces.size());
+    List<Pair<label>> mergeBlockP(topoInternalFaces.size());
     setBlockFaceCorrespondence
     (
         topoCells,
@@ -347,7 +347,7 @@ void Foam::blockMesh::calcMergeInfoFast()
         mergeBlockP
     );
 
-    List<Pair<label> > mergeBlockN(topoInternalFaces.size());
+    List<Pair<label>> mergeBlockN(topoInternalFaces.size());
     setBlockFaceCorrespondence
     (
         topoCells,
diff --git a/src/mesh/blockMesh/curvedEdges/bezier.C b/src/mesh/blockMesh/curvedEdges/bezier.C
index 28363be46137e32d26ec75798c129980a0008e64..3babbb2c12bedcda51cf5da675f9900b949fe87f 100644
--- a/src/mesh/blockMesh/curvedEdges/bezier.C
+++ b/src/mesh/blockMesh/curvedEdges/bezier.C
@@ -74,13 +74,11 @@ Foam::point Foam::bezier::position(const scalar lambda) const
 
     forAll(working, workingI)
     {
-        -- nWorking;
+        --nWorking;
 
-        SubList<point>(working, nWorking).assign
-        (
+        SubList<point>(working, nWorking) =
             (1 - lambda)*SubList<point>(working, nWorking)
-          + lambda*SubList<point>(working, nWorking, 1)
-        );
+          + lambda*SubList<point>(working, nWorking, 1);
     }
 
     return working[0];
diff --git a/src/mesh/blockMesh/curvedEdges/curvedEdge.C b/src/mesh/blockMesh/curvedEdges/curvedEdge.C
index 895c472947514ee22b1a6a13e936cbdc109bfd76..b3816b016c36518ee22d3eada097b25b0a26210f 100644
--- a/src/mesh/blockMesh/curvedEdges/curvedEdge.C
+++ b/src/mesh/blockMesh/curvedEdges/curvedEdge.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,9 +81,7 @@ Foam::autoPtr<Foam::curvedEdge> Foam::curvedEdge::New
 {
     if (debug)
     {
-        Info<< "curvedEdge::New(const pointField&, Istream&) : "
-            << "constructing curvedEdge"
-            << endl;
+        InfoInFunction << "Constructing curvedEdge" << endl;
     }
 
     const word edgeType(is);
diff --git a/src/mesh/extrudeModel/radial/radial.C b/src/mesh/extrudeModel/radial/radial.C
index c2aae13fedccdf3d7dc8eafbd0f8fb881f0bd618..a27ebad2c4e4727001e5ff72cdd6b654430c4742 100644
--- a/src/mesh/extrudeModel/radial/radial.C
+++ b/src/mesh/extrudeModel/radial/radial.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ addToRunTimeSelectionTable(extrudeModel, radial, dictionary);
 radial::radial(const dictionary& dict)
 :
     extrudeModel(typeName, dict),
-    R_(DataEntry<scalar>::New("R", coeffDict_))
+    R_(Function1<scalar>::New("R", coeffDict_))
 {}
 
 
diff --git a/src/mesh/extrudeModel/radial/radial.H b/src/mesh/extrudeModel/radial/radial.H
index dae9546f3bec9b0a5abbdd0a13a4193ca62e392e..2143cde47dd7d3e2f451ae31a30ee2348d19ac89 100644
--- a/src/mesh/extrudeModel/radial/radial.H
+++ b/src/mesh/extrudeModel/radial/radial.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ Description
 #define radial_H
 
 #include "extrudeModel.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -51,7 +51,7 @@ class radial
 {
     // Private data
 
-        autoPtr<DataEntry<scalar> > R_;
+        autoPtr<Function1<scalar>> R_;
 
 
 public:
diff --git a/src/mesh/snappyHexMesh/Make/files b/src/mesh/snappyHexMesh/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..49a981e4afdba010b23b2b2969ead66be61026c1
--- /dev/null
+++ b/src/mesh/snappyHexMesh/Make/files
@@ -0,0 +1,34 @@
+snappyHexMeshDriver/snappyLayerDriver.C
+snappyHexMeshDriver/snappySnapDriver.C
+snappyHexMeshDriver/snappySnapDriverFeature.C
+snappyHexMeshDriver/snappyRefineDriver.C
+
+snappyHexMeshDriver/layerParameters/layerParameters.C
+snappyHexMeshDriver/refinementParameters/refinementParameters.C
+snappyHexMeshDriver/snapParameters/snapParameters.C
+
+meshRefinement/meshRefinementBaffles.C
+meshRefinement/meshRefinement.C
+meshRefinement/meshRefinementMerge.C
+meshRefinement/meshRefinementProblemCells.C
+meshRefinement/meshRefinementRefine.C
+meshRefinement/meshRefinementGapRefine.C
+meshRefinement/patchFaceOrientation.C
+
+refinementFeatures/refinementFeatures.C
+refinementSurfaces/surfaceZonesInfo.C
+refinementSurfaces/refinementSurfaces.C
+shellSurfaces/shellSurfaces.C
+trackedParticle/trackedParticle.C
+trackedParticle/trackedParticleCloud.C
+
+externalDisplacementMeshMover/displacementMeshMoverMotionSolver.C
+externalDisplacementMeshMover/externalDisplacementMeshMover.C
+externalDisplacementMeshMover/medialAxisMeshMover.C
+externalDisplacementMeshMover/displacementMotionSolverMeshMover.C
+/* externalDisplacementMeshMover/pointSmoothingMeshMover.C */
+externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.C
+externalDisplacementMeshMover/fieldSmoother/fieldSmoother.C
+
+LIB = $(FOAM_LIBBIN)/libsnappyHexMesh
+
diff --git a/src/mesh/autoMesh/Make/options b/src/mesh/snappyHexMesh/Make/options
similarity index 100%
rename from src/mesh/autoMesh/Make/options
rename to src/mesh/snappyHexMesh/Make/options
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.C
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMeshMoverMotionSolver.H
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.C
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/displacementMotionSolverMeshMover.H
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C
similarity index 96%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C
index dbd827bdfeea7c77f1f874ef21c200ad9d3868a3..b5100a4e8a8e354730232c7be542a96dc0632999 100644
--- a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C
+++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -50,9 +50,9 @@ Foam::labelList Foam::externalDisplacementMeshMover::getFixedValueBCs
         const pointPatchField<vector>& patchField =
             field.boundaryField()[patchI];
 
-        if (isA<valuePointPatchField<vector> >(patchField))
+        if (isA<valuePointPatchField<vector>>(patchField))
         {
-            if (isA<zeroFixedValuePointPatchField<vector> >(patchField))
+            if (isA<zeroFixedValuePointPatchField<vector>>(patchField))
             {
                 // Special condition of fixed boundary condition. Does not
                 // get adapted
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/externalDisplacementMeshMover.H
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.C
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmoother.H
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmootherTemplates.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmootherTemplates.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmootherTemplates.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/fieldSmoother/fieldSmootherTemplates.C
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C
similarity index 94%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C
index 8c47360d3782e58366f6cdb5263f6a4ea586032f..f68aa1d09af67ccb47d3ee1006291df47c984266 100644
--- a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C
+++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -56,7 +56,7 @@ namespace Foam
 // wall point for both vertices of edge.
 bool Foam::medialAxisMeshMover::isMaxEdge
 (
-    const List<PointData<vector> >& pointWallDist,
+    const List<PointData<vector>>& pointWallDist,
     const label edgeI,
     const scalar minCos
 ) const
@@ -223,7 +223,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     // Distance to wall
-    List<PointData<vector> > pointWallDist(mesh().nPoints());
+    List<PointData<vector>> pointWallDist(mesh().nPoints());
 
     // Dummy additional info for PointEdgeWave
     int dummyTrackData = 0;
@@ -232,7 +232,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
     // 1. Calculate distance to points where displacement is specified.
     {
         // Seed data.
-        List<PointData<vector> > wallInfo(meshPoints.size());
+        List<PointData<vector>> wallInfo(meshPoints.size());
 
         forAll(meshPoints, patchPointI)
         {
@@ -246,8 +246,8 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
         }
 
         // Do all calculations
-        List<PointData<vector> > edgeWallDist(mesh().nEdges());
-        PointEdgeWave<PointData<vector> > wallDistCalc
+        List<PointData<vector>> edgeWallDist(mesh().nEdges());
+        PointEdgeWave<PointData<vector>> wallDistCalc
         (
             mesh(),
             meshPoints,
@@ -624,19 +624,19 @@ bool Foam::medialAxisMeshMover::unmarkExtrusion
 (
     const label patchPointI,
     pointField& patchDisp,
-    List<autoLayerDriver::extrudeMode>& extrudeStatus
+    List<snappyLayerDriver::extrudeMode>& extrudeStatus
 )
 {
-    if (extrudeStatus[patchPointI] == autoLayerDriver::EXTRUDE)
+    if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDE)
     {
-        extrudeStatus[patchPointI] = autoLayerDriver::NOEXTRUDE;
-        patchDisp[patchPointI] = vector::zero;
+        extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
+        patchDisp[patchPointI] = Zero;
         return true;
     }
-    else if (extrudeStatus[patchPointI] == autoLayerDriver::EXTRUDEREMOVE)
+    else if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDEREMOVE)
     {
-        extrudeStatus[patchPointI] = autoLayerDriver::NOEXTRUDE;
-        patchDisp[patchPointI] = vector::zero;
+        extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
+        patchDisp[patchPointI] = Zero;
         return true;
     }
     else
@@ -650,7 +650,7 @@ void Foam::medialAxisMeshMover::syncPatchDisplacement
 (
     const scalarField& minThickness,
     pointField& patchDisp,
-    List<autoLayerDriver::extrudeMode>& extrudeStatus
+    List<snappyLayerDriver::extrudeMode>& extrudeStatus
 ) const
 {
     const indirectPrimitivePatch& pp = adaptPatchPtr_();
@@ -770,7 +770,7 @@ handleFeatureAngleLayerTerminations
     const scalar minCos,
     const PackedBoolList& isPatchMasterPoint,
     const labelList& meshEdges,
-    List<autoLayerDriver::extrudeMode>& extrudeStatus,
+    List<snappyLayerDriver::extrudeMode>& extrudeStatus,
     pointField& patchDisp,
     label& nPointCounter
 ) const
@@ -788,7 +788,7 @@ handleFeatureAngleLayerTerminations
 
         forAll(f, fp)
         {
-            if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
+            if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
             {
                 extrudedFaces[faceI] = false;
                 break;
@@ -805,8 +805,8 @@ handleFeatureAngleLayerTerminations
     // edge for extrusion.
 
 
-    List<List<point> > edgeFaceNormals(pp.nEdges());
-    List<List<bool> > edgeFaceExtrude(pp.nEdges());
+    List<List<point>> edgeFaceNormals(pp.nEdges());
+    List<List<bool>> edgeFaceExtrude(pp.nEdges());
 
     const labelListList& edgeFaces = pp.edgeFaces();
     const vectorField& faceNormals = pp.faceNormals();
@@ -830,7 +830,7 @@ handleFeatureAngleLayerTerminations
         mesh(),
         meshEdges,
         edgeFaceNormals,
-        globalMeshData::ListPlusEqOp<List<point> >(),   // combine operator
+        globalMeshData::ListPlusEqOp<List<point>>(),   // combine operator
         List<point>()               // null value
     );
 
@@ -839,7 +839,7 @@ handleFeatureAngleLayerTerminations
         mesh(),
         meshEdges,
         edgeFaceExtrude,
-        globalMeshData::ListPlusEqOp<List<bool> >(),    // combine operator
+        globalMeshData::ListPlusEqOp<List<bool>>(),    // combine operator
         List<bool>()                // null value
     );
 
@@ -857,8 +857,8 @@ handleFeatureAngleLayerTerminations
 
             if
             (
-                extrudeStatus[v0] != autoLayerDriver::NOEXTRUDE
-             || extrudeStatus[v1] != autoLayerDriver::NOEXTRUDE
+                extrudeStatus[v0] != snappyLayerDriver::NOEXTRUDE
+             || extrudeStatus[v1] != snappyLayerDriver::NOEXTRUDE
             )
             {
                 if (!eFaceExtrude[0] || !eFaceExtrude[1])
@@ -905,7 +905,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
     const PackedBoolList& isPatchMasterEdge,
     const labelList& meshEdges,
     const scalarField& minThickness,
-    List<autoLayerDriver::extrudeMode>& extrudeStatus,
+    List<snappyLayerDriver::extrudeMode>& extrudeStatus,
     pointField& patchDisp
 ) const
 {
@@ -974,7 +974,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
 
                 forAll(f, fp)
                 {
-                    if (extrudeStatus[f[fp]] != autoLayerDriver::NOEXTRUDE)
+                    if (extrudeStatus[f[fp]] != snappyLayerDriver::NOEXTRUDE)
                     {
                         if (islandPoint[faceI] == -1)
                         {
@@ -998,7 +998,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
             // Check all surrounding faces that I am the islandPoint
             forAll(pointFaces, patchPointI)
             {
-                if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
+                if (extrudeStatus[patchPointI] != snappyLayerDriver::NOEXTRUDE)
                 {
                     const labelList& pFaces = pointFaces[patchPointI];
 
@@ -1026,7 +1026,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
                 const face& f = pp.localFaces()[faceI];
                 forAll(f, fp)
                 {
-                    if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
+                    if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
                     {
                         extrudedFaces[faceI] = false;
                         break;
@@ -1100,11 +1100,11 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
             label v0 = e[0];
             label v1 = e[1];
 
-            if (extrudeStatus[v1] != autoLayerDriver::NOEXTRUDE)
+            if (extrudeStatus[v1] != snappyLayerDriver::NOEXTRUDE)
             {
                 isolatedPoint[v0] += 1;
             }
-            if (extrudeStatus[v0] != autoLayerDriver::NOEXTRUDE)
+            if (extrudeStatus[v0] != snappyLayerDriver::NOEXTRUDE)
             {
                 isolatedPoint[v1] += 1;
             }
@@ -1139,7 +1139,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
         {
             forAll(f, fp)
             {
-                if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
+                if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE)
                 {
                     allPointsExtruded = false;
                     break;
@@ -1224,7 +1224,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
             false
         ),
         pMesh(),
-        dimensionedVector("dispVec", dimLength, vector::zero)
+        dimensionedVector("dispVec", dimLength, Zero)
     ),
     medialRatio_
     (
@@ -1266,7 +1266,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
             false
         ),
         pMesh(),
-        dimensionedVector("medialVec", dimLength, vector::zero)
+        dimensionedVector("medialVec", dimLength, Zero)
     )
 {
     update(dict);
@@ -1285,7 +1285,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
 (
     const dictionary& coeffDict,
     const scalarField& minThickness,
-    List<autoLayerDriver::extrudeMode>& extrudeStatus,
+    List<snappyLayerDriver::extrudeMode>& extrudeStatus,
     pointField& patchDisp
 )
 {
@@ -1379,7 +1379,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
 
     forAll(thickness, patchPointI)
     {
-        if (extrudeStatus[patchPointI] == autoLayerDriver::NOEXTRUDE)
+        if (extrudeStatus[patchPointI] == snappyLayerDriver::NOEXTRUDE)
         {
             thickness[patchPointI] = 0.0;
         }
@@ -1428,7 +1428,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
 
     forAll(meshPoints, patchPointI)
     {
-        if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
+        if (extrudeStatus[patchPointI] != snappyLayerDriver::NOEXTRUDE)
         {
             label pointI = meshPoints[patchPointI];
 
@@ -1522,7 +1522,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
     // Update thickess for changed extrusion
     forAll(thickness, patchPointI)
     {
-        if (extrudeStatus[patchPointI] == autoLayerDriver::NOEXTRUDE)
+        if (extrudeStatus[patchPointI] == snappyLayerDriver::NOEXTRUDE)
         {
             thickness[patchPointI] = 0.0;
         }
@@ -1547,18 +1547,18 @@ void Foam::medialAxisMeshMover::calculateDisplacement
     // Dummy additional info for PointEdgeWave
     int dummyTrackData = 0;
 
-    List<PointData<scalar> > pointWallDist(mesh().nPoints());
+    List<PointData<scalar>> pointWallDist(mesh().nPoints());
 
     const pointField& points = mesh().points();
     // 1. Calculate distance to points where displacement is specified.
     // This wave is used to transport layer thickness
     {
         // Distance to wall and medial axis on edges.
-        List<PointData<scalar> > edgeWallDist(mesh().nEdges());
+        List<PointData<scalar>> edgeWallDist(mesh().nEdges());
         labelList wallPoints(meshPoints.size());
 
         // Seed data.
-        List<PointData<scalar> > wallInfo(meshPoints.size());
+        List<PointData<scalar>> wallInfo(meshPoints.size());
 
         forAll(meshPoints, patchPointI)
         {
@@ -1573,7 +1573,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
         }
 
         // Do all calculations
-        PointEdgeWave<PointData<scalar> > wallDistCalc
+        PointEdgeWave<PointData<scalar>> wallDistCalc
         (
             mesh(),
             wallPoints,
@@ -1594,7 +1594,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
     {
         if (!pointWallDist[pointI].valid(dummyTrackData))
         {
-            displacement[pointI] = vector::zero;
+            displacement[pointI] = Zero;
         }
         else
         {
@@ -1732,16 +1732,16 @@ bool Foam::medialAxisMeshMover::move
         pp.meshPoints()
     );
 
-    List<autoLayerDriver::extrudeMode> extrudeStatus
+    List<snappyLayerDriver::extrudeMode> extrudeStatus
     (
         pp.nPoints(),
-        autoLayerDriver::EXTRUDE
+        snappyLayerDriver::EXTRUDE
     );
     forAll(extrudeStatus, pointI)
     {
         if (mag(patchDisp[pointI]) <= minThickness[pointI]+SMALL)
         {
-            extrudeStatus[pointI] = autoLayerDriver::NOEXTRUDE;
+            extrudeStatus[pointI] = snappyLayerDriver::NOEXTRUDE;
         }
     }
 
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H
similarity index 94%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H
index e958c3e911a475c3eed18ce24da92bf05168750a..808e41d32fce7d7a5bfe2a0dc45ae7f1872ef6be 100644
--- a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H
+++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.H
@@ -46,7 +46,7 @@ SourceFiles
 
 #include "externalDisplacementMeshMover.H"
 #include "motionSmootherAlgo.H"
-#include "autoLayerDriver.H"
+#include "snappyLayerDriver.H"
 #include "fieldSmoother.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -112,7 +112,7 @@ class medialAxisMeshMover
             //- Is mesh edge on a cusp of displacement
             bool isMaxEdge
             (
-                const List<PointData<vector> >& pointWallDist,
+                const List<PointData<vector>>& pointWallDist,
                 const label edgeI,
                 const scalar minCos
             ) const;
@@ -129,7 +129,7 @@ class medialAxisMeshMover
             (
                 const label patchPointI,
                 pointField& patchDisp,
-                List<autoLayerDriver::extrudeMode>& extrudeStatus
+                List<snappyLayerDriver::extrudeMode>& extrudeStatus
             );
 
             //- Synchronise extrusion
@@ -137,7 +137,7 @@ class medialAxisMeshMover
             (
                 const scalarField& minThickness,
                 pointField& patchDisp,
-                List<autoLayerDriver::extrudeMode>& extrudeStatus
+                List<snappyLayerDriver::extrudeMode>& extrudeStatus
             ) const;
 
             //- Stop layer growth at feature edges
@@ -146,7 +146,7 @@ class medialAxisMeshMover
                 const scalar minCos,
                 const PackedBoolList& isMasterPoint,
                 const labelList& meshEdges,
-                List<autoLayerDriver::extrudeMode>& extrudeStatus,
+                List<snappyLayerDriver::extrudeMode>& extrudeStatus,
                 pointField& patchDisp,
                 label& nPointCounter
             ) const;
@@ -162,7 +162,7 @@ class medialAxisMeshMover
                 const PackedBoolList& isMasterEdge,
                 const labelList& meshEdges,
                 const scalarField& minThickness,
-                List<autoLayerDriver::extrudeMode>& extrudeStatus,
+                List<snappyLayerDriver::extrudeMode>& extrudeStatus,
                 pointField& patchDisp
             ) const;
 
@@ -174,7 +174,7 @@ class medialAxisMeshMover
         (
             const dictionary&,
             const scalarField& minThickness,
-            List<autoLayerDriver::extrudeMode>& extrudeStatus,
+            List<snappyLayerDriver::extrudeMode>& extrudeStatus,
             pointField& patchDisp
         );
 
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C
similarity index 93%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C
index 4e3b6745ecf0c5529c770528fa4366af63f37490..c01590718052439e6b8fa042b30eac75cf2561dc 100644
--- a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C
+++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.C
@@ -55,7 +55,7 @@ zeroFixedValuePointPatchField
 :
     fixedValuePointPatchField<Type>(p, iF, dict, false)
 {
-    fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
+    fixedValuePointPatchField<Type>::operator=(Type(Zero));
 }
 
 
@@ -72,7 +72,7 @@ zeroFixedValuePointPatchField
     fixedValuePointPatchField<Type>(ptf, p, iF, mapper)
 {
     // For safety re-evaluate
-    fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
+    fixedValuePointPatchField<Type>::operator=(Type(Zero));
 }
 
 
@@ -98,7 +98,7 @@ zeroFixedValuePointPatchField
     fixedValuePointPatchField<Type>(ptf, iF)
 {
     // For safety re-evaluate
-    fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
+    fixedValuePointPatchField<Type>::operator=(Type(Zero));
 }
 
 
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H
similarity index 95%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H
index f57942147a4e29b390944d99e5564b094f33d1b0..4415c56bea6619f0fc895927811b210839d0e8fa 100644
--- a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H
+++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchField.H
@@ -99,9 +99,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new zeroFixedValuePointPatchField<Type>
                 (
@@ -119,12 +119,12 @@ public:
 
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new zeroFixedValuePointPatchField<Type>
                 (
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.C
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.C
diff --git a/src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.H b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.H
rename to src/mesh/snappyHexMesh/externalDisplacementMeshMover/zeroFixedValue/zeroFixedValuePointPatchFields.H
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C
index b43cfb1c971b95ea7f8a0e40056dd3de0c9f0a64..db59fd4fc39ae7b0b100bb9f290d664b8a7f9b5e 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C
@@ -740,7 +740,7 @@ void Foam::meshRefinement::doSplitFaces
 (
     const labelList& splitFaces,
     const labelPairList& splits,
-    //const List<Pair<point> >& splitPoints,
+    //const List<Pair<point>>& splitPoints,
     polyTopoChange& meshMod
 ) const
 {
@@ -1737,7 +1737,7 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField
                 IOobject::AUTO_WRITE
             ),
             pMesh,
-            dimensionedVector("displacement", dimLength, vector::zero),
+            dimensionedVector("displacement", dimLength, Zero),
             patchFieldTypes
         )
     );
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H
index 9b375b1b89f4364f150f9327b344ab3646f5a65d..f95f5fd6e0135b0d053dfa44091550478778d84a 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H
@@ -197,7 +197,7 @@ private:
 
 
         //- User supplied face based data.
-        List<Tuple2<mapType, labelList> > userFaceData_;
+        List<Tuple2<mapType, labelList>> userFaceData_;
 
         //- Meshed patches - are treated differently. Stored as wordList since
         //  order changes.
@@ -399,7 +399,7 @@ private:
                 const label nRefine,
 
                 labelList& cellMap,
-                List<FixedList<label, 3> >& shellGapInfo,
+                List<FixedList<label, 3>>& shellGapInfo,
                 List<volumeType>& shellGapMode
             ) const;
 
@@ -725,7 +725,7 @@ private:
                 const label ownZone,
                 const label neiZone,
                 wordPairHashTable& zonesToFaceZone,
-                HashTable<word, labelPair, labelPair::Hash<> >&
+                HashTable<word, labelPair, labelPair::Hash<>>&
             ) const;
 
             //- Remove any loose standing cells
@@ -887,12 +887,12 @@ public:
             //  topo changes. Every entry is a list over all faces.
             //  Bit of a hack. Additional flag to say whether to maintain master
             //  only (false) or increase set to account for face-from-face.
-            const List<Tuple2<mapType, labelList> >& userFaceData() const
+            const List<Tuple2<mapType, labelList>>& userFaceData() const
             {
                 return userFaceData_;
             }
 
-            List<Tuple2<mapType, labelList> >& userFaceData()
+            List<Tuple2<mapType, labelList>>& userFaceData()
             {
                 return userFaceData_;
             }
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C
index 44f29e95c9528b768ad6048fc0d39f1add663163..7584b874c3059a7f47b1a3c99a8afb4aac7328ae 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C
@@ -3365,7 +3365,7 @@ void Foam::meshRefinement::allocateInterRegionFaceZone
     const label ownZone,
     const label neiZone,
     wordPairHashTable& zonesToFaceZone,
-    HashTable<word, labelPair, labelPair::Hash<> >& zoneIDsToFaceZone
+    HashTable<word, labelPair, labelPair::Hash<>>& zoneIDsToFaceZone
 ) const
 {
     const cellZoneMesh& cellZones = mesh_.cellZones();
@@ -3387,7 +3387,7 @@ void Foam::meshRefinement::allocateInterRegionFaceZone
             Swap(key.first(), key.second());
         }
 
-        HashTable<word, labelPair, labelPair::Hash<> >::
+        HashTable<word, labelPair, labelPair::Hash<>>::
         const_iterator zoneFnd = zoneIDsToFaceZone.find
         (
             key
@@ -4315,7 +4315,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
     {
         // 1. Detect inter-region face and allocate names
 
-        HashTable<word, labelPair, labelPair::Hash<> > zoneIDsToFaceZone;
+        HashTable<word, labelPair, labelPair::Hash<>> zoneIDsToFaceZone;
 
         for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
         {
@@ -4368,7 +4368,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
             << endl;
 
         // From cellZone indices to faceZone index
-        HashTable<label, labelPair, labelPair::Hash<> > fZoneLookup
+        HashTable<label, labelPair, labelPair::Hash<>> fZoneLookup
         (
             zonesToFaceZone.size()
         );
@@ -4376,7 +4376,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
         const cellZoneMesh& cellZones = mesh_.cellZones();
 
         {
-            List<Pair<word> > czs(zonesToFaceZone.sortedToc());
+            List<Pair<word>> czs(zonesToFaceZone.sortedToc());
 
             forAll(czs, i)
             {
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C
index ce2a4646d4661b7c0630e5cf0427d4e04c4807a8..d7b175703b225756de5a4496a00a2fcc4595c128 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C
@@ -91,7 +91,7 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
         // Collect cells to test for inside/outside in shell
         labelList cellToCompact(mesh_.nCells(), -1);
         labelList bFaceToCompact(mesh_.nFaces()-mesh_.nInternalFaces(), -1);
-        List<FixedList<label, 3> > shellGapInfo;
+        List<FixedList<label, 3>> shellGapInfo;
         List<volumeType> shellGapMode;
         {
             DynamicField<point> compactToCc(mesh_.nCells()/10);
@@ -138,7 +138,7 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
         }
 
 
-        const List<FixedList<label, 3> >& extendedGapLevel =
+        const List<FixedList<label, 3>>& extendedGapLevel =
             surfaces_.extendedGapLevel();
         const List<volumeType>& extendedGapMode =
             surfaces_.extendedGapMode();
@@ -514,7 +514,7 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
 //    const scalar edge0Len = meshCutter_.level0EdgeLength();
 //
 //    const labelList& surfaceIndices = surfaces_.surfaces();
-//    const List<FixedList<label, 3> >& extendedGapLevel =
+//    const List<FixedList<label, 3>>& extendedGapLevel =
 //        surfaces_.extendedGapLevel();
 //    const List<volumeType>& extendedGapMode = surfaces_.extendedGapMode();
 //
@@ -997,7 +997,7 @@ void Foam::meshRefinement::selectGapCandidates
     const label nRefine,
 
     labelList& cellMap,
-    List<FixedList<label, 3> >& shellGapInfo,
+    List<FixedList<label, 3>>& shellGapInfo,
     List<volumeType>& shellGapMode
 ) const
 {
@@ -1048,7 +1048,7 @@ void Foam::meshRefinement::selectGapCandidates
 
     map.setSize(compactI);
     cellMap = UIndirectList<label>(cellMap, map)();
-    shellGapInfo = UIndirectList<FixedList<label, 3> >(shellGapInfo, map)();
+    shellGapInfo = UIndirectList<FixedList<label, 3>>(shellGapInfo, map)();
     shellGapMode = UIndirectList<volumeType>(shellGapMode, map)();
 }
 
@@ -1108,7 +1108,7 @@ Foam::label Foam::meshRefinement::markInternalGapRefinement
     const pointField& cellCentres = mesh_.cellCentres();
     const scalar edge0Len = meshCutter_.level0EdgeLength();
 
-    const List<FixedList<label, 3> >& extendedGapLevel =
+    const List<FixedList<label, 3>>& extendedGapLevel =
         surfaces_.extendedGapLevel();
     const List<volumeType>& extendedGapMode = surfaces_.extendedGapMode();
 
@@ -1121,7 +1121,7 @@ Foam::label Foam::meshRefinement::markInternalGapRefinement
     {
         // Collect cells to test
         labelList cellMap;
-        List<FixedList<label, 3> > shellGapInfo;
+        List<FixedList<label, 3>> shellGapInfo;
         List<volumeType> shellGapMode;
         selectGapCandidates
         (
@@ -1473,7 +1473,7 @@ Foam::label Foam::meshRefinement::markSmallFeatureRefinement
 {
     const labelList& cellLevel = meshCutter_.cellLevel();
     const labelList& surfaceIndices = surfaces_.surfaces();
-    const List<FixedList<label, 3> >& extendedGapLevel =
+    const List<FixedList<label, 3>>& extendedGapLevel =
         surfaces_.extendedGapLevel();
     const List<volumeType>& extendedGapMode = surfaces_.extendedGapMode();
 
@@ -1530,7 +1530,7 @@ Foam::label Foam::meshRefinement::markSmallFeatureRefinement
 
         // Do test to see whether triangles are inside/outside shell with
         // applicable specification (minLevel <= celllevel < maxLevel)
-        List<FixedList<label, 3> > shellGapInfo;
+        List<FixedList<label, 3>> shellGapInfo;
         List<volumeType> shellGapMode;
         shells_.findHigherGapLevel
         (
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementMerge.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementMerge.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C
index ca785a3e5bbcf60f4a020d19089a62c35fdd909c..894df1901f5d62aaa8eac7d49cc6d52374cfbaa1 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C
@@ -36,7 +36,7 @@ License
 #include "polyMeshGeometry.H"
 #include "IOmanip.H"
 #include "unitConversion.H"
-#include "autoSnapDriver.H"
+#include "snappySnapDriver.H"
 
 #include "snapParameters.H"
 #include "motionSmoother.H"
@@ -1092,7 +1092,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
 {
     pointField oldPoints(mesh_.points());
 
-    // Repeat (most of) autoSnapDriver::doSnap
+    // Repeat (most of) snappySnapDriver::doSnap
     {
         labelList adaptPatchIDs(meshedPatches());
 
@@ -1110,7 +1110,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
         // Distance to attract to nearest feature on surface
         const scalarField snapDist
         (
-            autoSnapDriver::calcSnapDistance(mesh_, snapParams, pp)
+            snappySnapDriver::calcSnapDistance(mesh_, snapParams, pp)
         );
 
 
@@ -1149,7 +1149,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
             << mesh_.time().cpuTimeIncrement() << " s\n" << nl << endl;
 
         // Pre-smooth patch vertices (so before determining nearest)
-        autoSnapDriver::preSmoothPatch
+        snappySnapDriver::preSmoothPatch
         (
             *this,
             snapParams,
@@ -1162,7 +1162,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
         vectorField nearestNormal;
         const vectorField disp
         (
-            autoSnapDriver::calcNearestSurface
+            snappySnapDriver::calcNearestSurface
             (
                 snapParams.strictRegionSnap(),
                 *this,
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
index 4ffa1248f8e509d01551962475f990dcf8222479..c9dba90ec094ae0bbdd49209a30caceff50065b2 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
@@ -1558,7 +1558,7 @@ bool Foam::meshRefinement::isGap
     {
         scalar cosAngle = (normal0 & normal1);
 
-        vector avg = vector::zero;
+        vector avg = Zero;
         if (cosAngle < (-1+planarCos))
         {
             // Opposite normals
@@ -1615,7 +1615,7 @@ bool Foam::meshRefinement::isNormalGap
     {
         scalar cosAngle = (normal0 & normal1);
 
-        vector avg = vector::zero;
+        vector avg = Zero;
         if (cosAngle < (-1+planarCos))
         {
             // Opposite normals
@@ -1782,8 +1782,8 @@ Foam::label Foam::meshRefinement::markProximityRefinement
     // minLevel) and cache per cell the max surface level and the local normal
     // on that surface.
     labelList cellMaxLevel(mesh_.nCells(), -1);
-    vectorField cellMaxNormal(mesh_.nCells(), vector::zero);
-    pointField cellMaxLocation(mesh_.nCells(), vector::zero);
+    vectorField cellMaxNormal(mesh_.nCells(), Zero);
+    pointField cellMaxLocation(mesh_.nCells(), Zero);
 
     {
         // Per segment the normals of the surfaces
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementTemplates.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementTemplates.C
rename to src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
index 1bdb191299ccee4e32917b25039c7615ce39f3ca..a6f0414d1f9fb732cb22a0376b3ec1ccc494ab80 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementTemplates.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
@@ -70,7 +70,7 @@ T Foam::meshRefinement::gAverage
             << exit(FatalError);
     }
 
-    T sum = pTraits<T>::zero;
+    T sum = T(Zero);
     label n = 0;
 
     forAll(values, i)
@@ -305,7 +305,7 @@ void Foam::meshRefinement::weightedSum
     }
 
     sum.setSize(meshPoints.size());
-    sum = pTraits<Type>::zero;
+    sum = Type(Zero);
 
     forAll(edges, edgeI)
     {
@@ -329,7 +329,7 @@ void Foam::meshRefinement::weightedSum
         meshPoints,
         sum,
         plusEqOp<Type>(),
-        pTraits<Type>::zero     // null value
+        Type(Zero)          // null value
     );
 }
 
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/patchFaceOrientation.C b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/patchFaceOrientation.C
rename to src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.C
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/patchFaceOrientation.H b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/patchFaceOrientation.H
rename to src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/patchFaceOrientationI.H b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientationI.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/patchFaceOrientationI.H
rename to src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientationI.H
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H b/src/mesh/snappyHexMesh/meshRefinement/transportData.H
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H
rename to src/mesh/snappyHexMesh/meshRefinement/transportData.H
index eec088e6d26c6e306de50c00d72c0b2211267973..c206a08350483570ee707aa22e3fef0a08b1f8c5 100644
--- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H
+++ b/src/mesh/snappyHexMesh/meshRefinement/transportData.H
@@ -152,7 +152,7 @@ public:
 template<>
 inline bool contiguous<transportData>()
 {
-    return contiguous<wallPointData<scalar> >();
+    return contiguous<wallPointData<scalar>>();
 }
 
 
diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportDataI.H b/src/mesh/snappyHexMesh/meshRefinement/transportDataI.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/meshRefinement/transportDataI.H
rename to src/mesh/snappyHexMesh/meshRefinement/transportDataI.H
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C
rename to src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C
index 47420129c718f830004656b446a59c5d6b9cd2db..514b1e3b06e9ad921e7a1c4265c0702952026255 100644
--- a/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.C
+++ b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C
@@ -186,7 +186,7 @@ void Foam::refinementFeatures::read
 
         if (dict.found("levels"))
         {
-            List<Tuple2<scalar, label> > distLevels(dict["levels"]);
+            List<Tuple2<scalar, label>> distLevels(dict["levels"]);
 
             if (dict.size() < 1)
             {
@@ -299,16 +299,16 @@ void Foam::refinementFeatures::buildTrees(const label featI)
 }
 
 
-const Foam::PtrList<Foam::indexedOctree<Foam::treeDataEdge> >&
+const Foam::PtrList<Foam::indexedOctree<Foam::treeDataEdge>>&
 Foam::refinementFeatures::regionEdgeTrees() const
 {
     if (!regionEdgeTreesPtr_.valid())
     {
         regionEdgeTreesPtr_.reset
         (
-            new PtrList<indexedOctree<treeDataEdge> >(size())
+            new PtrList<indexedOctree<treeDataEdge>>(size())
         );
-        PtrList<indexedOctree<treeDataEdge> >& trees = regionEdgeTreesPtr_();
+        PtrList<indexedOctree<treeDataEdge>>& trees = regionEdgeTreesPtr_();
 
         forAll(*this, featI)
         {
@@ -536,7 +536,7 @@ void Foam::refinementFeatures::findNearestEdge
     nearInfo.setSize(samples.size());
     nearInfo = pointIndexHit();
     nearNormal.setSize(samples.size());
-    nearNormal = vector::zero;
+    nearNormal = Zero;
 
     forAll(edgeTrees_, featI)
     {
@@ -595,10 +595,10 @@ void Foam::refinementFeatures::findNearestRegionEdge
     nearInfo.setSize(samples.size());
     nearInfo = pointIndexHit();
     nearNormal.setSize(samples.size());
-    nearNormal = vector::zero;
+    nearNormal = Zero;
 
 
-    const PtrList<indexedOctree<treeDataEdge> >& regionTrees =
+    const PtrList<indexedOctree<treeDataEdge>>& regionTrees =
         regionEdgeTrees();
 
     forAll(regionTrees, featI)
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.H b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.H
similarity index 93%
rename from src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.H
rename to src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.H
index 5c923508b8b0cecb62a27aad53d6b420dcc27958..062e8ddbf99e28314180961f3f7e3ad45a502eb6 100644
--- a/src/mesh/autoMesh/autoHexMesh/refinementFeatures/refinementFeatures.H
+++ b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.H
@@ -64,13 +64,13 @@ private:
         labelListList levels_;
 
         //- Edge
-        PtrList<indexedOctree<treeDataEdge> > edgeTrees_;
+        PtrList<indexedOctree<treeDataEdge>> edgeTrees_;
 
         //- Features points
-        PtrList<indexedOctree<treeDataPoint> > pointTrees_;
+        PtrList<indexedOctree<treeDataPoint>> pointTrees_;
 
         //- Region edge trees (demand driven)
-        mutable autoPtr<PtrList<indexedOctree<treeDataEdge> > >
+        mutable autoPtr<PtrList<indexedOctree<treeDataEdge>>>
             regionEdgeTreesPtr_;
 
 
@@ -93,18 +93,18 @@ private:
 
 protected:
 
-        const PtrList<indexedOctree<treeDataEdge> >& edgeTrees() const
+        const PtrList<indexedOctree<treeDataEdge>>& edgeTrees() const
         {
             return edgeTrees_;
         }
 
-        const PtrList<indexedOctree<treeDataPoint> >& pointTrees() const
+        const PtrList<indexedOctree<treeDataPoint>>& pointTrees() const
         {
             return pointTrees_;
         }
 
 
-        const PtrList<indexedOctree<treeDataEdge> >& regionEdgeTrees() const;
+        const PtrList<indexedOctree<treeDataEdge>>& regionEdgeTrees() const;
 
 public:
 
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C
rename to src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C
index 60975cf17755eb5bcad8bda132d88361756abf83..b3f56f621a735483bbb0bf03e83b1135ac9ac72d 100644
--- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C
+++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C
@@ -163,18 +163,18 @@ Foam::refinementSurfaces::refinementSurfaces
     nullGapLevel[1] = 0;
     nullGapLevel[2] = 0;
 
-    List<FixedList<label, 3> > globalGapLevel(surfI);
+    List<FixedList<label, 3>> globalGapLevel(surfI);
     List<volumeType> globalGapMode(surfI);
 
     scalarField globalAngle(surfI, -GREAT);
     PtrList<dictionary> globalPatchInfo(surfI);
-    List<Map<label> > regionMinLevel(surfI);
-    List<Map<label> > regionMaxLevel(surfI);
-    List<Map<label> > regionLevelIncr(surfI);
-    List<Map<FixedList<label, 3> > > regionGapLevel(surfI);
-    List<Map<volumeType> > regionGapMode(surfI);
-    List<Map<scalar> > regionAngle(surfI);
-    List<Map<autoPtr<dictionary> > > regionPatchInfo(surfI);
+    List<Map<label>> regionMinLevel(surfI);
+    List<Map<label>> regionMaxLevel(surfI);
+    List<Map<label>> regionLevelIncr(surfI);
+    List<Map<FixedList<label, 3>>> regionGapLevel(surfI);
+    List<Map<volumeType>> regionGapMode(surfI);
+    List<Map<scalar>> regionAngle(surfI);
+    List<Map<autoPtr<dictionary>>> regionPatchInfo(surfI);
 
 
     HashSet<word> unmatchedKeys(surfacesDict.toc());
@@ -467,8 +467,8 @@ Foam::refinementSurfaces::refinementSurfaces
             perpendicularAngle_[globalRegionI] = regionAngle[surfI][iter.key()];
         }
 
-        const Map<autoPtr<dictionary> >& localInfo = regionPatchInfo[surfI];
-        forAllConstIter(Map<autoPtr<dictionary> >, localInfo, iter)
+        const Map<autoPtr<dictionary>>& localInfo = regionPatchInfo[surfI];
+        forAllConstIter(Map<autoPtr<dictionary>>, localInfo, iter)
         {
             label globalRegionI = regionOffset_[surfI] + iter.key();
 
@@ -902,7 +902,7 @@ void Foam::refinementSurfaces::findAllHigherIntersections
     }
 
     // Work arrays
-    List<List<pointIndexHit> > hitInfo;
+    List<List<pointIndexHit>> hitInfo;
     labelList pRegions;
     vectorField pNormals;
 
@@ -992,7 +992,7 @@ void Foam::refinementSurfaces::findAllHigherIntersections
     }
 
     // Work arrays
-    List<List<pointIndexHit> > hitInfo;
+    List<List<pointIndexHit>> hitInfo;
     labelList pRegions;
     vectorField pNormals;
 
@@ -1216,7 +1216,7 @@ void Foam::refinementSurfaces::findNearestIntersection
     region1.setSize(start.size());
     region1 = -1;
     normal1.setSize(start.size());
-    normal1 = vector::zero;
+    normal1 = Zero;
 
     // Current end of segment to test.
     pointField nearest(end);
@@ -1325,7 +1325,7 @@ void Foam::refinementSurfaces::findNearestIntersection
     surface1.setSize(start.size());
     surface1 = -1;
     normal1.setSize(start.size());
-    normal1 = vector::zero;
+    normal1 = Zero;
 
     // Current end of segment to test.
     pointField nearest(end);
@@ -1374,7 +1374,7 @@ void Foam::refinementSurfaces::findNearestIntersection
     hitInfo1.setSize(start.size());
     hitInfo1 = pointIndexHit();
     normal1.setSize(start.size());
-    normal1 = vector::zero;
+    normal1 = Zero;
 
     // Current end of segment to test.
     pointField nearest(end);
@@ -1559,7 +1559,7 @@ void Foam::refinementSurfaces::findNearestRegion
     hitRegion.setSize(hitSurface.size());
     hitRegion = -1;
     hitNormal.setSize(hitSurface.size());
-    hitNormal = vector::zero;
+    hitNormal = Zero;
 
     forAll(surfacesToTest, i)
     {
@@ -1784,7 +1784,7 @@ void Foam::refinementSurfaces::findNearestRegion
     hitRegion.setSize(hitSurface.size());
     hitRegion = -1;
     hitNormal.setSize(hitSurface.size());
-    hitNormal = vector::zero;
+    hitNormal = Zero;
 
     forAll(surfacesToTest, i)
     {
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.H
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H
rename to src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.H
index 7e2bcdf946e70966b2be58b47079275078f6d847..4a985dc9513d6e4710e40d175098f08db7d535a1 100644
--- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H
+++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.H
@@ -87,7 +87,7 @@ class refinementSurfaces
         labelList gapLevel_;
 
         //- From global region number to small-gap level specification
-        List<FixedList<label, 3> > extendedGapLevel_;
+        List<FixedList<label, 3>> extendedGapLevel_;
 
         //- From global region number to side of surface to detect
         List<volumeType> extendedGapMode_;
@@ -201,7 +201,7 @@ public:
             //  - minimum cell level when to start trying to detect gaps
             //  - maximum cell level to refine to (so do not detect gaps if
             //    cell >= maximum level)
-            const List<FixedList<label, 3> >& extendedGapLevel() const
+            const List<FixedList<label, 3>>& extendedGapLevel() const
             {
                 return extendedGapLevel_;
             }
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/surfaceZonesInfo.C b/src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/refinementSurfaces/surfaceZonesInfo.C
rename to src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.C
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/surfaceZonesInfo.H b/src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/refinementSurfaces/surfaceZonesInfo.H
rename to src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.H
diff --git a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C
rename to src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C
index 05ca28a1bf28c4d50181e63f500e3e130d5b3b41..0c2d1f3698db4b2621b0696c3c6a1e01e6da5fe4 100644
--- a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C
+++ b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C
@@ -60,7 +60,7 @@ const NamedEnum<shellSurfaces::refineMode, 3> shellSurfaces::refineModeNames_;
 void Foam::shellSurfaces::setAndCheckLevels
 (
     const label shellI,
-    const List<Tuple2<scalar, label> >& distLevels
+    const List<Tuple2<scalar, label>>& distLevels
 )
 {
     if (modes_[shellI] != DISTANCE && distLevels.size() != 1)
@@ -146,7 +146,7 @@ void Foam::shellSurfaces::checkGapLevels
 (
     const dictionary& shellDict,
     const label shellI,
-    const List<FixedList<label, 3> >& levels
+    const List<FixedList<label, 3>>& levels
 )
 {
     const searchableSurface& shell = allGeometry_[shells_[shellI]];
@@ -389,7 +389,7 @@ void Foam::shellSurfaces::findHigherGapLevel
     const labelList& ptLevel,
     const label shellI,
     labelList& gapShell,
-    List<FixedList<label, 3> >& gapInfo,
+    List<FixedList<label, 3>>& gapInfo,
     List<volumeType>& gapMode
 ) const
 {
@@ -755,7 +755,7 @@ Foam::labelList Foam::shellSurfaces::maxGapLevel() const
 
     forAll(extendedGapLevel_, shellI)
     {
-        const List<FixedList<label, 3> >& levels = extendedGapLevel_[shellI];
+        const List<FixedList<label, 3>>& levels = extendedGapLevel_[shellI];
         forAll(levels, i)
         {
             surfaceMax[shellI] = max(surfaceMax[shellI], levels[i][2]);
@@ -787,7 +787,7 @@ void Foam::shellSurfaces::findHigherGapLevel
     const pointField& pt,
     const labelList& ptLevel,
     labelList& gapShell,
-    List<FixedList<label, 3> >& gapInfo,
+    List<FixedList<label, 3>>& gapInfo,
     List<volumeType>& gapMode
 ) const
 {
@@ -816,7 +816,7 @@ void Foam::shellSurfaces::findHigherGapLevel
 (
     const pointField& pt,
     const labelList& ptLevel,
-    List<FixedList<label, 3> >& gapInfo,
+    List<FixedList<label, 3>>& gapInfo,
     List<volumeType>& gapMode
 ) const
 {
diff --git a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.H
similarity index 94%
rename from src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
rename to src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.H
index 13817de16f0b10d124f0ee90d54d904d0d5c33ba..2b3c5b3df6aef1d6e3b9e685e044002ca785a07b 100644
--- a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H
+++ b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.H
@@ -88,10 +88,10 @@ private:
         // Gap level refinement
 
             //- Per shell, per region the small-gap level specification
-            List<List<FixedList<label, 3> > > extendedGapLevel_;
+            List<List<FixedList<label, 3>>> extendedGapLevel_;
 
             //- Per shell, per region the small-gap level specification
-            List<List<volumeType> > extendedGapMode_;
+            List<List<volumeType>> extendedGapMode_;
 
 
     // Private data
@@ -106,7 +106,7 @@ private:
         void setAndCheckLevels
         (
             const label shellI,
-            const List<Tuple2<scalar, label> >&
+            const List<Tuple2<scalar, label>>&
         );
 
         //- Helper function for checking of gap information
@@ -114,7 +114,7 @@ private:
         (
             const dictionary&,
             const label shellI,
-            const List<FixedList<label, 3> >& levels
+            const List<FixedList<label, 3>>& levels
         );
 
         void orient();
@@ -134,7 +134,7 @@ private:
             const labelList& ptLevel,
             const label shellI,
             labelList& gapShell,
-            List<FixedList<label, 3> >& gapInfo,
+            List<FixedList<label, 3>>& gapInfo,
             List<volumeType>& gapMode
         ) const;
 
@@ -193,7 +193,7 @@ public:
                 const pointField& pt,
                 const labelList& ptLevel,
                 labelList& gapShell,
-                List<FixedList<label, 3> >& gapInfo,
+                List<FixedList<label, 3>>& gapInfo,
                 List<volumeType>& gapMode
             ) const;
 
@@ -203,7 +203,7 @@ public:
             (
                 const pointField& pt,
                 const labelList& ptLevel,
-                List<FixedList<label, 3> >& gapInfo,
+                List<FixedList<label, 3>>& gapInfo,
                 List<volumeType>& gapMode
             ) const;
 
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/layerParameters/layerParameters.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.H
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/pointData/pointData.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/pointData/pointData.C
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/pointData/pointData.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointData.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/pointData/pointData.H
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/pointData/pointDataI.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/pointData/pointDataI.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/pointData/pointDataI.H
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C
index b1aea4e0d147b6ba37e130f4801ef12821946ce7..2fb5844684f96d568dda20ba8ab8456c74ee7cfa 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C
@@ -84,7 +84,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
         }
     }
 
-    List<Tuple2<point, word> > pointsToZone;
+    List<Tuple2<point, word>> pointsToZone;
     if (dict.readIfPresent("locationsInMesh", pointsToZone))
     {
         label nZones = locationsInMesh_.size();
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.H
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/wordPairHashTable.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/wordPairHashTable.H
similarity index 99%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/wordPairHashTable.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/wordPairHashTable.H
index 3c329c6678659397a3325dbf060304a7d041e294..7556c04bc723d9f716a2fc36a269732682599c75 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/wordPairHashTable.H
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/wordPairHashTable.H
@@ -45,7 +45,7 @@ Description
 
 namespace Foam
 {
-    typedef HashTable<word, Pair<word>, FixedList<word, 2>::Hash<> >
+    typedef HashTable<word, Pair<word>, FixedList<word, 2>::Hash<>>
         wordPairHashTable;
 }
 
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/snapParameters/snapParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/snapParameters/snapParameters.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.C
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/snapParameters/snapParameters.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.H
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/snapParameters/snapParameters.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.H
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
index 58c170ab7b85a7fea0bae242d47d7beecc665fbe..cfbb7c3de8dc4dfe06af4657bb3ccff7981610b8 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
@@ -26,7 +26,7 @@ Description
 
 \*----------------------------------------------------------------------------*/
 
-#include "autoLayerDriver.H"
+#include "snappyLayerDriver.H"
 #include "fvMesh.H"
 #include "Time.H"
 #include "meshRefinement.H"
@@ -63,7 +63,7 @@ Description
 namespace Foam
 {
 
-defineTypeNameAndDebug(autoLayerDriver, 0);
+defineTypeNameAndDebug(snappyLayerDriver, 0);
 
 } // End namespace Foam
 
@@ -71,7 +71,7 @@ defineTypeNameAndDebug(autoLayerDriver, 0);
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 // For debugging: Dump displacement to .obj files
-void Foam::autoLayerDriver::dumpDisplacement
+void Foam::snappyLayerDriver::dumpDisplacement
 (
     const fileName& prefix,
     const indirectPrimitivePatch& pp,
@@ -103,14 +103,14 @@ void Foam::autoLayerDriver::dumpDisplacement
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::autoLayerDriver::avgPointData
+Foam::tmp<Foam::scalarField> Foam::snappyLayerDriver::avgPointData
 (
     const indirectPrimitivePatch& pp,
     const scalarField& pointFld
 )
 {
     tmp<scalarField> tfaceFld(new scalarField(pp.size(), 0.0));
-    scalarField& faceFld = tfaceFld();
+    scalarField& faceFld = tfaceFld.ref();
 
     forAll(pp.localFaces(), faceI)
     {
@@ -130,7 +130,7 @@ Foam::tmp<Foam::scalarField> Foam::autoLayerDriver::avgPointData
 
 // Check that primitivePatch is not multiply connected. Collect non-manifold
 // points in pointSet.
-void Foam::autoLayerDriver::checkManifold
+void Foam::snappyLayerDriver::checkManifold
 (
     const indirectPrimitivePatch& fp,
     pointSet& nonManifoldPoints
@@ -157,7 +157,7 @@ void Foam::autoLayerDriver::checkManifold
 }
 
 
-void Foam::autoLayerDriver::checkMeshManifold() const
+void Foam::snappyLayerDriver::checkMeshManifold() const
 {
     const fvMesh& mesh = meshRefiner_.mesh();
 
@@ -211,7 +211,7 @@ void Foam::autoLayerDriver::checkMeshManifold() const
 
 
 // Unset extrusion on point. Returns true if anything unset.
-bool Foam::autoLayerDriver::unmarkExtrusion
+bool Foam::snappyLayerDriver::unmarkExtrusion
 (
     const label patchPointI,
     pointField& patchDisp,
@@ -223,14 +223,14 @@ bool Foam::autoLayerDriver::unmarkExtrusion
     {
         extrudeStatus[patchPointI] = NOEXTRUDE;
         patchNLayers[patchPointI] = 0;
-        patchDisp[patchPointI] = vector::zero;
+        patchDisp[patchPointI] = Zero;
         return true;
     }
     else if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
     {
         extrudeStatus[patchPointI] = NOEXTRUDE;
         patchNLayers[patchPointI] = 0;
-        patchDisp[patchPointI] = vector::zero;
+        patchDisp[patchPointI] = Zero;
         return true;
     }
     else
@@ -241,7 +241,7 @@ bool Foam::autoLayerDriver::unmarkExtrusion
 
 
 // Unset extrusion on face. Returns true if anything unset.
-bool Foam::autoLayerDriver::unmarkExtrusion
+bool Foam::snappyLayerDriver::unmarkExtrusion
 (
     const face& localFace,
     pointField& patchDisp,
@@ -272,7 +272,7 @@ bool Foam::autoLayerDriver::unmarkExtrusion
 
 
 // No extrusion at non-manifold points.
-void Foam::autoLayerDriver::handleNonManifolds
+void Foam::snappyLayerDriver::handleNonManifolds
 (
     const indirectPrimitivePatch& pp,
     const labelList& meshEdges,
@@ -383,7 +383,7 @@ void Foam::autoLayerDriver::handleNonManifolds
 
 
 // Parallel feature edge detection. Assumes non-manifold edges already handled.
-void Foam::autoLayerDriver::handleFeatureAngle
+void Foam::snappyLayerDriver::handleFeatureAngle
 (
     const indirectPrimitivePatch& pp,
     const labelList& meshEdges,
@@ -502,7 +502,7 @@ void Foam::autoLayerDriver::handleFeatureAngle
 // layer and compares it to the space the warped face takes up. Disables
 // extrusion if layer thickness is more than faceRatio of the thickness of
 // the face.
-void Foam::autoLayerDriver::handleWarpedFaces
+void Foam::snappyLayerDriver::handleWarpedFaces
 (
     const indirectPrimitivePatch& pp,
     const scalar faceRatio,
@@ -576,7 +576,7 @@ void Foam::autoLayerDriver::handleWarpedFaces
 
 //// No extrusion on cells with multiple patch faces. There ususally is a reason
 //// why combinePatchFaces hasn't succeeded.
-//void Foam::autoLayerDriver::handleMultiplePatchFaces
+//void Foam::snappyLayerDriver::handleMultiplePatchFaces
 //(
 //    const indirectPrimitivePatch& pp,
 //    pointField& patchDisp,
@@ -677,7 +677,7 @@ void Foam::autoLayerDriver::handleWarpedFaces
 //}
 
 
-void Foam::autoLayerDriver::setNumLayers
+void Foam::snappyLayerDriver::setNumLayers
 (
     const labelList& patchToNLayers,
     const labelList& patchIDs,
@@ -801,7 +801,7 @@ void Foam::autoLayerDriver::setNumLayers
 // Construct pointVectorField with correct boundary conditions for adding
 // layers
 Foam::tmp<Foam::pointVectorField>
-Foam::autoLayerDriver::makeLayerDisplacementField
+Foam::snappyLayerDriver::makeLayerDisplacementField
 (
     const pointMesh& pMesh,
     const labelList& numLayers
@@ -866,7 +866,7 @@ Foam::autoLayerDriver::makeLayerDisplacementField
                 IOobject::AUTO_WRITE
             ),
             pMesh,
-            dimensionedVector("displacement", dimLength, vector::zero),
+            dimensionedVector("displacement", dimLength, Zero),
             patchFieldTypes,
             actualPatchTypes
         )
@@ -875,7 +875,7 @@ Foam::autoLayerDriver::makeLayerDisplacementField
 }
 
 
-void Foam::autoLayerDriver::growNoExtrusion
+void Foam::snappyLayerDriver::growNoExtrusion
 (
     const indirectPrimitivePatch& pp,
     pointField& patchDisp,
@@ -953,7 +953,7 @@ void Foam::autoLayerDriver::growNoExtrusion
     {
         if (extrudeStatus[patchPointI] == NOEXTRUDE)
         {
-            patchDisp[patchPointI] = vector::zero;
+            patchDisp[patchPointI] = Zero;
             patchNLayers[patchPointI] = 0;
         }
     }
@@ -965,7 +965,7 @@ void Foam::autoLayerDriver::growNoExtrusion
 }
 
 
-void Foam::autoLayerDriver::determineSidePatches
+void Foam::snappyLayerDriver::determineSidePatches
 (
     const globalIndex& globalFaces,
     const labelListList& edgeGlobalFaces,
@@ -1069,7 +1069,7 @@ void Foam::autoLayerDriver::determineSidePatches
 }
 
 
-void Foam::autoLayerDriver::calculateLayerThickness
+void Foam::snappyLayerDriver::calculateLayerThickness
 (
     const indirectPrimitivePatch& pp,
     const labelList& patchIDs,
@@ -1357,7 +1357,7 @@ void Foam::autoLayerDriver::calculateLayerThickness
 
 
 // Synchronize displacement among coupled patches.
-void Foam::autoLayerDriver::syncPatchDisplacement
+void Foam::snappyLayerDriver::syncPatchDisplacement
 (
     const indirectPrimitivePatch& pp,
     const scalarField& minThickness,
@@ -1488,7 +1488,7 @@ void Foam::autoLayerDriver::syncPatchDisplacement
 // of the faces using it.
 // extrudeStatus is both input and output and gives the status of each
 // patch point.
-void Foam::autoLayerDriver::getPatchDisplacement
+void Foam::snappyLayerDriver::getPatchDisplacement
 (
     const indirectPrimitivePatch& pp,
     const scalarField& thickness,
@@ -1532,7 +1532,7 @@ void Foam::autoLayerDriver::getPatchDisplacement
         {
             // Do not use unmarkExtrusion; forcibly set to zero extrusion.
             patchNLayers[patchPointI] = 0;
-            patchDisp[patchPointI] = vector::zero;
+            patchDisp[patchPointI] = Zero;
         }
         else
         {
@@ -1561,7 +1561,7 @@ void Foam::autoLayerDriver::getPatchDisplacement
     {
         if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
         {
-            point avg(vector::zero);
+            point avg(Zero);
             label nPoints = 0;
 
             const labelList& pEdges = pp.pointEdges()[patchPointI];
@@ -1624,7 +1624,7 @@ void Foam::autoLayerDriver::getPatchDisplacement
 }
 
 
-bool Foam::autoLayerDriver::sameEdgeNeighbour
+bool Foam::snappyLayerDriver::sameEdgeNeighbour
 (
     const labelListList& globalEdgeFaces,
     const label myGlobalFaceI,
@@ -1644,7 +1644,7 @@ bool Foam::autoLayerDriver::sameEdgeNeighbour
 }
 
 
-void Foam::autoLayerDriver::getVertexString
+void Foam::snappyLayerDriver::getVertexString
 (
     const indirectPrimitivePatch& pp,
     const labelListList& globalEdgeFaces,
@@ -1723,7 +1723,7 @@ void Foam::autoLayerDriver::getVertexString
 // Truncates displacement
 // - for all patchFaces in the faceset displacement gets set to zero
 // - all displacement < minThickness gets set to zero
-Foam::label Foam::autoLayerDriver::truncateDisplacement
+Foam::label Foam::snappyLayerDriver::truncateDisplacement
 (
     const globalIndex& globalFaces,
     const labelListList& edgeGlobalFaces,
@@ -1798,7 +1798,7 @@ Foam::label Foam::autoLayerDriver::truncateDisplacement
         else if (extrudeStatus[patchPointI] == NOEXTRUDE)
         {
             // Make sure displacement is 0. Should already be so but ...
-            patchDisp[patchPointI] = vector::zero;
+            patchDisp[patchPointI] = Zero;
             patchNLayers[patchPointI] = 0;
         }
     }
@@ -2038,7 +2038,7 @@ Foam::label Foam::autoLayerDriver::truncateDisplacement
 
 // Setup layer information (at points and faces) to modify mesh topology in
 // regions where layer mesh terminates.
-void Foam::autoLayerDriver::setupLayerInfoTruncation
+void Foam::snappyLayerDriver::setupLayerInfoTruncation
 (
     const indirectPrimitivePatch& pp,
     const labelList& patchNLayers,
@@ -2242,7 +2242,7 @@ void Foam::autoLayerDriver::setupLayerInfoTruncation
 
 
 // Does any of the cells use a face from faces?
-bool Foam::autoLayerDriver::cellsUseFace
+bool Foam::snappyLayerDriver::cellsUseFace
 (
     const polyMesh& mesh,
     const labelList& cellLabels,
@@ -2268,7 +2268,7 @@ bool Foam::autoLayerDriver::cellsUseFace
 // Checks the newly added cells and locally unmarks points so they
 // will not get extruded next time round. Returns global number of unmarked
 // points (0 if all was fine)
-Foam::label Foam::autoLayerDriver::checkAndUnmark
+Foam::label Foam::snappyLayerDriver::checkAndUnmark
 (
     const addPatchCellLayer& addLayer,
     const dictionary& meshQualityDict,
@@ -2403,7 +2403,7 @@ Foam::label Foam::autoLayerDriver::checkAndUnmark
 
 
 //- Count global number of extruded faces
-Foam::label Foam::autoLayerDriver::countExtrusion
+Foam::label Foam::snappyLayerDriver::countExtrusion
 (
     const indirectPrimitivePatch& pp,
     const List<extrudeMode>& extrudeStatus
@@ -2433,7 +2433,7 @@ Foam::label Foam::autoLayerDriver::countExtrusion
 }
 
 
-Foam::List<Foam::labelPair> Foam::autoLayerDriver::getBafflesOnAddedMesh
+Foam::List<Foam::labelPair> Foam::snappyLayerDriver::getBafflesOnAddedMesh
 (
     const polyMesh& mesh,
     const labelList& newToOldFaces,
@@ -2495,7 +2495,7 @@ Foam::List<Foam::labelPair> Foam::autoLayerDriver::getBafflesOnAddedMesh
 
 
 // Collect layer faces and layer cells into mesh fields for ease of handling
-void Foam::autoLayerDriver::getLayerCellsFaces
+void Foam::snappyLayerDriver::getLayerCellsFaces
 (
     const polyMesh& mesh,
     const addPatchCellLayer& addLayer,
@@ -2550,7 +2550,7 @@ void Foam::autoLayerDriver::getLayerCellsFaces
 }
 
 
-void Foam::autoLayerDriver::printLayerData
+void Foam::snappyLayerDriver::printLayerData
 (
     const fvMesh& mesh,
     const labelList& patchIDs,
@@ -2645,7 +2645,7 @@ void Foam::autoLayerDriver::printLayerData
 }
 
 
-bool Foam::autoLayerDriver::writeLayerSets
+bool Foam::snappyLayerDriver::writeLayerSets
 (
     const fvMesh& mesh,
     const labelList& cellNLayers,
@@ -2708,7 +2708,7 @@ bool Foam::autoLayerDriver::writeLayerSets
 }
 
 
-bool Foam::autoLayerDriver::writeLayerData
+bool Foam::snappyLayerDriver::writeLayerData
 (
     const fvMesh& mesh,
     const labelList& patchIDs,
@@ -2854,7 +2854,7 @@ bool Foam::autoLayerDriver::writeLayerData
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::autoLayerDriver::autoLayerDriver
+Foam::snappyLayerDriver::snappyLayerDriver
 (
     meshRefinement& meshRefiner,
     const labelList& globalToMasterPatch,
@@ -2869,7 +2869,7 @@ Foam::autoLayerDriver::autoLayerDriver
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-void Foam::autoLayerDriver::mergePatchFacesUndo
+void Foam::snappyLayerDriver::mergePatchFacesUndo
 (
     const layerParameters& layerParams,
     const dictionary& motionDict
@@ -2920,7 +2920,7 @@ void Foam::autoLayerDriver::mergePatchFacesUndo
 }
 
 
-void Foam::autoLayerDriver::addLayers
+void Foam::snappyLayerDriver::addLayers
 (
     const layerParameters& layerParams,
     const dictionary& motionDict,
@@ -3641,7 +3641,7 @@ void Foam::autoLayerDriver::addLayers
                 Info<< "Writing shrunk mesh to time "
                     << meshRefiner_.timeName() << endl;
 
-                // See comment in autoSnapDriver why we should not remove
+                // See comment in snappySnapDriver why we should not remove
                 // meshPhi using mesh.clearOut().
 
                 meshRefiner_.write
@@ -3681,7 +3681,7 @@ void Foam::autoLayerDriver::addLayers
 
             // Calculate displacement for final layer for addPatchLayer.
             // (layer of cells next to the original mesh)
-            vectorField finalDisp(patchNLayers.size(), vector::zero);
+            vectorField finalDisp(patchNLayers.size(), Zero);
 
             forAll(nPatchPointLayers, i)
             {
@@ -4208,7 +4208,7 @@ void Foam::autoLayerDriver::addLayers
 }
 
 
-void Foam::autoLayerDriver::doLayers
+void Foam::snappyLayerDriver::doLayers
 (
     const dictionary& shrinkDict,
     const dictionary& motionDict,
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H
index bf67dc3fb08a9f96346d06641db5bc837542aef5..e55bc2a058fa2260ef1e7147896d675eaf9b20ca 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H
@@ -22,18 +22,18 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::autoLayerDriver
+    Foam::snappyLayerDriver
 
 Description
     All to do with adding layers
 
 SourceFiles
-    autoLayerDriver.C
+    snappyLayerDriver.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef autoLayerDriver_H
-#define autoLayerDriver_H
+#ifndef snappyLayerDriver_H
+#define snappyLayerDriver_H
 
 #include "meshRefinement.H"
 
@@ -51,10 +51,10 @@ class faceSet;
 class layerParameters;
 
 /*---------------------------------------------------------------------------*\
-                           Class autoLayerDriver Declaration
+                           Class snappyLayerDriver Declaration
 \*---------------------------------------------------------------------------*/
 
-class autoLayerDriver
+class snappyLayerDriver
 {
 public:
 
@@ -558,21 +558,21 @@ private:
 
 
         //- Disallow default bitwise copy construct
-        autoLayerDriver(const autoLayerDriver&);
+        snappyLayerDriver(const snappyLayerDriver&);
 
         //- Disallow default bitwise assignment
-        void operator=(const autoLayerDriver&);
+        void operator=(const snappyLayerDriver&);
 
 
 public:
 
     //- Runtime type information
-    ClassName("autoLayerDriver");
+    ClassName("snappyLayerDriver");
 
     // Constructors
 
         //- Construct from components
-        autoLayerDriver
+        snappyLayerDriver
         (
             meshRefinement& meshRefiner,
             const labelList& globalToMasterPatch,
@@ -622,7 +622,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "autoLayerDriverTemplates.C"
+#   include "snappyLayerDriverTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverTemplates.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverTemplates.C
similarity index 94%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverTemplates.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverTemplates.C
index afb66396c88747a2baac3b68632d19d90c1f9d53..05b9d1f5ce6c7e3b68014537134828a386f707de 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverTemplates.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverTemplates.C
@@ -23,13 +23,13 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "autoLayerDriver.H"
+#include "snappyLayerDriver.H"
 #include "syncTools.H"
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-void Foam::autoLayerDriver::averageNeighbours
+void Foam::snappyLayerDriver::averageNeighbours
 (
     const polyMesh& mesh,
     const PackedBoolList& isMasterEdge,
@@ -43,7 +43,7 @@ void Foam::autoLayerDriver::averageNeighbours
 {
     const pointField& pts = mesh.points();
 
-    average = pTraits<Type>::zero;
+    average = Type(Zero);
 
     forAll(edges, edgeI)
     {
@@ -77,7 +77,7 @@ void Foam::autoLayerDriver::averageNeighbours
         meshPoints,
         average,
         plusEqOp<Type>(),
-        pTraits<Type>::zero     // null value
+        Type(Zero)          // null value
     );
 
     average *= invSumWeight;
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C
index a6a235cd0095a492d2a99cfe73e93695870509b1..484229bf93a1dd074e392cc206d5905f1b26c866 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "autoRefineDriver.H"
+#include "snappyRefineDriver.H"
 #include "meshRefinement.H"
 #include "fvMesh.H"
 #include "Time.H"
@@ -45,7 +45,7 @@ License
 namespace Foam
 {
 
-defineTypeNameAndDebug(autoRefineDriver, 0);
+defineTypeNameAndDebug(snappyRefineDriver, 0);
 
 } // End namespace Foam
 
@@ -53,7 +53,7 @@ defineTypeNameAndDebug(autoRefineDriver, 0);
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
 // Construct from components
-Foam::autoRefineDriver::autoRefineDriver
+Foam::snappyRefineDriver::snappyRefineDriver
 (
     meshRefinement& meshRefiner,
     decompositionMethod& decomposer,
@@ -72,7 +72,7 @@ Foam::autoRefineDriver::autoRefineDriver
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::label Foam::autoRefineDriver::featureEdgeRefine
+Foam::label Foam::snappyRefineDriver::featureEdgeRefine
 (
     const refinementParameters& refineParams,
     const label maxIter,
@@ -182,7 +182,7 @@ Foam::label Foam::autoRefineDriver::featureEdgeRefine
 }
 
 
-Foam::label Foam::autoRefineDriver::smallFeatureRefine
+Foam::label Foam::snappyRefineDriver::smallFeatureRefine
 (
     const refinementParameters& refineParams,
     const label maxIter
@@ -304,7 +304,7 @@ Foam::label Foam::autoRefineDriver::smallFeatureRefine
 }
 
 
-Foam::label Foam::autoRefineDriver::surfaceOnlyRefine
+Foam::label Foam::snappyRefineDriver::surfaceOnlyRefine
 (
     const refinementParameters& refineParams,
     const label maxIter
@@ -427,7 +427,7 @@ Foam::label Foam::autoRefineDriver::surfaceOnlyRefine
 }
 
 
-Foam::label Foam::autoRefineDriver::gapOnlyRefine
+Foam::label Foam::snappyRefineDriver::gapOnlyRefine
 (
     const refinementParameters& refineParams,
     const label maxIter
@@ -658,7 +658,7 @@ Foam::label Foam::autoRefineDriver::gapOnlyRefine
 }
 
 
-Foam::label Foam::autoRefineDriver::bigGapOnlyRefine
+Foam::label Foam::snappyRefineDriver::bigGapOnlyRefine
 (
     const refinementParameters& refineParams,
     const bool spreadGapSize,
@@ -800,7 +800,7 @@ Foam::label Foam::autoRefineDriver::bigGapOnlyRefine
 }
 
 
-Foam::label Foam::autoRefineDriver::danglingCellRefine
+Foam::label Foam::snappyRefineDriver::danglingCellRefine
 (
     const refinementParameters& refineParams,
     const label nFaces,
@@ -946,7 +946,7 @@ Foam::label Foam::autoRefineDriver::danglingCellRefine
 
 // Detect cells with opposing intersected faces of differing refinement
 // level and refine them.
-Foam::label Foam::autoRefineDriver::refinementInterfaceRefine
+Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
 (
     const refinementParameters& refineParams,
     const label maxIter
@@ -1025,7 +1025,7 @@ Foam::label Foam::autoRefineDriver::refinementInterfaceRefine
                 //    const scalar rCVol = pow(cellVolumes[cellI], -5.0/3.0);
                 //
                 //    // Determine principal axes of cell
-                //    symmTensor R(symmTensor::zero);
+                //    symmTensor R(Zero);
                 //
                 //    forAll(cFaces, i)
                 //    {
@@ -1286,7 +1286,7 @@ Foam::label Foam::autoRefineDriver::refinementInterfaceRefine
 }
 
 
-void Foam::autoRefineDriver::removeInsideCells
+void Foam::snappyRefineDriver::removeInsideCells
 (
     const refinementParameters& refineParams,
     const label nBufferLayers
@@ -1334,7 +1334,7 @@ void Foam::autoRefineDriver::removeInsideCells
 }
 
 
-Foam::label Foam::autoRefineDriver::shellRefine
+Foam::label Foam::snappyRefineDriver::shellRefine
 (
     const refinementParameters& refineParams,
     const label maxIter
@@ -1507,7 +1507,7 @@ Foam::label Foam::autoRefineDriver::shellRefine
 }
 
 
-void Foam::autoRefineDriver::baffleAndSplitMesh
+void Foam::snappyRefineDriver::baffleAndSplitMesh
 (
     const refinementParameters& refineParams,
     const snapParameters& snapParams,
@@ -1570,7 +1570,7 @@ void Foam::autoRefineDriver::baffleAndSplitMesh
 }
 
 
-void Foam::autoRefineDriver::zonify
+void Foam::snappyRefineDriver::zonify
 (
     const refinementParameters& refineParams,
     wordPairHashTable& zonesToFaceZone
@@ -1633,7 +1633,7 @@ void Foam::autoRefineDriver::zonify
 }
 
 
-void Foam::autoRefineDriver::splitAndMergeBaffles
+void Foam::snappyRefineDriver::splitAndMergeBaffles
 (
     const refinementParameters& refineParams,
     const snapParameters& snapParams,
@@ -1758,11 +1758,11 @@ void Foam::autoRefineDriver::splitAndMergeBaffles
 }
 
 
-void Foam::autoRefineDriver::addFaceZones
+void Foam::snappyRefineDriver::addFaceZones
 (
     meshRefinement& meshRefiner,
     const refinementParameters& refineParams,
-    const HashTable<Pair<word> >& faceZoneToPatches
+    const HashTable<Pair<word>>& faceZoneToPatches
 )
 {
     if (faceZoneToPatches.size())
@@ -1789,7 +1789,7 @@ void Foam::autoRefineDriver::addFaceZones
         const polyMesh& mesh = meshRefiner.mesh();
 
         // Add patches for added inter-region faceZones
-        forAllConstIter(HashTable<Pair<word> >, faceZoneToPatches, iter)
+        forAllConstIter(HashTable<Pair<word>>, faceZoneToPatches, iter)
         {
             const word& fzName = iter.key();
             const Pair<word>& patchNames = iter();
@@ -1832,7 +1832,7 @@ void Foam::autoRefineDriver::addFaceZones
 }
 
 
-void Foam::autoRefineDriver::mergePatchFaces
+void Foam::snappyRefineDriver::mergePatchFaces
 (
     const bool geometricMerge,
     const refinementParameters& refineParams,
@@ -1883,7 +1883,7 @@ void Foam::autoRefineDriver::mergePatchFaces
 }
 
 
-void Foam::autoRefineDriver::doRefine
+void Foam::snappyRefineDriver::doRefine
 (
     const dictionary& refineDict,
     const refinementParameters& refineParams,
@@ -2009,12 +2009,12 @@ void Foam::autoRefineDriver::doRefine
 
     // Create pairs of patches for faceZones
     {
-        HashTable<Pair<word> > faceZoneToPatches(zonesToFaceZone.size());
+        HashTable<Pair<word>> faceZoneToPatches(zonesToFaceZone.size());
 
         //    Note: zonesToFaceZone contains the same data on different
         //          processors but in different order. We could sort the
         //          contents but instead just loop in sortedToc order.
-        List<Pair<word> > czs(zonesToFaceZone.sortedToc());
+        List<Pair<word>> czs(zonesToFaceZone.sortedToc());
 
         forAll(czs, i)
         {
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.H
similarity index 93%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.H
index 19f8a03fbdbb218569129d90ccb9784fbca73b4c..af7870e25e0b070fc87a279c62282c371c5eb580 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.H
@@ -22,17 +22,17 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::autoRefineDriver
+    Foam::snappyRefineDriver
 
 Description
 
 SourceFiles
-    autoRefineDriver.C
+    snappyRefineDriver.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef autoRefineDriver_H
-#define autoRefineDriver_H
+#ifndef snappyRefineDriver_H
+#define snappyRefineDriver_H
 
 #include "wordPairHashTable.H"
 #include "labelList.H"
@@ -51,10 +51,10 @@ class decompositionMethod;
 class fvMeshDistribute;
 
 /*---------------------------------------------------------------------------*\
-                           Class autoRefineDriver Declaration
+                           Class snappyRefineDriver Declaration
 \*---------------------------------------------------------------------------*/
 
-class autoRefineDriver
+class snappyRefineDriver
 {
     // Private data
 
@@ -175,22 +175,22 @@ class autoRefineDriver
         );
 
         //- Disallow default bitwise copy construct
-        autoRefineDriver(const autoRefineDriver&);
+        snappyRefineDriver(const snappyRefineDriver&);
 
         //- Disallow default bitwise assignment
-        void operator=(const autoRefineDriver&);
+        void operator=(const snappyRefineDriver&);
 
 
 public:
 
     //- Runtime type information
-    ClassName("autoRefineDriver");
+    ClassName("snappyRefineDriver");
 
 
     // Constructors
 
         //- Construct from components
-        autoRefineDriver
+        snappyRefineDriver
         (
             meshRefinement& meshRefiner,
             decompositionMethod& decomposer,
@@ -218,7 +218,7 @@ public:
         (
             meshRefinement& meshRefiner,
             const refinementParameters& refineParams,
-            const HashTable<Pair<word> >& faceZoneToPatches
+            const HashTable<Pair<word>>& faceZoneToPatches
         );
 
 };
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C
similarity index 97%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C
index a88fc283e430e57f1c50c79221ab48e19f49d7ab..95178d2881b785508c839a92c42a8ba1e4d8a641 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C
@@ -26,7 +26,7 @@ Description
 
 \*----------------------------------------------------------------------------*/
 
-#include "autoSnapDriver.H"
+#include "snappySnapDriver.H"
 #include "motionSmoother.H"
 #include "polyTopoChange.H"
 #include "syncTools.H"
@@ -51,7 +51,7 @@ Description
 namespace Foam
 {
 
-defineTypeNameAndDebug(autoSnapDriver, 0);
+defineTypeNameAndDebug(snappySnapDriver, 0);
 
 } // End namespace Foam
 
@@ -60,7 +60,7 @@ defineTypeNameAndDebug(autoSnapDriver, 0);
 
 // Calculate geometrically collocated points, Requires PackedList to be
 // sized and initalised!
-Foam::label Foam::autoSnapDriver::getCollocatedPoints
+Foam::label Foam::snappySnapDriver::getCollocatedPoints
 (
     const scalar tol,
     const pointField& points,
@@ -120,7 +120,7 @@ Foam::label Foam::autoSnapDriver::getCollocatedPoints
 }
 
 
-Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothInternalDisplacement
+Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
 (
     const meshRefinement& meshRefiner,
     const motionSmoother& meshMover
@@ -250,7 +250,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothInternalDisplacement
 
     // Calculate average of connected cells
     labelList nCells(mesh.nPoints(), 0);
-    pointField sumLocation(mesh.nPoints(), vector::zero);
+    pointField sumLocation(mesh.nPoints(), Zero);
 
     forAll(isMovingPoint, pointI)
     {
@@ -276,8 +276,8 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothInternalDisplacement
         vector::zero
     );
 
-    tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), vector::zero));
-    pointField& displacement = tdisplacement();
+    tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), Zero));
+    pointField& displacement = tdisplacement.ref();
 
     label nAdapted = 0;
 
@@ -300,7 +300,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothInternalDisplacement
 
 
 // Calculate displacement as average of patch points.
-Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
+Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
 (
     const motionSmoother& meshMover,
     const List<labelPair>& baffles
@@ -370,7 +370,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
     // Get average position of boundary face centres
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    vectorField avgBoundary(pointFaces.size(), vector::zero);
+    vectorField avgBoundary(pointFaces.size(), Zero);
     labelList nBoundary(pointFaces.size(), 0);
 
     forAll(pointFaces, patchPointI)
@@ -418,7 +418,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
     vectorField avgInternal;
     labelList nInternal;
     {
-        vectorField globalSum(mesh.nPoints(), vector::zero);
+        vectorField globalSum(mesh.nPoints(), Zero);
         labelList globalNum(mesh.nPoints(), 0);
 
         // Note: no use of pointFaces
@@ -521,8 +521,8 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
 
 
     // Displacement to calculate.
-    tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), vector::zero));
-    pointField& patchDisp = tpatchDisp();
+    tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), Zero));
+    pointField& patchDisp = tpatchDisp.ref();
 
     forAll(pointFaces, i)
     {
@@ -588,7 +588,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
     return tpatchDisp;
 }
 //XXXXXXX
-//Foam::tmp<Foam::pointField> Foam::autoSnapDriver::avg
+//Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avg
 //(
 //    const indirectPrimitivePatch& pp,
 //    const pointField& localPoints
@@ -597,7 +597,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
 //    const labelListList& pointEdges = pp.pointEdges();
 //    const edgeList& edges = pp.edges();
 //
-//    tmp<pointField> tavg(new pointField(pointEdges.size(), vector::zero));
+//    tmp<pointField> tavg(new pointField(pointEdges.size(), Zero));
 //    pointField& avg = tavg();
 //
 //    forAll(pointEdges, vertI)
@@ -620,7 +620,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
 //    return tavg;
 //}
 //Foam::tmp<Foam::pointField>
-//Foam::autoSnapDriver::smoothLambdaMuPatchDisplacement
+//Foam::snappySnapDriver::smoothLambdaMuPatchDisplacement
 //(
 //    const motionSmoother& meshMover,
 //    const List<labelPair>& baffles
@@ -650,7 +650,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::smoothPatchDisplacement
 //XXXXXXX
 
 
-Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist
+Foam::tmp<Foam::scalarField> Foam::snappySnapDriver::edgePatchDist
 (
     const pointMesh& pMesh,
     const indirectPrimitivePatch& pp
@@ -685,7 +685,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist
 
     // Copy edge values into scalarField
     tmp<scalarField> tedgeDist(new scalarField(mesh.nEdges()));
-    scalarField& edgeDist = tedgeDist();
+    scalarField& edgeDist = tedgeDist.ref();
 
     forAll(allEdgeInfo, edgeI)
     {
@@ -696,7 +696,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist
 }
 
 
-void Foam::autoSnapDriver::dumpMove
+void Foam::snappySnapDriver::dumpMove
 (
     const fileName& fName,
     const pointField& meshPts,
@@ -725,7 +725,7 @@ void Foam::autoSnapDriver::dumpMove
 
 // Check whether all displacement vectors point outwards of patch. Return true
 // if so.
-bool Foam::autoSnapDriver::outwardsDisplacement
+bool Foam::snappySnapDriver::outwardsDisplacement
 (
     const indirectPrimitivePatch& pp,
     const vectorField& patchDisp
@@ -768,7 +768,7 @@ bool Foam::autoSnapDriver::outwardsDisplacement
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-Foam::autoSnapDriver::autoSnapDriver
+Foam::snappySnapDriver::snappySnapDriver
 (
     meshRefinement& meshRefiner,
     const labelList& globalToMasterPatch,
@@ -783,7 +783,7 @@ Foam::autoSnapDriver::autoSnapDriver
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::scalarField Foam::autoSnapDriver::calcSnapDistance
+Foam::scalarField Foam::snappySnapDriver::calcSnapDistance
 (
     const fvMesh& mesh,
     const snapParameters& snapParams,
@@ -823,7 +823,7 @@ Foam::scalarField Foam::autoSnapDriver::calcSnapDistance
 }
 
 
-void Foam::autoSnapDriver::preSmoothPatch
+void Foam::snappySnapDriver::preSmoothPatch
 (
     const meshRefinement& meshRefiner,
     const snapParameters& snapParams,
@@ -939,7 +939,7 @@ void Foam::autoSnapDriver::preSmoothPatch
 
 
 // Get (pp-local) indices of points that are both on zone and on patched surface
-Foam::labelList Foam::autoSnapDriver::getZoneSurfacePoints
+Foam::labelList Foam::snappySnapDriver::getZoneSurfacePoints
 (
     const fvMesh& mesh,
     const indirectPrimitivePatch& pp,
@@ -986,7 +986,7 @@ Foam::labelList Foam::autoSnapDriver::getZoneSurfacePoints
 }
 
 
-Foam::tmp<Foam::pointField> Foam::autoSnapDriver::avgCellCentres
+Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres
 (
     const fvMesh& mesh,
     const indirectPrimitivePatch& pp
@@ -997,9 +997,9 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::avgCellCentres
 
     tmp<pointField> tavgBoundary
     (
-        new pointField(pointFaces.size(), vector::zero)
+        new pointField(pointFaces.size(), Zero)
     );
-    pointField& avgBoundary = tavgBoundary();
+    pointField& avgBoundary = tavgBoundary.ref();
     labelList nBoundary(pointFaces.size(), 0);
 
     forAll(pointFaces, pointI)
@@ -1042,14 +1042,14 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::avgCellCentres
 }
 
 
-//Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::calcEdgeLen
+//Foam::tmp<Foam::scalarField> Foam::snappySnapDriver::calcEdgeLen
 //(
 //    const indirectPrimitivePatch& pp
 //) const
 //{
 //    // Get local edge length based on refinement level
 //    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//    // (Ripped from autoLayerDriver)
+//    // (Ripped from snappyLayerDriver)
 //
 //    tmp<scalarField> tedgeLen(new scalarField(pp.nPoints()));
 //    scalarField& edgeLen = tedgeLen();
@@ -1090,7 +1090,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::avgCellCentres
 //}
 
 
-void Foam::autoSnapDriver::detectNearSurfaces
+void Foam::snappySnapDriver::detectNearSurfaces
 (
     const scalar planarCos,
     const indirectPrimitivePatch& pp,
@@ -1688,7 +1688,7 @@ void Foam::autoSnapDriver::detectNearSurfaces
 }
 
 
-void Foam::autoSnapDriver::calcNearestSurface
+void Foam::snappySnapDriver::calcNearestSurface
 (
     const refinementSurfaces& surfaces,
 
@@ -1768,7 +1768,7 @@ void Foam::autoSnapDriver::calcNearestSurface
 }
 
 
-Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
+Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
 (
     const bool strictRegionSnap,
     const meshRefinement& meshRefiner,
@@ -1805,7 +1805,7 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
     const fvMesh& mesh = meshRefiner.mesh();
 
     // Displacement per patch point
-    vectorField patchDisp(localPoints.size(), vector::zero);
+    vectorField patchDisp(localPoints.size(), Zero);
 
     if (returnReduce(localPoints.size(), sumOp<label>()) > 0)
     {
@@ -2091,7 +2091,7 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
 }
 
 
-void Foam::autoSnapDriver::smoothDisplacement
+void Foam::snappySnapDriver::smoothDisplacement
 (
     const snapParameters& snapParams,
     motionSmoother& meshMover
@@ -2160,7 +2160,7 @@ void Foam::autoSnapDriver::smoothDisplacement
 }
 
 
-bool Foam::autoSnapDriver::scaleMesh
+bool Foam::snappySnapDriver::scaleMesh
 (
     const snapParameters& snapParams,
     const label nInitErrors,
@@ -2226,7 +2226,7 @@ bool Foam::autoSnapDriver::scaleMesh
 // - calculate face-wise snap distance as max of point-wise
 // - calculate face-wise nearest surface point
 // - repatch face according to patch for surface point.
-Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::repatchToSurface
+Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface
 (
     const snapParameters& snapParams,
     const labelList& adaptPatchIDs,
@@ -2396,7 +2396,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::repatchToSurface
 }
 
 
-void Foam::autoSnapDriver::detectWarpedFaces
+void Foam::snappySnapDriver::detectWarpedFaces
 (
     const scalar featureCos,
     const indirectPrimitivePatch& pp,
@@ -2490,7 +2490,7 @@ void Foam::autoSnapDriver::detectWarpedFaces
 }
 
 
-Foam::labelList Foam::autoSnapDriver::getInternalOrBaffleDuplicateFace() const
+Foam::labelList Foam::snappySnapDriver::getInternalOrBaffleDuplicateFace() const
 {
     const fvMesh& mesh = meshRefiner_.mesh();
 
@@ -2524,7 +2524,7 @@ Foam::labelList Foam::autoSnapDriver::getInternalOrBaffleDuplicateFace() const
 }
 
 
-void Foam::autoSnapDriver::doSnap
+void Foam::snappySnapDriver::doSnap
 (
     const dictionary& snapDict,
     const dictionary& motionDict,
@@ -2754,7 +2754,7 @@ void Foam::autoSnapDriver::doSnap
             if (snapParams.detectNearSurfacesSnap())
             {
                 nearestPoint.setSize(pp.nPoints(), vector::max);
-                nearestNormal.setSize(pp.nPoints(), vector::zero);
+                nearestNormal.setSize(pp.nPoints(), Zero);
             }
 
             vectorField disp = calcNearestSurface
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H
similarity index 92%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H
index 4c221ba07e7c232cb97eb07c6294b8615bee4957..04cf8597f778cef46cb3e72bf58647fcab19c277 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H
@@ -22,19 +22,19 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::autoSnapDriver
+    Foam::snappySnapDriver
 
 Description
     All to do with snapping to surface
 
 SourceFiles
-    autoSnapDriver.C
-    autoSnapDriverFeature.C
+    snappySnapDriver.C
+    snappySnapDriverFeature.C
 
 \*---------------------------------------------------------------------------*/
 
-#ifndef autoSnapDriver_H
-#define autoSnapDriver_H
+#ifndef snappySnapDriver_H
+#define snappySnapDriver_H
 
 #include "meshRefinement.H"
 #include "DynamicField.H"
@@ -51,10 +51,10 @@ class snapParameters;
 class pointConstraint;
 
 /*---------------------------------------------------------------------------*\
-                           Class autoSnapDriver Declaration
+                           Class snappySnapDriver Declaration
 \*---------------------------------------------------------------------------*/
 
-class autoSnapDriver
+class snappySnapDriver
 {
     // Private data
 
@@ -241,9 +241,9 @@ class autoSnapDriver
                     const vectorField& faceSurfaceNormal,
                     const labelList& faceSurfaceRegion,
 
-                    List<List<point> >& pointFaceSurfNormals,
-                    List<List<point> >& pointFaceDisp,
-                    List<List<point> >& pointFaceCentres,
+                    List<List<point>>& pointFaceSurfNormals,
+                    List<List<point>>& pointFaceDisp,
+                    List<List<point>>& pointFaceCentres,
                     List<labelList>&    pointFacePatchID
                 ) const;
                 void correctAttraction
@@ -285,7 +285,7 @@ class autoSnapDriver
                     const indirectPrimitivePatch& pp,
                     const scalarField& snapDist,
 
-                    const List<List<point> >& pointFaceCentres,
+                    const List<List<point>>& pointFaceCentres,
                     const labelListList& pointFacePatchID,
 
                     const vectorField& rawPatchAttraction,
@@ -442,9 +442,9 @@ class autoSnapDriver
                     const vectorField& nearestDisp,
                     const label pointI,
 
-                    const List<List<point> >& pointFaceSurfNormals,
-                    const List<List<point> >& pointFaceDisp,
-                    const List<List<point> >& pointFaceCentres,
+                    const List<List<point>>& pointFaceSurfNormals,
+                    const List<List<point>>& pointFaceDisp,
+                    const List<List<point>>& pointFaceCentres,
                     const labelListList& pointFacePatchID,
 
                     DynamicList<point>& surfacePoints,
@@ -465,9 +465,9 @@ class autoSnapDriver
                     const scalarField& snapDist,
                     const vectorField& nearestDisp,
 
-                    const List<List<point> >& pointFaceSurfNormals,
-                    const List<List<point> >& pointFaceDisp,
-                    const List<List<point> >& pointFaceCentres,
+                    const List<List<point>>& pointFaceSurfNormals,
+                    const List<List<point>>& pointFaceDisp,
+                    const List<List<point>>& pointFaceCentres,
                     const labelListList& pointFacePatchID,
 
                     vectorField& patchAttraction,
@@ -486,16 +486,16 @@ class autoSnapDriver
                     const scalarField& snapDist,
                     const vectorField& nearestDisp,
 
-                    const List<List<point> >& pointFaceSurfNormals,
-                    const List<List<point> >& pointFaceDisp,
-                    const List<List<point> >& pointFaceCentres,
+                    const List<List<point>>& pointFaceSurfNormals,
+                    const List<List<point>>& pointFaceDisp,
+                    const List<List<point>>& pointFaceCentres,
                     const labelListList& pointFacePatchID,
 
                     List<labelList>& pointAttractor,
-                    List<List<pointConstraint> >& pointConstraints,
+                    List<List<pointConstraint>>& pointConstraints,
                     // Feature-edge to pp point
-                    List<List<DynamicList<point> > >& edgeAttractors,
-                    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+                    List<List<DynamicList<point>>>& edgeAttractors,
+                    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
                     vectorField& patchAttraction,
                     List<pointConstraint>& patchConstraints
                 ) const;
@@ -513,10 +513,10 @@ class autoSnapDriver
 
                     // Feature-point to pp point
                     List<labelList>& pointAttractor,
-                    List<List<pointConstraint> >& pointConstraints,
+                    List<List<pointConstraint>>& pointConstraints,
                     // Feature-edge to pp point
-                    List<List<DynamicList<point> > >& edgeAttractors,
-                    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+                    List<List<DynamicList<point>>>& edgeAttractors,
+                    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
                     // pp point to nearest feature
                     vectorField& patchAttraction,
                     List<pointConstraint>& patchConstraints
@@ -530,10 +530,10 @@ class autoSnapDriver
 
                     // Feature-point to pp point
                     const List<labelList>& pointAttractor,
-                    const List<List<pointConstraint> >& pointConstraints,
+                    const List<List<pointConstraint>>& pointConstraints,
                     // Feature-edge to pp point
-                    const List<List<DynamicList<point> > >& edgeAttractors,
-                    const List<List<DynamicList<pointConstraint> > >&,
+                    const List<List<DynamicList<point>>>& edgeAttractors,
+                    const List<List<DynamicList<pointConstraint>>>&,
 
                     const vectorField& rawPatchAttraction,
                     const List<pointConstraint>& rawPatchConstraints,
@@ -555,8 +555,8 @@ class autoSnapDriver
                     const label pointI,
                     const point& estimatedPt,
 
-                    List<List<DynamicList<point> > >&,
-                    List<List<DynamicList<pointConstraint> > >&,
+                    List<List<DynamicList<point>>>&,
+                    List<List<DynamicList<pointConstraint>>>&,
                     vectorField&,
                     List<pointConstraint>&
                 ) const;
@@ -578,10 +578,10 @@ class autoSnapDriver
 
                     // Feature-point to pp point
                     List<labelList>& pointAttractor,
-                    List<List<pointConstraint> >& pointConstraints,
+                    List<List<pointConstraint>>& pointConstraints,
                     // Feature-edge to pp point
-                    List<List<DynamicList<point> > >& edgeAttractors,
-                    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+                    List<List<DynamicList<point>>>& edgeAttractors,
+                    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
                     // pp point to nearest feature
                     vectorField& patchAttraction,
                     List<pointConstraint>& patchConstraints
@@ -605,9 +605,9 @@ class autoSnapDriver
                     const vectorField& nearestDisp,
                     const vectorField& nearestNormal,
 
-                    const List<List<point> >& pointFaceSurfNormals,
-                    const List<List<point> >& pointFaceDisp,
-                    const List<List<point> >& pointFaceCentres,
+                    const List<List<point>>& pointFaceSurfNormals,
+                    const List<List<point>>& pointFaceDisp,
+                    const List<List<point>>& pointFaceCentres,
                     const labelListList& pointFacePatchID,
 
                     vectorField& patchAttraction,
@@ -650,22 +650,22 @@ class autoSnapDriver
 
 
         //- Disallow default bitwise copy construct
-        autoSnapDriver(const autoSnapDriver&);
+        snappySnapDriver(const snappySnapDriver&);
 
         //- Disallow default bitwise assignment
-        void operator=(const autoSnapDriver&);
+        void operator=(const snappySnapDriver&);
 
 
 public:
 
     //- Runtime type information
-    ClassName("autoSnapDriver");
+    ClassName("snappySnapDriver");
 
 
     // Constructors
 
         //- Construct from components
-        autoSnapDriver
+        snappySnapDriver
         (
             meshRefinement& meshRefiner,
             const labelList& globalToMasterPatch,
@@ -787,7 +787,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "autoSnapDriverTemplates.C"
+#   include "snappySnapDriverTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C
similarity index 96%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C
index 99ca6ed16c3de9150b3354a1a700a7f4958e9097..45535a7f1949e1494c0be9a26196bb3a1c238353 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "autoSnapDriver.H"
+#include "snappySnapDriver.H"
 #include "polyTopoChange.H"
 #include "syncTools.H"
 #include "fvMesh.H"
@@ -65,7 +65,7 @@ namespace Foam
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-bool Foam::autoSnapDriver::isFeaturePoint
+bool Foam::snappySnapDriver::isFeaturePoint
 (
     const scalar featureCos,
     const indirectPrimitivePatch& pp,
@@ -126,7 +126,7 @@ bool Foam::autoSnapDriver::isFeaturePoint
 }
 
 
-void Foam::autoSnapDriver::smoothAndConstrain
+void Foam::snappySnapDriver::smoothAndConstrain
 (
     const PackedBoolList& isPatchMasterEdge,
     const indirectPrimitivePatch& pp,
@@ -152,7 +152,7 @@ void Foam::autoSnapDriver::smoothAndConstrain
         // - same for feature points. They are already attracted to the
         //   nearest feature point.
 
-        vectorField dispSum(pp.nPoints(), vector::zero);
+        vectorField dispSum(pp.nPoints(), Zero);
         labelList dispCount(pp.nPoints(), 0);
 
         const labelListList& pointEdges = pp.pointEdges();
@@ -217,7 +217,7 @@ void Foam::autoSnapDriver::smoothAndConstrain
 }
 
 
-void Foam::autoSnapDriver::calcNearestFace
+void Foam::snappySnapDriver::calcNearestFace
 (
     const label iter,
     const indirectPrimitivePatch& pp,
@@ -233,9 +233,9 @@ void Foam::autoSnapDriver::calcNearestFace
 
     // Displacement and orientation per pp face.
     faceDisp.setSize(pp.size());
-    faceDisp = vector::zero;
+    faceDisp = Zero;
     faceSurfaceNormal.setSize(pp.size());
-    faceSurfaceNormal = vector::zero;
+    faceSurfaceNormal = Zero;
     faceSurfaceGlobalRegion.setSize(pp.size());
     faceSurfaceGlobalRegion = -1;
 
@@ -408,7 +408,7 @@ void Foam::autoSnapDriver::calcNearestFace
     //
     //// Determine rotation axis
     //faceRotation.setSize(pp.size());
-    //faceRotation = vector::zero;
+    //faceRotation = Zero;
     //
     //forAll(faceRotation, faceI)
     //{
@@ -443,7 +443,7 @@ void Foam::autoSnapDriver::calcNearestFace
 // - faceSurfaceNormal
 // - faceDisp
 // - faceCentres&faceNormal
-void Foam::autoSnapDriver::calcNearestFacePointProperties
+void Foam::snappySnapDriver::calcNearestFacePointProperties
 (
     const label iter,
     const indirectPrimitivePatch& pp,
@@ -452,9 +452,9 @@ void Foam::autoSnapDriver::calcNearestFacePointProperties
     const vectorField& faceSurfaceNormal,
     const labelList& faceSurfaceGlobalRegion,
 
-    List<List<point> >& pointFaceSurfNormals,
-    List<List<point> >& pointFaceDisp,
-    List<List<point> >& pointFaceCentres,
+    List<List<point>>& pointFaceSurfNormals,
+    List<List<point>>& pointFaceDisp,
+    List<List<point>>& pointFaceCentres,
     List<labelList>&    pointFacePatchID
 ) const
 {
@@ -687,7 +687,7 @@ void Foam::autoSnapDriver::calcNearestFacePointProperties
 // Gets passed in offset to nearest point on feature edge. Calculates
 // if the point has a different number of faces on either side of the feature
 // and if so attracts the point to that non-dominant plane.
-void Foam::autoSnapDriver::correctAttraction
+void Foam::snappySnapDriver::correctAttraction
 (
     const DynamicList<point>& surfacePoints,
     const DynamicList<label>& surfaceCounts,
@@ -725,7 +725,7 @@ void Foam::autoSnapDriver::correctAttraction
 }
 
 
-Foam::pointIndexHit Foam::autoSnapDriver::findMultiPatchPoint
+Foam::pointIndexHit Foam::snappySnapDriver::findMultiPatchPoint
 (
     const point& pt,
     const labelList& patchIDs,
@@ -745,11 +745,11 @@ Foam::pointIndexHit Foam::autoSnapDriver::findMultiPatchPoint
             }
         }
     }
-    return pointIndexHit(false, vector::zero, labelMax);
+    return pointIndexHit(false, Zero, labelMax);
 }
 
 
-Foam::label Foam::autoSnapDriver::findNormal
+Foam::label Foam::snappySnapDriver::findNormal
 (
     const scalar featureCos,
     const vector& n,
@@ -782,7 +782,7 @@ Foam::label Foam::autoSnapDriver::findNormal
 //                     (so geometric feature edge is also a region edge)
 // - true , index=1  : multiple patches on same normals plane i.e. flat region
 //                     edge
-Foam::pointIndexHit Foam::autoSnapDriver::findMultiPatchPoint
+Foam::pointIndexHit Foam::snappySnapDriver::findMultiPatchPoint
 (
     const point& pt,
     const labelList& patchIDs,
@@ -862,7 +862,7 @@ Foam::pointIndexHit Foam::autoSnapDriver::findMultiPatchPoint
 }
 
 
-void Foam::autoSnapDriver::writeStats
+void Foam::snappySnapDriver::writeStats
 (
     const indirectPrimitivePatch& pp,
     const PackedBoolList& isPatchMasterPoint,
@@ -910,7 +910,7 @@ void Foam::autoSnapDriver::writeStats
 }
 
 
-void Foam::autoSnapDriver::featureAttractionUsingReconstruction
+void Foam::snappySnapDriver::featureAttractionUsingReconstruction
 (
     const label iter,
     const scalar featureCos,
@@ -920,9 +920,9 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
     const vectorField& nearestDisp,
     const label pointI,
 
-    const List<List<point> >& pointFaceSurfNormals,
-    const List<List<point> >& pointFaceDisp,
-    const List<List<point> >& pointFaceCentres,
+    const List<List<point>>& pointFaceSurfNormals,
+    const List<List<point>>& pointFaceDisp,
+    const List<List<point>>& pointFaceCentres,
     const labelListList& pointFacePatchID,
 
     DynamicList<point>& surfacePoints,
@@ -933,7 +933,7 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
     pointConstraint& patchConstraint
 ) const
 {
-    patchAttraction = vector::zero;
+    patchAttraction = Zero;
     patchConstraint = pointConstraint();
 
     const List<point>& pfSurfNormals = pointFaceSurfNormals[pointI];
@@ -1103,7 +1103,7 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
 
 
 // Special version that calculates attraction in one go
-void Foam::autoSnapDriver::featureAttractionUsingReconstruction
+void Foam::snappySnapDriver::featureAttractionUsingReconstruction
 (
     const label iter,
     const scalar featureCos,
@@ -1112,9 +1112,9 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
     const scalarField& snapDist,
     const vectorField& nearestDisp,
 
-    const List<List<point> >& pointFaceSurfNormals,
-    const List<List<point> >& pointFaceDisp,
-    const List<List<point> >& pointFaceCentres,
+    const List<List<point>>& pointFaceSurfNormals,
+    const List<List<point>>& pointFaceDisp,
+    const List<List<point>>& pointFaceCentres,
     const labelListList& pointFacePatchID,
 
     vectorField& patchAttraction,
@@ -1155,7 +1155,7 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
 
     forAll(pp.localPoints(), pointI)
     {
-        vector attraction = vector::zero;
+        vector attraction = Zero;
         pointConstraint constraint;
 
         featureAttractionUsingReconstruction
@@ -1209,7 +1209,7 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
 }
 
 
-void Foam::autoSnapDriver::stringFeatureEdges
+void Foam::snappySnapDriver::stringFeatureEdges
 (
     const label iter,
     const scalar featureCos,
@@ -1398,7 +1398,7 @@ void Foam::autoSnapDriver::stringFeatureEdges
 }
 
 
-void Foam::autoSnapDriver::releasePointsNextToMultiPatch
+void Foam::snappySnapDriver::releasePointsNextToMultiPatch
 (
     const label iter,
     const scalar featureCos,
@@ -1406,7 +1406,7 @@ void Foam::autoSnapDriver::releasePointsNextToMultiPatch
     const indirectPrimitivePatch& pp,
     const scalarField& snapDist,
 
-    const List<List<point> >& pointFaceCentres,
+    const List<List<point>>& pointFaceCentres,
     const labelListList& pointFacePatchID,
 
     const vectorField& rawPatchAttraction,
@@ -1510,7 +1510,7 @@ void Foam::autoSnapDriver::releasePointsNextToMultiPatch
                     //Pout<< "Knocking out constraint"
                     //    << " on non-multiPatchPoint:"
                     //    << pp.localPoints()[pointI] << endl;
-                    patchAttraction[pointI] = vector::zero;
+                    patchAttraction[pointI] = Zero;
                     patchConstraints[pointI] = pointConstraint();
                     nChanged++;
 
@@ -1529,7 +1529,7 @@ void Foam::autoSnapDriver::releasePointsNextToMultiPatch
 }
 
 
-Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
+Foam::labelPair Foam::snappySnapDriver::findDiagonalAttraction
 (
     const indirectPrimitivePatch& pp,
     const vectorField& patchAttraction,
@@ -1572,7 +1572,7 @@ Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
 }
 
 
-bool Foam::autoSnapDriver::isSplitAlignedWithFeature
+bool Foam::snappySnapDriver::isSplitAlignedWithFeature
 (
     const scalar featureCos,
     const point& p0,
@@ -1612,7 +1612,7 @@ bool Foam::autoSnapDriver::isSplitAlignedWithFeature
 
 
 // Is situation very concave
-bool Foam::autoSnapDriver::isConcave
+bool Foam::snappySnapDriver::isConcave
 (
     const point& c0,
     const vector& area0,
@@ -1662,7 +1662,7 @@ bool Foam::autoSnapDriver::isConcave
 }
 
 
-Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
+Foam::labelPair Foam::snappySnapDriver::findDiagonalAttraction
 (
     const scalar featureCos,
     const scalar concaveCos,
@@ -1881,7 +1881,7 @@ Foam::labelPair Foam::autoSnapDriver::findDiagonalAttraction
 }
 
 
-void Foam::autoSnapDriver::splitDiagonals
+void Foam::snappySnapDriver::splitDiagonals
 (
     const scalar featureCos,
     const scalar concaveCos,
@@ -1966,7 +1966,7 @@ void Foam::autoSnapDriver::splitDiagonals
 }
 
 
-void Foam::autoSnapDriver::avoidDiagonalAttraction
+void Foam::snappySnapDriver::avoidDiagonalAttraction
 (
     const label iter,
     const scalar featureCos,
@@ -2065,7 +2065,7 @@ void Foam::autoSnapDriver::avoidDiagonalAttraction
 
 
 Foam::Tuple2<Foam::label, Foam::pointIndexHit>
-Foam::autoSnapDriver::findNearFeatureEdge
+Foam::snappySnapDriver::findNearFeatureEdge
 (
     const bool isRegionEdge,
 
@@ -2074,8 +2074,8 @@ Foam::autoSnapDriver::findNearFeatureEdge
     const label pointI,
     const point& estimatedPt,
 
-    List<List<DynamicList<point> > >& edgeAttractors,
-    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+    List<List<DynamicList<point>>>& edgeAttractors,
+    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
     vectorField& patchAttraction,
     List<pointConstraint>& patchConstraints
 ) const
@@ -2132,7 +2132,7 @@ Foam::autoSnapDriver::findNearFeatureEdge
 
 
 Foam::Tuple2<Foam::label, Foam::pointIndexHit>
-Foam::autoSnapDriver::findNearFeaturePoint
+Foam::snappySnapDriver::findNearFeaturePoint
 (
     const bool isRegionPoint,
 
@@ -2143,10 +2143,10 @@ Foam::autoSnapDriver::findNearFeaturePoint
 
     // Feature-point to pp point
     List<labelList>& pointAttractor,
-    List<List<pointConstraint> >& pointConstraints,
+    List<List<pointConstraint>>& pointConstraints,
     // Feature-edge to pp point
-    List<List<DynamicList<point> > >& edgeAttractors,
-    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+    List<List<DynamicList<point>>>& edgeAttractors,
+    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
     // pp point to nearest feature
     vectorField& patchAttraction,
     List<pointConstraint>& patchConstraints
@@ -2193,14 +2193,14 @@ Foam::autoSnapDriver::findNearFeaturePoint
                 // Current pointI nearer.
                 pointAttractor[featI][featPointI] = pointI;
                 pointConstraints[featI][featPointI].first() = 3;
-                pointConstraints[featI][featPointI].second() = vector::zero;
+                pointConstraints[featI][featPointI].second() = Zero;
 
                 // Store for later use
                 patchAttraction[pointI] = featPt-pt;
                 patchConstraints[pointI] = pointConstraints[featI][featPointI];
 
                 // Reset oldPointI to nearest on feature edge
-                patchAttraction[oldPointI] = vector::zero;
+                patchAttraction[oldPointI] = Zero;
                 patchConstraints[oldPointI] = pointConstraint();
 
                 findNearFeatureEdge
@@ -2224,7 +2224,7 @@ Foam::autoSnapDriver::findNearFeaturePoint
             // Current pointI nearer.
             pointAttractor[featI][featPointI] = pointI;
             pointConstraints[featI][featPointI].first() = 3;
-            pointConstraints[featI][featPointI].second() = vector::zero;
+            pointConstraints[featI][featPointI].second() = Zero;
 
             // Store for later use
             patchAttraction[pointI] = featPt-pt;
@@ -2238,7 +2238,7 @@ Foam::autoSnapDriver::findNearFeaturePoint
 
 // Determines for every pp point - that is on multiple faces that form
 // a feature - the nearest feature edge/point.
-void Foam::autoSnapDriver::determineFeatures
+void Foam::snappySnapDriver::determineFeatures
 (
     const label iter,
     const scalar featureCos,
@@ -2248,17 +2248,17 @@ void Foam::autoSnapDriver::determineFeatures
     const scalarField& snapDist,
     const vectorField& nearestDisp,
 
-    const List<List<point> >& pointFaceSurfNormals,
-    const List<List<point> >& pointFaceDisp,
-    const List<List<point> >& pointFaceCentres,
+    const List<List<point>>& pointFaceSurfNormals,
+    const List<List<point>>& pointFaceDisp,
+    const List<List<point>>& pointFaceCentres,
     const labelListList& pointFacePatchID,
 
     // Feature-point to pp point
     List<labelList>& pointAttractor,
-    List<List<pointConstraint> >& pointConstraints,
+    List<List<pointConstraint>>& pointConstraints,
     // Feature-edge to pp point
-    List<List<DynamicList<point> > >& edgeAttractors,
-    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+    List<List<DynamicList<point>>>& edgeAttractors,
+    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
     // pp point to nearest feature
     vectorField& patchAttraction,
     List<pointConstraint>& patchConstraints
@@ -2346,7 +2346,7 @@ void Foam::autoSnapDriver::determineFeatures
         //    2: attract to feature line, constraint is feature line direction
         //    3: attract to feature point, constraint is zero)
 
-        vector attraction = vector::zero;
+        vector attraction = Zero;
         pointConstraint constraint;
 
         featureAttractionUsingReconstruction
@@ -2780,7 +2780,7 @@ void Foam::autoSnapDriver::determineFeatures
 // detected anything. So explicitly pick up feature edges on the pp
 // (after duplicating points & smoothing so will already have been
 // expanded) and match these to the features.
-void Foam::autoSnapDriver::determineBaffleFeatures
+void Foam::snappySnapDriver::determineBaffleFeatures
 (
     const label iter,
     const bool baffleFeaturePoints,
@@ -2791,10 +2791,10 @@ void Foam::autoSnapDriver::determineBaffleFeatures
 
     // Feature-point to pp point
     List<labelList>& pointAttractor,
-    List<List<pointConstraint> >& pointConstraints,
+    List<List<pointConstraint>>& pointConstraints,
     // Feature-edge to pp point
-    List<List<DynamicList<point> > >& edgeAttractors,
-    List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+    List<List<DynamicList<point>>>& edgeAttractors,
+    List<List<DynamicList<pointConstraint>>>& edgeConstraints,
     // pp point to nearest feature
     vectorField& patchAttraction,
     List<pointConstraint>& patchConstraints
@@ -2804,7 +2804,7 @@ void Foam::autoSnapDriver::determineBaffleFeatures
     const refinementFeatures& features = meshRefiner_.features();
 
     // Calculate edge-faces
-    List<List<point> > edgeFaceNormals(pp.nEdges());
+    List<List<point>> edgeFaceNormals(pp.nEdges());
 
     // Fill local data
     forAll(pp.edgeFaces(), edgeI)
@@ -3029,8 +3029,7 @@ void Foam::autoSnapDriver::determineBaffleFeatures
                 {
                     pointAttractor[featI][featPointI] = pointI;
                     pointConstraints[featI][featPointI].first() = 3;
-                    pointConstraints[featI][featPointI].second() =
-                        vector::zero;
+                    pointConstraints[featI][featPointI].second() = Zero;
 
                     // Store for later use
                     patchAttraction[pointI] = featPt-pt;
@@ -3108,7 +3107,7 @@ void Foam::autoSnapDriver::determineBaffleFeatures
 }
 
 
-void Foam::autoSnapDriver::reverseAttractMeshPoints
+void Foam::snappySnapDriver::reverseAttractMeshPoints
 (
     const label iter,
 
@@ -3117,10 +3116,10 @@ void Foam::autoSnapDriver::reverseAttractMeshPoints
 
     // Feature-point to pp point
     const List<labelList>& pointAttractor,
-    const List<List<pointConstraint> >& pointConstraints,
+    const List<List<pointConstraint>>& pointConstraints,
     // Feature-edge to pp point
-    const List<List<DynamicList<point> > >& edgeAttractors,
-    const List<List<DynamicList<pointConstraint> > >& edgeConstraints,
+    const List<List<DynamicList<point>>>& edgeAttractors,
+    const List<List<DynamicList<pointConstraint>>>& edgeConstraints,
 
     const vectorField& rawPatchAttraction,
     const List<pointConstraint>& rawPatchConstraints,
@@ -3245,14 +3244,14 @@ void Foam::autoSnapDriver::reverseAttractMeshPoints
 
     // Per mesh point the point on nearest feature edge.
     patchAttraction.setSize(pp.nPoints());
-    patchAttraction = vector::zero;
+    patchAttraction = Zero;
     patchConstraints.setSize(pp.nPoints());
     patchConstraints = pointConstraint();
 
     forAll(edgeAttractors, featI)
     {
-        const List<DynamicList<point> >& edgeAttr = edgeAttractors[featI];
-        const List<DynamicList<pointConstraint> >& edgeConstr =
+        const List<DynamicList<point>>& edgeAttr = edgeAttractors[featI];
+        const List<DynamicList<pointConstraint>>& edgeConstr =
             edgeConstraints[featI];
 
         forAll(edgeAttr, featEdgeI)
@@ -3369,7 +3368,7 @@ void Foam::autoSnapDriver::reverseAttractMeshPoints
 }
 
 
-void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
+void Foam::snappySnapDriver::featureAttractionUsingFeatureEdges
 (
     const label iter,
     const bool multiRegionFeatureSnap,
@@ -3388,9 +3387,9 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
     const vectorField& nearestDisp,
     const vectorField& nearestNormal,
 
-    const List<List<point> >& pointFaceSurfNormals,
-    const List<List<point> >& pointFaceDisp,
-    const List<List<point> >& pointFaceCentres,
+    const List<List<point>>& pointFaceSurfNormals,
+    const List<List<point>>& pointFaceDisp,
+    const List<List<point>>& pointFaceCentres,
     const labelListList& pointFacePatchID,
 
     vectorField& patchAttraction,
@@ -3415,8 +3414,8 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
 
     // Per feature, per feature-edge a list of attraction points and their
     // originating vertex.
-    List<List<DynamicList<point> > > edgeAttractors(features.size());
-    List<List<DynamicList<pointConstraint> > > edgeConstraints
+    List<List<DynamicList<point>>> edgeAttractors(features.size());
+    List<List<DynamicList<pointConstraint>>> edgeConstraints
     (
         features.size()
     );
@@ -3431,7 +3430,7 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
     // This list is only used to subset the feature-points that are actually
     // used.
     List<labelList> pointAttractor(features.size());
-    List<List<pointConstraint> > pointConstraints(features.size());
+    List<List<pointConstraint>> pointConstraints(features.size());
     forAll(features, featI)
     {
         label nFeatPoints = features[featI].points().size();
@@ -3440,7 +3439,7 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
     }
 
     // Reverse: from pp point to nearest feature
-    vectorField rawPatchAttraction(pp.nPoints(), vector::zero);
+    vectorField rawPatchAttraction(pp.nPoints(), Zero);
     List<pointConstraint> rawPatchConstraints(pp.nPoints());
 
     determineFeatures
@@ -3667,7 +3666,7 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
 
 
 // Correct for squeezing of face
-void Foam::autoSnapDriver::preventFaceSqueeze
+void Foam::snappySnapDriver::preventFaceSqueeze
 (
     const label iter,
     const scalar featureCos,
@@ -3803,7 +3802,7 @@ void Foam::autoSnapDriver::preventFaceSqueeze
 }
 
 
-Foam::vectorField Foam::autoSnapDriver::calcNearestSurfaceFeature
+Foam::vectorField Foam::snappySnapDriver::calcNearestSurfaceFeature
 (
     const snapParameters& snapParams,
     const bool alignMeshEdges,
@@ -3852,9 +3851,9 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurfaceFeature
     // - faceSurfaceNormal
     // - faceDisp
     // - faceCentres
-    List<List<point> > pointFaceSurfNormals;
-    List<List<point> > pointFaceDisp;
-    List<List<point> > pointFaceCentres;
+    List<List<point>> pointFaceSurfNormals;
+    List<List<point>> pointFaceDisp;
+    List<List<point>> pointFaceCentres;
     List<labelList> pointFacePatchID;
 
     {
@@ -3875,11 +3874,11 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurfaceFeature
         // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
         // vector from point on surface back to face centre
-        vectorField faceDisp(pp.size(), vector::zero);
+        vectorField faceDisp(pp.size(), Zero);
         // normal of surface at point on surface
-        vectorField faceSurfaceNormal(pp.size(), vector::zero);
+        vectorField faceSurfaceNormal(pp.size(), Zero);
         labelList faceSurfaceGlobalRegion(pp.size(), -1);
-        //vectorField faceRotation(pp.size(), vector::zero);
+        //vectorField faceRotation(pp.size(), Zero);
 
         calcNearestFace
         (
@@ -3927,7 +3926,7 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurfaceFeature
 
     // Nearest feature
     patchAttraction.setSize(localPoints.size());
-    patchAttraction = vector::zero;
+    patchAttraction = Zero;
     // Constraints at feature
     patchConstraints.setSize(localPoints.size());
     patchConstraints = pointConstraint();
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverTemplates.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverTemplates.C
similarity index 96%
rename from src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverTemplates.C
rename to src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverTemplates.C
index e70ddc237ff5cea7eaaa33e41390b80e88940180..b0f87e462b5dbd6efce8a6ad5473b225fe57b53b 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverTemplates.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverTemplates.C
@@ -23,12 +23,12 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "autoSnapDriver.H"
+#include "snappySnapDriver.H"
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class FaceList>
-Foam::labelList Foam::autoSnapDriver::getFacePoints
+Foam::labelList Foam::snappySnapDriver::getFacePoints
 (
     const indirectPrimitivePatch& pp,
     const FaceList& faces
diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C
rename to src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C
diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H
similarity index 98%
rename from src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H
rename to src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H
index 802581ab6d45909f1159bfb400bcba4b713d9423..12b1784cee02c192de10d0e2ef05ef0700e8c1dc 100644
--- a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H
+++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H
@@ -79,7 +79,7 @@ public:
     //- Class used to pass tracking data to the trackToFace function
     class trackingData
     :
-        public particle::TrackingData<Cloud<trackedParticle> >
+        public particle::TrackingData<Cloud<trackedParticle>>
     {
     public:
 
@@ -97,7 +97,7 @@ public:
                 List<PackedBoolList>& featureEdgeVisited
             )
             :
-                particle::TrackingData<Cloud<trackedParticle> >(cloud),
+                particle::TrackingData<Cloud<trackedParticle>>(cloud),
                 maxLevel_(maxLevel),
                 featureEdgeVisited_(featureEdgeVisited)
             {}
diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticleCloud.C b/src/mesh/snappyHexMesh/trackedParticle/trackedParticleCloud.C
similarity index 100%
rename from src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticleCloud.C
rename to src/mesh/snappyHexMesh/trackedParticle/trackedParticleCloud.C
diff --git a/src/meshTools/AABBTree/AABBTree.C b/src/meshTools/AABBTree/AABBTree.C
index a8e039b369d6e5a03b9f19fb7b914ef19eca8aa7..adbe0ab5adb7e4aa9e83e92bf35e6262ef6cf881 100644
--- a/src/meshTools/AABBTree/AABBTree.C
+++ b/src/meshTools/AABBTree/AABBTree.C
@@ -82,8 +82,8 @@ void Foam::AABBTree<Type>::writeOBJ
     const bool writeLinesOnly,
     const treeBoundBox& bb,
     const label nodeI,
-    const List<Pair<treeBoundBox> >& bbs,
-    const List<Pair<label> >& nodes,
+    const List<Pair<treeBoundBox>>& bbs,
+    const List<Pair<label>>& nodes,
     label& vertI,
     Ostream& os
 ) const
@@ -133,7 +133,7 @@ void Foam::AABBTree<Type>::createBoxes
     const treeBoundBox& bb,
     const label nodeI,
 
-    DynamicList<Pair<treeBoundBox> >& bbs,
+    DynamicList<Pair<treeBoundBox>>& bbs,
     DynamicList<labelPair>& nodes,
     DynamicList<labelList>& addressing
 ) const
@@ -356,7 +356,7 @@ Foam::AABBTree<Type>::AABBTree
     }
 
 
-    DynamicList<Pair<treeBoundBox> > bbs(maxLevel);
+    DynamicList<Pair<treeBoundBox>> bbs(maxLevel);
     DynamicList<labelPair> nodes(maxLevel);
     DynamicList<labelList> addr(maxLevel);
 
diff --git a/src/meshTools/AABBTree/AABBTree.H b/src/meshTools/AABBTree/AABBTree.H
index 0d8c98fe7489c186453ffe25317a62773e8ff225..527b62c980ee0f6cdf39b51033d4d075a5032042 100644
--- a/src/meshTools/AABBTree/AABBTree.H
+++ b/src/meshTools/AABBTree/AABBTree.H
@@ -109,8 +109,8 @@ protected:
             const bool writeLinesOnly,
             const treeBoundBox& bb,
             const label nodeI,
-            const List<Pair<treeBoundBox> >& bbs,
-            const List<Pair<label> >& nodes,
+            const List<Pair<treeBoundBox>>& bbs,
+            const List<Pair<label>>& nodes,
             label& vertI,
             Ostream& os
         ) const;
@@ -126,7 +126,7 @@ protected:
             const treeBoundBox& bb,
             const label nodeI,
 
-            DynamicList<Pair<treeBoundBox> >& bbs,
+            DynamicList<Pair<treeBoundBox>>& bbs,
             DynamicList<labelPair>& nodes,
             DynamicList<labelList>& addressing
         ) const;
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
index e5dcad0c8d5f86f83673e08b4b5cf9a30ccd006b..b6b133b68ec5b63330f015f20f448c9b19174f34 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -970,7 +970,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
 
 
         // calculate AMI interpolation
-        autoPtr<AMIMethod<SourcePatch, TargetPatch> > AMIPtr
+        autoPtr<AMIMethod<SourcePatch, TargetPatch>> AMIPtr
         (
             AMIMethod<SourcePatch, TargetPatch>::New
             (
@@ -1065,14 +1065,14 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
         normaliseWeights(AMIPtr->conformal(), true);
 
         // cache maps and reset addresses
-        List<Map<label> > cMap;
+        List<Map<label>> cMap;
         srcMapPtr_.reset(new mapDistribute(globalSrcFaces, tgtAddress_, cMap));
         tgtMapPtr_.reset(new mapDistribute(globalTgtFaces, srcAddress_, cMap));
     }
     else
     {
         // calculate AMI interpolation
-        autoPtr<AMIMethod<SourcePatch, TargetPatch> > AMIPtr
+        autoPtr<AMIMethod<SourcePatch, TargetPatch>> AMIPtr
         (
             AMIMethod<SourcePatch, TargetPatch>::New
             (
@@ -1119,7 +1119,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::append
 )
 {
     // Create a new interpolation
-    autoPtr<AMIInterpolation<SourcePatch, TargetPatch> > newPtr
+    autoPtr<AMIInterpolation<SourcePatch, TargetPatch>> newPtr
     (
         new AMIInterpolation<SourcePatch, TargetPatch>
         (
@@ -1494,7 +1494,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 
 template<class SourcePatch, class TargetPatch>
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 (
     const Field<Type>& fld,
@@ -1502,12 +1502,12 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
     const UList<Type>& defaultValues
 ) const
 {
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
         new Field<Type>
         (
             srcAddress_.size(),
-            pTraits<Type>::zero
+            Zero
         )
     );
 
@@ -1515,7 +1515,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
     (
         fld,
         multiplyWeightedOp<Type, CombineOp>(cop),
-        tresult(),
+        tresult.ref(),
         defaultValues
     );
 
@@ -1525,10 +1525,10 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 
 template<class SourcePatch, class TargetPatch>
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 (
-    const tmp<Field<Type> >& tFld,
+    const tmp<Field<Type>>& tFld,
     const CombineOp& cop,
     const UList<Type>& defaultValues
 ) const
@@ -1539,7 +1539,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 
 template<class SourcePatch, class TargetPatch>
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 (
     const Field<Type>& fld,
@@ -1547,12 +1547,12 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
     const UList<Type>& defaultValues
 ) const
 {
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
         new Field<Type>
         (
             tgtAddress_.size(),
-            pTraits<Type>::zero
+            Zero
         )
     );
 
@@ -1560,7 +1560,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
     (
         fld,
         multiplyWeightedOp<Type, CombineOp>(cop),
-        tresult(),
+        tresult.ref(),
         defaultValues
     );
 
@@ -1570,10 +1570,10 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 
 template<class SourcePatch, class TargetPatch>
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 (
-    const tmp<Field<Type> >& tFld,
+    const tmp<Field<Type>>& tFld,
     const CombineOp& cop,
     const UList<Type>& defaultValues
 ) const
@@ -1584,7 +1584,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 
 template<class SourcePatch, class TargetPatch>
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 (
     const Field<Type>& fld,
@@ -1597,10 +1597,10 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 
 template<class SourcePatch, class TargetPatch>
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 (
-    const tmp<Field<Type> >& tFld,
+    const tmp<Field<Type>>& tFld,
     const UList<Type>& defaultValues
 ) const
 {
@@ -1610,7 +1610,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
 
 template<class SourcePatch, class TargetPatch>
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 (
     const Field<Type>& fld,
@@ -1623,10 +1623,10 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 
 template<class SourcePatch, class TargetPatch>
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
 (
-    const tmp<Field<Type> >& tFld,
+    const tmp<Field<Type>>& tFld,
     const UList<Type>& defaultValues
 ) const
 {
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
index 67205b69a781a458250a53c81d6833eaddc6e8ba..7760dcea556d9d17b46d74163a84d9ec2214ff89 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -458,7 +458,7 @@ public:
 
             //- Interpolate from target to source with supplied op
             template<class Type, class CombineOp>
-            tmp<Field<Type> > interpolateToSource
+            tmp<Field<Type>> interpolateToSource
             (
                 const Field<Type>& fld,
                 const CombineOp& cop,
@@ -467,16 +467,16 @@ public:
 
             //- Interpolate from target tmp field to source with supplied op
             template<class Type, class CombineOp>
-            tmp<Field<Type> > interpolateToSource
+            tmp<Field<Type>> interpolateToSource
             (
-                const tmp<Field<Type> >& tFld,
+                const tmp<Field<Type>>& tFld,
                 const CombineOp& cop,
                 const UList<Type>& defaultValues = UList<Type>::null()
             ) const;
 
             //- Interpolate from source to target with supplied op
             template<class Type, class CombineOp>
-            tmp<Field<Type> > interpolateToTarget
+            tmp<Field<Type>> interpolateToTarget
             (
                 const Field<Type>& fld,
                 const CombineOp& cop,
@@ -485,16 +485,16 @@ public:
 
             //- Interpolate from source tmp field to target with supplied op
             template<class Type, class CombineOp>
-            tmp<Field<Type> > interpolateToTarget
+            tmp<Field<Type>> interpolateToTarget
             (
-                const tmp<Field<Type> >& tFld,
+                const tmp<Field<Type>>& tFld,
                 const CombineOp& cop,
                 const UList<Type>& defaultValues = UList<Type>::null()
             ) const;
 
             //- Interpolate from target to source
             template<class Type>
-            tmp<Field<Type> > interpolateToSource
+            tmp<Field<Type>> interpolateToSource
             (
                 const Field<Type>& fld,
                 const UList<Type>& defaultValues = UList<Type>::null()
@@ -502,15 +502,15 @@ public:
 
             //- Interpolate from target tmp field
             template<class Type>
-            tmp<Field<Type> > interpolateToSource
+            tmp<Field<Type>> interpolateToSource
             (
-                const tmp<Field<Type> >& tFld,
+                const tmp<Field<Type>>& tFld,
                 const UList<Type>& defaultValues = UList<Type>::null()
             ) const;
 
             //- Interpolate from source to target
             template<class Type>
-            tmp<Field<Type> > interpolateToTarget
+            tmp<Field<Type>> interpolateToTarget
             (
                 const Field<Type>& fld,
                 const UList<Type>& defaultValues = UList<Type>::null()
@@ -518,9 +518,9 @@ public:
 
             //- Interpolate from source tmp field
             template<class Type>
-            tmp<Field<Type> > interpolateToTarget
+            tmp<Field<Type>> interpolateToTarget
             (
-                const tmp<Field<Type> >& tFld,
+                const tmp<Field<Type>>& tFld,
                 const UList<Type>& defaultValues = UList<Type>::null()
             ) const;
 
@@ -573,8 +573,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AMIInterpolation.C"
-#   include "AMIInterpolationParallelOps.C"
+    #include "AMIInterpolation.C"
+    #include "AMIInterpolationParallelOps.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C
index f9d323e0d807da54383b7167340c59f738cf7d7c..ae9673d1cb32d64699fdc612717ea9e2873ce73b 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,7 +61,7 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution
             procI = -1;
             if (debug)
             {
-                Info<< "AMIInterpolation::calcDistribution: "
+                InfoInFunction
                     << "AMI split across multiple processors" << endl;
             }
         }
@@ -70,7 +70,7 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution
             procI = findIndex(facesPresentOnProc, 1);
             if (debug)
             {
-                Info<< "AMIInterpolation::calcDistribution: "
+                InfoInFunction
                     << "AMI local to processor" << procI << endl;
             }
         }
@@ -248,7 +248,7 @@ distributeAndMergePatches
     // My own data first
     {
         const labelList& faceIDs = allTgtFaceIDs[Pstream::myProcNo()];
-        SubList<label>(tgtFaceIDs, faceIDs.size()).assign(faceIDs);
+        SubList<label>(tgtFaceIDs, faceIDs.size()) = faceIDs;
 
         const faceList& fcs = allFaces[Pstream::myProcNo()];
         forAll(fcs, i)
@@ -276,7 +276,7 @@ distributeAndMergePatches
         if (procI != Pstream::myProcNo())
         {
             const labelList& faceIDs = allTgtFaceIDs[procI];
-            SubList<label>(tgtFaceIDs, faceIDs.size(), nFaces).assign(faceIDs);
+            SubList<label>(tgtFaceIDs, faceIDs.size(), nFaces) = faceIDs;
 
             const faceList& fcs = allFaces[procI];
             forAll(fcs, i)
@@ -374,7 +374,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap
 
     {
         // Per processor indices into all segments to send
-        List<DynamicList<label> > dynSendMap(Pstream::nProcs());
+        List<DynamicList<label>> dynSendMap(Pstream::nProcs());
 
         // Work array - whether processor bb overlaps the face bounds
         boolList procBbOverlaps(Pstream::nProcs());
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H
index 2e9417782d50683b009505f7260d6d6388c7daec..706d19b0b5bf629e411e0a6f64089964fed34fe2 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ protected:
         labelList srcNonOverlap_;
 
         //- Octree used to find face seeds
-        autoPtr<indexedOctree<treeType> > treePtr_;
+        autoPtr<indexedOctree<treeType>> treePtr_;
 
         //- Face triangulation mode
         const faceAreaIntersect::triangulationMode triMode_;
@@ -247,24 +247,24 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeAMIMethod(AMIType)                                                \
-                                                                              \
-    typedef AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType>      \
-        AMIMethod##AMIType;                                                   \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(AMIMethod##AMIType, 0);               \
+#define makeAMIMethod(AMIType)                                                 \
+                                                                               \
+    typedef AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType>       \
+        AMIMethod##AMIType;                                                    \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(AMIMethod##AMIType, 0);                \
     defineTemplateRunTimeSelectionTable(AMIMethod##AMIType, components);
 
 
-#define makeAMIMethodType(AMIType, Method)                                    \
-                                                                              \
-    typedef Method<AMIType::sourcePatchType,AMIType::targetPatchType>         \
-        Method##AMIType;                                                      \
-                                                                              \
-    defineNamedTemplateTypeNameAndDebug(Method##AMIType, 0);                  \
-                                                                              \
-    AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType>::            \
-        addcomponentsConstructorToTable<Method##AMIType>                      \
+#define makeAMIMethodType(AMIType, Method)                                     \
+                                                                               \
+    typedef Method<AMIType::sourcePatchType,AMIType::targetPatchType>          \
+        Method##AMIType;                                                       \
+                                                                               \
+    defineNamedTemplateTypeNameAndDebug(Method##AMIType, 0);                   \
+                                                                               \
+    AMIMethod<AMIType::sourcePatchType,AMIType::targetPatchType>::             \
+        addcomponentsConstructorToTable<Method##AMIType>                       \
         add##Method##AMIType##ConstructorToTable_;
 
 
@@ -275,8 +275,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AMIMethod.C"
-#   include "AMIMethodNew.C"
+    #include "AMIMethod.C"
+    #include "AMIMethodNew.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C
index 3d1463305c8fab26a26b7ae31f2ba71a1a0811cf..a16a91fa6bd669add27049e2823b55fdea47f82c 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class SourcePatch, class TargetPatch>
-Foam::autoPtr<Foam::AMIMethod<SourcePatch, TargetPatch> >
+Foam::autoPtr<Foam::AMIMethod<SourcePatch, TargetPatch>>
 Foam::AMIMethod<SourcePatch, TargetPatch>::New
 (
     const word& methodName,
@@ -56,7 +56,7 @@ Foam::AMIMethod<SourcePatch, TargetPatch>::New
             << componentsConstructorTablePtr_->sortedToc() << exit(FatalError);
     }
 
-    return autoPtr<AMIMethod<SourcePatch, TargetPatch> >
+    return autoPtr<AMIMethod<SourcePatch, TargetPatch>>
     (
         cstrIter()
         (
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C
index a0a14f82584c51ceb8bfdb45fbc9cbd4fbb75d26..3884848bad07edd5661975d4fcdc7bf98e62ac17 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -250,8 +250,8 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate
 
 
     // temporary storage for addressing and weights
-    List<DynamicList<label> > srcAddr(this->srcPatch_.size());
-    List<DynamicList<label> > tgtAddr(this->tgtPatch_.size());
+    List<DynamicList<label>> srcAddr(this->srcPatch_.size());
+    List<DynamicList<label>> tgtAddr(this->tgtPatch_.size());
 
 
     // construct weights and addressing
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H
index d74094d0b5a4fff08eb5a35e2a0d50dbf21cc9a5..19abca727abd7a7e85c78e8ae239885cf9434a77 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -145,7 +145,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "directAMI.C"
+    #include "directAMI.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C
index da5c84ac97bc9546b7b5b582ec2b37768c6ca137..976430e9300d3a87e9abb8a2cb866093734c08c6 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,10 +30,10 @@ License
 template<class SourcePatch, class TargetPatch>
 void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing
 (
-    List<DynamicList<label> >& srcAddr,
-    List<DynamicList<scalar> >& srcWght,
-    List<DynamicList<label> >& tgtAddr,
-    List<DynamicList<scalar> >& tgtWght,
+    List<DynamicList<label>>& srcAddr,
+    List<DynamicList<scalar>>& srcWght,
+    List<DynamicList<label>>& tgtAddr,
+    List<DynamicList<scalar>>& tgtWght,
     label srcFaceI,
     label tgtFaceI
 )
@@ -117,10 +117,10 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace
     DynamicList<label>& visitedFaces,
 
     // temporary storage for addressing and weights
-    List<DynamicList<label> >& srcAddr,
-    List<DynamicList<scalar> >& srcWght,
-    List<DynamicList<label> >& tgtAddr,
-    List<DynamicList<scalar> >& tgtWght
+    List<DynamicList<label>>& srcAddr,
+    List<DynamicList<scalar>>& srcWght,
+    List<DynamicList<label>>& tgtAddr,
+    List<DynamicList<scalar>>& tgtWght
 )
 {
     if (tgtStartFaceI == -1)
@@ -358,10 +358,10 @@ template<class SourcePatch, class TargetPatch>
 void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::
 restartUncoveredSourceFace
 (
-    List<DynamicList<label> >& srcAddr,
-    List<DynamicList<scalar> >& srcWght,
-    List<DynamicList<label> >& tgtAddr,
-    List<DynamicList<scalar> >& tgtWght
+    List<DynamicList<label>>& srcAddr,
+    List<DynamicList<scalar>>& srcWght,
+    List<DynamicList<label>>& tgtAddr,
+    List<DynamicList<scalar>>& tgtWght
 )
 {
     // Collect all src faces with a low weight
@@ -518,10 +518,10 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calculate
     }
 
     // temporary storage for addressing and weights
-    List<DynamicList<label> > srcAddr(this->srcPatch_.size());
-    List<DynamicList<scalar> > srcWght(srcAddr.size());
-    List<DynamicList<label> > tgtAddr(this->tgtPatch_.size());
-    List<DynamicList<scalar> > tgtWght(tgtAddr.size());
+    List<DynamicList<label>> srcAddr(this->srcPatch_.size());
+    List<DynamicList<scalar>> srcWght(srcAddr.size());
+    List<DynamicList<label>> tgtAddr(this->tgtPatch_.size());
+    List<DynamicList<scalar>> tgtWght(tgtAddr.size());
 
     calcAddressing
     (
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H
index 2d1b552018165f655b4d226dfa9cd061a46e7610..7162d602d95e003abbb4f65b2fd4f523c8ee74f7 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,10 +74,10 @@ protected:
             //- Calculate addressing and weights using temporary storage
             virtual void calcAddressing
             (
-                List<DynamicList<label> >& srcAddress,
-                List<DynamicList<scalar> >& srcWeights,
-                List<DynamicList<label> >& tgtAddress,
-                List<DynamicList<scalar> >& tgtWeights,
+                List<DynamicList<label>>& srcAddress,
+                List<DynamicList<scalar>>& srcWeights,
+                List<DynamicList<label>>& tgtAddress,
+                List<DynamicList<scalar>>& tgtWeights,
                 label srcFaceI,
                 label tgtFaceI
             );
@@ -89,19 +89,19 @@ protected:
                 const label tgtStartFaceI,
                 DynamicList<label>& nbrFaces,
                 DynamicList<label>& visitedFaces,
-                List<DynamicList<label> >& srcAddr,
-                List<DynamicList<scalar> >& srcWght,
-                List<DynamicList<label> >& tgtAddr,
-                List<DynamicList<scalar> >& tgtWght
+                List<DynamicList<label>>& srcAddr,
+                List<DynamicList<scalar>>& srcWght,
+                List<DynamicList<label>>& tgtAddr,
+                List<DynamicList<scalar>>& tgtWght
             );
 
             //- Attempt to re-evaluate source faces that have not been included
             virtual void restartUncoveredSourceFace
             (
-                List<DynamicList<label> >& srcAddr,
-                List<DynamicList<scalar> >& srcWght,
-                List<DynamicList<label> >& tgtAddr,
-                List<DynamicList<scalar> >& tgtWght
+                List<DynamicList<label>>& srcAddr,
+                List<DynamicList<scalar>>& srcWght,
+                List<DynamicList<label>>& tgtAddr,
+                List<DynamicList<scalar>>& tgtWght
             );
 
             //- Set the source and target seed faces
@@ -177,7 +177,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "faceAreaWeightAMI.C"
+    #include "faceAreaWeightAMI.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C
index 0efaf241f46fe7cef89ab3fbd8e8135d37266f4e..030434a7d32a6827583f6ecc5a2c5c19bf155d42 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ template<class SourcePatch, class TargetPatch>
 Foam::label Foam::mapNearestAMI<SourcePatch, TargetPatch>::findMappedSrcFace
 (
     const label tgtFaceI,
-    const List<DynamicList<label> >& tgtToSrc
+    const List<DynamicList<label>>& tgtToSrc
 ) const
 {
     DynamicList<label> testFaces(10);
@@ -230,8 +230,8 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
 
 
     // temporary storage for addressing and weights
-    List<DynamicList<label> > srcAddr(this->srcPatch_.size());
-    List<DynamicList<label> > tgtAddr(this->tgtPatch_.size());
+    List<DynamicList<label>> srcAddr(this->srcPatch_.size());
+    List<DynamicList<label>> tgtAddr(this->tgtPatch_.size());
 
 
     // construct weights and addressing
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H
index 86d8c615f2f019e785c579f4bd8ad8256c415321..8e8634705b74b20dd1929b2de7dac59f907784b9 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ private:
             label findMappedSrcFace
             (
                 const label tgtFaceI,
-                const List<DynamicList<label> >& tgtToSrc
+                const List<DynamicList<label>>& tgtToSrc
             ) const;
 
 
@@ -149,7 +149,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mapNearestAMI.C"
+    #include "mapNearestAMI.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C
index 4eddbe6328e8648ba9812e8d63290e7bc9d50c45..eed906230aeecd23f097071a3f5b6629b338a7f2 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,10 +125,10 @@ void Foam::partialFaceAreaWeightAMI<SourcePatch, TargetPatch>::calculate
     }
 
     // temporary storage for addressing and weights
-    List<DynamicList<label> > srcAddr(this->srcPatch_.size());
-    List<DynamicList<scalar> > srcWght(srcAddr.size());
-    List<DynamicList<label> > tgtAddr(this->tgtPatch_.size());
-    List<DynamicList<scalar> > tgtWght(tgtAddr.size());
+    List<DynamicList<label>> srcAddr(this->srcPatch_.size());
+    List<DynamicList<scalar>> srcWght(srcAddr.size());
+    List<DynamicList<label>> tgtAddr(this->tgtPatch_.size());
+    List<DynamicList<scalar>> tgtWght(tgtAddr.size());
 
     faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing
     (
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H
index de8afcf0efebaca3df5b6f933ef2a30182c4c9ac..2e3855270ba0e54d0dab1ff8a3a0a8dd33427162 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -132,7 +132,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "partialFaceAreaWeightAMI.C"
+    #include "partialFaceAreaWeightAMI.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicACMIGAMGInterface/cyclicACMIGAMGInterface.C b/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicACMIGAMGInterface/cyclicACMIGAMGInterface.C
index d9e3a0fb77ea458d335683192945561b6de0ee82..50dad9b28b83234ec4974095ba1d098f1742693b 100644
--- a/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicACMIGAMGInterface/cyclicACMIGAMGInterface.C
+++ b/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicACMIGAMGInterface/cyclicACMIGAMGInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -184,7 +184,7 @@ Foam::cyclicACMIGAMGInterface::internalFieldTransfer
     const labelUList& nbrFaceCells = nbr.faceCells();
 
     tmp<labelField> tpnf(new labelField(nbrFaceCells.size()));
-    labelField& pnf = tpnf();
+    labelField& pnf = tpnf.ref();
 
     forAll(pnf, facei)
     {
diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicAMIGAMGInterface/cyclicAMIGAMGInterface.C b/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicAMIGAMGInterface/cyclicAMIGAMGInterface.C
index 151b021aba86b9d3ec74c188df743c767ad33e34..0270d4c645d2052aaba6a8642e2c3c6bba314120 100644
--- a/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicAMIGAMGInterface/cyclicAMIGAMGInterface.C
+++ b/src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicAMIGAMGInterface/cyclicAMIGAMGInterface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -183,7 +183,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicAMIGAMGInterface::internalFieldTransfer
     const labelUList& nbrFaceCells = nbr.faceCells();
 
     tmp<labelField> tpnf(new labelField(nbrFaceCells.size()));
-    labelField& pnf = tpnf();
+    labelField& pnf = tpnf.ref();
 
     forAll(pnf, facei)
     {
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C
index 038f403fff0c8467263a4061cc5d6672af36bd92..e3af8a1345b0a69a711cc2e7d1c413a299661ce8 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,13 +129,13 @@ void Foam::cyclicACMIPointPatchField<Type>::swapAddSeparated
 
         // Get neighbouring pointPatchField
         const GeometricField<Type, pointPatchField, pointMesh>& fld =
-            refCast<const GeometricField<Type, pointPatchField, pointMesh> >
+            refCast<const GeometricField<Type, pointPatchField, pointMesh>>
             (
                 this->dimensionedInternalField()
             );
 
         const cyclicACMIPointPatchField<Type>& nbr =
-            refCast<const cyclicACMIPointPatchField<Type> >
+            refCast<const cyclicACMIPointPatchField<Type>>
             (
                 fld.boundaryField()[nbrPatch.index()]
             );
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H
index 7d490280bf1f2eb849c981d362e4977a7a2e7e7b..78b70675da8a27256c29317c4132fa709ad72d92 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,10 +59,10 @@ class cyclicACMIPointPatchField
         const cyclicACMIPointPatch& cyclicACMIPatch_;
 
         //- Owner side patch interpolation pointer
-        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch> > ppiPtr_;
+        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch>> ppiPtr_;
 
         //- Neighbour side patch interpolation pointer
-        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch> >
+        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch>>
             nbrPpiPtr_;
 
 
@@ -136,9 +136,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicACMIPointPatchField<Type>
                 (
@@ -155,12 +155,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicACMIPointPatchField<Type>
                 (
@@ -231,7 +231,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "cyclicACMIPointPatchField.C"
+    #include "cyclicACMIPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.H
index b153034d876aac44cb4953172ecc6ed875dca36a..987adc4daecf0f782dcafff0d387062255dea7d3 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.H
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -280,7 +280,7 @@ public:
 
                 //- Interpolate field
                 template<class Type>
-                tmp<Field<Type> > interpolate
+                tmp<Field<Type>> interpolate
                 (
                     const Field<Type>& fldCouple,
                     const Field<Type>& fldNonOverlap
@@ -288,10 +288,10 @@ public:
 
                 //- Interpolate tmp field
                 template<class Type>
-                tmp<Field<Type> > interpolate
+                tmp<Field<Type>> interpolate
                 (
-                    const tmp<Field<Type> >& tFldCouple,
-                    const tmp<Field<Type> >& tFldNonOverlap
+                    const tmp<Field<Type>>& tFldCouple,
+                    const tmp<Field<Type>>& tFldNonOverlap
                 ) const;
 
                 //- Low-level interpolate List
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C
index ce712a4e7a3aeedbe4fcb92781fbe2f0a11bf1ac..7a55ceba1ef1c43778000fe531672f85cc3f0417 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::cyclicACMIPolyPatch::interpolate
 (
     const Field<Type>& fldCouple,
     const Field<Type>& fldNonOverlap
@@ -39,7 +39,7 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
     {
         const scalarField& w = AMI().srcWeightsSum();
 
-        tmp<Field<Type> > interpField(AMI().interpolateToSource(fldCouple));
+        tmp<Field<Type>> interpField(AMI().interpolateToSource(fldCouple));
 
         return interpField + (1.0 - w)*fldNonOverlap;
     }
@@ -47,7 +47,7 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
     {
         const scalarField& w = neighbPatch().AMI().tgtWeightsSum();
 
-        tmp<Field<Type> > interpField
+        tmp<Field<Type>> interpField
         (
             neighbPatch().AMI().interpolateToTarget(fldCouple)
         );
@@ -58,10 +58,10 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::cyclicACMIPolyPatch::interpolate
 (
-    const tmp<Field<Type> >& tFldCouple,
-    const tmp<Field<Type> >& tFldNonOverlap
+    const tmp<Field<Type>>& tFldCouple,
+    const tmp<Field<Type>>& tFldNonOverlap
 ) const
 {
     return interpolate(tFldCouple(), tFldNonOverlap());
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C
index 7bfdf7de807eeca52977ea46f1bc311c3173b9b0..58be0afc3c2f2f82090869597a3f4c6aa6f2830c 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,13 +129,13 @@ void Foam::cyclicAMIPointPatchField<Type>::swapAddSeparated
 
         // Get neighbouring pointPatchField
         const GeometricField<Type, pointPatchField, pointMesh>& fld =
-            refCast<const GeometricField<Type, pointPatchField, pointMesh> >
+            refCast<const GeometricField<Type, pointPatchField, pointMesh>>
             (
                 this->dimensionedInternalField()
             );
 
         const cyclicAMIPointPatchField<Type>& nbr =
-            refCast<const cyclicAMIPointPatchField<Type> >
+            refCast<const cyclicAMIPointPatchField<Type>>
             (
                 fld.boundaryField()[nbrPatch.index()]
             );
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H
index e9f9212eab03e25239789f77e789d80f34d6c58b..5a02c944799313650e6ca4f7ffa0ea7588e02e12 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,10 +59,10 @@ class cyclicAMIPointPatchField
         const cyclicAMIPointPatch& cyclicAMIPatch_;
 
         //- Owner side patch interpolation pointer
-        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch> > ppiPtr_;
+        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch>> ppiPtr_;
 
         //- Neighbour side patch interpolation pointer
-        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch> >
+        mutable autoPtr<PrimitivePatchInterpolation<primitivePatch>>
             nbrPpiPtr_;
 
 
@@ -136,9 +136,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<Type> > clone() const
+        virtual autoPtr<pointPatchField<Type>> clone() const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicAMIPointPatchField<Type>
                 (
@@ -155,12 +155,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<Type> > clone
+        virtual autoPtr<pointPatchField<Type>> clone
         (
             const DimensionedField<Type, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<Type> >
+            return autoPtr<pointPatchField<Type>>
             (
                 new cyclicAMIPointPatchField<Type>
                 (
@@ -231,7 +231,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#    include "cyclicAMIPointPatchField.C"
+    #include "cyclicAMIPointPatchField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
index 25d5507eb5dcbaf86b9b37ffe631231003680f12..71773ffc531946af6edb314eaab1d9f4a8ed577c 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -136,7 +136,7 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
     {
         case ROTATIONAL:
         {
-            tensor revT = tensor::zero;
+            tensor revT = Zero;
 
             if (rotationAngleDefined_)
             {
@@ -221,8 +221,8 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
             }
             else
             {
-                point n0 = vector::zero;
-                point n1 = vector::zero;
+                point n0 = Zero;
+                point n1 = Zero;
                 if (half0Ctrs.size())
                 {
                     n0 = findFaceNormalMaxRadius(half0Ctrs);
@@ -489,11 +489,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
     coupledPolyPatch(name, size, start, index, bm, patchType, transform),
     nbrPatchName_(word::null),
     nbrPatchID_(-1),
-    rotationAxis_(vector::zero),
-    rotationCentre_(point::zero),
+    rotationAxis_(Zero),
+    rotationCentre_(Zero),
     rotationAngleDefined_(false),
     rotationAngle_(0.0),
-    separationVector_(vector::zero),
+    separationVector_(Zero),
     AMIPtr_(NULL),
     AMIMethod_(AMIPatchToPatchInterpolation::imFaceAreaWeight),
     AMIReverse_(false),
@@ -520,11 +520,11 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
     nbrPatchName_(dict.lookupOrDefault<word>("neighbourPatch", "")),
     coupleGroup_(dict),
     nbrPatchID_(-1),
-    rotationAxis_(vector::zero),
-    rotationCentre_(point::zero),
+    rotationAxis_(Zero),
+    rotationCentre_(Zero),
     rotationAngleDefined_(false),
     rotationAngle_(0.0),
-    separationVector_(vector::zero),
+    separationVector_(Zero),
     AMIPtr_(NULL),
     AMIMethod_
     (
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H
index 1a415ba5fa0da747821406831d15fb0c0754556b..544a993d16d6923a7b7c882391b82ff90d7a5a1f 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -351,7 +351,7 @@ public:
 
                 //- Interpolate field
                 template<class Type>
-                tmp<Field<Type> > interpolate
+                tmp<Field<Type>> interpolate
                 (
                     const Field<Type>& fld,
                     const UList<Type>& defaultValues = UList<Type>()
@@ -359,9 +359,9 @@ public:
 
                 //- Interpolate tmp field
                 template<class Type>
-                tmp<Field<Type> > interpolate
+                tmp<Field<Type>> interpolate
                 (
-                    const tmp<Field<Type> >& tFld,
+                    const tmp<Field<Type>>& tFld,
                     const UList<Type>& defaultValues = UList<Type>()
                 ) const;
 
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatchTemplates.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatchTemplates.C
index 50f285a4448ba9ff614052b0b26cf030b7aab869..2ab9386445628834f4fd38bc64efcb69dcd2e82d 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatchTemplates.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatchTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cyclicAMIPolyPatch::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::cyclicAMIPolyPatch::interpolate
 (
     const Field<Type>& fld,
     const UList<Type>& defaultValues
@@ -44,9 +44,9 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicAMIPolyPatch::interpolate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cyclicAMIPolyPatch::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::cyclicAMIPolyPatch::interpolate
 (
-    const tmp<Field<Type> >& tFld,
+    const tmp<Field<Type>>& tFld,
     const UList<Type>& defaultValues
 ) const
 {
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
index 15a23a608c10182d6d99d2086ba58db2e2f5a476..fcbf9dd6ab0cd3ec299da377ed0bb9c0d1e4c972 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
@@ -284,7 +284,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
             ownStr.reset(new OBJstream(dir/name() + postfix));
             neiStr.reset(new OBJstream(dir/neighbPatch().name() + postfix));
 
-            Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
+            InfoInFunction
+                << "patch:" << name()
                 << " writing accumulated AMI to " << ownStr().name()
                 << " and " << neiStr().name() << endl;
         }
@@ -368,7 +369,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
 
         if (debug)
         {
-            Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
+            InfoInFunction
+                << "patch:" << name()
                 << " srcSum:" << srcSum
                 << " tgtSum:" << tgtSum
                 << " direction:" << direction
@@ -391,8 +393,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
 
                 if (debug)
                 {
-                    Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
-                        << name()
+                    InfoInFunction
+                        << "patch:" << name()
                         << " moving this side from:"
                         << gAverage(thisPatch.points())
                         << " to:" << gAverage(thisPoints) << endl;
@@ -402,8 +404,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
 
                 if (debug)
                 {
-                    Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
-                        << name()
+                    InfoInFunction
+                        << "patch:" << name()
                         << " appending weights with untransformed slave side"
                         << endl;
                 }
@@ -421,8 +423,8 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
 
                 if (debug)
                 {
-                    Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
-                        << name()
+                    InfoInFunction
+                        << "patch:" << name()
                         << " moving neighbour side from:"
                         << gAverage(nbrPatch.points())
                         << " to:" << gAverage(nbrPoints) << endl;
@@ -453,11 +455,12 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
 
             nTransforms_ += direction ? +1 : -1;
 
-            ++ iter;
+            ++iter;
 
             if (debug)
             {
-                Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
+                InfoInFunction
+                    << "patch:" << name()
                     << " iteration:" << iter
                     << " srcSum:" << srcSum
                     << " tgtSum:" << tgtSum
diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.H b/src/meshTools/algorithms/MeshWave/FaceCellWave.H
index 891cba864d25708f8c5d6c0bd24aa44924fba8c5..35cd0698a03a2a13f6f0716af132ac2b75866a42 100644
--- a/src/meshTools/algorithms/MeshWave/FaceCellWave.H
+++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -384,7 +384,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FaceCellWave.C"
+    #include "FaceCellWave.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/algorithms/MeshWave/MeshWave.H b/src/meshTools/algorithms/MeshWave/MeshWave.H
index 04fe52c5199558b44476395eb295fdcbf207f6a8..a45ba4b9884e1fc4ef5c02eb157d1dfc5123dd60 100644
--- a/src/meshTools/algorithms/MeshWave/MeshWave.H
+++ b/src/meshTools/algorithms/MeshWave/MeshWave.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,7 +167,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MeshWave.C"
+    #include "MeshWave.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H
index 7321c43ff44c0e1bb8790f7f665b348a7f0309d2..943e22519879e7ebbfee5345efae5e7907254786 100644
--- a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H
+++ b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -358,7 +358,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PatchEdgeFaceWave.C"
+    #include "PatchEdgeFaceWave.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/algorithms/PointEdgeWave/PointData.H b/src/meshTools/algorithms/PointEdgeWave/PointData.H
index f27ff0ea65d2041278cb1bfb9c7ea88a68e5bdba..bbfdb461a5f65909d232d5fd11a41e763cc6ae68 100644
--- a/src/meshTools/algorithms/PointEdgeWave/PointData.H
+++ b/src/meshTools/algorithms/PointEdgeWave/PointData.H
@@ -181,13 +181,13 @@ public:
 //- Data associated with PointData types is contiguous
 
 template<>
-inline bool contiguous<PointData<scalar> >()
+inline bool contiguous<PointData<scalar>>()
 {
     return true;
 }
 
 template<>
-inline bool contiguous<PointData<vector> >()
+inline bool contiguous<PointData<vector>>()
 {
     return true;
 }
diff --git a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H
index 1e951590b8ffb1c329bce9d9535a14bc3ec967cd..1d2d07f9a0c371734388f896e2b14255649ada7c 100644
--- a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H
+++ b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -357,7 +357,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "PointEdgeWave.C"
+    #include "PointEdgeWave.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellDist/cellDistFuncs.H b/src/meshTools/cellDist/cellDistFuncs.H
index 11c29d5650c21239139fcb82b1429bd3163e9220..f5aedbe22ca6bef6d9dcd99a6ddb908d27cf81b9 100644
--- a/src/meshTools/cellDist/cellDistFuncs.H
+++ b/src/meshTools/cellDist/cellDistFuncs.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -162,7 +162,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cellDistFuncsTemplates.C"
+    #include "cellDistFuncsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C
index 2231458e7826c48a328544198131ab218fbf9aa0..3acd17dc4391af24477a58299d918cb9ebb2b256 100644
--- a/src/meshTools/cellDist/patchWave/patchDataWave.C
+++ b/src/meshTools/cellDist/patchWave/patchDataWave.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -172,7 +172,7 @@ Foam::patchDataWave<TransferType>::patchDataWave
 (
     const polyMesh& mesh,
     const labelHashSet& patchIDs,
-    const UPtrList<Field<Type> >& initialPatchValuePtrs,
+    const UPtrList<Field<Type>>& initialPatchValuePtrs,
     const bool correctWalls
 )
 :
diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.H b/src/meshTools/cellDist/patchWave/patchDataWave.H
index a08740222b353b10ab14baa39f7e68dc5dad23e6..a155d1ec34dd71bf8c4fb30f5579ddd1f51d231e 100644
--- a/src/meshTools/cellDist/patchWave/patchDataWave.H
+++ b/src/meshTools/cellDist/patchWave/patchDataWave.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ private:
         labelHashSet patchIDs_;
 
         //- Reference to initial extra data at patch faces
-        const UPtrList<Field<Type> >& initialPatchValuePtrs_;
+        const UPtrList<Field<Type>>& initialPatchValuePtrs_;
 
         //- Do accurate distance calculation for near-wall cells.
         bool correctWalls_;
@@ -128,7 +128,7 @@ public:
         (
             const polyMesh& mesh,
             const labelHashSet& patchIDs,
-            const UPtrList<Field<Type> >& initialPatchValuePtrs,
+            const UPtrList<Field<Type>>& initialPatchValuePtrs,
             bool correctWalls = true
         );
 
@@ -198,7 +198,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "patchDataWave.C"
+    #include "patchDataWave.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellDist/wallPoint/wallPointData.H b/src/meshTools/cellDist/wallPoint/wallPointData.H
index c1463de25416717d7af2cd1f9e807fc988046232..96c4e3b97e6311a8c374c2a4d7b699dc9751d294 100644
--- a/src/meshTools/cellDist/wallPoint/wallPointData.H
+++ b/src/meshTools/cellDist/wallPoint/wallPointData.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -164,37 +164,37 @@ public:
 //  ones.
 
 template<>
-inline bool contiguous<wallPointData<bool> >()
+inline bool contiguous<wallPointData<bool>>()
 {
     return contiguous<wallPoint>();
 }
 template<>
-inline bool contiguous<wallPointData<label> >()
+inline bool contiguous<wallPointData<label>>()
 {
     return contiguous<wallPoint>();
 }
 template<>
-inline bool contiguous<wallPointData<scalar> >()
+inline bool contiguous<wallPointData<scalar>>()
 {
     return contiguous<wallPoint>();
 }
 template<>
-inline bool contiguous<wallPointData<vector> >()
+inline bool contiguous<wallPointData<vector>>()
 {
     return contiguous<wallPoint>();
 }
 template<>
-inline bool contiguous<wallPointData<sphericalTensor> >()
+inline bool contiguous<wallPointData<sphericalTensor>>()
 {
     return contiguous<wallPoint>();
 }
 template<>
-inline bool contiguous<wallPointData<symmTensor> >()
+inline bool contiguous<wallPointData<symmTensor>>()
 {
     return contiguous<wallPoint>();
 }
 template<>
-inline bool contiguous<wallPointData<tensor> >()
+inline bool contiguous<wallPointData<tensor>>()
 {
     return contiguous<wallPoint>();
 }
@@ -208,7 +208,7 @@ inline bool contiguous<wallPointData<tensor> >()
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "wallPointData.C"
+    #include "wallPointData.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/cellFeatures/cellFeatures.H b/src/meshTools/cellFeatures/cellFeatures.H
index b5d79ac52c70aab70dc5713ecabfa3ddaf0791f2..fb8a523c4d9353736c11c1974613927206b7461f 100644
--- a/src/meshTools/cellFeatures/cellFeatures.H
+++ b/src/meshTools/cellFeatures/cellFeatures.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ class cellFeatures
         mutable faceList* facesPtr_;
 
         //- New to old face mapping
-        mutable List<DynamicList<label> > faceMap_;
+        mutable List<DynamicList<label>> faceMap_;
 
 
     // Private Member Functions
@@ -147,7 +147,7 @@ public:
             }
 
             //- New to old faceMap. Guaranteed to be shrunk.
-            const List<DynamicList<label> >& faceMap() const
+            const List<DynamicList<label>>& faceMap() const
             {
                 if (!facesPtr_)
                 {
diff --git a/src/meshTools/cellQuality/cellQuality.C b/src/meshTools/cellQuality/cellQuality.C
index 95fe7e53399487da905660c1782dbf91793d75d9..c1165ee375b147b981c720da5821a7ff2b258020 100644
--- a/src/meshTools/cellQuality/cellQuality.C
+++ b/src/meshTools/cellQuality/cellQuality.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
         )
     );
 
-    scalarField& result = tresult();
+    scalarField& result = tresult.ref();
 
     scalarField sumArea(mesh_.nCells(), 0.0);
 
@@ -108,7 +108,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
             mesh_.nCells(), 0.0
         )
     );
-    scalarField& result = tresult();
+    scalarField& result = tresult.ref();
 
     scalarField sumArea(mesh_.nCells(), 0.0);
 
@@ -187,7 +187,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
             mesh_.nFaces(), 0.0
         )
     );
-    scalarField& result = tresult();
+    scalarField& result = tresult.ref();
 
 
     const vectorField& centres = mesh_.cellCentres();
@@ -247,7 +247,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
             mesh_.nFaces(), 0.0
         )
     );
-    scalarField& result = tresult();
+    scalarField& result = tresult.ref();
 
 
     const vectorField& cellCtrs = mesh_.cellCentres();
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C
index 7907c17b8ba1bf6f5767e78494782cbd6c0b7ede..990a1a0b4a850752e3d8422d117cfea55b7a1dbc 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C
+++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ transformVector
 ) const
 {
     tmp<symmTensorField> tfld(new symmTensorField(st.size()));
-    symmTensorField& fld = tfld();
+    symmTensorField& fld = tfld.ref();
 
     forAll(fld, i)
     {
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H
index d1694c3d20bab3911da39d82df9af1819a833f8b..6560a084a0cde32a953567deb2d917cdddb5b886 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H
+++ b/src/meshTools/coordinateSystems/coordinateRotation/EulerCoordinateRotation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,14 +37,17 @@ Description
     - the rotation angles are in degrees, unless otherwise explictly specified:
 
     \verbatim
-        coordinateRotation
-        {
-            type        EulerRotation
-            degrees     false;
-            rotation    (0 0 3.141592654);
-        }
+    coordinateRotation
+    {
+        type        EulerRotation;
+        degrees     false;
+        rotation    (0 0 3.141592654);
+    }
     \endverbatim
 
+SourceFiles
+    EulerCoordinateRotation.C
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef EulerCoordinateRotation_H
@@ -163,22 +166,22 @@ public:
             return Rtr_;
         };
 
-        //- Return local Cartesian x-axis
+        //- Return local Cartesian x-axis in global coordinates
         virtual const vector e1() const
         {
-            return R_.x();
+            return Rtr_.x();
         }
 
-        //- Return local Cartesian y-axis
+        //- Return local Cartesian y-axis in global coordinates
         virtual const vector e2() const
         {
-            return R_.y();
+            return Rtr_.y();
         }
 
-        //- Return local Cartesian z-axis
+        //- Return local Cartesian z-axis in global coordinates
         virtual const vector e3() const
         {
-            return R_.z();
+            return Rtr_.z();
         }
 
         //- Return transformation tensor field
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C
index 06265a721ba0e300850878b38d5d2affb7018766..273e0ce6bd02b49974894d3a0548d5e1cc0c6b31 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C
+++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,7 +129,7 @@ transformVector
 ) const
 {
     tmp<symmTensorField> tfld(new symmTensorField(st.size()));
-    symmTensorField& fld = tfld();
+    symmTensorField& fld = tfld.ref();
 
     forAll(fld, i)
     {
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H
index b124f3d4c3541625d88a9ad53ca0c74310d30890..6ab6044967fb600445e94e8256a8b9bf30aefaf7 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H
+++ b/src/meshTools/coordinateSystems/coordinateRotation/STARCDCoordinateRotation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,14 +34,17 @@ Description
     - the rotation angles are in degrees, unless otherwise explictly specified:
 
     \verbatim
-        coordinateRotation
-        {
-            type        STARCDRotation;
-            degrees     false;
-            rotation    (0 0 3.141592654);
-        }
+    coordinateRotation
+    {
+        type        STARCDRotation;
+        degrees     false;
+        rotation    (0 0 3.141592654);
+    }
     \endverbatim
 
+SourceFiles
+    STARCDCoordinateRotation.C
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef STARCDCoordinateRotation_H
@@ -160,22 +163,22 @@ public:
             return Rtr_;
         };
 
-        //- Return local Cartesian x-axis
+        //- Return local Cartesian x-axis in global coordinates
         virtual const vector e1() const
         {
-            return R_.x();
+            return Rtr_.x();
         }
 
-        //- Return local Cartesian y-axis
+        //- Return local Cartesian y-axis in global coordinates
         virtual const vector e2() const
         {
-            return R_.y();
+            return Rtr_.y();
         }
 
-        //- Return local Cartesian z-axis
+        //- Return local Cartesian z-axis in global coordinates
         virtual const vector e3() const
         {
-            return R_.z();
+            return Rtr_.z();
         }
 
         //- Return transformation tensor field
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C
index 70bb54e640e83b7e7d0b33950dec9bb0dc0f4b74..588c01bf03dcea1e28aa8a4db8c65bd2e661d8a7 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C
+++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,7 +90,7 @@ void Foam::axesRotation::calcTransform
                 << "Unhandled axes specifictation" << endl
                 << abort(FatalError);
 
-            Rtr = tensor::zero;
+            Rtr = Zero;
             break;
         }
     }
@@ -240,7 +240,7 @@ Foam::tmp<Foam::symmTensorField> Foam::axesRotation::transformVector
 ) const
 {
     tmp<symmTensorField> tfld(new symmTensorField(st.size()));
-    symmTensorField& fld = tfld();
+    symmTensorField& fld = tfld.ref();
 
     forAll(fld, i)
     {
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H
index f0be4d09b7ce75fc8b98971dc722ea3e8116ace2..77f39d60e53381452315636918c9eecb0b5ab603 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H
+++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,17 +28,21 @@ Description
     A coordinate rotation specified using global axis
 
     The rotation is defined by a combination of vectors (e1/e2), (e2/e3)
-    or (e3/e1). Any nonorthogonality will be absorbed into the second vector.
+    or (e3/e1). Any nonorthogonality will be absorbed into the second
+    vector.
 
     \verbatim
-        axesRotation
-        {
-            type        axesRotation;
-            e1          (1 0 0);
-            e2          (0 1 0);
-        }
+    axesRotation
+    {
+        type        axesRotation;
+        e1          (1 0 0);
+        e2          (0 1 0);
+    }
     \endverbatim
 
+SourceFiles
+    axesRotation.C
+
 \*---------------------------------------------------------------------------*/
 
 #ifndef axesRotation_H
@@ -153,22 +157,22 @@ public:
             return Rtr_;
         }
 
-        //- Return local Cartesian x-axis
+        //- Return local Cartesian x-axis in global coordinates
         virtual const vector e1() const
         {
-            return R_.x();
+            return Rtr_.x();
         }
 
-        //- Return local Cartesian y-axis
+        //- Return local Cartesian y-axis in global coordinates
         virtual const vector e2() const
         {
-            return R_.y();
+            return Rtr_.y();
         }
 
-        //- Return local Cartesian z-axis
+        //- Return local Cartesian z-axis in global coordinates
         virtual const vector e3() const
         {
-            return R_.z();
+            return Rtr_.z();
         }
 
         //- Return transformation tensor field
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H
index a10485a5c2fa18f6abab48db0979a76ba12a4698..e1debf2981a92dbee8fa3ce8f39d9d112724a98d 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H
+++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,21 +28,24 @@ Description
     Abstract base class for coordinate rotation
 
     \verbatim
-        coordinateRotation
-        {
-            type        axesRotation
-            e1          (1 0 0);
-            e2          (0 1 0);
-        }
+    coordinateRotation
+    {
+        type        axesRotation
+        e1          (1 0 0);
+        e2          (0 1 0);
+    }
     \endverbatim
 
     Types of coordinateRotation:
-    1) axesRotation
-    2) STARCDRotation
-    3) cylindrical
-    4) EulerCoordinateRotation
 
+    \li 1. axesRotation
+    \li 2. STARCDRotation
+    \li 3. cylindrical
+    \li 4. EulerCoordinateRotation
 
+SourceFiles
+    coordinateRotation.C
+    coordinateRotationNew.C
 
 \*---------------------------------------------------------------------------*/
 
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C
index 5dffccac01532f5c58cf1b3275a65d4fca0815de..4bccbfed5f496b3141cdcb5f829c7def3a4fdf67 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C
+++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,8 +99,8 @@ Foam::cylindrical::cylindrical
 )
 :
     Rptr_(),
-    origin_(point::zero),
-    e3_(vector::zero)
+    origin_(Zero),
+    e3_(Zero)
 {
     // If origin is specified in the coordinateSystem
     if (dict.parent().found("origin"))
@@ -165,8 +165,8 @@ Foam::cylindrical::cylindrical(const dictionary& dict)
 Foam::cylindrical::cylindrical(const tensorField& R)
 :
     Rptr_(),
-    origin_(vector::zero),
-    e3_(vector::zero)
+    origin_(Zero),
+    e3_(Zero)
 {
     Rptr_() = R;
 }
@@ -231,7 +231,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindrical::transform
 Foam::vector Foam::cylindrical::transform(const vector& v) const
 {
     NotImplemented;
-    return vector::zero;
+    return Zero;
 }
 
 
@@ -257,7 +257,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindrical::invTransform
 Foam::vector Foam::cylindrical::invTransform(const vector& v) const
 {
     NotImplemented;
-    return vector::zero;
+    return Zero;
 }
 
 
@@ -293,7 +293,7 @@ Foam::tensor Foam::cylindrical::transformTensor
 {
     NotImplemented;
 
-    return tensor::zero;
+    return Zero;
 }
 
 
@@ -313,7 +313,7 @@ Foam::tmp<Foam::tensorField> Foam::cylindrical::transformTensor
     const tensorField& R = Rptr_();
     const tensorField Rtr(R.T());
     tmp<tensorField> tt(new tensorField(cellMap.size()));
-    tensorField& t = tt();
+    tensorField& t = tt.ref();
     forAll(cellMap, i)
     {
         const label cellI = cellMap[i];
@@ -337,7 +337,7 @@ Foam::tmp<Foam::symmTensorField> Foam::cylindrical::transformVector
     }
 
     tmp<symmTensorField> tfld(new symmTensorField(Rptr_->size()));
-    symmTensorField& fld = tfld();
+    symmTensorField& fld = tfld.ref();
 
     const tensorField& R = Rptr_();
     forAll(fld, i)
@@ -354,7 +354,7 @@ Foam::symmTensor Foam::cylindrical::transformVector
 ) const
 {
     NotImplemented;
-    return symmTensor::zero;
+    return Zero;
 }
 
 
diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H
index df0bc55b1a3378ef0b67c398ef9b598d9dd70070..c36abde37c04c76d1c7305dbfdf99a9833253378 100644
--- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H
+++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,20 +28,22 @@ Description
     A local coordinate rotation.
     The cell based rotational field can be created in two ways:
 
-    1)  Each rotational tensor is defined with two vectors (dir and e3)
-        where dir =  cellC - origin and e3 is the rotation axis.
+    \li 1. Each rotational tensor is defined with two vectors (\c dir and \c e3)
+        where <tt>dir =  cellC - origin</tt> and \c e3 is the rotation axis.
         Per each cell an axesRotation type of rotation is created
-        (cylindrical coordinates)
-
+        (cylindrical coordinates). For example:
         \verbatim
-            cylindrical
-            {
-                type        localAxes;
-                e3          (0 0 1);
-            }
+        cylindrical
+        {
+            type        localAxes;
+            e3          (0 0 1);
+        }
         \endverbatim
 
-    2) The rotational tensor field is provided at construction
+    \li 2. The rotational tensor field is provided at construction.
+
+SourceFiles
+    cylindrical.C
 
 \*---------------------------------------------------------------------------*/
 
@@ -157,21 +159,21 @@ public:
              return tensor::zero;
         }
 
-        //- Return local Cartesian x-axis
+        //- Return local Cartesian x-axis in global coordinates
         virtual const vector e1() const
         {
             NotImplemented;
             return vector::zero;
         }
 
-        //- Return local Cartesian y-axis
+        //- Return local Cartesian y-axis in global coordinates
         virtual const vector e2() const
         {
             NotImplemented;
             return vector::zero;
         }
 
-        //- Return local Cartesian z-axis
+        //- Return local Cartesian z-axis in global coordinates
         virtual const vector e3() const
         {
             return e3_;
diff --git a/src/meshTools/coordinateSystems/coordinateSystem.C b/src/meshTools/coordinateSystems/coordinateSystem.C
index 751fd36b7e807d000a5f2f88e4eeb6fc59180d34..e3150ff8f589195cdfab5b284db243ecfdc8215b 100644
--- a/src/meshTools/coordinateSystems/coordinateSystem.C
+++ b/src/meshTools/coordinateSystems/coordinateSystem.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ Foam::coordinateSystem::coordinateSystem()
 :
     name_(),
     note_(),
-    origin_(point::zero),
+    origin_(Zero),
     R_(new axesRotation(sphericalTensor::I))
 {}
 
@@ -98,7 +98,7 @@ Foam::coordinateSystem::coordinateSystem
 :
     name_(name),
     note_(),
-    origin_(point::zero),
+    origin_(Zero),
     R_()
 {
     init(dict);
@@ -109,7 +109,7 @@ Foam::coordinateSystem::coordinateSystem(const dictionary& dict)
 :
     name_(),
     note_(),
-    origin_(point::zero),
+    origin_(Zero),
     R_()
 {
     init(dict);
@@ -124,7 +124,7 @@ Foam::coordinateSystem::coordinateSystem
 :
     name_(),
     note_(),
-    origin_(point::zero),
+    origin_(Zero),
     R_()
 {
     const entry* entryPtr = dict.lookupEntryPtr(typeName_(), false, false);
@@ -139,9 +139,8 @@ Foam::coordinateSystem::coordinateSystem
 
         if (debug)
         {
-            Info<< "coordinateSystem::coordinateSystem"
-                "(const objectRegistry&, const dictionary&):"
-                << nl << "using global coordinate system: "
+            InfoInFunction
+                << "Using global coordinate system: "
                 << key << "=" << index << endl;
         }
 
@@ -169,7 +168,7 @@ Foam::coordinateSystem::coordinateSystem(Istream& is)
 :
     name_(is),
     note_(),
-    origin_(point::zero),
+    origin_(Zero),
     R_()
 {
     dictionary dict(is);
@@ -282,7 +281,7 @@ Foam::tmp<Foam::vectorField> Foam::coordinateSystem::globalToLocal
 void Foam::coordinateSystem::clear()
 {
     note_.clear();
-    origin_ = point::zero;
+    origin_ = Zero;
     R_->clear();
 }
 
diff --git a/src/meshTools/coordinateSystems/coordinateSystem.H b/src/meshTools/coordinateSystems/coordinateSystem.H
index 34579acf2740ddfa34a5ad5094efc2a817f27ce7..ab040f77dc4cf7f7bd162b949ddc8b5819b4d40a 100644
--- a/src/meshTools/coordinateSystems/coordinateSystem.H
+++ b/src/meshTools/coordinateSystems/coordinateSystem.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,30 +30,29 @@ Description
     All systems are defined by an origin point and a co-ordinate rotation.
 
     \verbatim
-        coordinateSystem
+    coordinateSystem
+    {
+        type    cartesian;
+        origin  (0 0 0);
+        coordinateRotation
         {
-            type    cartesian;
-            origin  (0 0 0);
-            coordinateRotation
-            {
-                type        cylindrical;
-                e3          (0 0 1);
-            }
+            type        cylindrical;
+            e3          (0 0 1);
         }
+    }
     \endverbatim
 
     Types of coordinateRotation:
-    1) axesRotation
-    2) STARCDRotation
-    3) cylindrical
-    4) EulerCoordinateRotation
+
+    \li 1. axesRotation
+    \li 2. STARCDRotation
+    \li 3. cylindrical
+    \li 4. EulerCoordinateRotation
 
     Type of co-ordinates:
-    1) cartesian
 
+    \li 1. cartesian
 
-See Also
-    coordinateSystem and coordinateSystem::New
 
 SourceFiles
     coordinateSystem.C
diff --git a/src/meshTools/coordinateSystems/coordinateSystems.C b/src/meshTools/coordinateSystems/coordinateSystems.C
index 34d1b83715535c78df724727df889af9da2f6088..f49a25835c1314ad25a8a5d2645af7e734c73193 100644
--- a/src/meshTools/coordinateSystems/coordinateSystems.C
+++ b/src/meshTools/coordinateSystems/coordinateSystems.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,7 +57,7 @@ Foam::coordinateSystems::coordinateSystems
 Foam::coordinateSystems::coordinateSystems
 (
     const IOobject& io,
-    const Xfer<PtrList<coordinateSystem> >& lst
+    const Xfer<PtrList<coordinateSystem>>& lst
 )
 :
     IOPtrList<coordinateSystem>(io, lst)
diff --git a/src/meshTools/coordinateSystems/coordinateSystems.H b/src/meshTools/coordinateSystems/coordinateSystems.H
index a27629aa6c8cfd3c419259858c8383e85b0f98a4..d59b47bfc9326ce88c148c86b47c8ca84e54e6d1 100644
--- a/src/meshTools/coordinateSystems/coordinateSystems.H
+++ b/src/meshTools/coordinateSystems/coordinateSystems.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ public:
         coordinateSystems
         (
             const IOobject&,
-            const Xfer<PtrList<coordinateSystem> >&
+            const Xfer<PtrList<coordinateSystem>>&
         );
 
 
diff --git a/src/meshTools/coordinateSystems/cylindricalCS.C b/src/meshTools/coordinateSystems/cylindricalCS.C
index 18be4ab3a8a8e8816b28b4d70012e71fb4b286ab..fda455545ac1e325adb458d0e66e8c9a1c82b40b 100644
--- a/src/meshTools/coordinateSystems/cylindricalCS.C
+++ b/src/meshTools/coordinateSystems/cylindricalCS.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -208,7 +208,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::globalToLocal
     );
 
     tmp<vectorField> tresult(new vectorField(lc.size()));
-    vectorField& result = tresult();
+    vectorField& result = tresult.ref();
 
     result.replace
     (
diff --git a/src/meshTools/indexedOctree/treeDataEdge.C b/src/meshTools/indexedOctree/treeDataEdge.C
index dc84c4d7ea866df2b80977082eb22310c7453107..7649aef26c4bc7873bc1c287d4f0b6d272a7f607 100644
--- a/src/meshTools/indexedOctree/treeDataEdge.C
+++ b/src/meshTools/indexedOctree/treeDataEdge.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(treeDataEdge, 0);
+    defineTypeNameAndDebug(treeDataEdge, 0);
 }
 
 
@@ -128,8 +128,6 @@ Foam::pointField Foam::treeDataEdge::shapePoints() const
 }
 
 
-//- Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
-//  Only makes sense for closed surfaces.
 Foam::volumeType Foam::treeDataEdge::getVolumeType
 (
     const indexedOctree<treeDataEdge>& oc,
@@ -140,7 +138,6 @@ Foam::volumeType Foam::treeDataEdge::getVolumeType
 }
 
 
-// Check if any point on shape is inside cubeBb.
 bool Foam::treeDataEdge::overlaps
 (
     const label index,
@@ -158,7 +155,6 @@ bool Foam::treeDataEdge::overlaps
 }
 
 
-// Check if any point on shape is inside sphere.
 bool Foam::treeDataEdge::overlaps
 (
     const label index,
diff --git a/src/meshTools/indexedOctree/treeDataFace.C b/src/meshTools/indexedOctree/treeDataFace.C
index e80b56358631cf228cb27e90a3b84878fde76104..ff831965add55d9e58342e7648ee7e19b60f731c 100644
--- a/src/meshTools/indexedOctree/treeDataFace.C
+++ b/src/meshTools/indexedOctree/treeDataFace.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,9 +31,9 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(treeDataFace, 0);
+    defineTypeNameAndDebug(treeDataFace, 0);
 
-scalar treeDataFace::tolSqr = sqr(1e-6);
+    scalar treeDataFace::tolSqr = sqr(1e-6);
 }
 
 
@@ -178,8 +178,6 @@ Foam::pointField Foam::treeDataFace::shapePoints() const
 }
 
 
-//- Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
-//  Only makes sense for closed surfaces.
 Foam::volumeType Foam::treeDataFace::getVolumeType
 (
     const indexedOctree<treeDataFace>& oc,
@@ -267,7 +265,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
             // triangle normals)
             const labelList& pFaces = mesh_.pointFaces()[f[fp]];
 
-            vector pointNormal(vector::zero);
+            vector pointNormal(Zero);
 
             forAll(pFaces, i)
             {
@@ -336,7 +334,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
             // triangle normals)
             const labelList& eFaces = mesh_.edgeFaces()[myEdges[myEdgeI]];
 
-            vector edgeNormal(vector::zero);
+            vector edgeNormal(Zero);
 
             forAll(eFaces, i)
             {
diff --git a/src/meshTools/indexedOctree/treeDataPoint.C b/src/meshTools/indexedOctree/treeDataPoint.C
index 999ad1856d6bcc6ae48e511a0ced985a270ff8e6..e4c6beda2a597cd511696d0474efb81b6644eb2e 100644
--- a/src/meshTools/indexedOctree/treeDataPoint.C
+++ b/src/meshTools/indexedOctree/treeDataPoint.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,8 +88,6 @@ Foam::pointField Foam::treeDataPoint::shapePoints() const
 }
 
 
-//- Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
-//  Only makes sense for closed surfaces.
 Foam::volumeType Foam::treeDataPoint::getVolumeType
 (
     const indexedOctree<treeDataPoint>& oc,
@@ -100,7 +98,6 @@ Foam::volumeType Foam::treeDataPoint::getVolumeType
 }
 
 
-// Check if any point on shape is inside cubeBb.
 bool Foam::treeDataPoint::overlaps
 (
     const label index,
@@ -112,7 +109,6 @@ bool Foam::treeDataPoint::overlaps
 }
 
 
-// Check if any point on shape is inside sphere.
 bool Foam::treeDataPoint::overlaps
 (
     const label index,
diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
index 6185c9943f19545bb9c81b33b3666d3895117dde..e83191b16953e62bd2ac3602a34334a3e81d75ef 100644
--- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
+++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -88,7 +88,7 @@ Foam::treeDataPrimitivePatch<PatchType>::treeDataPrimitivePatch
 template<class PatchType>
 Foam::treeDataPrimitivePatch<PatchType>::findNearestOp::findNearestOp
 (
-    const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree
+    const indexedOctree<treeDataPrimitivePatch<PatchType>>& tree
 )
 :
     tree_(tree)
@@ -98,7 +98,7 @@ Foam::treeDataPrimitivePatch<PatchType>::findNearestOp::findNearestOp
 template<class PatchType>
 Foam::treeDataPrimitivePatch<PatchType>::findIntersectOp::findIntersectOp
 (
-    const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree
+    const indexedOctree<treeDataPrimitivePatch<PatchType>>& tree
 )
 :
     tree_(tree)
@@ -108,7 +108,7 @@ Foam::treeDataPrimitivePatch<PatchType>::findIntersectOp::findIntersectOp
 template<class PatchType>
 Foam::treeDataPrimitivePatch<PatchType>::findAllIntersectOp::findAllIntersectOp
 (
-    const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree,
+    const indexedOctree<treeDataPrimitivePatch<PatchType>>& tree,
     DynamicList<label>& shapeMask
 )
 :
@@ -121,7 +121,7 @@ template<class PatchType>
 Foam::treeDataPrimitivePatch<PatchType>::
 findSelfIntersectOp::findSelfIntersectOp
 (
-    const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree,
+    const indexedOctree<treeDataPrimitivePatch<PatchType>>& tree,
     const label edgeID
 )
 :
@@ -146,12 +146,10 @@ Foam::pointField Foam::treeDataPrimitivePatch<PatchType>::shapePoints() const
 }
 
 
-//- Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
-//  Only makes sense for closed surfaces.
 template<class PatchType>
 Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
 (
-    const indexedOctree<treeDataPrimitivePatch<PatchType> >& oc,
+    const indexedOctree<treeDataPrimitivePatch<PatchType>>& oc,
     const point& sample
 ) const
 {
@@ -290,7 +288,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
             // triangle normals)
             const labelList& eFaces = patch_.edgeFaces()[edgeI];
 
-            vector edgeNormal(vector::zero);
+            vector edgeNormal(Zero);
 
             forAll(eFaces, i)
             {
@@ -610,7 +608,7 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator()
 template<class PatchType>
 bool Foam::treeDataPrimitivePatch<PatchType>::findIntersection
 (
-    const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree,
+    const indexedOctree<treeDataPrimitivePatch<PatchType>>& tree,
     const label index,
     const point& start,
     const point& end,
diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.H b/src/meshTools/indexedOctree/treeDataPrimitivePatch.H
index 08d5705a60be88732faaab539b593f195589821b..b1dd87b5175bad199966a56498850e8254c56cf7 100644
--- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.H
+++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -232,7 +232,7 @@ public:
             //  Only makes sense for closed surfaces.
             volumeType getVolumeType
             (
-                const indexedOctree<treeDataPrimitivePatch<PatchType> >&,
+                const indexedOctree<treeDataPrimitivePatch<PatchType>>&,
                 const point&
             ) const;
 
@@ -254,7 +254,7 @@ public:
             //- Helper: find intersection of line with shapes
             static bool findIntersection
             (
-                const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree,
+                const indexedOctree<treeDataPrimitivePatch<PatchType>>& tree,
                 const label index,
                 const point& start,
                 const point& end,
@@ -270,7 +270,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "treeDataPrimitivePatch.C"
+    #include "treeDataPrimitivePatch.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/indexedOctree/treeDataTriSurface.C b/src/meshTools/indexedOctree/treeDataTriSurface.C
index c8c69d7f85da6adf63d83b3876213a19b9a03a76..f88465d65082c56eedcee78fcfb8fc1ed989402c 100644
--- a/src/meshTools/indexedOctree/treeDataTriSurface.C
+++ b/src/meshTools/indexedOctree/treeDataTriSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 template<>
 Foam::volumeType Foam::treeDataPrimitivePatch<Foam::triSurface>::getVolumeType
 (
-    const indexedOctree<treeDataPrimitivePatch<triSurface> >& oc,
+    const indexedOctree<treeDataPrimitivePatch<triSurface>>& oc,
     const point& sample
 ) const
 {
diff --git a/src/meshTools/indexedOctree/treeDataTriSurface.H b/src/meshTools/indexedOctree/treeDataTriSurface.H
index fbc3d00b129311f4d390daea58204ec605fe219e..6beb4fd28b06493ce17b812f26a357f94c9fe6f0 100644
--- a/src/meshTools/indexedOctree/treeDataTriSurface.H
+++ b/src/meshTools/indexedOctree/treeDataTriSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ namespace Foam
     template<>
     volumeType treeDataPrimitivePatch<triSurface>::getVolumeType
     (
-        const indexedOctree<treeDataPrimitivePatch<triSurface> >& oc,
+        const indexedOctree<treeDataPrimitivePatch<triSurface>>& oc,
         const point& sample
     ) const;
 }
diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
index dfefb55824162fed709845d8a2124651a5c177ab..a9df089e3551cd272494eb2840d8e0b1f26e176b 100644
--- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
+++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::facePoints
 
     // Initialise to face-centre
     tmp<pointField> tfacePoints(new pointField(patch_.size()));
-    pointField& facePoints = tfacePoints();
+    pointField& facePoints = tfacePoints.ref();
 
     forAll(pp, faceI)
     {
@@ -478,8 +478,9 @@ void Foam::mappedPatchBase::findSamples
 
     if (debug)
     {
-        Info<< "mappedPatchBase::findSamples on mesh " << sampleRegion()
-            << " : " << endl;
+        InfoInFunction
+            << "mesh " << sampleRegion() << " : " << endl;
+
         forAll(nearest, sampleI)
         {
             label procI = nearest[sampleI].second().second();
@@ -868,7 +869,7 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::readListOrField
 )
 {
     tmp<pointField> tfld(new pointField());
-    pointField& fld = tfld();
+    pointField& fld = tfld.ref();
 
     if (size)
     {
@@ -940,7 +941,7 @@ Foam::mappedPatchBase::mappedPatchBase
     samplePatch_(""),
     coupleGroup_(),
     offsetMode_(UNIFORM),
-    offset_(vector::zero),
+    offset_(Zero),
     offsets_(pp.size(), offset_),
     distance_(0),
     sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
@@ -967,7 +968,7 @@ Foam::mappedPatchBase::mappedPatchBase
     samplePatch_(samplePatch),
     coupleGroup_(),
     offsetMode_(NONUNIFORM),
-    offset_(vector::zero),
+    offset_(Zero),
     offsets_(offsets),
     distance_(0),
     sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
@@ -1021,7 +1022,7 @@ Foam::mappedPatchBase::mappedPatchBase
     samplePatch_(samplePatch),
     coupleGroup_(),
     offsetMode_(NORMAL),
-    offset_(vector::zero),
+    offset_(Zero),
     offsets_(0),
     distance_(distance),
     sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
@@ -1045,7 +1046,7 @@ Foam::mappedPatchBase::mappedPatchBase
     samplePatch_(dict.lookupOrDefault<word>("samplePatch", "")),
     coupleGroup_(dict),
     offsetMode_(UNIFORM),
-    offset_(vector::zero),
+    offset_(Zero),
     offsets_(0),
     distance_(0.0),
     sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
@@ -1127,7 +1128,7 @@ Foam::mappedPatchBase::mappedPatchBase
     samplePatch_(dict.lookupOrDefault<word>("samplePatch", "")),
     coupleGroup_(dict), //dict.lookupOrDefault<word>("coupleGroup", "")),
     offsetMode_(UNIFORM),
-    offset_(vector::zero),
+    offset_(Zero),
     offsets_(0),
     distance_(0.0),
     sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
@@ -1268,7 +1269,7 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::samplePoints
 ) const
 {
     tmp<pointField> tfld(new pointField(fc));
-    pointField& fld = tfld();
+    pointField& fld = tfld.ref();
 
     switch (offsetMode_)
     {
diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H
index 7a05f77836487aa36cdc295294caa7df64ec5373..a9419bb8f5c59900dc5f57998ce647e5e9d8cf98 100644
--- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H
+++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,6 +29,7 @@ Description
     centres and processors they're on.
 
     If constructed from dictionary:
+    \verbatim
         // Region to sample (default is region0)
         sampleRegion region0;
 
@@ -63,8 +64,9 @@ Description
         // According to offsetMode (see above) supply one of
         // offset, offsets or distance
         offset  (1 0 0);
+    \endverbatim
 
-    Note: if offsetMode is 'normal' it uses outwards pointing normals. So
+    Note: if offsetMode is \c normal it uses outwards pointing normals. So
     supply a negative distance if sampling inside the domain.
 
 
@@ -135,7 +137,7 @@ public:
     //  - point+local index
     //  - sqr(distance)
     //  - processor
-    typedef Tuple2<pointIndexHit, Tuple2<scalar, label> > nearInfo;
+    typedef Tuple2<pointIndexHit, Tuple2<scalar, label>> nearInfo;
 
     class nearestEqOp
     {
@@ -218,9 +220,10 @@ protected:
         // Derived information
 
             //- Communication schedule:
-            //  - Cells/faces to sample per processor
-            //  - Patch faces to receive per processor
-            //  - schedule
+            //
+            //    - Cells/faces to sample per processor
+            //    - Patch faces to receive per processor
+            //    - schedule
             mutable autoPtr<mapDistribute> mapPtr_;
 
 
diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C
index 344a42018662ccace0222b5df3c09acfcabd0ee6..4801476320e3cf88e78987e36153face9e99bd08 100644
--- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C
+++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,7 +73,7 @@ void Foam::mappedPatchBase::distribute
                 lst,
                 cop,
                 flipOp(),
-                pTraits<Type>::zero
+                Type(Zero)
             );
         }
     }
@@ -132,7 +132,7 @@ void Foam::mappedPatchBase::reverseDistribute
                 lst,
                 cop,
                 flipOp(),
-                pTraits<Type>::zero
+                Type(Zero)
             );
             break;
         }
diff --git a/src/meshTools/meshSearch/meshSearch.H b/src/meshTools/meshSearch/meshSearch.H
index 73c143460776daa9ce7c1f802f4d5654a06f9335..fa0be07f8e4a0f0e3b202910a34dca0093ef6c7b 100644
--- a/src/meshTools/meshSearch/meshSearch.H
+++ b/src/meshTools/meshSearch/meshSearch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,8 +69,8 @@ class meshSearch
         mutable autoPtr<treeBoundBox> overallBbPtr_;
 
         //- Demand driven octrees
-        mutable autoPtr<indexedOctree<treeDataFace> > boundaryTreePtr_;
-        mutable autoPtr<indexedOctree<treeDataCell> > cellTreePtr_;
+        mutable autoPtr<indexedOctree<treeDataFace>> boundaryTreePtr_;
+        mutable autoPtr<indexedOctree<treeDataCell>> cellTreePtr_;
 
 
     // Private Member Functions
diff --git a/src/meshTools/meshTools/meshTools.C b/src/meshTools/meshTools/meshTools.C
index a1a2b6f4f161a57ad5b70c1a9303b68088ba7581..dbef5384e8b67281705180426a52b50547f3052e 100644
--- a/src/meshTools/meshTools/meshTools.C
+++ b/src/meshTools/meshTools/meshTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -171,7 +171,7 @@ Foam::vectorField Foam::meshTools::calcBoxPointNormals(const primitivePatch& pp)
             }
             else
             {
-                pn[pointI] = vector::zero;
+                pn[pointI] = Zero;
 
                 WarningInFunction
                     << "No visible octant for point:" << pp.meshPoints()[pointI]
diff --git a/src/meshTools/meshTools/meshTools.H b/src/meshTools/meshTools/meshTools.H
index 5f0fb0d4701ef3ff04d35276c5895b8a5c27fb89..01aa79c46f65a5c4a1b6e65240e5ccc8d2cfbe04 100644
--- a/src/meshTools/meshTools/meshTools.H
+++ b/src/meshTools/meshTools/meshTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -345,7 +345,7 @@ namespace meshTools
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "meshToolsTemplates.C"
+    #include "meshToolsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/momentOfInertia/momentOfInertia.C b/src/meshTools/momentOfInertia/momentOfInertia.C
index 93d6b82b3c2503bfeb6dbb747bf65ca55afb8942..f0056cf46af7b6abfe2292426256ba0e6adcaade 100644
--- a/src/meshTools/momentOfInertia/momentOfInertia.C
+++ b/src/meshTools/momentOfInertia/momentOfInertia.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -199,8 +199,8 @@ void Foam::momentOfInertia::massPropertiesShell
     // Reset properties for accumulation
 
     mass = 0.0;
-    cM = vector::zero;
-    J = tensor::zero;
+    cM = Zero;
+    J = Zero;
 
     // Find centre of mass
 
@@ -353,7 +353,7 @@ Foam::tmp<Foam::tensorField> Foam::momentOfInertia::meshInertia
 {
     tmp<tensorField> tTf = tmp<tensorField>(new tensorField(mesh.nCells()));
 
-    tensorField& tf = tTf();
+    tensorField& tf = tTf.ref();
 
     forAll(tf, cI)
     {
@@ -384,8 +384,8 @@ Foam::tensor Foam::momentOfInertia::meshInertia
     }
 
     scalar m = 0.0;
-    vector cM = vector::zero;
-    tensor J = tensor::zero;
+    vector cM = Zero;
+    tensor J = Zero;
 
     massPropertiesSolid(mesh.points(), faces, 1.0, m, cM, J);
 
diff --git a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
index d1edb53ad42d0ff81d779cd448cdabe16814d6c4..8ae25c28984bc83068a4636de0cdfc73f2684cd1 100644
--- a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
+++ b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -123,7 +123,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                         << "Should be 1 or 2 - serious error "
                         << "in mesh structure. " << endl;
 
-#                   ifdef DEBUG_ZIPUP
+                    #ifdef DEBUG_ZIPUP
                     forAll(curFaces, faceI)
                     {
                         Info<< "face: " << oldFaces[curFaces[faceI]]
@@ -140,7 +140,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                             << "\" coordinates "
                             << Points[cellPoints[cpI]] << endl;
                     }
-#                   endif
+                    #endif
 
                     // Gather the problem cell
                     problemCells.insert(cellI);
@@ -152,7 +152,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
 
             singleEdges.setSize(nSingleEdges);
 
-#           ifdef DEBUG_ZIPUP
+            #ifdef DEBUG_ZIPUP
             Info<< "Cell " << cellI << endl;
 
             forAll(curFaces, faceI)
@@ -171,7 +171,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                     << "\" coordinates "
                     << points()[cellPoints[cpI]] << endl;
             }
-#           endif
+            #endif
 
             // Loop through all single edges and mark the points they use
             // points marked twice are internal to edge; those marked more than
@@ -260,10 +260,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                     pointChain.insert(newEdgeStart);
                     pointChain.append(newEdgeEnd);
 
-#                   ifdef DEBUG_CHAIN
+                    #ifdef DEBUG_CHAIN
                     Info<< "found edge to start with: "
                         << singleEdges[edgeI] << endl;
-#                   endif
+                    #endif
 
                     // Check if head or tail are blocked
                     forAll(cellPoints, pointI)
@@ -272,9 +272,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                         {
                             if (pointUsage[pointI] > 2)
                             {
-#                               ifdef DEBUG_CHAIN
+                                #ifdef DEBUG_CHAIN
                                 Info<< "start head blocked" << endl;
-#                               endif
+                                #endif
 
                                 blockHead = true;
                             }
@@ -283,9 +283,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                         {
                             if (pointUsage[pointI] > 2)
                             {
-#                               ifdef DEBUG_CHAIN
+                                #ifdef DEBUG_CHAIN
                                 Info<< "start tail blocked" << endl;
-#                               endif
+                                #endif
 
                                 blockTail = true;
                             }
@@ -310,10 +310,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                 label addEnd =
                                     singleEdges[addEdgeI].end();
 
-#                               ifdef DEBUG_CHAIN
+                                #ifdef DEBUG_CHAIN
                                 Info<< "Trying candidate "
                                     << singleEdges[addEdgeI] << endl;
-#                               endif
+                                #endif
 
                                 // Try to add the edge onto the head
                                 if (!blockHead)
@@ -356,10 +356,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                 label curEdgeStart = pointChain.first();
                                 label curEdgeEnd = pointChain.last();
 
-#                               ifdef DEBUG_CHAIN
+                                #ifdef DEBUG_CHAIN
                                 Info<< "curEdgeStart: " << curEdgeStart
                                     << " curEdgeEnd: " << curEdgeEnd << endl;
-#                               endif
+                                #endif
 
                                 forAll(cellPoints, pointI)
                                 {
@@ -367,9 +367,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                     {
                                         if (pointUsage[pointI] > 2)
                                         {
-#                                           ifdef DEBUG_CHAIN
+                                            #ifdef DEBUG_CHAIN
                                             Info<< "head blocked" << endl;
-#                                           endif
+                                            #endif
 
                                             blockHead = true;
                                         }
@@ -378,9 +378,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                     {
                                         if (pointUsage[pointI] > 2)
                                         {
-#                                           ifdef DEBUG_CHAIN
+                                            #ifdef DEBUG_CHAIN
                                             Info<< "tail blocked" << endl;
-#                                           endif
+                                            #endif
 
                                             blockTail = true;
                                         }
@@ -390,9 +390,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                 // Check if the loop is closed
                                 if (curEdgeStart == curEdgeEnd)
                                 {
-#                                   ifdef DEBUG_CHAIN
+                                    #ifdef DEBUG_CHAIN
                                     Info<< "closed loop" << endl;
-#                                   endif
+                                    #endif
 
                                     pointChain.removeHead();
 
@@ -402,10 +402,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                     stopSearching = true;
                                 }
 
-#                               ifdef DEBUG_CHAIN
+                                #ifdef DEBUG_CHAIN
                                 Info<< "current pointChain: " << pointChain
                                     << endl;
-#                               endif
+                                #endif
 
                                 if (stopSearching) break;
                             }
@@ -413,9 +413,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                     } while (stopSearching);
                 }
 
-#               ifdef DEBUG_CHAIN
+                #ifdef DEBUG_CHAIN
                 Info<< "completed patch chain: " << pointChain << endl;
-#               endif
+                #endif
 
                 if (pointChain.size() > 2)
                 {
@@ -426,9 +426,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
 
             edgesToInsert.setSize(nEdgesToInsert);
 
-#           ifdef DEBUG_ZIPUP
+            #ifdef DEBUG_ZIPUP
             Info<< "edgesToInsert: " << edgesToInsert << endl;
-#           endif
+            #endif
 
             // Insert the edges into a list of faces
             forAll(edgesToInsert, edgeToInsertI)
@@ -477,10 +477,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                     used[nextPoint] = true;
                 }
 
-#               ifdef DEBUG_ORDER
+                #ifdef DEBUG_ORDER
                 Info<< "unorderedEdge: " << unorderedEdge << nl
                     << "orderedEdge: " << orderedEdge << endl;
-#               endif
+                #endif
 
                 // check for duplicate points in the ordered edge
                 forAll(orderedEdge, checkI)
@@ -582,12 +582,12 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                 allPointsPresent && curPointFound;
                         }
 
-#                       ifdef DEBUG_ZIPUP
+                        #ifdef DEBUG_ZIPUP
                         if (allPointsPresent)
                         {
                             Info<< "All points present" << endl;
                         }
-#                       endif
+                        #endif
 
                         if (!allPointsPresent)
                         {
@@ -601,9 +601,9 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                             // resized.
                             edgeList newFaceEdges = newFace.edges();
 
-#                           ifdef DEBUG_ZIPUP
+                            #ifdef DEBUG_ZIPUP
                             Info<< "Not all points present." << endl;
-#                           endif
+                            #endif
 
                             label nNewFacePoints = 0;
 
@@ -670,11 +670,11 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                 }
                             }
 
-#                           ifdef DEBUG_ZIPUP
+                            #ifdef DEBUG_ZIPUP
                             Info<< "oldFace: "
                                 << oldFaces[currentFaceIndex] << nl
                                 << "newFace: " << newFace << endl;
-#                           endif
+                            #endif
 
                             // Check for duplicate points in the new face
                             forAll(newFace, checkI)
diff --git a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C
index 6f6f23b75cfacbf953b3ef42e2464221dfc08701..933a95a38a5380094b0c9a5b2c4c2b38a04eb150 100644
--- a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C
+++ b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,9 +62,9 @@ void Foam::primitiveMeshGeometry::updateFaceCentresAndAreas
         }
         else
         {
-            vector sumN = vector::zero;
+            vector sumN = Zero;
             scalar sumA = 0.0;
-            vector sumAc = vector::zero;
+            vector sumAc = Zero;
 
             point fCentre = p[f[0]];
             for (label pi = 1; pi < nPoints; pi++)
@@ -101,7 +101,7 @@ void Foam::primitiveMeshGeometry::updateCellCentresAndVols
 )
 {
     // Clear the fields for accumulation
-    UIndirectList<vector>(cellCentres_, changedCells) = vector::zero;
+    UIndirectList<vector>(cellCentres_, changedCells) = Zero;
     UIndirectList<scalar>(cellVolumes_, changedCells) = 0.0;
 
     const labelList& own = mesh_.faceOwner();
@@ -110,7 +110,7 @@ void Foam::primitiveMeshGeometry::updateCellCentresAndVols
     // first estimate the approximate cell centre as the average of face centres
 
     vectorField cEst(mesh_.nCells());
-    UIndirectList<vector>(cEst, changedCells) = vector::zero;
+    UIndirectList<vector>(cEst, changedCells) = Zero;
     scalarField nCellFaces(mesh_.nCells());
     UIndirectList<scalar>(nCellFaces, changedCells) = 0.0;
 
@@ -230,7 +230,6 @@ Foam::primitiveMeshGeometry::primitiveMeshGeometry
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-//- Take over properties from mesh
 void Foam::primitiveMeshGeometry::correct()
 {
     faceAreas_ = mesh_.faceAreas();
@@ -240,7 +239,6 @@ void Foam::primitiveMeshGeometry::correct()
 }
 
 
-//- Recalculate on selected faces
 void Foam::primitiveMeshGeometry::correct
 (
     const pointField& p,
@@ -1189,7 +1187,7 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant
     {
         const cell& cFaces = cells[affectedCells[i]];
 
-        tensor areaSum(tensor::zero);
+        tensor areaSum(Zero);
         scalar magAreaSum = 0;
 
         forAll(cFaces, cFaceI)
diff --git a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.H b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.H
index b28d4351a06eca09feff2e6d524b02fe4c068d0f..a19ff3af2d6ede0eb0d36e04a7afd8e80ac0b493 100644
--- a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.H
+++ b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,13 +161,13 @@ public:
 
                 //- Interpolate field
                 template<class Type>
-                tmp<Field<Type> > interpolate(const Field<Type>& fld) const;
+                tmp<Field<Type>> interpolate(const Field<Type>& fld) const;
 
                 //- Interpolate tmp field
                 template<class Type>
-                tmp<Field<Type> > interpolate
+                tmp<Field<Type>> interpolate
                 (
-                    const tmp<Field<Type> >& tFld
+                    const tmp<Field<Type>>& tFld
                 ) const;
 
                 //- Low-level interpolate List
diff --git a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBaseTemplates.C b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBaseTemplates.C
index 125af8d35b22ccb84d60c1a3c7e4a965e6add1fc..3ee267f759e71b700eb74865db17c9d84c494311 100644
--- a/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBaseTemplates.C
+++ b/src/meshTools/regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBaseTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::regionCoupledBase::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::regionCoupledBase::interpolate
 (
     const Field<Type>& fld
 ) const
@@ -43,9 +43,9 @@ Foam::tmp<Foam::Field<Type> > Foam::regionCoupledBase::interpolate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::regionCoupledBase::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::regionCoupledBase::interpolate
 (
-    const tmp<Field<Type> >& tFld
+    const tmp<Field<Type>>& tFld
 ) const
 {
     if (owner())
diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C
index ea4a86551a8cc98801f51067063f5b32de5e458e..66cf746769c8fe21ac11ddda7dc8dd481b9591cf 100644
--- a/src/meshTools/regionSplit/regionSplit.C
+++ b/src/meshTools/regionSplit/regionSplit.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -344,13 +344,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
 
     // Get the wanted region labels into recvNonLocal
     labelListList recvNonLocal(Pstream::nProcs());
-    labelListList sizes;
-    Pstream::exchange<labelList, label>
-    (
-        sendNonLocal,
-        recvNonLocal,
-        sizes
-    );
+    Pstream::exchange<labelList, label>(sendNonLocal, recvNonLocal);
 
     // Now we have the wanted compact region labels that procI wants in
     // recvNonLocal[procI]. Construct corresponding list of compact
@@ -371,14 +365,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
 
     // Send back (into recvNonLocal)
     recvNonLocal.clear();
-    recvNonLocal.setSize(sendWantedLocal.size());
-    sizes.clear();
-    Pstream::exchange<labelList, label>
-    (
-        sendWantedLocal,
-        recvNonLocal,
-        sizes
-    );
+    Pstream::exchange<labelList, label>(sendWantedLocal, recvNonLocal);
     sendWantedLocal.clear();
 
     // Now recvNonLocal contains for every element in setNonLocal the
diff --git a/src/meshTools/searchableSurface/searchableBox.C b/src/meshTools/searchableSurface/searchableBox.C
index 5eac58aa337f1e3023501ca3e015b3741f2d3543..ba5da457eb5828fc8d5334402a988d3f0b75496a 100644
--- a/src/meshTools/searchableSurface/searchableBox.C
+++ b/src/meshTools/searchableSurface/searchableBox.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -223,7 +223,7 @@ const Foam::wordList& Foam::searchableBox::regions() const
 Foam::tmp<Foam::pointField> Foam::searchableBox::coordinates() const
 {
     tmp<pointField> tCtrs = tmp<pointField>(new pointField(6));
-    pointField& ctrs = tCtrs();
+    pointField& ctrs = tCtrs.ref();
 
     const pointField pts(treeBoundBox::points());
     const faceList& fcs = treeBoundBox::faces;
@@ -497,7 +497,7 @@ void Foam::searchableBox::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     info.setSize(start.size());
@@ -579,7 +579,7 @@ void Foam::searchableBox::getNormal
 ) const
 {
     normal.setSize(info.size());
-    normal = vector::zero;
+    normal = Zero;
 
     forAll(info, i)
     {
diff --git a/src/meshTools/searchableSurface/searchableBox.H b/src/meshTools/searchableSurface/searchableBox.H
index 306ec460bec9bc39eacb69062640f69a3040a3e5..9162e253c5b4e41947c37f4a1df279a83feb97c4 100644
--- a/src/meshTools/searchableSurface/searchableBox.H
+++ b/src/meshTools/searchableSurface/searchableBox.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -231,7 +231,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableCone.C b/src/meshTools/searchableSurface/searchableCone.C
index 2ed0c2abf0c4e93cb902f773c8b733701897c805..02d0b1b16ccc910636cede3059f7fffccd16bc65 100644
--- a/src/meshTools/searchableSurface/searchableCone.C
+++ b/src/meshTools/searchableSurface/searchableCone.C
@@ -30,10 +30,8 @@ License
 
 namespace Foam
 {
-
-defineTypeNameAndDebug(searchableCone, 0);
-addToRunTimeSelectionTable(searchableSurface, searchableCone, dict);
-
+    defineTypeNameAndDebug(searchableCone, 0);
+    addToRunTimeSelectionTable(searchableSurface, searchableCone, dict);
 }
 
 
@@ -74,7 +72,7 @@ void Foam::searchableCone::boundingSpheres
 Foam::tmp<Foam::pointField> Foam::searchableCone::points() const
 {
     tmp<pointField> tPts(new pointField(2));
-    pointField& pts = tPts();
+    pointField& pts = tPts.ref();
 
     pts[0] = point1_;
     pts[1] = point2_;
@@ -102,7 +100,7 @@ void Foam::searchableCone::findNearestAndNormal
     scalar magV = mag(v);
     if (magV < ROOTVSMALL)
     {
-       v = vector::zero;
+       v = Zero;
     }
     else
     {
@@ -939,7 +937,7 @@ void Foam::searchableCone::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     info.setSize(start.size());
@@ -1047,7 +1045,7 @@ void Foam::searchableCone::getNormal
 ) const
 {
     normal.setSize(info.size());
-    normal = vector::zero;
+    normal = Zero;
 
     forAll(info, i)
     {
diff --git a/src/meshTools/searchableSurface/searchableCone.H b/src/meshTools/searchableSurface/searchableCone.H
index b3f2dbd53549d39b4262aa992b19d0c2f343d082..81636f597533e4b8bb2fc7faec77a49e588ed2f4 100644
--- a/src/meshTools/searchableSurface/searchableCone.H
+++ b/src/meshTools/searchableSurface/searchableCone.H
@@ -237,7 +237,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- Find any intersection on line from start to end
diff --git a/src/meshTools/searchableSurface/searchableCylinder.C b/src/meshTools/searchableSurface/searchableCylinder.C
index 496cd04ab2f164ae98ab7e83637654225e9234d1..53c0c48cb3fd23932c85452ae836d83045920a4a 100644
--- a/src/meshTools/searchableSurface/searchableCylinder.C
+++ b/src/meshTools/searchableSurface/searchableCylinder.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,10 +30,8 @@ License
 
 namespace Foam
 {
-
-defineTypeNameAndDebug(searchableCylinder, 0);
-addToRunTimeSelectionTable(searchableSurface, searchableCylinder, dict);
-
+    defineTypeNameAndDebug(searchableCylinder, 0);
+    addToRunTimeSelectionTable(searchableSurface, searchableCylinder, dict);
 }
 
 
@@ -67,7 +65,7 @@ void Foam::searchableCylinder::boundingSpheres
 Foam::tmp<Foam::pointField> Foam::searchableCylinder::points() const
 {
     tmp<pointField> tPts(new pointField(2));
-    pointField& pts = tPts();
+    pointField& pts = tPts.ref();
 
     pts[0] = point1_;
     pts[1] = point2_;
@@ -95,7 +93,7 @@ Foam::pointIndexHit Foam::searchableCylinder::findNearest
 
     if (magV < ROOTVSMALL)
     {
-        v = vector::zero;
+        v = Zero;
     }
     else
     {
@@ -595,7 +593,7 @@ void Foam::searchableCylinder::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     info.setSize(start.size());
@@ -653,7 +651,7 @@ void Foam::searchableCylinder::getNormal
 ) const
 {
     normal.setSize(info.size());
-    normal = vector::zero;
+    normal = Zero;
 
     forAll(info, i)
     {
diff --git a/src/meshTools/searchableSurface/searchableCylinder.H b/src/meshTools/searchableSurface/searchableCylinder.H
index 230acdb5b0c98fe36c9a9c2a2f5857ee64339beb..c120ae174b45815e870e983b6f8c60718f98aa34 100644
--- a/src/meshTools/searchableSurface/searchableCylinder.H
+++ b/src/meshTools/searchableSurface/searchableCylinder.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class searchableCylinder Declaration
+                     Class searchableCylinder Declaration
 \*---------------------------------------------------------------------------*/
 
 class searchableCylinder
@@ -203,7 +203,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableDisk.C b/src/meshTools/searchableSurface/searchableDisk.C
index db8f92f0a9985695857c02fe2438135d414695cd..a62604c25941f91679f90b7d666f1b8f42d66779 100644
--- a/src/meshTools/searchableSurface/searchableDisk.C
+++ b/src/meshTools/searchableSurface/searchableDisk.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,7 +58,7 @@ Foam::pointIndexHit Foam::searchableDisk::findNearest
 
     if (magV < ROOTVSMALL)
     {
-        v = vector::zero;
+        v = Zero;
     }
     else
     {
@@ -85,7 +85,7 @@ void Foam::searchableDisk::findLine
     pointIndexHit& info
 ) const
 {
-    info = pointIndexHit(false, vector::zero, -1);
+    info = pointIndexHit(false, Zero, -1);
 
     vector v(start - origin_);
 
@@ -103,7 +103,7 @@ void Foam::searchableDisk::findLine
 
     if (magV < ROOTVSMALL)
     {
-        v = vector::zero;
+        v = Zero;
     }
     else
     {
@@ -266,7 +266,7 @@ void Foam::searchableDisk::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     info.setSize(start.size());
diff --git a/src/meshTools/searchableSurface/searchableDisk.H b/src/meshTools/searchableSurface/searchableDisk.H
index 2dbf8b4df1aa22358c6286d095840367693b3d09..8e6bee01b2b2f18989319e321a2bd00c362d518b 100644
--- a/src/meshTools/searchableSurface/searchableDisk.H
+++ b/src/meshTools/searchableSurface/searchableDisk.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -198,7 +198,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchablePlane.C b/src/meshTools/searchableSurface/searchablePlane.C
index 5f931758f91f4582e6e7d70679ab9a101dc533ca..d059c6ef444755a7a6087bb33b2944edf3baa833 100644
--- a/src/meshTools/searchableSurface/searchablePlane.C
+++ b/src/meshTools/searchableSurface/searchablePlane.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ Foam::pointIndexHit Foam::searchablePlane::findLine
     const point& end
 ) const
 {
-    pointIndexHit info(true, vector::zero, 0);
+    pointIndexHit info(true, Zero, 0);
 
     linePointRef l(start, end);
 
@@ -206,7 +206,7 @@ void Foam::searchablePlane::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     List<pointIndexHit> nearestInfo;
diff --git a/src/meshTools/searchableSurface/searchablePlane.H b/src/meshTools/searchableSurface/searchablePlane.H
index 4b2ffefb012f2436f0506aa4b6210d2be3e15106..3e15a8e34c1619fbb44242fb980e203c2e8249fd 100644
--- a/src/meshTools/searchableSurface/searchablePlane.H
+++ b/src/meshTools/searchableSurface/searchablePlane.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -182,7 +182,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchablePlate.C b/src/meshTools/searchableSurface/searchablePlate.C
index a6ad5eeb6bc26ea94de925bb3690cadbd4dbe0e4..aacb605b3140e296602f8d0dec494035b9c33931 100644
--- a/src/meshTools/searchableSurface/searchablePlate.C
+++ b/src/meshTools/searchableSurface/searchablePlate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,10 +31,8 @@ License
 
 namespace Foam
 {
-
-defineTypeNameAndDebug(searchablePlate, 0);
-addToRunTimeSelectionTable(searchableSurface, searchablePlate, dict);
-
+    defineTypeNameAndDebug(searchablePlate, 0);
+    addToRunTimeSelectionTable(searchableSurface, searchablePlate, dict);
 }
 
 
@@ -134,7 +132,7 @@ Foam::pointIndexHit Foam::searchablePlate::findLine
     pointIndexHit info
     (
         true,
-        vector::zero,
+        Zero,
         0
     );
 
@@ -220,7 +218,7 @@ Foam::searchablePlate::searchablePlate
 {
     if (debug)
     {
-        Info<< "searchablePlate::searchablePlate :"
+        InfoInFunction
             << " origin:" << origin_
             << " origin+span:" << origin_+span_
             << " normal:" << vector::componentNames[normalDir_]
@@ -244,7 +242,7 @@ Foam::searchablePlate::searchablePlate
 {
     if (debug)
     {
-        Info<< "searchablePlate::searchablePlate :"
+        InfoInFunction
             << " origin:" << origin_
             << " origin+span:" << origin_+span_
             << " normal:" << vector::componentNames[normalDir_]
@@ -300,7 +298,7 @@ void Foam::searchablePlate::boundingSpheres
 Foam::tmp<Foam::pointField> Foam::searchablePlate::points() const
 {
     tmp<pointField> tPts(new pointField(4));
-    pointField& pts = tPts();
+    pointField& pts = tPts.ref();
 
     pts[0] = origin_;
     pts[2] = origin_ + span_;
@@ -386,7 +384,7 @@ void Foam::searchablePlate::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     List<pointIndexHit> nearestInfo;
@@ -426,7 +424,7 @@ void Foam::searchablePlate::getNormal
 ) const
 {
     normal.setSize(info.size());
-    normal = vector::zero;
+    normal = Zero;
     forAll(normal, i)
     {
         normal[i][normalDir_] = 1.0;
diff --git a/src/meshTools/searchableSurface/searchablePlate.H b/src/meshTools/searchableSurface/searchablePlate.H
index d1b69462a9c127e34c957a5a3d7c485d4f69121e..48d270987ff49e2d49e76521965c6f17d731e977 100644
--- a/src/meshTools/searchableSurface/searchablePlate.H
+++ b/src/meshTools/searchableSurface/searchablePlate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -193,7 +193,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableRotatedBox.C b/src/meshTools/searchableSurface/searchableRotatedBox.C
index 5fc3c79f58d84dadfb4b81a8b3e71f93c67e5c0c..ffb8dc9c5dcda4a1b0a6bb3e7008463dfaff9e4e 100644
--- a/src/meshTools/searchableSurface/searchableRotatedBox.C
+++ b/src/meshTools/searchableSurface/searchableRotatedBox.C
@@ -57,7 +57,7 @@ Foam::searchableRotatedBox::searchableRotatedBox
             io.writeOpt(),
             false      //io.registerObject(),
         ),
-        treeBoundBox(point::zero, dict.lookup("span"))
+        treeBoundBox(Zero, dict.lookup("span"))
     ),
     transform_
     (
@@ -295,7 +295,7 @@ void Foam::searchableRotatedBox::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     info.setSize(start.size());
diff --git a/src/meshTools/searchableSurface/searchableRotatedBox.H b/src/meshTools/searchableSurface/searchableRotatedBox.H
index 0b7f206e65b92656811c921ac9a4f1da6af9f3d1..cca6444c06a9ee8c92d26ec92c4b3477f7ec19e2 100644
--- a/src/meshTools/searchableSurface/searchableRotatedBox.H
+++ b/src/meshTools/searchableSurface/searchableRotatedBox.H
@@ -215,7 +215,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableSphere.C b/src/meshTools/searchableSurface/searchableSphere.C
index e4eae4ab27452e40e4dcb1977754ebc5b13d9f1f..d63749657bd5bf5437b9d79debed94857178415c 100644
--- a/src/meshTools/searchableSurface/searchableSphere.C
+++ b/src/meshTools/searchableSurface/searchableSphere.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -268,7 +268,7 @@ void Foam::searchableSphere::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     info.setSize(start.size());
@@ -326,7 +326,7 @@ void Foam::searchableSphere::getNormal
 ) const
 {
     normal.setSize(info.size());
-    normal = vector::zero;
+    normal = Zero;
 
     forAll(info, i)
     {
diff --git a/src/meshTools/searchableSurface/searchableSphere.H b/src/meshTools/searchableSurface/searchableSphere.H
index 992c28d1a30308a49df899f6cc899a93ba04c5c6..4096d2f4606ad33af78c2f723eb783071a526542 100644
--- a/src/meshTools/searchableSurface/searchableSphere.H
+++ b/src/meshTools/searchableSurface/searchableSphere.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -188,7 +188,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableSurface.H b/src/meshTools/searchableSurface/searchableSurface.H
index e13751e58fcbb30f8125b91a5950773ea9a86dae..fb766c85cdaa4091256d4f373c3d3e70bf4755eb 100644
--- a/src/meshTools/searchableSurface/searchableSurface.H
+++ b/src/meshTools/searchableSurface/searchableSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -317,7 +317,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const = 0;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableSurfaceCollection.C b/src/meshTools/searchableSurface/searchableSurfaceCollection.C
index 98ae2a26e05d621f84d9476978323881a7be10b6..17477023caeb08c31b2ae4ee3d8d9c979890f69d 100644
--- a/src/meshTools/searchableSurface/searchableSurfaceCollection.C
+++ b/src/meshTools/searchableSurface/searchableSurfaceCollection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,7 +118,7 @@ void Foam::searchableSurfaceCollection::findNearest
 void Foam::searchableSurfaceCollection::sortHits
 (
     const List<pointIndexHit>& info,
-    List<List<pointIndexHit> >& surfInfo,
+    List<List<pointIndexHit>>& surfInfo,
     labelListList& infoMap
 ) const
 {
@@ -325,7 +325,7 @@ Foam::tmp<Foam::pointField>
 Foam::searchableSurfaceCollection::coordinates() const
 {
     tmp<pointField> tCtrs = tmp<pointField>(new pointField(size()));
-    pointField& ctrs = tCtrs();
+    pointField& ctrs = tCtrs.ref();
 
     // Append individual coordinates
     label coordI = 0;
@@ -400,7 +400,7 @@ Foam::searchableSurfaceCollection::points() const
     }
 
     tmp<pointField> tPts(new pointField(nPoints));
-    pointField& pts = tPts();
+    pointField& pts = tPts.ref();
 
     // Append individual coordinates
     nPoints = 0;
@@ -560,7 +560,7 @@ void Foam::searchableSurfaceCollection::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     // To be done. Assume for now only one intersection.
@@ -608,9 +608,9 @@ void Foam::searchableSurfaceCollection::getRegion
         // Multiple surfaces. Sort by surface.
 
         // Per surface the hit
-        List<List<pointIndexHit> > surfInfo;
+        List<List<pointIndexHit>> surfInfo;
         // Per surface the original position
-        List<List<label> > infoMap;
+        List<List<label>> infoMap;
         sortHits(info, surfInfo, infoMap);
 
         region.setSize(info.size());
@@ -665,9 +665,9 @@ void Foam::searchableSurfaceCollection::getNormal
         // Multiple surfaces. Sort by surface.
 
         // Per surface the hit
-        List<List<pointIndexHit> > surfInfo;
+        List<List<pointIndexHit>> surfInfo;
         // Per surface the original position
-        List<List<label> > infoMap;
+        List<List<label>> infoMap;
         sortHits(info, surfInfo, infoMap);
 
         normal.setSize(info.size());
@@ -774,9 +774,9 @@ void Foam::searchableSurfaceCollection::getField
         // Multiple surfaces. Sort by surface.
 
         // Per surface the hit
-        List<List<pointIndexHit> > surfInfo;
+        List<List<pointIndexHit>> surfInfo;
         // Per surface the original position
-        List<List<label> > infoMap;
+        List<List<label>> infoMap;
         sortHits(info, surfInfo, infoMap);
 
         // Do surface tests
diff --git a/src/meshTools/searchableSurface/searchableSurfaceCollection.H b/src/meshTools/searchableSurface/searchableSurfaceCollection.H
index 2b15158324aa9703353cd6960bc9419fba21c177..cc7f023226c1b742c6a1dc61f0a1522954fd4690 100644
--- a/src/meshTools/searchableSurface/searchableSurfaceCollection.H
+++ b/src/meshTools/searchableSurface/searchableSurfaceCollection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ private:
         void sortHits
         (
             const List<pointIndexHit>& info,
-            List<List<pointIndexHit> >& surfInfo,
+            List<List<pointIndexHit>>& surfInfo,
             labelListList& infoMap
         ) const;
 
@@ -225,7 +225,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C
index 93c95778b86d7b2f160bd289f328e5d4c222d294..ce9d1addd364e9d5186bd8b4590ee25cb81d6632 100644
--- a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C
+++ b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,7 +47,7 @@ Foam::Pair<Foam::vector> Foam::searchableSurfaceWithGaps::offsetVecs
     const point& end
 ) const
 {
-    Pair<vector> offsets(vector::zero, vector::zero);
+    Pair<vector> offsets(Zero, Zero);
 
     vector n(end-start);
 
@@ -341,7 +341,7 @@ void Foam::searchableSurfaceWithGaps::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     // To be done. Assume for now only one intersection.
diff --git a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H
index 7b9cfce67e8e0c30c3d0f6bca721e9138a65aee1..ad56aee199cef7eb6a0f90c933bd05a5f68f3561 100644
--- a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H
+++ b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -236,7 +236,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/searchableSurface/searchableSurfaces.C b/src/meshTools/searchableSurface/searchableSurfaces.C
index 3767daf4c0ec2bfa7f3128440d365df40f84250c..b6ff1909141318a7fe9613ee67ca676eb3cd951f 100644
--- a/src/meshTools/searchableSurface/searchableSurfaces.C
+++ b/src/meshTools/searchableSurface/searchableSurfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -35,13 +35,12 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(searchableSurfaces, 0);
+    defineTypeNameAndDebug(searchableSurfaces, 0);
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-//- Is edge connected to triangle
 bool Foam::searchableSurfaces::connected
 (
     const triSurface& s,
@@ -323,14 +322,12 @@ void Foam::searchableSurfaces::findAnyIntersection
 }
 
 
-//- Find all intersections in order from start to end. Returns for
-//  every hit the surface and the hit info.
 void Foam::searchableSurfaces::findAllIntersections
 (
     const pointField& start,
     const pointField& end,
     labelListList& hitSurfaces,
-    List<List<pointIndexHit> >& hitInfo
+    List<List<pointIndexHit>>& hitInfo
 ) const
 {
     searchableSurfacesQueries::findAllIntersections
@@ -370,7 +367,6 @@ void Foam::searchableSurfaces::findNearestIntersection
 }
 
 
-// Find nearest. Return -1 or nearest point
 void Foam::searchableSurfaces::findNearest
 (
     const pointField& samples,
@@ -391,7 +387,6 @@ void Foam::searchableSurfaces::findNearest
 }
 
 
-// Find nearest. Return -1 or nearest point
 void Foam::searchableSurfaces::findNearest
 (
     const labelListList& regionIndices,
@@ -415,7 +410,7 @@ void Foam::searchableSurfaces::findNearest
     );
 }
 
-//- Calculate bounding box
+
 Foam::boundBox Foam::searchableSurfaces::bounds() const
 {
     return searchableSurfacesQueries::bounds
@@ -426,7 +421,6 @@ Foam::boundBox Foam::searchableSurfaces::bounds() const
 }
 
 
-//- Calculate point which is on a set of surfaces.
 Foam::pointIndexHit Foam::searchableSurfaces::facesIntersection
 (
     const scalar initDistSqr,
@@ -609,7 +603,7 @@ bool Foam::searchableSurfaces::checkSizes
 bool Foam::searchableSurfaces::checkIntersection
 (
     const scalar tolerance,
-    const autoPtr<writer<scalar> >& setWriter,
+    const autoPtr<writer<scalar>>& setWriter,
     const bool report
 ) const
 {
@@ -837,7 +831,7 @@ Foam::label Foam::searchableSurfaces::checkGeometry
 (
     const scalar maxRatio,
     const scalar tol,
-    const autoPtr<writer<scalar> >& setWriter,
+    const autoPtr<writer<scalar>>& setWriter,
     const scalar minQuality,
     const bool report
 ) const
diff --git a/src/meshTools/searchableSurface/searchableSurfaces.H b/src/meshTools/searchableSurface/searchableSurfaces.H
index be3787904d628dfb357468dc13701b9c31c9687d..6debf78668b0f355f75eb367b4cefde01b27adf2 100644
--- a/src/meshTools/searchableSurface/searchableSurfaces.H
+++ b/src/meshTools/searchableSurface/searchableSurfaces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -174,7 +174,7 @@ public:
                 const pointField& start,
                 const pointField& end,
                 labelListList& surfaces,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //Find intersections of edge nearest to both endpoints.
@@ -237,7 +237,7 @@ public:
             bool checkIntersection
             (
                 const scalar tol,
-                const autoPtr<writer<scalar> >&,
+                const autoPtr<writer<scalar>>&,
                 const bool report
             ) const;
 
@@ -256,7 +256,7 @@ public:
             (
                 const scalar maxRatio,
                 const scalar tolerance,
-                const autoPtr<writer<scalar> >& setWriter,
+                const autoPtr<writer<scalar>>& setWriter,
                 const scalar minQuality,
                 const bool report
             ) const;
diff --git a/src/meshTools/searchableSurface/searchableSurfacesQueries.C b/src/meshTools/searchableSurface/searchableSurfacesQueries.C
index 61dc9694fb06e2efa37b40f2b4637f94c5c5929c..1ea49c94c5b9306161ceabd2d80f9d37ec0e1d96 100644
--- a/src/meshTools/searchableSurface/searchableSurfacesQueries.C
+++ b/src/meshTools/searchableSurface/searchableSurfacesQueries.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(searchableSurfacesQueries, 0);
+    defineTypeNameAndDebug(searchableSurfacesQueries, 0);
 }
 
 
@@ -263,7 +263,7 @@ bool Foam::searchableSurfacesQueries::morphTet
 //    const pointField& start,
 //    const pointField& end,
 //    const vectorField& smallVec,
-//    List<List<pointIndexHit> >& surfaceHitInfo
+//    List<List<pointIndexHit>>& surfaceHitInfo
 //)
 //{
 //    surfaceHitInfo.setSize(start.size());
@@ -460,7 +460,7 @@ void Foam::searchableSurfacesQueries::findAllIntersections
     const pointField& start,
     const pointField& end,
     labelListList& hitSurfaces,
-    List<List<pointIndexHit> >& hitInfo
+    List<List<pointIndexHit>>& hitInfo
 )
 {
     // Note: maybe move the single-surface all intersections test into
@@ -505,7 +505,7 @@ void Foam::searchableSurfacesQueries::findAllIntersections
         // Test the other surfaces and merge (according to distance from start).
         for (label testI = 1; testI < surfacesToTest.size(); testI++)
         {
-            List<List<pointIndexHit> > surfHits;
+            List<List<pointIndexHit>> surfHits;
             allSurfaces[surfacesToTest[testI]].findLineAll
             (
                 start,
@@ -851,7 +851,6 @@ Foam::boundBox Foam::searchableSurfacesQueries::bounds
 }
 
 
-//- Calculate point which is on a set of surfaces.
 Foam::pointIndexHit Foam::searchableSurfacesQueries::facesIntersection
 (
     const PtrList<searchableSurface>& allSurfaces,
@@ -865,7 +864,7 @@ Foam::pointIndexHit Foam::searchableSurfacesQueries::facesIntersection
     // starting point onto the surfaces and the mid point
     List<point> nearest(surfacesToTest.size()+1);
 
-    point sumNearest = vector::zero;
+    point sumNearest = Zero;
 
     forAll(surfacesToTest, i)
     {
diff --git a/src/meshTools/searchableSurface/searchableSurfacesQueries.H b/src/meshTools/searchableSurface/searchableSurfacesQueries.H
index ce2bd5a09368cada293935baad7ae7b71e72d938..f21717d094c9073bce1bf0220c35e2d2c7d927bd 100644
--- a/src/meshTools/searchableSurface/searchableSurfacesQueries.H
+++ b/src/meshTools/searchableSurface/searchableSurfacesQueries.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ class searchableSurfacesQueries
         //    const pointField& start,
         //    const pointField& end,
         //    const vectorField& smallVec,
-        //    List<List<pointIndexHit> >&
+        //    List<List<pointIndexHit>>&
         //);
 
         static void mergeHits
@@ -155,7 +155,7 @@ public:
                 const pointField& start,
                 const pointField& end,
                 labelListList& surfaces,
-                List<List<pointIndexHit> >& surfaceHits
+                List<List<pointIndexHit>>& surfaceHits
             );
 
             //Find intersections of edge nearest to both endpoints.
diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.C b/src/meshTools/searchableSurface/triSurfaceMesh.C
index 00772b8d3e0f0b95617bf83d71626719f30b1b75..93c9e2c152a3b9667fc5611a1d995720f8598df1 100644
--- a/src/meshTools/searchableSurface/triSurfaceMesh.C
+++ b/src/meshTools/searchableSurface/triSurfaceMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,6 @@ word triSurfaceMesh::meshSubDir = "triSurface";
 //}
 
 
-//- Check file existence
 const Foam::fileName& Foam::triSurfaceMesh::checkFile
 (
     const fileName& fName,
@@ -395,7 +394,7 @@ void Foam::triSurfaceMesh::clearOut()
 Foam::tmp<Foam::pointField> Foam::triSurfaceMesh::coordinates() const
 {
     tmp<pointField> tPts(new pointField(8));
-    pointField& pt = tPts();
+    pointField& pt = tPts.ref();
 
     // Use copy to calculate face centres so they don't get stored
     pt = PrimitivePatch<triSurface::FaceType, SubList, const pointField&>
@@ -489,7 +488,7 @@ Foam::triSurfaceMesh::edgeTree() const
           + nInternalEdges()
         );
 
-        treeBoundBox bb(vector::zero, vector::zero);
+        treeBoundBox bb(Zero, Zero);
 
         if (bEdges.size())
         {
@@ -627,7 +626,7 @@ void Foam::triSurfaceMesh::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     triSurfaceSearch::findLineAll(start, end, info);
@@ -704,7 +703,7 @@ void Foam::triSurfaceMesh::getNormal
             else
             {
                 // Set to what?
-                normal[i] = vector::zero;
+                normal[i] = Zero;
             }
         }
     }
@@ -715,17 +714,17 @@ void Foam::triSurfaceMesh::getNormal
             if (info[i].hit())
             {
                 label faceI = info[i].index();
-                //- Cached:
+                // Cached:
                 //normal[i] = faceNormals()[faceI];
 
-                //- Uncached
+                // Uncached
                 normal[i] = s[faceI].normal(pts);
                 normal[i] /= mag(normal[i]) + VSMALL;
             }
             else
             {
                 // Set to what?
-                normal[i] = vector::zero;
+                normal[i] = Zero;
             }
         }
     }
@@ -841,7 +840,6 @@ void Foam::triSurfaceMesh::getVolumeType
 }
 
 
-//- Write using given format, version and compression
 bool Foam::triSurfaceMesh::writeObject
 (
     IOstream::streamFormat fmt,
@@ -881,7 +879,6 @@ bool Foam::triSurfaceMesh::writeObject
         return false;
     }
 
-    //return objectRegistry::writeObject(fmt, ver, cmp);
     return true;
 }
 
diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.H b/src/meshTools/searchableSurface/triSurfaceMesh.H
index 38bd11d1c1d2c76395c240020cca78a61fd3384d..c5633e65d5b0f6c7929bd09915ea82676603a5f9 100644
--- a/src/meshTools/searchableSurface/triSurfaceMesh.H
+++ b/src/meshTools/searchableSurface/triSurfaceMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ private:
         scalar minQuality_;
 
         //- Search tree for boundary edges.
-        mutable autoPtr<indexedOctree<treeDataEdge> > edgeTree_;
+        mutable autoPtr<indexedOctree<treeDataEdge>> edgeTree_;
 
         //- Names of regions
         mutable wordList regions_;
@@ -242,7 +242,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
index a6a11f6550bda535c59e97a8e01b232f48bca31d..a9c9158af339e813dfd0ea409f45222d3c5f7924 100644
--- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
+++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C
index 5c5f538876becc47012933bfb83376e11eb1d45f..e03a9f5c7946aa293cd6ec0a3bdc23ee0fdb1e24 100644
--- a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C
+++ b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,7 +124,7 @@ void Foam::regionToFace::combine(topoSet& set, const bool add) const
 
     mappedPatchBase::nearInfo ni
     (
-        pointIndexHit(false, vector::zero, -1),
+        pointIndexHit(false, Zero, -1),
         Tuple2<scalar, label>
         (
             sqr(GREAT),
diff --git a/src/meshTools/sets/topoSets/cellZoneSet.C b/src/meshTools/sets/topoSets/cellZoneSet.C
index 80528e3192d5da189e138c82b8da3a0ba33dbc3e..cd52d72ed96c406afe32af7c43e60a956230f842 100644
--- a/src/meshTools/sets/topoSets/cellZoneSet.C
+++ b/src/meshTools/sets/topoSets/cellZoneSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -238,7 +238,6 @@ label cellZoneSet::maxSize(const polyMesh& mesh) const
 }
 
 
-//- Write using given format, version and compression
 bool cellZoneSet::writeObject
 (
     IOstream::streamFormat s,
diff --git a/src/meshTools/sets/topoSets/faceZoneSet.C b/src/meshTools/sets/topoSets/faceZoneSet.C
index 0467956ef77632ed27b4ca0353fa7477cfff425e..34ce4249afa594141e3475a415371edc408f0f45 100644
--- a/src/meshTools/sets/topoSets/faceZoneSet.C
+++ b/src/meshTools/sets/topoSets/faceZoneSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -331,7 +331,6 @@ label faceZoneSet::maxSize(const polyMesh& mesh) const
 }
 
 
-//- Write using given format, version and compression
 bool faceZoneSet::writeObject
 (
     IOstream::streamFormat s,
diff --git a/src/meshTools/sets/topoSets/pointZoneSet.C b/src/meshTools/sets/topoSets/pointZoneSet.C
index 8a02f718a24342ee6ec7b35c71dd9e443da92ca5..7bfc299ca470c0ebc87a9f4b1f766bf608eb8d0a 100644
--- a/src/meshTools/sets/topoSets/pointZoneSet.C
+++ b/src/meshTools/sets/topoSets/pointZoneSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -239,7 +239,6 @@ label pointZoneSet::maxSize(const polyMesh& mesh) const
 }
 
 
-//- Write using given format, version and compression
 bool pointZoneSet::writeObject
 (
     IOstream::streamFormat s,
diff --git a/src/meshTools/tetOverlapVolume/tetOverlapVolume.H b/src/meshTools/tetOverlapVolume/tetOverlapVolume.H
index 879268a0095b783abdc33e1bc71247e9406647e4..b027599218c411be3993218e2ef8661d833289c0 100644
--- a/src/meshTools/tetOverlapVolume/tetOverlapVolume.H
+++ b/src/meshTools/tetOverlapVolume/tetOverlapVolume.H
@@ -70,7 +70,7 @@ class tetOverlapVolume
 
             inline sumMomentOp()
             :
-                vol_(0.0, vector::zero)
+                vol_(0.0, Zero)
             {}
 
             inline void operator()(const tetPoints& tet)
diff --git a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C
index c3147cb12d1003700c824865332bf94a68895f0b..21edcbd98db9796025b9dad71254c2f7f15b57fb 100644
--- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C
+++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -959,7 +959,7 @@ Foam::booleanSurface::booleanSurface
     const pointField& pts = combinedSurf.points();
 
     label minFaceI = -1;
-    pointHit minHit(false, vector::zero, GREAT, true);
+    pointHit minHit(false, Zero, GREAT, true);
 
     forAll(combinedSurf, faceI)
     {
diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C
index 3a39a47525889e4a67042a84a07d8d2449641698..f287a4d67fc1e958a6d06d4c26dd64c2fe113f36 100644
--- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C
+++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -164,7 +164,7 @@ Foam::edgeSurface::edgeSurface
 
     DynamicList<edge> allEdges(surf.nEdges() + inter.cutEdges().size());
     DynamicList<label> allParentEdges(surf.nEdges());
-    List<DynamicList<label> > allFaceEdges(surf.size());
+    List<DynamicList<label>> allFaceEdges(surf.size());
 
 
     // Copy surface edges (can be split!)
diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
index 1f38acb5c1d6c70664954ceac3007c9056c44651..ae90443b80498e7f81cf43a3c65e77e474abd1b1 100644
--- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
+++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -282,7 +282,7 @@ void Foam::intersectedSurface::incCount
 // Calculate point to edge addressing for the face given by the edge
 // subset faceEdges. Constructs facePointEdges which for every point
 // gives a list of edge labels connected to it.
-Foam::Map<Foam::DynamicList<Foam::label> >
+Foam::Map<Foam::DynamicList<Foam::label>>
 Foam::intersectedSurface::calcPointEdgeAddressing
 (
     const edgeSurface& eSurf,
@@ -294,7 +294,7 @@ Foam::intersectedSurface::calcPointEdgeAddressing
 
     const labelList& fEdges = eSurf.faceEdges()[faceI];
 
-    Map<DynamicList<label> > facePointEdges(4*fEdges.size());
+    Map<DynamicList<label>> facePointEdges(4*fEdges.size());
 
     forAll(fEdges, i)
     {
@@ -303,7 +303,7 @@ Foam::intersectedSurface::calcPointEdgeAddressing
         const edge& e = edges[edgeI];
 
         // Add e.start to point-edges
-        Map<DynamicList<label> >::iterator iter =
+        Map<DynamicList<label>>::iterator iter =
             facePointEdges.find(e.start());
 
         if (iter == facePointEdges.end())
@@ -318,7 +318,7 @@ Foam::intersectedSurface::calcPointEdgeAddressing
         }
 
         // Add e.end to point-edges
-        Map<DynamicList<label> >::iterator iter2 =
+        Map<DynamicList<label>>::iterator iter2 =
             facePointEdges.find(e.end());
 
         if (iter2 == facePointEdges.end())
@@ -334,7 +334,7 @@ Foam::intersectedSurface::calcPointEdgeAddressing
     }
 
     // Shrink it
-    forAllIter(Map< DynamicList<label> >, facePointEdges, iter)
+    forAllIter(Map<DynamicList<label>>, facePointEdges, iter)
     {
         iter().shrink();
 
@@ -361,7 +361,7 @@ Foam::intersectedSurface::calcPointEdgeAddressing
         }
 
         Pout<< "    Constructed point-edge adressing:" << endl;
-        forAllConstIter(Map< DynamicList<label> >, facePointEdges, iter)
+        forAllConstIter(Map<DynamicList<label>>, facePointEdges, iter)
         {
             Pout<< "    vertex " << iter.key() << " is connected to edges "
                 << iter() << endl;
@@ -383,7 +383,7 @@ Foam::label Foam::intersectedSurface::nextEdge
     const Map<label>& visited,
     const label faceI,
     const vector& n,
-    const Map<DynamicList<label> >& facePointEdges,
+    const Map<DynamicList<label>>& facePointEdges,
     const label prevEdgeI,
     const label prevVertI
 )
@@ -561,7 +561,7 @@ Foam::face Foam::intersectedSurface::walkFace
     const edgeSurface& eSurf,
     const label faceI,
     const vector& n,
-    const Map<DynamicList<label> >& facePointEdges,
+    const Map<DynamicList<label>>& facePointEdges,
 
     const label startEdgeI,
     const label startVertI,
@@ -637,7 +637,7 @@ void Foam::intersectedSurface::findNearestVisited
 (
     const edgeSurface& eSurf,
     const label faceI,
-    const Map<DynamicList<label> >& facePointEdges,
+    const Map<DynamicList<label>>& facePointEdges,
     const Map<label>& pointVisited,
     const point& pt,
     const label excludePointI,
@@ -699,7 +699,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace
 (
     const triSurface& surf,
     const label faceI,
-    const Map<DynamicList<label> >& facePointEdges,
+    const Map<DynamicList<label>>& facePointEdges,
     const Map<label>& visited,
     edgeSurface& eSurf
 )
@@ -755,7 +755,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace
     {
         scalar minDist = GREAT;
 
-        forAllConstIter(Map<DynamicList<label> >, facePointEdges, iter)
+        forAllConstIter(Map<DynamicList<label>>, facePointEdges, iter)
         {
             label pointI = iter.key();
 
@@ -798,7 +798,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace
     {
         scalar minDist = GREAT;
 
-        forAllConstIter(Map<DynamicList<label> >, facePointEdges, iter)
+        forAllConstIter(Map<DynamicList<label>>, facePointEdges, iter)
         {
             label pointI = iter.key();
 
@@ -875,7 +875,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
     const labelList& fEdges = eSurf.faceEdges()[faceI];
 
     // Create local (for the face only) point-edge connectivity.
-    Map<DynamicList<label> > facePointEdges
+    Map<DynamicList<label>> facePointEdges
     (
         calcPointEdgeAddressing
         (
diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H
index c6499cb4d37ad0d975d484dd73f9ac561b9fdede..8b0c105c7db875e51f89263d6830318da3d832e6 100644
--- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H
+++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,7 +167,7 @@ private:
         );
 
         //- Calculate point-edge addressing for single face only.
-        static Map<DynamicList<label> > calcPointEdgeAddressing
+        static Map<DynamicList<label>> calcPointEdgeAddressing
         (
             const edgeSurface&,
             const label faceI
@@ -181,7 +181,7 @@ private:
             const Map<label>& visited,
             const label faceI,
             const vector& n,                // original triangle normal
-            const Map<DynamicList<label> >& facePointEdges,
+            const Map<DynamicList<label>>& facePointEdges,
             const label prevEdgeI,
             const label prevVertI
         );
@@ -192,7 +192,7 @@ private:
             const edgeSurface& eSurf,
             const label faceI,
             const vector& n,
-            const Map<DynamicList<label> >& facePointEdges,
+            const Map<DynamicList<label>>& facePointEdges,
 
             const label startEdgeI,
             const label startVertI,
@@ -206,7 +206,7 @@ private:
         (
             const edgeSurface& eSurf,
             const label faceI,
-            const Map<DynamicList<label> >& facePointEdges,
+            const Map<DynamicList<label>>& facePointEdges,
             const Map<label>& pointVisited,
             const point& pt,
             const label excludeFaceI,
@@ -221,7 +221,7 @@ private:
         (
             const triSurface& surf,
             const label faceI,
-            const Map<DynamicList<label> >& facePointEdges,
+            const Map<DynamicList<label>>& facePointEdges,
             const Map<label>& visited,
             edgeSurface& eSurf
         );
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C
index 1fc90e444f302558e23d49cc59634a61dfb1a9e5..83072093329ec2296cb4bf3e1179504800b709f9 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -134,7 +134,7 @@ void Foam::edgeIntersections::intersectEdges
         edgeDirs[i] = n;
     }
 
-    List<List<pointIndexHit> > edgeIntersections;
+    List<List<pointIndexHit>> edgeIntersections;
     querySurf2.findLineAll
     (
         start,
@@ -445,7 +445,7 @@ bool Foam::edgeIntersections::offsetPerturb
 // Construct null
 Foam::edgeIntersections::edgeIntersections()
 :
-    List<List<pointIndexHit> >(),
+    List<List<pointIndexHit>>(),
     classification_()
 {}
 
@@ -457,7 +457,7 @@ Foam::edgeIntersections::edgeIntersections
     const scalarField& surf1PointTol
 )
 :
-    List<List<pointIndexHit> >(surf1.nEdges()),
+    List<List<pointIndexHit>>(surf1.nEdges()),
     classification_(surf1.nEdges())
 {
     checkEdges(surf1);
@@ -480,11 +480,11 @@ Foam::edgeIntersections::edgeIntersections
 // Construct from components
 Foam::edgeIntersections::edgeIntersections
 (
-    const List<List<pointIndexHit> >& intersections,
+    const List<List<pointIndexHit>>& intersections,
     const labelListList& classification
 )
 :
-    List<List<pointIndexHit> >(intersections),
+    List<List<pointIndexHit>>(intersections),
     classification_(classification)
 {}
 
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.H b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.H
index d1822151f6e4611b4e4120740c931a93624885b2..3411a0594892a3def47727e9a06983cc078bebd9 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.H
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ class edge;
 
 class edgeIntersections
 :
-    public List<List<pointIndexHit> >
+    public List<List<pointIndexHit>>
 {
     // Private data
 
@@ -165,7 +165,7 @@ public:
         //- Construct from components
         edgeIntersections
         (
-            const List<List<pointIndexHit> >&,
+            const List<List<pointIndexHit>>&,
             const labelListList&
         );
 
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C
index d864315329177d80a34479bda6b60e785ae1bbf7..301bd745c076c6200ee0311c3fd8b8237b5875a5 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -282,7 +282,7 @@ void Foam::surfaceIntersection::classifyHit
 
     DynamicList<edge>& allCutEdges,
     DynamicList<point>& allCutPoints,
-    List<DynamicList<label> >& surfEdgeCuts
+    List<DynamicList<label>>& surfEdgeCuts
 )
 {
     const edge& e = surf1.edges()[edgeI];
@@ -563,7 +563,7 @@ void Foam::surfaceIntersection::doCutEdges
 
     DynamicList<edge>& allCutEdges,
     DynamicList<point>& allCutPoints,
-    List<DynamicList<label> >& surfEdgeCuts
+    List<DynamicList<label>>& surfEdgeCuts
 )
 {
     scalar oldTol = intersection::setPlanarTol(1e-3);
@@ -738,7 +738,7 @@ Foam::surfaceIntersection::surfaceIntersection
 
 
     // From edge to cut index on surface1
-    List<DynamicList<label> > edgeCuts1(query1.surface().nEdges());
+    List<DynamicList<label>> edgeCuts1(query1.surface().nEdges());
 
     doCutEdges
     (
@@ -765,7 +765,7 @@ Foam::surfaceIntersection::surfaceIntersection
     }
 
     // From edge to cut index
-    List<DynamicList<label> > edgeCuts2(query2.surface().nEdges());
+    List<DynamicList<label>> edgeCuts2(query2.surface().nEdges());
 
     doCutEdges
     (
@@ -842,7 +842,7 @@ Foam::surfaceIntersection::surfaceIntersection
 
     {
         // From edge to cut index on surface1
-        List<DynamicList<label> > edgeCuts1(surf1.nEdges());
+        List<DynamicList<label>> edgeCuts1(surf1.nEdges());
 
         forAll(intersections1, edgeI)
         {
@@ -883,7 +883,7 @@ Foam::surfaceIntersection::surfaceIntersection
 
     {
         // From edge to cut index on surface2
-        List<DynamicList<label> > edgeCuts2(surf2.nEdges());
+        List<DynamicList<label>> edgeCuts2(surf2.nEdges());
 
         forAll(intersections2, edgeI)
         {
@@ -1000,7 +1000,7 @@ Foam::surfaceIntersection::surfaceIntersection
     DynamicList<point> allCutPoints;
 
     // From edge to cut index on surface1
-    List<DynamicList<label> > edgeCuts1(query1.surface().nEdges());
+    List<DynamicList<label>> edgeCuts1(query1.surface().nEdges());
 
     doCutEdges
     (
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H
index 73638b43320f485072be761526fc50db108a5656..685d2ea2175ae26d1d0f9a0e5e0f503062091bb9 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,9 +119,9 @@ class surfaceIntersection
             Ostream&
         );
 
-        //- Transfer contents of List<DynamicList<..> > to List<List<..>>
+        //- Transfer contents of List<DynamicList<..>> to List<List<..>>
         template<class T>
-        static void transfer(List<DynamicList<T> >&,  List<List<T> >&);
+        static void transfer(List<DynamicList<T>>&,  List<List<T>>&);
 
         //- Get minimum length of all edges connected to point
         static scalar minEdgeLen(const triSurface& surf, const label pointI);
@@ -216,7 +216,7 @@ class surfaceIntersection
 
             DynamicList<edge>& allCutEdges,
             DynamicList<point>& allCutPoints,
-            List<DynamicList<label> >& surfEdgeCuts
+            List<DynamicList<label>>& surfEdgeCuts
         );
 
         //- Cut edges of surf1 with surface 2.
@@ -229,7 +229,7 @@ class surfaceIntersection
 
             DynamicList<edge>& allCutEdges,
             DynamicList<point>& allCutPoints,
-            List<DynamicList<label> >& surfEdgeCuts
+            List<DynamicList<label>>& surfEdgeCuts
         );
 
 
@@ -294,7 +294,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "surfaceIntersectionTemplates.C"
+    #include "surfaceIntersectionTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C
index 753eeec355813a64fa2cda38a3f15e7343c44778..aff5455ae00aeea5020cba1098ef2ee878f82633 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -184,7 +184,7 @@ Foam::edgeList Foam::surfaceIntersection::filterEdges
     labelList& map
 )
 {
-    HashSet<edge, Hash<edge> > uniqueEdges(10*edges.size());
+    HashSet<edge, Hash<edge>> uniqueEdges(10*edges.size());
 
     edgeList newEdges(edges.size());
 
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionTemplates.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionTemplates.C
index 938216f3c935c2412d24b4a79fff1e15a0772fb7..af0ce2cf41f6d6bf3acf55516ab3aa74e4983856 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionTemplates.C
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,8 +31,8 @@ License
 template<class T>
 void Foam::surfaceIntersection::transfer
 (
-    List<DynamicList<T> >& srcLst,
-    List<List<T> >& dstLst
+    List<DynamicList<T>>& srcLst,
+    List<List<T>>& dstLst
 )
 {
     dstLst.setSize(srcLst.size());
diff --git a/src/meshTools/triSurface/orientedSurface/orientedSurface.C b/src/meshTools/triSurface/orientedSurface/orientedSurface.C
index 05ad8dc7688e8a20b224cb6d1ae5f1e7f3deeccc..2f117fd9b9731ae0e9ce254edcc8c249789eeed5 100644
--- a/src/meshTools/triSurface/orientedSurface/orientedSurface.C
+++ b/src/meshTools/triSurface/orientedSurface/orientedSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -259,7 +259,7 @@ void Foam::orientedSurface::findZoneSide
     isOutside = false;
 
     pointField start(1, outsidePoint);
-    List<List<pointIndexHit> > hits(1, List<pointIndexHit>());
+    List<List<pointIndexHit>> hits(1, List<pointIndexHit>());
 
     forAll(faceZone, faceI)
     {
diff --git a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C
index 8212899215af22e24c3acb70345a8ca1f48ab646..2462180a123200f8681cfca209a2fc0977707e98 100644
--- a/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C
+++ b/src/meshTools/triSurface/surfaceFeatures/surfaceFeatures.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,15 +39,14 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(surfaceFeatures, 0);
+    defineTypeNameAndDebug(surfaceFeatures, 0);
 
-const scalar surfaceFeatures::parallelTolerance = sin(degToRad(1.0));
+    const scalar surfaceFeatures::parallelTolerance = sin(degToRad(1.0));
 }
 
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-//- Get nearest point on edge and classify position on edge.
 Foam::pointIndexHit Foam::surfaceFeatures::edgeNearest
 (
     const point& start,
@@ -498,7 +497,6 @@ Foam::surfaceFeatures::surfaceFeatures
 }
 
 
-//- Construct from dictionary
 Foam::surfaceFeatures::surfaceFeatures
 (
     const triSurface& surf,
@@ -513,7 +511,6 @@ Foam::surfaceFeatures::surfaceFeatures
 {}
 
 
-//- Construct from file
 Foam::surfaceFeatures::surfaceFeatures
 (
     const triSurface& surf,
@@ -618,7 +615,6 @@ Foam::surfaceFeatures::surfaceFeatures
 }
 
 
-//- Construct as copy
 Foam::surfaceFeatures::surfaceFeatures(const surfaceFeatures& sf)
 :
     surf_(sf.surface()),
diff --git a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.C b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.C
index 1063a7f6b8dd7873a5d298bcb0f884a80474cbde..d3a16dd2bcd0e5a1acd7f854ca7c7ad2ebe1ec23 100644
--- a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.C
+++ b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,7 +46,7 @@ Foam::vector Foam::surfaceLocation::normal(const triSurface& s) const
         }
         else
         {
-            vector edgeNormal(vector::zero);
+            vector edgeNormal(Zero);
 
             forAll(eFaces, i)
             {
diff --git a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H
index df1721a6941fca263a636e6148a4a7298eea3686..d9591b4d55804add11ee0c658afc9fa180abdb1d 100644
--- a/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H
+++ b/src/meshTools/triSurface/surfaceLocation/surfaceLocation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,16 +26,21 @@ Class
 
 Description
     Contains information about location on a triSurface:
-    - pointIndexHit:
+
+    \li pointIndexHit:
         - location
         - bool: hit/miss
         - index (of triangle/point/edge)
-    - elementType():
+
+    \li elementType():
         - what index above relates to. In triangle::proxType
-    - triangle():
+
+    \li triangle():
         - last known triangle
 
+
 SourceFiles
+    surfaceLocation.C
 
 \*---------------------------------------------------------------------------*/
 
diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C
index b3c58c0e962cd981e64c92e4e5786f5b505475df..f8fd6c096eb1566f50cfcbf9773a21c68dc70d59 100644
--- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C
+++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -121,7 +121,7 @@ Foam::triSurfaceRegionSearch::treeByRegion() const
             );
 
             // Calculate bb without constructing local point numbering.
-            treeBoundBox bb(vector::zero, vector::zero);
+            treeBoundBox bb(Zero, Zero);
 
             if (indirectRegionPatches_[regionI].size())
             {
diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C
index 7e5e88bbd2b75c3175ebc508ebdd494026e8d425..8914b21d1ba4ac156631666da122ed73d9bbdbbb 100644
--- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C
+++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -200,7 +200,7 @@ Foam::triSurfaceSearch::tree() const
     if (treePtr_.empty())
     {
         // Calculate bb without constructing local point numbering.
-        treeBoundBox bb(vector::zero, vector::zero);
+        treeBoundBox bb(Zero, Zero);
 
         if (surface().size())
         {
@@ -371,7 +371,7 @@ void Foam::triSurfaceSearch::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     const indexedOctree<treeDataTriSurface>& octree = tree();
diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H
index f4176f3cfac63d7865b1b9485c56a765cba924bc..1debfc8ff64e2fc35399e1787863739cc8178d2d 100644
--- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H
+++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ class triSurfaceSearch
         label maxTreeDepth_;
 
         //- Octree for searches
-        mutable autoPtr<indexedOctree<treeDataTriSurface> > treePtr_;
+        mutable autoPtr<indexedOctree<treeDataTriSurface>> treePtr_;
 
 
     // Private Member Functions
@@ -176,7 +176,7 @@ public:
         (
             const pointField& start,
             const pointField& end,
-            List<List<pointIndexHit> >& info
+            List<List<pointIndexHit>>& info
         ) const;
 };
 
diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C
index 3810acc2210fd950b424ef68873ff2d2fafd7971..e61a40391e9c6f836c056d18a01c2176fcca41c6 100644
--- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C
+++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(pointToPointPlanarInterpolation, 0);
+    defineTypeNameAndDebug(pointToPointPlanarInterpolation, 0);
 }
 
 
@@ -112,7 +112,7 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem
 
     if (debug)
     {
-        Info<< "pointToPointPlanarInterpolation::calcCoordinateSystem :"
+        InfoInFunction
             << " Used points " << p0 << ' ' << points[index1]
             << ' ' << points[index2]
             << " to define coordinate system with normal " << n << endl;
@@ -197,14 +197,14 @@ void Foam::pointToPointPlanarInterpolation::calcWeights
         (
             referenceCS_.localPosition(sourcePoints)
         );
-        vectorField& localVertices = tlocalVertices();
+        vectorField& localVertices = tlocalVertices.ref();
 
         const boundBox bb(localVertices, true);
         const point bbMid(bb.midpoint());
 
         if (debug)
         {
-            Info<< "pointToPointPlanarInterpolation::calcWeights :"
+            InfoInFunction
                 << " Perturbing points with " << perturb_
                 << " fraction of a random position inside " << bb
                 << " to break any ties on regular meshes."
diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H
index 4683dcd4e414484022d066e57500ee02f927e2a4..85f6743485e32d4af3034b37d07feda62570e6d3 100644
--- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H
+++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,11 +67,11 @@ class pointToPointPlanarInterpolation
 
         //- Current interpolation addressing to face centres of underlying
         //  patch
-        List<FixedList<label, 3> > nearestVertex_;
+        List<FixedList<label, 3>> nearestVertex_;
 
         //- Current interpolation factors to face centres of underlying
         //  patch
-        List<FixedList<scalar, 3> > nearestVertexWeight_;
+        List<FixedList<scalar, 3>> nearestVertexWeight_;
 
     // Private Member Functions
 
@@ -130,14 +130,14 @@ public:
         }
 
         //  patch
-        const List<FixedList<label, 3> >& nearestVertex() const
+        const List<FixedList<label, 3>>& nearestVertex() const
         {
             return nearestVertex_;
         }
 
         //- Current interpolation factors to face centres of underlying
         //  patch
-        const List<FixedList<scalar, 3> >& nearestVertexWeight() const
+        const List<FixedList<scalar, 3>>& nearestVertexWeight() const
         {
             return nearestVertexWeight_;
         }
@@ -157,7 +157,7 @@ public:
 
         //- Interpolate from field on source points to dest points
         template<class Type>
-        tmp<Field<Type> > interpolate(const Field<Type>& sourceFld) const;
+        tmp<Field<Type>> interpolate(const Field<Type>& sourceFld) const;
 
 };
 
@@ -169,7 +169,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "pointToPointPlanarInterpolationTemplates.C"
+    #include "pointToPointPlanarInterpolationTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolationTemplates.C b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolationTemplates.C
index 96c9481f5c44494b241013447f33036d95431821..03c34e0e49cfb73cab12456170e9ebc4c7e3f5b8 100644
--- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolationTemplates.C
+++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolationTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::pointToPointPlanarInterpolation::interpolate
+Foam::tmp<Foam::Field<Type>> Foam::pointToPointPlanarInterpolation::interpolate
 (
     const Field<Type>& sourceFld
 ) const
@@ -41,8 +41,8 @@ Foam::tmp<Foam::Field<Type> > Foam::pointToPointPlanarInterpolation::interpolate
             << exit(FatalError);
     }
 
-    tmp<Field<Type> > tfld(new Field<Type>(nearestVertex_.size()));
-    Field<Type>& fld = tfld();
+    tmp<Field<Type>> tfld(new Field<Type>(nearestVertex_.size()));
+    Field<Type>& fld = tfld.ref();
 
     forAll(fld, i)
     {
diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
index 441f6136e9500bd93bb49dfbc57a368bd1ce41ee..47d20dcfc0c1fbbaeb13c019002a2ce144959849 100644
--- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
+++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -451,8 +451,8 @@ void Foam::triSurfaceTools::getMergedEdges
     const triSurface& surf,
     const label edgeI,
     const labelHashSet& collapsedFaces,
-    HashTable<label, label, Hash<label> >& edgeToEdge,
-    HashTable<label, label, Hash<label> >& edgeToFace
+    HashTable<label, label, Hash<label>>& edgeToEdge,
+    HashTable<label, label, Hash<label>>& edgeToFace
 )
 {
     const edge& e = surf.edges()[edgeI];
@@ -534,8 +534,8 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle
     const label v1,
     const point& pt,
     const labelHashSet& collapsedFaces,
-    const HashTable<label, label, Hash<label> >& edgeToEdge,
-    const HashTable<label, label, Hash<label> >& edgeToFace,
+    const HashTable<label, label, Hash<label>>& edgeToEdge,
+    const HashTable<label, label, Hash<label>>& edgeToFace,
     const label faceI,
     const label edgeI
 )
@@ -624,16 +624,14 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle
 }
 
 
-//- Calculate minimum (cos of) edge angle using addressing from collapsing
-//  edge to v1 at pt.
 Foam::scalar Foam::triSurfaceTools::collapseMinCosAngle
 (
     const triSurface& surf,
     const label v1,
     const point& pt,
     const labelHashSet& collapsedFaces,
-    const HashTable<label, label, Hash<label> >& edgeToEdge,
-    const HashTable<label, label, Hash<label> >& edgeToFace
+    const HashTable<label, label, Hash<label>>& edgeToEdge,
+    const HashTable<label, label, Hash<label>>& edgeToFace
 )
 {
     const labelList& v1Faces = surf.pointFaces()[v1];
@@ -686,8 +684,8 @@ bool Foam::triSurfaceTools::collapseCreatesFold
     const label v1,
     const point& pt,
     const labelHashSet& collapsedFaces,
-    const HashTable<label, label, Hash<label> >& edgeToEdge,
-    const HashTable<label, label, Hash<label> >& edgeToFace,
+    const HashTable<label, label, Hash<label>>& edgeToEdge,
+    const HashTable<label, label, Hash<label>>& edgeToFace,
     const scalar minCos
 )
 {
@@ -751,7 +749,7 @@ bool Foam::triSurfaceTools::collapseCreatesFold
 //    // neighbours actually contains the
 //    // edge with which triangle connects to collapsedFaces.
 //
-//    HashTable<label, label, Hash<label> > neighbours;
+//    HashTable<label, label, Hash<label>> neighbours;
 //
 //    labelList collapsed = collapsedFaces.toc();
 //
@@ -2120,7 +2118,7 @@ Foam::vector Foam::triSurfaceTools::surfaceNormal
         // Calculate edge normal by averaging face normals
         const labelList& eFaces = surf.edgeFaces()[edgeI];
 
-        vector edgeNormal(vector::zero);
+        vector edgeNormal(Zero);
 
         forAll(eFaces, i)
         {
@@ -2621,8 +2619,8 @@ void Foam::triSurfaceTools::calcInterpolationWeights
 (
     const triSurface& s,
     const pointField& samplePts,
-    List<FixedList<label, 3> >& allVerts,
-    List<FixedList<scalar, 3> >& allWeights
+    List<FixedList<label, 3>>& allVerts,
+    List<FixedList<scalar, 3>>& allWeights
 )
 {
     allVerts.setSize(samplePts.size());
diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H
index 82a808b1d7f19cc1fbd01f0852b441438c4c17c9..ed7a14daf6df89e137ed3f44ad0887a6472ea497 100644
--- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H
+++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,8 +139,8 @@ class triSurfaceTools
                 const triSurface& surf,
                 const label edgeI,
                 const labelHashSet& collapsedFaces,
-                HashTable<label, label, Hash<label> >& edgeToEdge,
-                HashTable<label, label, Hash<label> >& edgeToFace
+                HashTable<label, label, Hash<label>>& edgeToEdge,
+                HashTable<label, label, Hash<label>>& edgeToFace
             );
 
             //- Calculates (cos of) angle across edgeI of faceI,
@@ -152,8 +152,8 @@ class triSurfaceTools
                 const label v1,
                 const point& pt,
                 const labelHashSet& collapsedFaces,
-                const HashTable<label, label, Hash<label> >& edgeToEdge,
-                const HashTable<label, label, Hash<label> >& edgeToFace,
+                const HashTable<label, label, Hash<label>>& edgeToEdge,
+                const HashTable<label, label, Hash<label>>& edgeToFace,
                 const label faceI,
                 const label edgeI
             );
@@ -168,8 +168,8 @@ class triSurfaceTools
                 const label v1,
                 const point& pt,
                 const labelHashSet& collapsedFaces,
-                const HashTable<label, label, Hash<label> >& edgeToEdge,
-                const HashTable<label, label, Hash<label> >& edgeToFace
+                const HashTable<label, label, Hash<label>>& edgeToEdge,
+                const HashTable<label, label, Hash<label>>& edgeToFace
             );
 
             //- Like collapseMinCosAngle but return true for value < minCos
@@ -179,8 +179,8 @@ class triSurfaceTools
                 const label v1,
                 const point& pt,
                 const labelHashSet& collapsedFaces,
-                const HashTable<label, label, Hash<label> >& edgeToEdge,
-                const HashTable<label, label, Hash<label> >& edgeToFace,
+                const HashTable<label, label, Hash<label>>& edgeToEdge,
+                const HashTable<label, label, Hash<label>>& edgeToFace,
                 const scalar minCos
             );
 
@@ -190,7 +190,7 @@ class triSurfaceTools
             //(
             //    const triSurface& surf,
             //    const label edgeI,
-            //    const HashTable<bool, label, Hash<label> >& collapsedFaces
+            //    const HashTable<bool, label, Hash<label>>& collapsedFaces
             //);
 
         // Tracking
@@ -507,8 +507,8 @@ public:
         (
             const triSurface& s,
             const pointField& samplePts,
-            List<FixedList<label, 3> >& verts,
-            List<FixedList<scalar, 3> >& weights
+            List<FixedList<label, 3>>& verts,
+            List<FixedList<scalar, 3>>& weights
         );
 
         //- Do unconstrained Delaunay of points. Returns triSurface with 3D
diff --git a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C
index 95b1701ea3f1b9361001c3466caaf8fad6936e56..61689f137a6e4dabe0161d80aba3e74bb80ab488 100644
--- a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C
+++ b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -201,7 +201,7 @@ Foam::twoDPointCorrector::twoDPointCorrector(const polyMesh& mesh)
     planeNormalPtr_(NULL),
     normalEdgeIndicesPtr_(NULL),
     isWedge_(false),
-    wedgeAxis_(vector::zero),
+    wedgeAxis_(Zero),
     wedgeAngle_(0.0)
 {}
 
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
index 97d62f0612ed8c119939c0d24b344ca9c0d5fdeb..9976f017a6502e35b5913de17335d3fa1c16ec79 100755
--- a/src/parallel/Allwmake
+++ b/src/parallel/Allwmake
@@ -11,4 +11,4 @@ reconstruct/Allwmake $targetType $*
 wmake $targetType distributed
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake
index bee297a6e957789e084b82decd3ef49745130ea6..8202a2527864ef347e153a1494f785b8d77ece21 100755
--- a/src/parallel/decompose/Allwmake
+++ b/src/parallel/decompose/Allwmake
@@ -6,13 +6,13 @@ targetType=libso
 . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 # get SCOTCH_VERSION, SCOTCH_ARCH_PATH
-if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
+if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
 then
     . $settings
     echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
 else
     echo
-    echo "Error: no config/scotch.sh settings"
+    echo "Error: no config.sh/scotch settings"
     echo
 fi
 
@@ -78,4 +78,4 @@ wmake $targetType decompositionMethods
 
 wmake $targetType decompose
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/parallel/decompose/AllwmakeLnInclude b/src/parallel/decompose/AllwmakeLnInclude
index b2ee544686d780cd9b5b92423f9f3f2073e369e1..4f421640947ca9a44905439c9b1b5d98d815d0b5 100755
--- a/src/parallel/decompose/AllwmakeLnInclude
+++ b/src/parallel/decompose/AllwmakeLnInclude
@@ -7,4 +7,4 @@ wmakeLnInclude metisDecomp
 wmakeLnInclude scotchDecomp
 wmakeLnInclude ptscotchDecomp
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/parallel/decompose/decompose/fvFieldDecomposer.H b/src/parallel/decompose/decompose/fvFieldDecomposer.H
index 0bf83369e6245ebe4afa7fc3d9920ca8330c0cb2..c6953b37a4aa056e5d415b70ce6e6771da4edc63 100644
--- a/src/parallel/decompose/decompose/fvFieldDecomposer.H
+++ b/src/parallel/decompose/decompose/fvFieldDecomposer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -256,7 +256,7 @@ public:
 
         //- Decompose volume field
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> >
+        tmp<GeometricField<Type, fvPatchField, volMesh>>
         decomposeField
         (
             const GeometricField<Type, fvPatchField, volMesh>& field,
@@ -265,7 +265,7 @@ public:
 
         //- Decompose surface field
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         decomposeField
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>& field
@@ -283,7 +283,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvFieldDecomposerDecomposeFields.C"
+    #include "fvFieldDecomposerDecomposeFields.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
index fa3594d93abff2525945a5bb7024fe3116c7ad97..65875e91fbef82627f3f5311e114416d21dc2ec0 100644
--- a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
+++ b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::fvFieldDecomposer::decomposeField
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
@@ -41,7 +41,7 @@ Foam::fvFieldDecomposer::decomposeField
 ) const
 {
     // 1. Create the complete field with dummy patch fields
-    PtrList<fvPatchField<Type> > patchFields(boundaryAddressing_.size());
+    PtrList<fvPatchField<Type>> patchFields(boundaryAddressing_.size());
 
     forAll(boundaryAddressing_, patchi)
     {
@@ -58,7 +58,7 @@ Foam::fvFieldDecomposer::decomposeField
     }
 
     // Create the field for the processor
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tresF
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tresF
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -76,7 +76,7 @@ Foam::fvFieldDecomposer::decomposeField
             patchFields
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
+    GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvPatchFields to the correct type using a mapper
@@ -160,7 +160,7 @@ Foam::fvFieldDecomposer::decomposeField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fvFieldDecomposer::decomposeField
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& field
@@ -212,7 +212,7 @@ Foam::fvFieldDecomposer::decomposeField
 
 
     // 1. Create the complete field with dummy patch fields
-    PtrList<fvsPatchField<Type> > patchFields(boundaryAddressing_.size());
+    PtrList<fvsPatchField<Type>> patchFields(boundaryAddressing_.size());
 
     forAll(boundaryAddressing_, patchi)
     {
@@ -228,7 +228,7 @@ Foam::fvFieldDecomposer::decomposeField
         );
     }
 
-    tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tresF
+    tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tresF
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -246,7 +246,7 @@ Foam::fvFieldDecomposer::decomposeField
             patchFields
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvsPatchFields to the correct type using a mapper
diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C
index e0a5e6ffa43830137d5b986f9a852e1ad149fca8..e83c20ebd0415bc0c26ee55af0c7505623a2e110 100644
--- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C
+++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C
@@ -75,7 +75,7 @@ singleProcessorFaceSetsConstraint
 Foam::decompositionConstraints::singleProcessorFaceSetsConstraint::
 singleProcessorFaceSetsConstraint
 (
-    const List<Tuple2<word, label> >& setNameAndProcs
+    const List<Tuple2<word, label>>& setNameAndProcs
 )
 :
     decompositionConstraint(dictionary(), typeName),
diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.H b/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.H
index 1824fe25af32693a238cb37c4934fa1e19137b06..f82d9014a666cc4f26c8f36108c050eabe07a0ba 100644
--- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.H
+++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.H
@@ -58,7 +58,7 @@ class singleProcessorFaceSetsConstraint
     // Private data
 
         //- List of faceSet+processor
-        List<Tuple2<word, label> > setNameAndProcs_;
+        List<Tuple2<word, label>> setNameAndProcs_;
 
 public:
 
@@ -78,7 +78,7 @@ public:
         //- Construct from components
         singleProcessorFaceSetsConstraint
         (
-            const List<Tuple2<word, label> >& setNameAndProcs
+            const List<Tuple2<word, label>>& setNameAndProcs
         );
 
 
diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C
index e668aba4a79c1631b9dc874ad84b235132e3e28e..fd255b39e5738bd4bec5d4d10eeb529b55d2cd0f 100644
--- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C
+++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ Foam::decompositionMethod::decompositionMethod
         ) == -1
     )
     {
-        const List<Tuple2<word, label> > zNameAndProcs
+        const List<Tuple2<word, label>> zNameAndProcs
         (
             decompositionDict_.lookup("singleProcessorFaceSets")
         );
diff --git a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C
index f282c211e6078dbf780d465082108d970614f174..f99e59bfba96cd89c6cc5654a8ed021d361a908a 100644
--- a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C
+++ b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ void Foam::multiLevelDecomp::subsetGlobalCellCells
     subCellCells = UIndirectList<labelList>(cellCells, set);
 
     // Get new indices for neighbouring processors
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
     mapDistribute map(globalCells, subCellCells, compactMap);
     map.distribute(oldToNew);
     labelList allDist(dist);
diff --git a/src/parallel/decompose/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C b/src/parallel/decompose/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C
index 0af2348247366546c9a57fd6c1a4da3b473e828f..e0e27a516630ff51ed7609b645716398dfe1c1b1 100644
--- a/src/parallel/decompose/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C
+++ b/src/parallel/decompose/decompositionMethods/simpleGeomDecomp/simpleGeomDecomp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -325,7 +325,7 @@ Foam::labelList Foam::simpleGeomDecomp::decompose
 
             label nTotalPoints = 0;
             // Master first
-            SubField<point>(allPoints, points.size()).assign(points);
+            SubField<point>(allPoints, points.size()) = points;
             nTotalPoints += points.size();
 
             // Add slaves
@@ -338,7 +338,7 @@ Foam::labelList Foam::simpleGeomDecomp::decompose
                     allPoints,
                     nbrPoints.size(),
                     nTotalPoints
-                ).assign(nbrPoints);
+                ) = nbrPoints;
                 nTotalPoints += nbrPoints.size();
             }
 
@@ -401,8 +401,8 @@ Foam::labelList Foam::simpleGeomDecomp::decompose
 
             label nTotalPoints = 0;
             // Master first
-            SubField<point>(allPoints, points.size()).assign(points);
-            SubField<scalar>(allWeights, points.size()).assign(weights);
+            SubField<point>(allPoints, points.size()) = points;
+            SubField<scalar>(allWeights, points.size()) = weights;
             nTotalPoints += points.size();
 
             // Add slaves
@@ -416,13 +416,13 @@ Foam::labelList Foam::simpleGeomDecomp::decompose
                     allPoints,
                     nbrPoints.size(),
                     nTotalPoints
-                ).assign(nbrPoints);
+                ) = nbrPoints;
                 SubField<scalar>
                 (
                     allWeights,
                     nbrWeights.size(),
                     nTotalPoints
-                ).assign(nbrWeights);
+                ) = nbrWeights;
                 nTotalPoints += nbrPoints.size();
             }
 
diff --git a/src/parallel/decompose/metisDecomp/Allwmake b/src/parallel/decompose/metisDecomp/Allwmake
index 549e4229b8a5d15b8f153a3114e8f4229bad9e22..d968333287d5d4e4eb5f8ab79691e3532c7b04dd 100755
--- a/src/parallel/decompose/metisDecomp/Allwmake
+++ b/src/parallel/decompose/metisDecomp/Allwmake
@@ -6,7 +6,7 @@ targetType=libso
 . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
 # get METIS_VERSION, METIS_ARCH_PATH
-if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh`
+if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis`
 then
     . $settings
     echo "using METIS_ARCH_PATH=$METIS_ARCH_PATH"
@@ -16,9 +16,9 @@ then
     fi
 else
     echo
-    echo "Error: no config/metis.sh settings"
+    echo "Error: no config.sh/metis settings"
     echo
 fi
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/parallel/decompose/metisDecomp/metisDecomp.C b/src/parallel/decompose/metisDecomp/metisDecomp.C
index 1fb0ea1c39d330605560057372c6e0e3ce56c47a..11b75a0ea068c6aa31fd23eafdcca664d74e0efe 100644
--- a/src/parallel/decompose/metisDecomp/metisDecomp.C
+++ b/src/parallel/decompose/metisDecomp/metisDecomp.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -25,7 +25,6 @@ License
 
 #include "metisDecomp.H"
 #include "addToRunTimeSelectionTable.H"
-#include "floatScalar.H"
 #include "Time.H"
 
 extern "C"
diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C
index 524a19faa63baf90da3bb81f6c6dfedd64489fc6..a168fcd05127a2effa5015bfdabfe944de9de4b3 100644
--- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C
+++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -218,10 +218,10 @@ extern "C"
 // Hack: scotch generates floating point errors so need to switch of error
 //       trapping!
 #ifdef __GLIBC__
-#   ifndef _GNU_SOURCE
-#       define _GNU_SOURCE
-#   endif
-#   include <fenv.h>
+    #ifndef _GNU_SOURCE
+        #define _GNU_SOURCE
+    #endif
+    #include <fenv.h>
 #endif
 
 
@@ -736,14 +736,14 @@ Foam::label Foam::ptscotchDecomp::decompose
 
 
     // Hack:switch off fpu error trapping
-#   ifdef  FE_NOMASK_ENV
+    #ifdef  FE_NOMASK_ENV
     int oldExcepts = fedisableexcept
     (
         FE_DIVBYZERO
       | FE_INVALID
       | FE_OVERFLOW
     );
-#   endif
+    #endif
 
 
     // Note: always provide allocated storage even if local size 0
@@ -766,9 +766,9 @@ Foam::label Foam::ptscotchDecomp::decompose
         "SCOTCH_graphMap"
     );
 
-#   ifdef  FE_NOMASK_ENV
+    #ifdef  FE_NOMASK_ENV
     feenableexcept(oldExcepts);
-#   endif
+    #endif
 
 
 
diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.H b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.H
index e0ae30e5cc2f5532dfdd136ef232abc298f8f28d..6aa45a29030941fdce41829602268ea21b604024 100644
--- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.H
+++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,24 @@ Class
     Foam::ptscotchDecomp
 
 Description
-    PTScotch domain decomposition
+    PTScotch domain decomposition.
+    For the main details about how to define the strategies, see scotchDecomp.
+
+    Nonetheless, when decomposing in parallel, using <tt>writeGraph=true</tt>
+    will write out \c .dgr files for debugging. For example, use these files
+    with \c dgpart as follows:
+
+    \verbatim
+    mpirun -np 4 dgpart 2 'region0_%r.dgr'
+    \endverbatim
+
+    where:
+
+    \li \c %r gets replaced by current processor rank
+    \li it will decompose into 2 domains
+
+SeeAlso
+    Foam::scotchDecomp
 
 SourceFiles
     ptscotchDecomp.C
@@ -161,7 +178,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ptscotchDecompTemplates.C"
+    #include "ptscotchDecompTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.C b/src/parallel/decompose/scotchDecomp/scotchDecomp.C
index fb74ba27c893308d1f3870c3005e2e91f2b599ef..3ea6c49bfaa996f5766e40813653387f227dff70 100644
--- a/src/parallel/decompose/scotchDecomp/scotchDecomp.C
+++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -138,10 +138,10 @@ extern "C"
 // Hack: scotch generates floating point errors so need to switch of error
 //       trapping!
 #ifdef __GLIBC__
-#   ifndef _GNU_SOURCE
-#       define _GNU_SOURCE
-#   endif
-#   include <fenv.h>
+    #ifndef _GNU_SOURCE
+        #define _GNU_SOURCE
+    #endif
+    #include <fenv.h>
 #endif
 
 
@@ -525,14 +525,14 @@ Foam::label Foam::scotchDecomp::decomposeOneProc
 
 
     // Hack:switch off fpu error trapping
-#   ifdef FE_NOMASK_ENV
+    #ifdef FE_NOMASK_ENV
     int oldExcepts = fedisableexcept
     (
         FE_DIVBYZERO
       | FE_INVALID
       | FE_OVERFLOW
     );
-#   endif
+    #endif
 
     finalDecomp.setSize(xadj.size()-1);
     finalDecomp = 0;
@@ -548,9 +548,9 @@ Foam::label Foam::scotchDecomp::decomposeOneProc
         "SCOTCH_graphMap"
     );
 
-#   ifdef FE_NOMASK_ENV
+    #ifdef FE_NOMASK_ENV
     feenableexcept(oldExcepts);
-#   endif
+    #endif
 
 
 
diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.H b/src/parallel/decompose/scotchDecomp/scotchDecomp.H
index 714bdb76fce8ceaf965b5847732596d135f0d444..a2a2a298ca17549e45d2472483943b6827627d1b 100644
--- a/src/parallel/decompose/scotchDecomp/scotchDecomp.H
+++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,9 +27,184 @@ Class
 Description
     Scotch domain decomposition.
     When run in parallel will collect the whole graph on to the master,
-    decompose and send back. Run ptscotchDecomp for proper distributed
+    decompose and send back. Use ptscotchDecomp for proper distributed
     decomposition.
 
+    Quoting from the Scotch forum, on the 2008-08-22 10:09, Francois
+    PELLEGRINI posted the following details:
+    \verbatim
+    RE: Graph mapping 'strategy' string
+
+    Strategy handling in Scotch is a bit tricky. In order
+    not to be confused, you must have a clear view of how they are built.
+    Here are some rules:
+
+    1- Strategies are made up of "methods" which are combined by means of
+    "operators".
+
+    2- A method is of the form "m{param=value,param=value,...}", where "m"
+    is a single character (this is your first error: "f" is a method name,
+    not a parameter name).
+
+    3- There exist different sort of strategies : bipartitioning strategies,
+    mapping strategies, ordering strategies, which cannot be mixed. For
+    instance, you cannot build a bipartitioning strategy and feed it to a
+    mapping method (this is your second error).
+
+    To use the "mapCompute" routine, you must create a mapping strategy, not
+    a bipartitioning one, and so use stratGraphMap() and not
+    stratGraphBipart(). Your mapping strategy should however be based on the
+    "recursive bipartitioning" method ("b"). For instance, a simple (and
+    hence not very efficient) mapping strategy can be :
+
+    "b{sep=f}"
+
+    which computes mappings with the recursive bipartitioning method "b",
+    this latter using the Fiduccia-Mattheyses method "f" to compute its
+    separators.
+
+    If you want an exact partition (see your previous post), try
+    "b{sep=fx}".
+
+    However, these strategies are not the most efficient, as they do not
+    make use of the multi-level framework.
+
+    To use the multi-level framework, try for instance:
+
+    "b{sep=m{vert=100,low=h,asc=f}x}"
+
+    The current default mapping strategy in Scotch can be seen by using the
+    "-vs" option of program gmap. It is, to date:
+
+    r
+    {
+        job=t,
+        map=t,
+        poli=S,
+        sep=
+        (
+            m
+            {
+                asc=b
+                {
+                    bnd=
+                    (
+                        d{pass=40,dif=1,rem=1}
+                     |
+                    )
+                    f{move=80,pass=-1,bal=0.002491},
+                    org=f{move=80,pass=-1,bal=0.002491},
+                    width=3
+                },
+                low=h{pass=10}
+                f{move=80,pass=-1,bal=0.002491},
+                type=h,
+                vert=80,
+                rat=0.8
+            }
+          | m
+            {
+                asc=b
+                {
+                    bnd=
+                    (
+                        d{pass=40,dif=1,rem=1}
+                      |
+                    )
+                    f{move=80,pass=-1,bal=0.002491},
+                    org=f{move=80,pass=-1,bal=0.002491},
+                    width=3
+                },
+                low=h{pass=10}
+                f{move=80,pass=-1,bal=0.002491},
+                type=h,
+                vert=80,
+                rat=0.8
+            }
+        )
+    }
+    \endverbatim
+
+    Given that this information was written in 2008, this example strategy will
+    unlikely work as-is with the more recent Scotch versions. Therefore, the
+    steps for getting the current default strategy from within Scotch, is to do
+    the following steps:
+
+    <ol>
+    <li> Edit the file <tt>system/decomposeParDict</tt> and use the following
+    settings:
+
+    \verbatim
+    method          scotch;
+
+    scotchCoeffs
+    {
+        writeGraph true;
+    }
+    \endverbatim
+    </li>
+
+    <li> Run \c decomposePar. For example, it will write a file named
+         <tt>region0.grf</tt>.
+    </li>
+
+    <li> Now, instead of using \c gmap, run \c gpart with the following
+    command structure to get the default strategy:
+
+    \verbatim
+    gpart \<nProcs\> -vs \<grfFile\>
+    \endverbatim
+
+    where:
+
+    <ul>
+        <li> \<grfFile\> is the file that was obtained with the option
+             <tt>writeGraph=true</tt>, namely <tt>region0.grf</tt>.
+        </li>
+        <li> \<nProcs\> is the \c numberOfSubdomains defined in the dictionary
+             file.
+        </li>
+    </ul>
+    </li>
+
+    <li> At the end of the execution will be shown a long string, similar to
+    the following example (complete line was cropped at <tt>[...]</tt>):
+
+    \verbatim
+    S    Strat=m{asc=b{width=3,bnd=d{pass=40,dif=1,rem=0}[...],type=h}
+    \endverbatim
+    </li>
+
+    <li> Edit the file <tt>system/decomposeParDict</tt> once again and add
+    the \c strategy entry as exemplified:
+
+    \verbatim
+    method          scotch;
+
+    scotchCoeffs
+    {
+        //writeGraph true;
+        strategy "m{asc=b{width=3,bnd=d{pass=40,dif=1,rem=0}[...],type=h}";
+    }
+    \endverbatim
+    </li>
+
+    <li> Finally, run \c decomposePar once again, to at least test if it
+         works as intended.
+    </li>
+
+    </ol>
+
+Note
+    \c gpart can be found in the current search path by adding the respective
+    \c bin folder from the Scotch installation, namely by running the following
+    commands:
+
+    \verbatim
+    source $(foamEtcFile config.sh/scotch)
+    export PATH=$PATH:$SCOTCH_ARCH_PATH/bin
+    \endverbatim
+
 SourceFiles
     scotchDecomp.C
 
diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
index cd3fc9c059c4305d70ee8eb8acefe0fc21d08dd7..9db0d72d4a00037cfb1cdac3283a79ced168a469 100644
--- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
+++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -181,7 +181,7 @@ void Foam::distributedTriSurfaceMesh::distributeSegment
 
     DynamicList<segment>& allSegments,
     DynamicList<label>& allSegmentMap,
-    List<DynamicList<label> >& sendMap
+    List<DynamicList<label>>& sendMap
 ) const
 {
     // 1. Fully local already handled outside. Note: retest is cheap.
@@ -278,7 +278,7 @@ Foam::distributedTriSurfaceMesh::distributeSegments
         // Original index of segment
         DynamicList<label> dynAllSegmentMap(start.size());
         // Per processor indices into allSegments to send
-        List<DynamicList<label> > dynSendMap(Pstream::nProcs());
+        List<DynamicList<label>> dynSendMap(Pstream::nProcs());
 
         forAll(start, segmentI)
         {
@@ -712,7 +712,7 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries
         // Original index of segment
         DynamicList<label> dynAllSegmentMap(centres.size());
         // Per processor indices into allSegments to send
-        List<DynamicList<label> > dynSendMap(Pstream::nProcs());
+        List<DynamicList<label>> dynSendMap(Pstream::nProcs());
 
         // Work array - whether processor bb overlaps the bounding sphere.
         boolList procBbOverlaps(Pstream::nProcs());
@@ -808,7 +808,7 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries
 // Returns a per processor a list of bounding boxes that most accurately
 // describe the shape. For now just a single bounding box per processor but
 // optimisation might be to determine a better fitting shape.
-Foam::List<Foam::List<Foam::treeBoundBox> >
+Foam::List<Foam::List<Foam::treeBoundBox>>
 Foam::distributedTriSurfaceMesh::independentlyDistributedBbs
 (
     const triSurface& s
@@ -892,7 +892,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs
     // Find bounding box for all triangles on new distribution.
 
     // Initialise to inverted box (VGREAT, -VGREAT)
-    List<List<treeBoundBox> > bbs(Pstream::nProcs());
+    List<List<treeBoundBox>> bbs(Pstream::nProcs());
     forAll(bbs, procI)
     {
         bbs[procI].setSize(1);
@@ -948,7 +948,7 @@ bool Foam::distributedTriSurfaceMesh::overlaps
         triBb.max() = max(triBb.max(), p1);
         triBb.max() = max(triBb.max(), p2);
 
-        //- Exact test of triangle intersecting bb
+        // Exact test of triangle intersecting bb
 
         // Quick rejection. If whole bounding box of tri is outside cubeBb then
         // there will be no intersection.
@@ -1339,7 +1339,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
 
     if (debug)
     {
-        Info<< "Constructed from triSurface:" << endl;
+        InfoInFunction << "Constructed from triSurface:" << endl;
         writeStats(Info);
 
         labelList nTris(Pstream::nProcs());
@@ -1395,7 +1395,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io)
 
     if (debug)
     {
-        Info<< "Read distributedTriSurface from " << io.objectPath()
+        InfoInFunction << "Read distributedTriSurface from " << io.objectPath()
             << ':' << endl;
         writeStats(Info);
 
@@ -1457,7 +1457,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
 
     if (debug)
     {
-        Info<< "Read distributedTriSurface from " << io.objectPath()
+        InfoInFunction << "Read distributedTriSurface from " << io.objectPath()
             << " and dictionary:" << endl;
         writeStats(Info);
 
@@ -1699,7 +1699,7 @@ void Foam::distributedTriSurfaceMesh::findLineAll
 (
     const pointField& start,
     const pointField& end,
-    List<List<pointIndexHit> >& info
+    List<List<pointIndexHit>>& info
 ) const
 {
     // Reuse fineLine. We could modify all of findLine to do multiple
@@ -2040,7 +2040,7 @@ void Foam::distributedTriSurfaceMesh::distribute
     // ~~~~~~~~~~~~~~~~~~~~~~
 
     {
-        List<List<treeBoundBox> > newProcBb(Pstream::nProcs());
+        List<List<treeBoundBox>> newProcBb(Pstream::nProcs());
 
         switch(distType_)
         {
@@ -2068,13 +2068,6 @@ void Foam::distributedTriSurfaceMesh::distribute
             break;
         }
 
-        //if (debug)
-        //{
-        //    Info<< "old bb:" << procBb_ << endl << endl;
-        //    Info<< "new bb:" << newProcBb << endl << endl;
-        //    Info<< "Same:" << (newProcBb == procBb_) << endl;
-        //}
-
         if (newProcBb == procBb_)
         {
             return;
@@ -2095,9 +2088,8 @@ void Foam::distributedTriSurfaceMesh::distribute
         Pstream::gatherList(nTris);
         Pstream::scatterList(nTris);
 
-        Info<< "distributedTriSurfaceMesh::distribute : before distribution:"
-            << endl
-            << "\tproc\ttris" << endl;
+        InfoInFunction
+            << "before distribution:" << endl << "\tproc\ttris" << endl;
 
         forAll(nTris, procI)
         {
@@ -2354,9 +2346,8 @@ void Foam::distributedTriSurfaceMesh::distribute
         Pstream::gatherList(nTris);
         Pstream::scatterList(nTris);
 
-        Info<< "distributedTriSurfaceMesh::distribute : after distribution:"
-            << endl
-            << "\tproc\ttris" << endl;
+        InfoInFunction
+            << "after distribution:" << endl << "\tproc\ttris" << endl;
 
         forAll(nTris, procI)
         {
@@ -2381,7 +2372,6 @@ void Foam::distributedTriSurfaceMesh::distribute
 }
 
 
-//- Write using given format, version and compression
 bool Foam::distributedTriSurfaceMesh::writeObject
 (
     IOstream::streamFormat fmt,
diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
index de1ac18617a8185e3e8d405940aa124633d5d9f7..03451e72e2607b5072a7096bcdf6534faf039314 100644
--- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
+++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ private:
         localIOdictionary dict_;
 
         //- Bounding boxes of all processors
-        List<List<treeBoundBox> > procBb_;
+        List<List<treeBoundBox>> procBb_;
 
         //- Global triangle numbering
         mutable autoPtr<globalIndex> globalTris_;
@@ -155,7 +155,7 @@ private:
 
                 DynamicList<segment>&,
                 DynamicList<label>&,
-                List<DynamicList<label> >&
+                List<DynamicList<label>>&
             ) const;
 
             //- Divide edges into local and remote segments. Construct map to
@@ -214,7 +214,7 @@ private:
         // Surface redistribution
 
             //- Finds new bounds based on an indepedent decomposition.
-            List<List<treeBoundBox> > independentlyDistributedBbs
+            List<List<treeBoundBox>> independentlyDistributedBbs
             (
                 const triSurface&
             );
@@ -381,7 +381,7 @@ public:
             (
                 const pointField& start,
                 const pointField& end,
-                List<List<pointIndexHit> >&
+                List<List<pointIndexHit>>&
             ) const;
 
             //- From a set of points and indices get the region
@@ -470,7 +470,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "distributedTriSurfaceMeshTemplates.C"
+    #include "distributedTriSurfaceMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/reconstruct/Allwmake b/src/parallel/reconstruct/Allwmake
index 4774eed05288319bd9565fd02c3526a284dd5606..ab8f2d4b84ecbe025aa5287e859d9cd39fe54f24 100755
--- a/src/parallel/reconstruct/Allwmake
+++ b/src/parallel/reconstruct/Allwmake
@@ -8,4 +8,4 @@ set -x
 
 wmake $targetType reconstruct
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.H b/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.H
index 0ee1decbb4c632959aae1e0df63211d3f6e9dc95..a56a761ec0ffc3a4bbac16cd10cd95aafc2161b4 100644
--- a/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.H
+++ b/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -151,46 +151,46 @@ public:
 
         //- Reconstruct volume internal field
         template<class Type>
-        tmp<DimensionedField<Type, volMesh> >
+        tmp<DimensionedField<Type, volMesh>>
         reconstructFvVolumeInternalField
         (
             const IOobject& fieldIoObject,
-            const PtrList<DimensionedField<Type, volMesh> >& procFields
+            const PtrList<DimensionedField<Type, volMesh>>& procFields
         ) const;
 
         //- Read and reconstruct volume internal field
         template<class Type>
-        tmp<DimensionedField<Type, volMesh> >
+        tmp<DimensionedField<Type, volMesh>>
         reconstructFvVolumeInternalField(const IOobject& fieldIoObject) const;
 
 
         //- Reconstruct volume field
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> >
+        tmp<GeometricField<Type, fvPatchField, volMesh>>
         reconstructFvVolumeField
         (
             const IOobject& fieldIoObject,
-            const PtrList<GeometricField<Type, fvPatchField, volMesh> >&
+            const PtrList<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 
         //- Read and reconstruct volume field
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> >
+        tmp<GeometricField<Type, fvPatchField, volMesh>>
         reconstructFvVolumeField(const IOobject& fieldIoObject) const;
 
 
         //- Reconstruct surface field
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         reconstructFvSurfaceField
         (
             const IOobject& fieldIoObject,
-            const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+            const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>&
         ) const;
 
         //- Read and reconstruct surface field
         template<class Type>
-        tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
         reconstructFvSurfaceField(const IOobject& fieldIoObject) const;
 
         //- Read, reconstruct and write all/selected volume internal fields
@@ -226,7 +226,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fvFieldReconstructorReconstructFields.C"
+    #include "fvFieldReconstructorReconstructFields.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C b/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C
index 7a9487667d61191ad18580c94081ee302842c2de..889af083bea65bd0d3196715de1d42ab2318fbd7 100644
--- a/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C
+++ b/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,11 +34,11 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>>
 Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
 (
     const IOobject& fieldIoObject,
-    const PtrList<DimensionedField<Type, volMesh> >& procFields
+    const PtrList<DimensionedField<Type, volMesh>>& procFields
 ) const
 {
     // Create the internalField
@@ -56,7 +56,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
         );
     }
 
-    return tmp<DimensionedField<Type, volMesh> >
+    return tmp<DimensionedField<Type, volMesh>>
     (
         new DimensionedField<Type, volMesh>
         (
@@ -70,14 +70,14 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
 
 
 template<class Type>
-Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>>
 Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
 (
     const IOobject& fieldIoObject
 ) const
 {
     // Read the field for all the processors
-    PtrList<DimensionedField<Type, volMesh> > procFields
+    PtrList<DimensionedField<Type, volMesh>> procFields
     (
         procMeshes_.size()
     );
@@ -119,18 +119,18 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::fvFieldReconstructor::reconstructFvVolumeField
 (
     const IOobject& fieldIoObject,
-    const PtrList<GeometricField<Type, fvPatchField, volMesh> >& procFields
+    const PtrList<GeometricField<Type, fvPatchField, volMesh>>& procFields
 ) const
 {
     // Create the internalField
     Field<Type> internalField(mesh_.nCells());
 
     // Create the patch fields
-    PtrList<fvPatchField<Type> > patchFields(mesh_.boundary().size());
+    PtrList<fvPatchField<Type>> patchFields(mesh_.boundary().size());
 
     forAll(procFields, procI)
     {
@@ -282,7 +282,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
 
     // Now construct and write the field
     // setting the internalField and patchFields
-    return tmp<GeometricField<Type, fvPatchField, volMesh> >
+    return tmp<GeometricField<Type, fvPatchField, volMesh>>
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -297,14 +297,14 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::fvFieldReconstructor::reconstructFvVolumeField
 (
     const IOobject& fieldIoObject
 ) const
 {
     // Read the field for all the processors
-    PtrList<GeometricField<Type, fvPatchField, volMesh> > procFields
+    PtrList<GeometricField<Type, fvPatchField, volMesh>> procFields
     (
         procMeshes_.size()
     );
@@ -345,18 +345,18 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fvFieldReconstructor::reconstructFvSurfaceField
 (
     const IOobject& fieldIoObject,
-    const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& procFields
+    const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& procFields
 ) const
 {
     // Create the internalField
     Field<Type> internalField(mesh_.nInternalFaces());
 
     // Create the patch fields
-    PtrList<fvsPatchField<Type> > patchFields(mesh_.boundary().size());
+    PtrList<fvsPatchField<Type>> patchFields(mesh_.boundary().size());
 
 
     forAll(procMeshes_, procI)
@@ -523,7 +523,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
 
     // Now construct and write the field
     // setting the internalField and patchFields
-    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
+    return tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
     (
         new GeometricField<Type, fvsPatchField, surfaceMesh>
         (
@@ -538,14 +538,14 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>>
 Foam::fvFieldReconstructor::reconstructFvSurfaceField
 (
     const IOobject& fieldIoObject
 ) const
 {
     // Read the field for all the processors
-    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> > procFields
+    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>> procFields
     (
         procMeshes_.size()
     );
diff --git a/src/parallel/reconstruct/reconstruct/pointFieldReconstructor.H b/src/parallel/reconstruct/reconstruct/pointFieldReconstructor.H
index c15b7111da8203dbbc4077c3ef85e93b69ab4df6..3d575d4a1cc4f9bfc3ef93d0b1c79d39ef3bdec2 100644
--- a/src/parallel/reconstruct/reconstruct/pointFieldReconstructor.H
+++ b/src/parallel/reconstruct/reconstruct/pointFieldReconstructor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -146,7 +146,7 @@ public:
 
         //- Reconstruct field
         template<class Type>
-        tmp<GeometricField<Type, pointPatchField, pointMesh> >
+        tmp<GeometricField<Type, pointPatchField, pointMesh>>
         reconstructField(const IOobject& fieldIoObject);
 
         //- Reconstruct and write all fields
@@ -166,7 +166,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "pointFieldReconstructorReconstructFields.C"
+    #include "pointFieldReconstructorReconstructFields.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/reconstruct/reconstruct/pointFieldReconstructorReconstructFields.C b/src/parallel/reconstruct/reconstruct/pointFieldReconstructorReconstructFields.C
index 8d1ddd2e6c387002267f46cf3a3b43437b1fa848..68b617a157e6c1c76a3b59d91ba73b25d1ad92ba 100644
--- a/src/parallel/reconstruct/reconstruct/pointFieldReconstructorReconstructFields.C
+++ b/src/parallel/reconstruct/reconstruct/pointFieldReconstructorReconstructFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,11 +28,11 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
 Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
 {
     // Read the field for all the processors
-    PtrList<GeometricField<Type, pointPatchField, pointMesh> > procFields
+    PtrList<GeometricField<Type, pointPatchField, pointMesh>> procFields
     (
         procMeshes_.size()
     );
@@ -62,7 +62,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
     Field<Type> internalField(mesh_.size());
 
     // Create the patch fields
-    PtrList<pointPatchField<Type> > patchFields(mesh_.boundary().size());
+    PtrList<pointPatchField<Type>> patchFields(mesh_.boundary().size());
 
 
     forAll(procMeshes_, proci)
@@ -117,7 +117,7 @@ Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
 
     // Construct and write the field
     // setting the internalField and patchFields
-    return tmp<GeometricField<Type, pointPatchField, pointMesh> >
+    return tmp<GeometricField<Type, pointPatchField, pointMesh>>
     (
         new GeometricField<Type, pointPatchField, pointMesh>
         (
diff --git a/src/parallel/reconstruct/reconstruct/reconstructLagrangian.H b/src/parallel/reconstruct/reconstruct/reconstructLagrangian.H
index 06c2b56a60065c3238bb8341cd35b869d833319a..5c49b8ff46e5514bde73df35ac4e383a664155d5 100644
--- a/src/parallel/reconstruct/reconstruct/reconstructLagrangian.H
+++ b/src/parallel/reconstruct/reconstruct/reconstructLagrangian.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ void reconstructLagrangianPositions
 
 
 template<class Type>
-tmp<IOField<Type> > reconstructLagrangianField
+tmp<IOField<Type>> reconstructLagrangianField
 (
     const word& cloudName,
     const polyMesh& mesh,
@@ -69,7 +69,7 @@ tmp<IOField<Type> > reconstructLagrangianField
 
 
 template<class Type>
-tmp<CompactIOField<Field<Type>, Type> > reconstructLagrangianFieldField
+tmp<CompactIOField<Field<Type>, Type>> reconstructLagrangianFieldField
 (
     const word& cloudName,
     const polyMesh& mesh,
@@ -107,7 +107,7 @@ void reconstructLagrangianFieldFields
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "reconstructLagrangianFields.C"
+    #include "reconstructLagrangianFields.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C b/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C
index 57bcd1f448338bd2cfe2581c408a3e286333c466..efd476685ca5852125710d3817f3f7021b293394 100644
--- a/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C
+++ b/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
+Foam::tmp<Foam::IOField<Type>> Foam::reconstructLagrangianField
 (
     const word& cloudName,
     const polyMesh& mesh,
@@ -39,7 +39,7 @@ Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
 )
 {
     // Construct empty field on mesh
-    tmp<IOField<Type> > tfield
+    tmp<IOField<Type>> tfield
     (
         new IOField<Type>
         (
@@ -55,7 +55,7 @@ Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
             Field<Type>(0)
         )
     );
-    Field<Type>& field = tfield();
+    Field<Type>& field = tfield.ref();
 
     forAll(meshes, i)
     {
@@ -70,7 +70,7 @@ Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
             IOobject::NO_WRITE
         );
 
-        if (localIOobject.typeHeaderOk<IOField<Type> >(true))
+        if (localIOobject.typeHeaderOk<IOField<Type>>(true))
         {
             IOField<Type> fieldi(localIOobject);
 
@@ -89,7 +89,7 @@ Foam::tmp<Foam::IOField<Type> > Foam::reconstructLagrangianField
 
 
 template<class Type>
-Foam::tmp<Foam::CompactIOField<Foam::Field<Type>, Type> >
+Foam::tmp<Foam::CompactIOField<Foam::Field<Type>, Type>>
 Foam::reconstructLagrangianFieldField
 (
     const word& cloudName,
@@ -99,7 +99,7 @@ Foam::reconstructLagrangianFieldField
 )
 {
     // Construct empty field on mesh
-    tmp<CompactIOField<Field<Type>, Type > > tfield
+    tmp<CompactIOField<Field<Type>, Type >> tfield
     (
         new CompactIOField<Field<Type>, Type>
         (
@@ -112,10 +112,10 @@ Foam::reconstructLagrangianFieldField
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            Field<Field<Type> >(0)
+            Field<Field<Type>>(0)
         )
     );
-    Field<Field<Type> >& field = tfield();
+    Field<Field<Type>>& field = tfield.ref();
 
     forAll(meshes, i)
     {
@@ -132,11 +132,11 @@ Foam::reconstructLagrangianFieldField
 
         if
         (
-            localIOobject.typeHeaderOk<CompactIOField<Field<Type>, Type> >
+            localIOobject.typeHeaderOk<CompactIOField<Field<Type>, Type>>
             (
                 false
             )
-         || localIOobject.typeHeaderOk<IOField<Field<Type> > >(false)
+         || localIOobject.typeHeaderOk<IOField<Field<Type>>>(false)
         )
         {
             CompactIOField<Field<Type>, Type> fieldi(localIOobject);
@@ -243,7 +243,7 @@ void Foam::reconstructLagrangianFieldFields
     }
 
     {
-        const word fieldClassName(IOField<Field<Type> >::typeName);
+        const word fieldClassName(IOField<Field<Type>>::typeName);
 
         IOobjectList fields = objects.lookupClass(fieldClassName);
 
diff --git a/src/parallel/reconstruct/reconstruct/reconstructLagrangianPositions.C b/src/parallel/reconstruct/reconstruct/reconstructLagrangianPositions.C
index 0aaebd02cc9c0cccf4c62c7335d8b608fb13ec95..2136819b6c4481b3380da7996e646c0b0b69bc15 100644
--- a/src/parallel/reconstruct/reconstruct/reconstructLagrangianPositions.C
+++ b/src/parallel/reconstruct/reconstruct/reconstructLagrangianPositions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,7 @@ void Foam::reconstructLagrangianPositions
         }
     }
 
-    IOPosition<Cloud<passiveParticle> >(lagrangianPositions).write();
+    IOPosition<Cloud<passiveParticle>>(lagrangianPositions).write();
 }
 
 
diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake
index 92daaa49f39b3dda3b4b520dad17709b37a693f3..8b292497bd0efc3240c46e0e5d298f314f8f3869 100755
--- a/src/postProcessing/Allwmake
+++ b/src/postProcessing/Allwmake
@@ -11,4 +11,4 @@ wmake $targetType foamCalcFunctions
 
 functionObjects/Allwmake $targetType $*
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H
index f9152e4e05e1070e3812fa13677db0f2ef202dea..0458adcee6544bef572ca6a43bbcf3e7edb9056e 100644
--- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H
+++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -206,8 +206,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeAddSubtractField.C"
-#   include "writeAddSubtractValue.C"
+    #include "writeAddSubtractField.C"
+    #include "writeAddSubtractValue.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/components/components.H b/src/postProcessing/foamCalcFunctions/field/components/components.H
index edf1572f6c19fc2cbfc1e449d260cf0db89b8912..e32b50925cfafb5de3ddb41b0d48dd442aa13918 100644
--- a/src/postProcessing/foamCalcFunctions/field/components/components.H
+++ b/src/postProcessing/foamCalcFunctions/field/components/components.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeComponentFields.C"
+    #include "writeComponentFields.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/div/div.H b/src/postProcessing/foamCalcFunctions/field/div/div.H
index 94a9b87cf4caa383dbeb1c5dc73e84eb157e6e09..e17a9c841cbeb7ab0f7a9cab6c1ed77cf5863e80 100644
--- a/src/postProcessing/foamCalcFunctions/field/div/div.H
+++ b/src/postProcessing/foamCalcFunctions/field/div/div.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeDivField.C"
+    #include "writeDivField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H b/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H
index d49ffcacfb1ea1b9c5e3dc0a7e31e5cd9a7899ca..d69df8301849cc12a2d017708f732c9d1e080734 100644
--- a/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H
+++ b/src/postProcessing/foamCalcFunctions/field/interpolate/interpolate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,7 +126,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeInterpolateField.C"
+    #include "writeInterpolateField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/mag/mag.H b/src/postProcessing/foamCalcFunctions/field/mag/mag.H
index 459d0527459b9eada2a4647fcb897c7f7c1fc9ab..5590ab09401bf6f788647c129208645c42be9f79 100644
--- a/src/postProcessing/foamCalcFunctions/field/mag/mag.H
+++ b/src/postProcessing/foamCalcFunctions/field/mag/mag.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,7 +126,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeMagField.C"
+    #include "writeMagField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/magGrad/magGrad.H b/src/postProcessing/foamCalcFunctions/field/magGrad/magGrad.H
index e98f9221f5f2fd9cb4ed256fc3f74e61bcf883ba..3ced81278177335c6ee3decead829d806eee37a3 100644
--- a/src/postProcessing/foamCalcFunctions/field/magGrad/magGrad.H
+++ b/src/postProcessing/foamCalcFunctions/field/magGrad/magGrad.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeMagGradField.C"
+    #include "writeMagGradField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.H b/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.H
index ec85edbe38808d131fcf317e9c33256175b69e6f..8750f4c206fe964326af673a3c1fdca30f7de55a 100644
--- a/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.H
+++ b/src/postProcessing/foamCalcFunctions/field/magSqr/magSqr.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,7 +126,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeMagSqrField.C"
+    #include "writeMagSqrField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H b/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H
index d46dcde85b21531b7741c18489adc09790abbf78..eb7dcdd849f443ca5115527e5205e9f6719e9315 100644
--- a/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H
+++ b/src/postProcessing/foamCalcFunctions/field/randomise/randomise.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -129,7 +129,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "writeRandomField.C"
+    #include "writeRandomField.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake
index 00961fcf4a94934a2623965aa20dc6bce18e5544..55cbcba552437d8903d1feb1fa09fd2e39944b8d 100755
--- a/src/postProcessing/functionObjects/Allwmake
+++ b/src/postProcessing/functionObjects/Allwmake
@@ -17,4 +17,4 @@ wmake $targetType utilities
 
 ./graphics/Allwmake
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H
index 95c3f2f5000e78c621dceb866a2c1c45186dea67..4c5f753555086d971f4b1574bd9e0c4e3d8c88a5 100644
--- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H
+++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -142,15 +142,15 @@ protected:
         void loadField
         (
             const word&,
-            UPtrList<GeometricField<Type, fvPatchField, volMesh> >&,
-            UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&
+            UPtrList<GeometricField<Type, fvPatchField, volMesh>>&,
+            UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>&
         ) const;
 
         template<class Type>
         void changeWriteOptions
         (
-            UPtrList<GeometricField<Type, fvPatchField, volMesh> >&,
-            UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&,
+            UPtrList<GeometricField<Type, fvPatchField, volMesh>>&,
+            UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>&,
             const IOobject::writeOption
         ) const;
 
@@ -218,7 +218,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "partialWriteTemplates.C"
+    #include "partialWriteTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C b/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C
index 16551f4b79d1aeb08affecb156712a7c09be9455..fa29302ca4593fa5205bf0eaeffadc5844998c2e 100644
--- a/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C
+++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,8 +34,8 @@ template<class Type>
 void Foam::partialWrite::loadField
 (
     const word& fieldName,
-    UPtrList<GeometricField<Type, fvPatchField, volMesh> >& vflds,
-    UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds
+    UPtrList<GeometricField<Type, fvPatchField, volMesh>>& vflds,
+    UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& sflds
 ) const
 {
     typedef GeometricField<Type, fvPatchField, volMesh> vfType;
@@ -85,8 +85,8 @@ void Foam::partialWrite::loadField
 template<class Type>
 void Foam::partialWrite::changeWriteOptions
 (
-    UPtrList<GeometricField<Type, fvPatchField, volMesh> >& vflds,
-    UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds,
+    UPtrList<GeometricField<Type, fvPatchField, volMesh>>& vflds,
+    UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& sflds,
     const IOobject::writeOption wOption
 ) const
 {
diff --git a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H
index 42aa1f3546366553ef08bb3846ac2ee9bdafce4f..46f6db02c9da26adf9139f544d9499fae9f4659f 100644
--- a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H
+++ b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -102,8 +102,9 @@ protected:
             Switch log_;
 
 
-    // Private Member Functions
+private:
 
+    // Private member functions
 
         //- Disallow default bitwise copy construct
         removeRegisteredObject(const removeRegisteredObject&);
diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H
index ac2ec7ac5878a00a14f24fff27fbca8dedf9d369..9282daec35400875cd64ee8119c1d0427a87d0c3 100644
--- a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H
+++ b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,6 +87,11 @@ protected:
             bool& firstDict
         );
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         writeDictionary(const writeDictionary&);
 
diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H
index c3f282bfa576e03dd961bb9ea9dcf4f3879fd0e2..0e5d780c1245dde0b5ac4bb85814045b93444d63 100644
--- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H
+++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,12 +31,13 @@ Description
     This function object allows specification of different writing frequency
     of objects registered to the database. It has similar functionality
     as the main time database through the \c outputControl setting:
-    - timeStep
-    - outputTime
-    - adjustableTime
-    - runTime
-    - clockTime
-    - cpuTime
+
+    \li \c timeStep
+    \li \c outputTime
+    \li \c adjustableTime
+    \li \c runTime
+    \li \c clockTime
+    \li \c cpuTime
 
     Example of function object specification:
     \verbatim
@@ -59,7 +60,7 @@ Description
         log          | Log to standard output  | no          | yes
     \endtable
 
-    exclusiveWriting disables automatic writing (i.e through database) of the
+    \c exclusiveWriting disables automatic writing (i.e through database) of the
     objects to avoid duplicate writing.
 
 SeeAlso
@@ -96,8 +97,6 @@ class mapPolyMesh;
 
 class writeRegisteredObject
 {
-protected:
-
     // Private data
 
         //- Name of this set of writeRegisteredObject
diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H
index 760b56da9a7a7ab8332d81b28cca850923872c38..ef548d4ce88eed634b286f19163110ab9903f993 100644
--- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H
+++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -124,6 +124,11 @@ protected:
         //- File header information
         virtual void writeFileHeader(Ostream& os) const;
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         cloudInfo(const cloudInfo&);
 
diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C
index 9104b2d293b911923409dcf6eec4502bd192e7c9..35e6337de533c4ac710adfaa103616d05cb3f11c 100644
--- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C
+++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -105,6 +105,22 @@ void Foam::fieldAverage::initialize()
 }
 
 
+void Foam::fieldAverage::restart()
+{
+    if (log_) Info
+        << "    Restarting averaging at time " << obr_.time().timeName()
+        << nl << endl;
+
+    totalIter_.clear();
+    totalIter_.setSize(faItems_.size(), 1);
+
+    totalTime_.clear();
+    totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
+
+    initialize();
+}
+
+
 void Foam::fieldAverage::calcAverages()
 {
     if (!initialised_)
@@ -112,8 +128,8 @@ void Foam::fieldAverage::calcAverages()
         initialize();
     }
 
-    const label currentTimeIndex =
-        static_cast<const fvMesh&>(obr_).time().timeIndex();
+    const label currentTimeIndex = obr_.time().timeIndex();
+    const scalar currentTime = obr_.time().value();
 
     if (prevTimeIndex_ == currentTimeIndex)
     {
@@ -124,6 +140,12 @@ void Foam::fieldAverage::calcAverages()
         prevTimeIndex_ = currentTimeIndex;
     }
 
+    if (periodicRestart_ && currentTime > restartPeriod_*periodIndex_)
+    {
+        restart();
+        periodIndex_++;
+    }
+
     if (log_) Info
         << type() << " " << name_ << " output:" << nl
         << "    Calculating averages" << nl;
@@ -182,7 +204,7 @@ void Foam::fieldAverage::readAveragingProperties()
     totalTime_.clear();
     totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
 
-    if (log_ && (resetOnRestart_ || resetOnOutput_))
+    if (log_ && (restartOnRestart_ || restartOnOutput_))
     {
         Info<< "    Starting averaging at time " << obr_.time().timeName()
             << nl;
@@ -232,13 +254,16 @@ Foam::fieldAverage::fieldAverage
     functionObjectState(obr, name),
     obr_(obr),
     prevTimeIndex_(-1),
-    resetOnRestart_(false),
-    resetOnOutput_(false),
+    restartOnRestart_(false),
+    restartOnOutput_(false),
+    periodicRestart_(false),
+    restartPeriod_(GREAT),
     log_(true),
     initialised_(false),
     faItems_(),
     totalIter_(),
-    totalTime_()
+    totalTime_(),
+    periodIndex_(1)
 {
     // Only active if a fvMesh is available
     if (setActive<fvMesh>())
@@ -266,10 +291,16 @@ void Foam::fieldAverage::read(const dictionary& dict)
 
         if (log_) Info << type() << " " << name_ << ":" << nl;
 
-        dict.readIfPresent("resetOnRestart", resetOnRestart_);
-        dict.readIfPresent("resetOnOutput", resetOnOutput_);
+        dict.readIfPresent("restartOnRestart", restartOnRestart_);
+        dict.readIfPresent("restartOnOutput", restartOnOutput_);
+        dict.readIfPresent("periodicRestart", periodicRestart_);
         dict.lookup("fields") >> faItems_;
 
+        if (periodicRestart_)
+        {
+            dict.lookup("restartPeriod") >> restartPeriod_;
+        }
+
         readAveragingProperties();
 
         if (log_) Info << endl;
@@ -302,19 +333,9 @@ void Foam::fieldAverage::write()
         writeAverages();
         writeAveragingProperties();
 
-        if (resetOnOutput_)
+        if (restartOnOutput_)
         {
-            if (log_) Info
-                << "    Restarting averaging at time " << obr_.time().timeName()
-                << nl << endl;
-
-            totalIter_.clear();
-            totalIter_.setSize(faItems_.size(), 1);
-
-            totalTime_.clear();
-            totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
-
-            initialize();
+            restart();
         }
 
         if (log_) Info << endl;
diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H
index 77216d1191260d2e015467732eda4d6cab5bea62..c1d24128b3071ebf6ef25bfc8f1693ac04a66344 100644
--- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H
+++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -52,14 +52,15 @@ Description
 
     Information regarding the number of averaging steps, and total averaging
     time are written on a per-field basis to the
-    \c fieldAveragingProperties dictionary, located in \<time\>/uniform
+    \c "<functionObject name>Properties" dictionary, located in \<time\>/uniform
 
-    When restarting form a previous calculation, the averaging is continuous.
-    However, the averaging process can be restarted using the \c resetOnRestart
-    option.
+    When restarting form a previous calculation, the averaging is continuous or
+    may be restarted using the \c restartOnRestart option.
 
-    To restart the averaging process after each calculation output time, use
-    the \c resetOnOutput option.
+    The averaging process may be restarted after each calculation output time
+    using the \c restartOnOutput option or restarted periodically using the \c
+    periodicRestart option and setting \c restartPeriod to the required
+    averaging period.
 
     Example of function object specification:
     \verbatim
@@ -68,8 +69,10 @@ Description
         type fieldAverage;
         functionObjectLibs ("libfieldFunctionObjects.so");
         ...
-        resetOnRestart true;
-        resetOnOutput false;
+        restartOnRestart    false;
+        restartOnOutput     false;
+        periodicRestart     false;
+        restartPeriod       0.002;
         fields
         (
             U
@@ -92,12 +95,14 @@ Description
 
     \heading Function object usage
     \table
-        Property     | Description             | Required    | Default value
-        type         | type name: fieldAverage | yes         |
-        resetOnRestart | flag to reset the averaging on restart | yes |
-        resetOnOutput| flag to reset the averaging on output | yes |
-        fields       | list of fields and averaging options | yes |
-        log          | Log to standard output  | no          | yes
+        Property        | Description           | Required    | Default value
+        type            | Type name: fieldAverage | yes       |
+        restartOnRestart| Restart the averaging on restart | no | no
+        restartOnOutput | Restart the averaging on output | no | no
+        periodicRestart | Periodically restart the averaging | no | no
+        restartPeriod   | Periodic restart period | conditional |
+        log             | Log to standard output  | no        | yes
+        fields          | List of fields and averaging options | yes |
     \endtable
 
 
@@ -154,11 +159,17 @@ protected:
         //- Time at last call, prevents repeated averaging
         label prevTimeIndex_;
 
-        //- Reset the averaging process on restart flag
-        Switch resetOnRestart_;
+        //- Restart the averaging process on restart
+        Switch restartOnRestart_;
 
-        //- Reset the averaging process on output flag
-        Switch resetOnOutput_;
+        //- Restart the averaging process on output
+        Switch restartOnOutput_;
+
+        //- Periodically restart the averaging process
+        Switch periodicRestart_;
+
+        //- Restart period
+        scalar restartPeriod_;
 
         //- Switch to send output to Info as well as to file
         Switch log_;
@@ -178,6 +189,9 @@ protected:
             //- Total time counter
             List<scalar> totalTime_;
 
+            //- Index for periodic restart
+            label periodIndex_;
+
 
     // Private Member Functions
 
@@ -191,6 +205,9 @@ protected:
             //  Check requested field averages are valid, populate field lists
             void initialize();
 
+            //- Restart averaging for restartOnOutput
+            void restart();
+
             //- Add mean average field to database
             template<class Type>
             void addMeanFieldType(const label fieldI);
@@ -326,7 +343,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fieldAverageTemplates.C"
+    #include "fieldAverageTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C
index e9a02774762baf11010f5bf1dd7d74d36a7897ec..da934cbe2ada7555cb785f5180ec591b3177dfc0 100644
--- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C
+++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverageTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ void Foam::fieldAverage::addMeanFieldType(const label fieldI)
                     meanFieldName,
                     obr_.time().timeName(obr_.time().startTime().value()),
                     obr_,
-                    resetOnOutput_
+                    restartOnOutput_
                   ? IOobject::NO_READ
                   : IOobject::READ_IF_PRESENT,
                     IOobject::NO_WRITE
@@ -139,7 +139,7 @@ void Foam::fieldAverage::addPrime2MeanFieldType(const label fieldI)
                     prime2MeanFieldName,
                     obr_.time().timeName(obr_.time().startTime().value()),
                     obr_,
-                    resetOnOutput_
+                    restartOnOutput_
                   ? IOobject::NO_READ
                   : IOobject::READ_IF_PRESENT,
                     IOobject::NO_WRITE
diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H
index 3dcf6fcead594fe9b7df018e7f663d70cdb03a11..fbadec96fed4659510f80f1edc1b5879153a23ab 100644
--- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H
+++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -127,12 +127,6 @@ protected:
 
     // Protected Member Functions
 
-        //- Disallow default bitwise copy construct
-        fieldCoordinateSystemTransform(const fieldCoordinateSystemTransform&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const fieldCoordinateSystemTransform&);
-
         template<class Type>
         void transform(const word& fieldName) const;
 
@@ -140,6 +134,17 @@ protected:
         void transformField(const Type& field) const;
 
 
+private:
+
+    // Private member functions
+
+        //- Disallow default bitwise copy construct
+        fieldCoordinateSystemTransform(const fieldCoordinateSystemTransform&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const fieldCoordinateSystemTransform&);
+
+
 public:
 
     //- Runtime type information
@@ -203,7 +208,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fieldCoordinateSystemTransformTemplates.C"
+    #include "fieldCoordinateSystemTransformTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H
index 16833752445feced4d125aa50a67e69c950b6250..a49d38b934ffd7d076b94dc6235893fed2184a09 100644
--- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H
+++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -230,7 +230,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "fieldMinMaxTemplates.C"
+    #include "fieldMinMaxTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H
index 912b189d25e896c934f279ead4d078033a9d83cb..b2bdc7602b213cffbca6b083db522629aafaf3f1 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H
+++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -212,7 +212,7 @@ protected:
 
         //- Insert field values into values list
         template<class Type>
-        tmp<Field<Type> > setFieldValues
+        tmp<Field<Type>> setFieldValues
         (
             const word& fieldName,
             const bool mustGet = false
@@ -280,7 +280,7 @@ public:
 
             //- Filter a field according to cellIds
             template<class Type>
-            tmp<Field<Type> > filterField(const Field<Type>& field) const;
+            tmp<Field<Type>> filterField(const Field<Type>& field) const;
 };
 
 
diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C
index 206949836ada7bf06c822cf1c2795cc4ac68c112..336df2874588b588016cd14bd99dbbc65a3bb7cc 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C
+++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -43,7 +43,7 @@ bool Foam::fieldValues::cellSource::validField(const word& fieldName) const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fieldValues::cellSource::setFieldValues
+Foam::tmp<Foam::Field<Type>> Foam::fieldValues::cellSource::setFieldValues
 (
     const word& fieldName,
     const bool mustGet
@@ -63,7 +63,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::cellSource::setFieldValues
             << abort(FatalError);
     }
 
-    return tmp<Field<Type> >(new Field<Type>(0.0));
+    return tmp<Field<Type>>(new Field<Type>(0.0));
 }
 
 
@@ -75,7 +75,7 @@ Type Foam::fieldValues::cellSource::processValues
     const scalarField& weightField
 ) const
 {
-    Type result = pTraits<Type>::zero;
+    Type result = Zero;
     switch (operation_)
     {
         case opSum:
@@ -226,12 +226,12 @@ bool Foam::fieldValues::cellSource::writeValues
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fieldValues::cellSource::filterField
+Foam::tmp<Foam::Field<Type>> Foam::fieldValues::cellSource::filterField
 (
     const Field<Type>& field
 ) const
 {
-    return tmp<Field<Type> >(new Field<Type>(field, cellId_));
+    return tmp<Field<Type>>(new Field<Type>(field, cellId_));
 }
 
 
diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H
index b85ebbf560e88f3a9ac44664cde69574f30d0508..fc5235c84f3a743de9ca76e9bbc55130fa26a8dc 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H
+++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -297,7 +297,7 @@ protected:
 
         //- Return field values by looking up field name
         template<class Type>
-        tmp<Field<Type> > setFieldValues
+        tmp<Field<Type>> setFieldValues
         (
             const word& fieldName,
             const bool mustGet = false,
@@ -384,7 +384,7 @@ public:
 
             //- Filter a surface field according to faceIds
             template<class Type>
-            tmp<Field<Type> > filterField
+            tmp<Field<Type>> filterField
             (
                 const GeometricField<Type, fvsPatchField, surfaceMesh>& field,
                 const bool applyOrientation
@@ -392,7 +392,7 @@ public:
 
             //- Filter a volume field according to faceIds
             template<class Type>
-            tmp<Field<Type> > filterField
+            tmp<Field<Type>> filterField
             (
                 const GeometricField<Type, fvPatchField, volMesh>& field,
                 const bool applyOrientation
diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C
index de2c0044bb403d99d7259d9cc36dd91572b3a675..da662dba148a7e3edf604cf5de988e533d2a596b 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C
+++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ bool Foam::fieldValues::faceSource::validField(const word& fieldName) const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::setFieldValues
+Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::setFieldValues
 (
     const word& fieldName,
     const bool mustGet,
@@ -74,16 +74,16 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::setFieldValues
             if (surfacePtr_().interpolate())
             {
                 const interpolationCellPoint<Type> interp(fld);
-                tmp<Field<Type> > tintFld(surfacePtr_().interpolate(interp));
+                tmp<Field<Type>> tintFld(surfacePtr_().interpolate(interp));
                 const Field<Type>& intFld = tintFld();
 
                 // Average
                 const faceList& faces = surfacePtr_().faces();
-                tmp<Field<Type> > tavg
+                tmp<Field<Type>> tavg
                 (
-                    new Field<Type>(faces.size(), pTraits<Type>::zero)
+                    new Field<Type>(faces.size(), Zero)
                 );
-                Field<Type>& avg = tavg();
+                Field<Type>& avg = tavg.ref();
 
                 forAll(faces, faceI)
                 {
@@ -115,7 +115,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::setFieldValues
             << abort(FatalError);
     }
 
-    return tmp<Field<Type> >(new Field<Type>(0));
+    return tmp<Field<Type>>(new Field<Type>(0));
 }
 
 
@@ -127,7 +127,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
     const scalarField& weightField
 ) const
 {
-    Type result = pTraits<Type>::zero;
+    Type result = Zero;
     switch (operation_)
     {
         case opSum:
@@ -148,7 +148,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
                 << pTraits<Type>::typeName
                 << exit(FatalError);
 
-            result = pTraits<Type>::zero;
+            result = Zero;
             break;
         }
         case opSumDirectionBalance:
@@ -159,7 +159,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
                 << pTraits<Type>::typeName
                 << exit(FatalError);
 
-            result = pTraits<Type>::zero;
+            result = Zero;
             break;
         }
         case opAverage:
@@ -268,7 +268,6 @@ Type Foam::fieldValues::faceSource::processValues
 }
 
 
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
@@ -356,14 +355,14 @@ bool Foam::fieldValues::faceSource::writeValues
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::filterField
+Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::filterField
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
     const bool applyOrientation
 ) const
 {
-    tmp<Field<Type> > tvalues(new Field<Type>(faceId_.size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(faceId_.size()));
+    Field<Type>& values = tvalues.ref();
 
     forAll(values, i)
     {
@@ -397,14 +396,14 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::filterField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::filterField
+Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::filterField
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& field,
     const bool applyOrientation
 ) const
 {
-    tmp<Field<Type> > tvalues(new Field<Type>(faceId_.size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(faceId_.size()));
+    Field<Type>& values = tvalues.ref();
 
     forAll(values, i)
     {
diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H
index 529ae7afc43bb247905a24acfadd4caaaa60d80e..2ff4c1660ec76ef5c2d1539af0d71ef962fc6c69 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H
+++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -199,7 +199,7 @@ public:
 
             //- Combine fields from all processor domains into single field
             template<class Type>
-            void combineFields(tmp<Field<Type> >&);
+            void combineFields(tmp<Field<Type>>&);
 };
 
 
diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValueTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValueTemplates.C
index 233af060577ac97562dcd58d44b65253a58cd391..13d9933332b9151380ba9f9d5ff0b7e200f6191c 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValueTemplates.C
+++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValueTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ License
 template<class Type>
 void Foam::fieldValue::combineFields(Field<Type>& field)
 {
-    List<Field<Type> > allValues(Pstream::nProcs());
+    List<Field<Type>> allValues(Pstream::nProcs());
 
     allValues[Pstream::myProcNo()] = field;
 
@@ -40,16 +40,16 @@ void Foam::fieldValue::combineFields(Field<Type>& field)
     Pstream::scatterList(allValues);
 
     field =
-        ListListOps::combine<Field<Type> >
+        ListListOps::combine<Field<Type>>
         (
             allValues,
-            accessOp<Field<Type> >()
+            accessOp<Field<Type>>()
         );
 }
 
 
 template<class Type>
-void Foam::fieldValue::combineFields(tmp<Field<Type> >& field)
+void Foam::fieldValue::combineFields(tmp<Field<Type>>& field)
 {
     combineFields(field());
 }
diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C
index 31879f63ce5cb2f4c9662e699713bfccc756dc67..5fb6413a6f14fafcb8c23ff939c2cc9ae809d45a 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C
+++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDeltaTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -41,7 +41,7 @@ void Foam::fieldValues::fieldValueDelta::apply
         return;
     }
 
-    Type result = pTraits<Type>::zero;
+    Type result = Zero;
 
     Type value1 = this->getObjectResult<Type>(name1, entryName1);
     Type value2 = this->getObjectResult<Type>(name2, entryName2);
diff --git a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H
index b3e7b4f90d9cd0ff1e77389d6e73e6deddb189c3..852a3d5d4d3cfd73705afe31dfe3828d67ad4f12 100644
--- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H
+++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,10 +69,10 @@ public:
     //- Class used to pass tracking data to the trackToFace function
     class trackingData
     :
-        public particle::TrackingData<Cloud<findCellParticle> >
+        public particle::TrackingData<Cloud<findCellParticle>>
     {
         labelListList& cellToData_;
-        List<List<point> >& cellToEnd_;
+        List<List<point>>& cellToEnd_;
 
     public:
 
@@ -82,10 +82,10 @@ public:
             (
                 Cloud<findCellParticle>& cloud,
                 labelListList& cellToData,
-                List<List<point> >& cellToEnd
+                List<List<point>>& cellToEnd
             )
             :
-                particle::TrackingData<Cloud<findCellParticle> >(cloud),
+                particle::TrackingData<Cloud<findCellParticle>>(cloud),
                 cellToData_(cellToData),
                 cellToEnd_(cellToEnd)
             {}
@@ -98,7 +98,7 @@ public:
                 return cellToData_;
             }
 
-            List<List<point> >& cellToEnd()
+            List<List<point>>& cellToEnd()
             {
                 return cellToEnd_;
             }
diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C
index fdea64319d90d0a72a29fad16b61c04fb4b870ce..616b42b44001efc600762ee5994ed1cdeb2dab7d 100644
--- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C
+++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -56,8 +56,7 @@ void Foam::nearWallFields::calcAddressing()
 
     if (debug)
     {
-        Info<< "nearWallFields::calcAddressing() :"
-            << " nPatchFaces:" << globalWalls.size() << endl;
+        InfoInFunction << "nPatchFaces: " << globalWalls.size() << endl;
     }
 
     // Construct cloud
@@ -139,8 +138,7 @@ void Foam::nearWallFields::calcAddressing()
             mesh.time().path()
            /"wantedTracks_" + mesh.time().timeName() + ".obj"
         );
-        Info<< "nearWallFields::calcAddressing() :"
-            << "Dumping tracks to " << str.name() << endl;
+        InfoInFunction << "Dumping tracks to " << str.name() << endl;
 
         forAllConstIter(Cloud<findCellParticle>, cloud, iter)
         {
@@ -180,7 +178,7 @@ void Foam::nearWallFields::calcAddressing()
 
 
     // Rework cell-to-globalpatchface into a map
-    List<Map<label> > compactMap;
+    List<Map<label>> compactMap;
     getPatchDataMapPtr_.reset
     (
         new mapDistribute
@@ -202,8 +200,7 @@ void Foam::nearWallFields::calcAddressing()
                 mesh.time().path()
                /"obtainedTracks_" + mesh.time().timeName() + ".obj"
             );
-            Info<< "nearWallFields::calcAddressing() :"
-                << "Dumping obtained to " << str.name() << endl;
+            InfoInFunction << "Dumping obtained to " << str.name() << endl;
 
             forAll(cellToWalls_, cellI)
             {
@@ -256,7 +253,7 @@ Foam::nearWallFields::~nearWallFields()
 {
     if (debug)
     {
-        Info<< "nearWallFields::~nearWallFields()" << endl;
+        InfoInFunction << endl;
     }
 }
 
@@ -267,7 +264,7 @@ void Foam::nearWallFields::read(const dictionary& dict)
 {
     if (debug)
     {
-        Info<< "nearWallFields::read(const dictionary&)" << endl;
+        InfoInFunction << endl;
     }
 
     if (active_)
@@ -317,7 +314,7 @@ void Foam::nearWallFields::execute()
 {
     if (debug)
     {
-        Info<< "nearWallFields:execute()" << endl;
+        InfoInFunction << endl;
     }
 
 
@@ -375,7 +372,7 @@ void Foam::nearWallFields::write()
 {
     if (debug)
     {
-        Info<< "nearWallFields:write()" << endl;
+        InfoInFunction << endl;
     }
 
     if (active_)
diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H
index 9fcfa0ccee4bb7ac709a8711dc228928fcddb500..4ae9e377fdd05d503569e94ee97e0982c8fc776f 100644
--- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H
+++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -110,7 +110,7 @@ protected:
         // Read from dictionary
 
             //- Fields to process
-            List<Tuple2<word, word> > fieldSet_;
+            List<Tuple2<word, word>> fieldSet_;
 
             //- Switch to send output to Info as well as to file
             Switch log_;
@@ -134,7 +134,7 @@ protected:
             labelListList cellToWalls_;
 
             //- From cell to tracked end point
-            List<List<point> > cellToSamples_;
+            List<List<point>> cellToSamples_;
 
             //- Map from cell based data back to patch based data
             autoPtr<mapDistribute> getPatchDataMapPtr_;
@@ -157,7 +157,7 @@ protected:
         template<class Type>
         void createFields
         (
-            PtrList<GeometricField<Type, fvPatchField, volMesh> >&
+            PtrList<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 
         //- Override boundary fields with sampled values
@@ -171,7 +171,7 @@ protected:
         template<class Type>
         void sampleFields
         (
-            PtrList<GeometricField<Type, fvPatchField, volMesh> >&
+            PtrList<GeometricField<Type, fvPatchField, volMesh>>&
         ) const;
 
 
@@ -246,7 +246,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "nearWallFieldsTemplates.C"
+    #include "nearWallFieldsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C
index 275d98a09361d6f3bc9d568b737b32300c960a0c..e0cfbb3096b03fc678e205c9b9223a6c82dee428 100644
--- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C
+++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ License
 template<class Type>
 void Foam::nearWallFields::createFields
 (
-    PtrList<GeometricField<Type, fvPatchField, volMesh> >& sflds
+    PtrList<GeometricField<Type, fvPatchField, volMesh>>& sflds
 ) const
 {
     typedef GeometricField<Type, fvPatchField, volMesh> vfType;
@@ -123,7 +123,7 @@ void Foam::nearWallFields::sampleBoundaryField
 template<class Type>
 void Foam::nearWallFields::sampleFields
 (
-    PtrList<GeometricField<Type, fvPatchField, volMesh> >& sflds
+    PtrList<GeometricField<Type, fvPatchField, volMesh>>& sflds
 ) const
 {
     typedef GeometricField<Type, fvPatchField, volMesh> vfType;
diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.H b/src/postProcessing/functionObjects/field/processorField/processorField.H
index 560c302e92cc4e355881bb68a45205a631e1f101..f566a76dcbd406a75adbb2957ef90f5bc604f736 100644
--- a/src/postProcessing/functionObjects/field/processorField/processorField.H
+++ b/src/postProcessing/functionObjects/field/processorField/processorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -103,7 +103,9 @@ protected:
         Switch log_;
 
 
-    // Protected Member Functions
+private:
+
+    // Private member functions
 
         //- Disallow default bitwise copy construct
         processorField(const processorField&);
diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.H b/src/postProcessing/functionObjects/field/readFields/readFields.H
index be1d012783d42ec3cdafa81dbc1b344e0b7cd0a6..f785e4a881795e77f0c5e6fe489d40bcf0646eac 100644
--- a/src/postProcessing/functionObjects/field/readFields/readFields.H
+++ b/src/postProcessing/functionObjects/field/readFields/readFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -105,15 +105,20 @@ protected:
 
     // Protected Member Functions
 
+        template<class Type>
+        void loadField(const word&) const;
+
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         readFields(const readFields&);
 
         //- Disallow default bitwise assignment
         void operator=(const readFields&);
 
-        template<class Type>
-        void loadField(const word&) const;
-
 
 public:
 
@@ -178,7 +183,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "readFieldsTemplates.C"
+    #include "readFieldsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C b/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C
index a4ac6c7e0e210d141188de93bbba00c69be68011..4b128aa3882305dc173a4410cf4085467d8e744a 100644
--- a/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C
+++ b/src/postProcessing/functionObjects/field/readFields/readFieldsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C
index d90f5992e4630bb83e65598919be97d3897c3d71..e74bfb2f691ad9e063d169b6fe39754054c596f1 100644
--- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C
+++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -223,7 +223,7 @@ Foam::tmp<Foam::scalarField> Foam::regionSizeDistribution::divide
 )
 {
     tmp<scalarField> tresult(new scalarField(num.size()));
-    scalarField& result = tresult();
+    scalarField& result = tresult.ref();
 
     forAll(denom, i)
     {
diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
index d89106bdde8e79b9c6eb67edacaaea0a7a3e6221..aeff6d4400406d387b3366c351fed43a5f8dcaf3 100644
--- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
+++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -171,7 +171,7 @@ class regionSizeDistribution
         wordReList fields_;
 
         //- Output formatter to write
-        autoPtr<writer<scalar> > formatterPtr_;
+        autoPtr<writer<scalar>> formatterPtr_;
 
         //- Optional coordinate system
         autoPtr<coordinateSystem> coordSysPtr_;
@@ -306,7 +306,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "regionSizeDistributionTemplates.C"
+    #include "regionSizeDistributionTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C
index 3122e2b899dda67fe57bcb0e4fe1bedf15b5fdb9..c20b4b257f5fcd13e6c489658e4e7b7d49463244 100644
--- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C
+++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -72,9 +72,10 @@ void Foam::streamLine::track()
 
     // Read or lookup fields
     PtrList<volScalarField> vsFlds;
-    PtrList<interpolation<scalar> > vsInterp;
+    PtrList<interpolation<scalar>> vsInterp;
     PtrList<volVectorField> vvFlds;
-    PtrList<interpolation<vector> > vvInterp;
+    PtrList<interpolation<vector>> vvInterp;
+
     label UIndex = -1;
 
     initInterpolations
diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.H b/src/postProcessing/functionObjects/field/streamLine/streamLine.H
index d1f319b490b7850b9ef225643f07d2a1403f1e7f..8b1059b4489e66e661b83369be2094dc71bb4f45 100644
--- a/src/postProcessing/functionObjects/field/streamLine/streamLine.H
+++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C b/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C
index c7e421a5040d619c294784774bd6607ddc0d70aa..a83cbf6131745ebf9a801ad1fb11b2510f8dac6e 100644
--- a/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C
+++ b/src/postProcessing/functionObjects/field/streamLine/streamLineBase.C
@@ -99,9 +99,9 @@ void Foam::streamLineBase::initInterpolations
     const label nSeeds,
     label& UIndex,
     PtrList<volScalarField>& vsFlds,
-    PtrList<interpolation<scalar> >& vsInterp,
+    PtrList<interpolation<scalar>>& vsInterp,
     PtrList<volVectorField>& vvFlds,
-    PtrList<interpolation<vector> >& vvInterp
+    PtrList<interpolation<vector>>& vvInterp
 )
 {
     const Time& runTime = obr_.time();
@@ -316,9 +316,9 @@ void Foam::streamLineBase::trimToBox
 (
     const treeBoundBox& bb,
     const label trackI,
-    PtrList<DynamicList<point> >& newTracks,
-    PtrList<DynamicList<scalarList> >& newScalars,
-    PtrList<DynamicList<vectorList> >& newVectors
+    PtrList<DynamicList<point>>& newTracks,
+    PtrList<DynamicList<scalarList>>& newScalars,
+    PtrList<DynamicList<vectorList>>& newVectors
 ) const
 {
     const List<point>& track = allTracks_[trackI];
@@ -471,9 +471,9 @@ void Foam::streamLineBase::trimToBox(const treeBoundBox& bb)
 {
     // Storage for new tracks. Per track, per sample the coordinate (newTracks)
     // or values for all the sampled fields (newScalars, newVectors)
-    PtrList<DynamicList<point> > newTracks;
-    PtrList<DynamicList<scalarList> > newScalars;
-    PtrList<DynamicList<vectorList> > newVectors;
+    PtrList<DynamicList<point>> newTracks;
+    PtrList<DynamicList<scalarList>> newScalars;
+    PtrList<DynamicList<vectorList>> newVectors;
 
     forAll(allTracks_, trackI)
     {
@@ -854,7 +854,7 @@ void Foam::streamLineBase::write()
 
             if (allScalars_.size() > 0)
             {
-                List<List<scalarField> > scalarValues(allScalars_.size());
+                List<List<scalarField>> scalarValues(allScalars_.size());
 
                 forAll(allScalars_, scalarI)
                 {
@@ -908,7 +908,7 @@ void Foam::streamLineBase::write()
 
             if (allVectors_.size() > 0)
             {
-                List<List<vectorField> > vectorValues(allVectors_.size());
+                List<List<vectorField>> vectorValues(allVectors_.size());
 
                 forAll(allVectors_, vectorI)
                 {
diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineBase.H b/src/postProcessing/functionObjects/field/streamLine/streamLineBase.H
index 5b7e893d7787c687cd30197d1c13146409b3c980..2facb4d2eba67729190aa2bdb86f94b0b2662aa9 100644
--- a/src/postProcessing/functionObjects/field/streamLine/streamLineBase.H
+++ b/src/postProcessing/functionObjects/field/streamLine/streamLineBase.H
@@ -124,22 +124,22 @@ protected:
             word sampledSetAxis_;
 
             //- File writer for scalar data
-            autoPtr<writer<scalar> > scalarFormatterPtr_;
+            autoPtr<writer<scalar>> scalarFormatterPtr_;
 
             //- File writer for vector data
-            autoPtr<writer<vector> > vectorFormatterPtr_;
+            autoPtr<writer<vector>> vectorFormatterPtr_;
 
 
         // Generated data
 
             //- All tracks. Per track the points it passed through
-            DynamicList<List<point> > allTracks_;
+            DynamicList<List<point>> allTracks_;
 
             //- Per scalarField, per track, the sampled values
-            List<DynamicList<scalarList> > allScalars_;
+            List<DynamicList<scalarList>> allScalars_;
 
             //- Per vectorField, per track, the sampled values
-            List<DynamicList<vectorList> > allVectors_;
+            List<DynamicList<vectorList>> allVectors_;
 
 
         //- Construct patch out of all wall patch faces
@@ -151,9 +151,9 @@ protected:
             const label nSeeds,
             label& UIndex,
             PtrList<volScalarField>& vsFlds,
-            PtrList<interpolation<scalar> >& vsInterp,
+            PtrList<interpolation<scalar>>& vsInterp,
             PtrList<volVectorField>& vvFlds,
-            PtrList<interpolation<vector> >& vvInterp
+            PtrList<interpolation<vector>>& vvInterp
         );
 
         //- Generate point and values by interpolating from existing values
@@ -166,8 +166,8 @@ protected:
             const label rightI,
 
             DynamicList<point>& newTrack,
-            DynamicList<List<scalar> >& newScalars,
-            DynamicList<List<vector> >& newVectors
+            DynamicList<List<scalar>>& newScalars,
+            DynamicList<List<vector>>& newVectors
         ) const;
 
         //- Trim and possibly split a track
@@ -175,9 +175,9 @@ protected:
         (
             const treeBoundBox& bb,
             const label trackI,
-            PtrList<DynamicList<point> >& newTracks,
-            PtrList<DynamicList<scalarList> >& newScalars,
-            PtrList<DynamicList<vectorList> >& newVectors
+            PtrList<DynamicList<point>>& newTracks,
+            PtrList<DynamicList<scalarList>>& newScalars,
+            PtrList<DynamicList<vectorList>>& newVectors
         ) const;
 
         //- Trim tracks to bounding box
diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H
index ca939f96a6f83e34aaa7467327a332853e7a5c4c..d200175232d8d12d930f845c72588e3e90c8f8d3 100644
--- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H
+++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,22 +62,22 @@ public:
     //- Class used to pass tracking data to the trackToFace function
     class trackingData
     :
-        public particle::TrackingData<Cloud<streamLineParticle> >
+        public particle::TrackingData<Cloud<streamLineParticle>>
     {
 
     public:
 
 
-        const PtrList<interpolation<scalar> >& vsInterp_;
-        const PtrList<interpolation<vector> >& vvInterp_;
+        const PtrList<interpolation<scalar>>& vsInterp_;
+        const PtrList<interpolation<vector>>& vvInterp_;
         const label UIndex_;
         const bool trackForward_;
         const label nSubCycle_;
         const scalar trackLength_;
 
         DynamicList<vectorList>& allPositions_;
-        List<DynamicList<scalarList> >& allScalars_;
-        List<DynamicList<vectorList> >& allVectors_;
+        List<DynamicList<scalarList>>& allScalars_;
+        List<DynamicList<vectorList>>& allVectors_;
 
 
         // Constructors
@@ -85,19 +85,19 @@ public:
             trackingData
             (
                 Cloud<streamLineParticle>& cloud,
-                const PtrList<interpolation<scalar> >& vsInterp,
-                const PtrList<interpolation<vector> >& vvInterp,
+                const PtrList<interpolation<scalar>>& vsInterp,
+                const PtrList<interpolation<vector>>& vvInterp,
                 const label UIndex,
                 const bool trackForward,
                 const label nSubCycle,
                 const scalar trackLength,
 
-                DynamicList<List<point> >& allPositions,
-                List<DynamicList<scalarList> >& allScalars,
-                List<DynamicList<vectorList> >& allVectors
+                DynamicList<List<point>>& allPositions,
+                List<DynamicList<scalarList>>& allScalars,
+                List<DynamicList<vectorList>>& allVectors
             )
             :
-                particle::TrackingData<Cloud<streamLineParticle> >(cloud),
+                particle::TrackingData<Cloud<streamLineParticle>>(cloud),
                 vsInterp_(vsInterp),
                 vvInterp_(vvInterp),
                 UIndex_(UIndex),
@@ -123,10 +123,10 @@ private:
         DynamicList<point> sampledPositions_;
 
         //- Sampled scalars
-        List<DynamicList<scalar> > sampledScalars_;
+        List<DynamicList<scalar>> sampledScalars_;
 
         //- Sampled vectors
-        List<DynamicList<vector> > sampledVectors_;
+        List<DynamicList<vector>> sampledVectors_;
 
 
     // Private Member Functions
diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H
index b71503f3936970ce88c651a86e4f62810f8e96e3..1c17666ec4d476d0e517f9477bac43991bbdef3b 100644
--- a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H
+++ b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ protected:
         bool active_;
 
         //- Fields to process
-        List<Tuple2<word, word> > fieldSet_;
+        List<Tuple2<word, word>> fieldSet_;
 
         //- Switch to send output to Info as well as to file
         Switch log_;
@@ -119,18 +119,23 @@ protected:
 
     // Protected Member Functions
 
+        template<class Type>
+        void interpolateFields
+        (
+            PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>&
+        ) const;
+
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         surfaceInterpolateFields(const surfaceInterpolateFields&);
 
         //- Disallow default bitwise assignment
         void operator=(const surfaceInterpolateFields&);
 
-        template<class Type>
-        void interpolateFields
-        (
-            PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&
-        ) const;
-
 
 public:
 
@@ -195,7 +200,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "surfaceInterpolateFieldsTemplates.C"
+    #include "surfaceInterpolateFieldsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFieldsTemplates.C b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFieldsTemplates.C
index ad89ee2716b0b47adbb18779564f5184e65d4990..1e2360d35fa23901a02f136cf56ee234c0a5deeb 100644
--- a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFieldsTemplates.C
+++ b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFieldsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ License
 template<class Type>
 void Foam::surfaceInterpolateFields::interpolateFields
 (
-    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds
+    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh>>& sflds
 ) const
 {
     typedef GeometricField<Type, fvPatchField, volMesh> vfType;
diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H
index 2be575b54e489135017c2914fc976ea2fd7d36a6..6e03325bc556d4a431873e1f863b8b9133e88459 100644
--- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H
+++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -337,7 +337,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "wallBoundedParticleTemplates.C"
+    #include "wallBoundedParticleTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C
index dc4cb717d79303100470279cf1df8d3e269f09cc..c63a9a1422d988ed71520d40da28db5ae4aeb743 100644
--- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C
+++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -126,12 +126,6 @@ void Foam::wallBoundedParticle::patchInteraction
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-//- Track particle to a given position and returns 1.0 if the
-//  trajectory is completed without hitting a face otherwise
-//  stops at the face and returns the fraction of the trajectory
-//  completed.
-//  on entry 'stepFraction()' should be set to the fraction of the
-//  time-step at which the tracking starts.
 template<class TrackData>
 Foam::scalar Foam::wallBoundedParticle::trackToEdge
 (
@@ -139,6 +133,13 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
     const vector& endPosition
 )
 {
+    // Track particle to a given position and returns 1.0 if the
+    // trajectory is completed without hitting a face otherwise
+    // stops at the face and returns the fraction of the trajectory
+    // completed.
+    // on entry 'stepFraction()' should be set to the fraction of the
+    // time-step at which the tracking starts.
+
     // Are we on a track face? If not we do a topological walk.
 
     // Particle:
diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C
index 834fb6ac7160633007db03ed9318683ee6b7734f..d370d5be84a617ab1c427e7673ab4491691f321a 100644
--- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C
+++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -180,9 +180,10 @@ void Foam::wallBoundedStreamLine::track()
 
     // Read or lookup fields
     PtrList<volScalarField> vsFlds;
-    PtrList<interpolation<scalar> > vsInterp;
+    PtrList<interpolation<scalar>> vsInterp;
     PtrList<volVectorField> vvFlds;
-    PtrList<interpolation<vector> > vvInterp;
+    PtrList<interpolation<vector>> vvInterp;
+
     label UIndex = -1;
 
     initInterpolations
diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H
index fe7d3366ac01c004c85acd91e1ffeb87a5991864..be09967ac33e6c8b91c93fee7eb84dc9d233921b 100644
--- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H
+++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H
index 2a8d2f35916da77534cdb932a1800c7d73bcec85..cbc82be2a11ddac5f86dccdfed486905958503b7 100644
--- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H
+++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -72,15 +72,15 @@ public:
     public:
 
 
-        const PtrList<interpolation<scalar> >& vsInterp_;
-        const PtrList<interpolation<vector> >& vvInterp_;
+        const PtrList<interpolation<scalar>>& vsInterp_;
+        const PtrList<interpolation<vector>>& vvInterp_;
         const label UIndex_;
         const bool trackForward_;
         const scalar trackLength_;
 
         DynamicList<vectorList>& allPositions_;
-        List<DynamicList<scalarList> >& allScalars_;
-        List<DynamicList<vectorList> >& allVectors_;
+        List<DynamicList<scalarList>>& allScalars_;
+        List<DynamicList<vectorList>>& allVectors_;
 
 
         // Constructors
@@ -88,16 +88,16 @@ public:
             trackingData
             (
                 Cloud<wallBoundedStreamLineParticle>& cloud,
-                const PtrList<interpolation<scalar> >& vsInterp,
-                const PtrList<interpolation<vector> >& vvInterp,
+                const PtrList<interpolation<scalar>>& vsInterp,
+                const PtrList<interpolation<vector>>& vvInterp,
                 const label UIndex,
                 const bool trackForward,
                 const scalar trackLength,
                 const PackedBoolList& isWallPatch,
 
-                DynamicList<List<point> >& allPositions,
-                List<DynamicList<scalarList> >& allScalars,
-                List<DynamicList<vectorList> >& allVectors
+                DynamicList<List<point>>& allPositions,
+                List<DynamicList<scalarList>>& allScalars,
+                List<DynamicList<vectorList>>& allVectors
             )
             :
                 wallBoundedParticle::TrackingData
@@ -132,10 +132,10 @@ private:
         DynamicList<point> sampledPositions_;
 
         //- Sampled scalars
-        List<DynamicList<scalar> > sampledScalars_;
+        List<DynamicList<scalar>> sampledScalars_;
 
         //- Sampled vectors
-        List<DynamicList<vector> > sampledVectors_;
+        List<DynamicList<vector>> sampledVectors_;
 
 
     // Private Member Functions
diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C
index ef3766170882b01d580b55e9e9d55c03bcfea339..5ec48460259f12faa5f0e9715876ff23c6ef815c 100644
--- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C
+++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -147,7 +147,7 @@ void Foam::forceCoeffs::writeBinHeader
 void Foam::forceCoeffs::writeIntegratedData
 (
     const word& title,
-    const List<Field<scalar> >& coeff
+    const List<Field<scalar>>& coeff
 ) const
 {
     scalar pressure = sum(coeff[0]);
@@ -174,7 +174,7 @@ void Foam::forceCoeffs::writeIntegratedData
 
 void Foam::forceCoeffs::writeBinData
 (
-    const List<Field<scalar> > coeffs,
+    const List<Field<scalar>> coeffs,
     Ostream& os
 ) const
 {
@@ -208,9 +208,9 @@ Foam::forceCoeffs::forceCoeffs
 )
 :
     forces(name, obr, dict, loadFromFiles, false),
-    liftDir_(vector::zero),
-    dragDir_(vector::zero),
-    pitchAxis_(vector::zero),
+    liftDir_(Zero),
+    dragDir_(Zero),
+    pitchAxis_(Zero),
     magUInf_(0.0),
     lRef_(0.0),
     Aref_(0.0),
@@ -273,7 +273,7 @@ void Foam::forceCoeffs::read(const dictionary& dict)
                     IOobject::NO_WRITE
                 ),
                 mesh,
-                dimensionedVector("0", dimless, vector::zero)
+                dimensionedVector("0", dimless, Zero)
             )
         );
 
@@ -292,7 +292,7 @@ void Foam::forceCoeffs::read(const dictionary& dict)
                     IOobject::NO_WRITE
                 ),
                 mesh,
-                dimensionedVector("0", dimless, vector::zero)
+                dimensionedVector("0", dimless, Zero)
             )
         );
 
@@ -315,9 +315,9 @@ void Foam::forceCoeffs::execute()
     scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_;
 
     // Storage for pressure, viscous and porous contributions to coeffs
-    List<Field<scalar> > momentCoeffs(3);
-    List<Field<scalar> > dragCoeffs(3);
-    List<Field<scalar> > liftCoeffs(3);
+    List<Field<scalar>> momentCoeffs(3);
+    List<Field<scalar>> dragCoeffs(3);
+    List<Field<scalar>> liftCoeffs(3);
     forAll(liftCoeffs, i)
     {
         momentCoeffs[i].setSize(nBin_);
diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H
index 3addb5596efd16d152f9d2a9dc1f127bf09a9475..ec07ade7d7c9ccbcc28f0bd7bd1a1e806cdff520 100644
--- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H
+++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H
@@ -194,11 +194,11 @@ protected:
         void writeIntegratedData
         (
             const word& title,
-            const List<Field<scalar> >& coeff
+            const List<Field<scalar>>& coeff
         ) const;
 
         //- Write binned data
-        void writeBinData(const List<Field<scalar> > coeffs, Ostream& os) const;
+        void writeBinData(const List<Field<scalar>> coeffs, Ostream& os) const;
 
 
 public:
diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C
index 9501fad1b06bc7be019051186a5be6f65ff0402c..433cdbfcb956fd48a9d8e84294e53108a383d4b3 100644
--- a/src/postProcessing/functionObjects/forces/forces/forces.C
+++ b/src/postProcessing/functionObjects/forces/forces/forces.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -288,13 +288,13 @@ void Foam::forces::initialiseBins()
 
 void Foam::forces::resetFields()
 {
-    force_[0] = vector::zero;
-    force_[1] = vector::zero;
-    force_[2] = vector::zero;
+    force_[0] = Zero;
+    force_[1] = Zero;
+    force_[2] = Zero;
 
-    moment_[0] = vector::zero;
-    moment_[1] = vector::zero;
-    moment_[2] = vector::zero;
+    moment_[0] = Zero;
+    moment_[1] = Zero;
+    moment_[2] = Zero;
 
     if (writeFields_)
     {
@@ -304,7 +304,7 @@ void Foam::forces::resetFields()
                 obr_.lookupObject<volVectorField>(fieldName("force"))
             );
 
-        force == dimensionedVector("0", force.dimensions(), vector::zero);
+        force == dimensionedVector("0", force.dimensions(), Zero);
 
         volVectorField& moment =
             const_cast<volVectorField&>
@@ -312,7 +312,7 @@ void Foam::forces::resetFields()
                 obr_.lookupObject<volVectorField>(fieldName("moment"))
             );
 
-        moment == dimensionedVector("0", moment.dimensions(), vector::zero);
+        moment == dimensionedVector("0", moment.dimensions(), Zero);
     }
 }
 
@@ -667,7 +667,7 @@ void Foam::forces::writeForces()
 
 void Foam::forces::writeBinnedForceMoment
 (
-    const List<Field<vector> >& fm,
+    const List<Field<vector>>& fm,
     autoPtr<OFstream>& osPtr
 ) const
 {
@@ -676,7 +676,7 @@ void Foam::forces::writeBinnedForceMoment
         return;
     }
 
-    List<Field<vector> > f(fm);
+    List<Field<vector>> f(fm);
 
     if (binCumulative_)
     {
@@ -717,8 +717,8 @@ void Foam::forces::writeBins()
 
     if (localSystem_)
     {
-        List<Field<vector> > lf(3);
-        List<Field<vector> > lm(3);
+        List<Field<vector>> lf(3);
+        List<Field<vector>> lm(3);
         lf[0] = coordSys_.localVector(force_[0]);
         lf[1] = coordSys_.localVector(force_[1]);
         lf[2] = coordSys_.localVector(force_[2]);
@@ -769,7 +769,7 @@ Foam::forces::forces
     localSystem_(false),
     porosity_(false),
     nBin_(1),
-    binDir_(vector::zero),
+    binDir_(Zero),
     binDx_(0.0),
     binMin_(GREAT),
     binPoints_(),
@@ -828,7 +828,7 @@ Foam::forces::forces
     localSystem_(false),
     porosity_(false),
     nBin_(1),
-    binDir_(vector::zero),
+    binDir_(Zero),
     binDx_(0.0),
     binMin_(GREAT),
     binPoints_(),
@@ -968,7 +968,7 @@ void Foam::forces::read(const dictionary& dict)
                     IOobject::NO_WRITE
                 ),
                 mesh,
-                dimensionedVector("0", dimForce, vector::zero)
+                dimensionedVector("0", dimForce, Zero)
             )
         );
 
@@ -987,7 +987,7 @@ void Foam::forces::read(const dictionary& dict)
                     IOobject::NO_WRITE
                 ),
                 mesh,
-                dimensionedVector("0", dimForce*dimLength, vector::zero)
+                dimensionedVector("0", dimForce*dimLength, Zero)
             )
         );
 
@@ -1110,7 +1110,7 @@ void Foam::forces::calcForcesMoment()
             vectorField fT(sA*fD.boundaryField()[patchI] - fN);
 
             //- Porous force
-            vectorField fP(Md.size(), vector::zero);
+            vectorField fP(Md.size(), Zero);
 
             addToFields(patchI, Md, fN, fT, fP);
 
@@ -1150,7 +1150,7 @@ void Foam::forces::calcForcesMoment()
 
             vectorField fT(Sfb[patchI] & devRhoReffb[patchI]);
 
-            vectorField fP(Md.size(), vector::zero);
+            vectorField fP(Md.size(), Zero);
 
             addToFields(patchI, Md, fN, fT, fP);
 
@@ -1195,7 +1195,7 @@ void Foam::forces::calcForcesMoment()
                 const vectorField fP(fPTot, cZone);
                 const vectorField Md(d - coordSys_.origin());
 
-                const vectorField fDummy(Md.size(), vector::zero);
+                const vectorField fDummy(Md.size(), Zero);
 
                 addToFields(cZone, Md, fDummy, fDummy, fP);
 
diff --git a/src/postProcessing/functionObjects/forces/forces/forces.H b/src/postProcessing/functionObjects/forces/forces/forces.H
index db048f5aa8a3f43a21eba8db662090caab2ec697..3673cb9fd70ff1b8651482243e9a95ebe3852c14 100644
--- a/src/postProcessing/functionObjects/forces/forces/forces.H
+++ b/src/postProcessing/functionObjects/forces/forces/forces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -173,10 +173,10 @@ protected:
         Switch log_;
 
         //- Pressure, viscous and porous force per bin
-        List<Field<vector> > force_;
+        List<Field<vector>> force_;
 
         //- Pressure, viscous and porous moment per bin
-        List<Field<vector> > moment_;
+        List<Field<vector>> moment_;
 
         // File streams
 
@@ -351,7 +351,7 @@ protected:
         //- Helper function to write binned forces and moments
         void writeBinnedForceMoment
         (
-            const List<Field<vector> >& fm,
+            const List<Field<vector>>& fm,
             autoPtr<OFstream>& osPtr
         ) const;
 
diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGradTemplates.C b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGradTemplates.C
index 89589a0c45449adc42cb449d3a468fa1d2455593..0a570b9872cb1b3ba845912ab44ef73abf61f4dc 100644
--- a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGradTemplates.C
+++ b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGradTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ Foam::calcFvcGrad::gradField(const word& gradName, const dimensionSet& dims)
                 (
                     "zero",
                     dims/dimLength,
-                    pTraits<gradType>::zero
+                    Zero
                 )
             )
         );
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/CMakeLists-Common.txt b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/CMakeLists-Common.txt
index d309a24fd56bb75d769e18f14b4d6e02410594fb..bb98b9c158e793c38dc4c7257847a800275bc44b 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/CMakeLists-Common.txt
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/CMakeLists-Common.txt
@@ -32,13 +32,13 @@ add_definitions(
 set(CMAKE_BUILD_TYPE Release)
 
 set(CMAKE_CXX_FLAGS_DEBUG
-    "-g -O0 -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual"
+    "-g -O0 -std=c++0x -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual"
 )
-set(CMAKE_C_FLAGS_DEBUG "-g -O0")
+set(CMAKE_C_FLAGS_DEBUG "-g -O0 -std=c++0x")
 
 set(CMAKE_CXX_FLAGS_RELEASE
-    "-O3 -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual")
-set(CMAKE_C_FLAGS_RELEASE "-O3")
+    "-O3 -std=c++0x -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wno-overloaded-virtual")
+set(CMAKE_C_FLAGS_RELEASE "-O3 -std=c++0x")
 
 # Set output library destination to plugin directory
 set(LIBRARY_OUTPUT_PATH $ENV{FOAM_LIBBIN}
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C
index ed48eb60c0167bd9df5d5d3a72d6ed590cbce6c9..d70f3d77e1b2c02201f9fe859e2d9f60ea1273a5 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.C
@@ -437,7 +437,7 @@ Foam::fieldVisualisationBase::fieldVisualisationBase
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     parent_(parent),
@@ -489,7 +489,7 @@ Foam::fieldVisualisationBase::~fieldVisualisationBase()
 
 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
 
-const Foam::HashPtrTable<Foam::DataEntry<Foam::vector>, Foam::word>&
+const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
 Foam::fieldVisualisationBase::colours() const
 {
     return colours_;
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H
index e365ddf59792c0fd4fb66ea5ac29715dcc1f5145..65fe8a36b0033d3be495b5028c6c57926fbf6c5a 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/fieldVisualisationBase.H
@@ -39,7 +39,7 @@ SourceFiles
 #include "NamedEnum.H"
 #include "vector.H"
 #include "HashPtrTable.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 #include "vtkSmartPointer.h"
 
@@ -121,7 +121,7 @@ protected:
         };
 
         //- Colours
-        const HashPtrTable<DataEntry<vector>, word>& colours_;
+        const HashPtrTable<Function1<vector>, word>& colours_;
 
         //- Field name
         word fieldName_;
@@ -183,7 +183,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
@@ -196,7 +196,7 @@ public:
         // Access
 
             //- Return the colours
-            const HashPtrTable<DataEntry<vector>, word>& colours() const;
+            const HashPtrTable<Function1<vector>, word>& colours() const;
 
             //- Return the field name
             const word& fieldName() const;
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C
index 8c1f4e8535d664339ee35540e3e15774b2be3c9c..6150bd15ea4357e68a6d1e52e8ca8b843ba49950 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.C
@@ -51,7 +51,7 @@ Foam::functionObjectCloud::functionObjectCloud
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     pointData(parent, dict, colours),
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H
index 553bf96f3af287d5406118343b245cf14530a685..afc1c5262ff1b76e18bfd2d32f0cf8eb1ae13169 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectCloud.H
@@ -92,7 +92,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C
index d95099759865692cbbebab49fe1a67300863ceaa..1455eb619100a99d5420a748c59b5dbbee5cb11c 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.C
@@ -51,7 +51,7 @@ Foam::functionObjectLine::functionObjectLine
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     pathline(parent, dict, colours),
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H
index 9224d7246ade59a9ca07a9f78a156de2eca0dfa7..3749d24597642c9417aea87cb6abaa8407888752 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectLine.H
@@ -86,7 +86,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C
index e7c6c691760427e1df81e04ac472bd2e086e564c..d9d59c2bb68a6f0ff22d490f97fef00a71f202e6 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.C
@@ -51,7 +51,7 @@ Foam::functionObjectSurface::functionObjectSurface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     geometrySurface(parent, dict, colours, List<fileName>()),
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H
index 32f4a7572c63c666b60c782a4ae32cfe520f9439..b881611b6a375ad619c1d1850662c2149fadff64 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/functionObjectSurface.H
@@ -85,7 +85,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.C
index a40bd6b9fe365d825b110ffece4f67379bac13a6..0d78faf14b287b5e3db919931fcb83a959f21876 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.C
@@ -81,7 +81,7 @@ Foam::geometryBase::geometryBase
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     parent_(parent),
@@ -98,11 +98,11 @@ Foam::geometryBase::geometryBase
 
     if (dict.found("opacity"))
     {
-        opacity_.reset(DataEntry<scalar>::New("opacity", dict).ptr());
+        opacity_.reset(Function1<scalar>::New("opacity", dict).ptr());
     }
     else
     {
-        opacity_.reset(new Constant<scalar>("opacity", 1.0));
+        opacity_.reset(new Function1Types::Constant<scalar>("opacity", 1.0));
     }
 }
 
@@ -139,7 +139,7 @@ Foam::scalar Foam::geometryBase::opacity(const scalar position) const
 }
 
 
-const Foam::HashPtrTable<Foam::DataEntry<Foam::vector>, Foam::word>&
+const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
 Foam::geometryBase::colours() const
 {
     return colours_;
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.H
index ee6afe332a4eb284a9eabf805f6c99c77c60c293..49997d79ad200470debada914a04ea3fadebf69e 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometryBase.H
@@ -36,7 +36,7 @@ SourceFiles
 
 #include "dictionary.H"
 #include "vector.H"
-#include "DataEntry.H"
+#include "Function1.H"
 #include "HashPtrTable.H"
 #include "NamedEnum.H"
 
@@ -99,10 +99,10 @@ protected:
         renderModeType renderMode_;
 
         //- Opacity
-        autoPtr<DataEntry<scalar> > opacity_;
+        autoPtr<Function1<scalar>> opacity_;
 
         //- Reference to the colours
-        const HashPtrTable<DataEntry<vector>, word>& colours_;
+        const HashPtrTable<Function1<vector>, word>& colours_;
 
 
     // Protected functions
@@ -120,7 +120,7 @@ public:
         (
             const runTimePostProcessing& parent_,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
@@ -145,7 +145,7 @@ public:
             scalar opacity(const scalar position) const;
 
             //- Return reference to the colours
-            const HashPtrTable<DataEntry<vector>, word>& colours() const;
+            const HashPtrTable<Function1<vector>, word>& colours() const;
 
 
         //- Add geometry to scene
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C
index 535cdddc99cbbae862a8c0ccc4081396de3de093..9046189f593e149f2432eec6266b248cc2c1c7dd 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.C
@@ -136,7 +136,7 @@ Foam::geometrySurface::geometrySurface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     surface(parent, dict, colours),
@@ -148,7 +148,7 @@ Foam::geometrySurface::geometrySurface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours,
+    const HashPtrTable<Function1<vector>, word>& colours,
     const List<fileName>& fileNames
 )
 :
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.H
index 5eec3ee8d67d79183053dee1b8e4b22f070edee1..3b35bc171b687a9c5e307c9926f8e91d7b6f0f89 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/geometrySurface.H
@@ -94,7 +94,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
         //- Construct from components
@@ -102,7 +102,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours,
+            const HashPtrTable<Function1<vector>, word>& colours,
             const List<fileName>& fileNames
         );
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C
index 744c092cf8fc75356a2584493ddd63c2a6b0fec1..0b5a2da8be881c32d8368122beecf07657a70b70 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.C
@@ -118,7 +118,7 @@ Foam::pathline::pathline
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     geometryBase(parent, dict, colours),
@@ -131,7 +131,7 @@ Foam::pathline::pathline
 {
     if (dict.found("lineColour"))
     {
-        lineColour_.reset(DataEntry<vector>::New("lineColour", dict).ptr());
+        lineColour_.reset(Function1<vector>::New("lineColour", dict).ptr());
     }
     else
     {
@@ -168,7 +168,7 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours,
+    const HashPtrTable<Function1<vector>, word>& colours,
     const word& pathlineType
 )
 {
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.H
index 0813210117a5cf8ded72ff4891c52bb1d28e99b7..0686548269507ea4889b211055719803f92ccf24 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pathline.H
@@ -92,7 +92,7 @@ protected:
         scalar tubeRadius_;
 
         //- Line colour
-        autoPtr<DataEntry<vector> > lineColour_;
+        autoPtr<Function1<vector>> lineColour_;
 
 
     // Protected Member Functions
@@ -122,7 +122,7 @@ public:
             (
                 const runTimePostProcessing& parent,
                 const dictionary& dict,
-                const HashPtrTable<DataEntry<vector>, word>& colours
+                const HashPtrTable<Function1<vector>, word>& colours
             ),
             (parent, dict, colours)
         );
@@ -135,7 +135,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
@@ -146,7 +146,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours,
+            const HashPtrTable<Function1<vector>, word>& colours,
             const word& pathlineName
         );
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C
index cae1853e657f807d481462db93582a956b421775..19838d4adc9b83baa4f315b628ab7869e29d5b0f 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.C
@@ -87,7 +87,7 @@ Foam::pointData::pointData
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     geometryBase(parent, dict, colours),
@@ -100,7 +100,7 @@ Foam::pointData::pointData
 {
     if (dict.found("pointColour"))
     {
-        pointColour_.reset(DataEntry<vector>::New("pointColour", dict).ptr());
+        pointColour_.reset(Function1<vector>::New("pointColour", dict).ptr());
     }
     else
     {
@@ -128,7 +128,7 @@ Foam::autoPtr<Foam::pointData> Foam::pointData::New
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours,
+    const HashPtrTable<Function1<vector>, word>& colours,
     const word& pointDataType
 )
 {
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.H
index 068ee78fc0cb89e39c492ce89da28ba92a880de4..f6521b6407160fa35c898319bd7a76d668cfc071 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/pointData.H
@@ -90,7 +90,7 @@ protected:
         scalar maxGlyphLength_;
 
         //- Point colour
-        autoPtr<DataEntry<vector> > pointColour_;
+        autoPtr<Function1<vector>> pointColour_;
 
 
     // Protected Member Functions
@@ -121,7 +121,7 @@ public:
             (
                 const runTimePostProcessing& parent,
                 const dictionary& dict,
-                const HashPtrTable<DataEntry<vector>, word>& colours
+                const HashPtrTable<Function1<vector>, word>& colours
             ),
             (parent, dict, colours)
         );
@@ -134,7 +134,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
@@ -145,7 +145,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours,
+            const HashPtrTable<Function1<vector>, word>& colours,
             const word& pointDataName
         );
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C
index 3ceace96954a4870573436c3f51821d7b8353481..3e8b29e85d04d51b8fed6f3eba3ae3169c974054 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -103,27 +103,30 @@ void Foam::scene::readCamera(const dictionary& dict)
         {
             clipBox_ = boundBox(coeffs.lookup("clipBox"));
             const vector lookDir(vector(coeffs.lookup("lookDir")));
-            cameraPosition_.reset(new Constant<point>("position", -lookDir));
+            cameraPosition_.reset
+            (
+                new Function1Types::Constant<point>("position", -lookDir)
+            );
             const vector focalPoint(coeffs.lookup("focalPoint"));
             cameraFocalPoint_.reset
             (
-                new Constant<point>("focalPoint", focalPoint)
+                new Function1Types::Constant<point>("focalPoint", focalPoint)
             );
             const vector up(coeffs.lookup("up"));
-            cameraUp_.reset(new Constant<point>("up", up));
+            cameraUp_.reset(new Function1Types::Constant<point>("up", up));
             break;
         }
         case mtFlightPath:
         {
             cameraPosition_.reset
             (
-                DataEntry<vector>::New("position", coeffs).ptr()
+                Function1<vector>::New("position", coeffs).ptr()
             );
             cameraFocalPoint_.reset
             (
-                DataEntry<point>::New("focalPoint", coeffs).ptr()
+                Function1<point>::New("focalPoint", coeffs).ptr()
             );
-            cameraUp_.reset(DataEntry<vector>::New("up", coeffs).ptr());
+            cameraUp_.reset(Function1<vector>::New("up", coeffs).ptr());
             break;
         }
         default:
@@ -136,20 +139,23 @@ void Foam::scene::readCamera(const dictionary& dict)
 
     if (dict.found("zoom"))
     {
-        cameraZoom_.reset(DataEntry<scalar>::New("zoom", dict).ptr());
+        cameraZoom_.reset(Function1<scalar>::New("zoom", dict).ptr());
     }
     else
     {
-        cameraZoom_.reset(new Constant<scalar>("zoom", 1.0));
+        cameraZoom_.reset(new Function1Types::Constant<scalar>("zoom", 1.0));
     }
 
     if (dict.found("viewAngle"))
     {
-        cameraViewAngle_.reset(DataEntry<scalar>::New("viewAngle", dict).ptr());
+        cameraViewAngle_.reset(Function1<scalar>::New("viewAngle", dict).ptr());
     }
     else
     {
-        cameraViewAngle_.reset(new Constant<scalar>("viewAngle", 35.0));
+        cameraViewAngle_.reset
+        (
+            new Function1Types::Constant<scalar>("viewAngle", 35.0)
+        );
     }
 }
 
@@ -160,7 +166,7 @@ void Foam::scene::readColours(const dictionary& dict)
     forAll(colours, i)
     {
         const word& c = colours[i];
-        colours_.insert(c, DataEntry<vector>::New(c, dict).ptr());
+        colours_.insert(c, Function1<vector>::New(c, dict).ptr());
     }
 }
 
@@ -305,7 +311,7 @@ Foam::scene::~scene()
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-const Foam::HashPtrTable<Foam::DataEntry<Foam::vector>, Foam::word>&
+const Foam::HashPtrTable<Foam::Function1<Foam::vector>, Foam::word>&
 Foam::scene::colours() const
 {
     return colours_;
@@ -348,7 +354,14 @@ bool Foam::scene::loop(vtkRenderer* renderer)
 
     currentFrameI_++;
 
-    position_ += currentFrameI_*dPosition_;
+    if (position_ > (1 + 0.5*dPosition_))
+    {
+        WarningInFunction
+            << "Current position exceeded 1 - please check your setup"
+            << endl;
+    }
+
+    position_ += dPosition_;
 
     if (currentFrameI_ < nFrameTotal_)
     {
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.H
index d3bd156e39d56a04419ec7c316d5f9c70d88dadb..470780c33e0e0b380ced3129729872b2d0cbc2c4 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.H
@@ -36,7 +36,7 @@ SourceFiles
 
 // OpenFOAM includes
 #include "dictionary.H"
-#include "DataEntry.H"
+#include "Function1.H"
 #include "vector.H"
 #include "point.H"
 #include "boundBox.H"
@@ -99,7 +99,7 @@ protected:
     // Protected data
 
         //- Colours
-        HashPtrTable<DataEntry<vector>, word> colours_;
+        HashPtrTable<Function1<vector>, word> colours_;
 
 
         // Camera settings
@@ -108,19 +108,19 @@ protected:
             modeType mode_;
 
             //- Position
-            autoPtr<DataEntry<point> > cameraPosition_;
+            autoPtr<Function1<point>> cameraPosition_;
 
             //- Focal point
-            autoPtr<DataEntry<point> > cameraFocalPoint_;
+            autoPtr<Function1<point>> cameraFocalPoint_;
 
             //- Up direction
-            autoPtr<DataEntry<vector> > cameraUp_;
+            autoPtr<Function1<vector>> cameraUp_;
 
             //- Zoom level
-            autoPtr<DataEntry<scalar> > cameraZoom_;
+            autoPtr<Function1<scalar>> cameraZoom_;
 
             //- View angle
-            autoPtr<DataEntry<scalar> > cameraViewAngle_;
+            autoPtr<Function1<scalar>> cameraViewAngle_;
 
 
         // Scene management
@@ -171,7 +171,7 @@ public:
         // Access
 
             //- Return the colours
-            const HashPtrTable<DataEntry<vector>, word>& colours() const;
+            const HashPtrTable<Function1<vector>, word>& colours() const;
 
             //- Return the current frame index
             label frameIndex() const;
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C
index 1cb877d9cb7242829b8d0bda37dc615f7cb52e75..45618af1a07b5326bfcec7153a2c4fc1585f4168 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.C
@@ -135,7 +135,7 @@ Foam::surface::surface
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     geometryBase(parent, dict, colours),
@@ -157,7 +157,7 @@ Foam::surface::surface
     {
         surfaceColour_.reset
         (
-            DataEntry<vector>::New("surfaceColour", dict).ptr()
+            Function1<vector>::New("surfaceColour", dict).ptr()
         );
     }
     else
@@ -167,7 +167,7 @@ Foam::surface::surface
 
     if (dict.found("edgeColour"))
     {
-        edgeColour_.reset(DataEntry<vector>::New("edgeColour", dict).ptr());
+        edgeColour_.reset(Function1<vector>::New("edgeColour", dict).ptr());
     }
     else
     {
@@ -191,7 +191,7 @@ Foam::autoPtr<Foam::surface> Foam::surface::New
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours,
+    const HashPtrTable<Function1<vector>, word>& colours,
     const word& surfaceType
 )
 {
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.H
index d03ff34fb7bb0cd7d2be35fb769b97b3ea7c6967..cd6f7fbbd2c71e0efb0fc639e3bae560524b7b29 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/surface.H
@@ -95,10 +95,10 @@ protected:
         bool featureEdges_;
 
         //- Surface colour
-        autoPtr<DataEntry<vector> > surfaceColour_;
+        autoPtr<Function1<vector>> surfaceColour_;
 
         //- Edge colour
-        autoPtr<DataEntry<vector> > edgeColour_;
+        autoPtr<Function1<vector>> edgeColour_;
 
         //- Surface actor
         vtkSmartPointer<vtkActor> surfaceActor_;
@@ -139,7 +139,7 @@ public:
             (
                 const runTimePostProcessing& parent,
                 const dictionary& dict,
-                const HashPtrTable<DataEntry<vector>, word>& colours
+                const HashPtrTable<Function1<vector>, word>& colours
             ),
             (parent, dict, colours)
         );
@@ -152,7 +152,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
@@ -163,7 +163,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours,
+            const HashPtrTable<Function1<vector>, word>& colours,
             const word& surfaceName
         );
 
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.C
index b4c1ff3f86c9d099704922e1c57fd6e41f3a89ed..879f2c7d069b0ed289f5cced73c92be7882e6b69 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.C
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.C
@@ -39,7 +39,7 @@ Foam::text::text
 (
     const runTimePostProcessing& parent,
     const dictionary& dict,
-    const HashPtrTable<DataEntry<vector>, word>& colours
+    const HashPtrTable<Function1<vector>, word>& colours
 )
 :
     geometryBase(parent, dict, colours),
@@ -51,7 +51,7 @@ Foam::text::text
 {
     if (dict.found("colour"))
     {
-        colour_.reset(DataEntry<vector>::New("colour", dict).ptr());
+        colour_.reset(Function1<vector>::New("colour", dict).ptr());
     }
     else
     {
diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.H b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.H
index bee0020ef55cbebd33943905a1521ff437988ed6..891519ad3ea0364b4365b5cc3984dd86d0963ac5 100644
--- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.H
+++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/text.H
@@ -77,7 +77,7 @@ protected:
         scalar size_;
 
         //- Colour
-        autoPtr<DataEntry<vector> > colour_;
+        autoPtr<Function1<vector>> colour_;
 
         //- Bold flag
         bool bold_;
@@ -92,7 +92,7 @@ public:
         (
             const runTimePostProcessing& parent,
             const dictionary& dict,
-            const HashPtrTable<DataEntry<vector>, word>& colours
+            const HashPtrTable<Function1<vector>, word>& colours
         );
 
 
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H
index 5985f1f587d6b9ec2dbacf066d498a026d692e1e..458296f99f7dfe828b607aca2b75a75478e87b4f 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H
+++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObject.H
@@ -275,7 +275,7 @@ class externalCoupledFunctionObject
 
         //- Helper: append data from all processors onto master
         template<class Type>
-        static tmp<Field<Type> > gatherAndCombine(const Field<Type>& fld);
+        static tmp<Field<Type>> gatherAndCombine(const Field<Type>& fld);
 
         static void checkOrder(const wordList&);
 
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C
index 7cb6ef9b175f416af6e523bc1c4e925491e1cb31..9e92ff047a3593d4cce92272072cbea796d5be13 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C
+++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledFunctionObjectTemplates.C
@@ -143,7 +143,7 @@ bool Foam::externalCoupledFunctionObject::readData
                 // additional processing by derived type.
                 pf.patchFieldType::evaluate();
             }
-            else if (isA<mixedFvPatchField<Type> >(bf[patchI]))
+            else if (isA<mixedFvPatchField<Type>>(bf[patchI]))
             {
                 // Read columns from file for
                 // value, snGrad, refValue, refGrad, valueFraction
@@ -159,7 +159,7 @@ bool Foam::externalCoupledFunctionObject::readData
                 mixedFvPatchField<Type>& pf =
                 const_cast<mixedFvPatchField<Type>&>
                 (
-                    refCast<const mixedFvPatchField<Type> >
+                    refCast<const mixedFvPatchField<Type>>
                     (
                         bf[patchI]
                     )
@@ -195,7 +195,7 @@ bool Foam::externalCoupledFunctionObject::readData
                 // additional processing by derived type.
                 pf.mixedFvPatchField<Type>::evaluate();
             }
-            else if (isA<fixedGradientFvPatchField<Type> >(bf[patchI]))
+            else if (isA<fixedGradientFvPatchField<Type>>(bf[patchI]))
             {
                 // Read columns for value and gradient
                 List<scalarField> data;
@@ -210,7 +210,7 @@ bool Foam::externalCoupledFunctionObject::readData
                 fixedGradientFvPatchField<Type>& pf =
                 const_cast<fixedGradientFvPatchField<Type>&>
                 (
-                    refCast<const fixedGradientFvPatchField<Type> >
+                    refCast<const fixedGradientFvPatchField<Type>>
                     (
                         bf[patchI]
                     )
@@ -236,7 +236,7 @@ bool Foam::externalCoupledFunctionObject::readData
                 // additional processing by derived type.
                 pf.fixedGradientFvPatchField<Type>::evaluate();
             }
-            else if (isA<fixedValueFvPatchField<Type> >(bf[patchI]))
+            else if (isA<fixedValueFvPatchField<Type>>(bf[patchI]))
             {
                 // Read columns for value only
                 List<scalarField> data;
@@ -263,7 +263,7 @@ bool Foam::externalCoupledFunctionObject::readData
                 fixedValueFvPatchField<Type>& pf =
                 const_cast<fixedValueFvPatchField<Type>&>
                 (
-                    refCast<const fixedValueFvPatchField<Type> >
+                    refCast<const fixedValueFvPatchField<Type>>
                     (
                         bf[patchI]
                     )
@@ -293,20 +293,20 @@ bool Foam::externalCoupledFunctionObject::readData
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::externalCoupledFunctionObject::gatherAndCombine
 (
     const Field<Type>& fld
 )
 {
     // Collect values from all processors
-    List<Field<Type> > gatheredValues(Pstream::nProcs());
+    List<Field<Type>> gatheredValues(Pstream::nProcs());
     gatheredValues[Pstream::myProcNo()] = fld;
     Pstream::gatherList(gatheredValues);
 
 
-    tmp<Field<Type> > tresult(new Field<Type>(0));
-    Field<Type>& result = tresult();
+    tmp<Field<Type>> tresult(new Field<Type>(0));
+    Field<Type>& result = tresult.ref();
 
     if (Pstream::master())
     {
@@ -456,10 +456,10 @@ bool Foam::externalCoupledFunctionObject::writeData
                     toMaster << os.str();
                 }
             }
-            else if (isA<mixedFvPatchField<Type> >(bf[patchI]))
+            else if (isA<mixedFvPatchField<Type>>(bf[patchI]))
             {
                 const mixedFvPatchField<Type>& pf =
-                    refCast<const mixedFvPatchField<Type> >(bf[patchI]);
+                    refCast<const mixedFvPatchField<Type>>(bf[patchI]);
 
                 Field<Type> value(gatherAndCombine(pf));
                 Field<Type> snGrad(gatherAndCombine(pf.snGrad()()));
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C
index c99e3cc1e5a044308357dd30e18e402f1b542412..17587fc9a55332fc10a1abf43cc35d8762d043a5 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C
+++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.C
@@ -39,8 +39,8 @@ externalCoupledMixedFvPatchField
 :
     mixedFvPatchField<Type>(p, iF)
 {
-    this->refValue() = pTraits<Type>::zero;
-    this->refGrad() = pTraits<Type>::zero;
+    this->refValue() = Type(Zero);
+    this->refGrad() = Type(Zero);
     this->valueFraction() = 0.0;
 }
 
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H
index 2d700207d19e9987471585aa76ceb7e51c543473..bb5db25f61f3a2b90660248af2d68ee179e3927d 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H
+++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledMixed/externalCoupledMixedFvPatchField.H
@@ -112,9 +112,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<Type> > clone() const
+        virtual tmp<fvPatchField<Type>> clone() const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new externalCoupledMixedFvPatchField<Type>(*this)
             );
@@ -128,12 +128,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<Type> > clone
+        virtual tmp<fvPatchField<Type>> clone
         (
             const DimensionedField<Type, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<Type> >
+            return tmp<fvPatchField<Type>>
             (
                 new externalCoupledMixedFvPatchField<Type>(*this, iF)
             );
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
index 01976d43040aa4b02b1f3ddf8741b015e418817c..ba2ac858a56103c36dbb0e60af7c3e949357be48 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
+++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ externalCoupledTemperatureMixedFvPatchScalarField
 
         // Initialise as a fixed value
         this->refValue() = *this;
-        this->refGrad() = pTraits<scalar>::zero;
+        this->refGrad() = Zero;
         this->valueFraction() = 1.0;
     }
 }
diff --git a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H
index 70ba538e17b5309a27ae92803f650da825c3cda5..a13c46aee490aab7e9685b029321753cb0ec1a7b 100644
--- a/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H
+++ b/src/postProcessing/functionObjects/jobControl/externalCoupled/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -141,9 +141,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new externalCoupledTemperatureMixedFvPatchScalarField(*this)
             );
@@ -157,12 +157,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new externalCoupledTemperatureMixedFvPatchScalarField
                 (
diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.H b/src/postProcessing/functionObjects/systemCall/systemCall.H
index b4d43a2bf7f172ae857ac3dad0e739cce3e7d32f..eb9202c01b3e10d1f3e570ada671e45645912f26 100644
--- a/src/postProcessing/functionObjects/systemCall/systemCall.H
+++ b/src/postProcessing/functionObjects/systemCall/systemCall.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -123,7 +123,9 @@ protected:
         stringList writeCalls_;
 
 
-    // Private Member Functions
+private:
+
+    // Private member functions
 
         //- Disallow default bitwise copy construct
         systemCall(const systemCall&);
diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C
index be18bbc0bcb5c8a91867b4223ad0495cec1f9c5b..1ac8818066148f2611f997a363049a82342e36bb 100644
--- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C
+++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "CourantNo.H"
 #include "surfaceFields.H"
 #include "fvcSurfaceIntegrate.H"
+#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
diff --git a/src/postProcessing/functionObjects/utilities/Make/files b/src/postProcessing/functionObjects/utilities/Make/files
index f42510d7a5dcd07e7c975a6c24dfc8dd867496d1..1cee77173dd0006c9d2c6ffb45e1dce376c256c0 100644
--- a/src/postProcessing/functionObjects/utilities/Make/files
+++ b/src/postProcessing/functionObjects/utilities/Make/files
@@ -27,6 +27,9 @@ pressureTools/pressureToolsFunctionObject.C
 Q/Q.C
 Q/QFunctionObject.C
 
+residuals/residuals.C
+residuals/residualsFunctionObject.C
+
 scalarTransport/scalarTransport.C
 scalarTransport/scalarTransportFunctionObject.C
 
diff --git a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C
index 7dfe5b972641edc1064467c2fe23f9bee511c6eb..26832a892d62cd2e1070512794c235adc7860dc1 100644
--- a/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C
+++ b/src/postProcessing/functionObjects/utilities/blendingFactor/blendingFactorTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "gaussConvectionScheme.H"
 #include "blendedSchemeBase.H"
 #include "fvcCellReduce.H"
+#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -49,16 +50,16 @@ void Foam::blendingFactor::calc()
     const surfaceScalarField& phi =
         mesh.lookupObject<surfaceScalarField>(phiName_);
 
-    tmp<fv::convectionScheme<Type> > cs =
+    tmp<fv::convectionScheme<Type>> cs =
         fv::convectionScheme<Type>::New(mesh, phi, its);
 
     const fv::gaussConvectionScheme<Type>& gcs =
-        refCast<const fv::gaussConvectionScheme<Type> >(cs());
+        refCast<const fv::gaussConvectionScheme<Type>>(cs());
 
     const surfaceInterpolationScheme<Type>& interpScheme =
         gcs.interpScheme();
 
-    if (!isA<blendedSchemeBase<Type> >(interpScheme))
+    if (!isA<blendedSchemeBase<Type>>(interpScheme))
     {
         FatalErrorInFunction
             << interpScheme.typeName << " is not a blended scheme"
@@ -67,7 +68,7 @@ void Foam::blendingFactor::calc()
 
     // Retrieve the face-based blending factor
     const blendedSchemeBase<Type>& blendedScheme =
-        refCast<const blendedSchemeBase<Type> >(interpScheme);
+        refCast<const blendedSchemeBase<Type>>(interpScheme);
     const surfaceScalarField factorf(blendedScheme.blendingFactor(field));
 
     // Convert into vol field whose values represent the local face minima
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C
index a5f481c52fcbfb735dfda82ca6fa9dcaf7ef5c87..0ac60ab3081a88b1353e025bad3ed16bed47942b 100644
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C
+++ b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.C
@@ -64,9 +64,9 @@ void Foam::fluxSummary::initialiseFaceZone
 (
     const word& faceZoneName,
     DynamicList<word>& faceZoneNames,
-    DynamicList<List<label> >& faceID,
-    DynamicList<List<label> >& facePatchID,
-    DynamicList<List<scalar> >& faceSign
+    DynamicList<List<label>>& faceID,
+    DynamicList<List<label>>& facePatchID,
+    DynamicList<List<scalar>>& faceSign
 ) const
 {
     const fvMesh& mesh = refCast<const fvMesh>(obr_);
@@ -155,9 +155,9 @@ void Foam::fluxSummary::initialiseFaceZoneAndDirection
     const vector& dir,
     DynamicList<vector>& zoneRefDir,
     DynamicList<word>& faceZoneNames,
-    DynamicList<List<label> >& faceID,
-    DynamicList<List<label> >& facePatchID,
-    DynamicList<List<scalar> >& faceSign
+    DynamicList<List<label>>& faceID,
+    DynamicList<List<label>>& facePatchID,
+    DynamicList<List<scalar>>& faceSign
 ) const
 {
     const fvMesh& mesh = refCast<const fvMesh>(obr_);
@@ -186,7 +186,7 @@ void Foam::fluxSummary::initialiseFaceZoneAndDirection
     const surfaceVectorField& Sf = mesh.Sf();
     const surfaceScalarField& magSf = mesh.magSf();
 
-    vector n = vector::zero;
+    vector n(Zero);
 
     forAll(fZone, i)
     {
@@ -264,9 +264,9 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
     const vector& dir,
     DynamicList<vector>& zoneRefDir,
     DynamicList<word>& faceZoneNames,
-    DynamicList<List<label> >& faceID,
-    DynamicList<List<label> >& facePatchID,
-    DynamicList<List<scalar> >& faceSign
+    DynamicList<List<label>>& faceID,
+    DynamicList<List<label>>& facePatchID,
+    DynamicList<List<scalar>>& faceSign
 ) const
 {
     const fvMesh& mesh = refCast<const fvMesh>(obr_);
@@ -490,9 +490,9 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
     // collect the data per region
     label nRegion = regionI;
 
-    List<DynamicList<label> > regionFaceIDs(nRegion);
-    List<DynamicList<label> > regionFacePatchIDs(nRegion);
-    List<DynamicList<scalar> > regionFaceSigns(nRegion);
+    List<DynamicList<label>> regionFaceIDs(nRegion);
+    List<DynamicList<label>> regionFacePatchIDs(nRegion);
+    List<DynamicList<scalar>> regionFaceSigns(nRegion);
 
     forAll(allFaceInfo, faceI)
     {
@@ -641,9 +641,9 @@ void Foam::fluxSummary::read(const dictionary& dict)
     // initialise with capacity of 10 faceZones
     DynamicList<vector> refDir(10);
     DynamicList<word> faceZoneName(refDir.size());
-    DynamicList<List<label> > faceID(refDir.size());
-    DynamicList<List<label> > facePatchID(refDir.size());
-    DynamicList<List<scalar> > faceSign(refDir.size());
+    DynamicList<List<label>> faceID(refDir.size());
+    DynamicList<List<label>> facePatchID(refDir.size());
+    DynamicList<List<scalar>> faceSign(refDir.size());
 
     switch (mode_)
     {
@@ -666,7 +666,7 @@ void Foam::fluxSummary::read(const dictionary& dict)
         }
         case mdFaceZoneAndDirection:
         {
-            List<Tuple2<word, vector> >
+            List<Tuple2<word, vector>>
                 zoneAndDirection(dict.lookup("faceZoneAndDirection"));
 
             forAll(zoneAndDirection, i)
@@ -686,7 +686,7 @@ void Foam::fluxSummary::read(const dictionary& dict)
         }
         case mdCellZoneAndDirection:
         {
-            List<Tuple2<word, vector> >
+            List<Tuple2<word, vector>>
                 zoneAndDirection(dict.lookup("cellZoneAndDirection"));
 
             forAll(zoneAndDirection, i)
diff --git a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H
index 777167b171ffc4b3a575d2f3df735010ab3ea313..dbc198baf7b3fa313afa56baacd8ac29e1e8857d 100644
--- a/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H
+++ b/src/postProcessing/functionObjects/utilities/fluxSummary/fluxSummary.H
@@ -161,13 +161,13 @@ protected:
             List<vector> refDir_;
 
             //- Face IDs
-            List<List<label> > faceID_;
+            List<List<label>> faceID_;
 
             //- Face patch IDs
-            List<List<label> > facePatchID_;
+            List<List<label>> facePatchID_;
 
             //- Face flip map signs
-            List<List<scalar> > faceSign_;
+            List<List<scalar>> faceSign_;
 
             //- Sum of face areas
             List<scalar> faceArea_;
@@ -187,9 +187,9 @@ protected:
         (
             const word& faceZoneName,
             DynamicList<word>& faceZoneNames,
-            DynamicList<List<label> >& faceID,
-            DynamicList<List<label> >& facePatchID,
-            DynamicList<List<scalar> >& faceSign
+            DynamicList<List<label>>& faceID,
+            DynamicList<List<label>>& facePatchID,
+            DynamicList<List<scalar>>& faceSign
         ) const;
 
         //- Initialise face set from face zone and direction
@@ -199,9 +199,9 @@ protected:
             const vector& refDir,
             DynamicList<vector>& dir,
             DynamicList<word>& faceZoneNames,
-            DynamicList<List<label> >& faceID,
-            DynamicList<List<label> >& facePatchID,
-            DynamicList<List<scalar> >& faceSign
+            DynamicList<List<label>>& faceID,
+            DynamicList<List<label>>& facePatchID,
+            DynamicList<List<scalar>>& faceSign
         ) const;
 
         //- Initialise face set from cell zone and direction
@@ -211,9 +211,9 @@ protected:
             const vector& refDir,
             DynamicList<vector>& dir,
             DynamicList<word>& faceZoneNames,
-            DynamicList<List<label> >& faceID,
-            DynamicList<List<label> >& facePatchID,
-            DynamicList<List<scalar> >& faceSign
+            DynamicList<List<label>>& faceID,
+            DynamicList<List<label>>& facePatchID,
+            DynamicList<List<scalar>>& faceSign
         ) const;
 
         //- Initialise the total area per derived faceZone
diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C
index 4e023d924c2a6813683b2aaf6792fdedb71362e6..cd13ce8b37fd364e7ab023f613d26bab3a564549 100644
--- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C
+++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -136,7 +136,7 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::pDyn
     {
         const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
 
-        tpDyn() == rho(p)*0.5*magSqr(U);
+        tpDyn.ref() == rho(p)*0.5*magSqr(U);
     }
 
     return tpDyn;
@@ -148,20 +148,26 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::convertToCoeff
     const volScalarField& p
 ) const
 {
-    tmp<volScalarField> tCoeff(p);
-
     if (calcCoeff_)
     {
-        tCoeff() -= dimensionedScalar("pInf", dimPressure, pInf_);
+        tmp<volScalarField> tCoeff(new volScalarField("pCoeff", p));
+        volScalarField& coeff = tCoeff.ref();
+
+        coeff -= dimensionedScalar("pInf", dimPressure, pInf_);
 
         const dimensionedScalar p0("p0", dimPressure, SMALL);
         const dimensionedVector U("U", dimVelocity, UInf_);
         const dimensionedScalar rho("rho", dimDensity, rhoInf_);
 
-        tCoeff() /= 0.5*rho*magSqr(U) + p0;
+        coeff /= 0.5*rho*magSqr(U) + p0;
+
+        return tCoeff;
+    }
+    else
+    {
+        return p;
     }
 
-    return tCoeff;
 }
 
 
@@ -187,7 +193,7 @@ Foam::pressureTools::pressureTools
     pRef_(0.0),
     calcCoeff_(false),
     pInf_(0.0),
-    UInf_(vector::zero),
+    UInf_(Zero),
     rhoInf_(0.0),
     rhoInfInitialised_(false)
 {
diff --git a/src/postProcessing/functionObjects/utilities/residuals/residuals.H b/src/postProcessing/functionObjects/utilities/residuals/residuals.H
index c0b392880aafb0c284386594e1890d66cfcaffd7..ba9aa5898e6c15cd824fa59b1ba68be8ca6edbca 100644
--- a/src/postProcessing/functionObjects/utilities/residuals/residuals.H
+++ b/src/postProcessing/functionObjects/utilities/residuals/residuals.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -109,12 +109,6 @@ protected:
 
     // Private Member Functions
 
-        //- Disallow default bitwise copy construct
-        residuals(const residuals&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const residuals&);
-
         //- Output field header information
         template<class Type>
         void writeFileHeader(const word& fieldName);
@@ -123,6 +117,17 @@ protected:
         virtual void writeFileHeader(Ostream& os) const;
 
 
+private:
+
+    // Private member functions
+
+        //- Disallow default bitwise copy construct
+        residuals(const residuals&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const residuals&);
+
+
 public:
 
     //- Runtime type information
@@ -190,7 +195,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "residualsTemplates.C"
+    #include "residualsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C b/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C
index 28f017a846ea63ba8426dfb65fb41e31e804eb67..f6554be390eb709f07f4e1f06bb6f4bc6b89d3d9 100644
--- a/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C
+++ b/src/postProcessing/functionObjects/utilities/residuals/residualsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -42,7 +42,7 @@ void Foam::residuals::writeResidual(const word& fieldName)
 
         if (solverDict.found(fieldName))
         {
-            const List<SolverPerformance<Type> > sp
+            const List<SolverPerformance<Type>> sp
             (
                 solverDict.lookup(fieldName)
             );
diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C
index 2cc155904b70c8d01ecfc0d4aa610aa96169edad..d3feecaddd4960812410c2d4b7066503e1c33d58 100644
--- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C
+++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -177,10 +177,9 @@ Foam::scalarTransport::scalarTransport
 :
     name_(name),
     mesh_(refCast<const fvMesh>(obr)),
-    active_(true),
-    phiName_("phi"),
-    UName_("U"),
-    rhoName_("rho"),
+    phiName_(dict.lookupOrDefault<word>("phiName", "phi")),
+    UName_(dict.lookupOrDefault<word>("UName", "U")),
+    rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
     DT_(0.0),
     userDT_(false),
     resetOnStartUp_(false),
@@ -212,117 +211,112 @@ Foam::scalarTransport::~scalarTransport()
 
 void Foam::scalarTransport::read(const dictionary& dict)
 {
-    if (active_)
-    {
-        log_.readIfPresent("log", dict);
-
-        if (log_) Info<< type() << " " << name_ << " output:" << nl;
+    log_.readIfPresent("log", dict);
 
-        dict.readIfPresent("phiName", phiName_);
-        dict.readIfPresent("UName", UName_);
-        dict.readIfPresent("rhoName", rhoName_);
+    if (log_) Info<< type() << " " << name_ << " output:" << nl;
 
-        userDT_ = false;
-        if (dict.readIfPresent("DT", DT_))
-        {
-            userDT_ = true;
-        }
+    dict.readIfPresent("phiName", phiName_);
+    dict.readIfPresent("UName", UName_);
+    dict.readIfPresent("rhoName", rhoName_);
 
-        dict.readIfPresent("nCorr", nCorr_);
-        dict.lookup("resetOnStartUp") >> resetOnStartUp_;
-        dict.lookup("autoSchemes") >> autoSchemes_;
 
-        fvOptions_.reset(dict.subDict("fvOptions"));
+    userDT_ = false;
+    if (dict.readIfPresent("DT", DT_))
+    {
+        userDT_ = true;
     }
+
+    dict.readIfPresent("nCorr", nCorr_);
+    dict.lookup("resetOnStartUp") >> resetOnStartUp_;
+    dict.lookup("autoSchemes") >> autoSchemes_;
+
+    fvOptions_.reset(dict.subDict("fvOptions"));
 }
 
 
 void Foam::scalarTransport::execute()
 {
-    if (active_)
-    {
-        if (log_) Info<< type() << " " << name_ << " output:" << nl;
+    if (log_) Info<< type() << " " << name_ << " output:" << nl;
 
-        const surfaceScalarField& phi =
-            mesh_.lookupObject<surfaceScalarField>(phiName_);
+    const surfaceScalarField& phi =
+        mesh_.lookupObject<surfaceScalarField>(phiName_);
 
-        volScalarField& T = transportedField();
+    volScalarField& T = transportedField();
 
-        // calculate the diffusivity
-        volScalarField DT(this->DT(phi));
+    // Calculate the diffusivity
+    volScalarField DT(this->DT(phi));
 
-        // set schemes
-        word schemeVar = T.name();
-        if (autoSchemes_)
-        {
-            schemeVar = UName_;
-        }
+    // Set schemes
+    word schemeVar = T.name();
+    if (autoSchemes_)
+    {
+        schemeVar = UName_;
+    }
 
-        word divScheme("div(phi," + schemeVar + ")");
-        word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
+    word divScheme("div(phi," + schemeVar + ")");
+    word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
 
-        // set under-relaxation coeff
-        scalar relaxCoeff = 0.0;
-        if (mesh_.relaxEquation(schemeVar))
-        {
-            relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
-        }
+    // Set under-relaxation coeff
+    scalar relaxCoeff = 0.0;
+    if (mesh_.relaxEquation(schemeVar))
+    {
+        relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
+    }
 
-        if (phi.dimensions() == dimMass/dimTime)
-        {
-            const volScalarField& rho =
-                mesh_.lookupObject<volScalarField>(rhoName_);
+    if (phi.dimensions() == dimMass/dimTime)
+    {
+        const volScalarField& rho =
+            mesh_.lookupObject<volScalarField>(rhoName_);
 
-            // solve
-            for (label i = 0; i <= nCorr_; i++)
-            {
-                fvScalarMatrix TEqn
-                (
-                    fvm::ddt(rho, T)
-                  + fvm::div(phi, T, divScheme)
-                  - fvm::laplacian(DT, T, laplacianScheme)
-                 ==
-                    fvOptions_(rho, T)
-                );
+        // Solve
+        for (label i = 0; i <= nCorr_; i++)
+        {
+            fvScalarMatrix TEqn
+            (
+                fvm::ddt(rho, T)
+              + fvm::div(phi, T, divScheme)
+              - fvm::laplacian(DT, T, laplacianScheme)
+             ==
+                fvOptions_(rho, T)
+            );
 
-                TEqn.relax(relaxCoeff);
+            TEqn.relax(relaxCoeff);
 
-                fvOptions_.constrain(TEqn);
+            fvOptions_.constrain(TEqn);
 
-                TEqn.solve(mesh_.solverDict(schemeVar));
-            }
+            TEqn.solve(mesh_.solverDict(schemeVar));
         }
-        else if (phi.dimensions() == dimVolume/dimTime)
+    }
+    else if (phi.dimensions() == dimVolume/dimTime)
+    {
+        // Solve
+        for (label i = 0; i <= nCorr_; i++)
         {
-            // solve
-            for (label i = 0; i <= nCorr_; i++)
-            {
-                fvScalarMatrix TEqn
-                (
-                    fvm::ddt(T)
-                  + fvm::div(phi, T, divScheme)
-                  - fvm::laplacian(DT, T, laplacianScheme)
-                 ==
-                    fvOptions_(T)
-                );
+            fvScalarMatrix TEqn
+            (
+                fvm::ddt(T)
+              + fvm::div(phi, T, divScheme)
+              - fvm::laplacian(DT, T, laplacianScheme)
+             ==
+                fvOptions_(T)
+            );
 
-                TEqn.relax(relaxCoeff);
+            TEqn.relax(relaxCoeff);
 
-                fvOptions_.constrain(TEqn);
+            fvOptions_.constrain(TEqn);
 
-                TEqn.solve(mesh_.solverDict(schemeVar));
-            }
+            TEqn.solve(mesh_.solverDict(schemeVar));
         }
-        else
-        {
-            FatalErrorInFunction
-                << "Incompatible dimensions for phi: " << phi.dimensions() << nl
-                << "Dimensions should be " << dimMass/dimTime << " or "
-                << dimVolume/dimTime << endl;
-        }
-
-        if (log_) Info<< endl;
     }
+    else
+    {
+        FatalErrorInFunction
+            << "Incompatible dimensions for phi: " << phi.dimensions() << nl
+            << "Dimensions should be " << dimMass/dimTime << " or "
+            << dimVolume/dimTime << endl;
+    }
+
+    if (log_) Info<< endl;
 }
 
 
@@ -333,15 +327,11 @@ void Foam::scalarTransport::end()
 
 
 void Foam::scalarTransport::timeSet()
-{
-    // Do nothing
-}
+{}
 
 
 void Foam::scalarTransport::write()
-{
-    // Do nothing
-}
+{}
 
 
 // ************************************************************************* //
diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H
index c541c925a31a6d5aadb9c26a193d14baed8ba165..c99cae61681c675788f432fbb9aba8a844c914d6 100644
--- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H
+++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
diff --git a/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C b/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C
index 345791cd2d696be03df43b9ed52e6fa0b2aa2a46..0ae37ba0b7d17da4ee99f325c447cc0a637c2dce 100644
--- a/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C
+++ b/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,7 +120,7 @@ bool Foam::setTimeStepFunctionObject::read(const dictionary& dict)
 
     if (enabled_)
     {
-        timeStepPtr_ = DataEntry<scalar>::New("deltaT", dict);
+        timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
 
         // Check that time has adjustTimeStep
         const dictionary& controlDict = time_.controlDict();
diff --git a/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.H b/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.H
index 10bd6fec3cadd3123d4347f155de9ff90b7e544d..f345ea161b7dfe507aceaffb8128b8851f46d552 100644
--- a/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.H
+++ b/src/postProcessing/functionObjects/utilities/setTimeStep/setTimeStepFunctionObject.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,7 +62,7 @@ SourceFiles
 
 #include "functionObject.H"
 #include "dictionary.H"
-#include "DataEntry.H"
+#include "Function1.H"
 #include "Switch.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -71,7 +71,7 @@ namespace Foam
 {
 
 /*---------------------------------------------------------------------------*\
-                    Class setTimeStepFunctionObject Declaration
+                  Class setTimeStepFunctionObject Declaration
 \*---------------------------------------------------------------------------*/
 
 class setTimeStepFunctionObject
@@ -90,7 +90,7 @@ class setTimeStepFunctionObject
             Switch enabled_;
 
             //- Time step
-            autoPtr<DataEntry<scalar> > timeStepPtr_;
+            autoPtr<Function1<scalar>> timeStepPtr_;
 
 
         //- Disallow default bitwise copy construct
diff --git a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H
index 927f88a609fa31bbf1d8029258ff04d54f13b6fe..fa525f792eb8a54b2f51c392c2778bfad7cb052f 100644
--- a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H
+++ b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ class timeActivatedFileUpdate
         fileName fileToUpdate_;
 
         //- List of times vs filenames
-        List<Tuple2<scalar, fileName> > timeVsFile_;
+        List<Tuple2<scalar, fileName>> timeVsFile_;
 
         //- Index of last file copied
         label lastIndex_;
diff --git a/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H
index e7b39a7d9644693bbcaa46549edbf96362dd2d9e..995738de23fdf665b779643fc18b9d6fb69b34bd 100644
--- a/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H
+++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFields.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -32,9 +32,11 @@ Description
     further manipulation.
 
     Fields are stored as copies of the original, with the prefix
-    "tubulenceModel:", e.g.
+    "tubulenceModel:", e.g.:
 
-        turbulenceModel:R
+    \verbatim
+    turbulenceModel:R
+    \endverbatim
 
     Example of function object specification:
     \verbatim
@@ -158,12 +160,6 @@ protected:
 
     // Protected Member Functions
 
-        //- Disallow default bitwise copy construct
-        turbulenceFields(const turbulenceFields&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const turbulenceFields&);
-
         //- Return true if compressible turbulence model is identified
         bool compressible();
 
@@ -172,10 +168,21 @@ protected:
         void processField
         (
             const word& fieldName,
-            const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvalue
+            const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvalue
         );
 
 
+private:
+
+    // Private member functions
+
+        //- Disallow default bitwise copy construct
+        turbulenceFields(const turbulenceFields&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const turbulenceFields&);
+
+
 public:
 
     //- Runtime type information
diff --git a/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.C b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.C
index e5746b6b4bf083a64f91157809fc249c7de55090..727917928acd49e6637a6930b542a8b2ff86df21 100644
--- a/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.C
+++ b/src/postProcessing/functionObjects/utilities/turbulenceFields/turbulenceFieldsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ template<class Type>
 void Foam::turbulenceFields::processField
 (
     const word& fieldName,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvalue
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvalue
 )
 {
     typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
diff --git a/src/postProcessing/functionObjects/utilities/vorticity/vorticity.C b/src/postProcessing/functionObjects/utilities/vorticity/vorticity.C
index 135fc00540c90361d07fcb4a8b3da495aec3e1f5..72ed2ede9f5bd89ea86cf6e994e7995745d4755c 100644
--- a/src/postProcessing/functionObjects/utilities/vorticity/vorticity.C
+++ b/src/postProcessing/functionObjects/utilities/vorticity/vorticity.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ Foam::vorticity::vorticity
                     IOobject::NO_WRITE
                 ),
                 mesh,
-                dimensionedVector("0", dimless/dimTime, vector::zero)
+                dimensionedVector("0", dimless/dimTime, Zero)
             )
         );
 
diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C
index eb261493392881ce82171179af0cf983a4565253..f321d7bf9c6f5296690b1bf209eb3b85056b9676 100644
--- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C
+++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -137,7 +137,7 @@ Foam::wallShearStress::wallShearStress
                 (
                     "0",
                     sqr(dimLength)/sqr(dimTime),
-                    vector::zero
+                    Zero
                 )
             )
         );
diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H
index f0890d09e557120c3ab169a879600991ad3a63d1..bff9b02bbe36e4f0cafbca4974d7b4cae4335998 100644
--- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H
+++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -136,6 +136,11 @@ protected:
             volVectorField& shearStress
         );
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         wallShearStress(const wallShearStress&);
 
diff --git a/src/randomProcesses/fft/fft.C b/src/randomProcesses/fft/fft.C
index fdc5e856ed1ceca9bba631d762ea7a98d91e9aa4..f859b37f529212cd0fe6393eaa8338736bae37e4 100644
--- a/src/randomProcesses/fft/fft.C
+++ b/src/randomProcesses/fft/fft.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -191,7 +191,7 @@ tmp<complexField> fft::forwardTransform
 {
     tmp<complexField> tfftField(new complexField(tfield));
 
-    transform(tfftField(), nn, FORWARD_TRANSFORM);
+    transform(tfftField.ref(), nn, FORWARD_TRANSFORM);
 
     tfield.clear();
 
@@ -207,7 +207,7 @@ tmp<complexField> fft::reverseTransform
 {
     tmp<complexField> tifftField(new complexField(tfield));
 
-    transform(tifftField(), nn, REVERSE_TRANSFORM);
+    transform(tifftField.ref(), nn, REVERSE_TRANSFORM);
 
     tfield.clear();
 
@@ -231,7 +231,7 @@ tmp<complexVectorField> fft::forwardTransform
 
     for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
     {
-        tfftVectorField().replace
+        tfftVectorField.ref().replace
         (
             cmpt,
             forwardTransform(tfield().component(cmpt), nn)
@@ -260,7 +260,7 @@ tmp<complexVectorField> fft::reverseTransform
 
     for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
     {
-        tifftVectorField().replace
+        tifftVectorField.ref().replace
         (
             cmpt,
             reverseTransform(tfield().component(cmpt), nn)
diff --git a/src/randomProcesses/fft/fftRenumber.C b/src/randomProcesses/fft/fftRenumber.C
index 235bcd24a68b2e261a9b775e080eeecb57d9eff7..07f8b238be44c89599647741eff6defde027d8eb 100644
--- a/src/randomProcesses/fft/fftRenumber.C
+++ b/src/randomProcesses/fft/fftRenumber.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,16 +32,7 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// recursively evaluate the indexing necessary to do the folding of
-// the fft data. We recurse until we have the indexing ncessary for
-// the folding in all directions.
-
-void fftRenumberRecurse
+void Foam::fftRenumberRecurse
 (
     List<complex>& data,
     List<complex>& renumData,
@@ -101,12 +92,7 @@ void fftRenumberRecurse
 }
 
 
-// fftRenumber : fold the n-d data array to get the fft components in
-// the right places.
-
-#include "fftRenumber.H"
-
-void fftRenumber
+void Foam::fftRenumber
 (
     List<complex>& data,
     const labelList& nn
@@ -135,8 +121,4 @@ void fftRenumber
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/randomProcesses/fft/fftRenumber.H b/src/randomProcesses/fft/fftRenumber.H
index bc77adb0b1985851c11046caa716c216f67cb381..fa2e50c58097f65caf1e3f9f84e029584694e87c 100644
--- a/src/randomProcesses/fft/fftRenumber.H
+++ b/src/randomProcesses/fft/fftRenumber.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -47,6 +47,22 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+// Recursively evaluate the indexing necessary to do the folding of the fft
+// data. We recurse until we have the indexing ncessary for the folding in all
+// directions.
+void fftRenumberRecurse
+(
+    List<complex>& data,
+    List<complex>& renumData,
+    const labelList& nn,
+    label nnprod,
+    label ii,
+    label l1,
+    label l2
+);
+
+
+// Fold the n-d data array to get the fft components in the right places.
 void fftRenumber
 (
     List<complex>& data,
diff --git a/src/randomProcesses/noise/noiseFFT.C b/src/randomProcesses/noise/noiseFFT.C
index 88cbe3c5ba121d17f919d0bba9ed8a229d9f586c..0f09cdf817450e18461c9eb49371a82847538d40 100644
--- a/src/randomProcesses/noise/noiseFFT.C
+++ b/src/randomProcesses/noise/noiseFFT.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -140,7 +140,7 @@ Foam::tmp<Foam::scalarField> Foam::noiseFFT::window
     }
 
     tmp<scalarField> tpw(new scalarField(N));
-    scalarField& pw = tpw();
+    scalarField& pw = tpw.ref();
 
     label offset = ni*windowOffset;
 
@@ -193,7 +193,7 @@ Foam::tmp<Foam::scalarField> Foam::noiseFFT::Pf
             scalarField::subField(tPn2(), tPn2().size()/2)
         )
     );
-    scalarField& Pn = tPn();
+    scalarField& Pn = tPn.ref();
 
     Pn *= 2.0/sqrt(scalar(tPn2().size()));
     Pn[0] /= 2.0;
diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
index 89973ded9c034d3f5af2ace20935b4c10057c86e..fc4c5a8e8f478c4785ec8ac45c7d2fb02e3acb18 100644
--- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
+++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -190,7 +190,7 @@ weights() const
     const scalarField nbrAlphaDelta(nbrAlpha/nbrDeltas);
 
     tmp<scalarField> tw(new scalarField(deltas.size()));
-    scalarField& w = tw();
+    scalarField& w = tw.ref();
 
     forAll(alphaDelta, faceI)
     {
@@ -299,7 +299,6 @@ energyRegionCoupledFvPatchScalarField
 Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
 snGrad() const
 {
-    Debug("snGrad");
     return
         regionCoupledPatch_.patch().deltaCoeffs()
        *(*this - patchInternalField());
@@ -309,7 +308,6 @@ snGrad() const
 Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
 snGrad(const scalarField&) const
 {
-    Debug("snGrad");
     return snGrad();
 }
 
@@ -344,7 +342,7 @@ void Foam::energyRegionCoupledFvPatchScalarField::evaluate
 }
 
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::energyRegionCoupledFvPatchScalarField::
 patchNeighbourField() const
 {
diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H
index 7103f1f1f1224120bff0c8a43d4250e0ed0602bc..df8a2c8fd83fc090f5a413c93dc649dc8e1fa847 100644
--- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H
+++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -148,9 +148,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new energyRegionCoupledFvPatchScalarField(*this)
             );
@@ -164,12 +164,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new energyRegionCoupledFvPatchScalarField(*this, iF)
             );
diff --git a/src/regionModels/Allwclean b/src/regionModels/Allwclean
index 8297b201c052b19a9ac0a002a3553caf1530557e..94b0901855ea3a8a6b6122a9cfad66588bc7d184 100755
--- a/src/regionModels/Allwclean
+++ b/src/regionModels/Allwclean
@@ -10,4 +10,4 @@ wclean $makeType thermalBaffleModels
 wclean $makeType regionCoupling
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake
index 877c4b00c5755d4df7e3d7d70ef3616f6469d364..b9f85d1b2787ba45a6cdda4e217e252567d048e3 100755
--- a/src/regionModels/Allwmake
+++ b/src/regionModels/Allwmake
@@ -14,4 +14,4 @@ wmake $targetType thermalBaffleModels
 wmake $targetType regionCoupling
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C
index 7b0a694e900db4eca2eadd9c2aca109d4138015c..ec261e277e2adc223713c02ee5e12b68a37d2e5f 100644
--- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C
+++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,6 @@ License
 
 #include "reactingOneDim.H"
 #include "addToRunTimeSelectionTable.H"
-#include "zeroGradientFvPatchFields.H"
 #include "surfaceInterpolate.H"
 #include "fvm.H"
 #include "fvcDiv.H"
@@ -197,7 +196,6 @@ void reactingOneDim::updatePhiGas()
                 }
             }
         }
-        tHsiGas().clear();
     }
 }
 
@@ -243,7 +241,7 @@ void reactingOneDim::solveContinuity()
 {
     if (debug)
     {
-        Info<< "reactingOneDim::solveContinuity()" << endl;
+        InfoInFunction << endl;
     }
 
     const scalarField mass0 = rho_*regionMesh().V();
@@ -275,7 +273,7 @@ void reactingOneDim::solveSpeciesMass()
 {
     if (debug)
     {
-        Info<< "reactingOneDim::solveSpeciesMass()" << endl;
+        InfoInFunction << endl;
     }
 
     volScalarField Yt(0.0*Ys_[0]);
@@ -316,7 +314,7 @@ void reactingOneDim::solveEnergy()
 {
     if (debug)
     {
-        Info<< "reactingOneDim::solveEnergy()" << endl;
+        InfoInFunction << endl;
     }
 
     tmp<volScalarField> alpha(solidThermo_.alpha());
@@ -464,8 +462,6 @@ reactingOneDim::reactingOneDim
             IOobject::AUTO_WRITE
         ),
         regionMesh()
-        //dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0),
-        //zeroGradientFvPatchVectorField::typeName
     ),
 
     lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)),
diff --git a/src/regionModels/regionCoupling/Make/options b/src/regionModels/regionCoupling/Make/options
index 39fe765eb47d5e02ee006be560140de2b9abcb73..379349b0452682a0dd9cea8cd72041d23aab1e2c 100644
--- a/src/regionModels/regionCoupling/Make/options
+++ b/src/regionModels/regionCoupling/Make/options
@@ -1,6 +1,5 @@
 EXE_INC = \
     -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-    -I$(LIB_SRC)/AMIInterpolation/lnInclude \
     -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
     -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
     -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H
index 3bbdeb84917a8c45a45c65e4532e9fe4075fe8dd..16f7e9ff6baa6dbb0ebb165df86481fe5f436f9d 100644
--- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H
+++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,51 +22,56 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::compressible::
-        filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
+    Foam::filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
 
 Description
     Mixed boundary condition for temperature, to be used in the flow and
     pyrolysis regions when a film region model is used.
 
-
     Example usage:
-        myInterfacePatchName
-        {
-            type            filmPyrolysisRadiativeCoupledMixed;
-            Tnbr            T;
-            kappa           fluidThermo;
-            Qr              Qr;
-            kappaName       none;
-            filmDeltaDry    0.0;
-            filmDeltaWet    3e-4;
-            value           $internalField;
-        }
+    \verbatim
+    myInterfacePatchName
+    {
+        type            filmPyrolysisRadiativeCoupledMixed;
+        Tnbr            T;
+        kappa           fluidThermo;
+        Qr              Qr;
+        kappaName       none;
+        filmDeltaDry    0.0;
+        filmDeltaWet    3e-4;
+        value           $internalField;
+    }
+    \endverbatim
 
     Needs to be on underlying mapped(Wall)FvPatch.
-    It calculates local field as
-         ratio = (filmDelta - filmDeltaDry)/(filmDeltaWet - filmDeltaDry),
+    It calculates local field as:
+
+    \verbatim
+        ratio = (filmDelta - filmDeltaDry)/(filmDeltaWet - filmDeltaDry)
+    \endverbatim
 
-    when ratio = 1 is considered wet and the film temperarture is fixed at
+    when ratio = 1 is considered wet and the film temperature is fixed at
     the wall. If ratio = 0 (dry) it emulates the normal radiative solid BC.
 
     In between ratio 0 and 1 the gradient and value contributions are
-    weighted using the ratio field in the followig way:
+    weighted using the ratio field in the following way:
 
-    qConv = ratio*htcwfilm*(Tfilm - *this);
-    qRad = (1.0 - ratio)*Qr;
+    \verbatim
+        qConv = ratio*htcwfilm*(Tfilm - *this);
+        qRad = (1.0 - ratio)*Qr;
+    \endverbatim
 
     Then the solid can gain or loose energy through radiation or conduction
     towards the film.
 
-    Note: kappa : heat conduction at patch.
-        Gets supplied how to lookup/calculate kappa:
-    - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
-    - 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K
-    - 'solidThermo' : use basicSolidThermo K()
+    Notes:
+
+    \li \c kappa and \c kappaName are inherited from temperatureCoupledBase.
+    \li \c Qr is the radiative flux defined in the radiation model.
 
-    Qr is the radiative flux defined in the radiation model.
 
+SeeAlso
+    Foam::temperatureCoupledBase
 
 SourceFiles
     filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H
index bbcad6707cbe818f3bcae67035629b81650e53e8..84c7932d72f388c796e0434cf19fe34b90781461 100644
--- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H
+++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,14 +35,14 @@ Description
 
     Example of the boundary condition specification:
     \verbatim
-        myPatch
-        {
-            type            filmPyrolysisTemperatureCoupled;
-            phi             phi;      // name of flux field (default = phi)
-            rho             rho;      // name of density field (default = rho)
-            deltaWet        1e-4;     // threshold height for 'wet' film
-            value           uniform   300; // initial temperature / [K]
-        }
+    myPatch
+    {
+        type            filmPyrolysisTemperatureCoupled;
+        phi             phi;      // name of flux field (default = phi)
+        rho             rho;      // name of density field (default = rho)
+        deltaWet        1e-4;     // threshold height for 'wet' film
+        value           uniform   300; // initial temperature / [K]
+    }
     \endverbatim
 
 SourceFiles
diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H
index 916cf8a270d5b95e264001600c629eac5c9546c1..f4566b2325291dd65234618d4407c12e95c7be1a 100644
--- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H
+++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,14 +35,14 @@ Description
 
     Example of the boundary condition specification:
     \verbatim
-        myPatch
-        {
-            type            filmPyrolysisVelocityCoupled;
-            phi             phi;      // name of flux field (default = phi)
-            rho             rho;      // name of density field (default = rho)
-            deltaWet        1e-4;     // threshold height for 'wet' film
-            value           uniform   (0 0 0); // initial velocity / [m/s]
-        }
+    myPatch
+    {
+        type            filmPyrolysisVelocityCoupled;
+        phi             phi;      // name of flux field (default = phi)
+        rho             rho;      // name of density field (default = rho)
+        deltaWet        1e-4;     // threshold height for 'wet' film
+        value           uniform   (0 0 0); // initial velocity / [m/s]
+    }
     \endverbatim
 
 SourceFiles
diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H
index f0179b8150fa9e44c3a49b8b54d0f813886daf38..a93e49282b168b6e0589616e2da981d043c6ce5b 100644
--- a/src/regionModels/regionModel/regionModel/regionModel.H
+++ b/src/regionModels/regionModel/regionModel/regionModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,7 @@ protected:
             mutable wordList interRegionAMINames_;
 
             //- List of AMI objects per coupled region
-            mutable PtrList<PtrList<AMIPatchToPatchInterpolation> >
+            mutable PtrList<PtrList<AMIPatchToPatchInterpolation>>
                 interRegionAMI_;
 
 
@@ -260,7 +260,7 @@ public:
 
             //- Map patch field from another region model to local patch
             template<class Type>
-            tmp<Foam::Field<Type> > mapRegionPatchField
+            tmp<Foam::Field<Type>> mapRegionPatchField
             (
                 const regionModel& nbrRegion,
                 const label regionPatchI,
@@ -271,7 +271,7 @@ public:
 
             //- Map patch field from another region model to local patch
             template<class Type>
-            tmp<Field<Type> > mapRegionPatchField
+            tmp<Field<Type>> mapRegionPatchField
             (
                 const regionModel& nbrRegion,
                 const word& fieldName,
@@ -282,7 +282,7 @@ public:
             //- Map patch internal field from another region model to local
             //  patch
             template<class Type>
-            tmp<Field<Type> > mapRegionPatchInternalField
+            tmp<Field<Type>> mapRegionPatchInternalField
             (
                 const regionModel& nbrRegion,
                 const word& fieldName,
diff --git a/src/regionModels/regionModel/regionModel/regionModelTemplates.C b/src/regionModels/regionModel/regionModel/regionModelTemplates.C
index c100552632fc9e6fcc5a57d0276ecbb723bfff29..03ef4f601e19851cdeebc3eea2df84d817c43fca 100644
--- a/src/regionModels/regionModel/regionModel/regionModelTemplates.C
+++ b/src/regionModels/regionModel/regionModel/regionModelTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::regionModels::regionModel::mapRegionPatchField
 (
     const regionModel& nbrRegion,
@@ -40,7 +40,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
     const AMIPatchToPatchInterpolation& ami =
         interRegionAMI(nbrRegion, regionPatchI, nbrPatchI, flip);
 
-    tmp<Field<Type> > tresult(ami.interpolateToSource(nbrField));
+    tmp<Field<Type>> tresult(ami.interpolateToSource(nbrField));
 
     UPstream::msgType() = oldTag;
 
@@ -49,7 +49,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::regionModels::regionModel::mapRegionPatchField
 (
     const regionModel& nbrRegion,
@@ -77,7 +77,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
 
         const Field<Type>& nbrFieldp = nbrField.boundaryField()[nbrPatchI];
 
-        tmp<Field<Type> > tresult(ami.interpolateToSource(nbrFieldp));
+        tmp<Field<Type>> tresult(ami.interpolateToSource(nbrFieldp));
 
         UPstream::msgType() = oldTag;
 
@@ -88,12 +88,12 @@ Foam::regionModels::regionModel::mapRegionPatchField
         const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI];
 
         return
-            tmp<Field<Type> >
+            tmp<Field<Type>>
             (
                 new Field<Type>
                 (
                     p.size(),
-                    pTraits<Type>::zero
+                    Zero
                 )
             );
     }
@@ -101,7 +101,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::regionModels::regionModel::mapRegionPatchInternalField
 (
     const regionModel& nbrRegion,
@@ -130,7 +130,7 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField
         const fvPatchField<Type>& nbrFieldp =
             nbrField.boundaryField()[nbrPatchI];
 
-        tmp<Field<Type> > tresult
+        tmp<Field<Type>> tresult
         (
             ami.interpolateToSource(nbrFieldp.patchInternalField())
         );
@@ -144,12 +144,12 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField
         const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI];
 
         return
-            tmp<Field<Type> >
+            tmp<Field<Type>>
             (
                 new Field<Type>
                 (
                     p.size(),
-                    pTraits<Type>::zero
+                    Zero
                 )
             );
     }
diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C
index d5e80beec8aa74061eb6fd2952144b7f277e5374..62a6dba7403cc4765e869299ef272cc60a62f673 100644
--- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C
+++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -134,7 +134,7 @@ void Foam::regionModels::regionModel1D::initialise()
         {
             const vector& n = pNormals[localFaceI];
             const labelList& faces = boundaryFaceFaces_[localPyrolysisFaceI++];
-            forAll (faces, faceI)
+            forAll(faces, faceI)
             {
                 const label faceID = faces[faceI];
                 nMagSf[faceID] = regionMesh().Sf()[faceID] & n;
@@ -183,7 +183,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
 )
 {
     tmp<labelField> tcellMoveMap(new labelField(regionMesh().nCells(), 0));
-    labelField& cellMoveMap = tcellMoveMap();
+    labelField& cellMoveMap = tcellMoveMap.ref();
 
     if (!moveMesh_)
     {
@@ -217,7 +217,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
                 oldCf[i + 1] = regionMesh().faceCentres()[faces[i]];
             }
 
-            vector newDelta = vector::zero;
+            vector newDelta = Zero;
             point nbrCf = oldCf[0];
 
             forAll(faces, i)
@@ -229,7 +229,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
 
                 newDelta += (deltaV[cellI]/mag(sf))*n;
 
-                vector localDelta = vector::zero;
+                vector localDelta = Zero;
                 forAll(f, pti)
                 {
                     const label pointI = f[pti];
diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C
index aba31e75dd0e3388bf33f969d6b6ac3bd9a346d4..11350225c3668ea962833c619f4e19348e981f76 100644
--- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C
+++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,7 +56,7 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects()
                 NO_WRITE
             ),
             regionMesh(),
-            dimensionedVector("zero", dimless, vector::zero),
+            dimensionedVector("zero", dimless, Zero),
             zeroGradientFvPatchField<vector>::typeName
         )
     );
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H
index 98b8f49808815c96fd206d5ec47d55ec6653b2cb..a2e931907d09c46f266db27419890fd29bab415b 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -177,6 +177,15 @@ public:
 
     // Member functions
 
+        // Attributes
+
+            //- Return true: this patch field is altered by assignment
+            virtual bool assignable() const
+            {
+                return true;
+            }
+
+
         // Access
 
             //- Return the name of phi
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
index 7f7e8eb060abbfe88f052765918971c1d38c01ce..d979d7156c7a96a28c8bea99da8f4346a80e62c1 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -56,9 +56,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
 :
     fixedValueFvPatchScalarField(ptf, p, iF, mapper),
     filmRegionName_(ptf.filmRegionName_),
-    GammaMean_(ptf.GammaMean_().clone().ptr()),
-    a_(ptf.a_().clone().ptr()),
-    omega_(ptf.omega_().clone().ptr())
+    GammaMean_(ptf.GammaMean_, false),
+    a_(ptf.a_, false),
+    omega_(ptf.omega_, false)
 {}
 
 
@@ -75,9 +75,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
     (
         dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
     ),
-    GammaMean_(DataEntry<scalar>::New("GammaMean", dict)),
-    a_(DataEntry<scalar>::New("a", dict)),
-    omega_(DataEntry<scalar>::New("omega", dict))
+    GammaMean_(Function1<scalar>::New("GammaMean", dict)),
+    a_(Function1<scalar>::New("a", dict)),
+    omega_(Function1<scalar>::New("omega", dict))
 {
     fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
 }
@@ -91,9 +91,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
 :
     fixedValueFvPatchScalarField(wmfrhpsf),
     filmRegionName_(wmfrhpsf.filmRegionName_),
-    GammaMean_(wmfrhpsf.GammaMean_().clone().ptr()),
-    a_(wmfrhpsf.a_().clone().ptr()),
-    omega_(wmfrhpsf.omega_().clone().ptr())
+    GammaMean_(wmfrhpsf.GammaMean_, false),
+    a_(wmfrhpsf.a_, false),
+    omega_(wmfrhpsf.omega_, false)
 {}
 
 
@@ -106,9 +106,9 @@ inclinedFilmNusseltHeightFvPatchScalarField
 :
     fixedValueFvPatchScalarField(wmfrhpsf, iF),
     filmRegionName_(wmfrhpsf.filmRegionName_),
-    GammaMean_(wmfrhpsf.GammaMean_().clone().ptr()),
-    a_(wmfrhpsf.a_().clone().ptr()),
-    omega_(wmfrhpsf.omega_().clone().ptr())
+    GammaMean_(wmfrhpsf.GammaMean_, false),
+    a_(wmfrhpsf.a_, false),
+    omega_(wmfrhpsf.omega_, false)
 {}
 
 
@@ -123,7 +123,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
 
     const label patchI = patch().index();
 
-    // retrieve the film region from the database
+    // Retrieve the film region from the database
 
     const regionModels::regionModel& region =
         db().time().lookupObject<regionModels::regionModel>(filmRegionName_);
@@ -134,9 +134,9 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
             const regionModels::surfaceFilmModels::kinematicSingleLayer&
         >(region);
 
-    // calculate the vector tangential to the patch
+    // Calculate the vector tangential to the patch
 
-    // note: normal pointing into the domain
+    // Note: normal pointing into the domain
     const vectorField n(-patch().nf());
 
     const scalarField gTan(film.gTan(patchI) & n);
@@ -156,12 +156,12 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
     vectorField nTan(nHatp ^ n);
     nTan /= mag(nTan) + ROOTVSMALL;
 
-    // calculate distance in patch tangential direction
+    // Calculate distance in patch tangential direction
 
     const vectorField& Cf = patch().Cf();
     scalarField d(nTan & Cf);
 
-    // calculate the wavy film height
+    // Calculate the wavy film height
 
     const scalar t = db().time().timeOutputValue();
 
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H
index 861797a3593ceb9d4c3621e8a689c4e2a857bc14..0575ec0541b0087409bd20c51cfcb2c03a0158dd 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ SourceFiles
 
 #include "fvPatchFields.H"
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -60,13 +60,13 @@ class inclinedFilmNusseltHeightFvPatchScalarField
         word filmRegionName_;
 
         //- Mean mass flow rate per unit length [kg/s/m]
-        autoPtr<DataEntry<scalar> > GammaMean_;
+        autoPtr<Function1<scalar>> GammaMean_;
 
         //- Perturbation amplitude [m]
-        autoPtr<DataEntry<scalar> > a_;
+        autoPtr<Function1<scalar>> a_;
 
         //- Perturbation frequency [rad/s/m]
-        autoPtr<DataEntry<scalar> > omega_;
+        autoPtr<Function1<scalar>> omega_;
 
 
 public:
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
index 1636590f958cbfce409ada74d19f2c166656b258..4c2be0158483c6cf2b68acd723f6426c68d08c1c 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -56,9 +56,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
 :
     fixedValueFvPatchVectorField(ptf, p, iF, mapper),
     filmRegionName_(ptf.filmRegionName_),
-    GammaMean_(ptf.GammaMean_().clone().ptr()),
-    a_(ptf.a_().clone().ptr()),
-    omega_(ptf.omega_().clone().ptr())
+    GammaMean_(ptf.GammaMean_, false),
+    a_(ptf.a_, false),
+    omega_(ptf.omega_, false)
 {}
 
 
@@ -75,9 +75,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
     (
         dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
     ),
-    GammaMean_(DataEntry<scalar>::New("GammaMean", dict)),
-    a_(DataEntry<scalar>::New("a", dict)),
-    omega_(DataEntry<scalar>::New("omega", dict))
+    GammaMean_(Function1<scalar>::New("GammaMean", dict)),
+    a_(Function1<scalar>::New("a", dict)),
+    omega_(Function1<scalar>::New("omega", dict))
 {
     fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
 }
@@ -91,9 +91,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
 :
     fixedValueFvPatchVectorField(fmfrpvf),
     filmRegionName_(fmfrpvf.filmRegionName_),
-    GammaMean_(fmfrpvf.GammaMean_().clone().ptr()),
-    a_(fmfrpvf.a_().clone().ptr()),
-    omega_(fmfrpvf.omega_().clone().ptr())
+    GammaMean_(fmfrpvf.GammaMean_, false),
+    a_(fmfrpvf.a_, false),
+    omega_(fmfrpvf.omega_, false)
 {}
 
 
@@ -106,9 +106,9 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
 :
     fixedValueFvPatchVectorField(fmfrpvf, iF),
     filmRegionName_(fmfrpvf.filmRegionName_),
-    GammaMean_(fmfrpvf.GammaMean_().clone().ptr()),
-    a_(fmfrpvf.a_().clone().ptr()),
-    omega_(fmfrpvf.omega_().clone().ptr())
+    GammaMean_(fmfrpvf.GammaMean_, false),
+    a_(fmfrpvf.a_, false),
+    omega_(fmfrpvf.omega_, false)
 {}
 
 
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H
index 6d0c22eeb2a342c838bde80bbc413e9347f4972c..f2b851e5c74ab8554c5656f3d300fcdf3bcf9ef7 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,7 +39,7 @@ SourceFiles
 
 #include "fvPatchFields.H"
 #include "fixedValueFvPatchFields.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -60,13 +60,13 @@ class inclinedFilmNusseltInletVelocityFvPatchVectorField
         word filmRegionName_;
 
         //- Mean mass flow rate per unit length [kg/s/m]
-        autoPtr<DataEntry<scalar> > GammaMean_;
+        autoPtr<Function1<scalar>> GammaMean_;
 
         //- Perturbation amplitude [m]
-        autoPtr<DataEntry<scalar> > a_;
+        autoPtr<Function1<scalar>> a_;
 
         //- Perturbation frequency [rad/s/m]
-        autoPtr<DataEntry<scalar> > omega_;
+        autoPtr<Function1<scalar>> omega_;
 
 
 public:
diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
index e5642bdbfdc1b003539b563a68ca3d9898a0da8e..ff99365065bf84fce29d0125dd9f331925bdd2a1 100644
--- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
+++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau
 ) const
 {
     tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
-    scalarField& uTau = tuTau();
+    scalarField& uTau = tuTau.ref();
 
     typedef regionModels::surfaceFilmModels::surfaceFilmModel modelType;
 
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
index dabe46ebe6eccc8ca390aad4fdf6f67bc0f50cce..cf1460066b17e569e0f5652a7c6ed76ea361bc48 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,6 +30,7 @@ License
 #include "fvcSnGrad.H"
 #include "fvcReconstruct.H"
 #include "fvcVolumeIntegrate.H"
+#include "fvcFlux.H"
 #include "addToRunTimeSelectionTable.H"
 #include "mappedWallPolyPatch.H"
 #include "mapDistribute.H"
@@ -83,22 +84,18 @@ void kinematicSingleLayer::resetPrimaryRegionSourceTerms()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::resetPrimaryRegionSourceTerms()" << endl;
+        InfoInFunction << endl;
     }
 
     rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0);
-    USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), vector::zero);
+    USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), Zero);
     pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0);
 }
 
 
 void kinematicSingleLayer::transferPrimaryRegionThermoFields()
 {
-    if (debug)
-    {
-        Info<< "kinematicSingleLayer::"
-            << "transferPrimaryRegionThermoFields()" << endl;
-    }
+    DebugInFunction << endl;
 
     // Update fields from primary region via direct mapped
     // (coupled) boundary conditions
@@ -113,8 +110,7 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::"
-            << "transferPrimaryRegionSourceFields()" << endl;
+        InfoInFunction << endl;
     }
 
     // Convert accummulated source terms into per unit area per unit time
@@ -208,7 +204,7 @@ void kinematicSingleLayer::updateSubmodels()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::updateSubmodels()" << endl;
+        InfoInFunction << endl;
     }
 
     // Update injection model - mass returned is mass available for injection
@@ -247,7 +243,8 @@ void kinematicSingleLayer::continuityCheck()
 
         cumulativeContErr_ += globalContErr;
 
-        Info<< "Surface film: " << type() << nl
+        InfoInFunction
+            << "Surface film: " << type() << nl
             << "    time step continuity errors: sum local = "
             << sumLocalContErr << ", global = " << globalContErr
             << ", cumulative = " << cumulativeContErr_ << endl;
@@ -259,7 +256,7 @@ void kinematicSingleLayer::solveContinuity()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::solveContinuity()" << endl;
+        InfoInFunction << endl;
     }
 
     solve
@@ -297,7 +294,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::solveMomentum()" << endl;
+        InfoInFunction << endl;
     }
 
     // Momentum
@@ -307,13 +304,13 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
       + fvm::div(phi_, U_)
      ==
       - USp_
-//      - fvm::SuSp(rhoSp_, U_)
+   // - fvm::SuSp(rhoSp_, U_)
       - rhoSp_*U_
       + forces_.correct(U_)
       + turbulence_->Su(U_)
     );
 
-    fvVectorMatrix& UEqn = tUEqn();
+    fvVectorMatrix& UEqn = tUEqn.ref();
 
     UEqn.relax();
 
@@ -333,7 +330,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
                       + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
                       + fvc::snGrad(delta_)*fvc::interpolate(pp)
                     )
-                  - (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
+                  - fvc::flux(rho_*gTan())
                 )
             )
         );
@@ -356,7 +353,7 @@ void kinematicSingleLayer::solveThickness
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::solveThickness()" << endl;
+        InfoInFunction << endl;
     }
 
     volScalarField rUA(1.0/UEqn.A());
@@ -373,15 +370,14 @@ void kinematicSingleLayer::solveThickness
             fvc::snGrad(pu, "snGrad(p)")
           + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_)
         )
-      - (fvc::interpolate(rho_*gTan()) & regionMesh().Sf())
+      - fvc::flux(rho_*gTan())
     );
     constrainFilmField(phiAdd, 0.0);
 
     surfaceScalarField phid
     (
         "phid",
-        (fvc::interpolate(U_*rho_) & regionMesh().Sf())
-      - deltarUAf*phiAdd*rhof
+        fvc::flux(U_*rho_) - deltarUAf*phiAdd*rhof
     );
     constrainFilmField(phid, 0.0);
 
@@ -655,7 +651,7 @@ kinematicSingleLayer::kinematicSingleLayer
         regionMesh(),
         dimensionedVector
         (
-            "zero", dimMass*dimVelocity/dimArea/dimTime, vector::zero
+            "zero", dimMass*dimVelocity/dimArea/dimTime, Zero
         ),
         this->mappedPushedFieldPatchTypes<vector>()
     ),
@@ -699,7 +695,7 @@ kinematicSingleLayer::kinematicSingleLayer
             IOobject::NO_WRITE
         ),
         primaryMesh(),
-        dimensionedVector("zero", USp_.dimensions(), vector::zero)
+        dimensionedVector("zero", USp_.dimensions(), Zero)
     ),
     pSpPrimary_
     (
@@ -739,7 +735,7 @@ kinematicSingleLayer::kinematicSingleLayer
             IOobject::NO_WRITE
         ),
         regionMesh(),
-        dimensionedVector("zero", dimVelocity, vector::zero),
+        dimensionedVector("zero", dimVelocity, Zero),
         this->mappedFieldAndInternalPatchTypes<vector>()
     ),
     pPrimary_
@@ -818,7 +814,7 @@ kinematicSingleLayer::kinematicSingleLayer
                 IOobject::AUTO_WRITE,
                 false
             ),
-            fvc::interpolate(deltaRho_*U_) & regionMesh().Sf()
+            fvc::flux(deltaRho_*U_)
         );
 
         phi_ == phi0;
@@ -846,7 +842,8 @@ void kinematicSingleLayer::addSources
 {
     if (debug)
     {
-        Info<< "\nSurface film: " << type() << ": adding to film source:" << nl
+        InfoInFunction
+            << "\nSurface film: " << type() << ": adding to film source:" << nl
             << "    mass     = " << massSource << nl
             << "    momentum = " << momentumSource << nl
             << "    pressure = " << pressureSource << endl;
@@ -864,7 +861,7 @@ void kinematicSingleLayer::preEvolveRegion()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::preEvolveRegion()" << endl;
+        InfoInFunction << endl;
     }
 
     surfaceFilmModel::preEvolveRegion();
@@ -891,7 +888,7 @@ void kinematicSingleLayer::evolveRegion()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::evolveRegion()" << endl;
+        InfoInFunction << endl;
     }
 
     // Update sub-models to provide updated source contributions
@@ -928,7 +925,7 @@ void kinematicSingleLayer::postEvolveRegion()
 {
     if (debug)
     {
-        Info<< "kinematicSingleLayer::postEvolveRegion()" << endl;
+        InfoInFunction << endl;
     }
 
     // Reset source terms for next time integration
@@ -1106,9 +1103,9 @@ void kinematicSingleLayer::info()
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho() const
+tmp<DimensionedField<scalar, volMesh>> kinematicSingleLayer::Srho() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -1128,12 +1125,12 @@ tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho() const
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho
+tmp<DimensionedField<scalar, volMesh>> kinematicSingleLayer::Srho
 (
     const label i
 ) const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -1153,9 +1150,9 @@ tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Srho
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > kinematicSingleLayer::Sh() const
+tmp<DimensionedField<scalar, volMesh>> kinematicSingleLayer::Sh() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H
index 03fdd4a4cdde5636fae57d43062a39d5cc81359d..66474a5730569c9c3598cbfbb5cdb53526834f69 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -516,16 +516,16 @@ public:
             // Mapped into primary region
 
                 //- Return total mass source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho() const;
 
                 //- Return mass source for specie i - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho
                 (
                     const label i
                 ) const;
 
                 //- Return enthalpy source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Sh() const;
 
 
         // I-O
@@ -544,7 +544,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "kinematicSingleLayerTemplates.C"
+    #include "kinematicSingleLayerTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H
index 10ac6837edf79c689cbb4cfcca30febef9404506..dc39615b7153f64a4d1b25a67805145186b7588d 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -223,8 +223,7 @@ inline tmp<volScalarField> kinematicSingleLayer::gNorm() const
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            g_ & nHat(),
-            zeroGradientFvPatchScalarField::typeName
+            g_ & nHat()
         )
     );
 
@@ -246,12 +245,11 @@ inline tmp<volScalarField> kinematicSingleLayer::gNormClipped() const
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            g_ & nHat(),
-            zeroGradientFvPatchScalarField::typeName
+            g_ & nHat()
         )
     );
 
-    volScalarField& gNormClipped = tgNormClipped();
+    volScalarField& gNormClipped = tgNormClipped.ref();
     gNormClipped.min(0.0);
 
     return tgNormClipped;
@@ -272,8 +270,7 @@ inline tmp<volVectorField> kinematicSingleLayer::gTan() const
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            g_ - nHat()*gNorm(),
-            zeroGradientFvPatchVectorField::typeName
+            g_ - nHat()*gNorm()
         )
     );
 
diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C
index 30affb2af951ee42285bdecf0f950b8a79255d85..4f65dc8d1725e22971c290f9b4953126676daf0b 100644
--- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C
+++ b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -244,9 +244,9 @@ const volScalarField& noFilm::cloudDiameterTrans() const
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > noFilm::Srho() const
+tmp<DimensionedField<scalar, volMesh>> noFilm::Srho() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -266,9 +266,9 @@ tmp<DimensionedField<scalar, volMesh> > noFilm::Srho() const
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > noFilm::Srho(const label i) const
+tmp<DimensionedField<scalar, volMesh>> noFilm::Srho(const label i) const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -288,9 +288,9 @@ tmp<DimensionedField<scalar, volMesh> > noFilm::Srho(const label i) const
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > noFilm::Sh() const
+tmp<DimensionedField<scalar, volMesh>> noFilm::Sh() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.H b/src/regionModels/surfaceFilmModels/noFilm/noFilm.H
index e8d22be6c4051badd776c21e5c45e04617365195..e8c091402d790806cc0551a110fc06406734f8d2 100644
--- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.H
+++ b/src/regionModels/surfaceFilmModels/noFilm/noFilm.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,16 +167,16 @@ public:
             // Mapped into primary region
 
                 //- Return total mass source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho() const;
 
                 //- Return mass source for specie i - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho
                 (
                     const label i
                 ) const;
 
                 //- Return enthalpy source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Sh() const;
 };
 
 
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C
index 6e964ac37d9194a7aaa95d90553344c4a1a13598..3e7602868b52223b195129caa8016fb1396786c9 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,6 +24,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "constantFilmThermo.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -270,12 +271,12 @@ tmp<volScalarField> constantFilmThermo::rho() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimDensity, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    trho().internalField() = this->rho(0, 0);
-    trho().correctBoundaryConditions();
+    trho.ref().internalField() = this->rho(0, 0);
+    trho.ref().correctBoundaryConditions();
 
     return trho;
 }
@@ -297,12 +298,12 @@ tmp<volScalarField> constantFilmThermo::mu() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimPressure*dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    tmu().internalField() = this->mu(0, 0);
-    tmu().correctBoundaryConditions();
+    tmu.ref().internalField() = this->mu(0, 0);
+    tmu.ref().correctBoundaryConditions();
 
     return tmu;
 }
@@ -324,12 +325,12 @@ tmp<volScalarField> constantFilmThermo::sigma() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    tsigma().internalField() = this->sigma(0, 0);
-    tsigma().correctBoundaryConditions();
+    tsigma.ref().internalField() = this->sigma(0, 0);
+    tsigma.ref().correctBoundaryConditions();
 
     return tsigma;
 }
@@ -351,12 +352,12 @@ tmp<volScalarField> constantFilmThermo::Cp() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    tCp().internalField() = this->Cp(0, 0);
-    tCp().correctBoundaryConditions();
+    tCp.ref().internalField() = this->Cp(0, 0);
+    tCp.ref().correctBoundaryConditions();
 
     return tCp;
 }
@@ -378,12 +379,12 @@ tmp<volScalarField> constantFilmThermo::kappa() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    tkappa().internalField() = this->kappa(0, 0);
-    tkappa().correctBoundaryConditions();
+    tkappa.ref().internalField() = this->kappa(0, 0);
+    tkappa.ref().correctBoundaryConditions();
 
     return tkappa;
 }
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C
index 79068a7954fe0d894bdb50c4631b3ffcbdc97b94..1e146d40354ea72c1715cdea8a4bc8d9e6428919 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,6 +27,7 @@ License
 #include "demandDrivenData.H"
 #include "thermoSingleLayer.H"
 #include "SLGThermo.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -250,11 +251,11 @@ tmp<volScalarField> liquidFilmThermo::rho() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimDensity, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    scalarField& rho = trho().internalField();
+    scalarField& rho = trho.ref().internalField();
 
     if (useReferenceValues_)
     {
@@ -273,7 +274,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const
         }
     }
 
-    trho().correctBoundaryConditions();
+    trho.ref().correctBoundaryConditions();
 
     return trho;
 }
@@ -295,11 +296,11 @@ tmp<volScalarField> liquidFilmThermo::mu() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimPressure*dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    scalarField& mu = tmu().internalField();
+    scalarField& mu = tmu.ref().internalField();
 
     if (useReferenceValues_)
     {
@@ -318,7 +319,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const
         }
     }
 
-    tmu().correctBoundaryConditions();
+    tmu.ref().correctBoundaryConditions();
 
     return tmu;
 }
@@ -340,11 +341,11 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    scalarField& sigma = tsigma().internalField();
+    scalarField& sigma = tsigma.ref().internalField();
 
     if (useReferenceValues_)
     {
@@ -363,7 +364,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
         }
     }
 
-    tsigma().correctBoundaryConditions();
+    tsigma.ref().correctBoundaryConditions();
 
     return tsigma;
 }
@@ -385,11 +386,11 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    scalarField& Cp = tCp().internalField();
+    scalarField& Cp = tCp.ref().internalField();
 
     if (useReferenceValues_)
     {
@@ -408,7 +409,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
         }
     }
 
-    tCp().correctBoundaryConditions();
+    tCp.ref().correctBoundaryConditions();
 
     return tCp;
 }
@@ -430,11 +431,11 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
             ),
             owner().regionMesh(),
             dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    scalarField& kappa = tkappa().internalField();
+    scalarField& kappa = tkappa.ref().internalField();
 
     if (useReferenceValues_)
     {
@@ -453,7 +454,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
         }
     }
 
-    tkappa().correctBoundaryConditions();
+    tkappa.ref().correctBoundaryConditions();
 
     return tkappa;
 }
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C
index 6b015cd800e3606a0914a153c32f6d29e6fd8cad..fea96634771f0bbb9c1c3ba0a876502b9b0a3535 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 #include "volFields.H"
 #include "fvmSup.H"
 #include "kinematicSingleLayer.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -83,14 +83,14 @@ tmp<volVectorField> laminar::Us() const
                 IOobject::NO_WRITE
             ),
             owner_.regionMesh(),
-            dimensionedVector("zero", dimVelocity, vector::zero),
-            zeroGradientFvPatchVectorField::typeName
+            dimensionedVector("zero", dimVelocity, Zero),
+            extrapolatedCalculatedFvPatchVectorField::typeName
         )
     );
 
     // apply quadratic profile
-    tUs() = Foam::sqrt(2.0)*owner_.U();
-    tUs().correctBoundaryConditions();
+    tUs.ref() = Foam::sqrt(2.0)*owner_.U();
+    tUs.ref().correctBoundaryConditions();
 
     return tUs;
 }
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C
index 756b1d8cc40aeaf7e94f08fcdf60c7709b4133f9..d560d810c3cc6bfe355aae0b0cc0c4238ab716b5 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -149,11 +149,11 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
                 IOobject::NO_WRITE
             ),
             owner_.regionMesh(),
-            dimensionedVector("zero", dimForce/dimArea, vector::zero)
+            dimensionedVector("zero", dimForce/dimArea, Zero)
         )
     );
 
-    vectorField& force = tForce().internalField();
+    vectorField& force = tForce.ref().internalField();
 
     const labelUList& own = owner_.regionMesh().owner();
     const labelUList& nbr = owner_.regionMesh().neighbour();
@@ -229,7 +229,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
     tmp<fvVectorMatrix>
         tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
 
-    tfvm() += tForce;
+    tfvm.ref() += tForce;
 
     return tfvm;
 }
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/forceList/forceList.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/forceList/forceList.C
index a6b54fe235309c85bfaa8f04674e46cef907bd4b..56a1454c46b35e48fdb6c2fc09a80d4ad6e4cddc 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/forceList/forceList.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/forceList/forceList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,7 +81,7 @@ tmp<fvVectorMatrix> forceList::correct(volVectorField& U)
     (
         new fvVectorMatrix(U, dimForce/dimArea*dimVolume)
     );
-    fvVectorMatrix& result = tResult();
+    fvVectorMatrix& result = tResult.ref();
 
     forAll(*this, i)
     {
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C
index 795a2fcb7a5d7b77cf01cdedda5ceb6ddec6f612..e33127c352ad38246a837380ee4a1a91074bceb9 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,7 +69,7 @@ tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U)
     tmp<fvVectorMatrix>
         tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
 
-    tfvm() += alpha*fvc::grad(sigma);
+    tfvm.ref() += alpha*fvc::grad(sigma);
 
     return tfvm;
 }
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C
index 8121a2ce5df4a1f8b6a39d616ec8f5ad27701883..0fd83cea973303f7e58414ee64cde42a8504ac11 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
     );
 
 
-    scalarField& invR1 = tinvR1().internalField();
+    scalarField& invR1 = tinvR1.ref().internalField();
 
     // apply defined patch radii
     const scalar rMin = 1e-6;
@@ -229,7 +229,7 @@ curvatureSeparation::curvatureSeparation
     deltaByR1Min_(coeffDict_.lookupOrDefault<scalar>("deltaByR1Min", 0.0)),
     definedPatchRadii_(),
     magG_(mag(owner.g().value())),
-    gHat_(vector::zero)
+    gHat_(Zero)
 {
     if (magG_ < ROOTVSMALL)
     {
@@ -240,10 +240,10 @@ curvatureSeparation::curvatureSeparation
 
     gHat_ = owner.g().value()/magG_;
 
-    List<Tuple2<word, scalar> > prIn(coeffDict_.lookup("definedPatchRadii"));
+    List<Tuple2<word, scalar>> prIn(coeffDict_.lookup("definedPatchRadii"));
     const wordList& allPatchNames = owner.regionMesh().boundaryMesh().names();
 
-    DynamicList<Tuple2<label, scalar> > prData(allPatchNames.size());
+    DynamicList<Tuple2<label, scalar>> prData(allPatchNames.size());
 
     labelHashSet uniquePatchIDs;
 
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H
index fa1acd3f4f235cba00ebe8471a7ef7ad48b1a9d5..26d8fa57a0ef6b80e9368f9bf21d75f859685e30 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ protected:
 
         //- List of radii for patches - if patch not defined, radius
         // calculated based on mesh geometry
-        List<Tuple2<label, scalar> > definedPatchRadii_;
+        List<Tuple2<label, scalar>> definedPatchRadii_;
 
         //- Magnitude of gravity vector
         scalar magG_;
diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.H
index 0e49627d13e926bba45fdcebe946eafaa6793a20..1e1bc813f8ed25872081981af4c81485eb23fa20 100644
--- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.H
+++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::patchInjection
+    Foam::regionModels::surfaceFilmModels::patchInjection
 
 Description
     Remove and inject the mass in the film as it passes over the selected
diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C
index 5d82ba0853b77a54b5a230ae07aa7d180e0c538c..489b453cb90df3022efb1fb398b940638d5774a4 100644
--- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C
+++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,6 @@ License
 
 #include "constantRadiation.H"
 #include "volFields.H"
-#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -117,8 +116,7 @@ tmp<volScalarField> constantRadiation::Shs()
                 IOobject::NO_WRITE
             ),
             owner().regionMesh(),
-            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
         )
     );
 
@@ -126,7 +124,7 @@ tmp<volScalarField> constantRadiation::Shs()
 
     if ((time >= timeStart_) && (time <= timeStart_ + duration_))
     {
-        scalarField& Shs = tShs();
+        scalarField& Shs = tShs.ref();
         const scalarField& Qr = QrConst_.internalField();
         const scalarField& alpha = owner_.alpha().internalField();
 
diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C
index ce200ee3c5e1b08190ea703b3946575aa583d48f..e46dd872e4a9966ee357ac87354d01a36a736d9d 100644
--- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C
+++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,6 @@ License
 #include "noRadiation.H"
 #include "volFields.H"
 #include "addToRunTimeSelectionTable.H"
-#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -89,8 +88,7 @@ tmp<volScalarField> noRadiation::Shs()
                 IOobject::NO_WRITE
             ),
             owner().regionMesh(),
-            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
         )
     );
 }
diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C
index 21b982073c1e2ad552d084d39823d2269c7a0843..a6350c3ac18131e368eafd92be0a39caa5d3fb68 100644
--- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C
+++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,6 @@ License
 
 #include "primaryRadiation.H"
 #include "volFields.H"
-#include "zeroGradientFvPatchFields.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -104,12 +103,11 @@ tmp<volScalarField> primaryRadiation::Shs()
                 IOobject::NO_WRITE
             ),
             owner().regionMesh(),
-            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
         )
     );
 
-    scalarField& Shs = tShs();
+    scalarField& Shs = tShs.ref();
     const scalarField& QinP = QinPrimary_.internalField();
     const scalarField& alpha = owner_.alpha().internalField();
 
diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C
index 14c2a3bfd8dae9b7a2955c2af061aa0a2f7877dc..2d6e8b77b8f484ac4d3884f9a0fb6a909ca27624 100644
--- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C
+++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,12 +120,11 @@ tmp<volScalarField> standardRadiation::Shs()
                 IOobject::NO_WRITE
             ),
             owner().regionMesh(),
-            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0)
         )
     );
 
-    scalarField& Shs = tShs();
+    scalarField& Shs = tShs.ref();
     const scalarField& QinP = QinPrimary_.internalField();
     const scalarField& delta = owner_.delta().internalField();
     const scalarField& alpha = owner_.alpha().internalField();
diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C
index 924aee7087fc23a7b2303fb8de456b867defb0b2..78769a9bdcb4cb219ede9dec8e0072d8bc67d145 100644
--- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C
+++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,6 @@ License
 #include "constantHeatTransfer.H"
 #include "volFields.H"
 #include "addToRunTimeSelectionTable.H"
-#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -96,8 +95,7 @@ tmp<volScalarField> constantHeatTransfer::h() const
                 "c0",
                 dimEnergy/dimTime/sqr(dimLength)/dimTemperature,
                 c0_
-            ),
-            zeroGradientFvPatchScalarField::typeName
+            )
         )
     );
 }
diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C
index f007b3d043b8827a402f82cbe0df747c8afd4f40..57d1f9791536fee1b971d8362745a46888f790bd 100644
--- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C
+++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,28 +89,28 @@ Foam::scalar surfaceFilmModel::CourantNumber() const
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho() const
+tmp<DimensionedField<scalar, volMesh>> surfaceFilmModel::Srho() const
 {
     NotImplemented;
 
-    return tmp<DimensionedField<scalar, volMesh> >(NULL);
+    return tmp<DimensionedField<scalar, volMesh>>(NULL);
 }
 
 
-tmp<DimensionedField<scalar, volMesh> >
+tmp<DimensionedField<scalar, volMesh>>
 surfaceFilmModel::Srho(const label) const
 {
     NotImplemented;
 
-    return tmp<DimensionedField<scalar, volMesh> >(NULL);
+    return tmp<DimensionedField<scalar, volMesh>>(NULL);
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Sh() const
+tmp<DimensionedField<scalar, volMesh>> surfaceFilmModel::Sh() const
 {
     NotImplemented;
 
-    return tmp<DimensionedField<scalar, volMesh> >(NULL);
+    return tmp<DimensionedField<scalar, volMesh>>(NULL);
 }
 
 
diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H
index 88b193d1d09131f5288b5b738f2ccb3099900f97..77817d5809e9c0a77c2f0bf6d86bfada8cae705c 100644
--- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H
+++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -219,16 +219,16 @@ public:
             // Mapped into primary region
 
                 //- Return total mass source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho() const;
 
                 //- Return mass source for specie i - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho
                 (
                     const label i
                 ) const;
 
                 //- Return enthalpy source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Sh() const;
 };
 
 
diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C
index 11e0ae03077f095c897fb5dbd862fcd7a7076011..5f061f6086e094bcc1dad7ae6695383e1b09ca63 100644
--- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C
+++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,10 +24,11 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "thermoSingleLayer.H"
+#include "fvcDdt.H"
 #include "fvcDiv.H"
 #include "fvcLaplacian.H"
+#include "fvcFlux.H"
 #include "fvm.H"
-#include "fvcDdt.H"
 #include "addToRunTimeSelectionTable.H"
 #include "zeroGradientFvPatchFields.H"
 #include "mappedFieldFvPatchField.H"
@@ -90,7 +91,7 @@ void thermoSingleLayer::resetPrimaryRegionSourceTerms()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::resetPrimaryRegionSourceTerms()" << endl;
+        InfoInFunction << endl;
     }
 
     kinematicSingleLayer::resetPrimaryRegionSourceTerms();
@@ -115,7 +116,7 @@ void thermoSingleLayer::correctHsForMappedT()
     forAll(T_.boundaryField(), patchI)
     {
         const fvPatchField<scalar>& Tp = T_.boundaryField()[patchI];
-        if (isA<mappedFieldFvPatchField<scalar> >(Tp))
+        if (isA<mappedFieldFvPatchField<scalar>>(Tp))
         {
             hs_.boundaryField()[patchI] == hs(Tp, patchI);
         }
@@ -147,7 +148,7 @@ void thermoSingleLayer::transferPrimaryRegionThermoFields()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::transferPrimaryRegionThermoFields()" << endl;
+        InfoInFunction << endl;
     }
 
     kinematicSingleLayer::transferPrimaryRegionThermoFields();
@@ -166,7 +167,7 @@ void thermoSingleLayer::transferPrimaryRegionSourceFields()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::transferPrimaryRegionSourceFields()" << endl;
+        InfoInFunction << endl;
     }
 
     kinematicSingleLayer::transferPrimaryRegionSourceFields();
@@ -233,7 +234,7 @@ void thermoSingleLayer::updateSubmodels()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::updateSubmodels()" << endl;
+        InfoInFunction << endl;
     }
 
     // Update heat transfer coefficient sub-models
@@ -288,7 +289,7 @@ void thermoSingleLayer::solveEnergy()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::solveEnergy()" << endl;
+        InfoInFunction << endl;
     }
 
 
@@ -584,7 +585,7 @@ thermoSingleLayer::thermoSingleLayer
                 IOobject::AUTO_WRITE,
                 false
             ),
-            fvc::interpolate(deltaRho_*U_) & regionMesh().Sf()
+            fvc::flux(deltaRho_*U_)
         );
 
         phi_ == phi0;
@@ -636,7 +637,7 @@ void thermoSingleLayer::preEvolveRegion()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::preEvolveRegion()" << endl;
+        InfoInFunction << endl;
     }
 
     kinematicSingleLayer::preEvolveRegion();
@@ -653,7 +654,7 @@ void thermoSingleLayer::evolveRegion()
 {
     if (debug)
     {
-        Info<< "thermoSingleLayer::evolveRegion()" << endl;
+        InfoInFunction << endl;
     }
 
     // Update sub-models to provide updated source contributions
@@ -740,16 +741,18 @@ void thermoSingleLayer::info()
 
     const scalarField& Tinternal = T_.internalField();
 
-    Info<< indent << "min/max(T)         = " << gMin(Tinternal) << ", "
+    Info<< indent << "min/mean/max(T)    = "
+        << gMin(Tinternal) << ", "
+        << gAverage(Tinternal) << ", "
         << gMax(Tinternal) << nl;
 
     phaseChange_->info(Info);
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho() const
+tmp<DimensionedField<scalar, volMesh>> thermoSingleLayer::Srho() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tSrho
+    tmp<DimensionedField<scalar, volMesh>> tSrho
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -767,7 +770,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho() const
         )
     );
 
-    scalarField& Srho = tSrho();
+    scalarField& Srho = tSrho.ref();
     const scalarField& V = primaryMesh().V();
     const scalar dt = time_.deltaTValue();
 
@@ -794,14 +797,14 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho() const
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho
+tmp<DimensionedField<scalar, volMesh>> thermoSingleLayer::Srho
 (
     const label i
 ) const
 {
     const label vapId = thermo_.carrierId(filmThermo_->name());
 
-    tmp<DimensionedField<scalar, volMesh> > tSrho
+    tmp<DimensionedField<scalar, volMesh>> tSrho
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -821,7 +824,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho
 
     if (vapId == i)
     {
-        scalarField& Srho = tSrho();
+        scalarField& Srho = tSrho.ref();
         const scalarField& V = primaryMesh().V();
         const scalar dt = time().deltaTValue();
 
@@ -849,9 +852,9 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho
 }
 
 
-tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Sh() const
+tmp<DimensionedField<scalar, volMesh>> thermoSingleLayer::Sh() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tSh
+    tmp<DimensionedField<scalar, volMesh>> tSh
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -871,7 +874,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Sh() const
 /*
     phase change energy fed back into the film...
 
-    scalarField& Sh = tSh();
+    scalarField& Sh = tSh.ref();
     const scalarField& V = primaryMesh().V();
     const scalar dt = time_.deltaTValue();
 
diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H
index 143833bca5548e16dee8ac759587d5398a07fd84..d2f13c10edcf2303d9a7931d9eef44cb5605489e 100644
--- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H
+++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -389,16 +389,16 @@ public:
             // Mapped into primary region
 
                 //- Return total mass source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho() const;
 
                 //- Return mass source for specie i - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Srho
+                virtual tmp<DimensionedField<scalar, volMesh>> Srho
                 (
                     const label i
                 ) const;
 
                 //- Return enthalpy source - Eulerian phase only
-                virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
+                virtual tmp<DimensionedField<scalar, volMesh>> Sh() const;
 
 
        // I-O
diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H
index edcef996778d5531813ffe03bb3e679e65c3551b..22bd215deb2574b2469cd90e61b730e5264be913 100644
--- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H
+++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -73,8 +73,7 @@ inline tmp<volScalarField> thermoSingleLayer::hs
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            Cp_*(T - (dimensionedScalar("Tstd", dimTemperature, 298.15))),
-            zeroGradientFvPatchScalarField::typeName
+            Cp_*(T - (dimensionedScalar("Tstd", dimTemperature, 298.15)))
         )
     );
 }
@@ -97,13 +96,12 @@ inline tmp<volScalarField> thermoSingleLayer::T
                 IOobject::NO_READ,
                 IOobject::NO_WRITE
             ),
-            hs/Cp_ + dimensionedScalar("Tstd", dimTemperature, 298.15),
-            zeroGradientFvPatchScalarField::typeName
+            hs/Cp_ + dimensionedScalar("Tstd", dimTemperature, 298.15)
         )
     );
 
-    tT().min(Tmax_);
-    tT().max(Tmin_);
+    tT.ref().min(Tmax_);
+    tT.ref().max(Tmin_);
 
     return tT;
 }
diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
index 2231b42999f498bfd771c743dfd6e4c15bdd65ec..e575a1c480e851e2cfc3e6d58f3f1a6b24625c26 100644
--- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
+++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -208,7 +208,7 @@ void thermalBaffleFvPatchScalarField::createPatchMesh()
     dicts[topPatchID].add("sampleMode", mpp.sampleModeNames_[mpp.mode()]);
 
 
-    forAll (regionPatches, patchI)
+    forAll(regionPatches, patchI)
     {
         dictionary&  patchDict = dicts[patchI];
         patchDict.set("nFaces", 0);
diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H
index 1cfeeb7488afb54ca3c20381d5620bde9b1fe4f4..389672e74fc1bcd23b2c353d06b4eeeba735a315 100644
--- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H
+++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -22,7 +22,7 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::thermalBaffleFvPatchScalarField
+    Foam::compressible::thermalBaffleFvPatchScalarField
 
 Group
     grpThermoBoundaryConditions
@@ -30,16 +30,18 @@ Group
 Description
     This boundary condition provides a coupled temperature condition between
     multiple mesh regions.  The regions are generally referred to as the:
-    - primary region, and
-    - baffle region
+
+    \li primary region,
+    \li and baffle region.
 
     The primary region creates the baffle region and evolves its energy
     equation either:
+
     - 1-D, normal to each patch face
     - 2-D, normal and tangential components
 
     The thermodynamic properties of the baffle material are specified via
-    dictionary entries on the master patch
+    dictionary entries on the master patch.
 
     \heading Patch usage
     Example of the boundary condition specification:
@@ -116,7 +118,7 @@ Description
     }
     \endverbatim
 
-    /- Slave patch on primary region
+    \li Slave patch on primary region
     \verbatim
     myPatch_slave
     {
@@ -127,7 +129,7 @@ Description
     \endverbatim
 
 
-    /- Patches on baffle region
+    \li Patches on baffle region
     \verbatim
     bottom
     {
@@ -148,7 +150,7 @@ Description
 
 
 SeeAlso
-    Foam::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
+    Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
     Foam::regionModels::thermalBaffleModels::thermalBaffleModel
 
 SourceFiles
diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C
index f63ccde2389b7e2d99c8d8ecdedb37e790f5641d..5454563cb8ec162b5d27fbc8a228923fba0c4944 100644
--- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C
+++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,7 +68,7 @@ void thermalBaffle::solveEnergy()
 {
     if (debug)
     {
-        Info<< "thermalBaffle::solveEnergy()" << endl;
+        InfoInFunction << endl;
     }
 
     const polyBoundaryMesh& rbm = regionMesh().boundaryMesh();
@@ -91,7 +91,7 @@ void thermalBaffle::solveEnergy()
         )
     );
 
-    volScalarField& Q = tQ();
+    volScalarField& Q = tQ.ref();
 
     volScalarField rho("rho", thermo_->rho());
     volScalarField alpha("alpha", thermo_->alpha());
@@ -182,7 +182,7 @@ thermalBaffle::thermalBaffle
         (
             "zero",
             dimEnergy/dimArea/dimTime,
-            pTraits<scalar>::zero
+            Zero
         )
     ),
     Q_
@@ -200,7 +200,7 @@ thermalBaffle::thermalBaffle
         (
             "zero",
             dimEnergy/dimVolume/dimTime,
-            pTraits<scalar>::zero
+            Zero
         )
     ),
     radiation_
@@ -242,7 +242,7 @@ thermalBaffle::thermalBaffle
         (
             "zero",
             dimEnergy/dimArea/dimTime,
-            pTraits<scalar>::zero
+            Zero
         )
     ),
     Q_
@@ -260,7 +260,7 @@ thermalBaffle::thermalBaffle
         (
             "zero",
             dimEnergy/dimVolume/dimTime,
-            pTraits<scalar>::zero
+            Zero
         )
     ),
     radiation_
diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C
index c432d922a83920745fe293b24aaecf701ea6ac2e..f56ef9193e5b7a4eeb6b754fe25303840951fa3e 100644
--- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C
+++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -76,7 +76,7 @@ void thermalBaffleModel::init()
         reduce(nTotalEdges, sumOp<label>());
 
         label nFaces = 0;
-        forAll (rbm, patchi)
+        forAll(rbm, patchi)
         {
             if (
                    rbm[patchi].size()
@@ -157,7 +157,7 @@ void thermalBaffleModel::init()
             // Calculate thickness of the baffle on the first face only.
             if (delta_.value() == 0.0)
             {
-                forAll (ppCoupled, localFaceI)
+                forAll(ppCoupled, localFaceI)
                 {
                     label faceI = ppCoupled.start() + localFaceI;
 
diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake
index ec1acb8320d4527265b0bd40c44d46b68558ec43..a44d239870bd4616d3a48019140425316d1b14cd 100755
--- a/src/renumber/Allwmake
+++ b/src/renumber/Allwmake
@@ -5,14 +5,19 @@ cd ${0%/*} || exit 1    # Run from this directory
 targetType=libso
 . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
 
-## get ZOLTAN_ARCH_PATH
-#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/zoltan.sh`
+# Get CGAL and scotch versions
+. $WM_PROJECT_DIR/etc/config.sh/functions
+_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \
+          $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
+
+## Get ZOLTAN_ARCH_PATH
+#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan`
 #then
 #    . $settings
 #    echo "using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH"
 #else
 #    echo
-#    echo "Error: no config/zoltan.sh settings"
+#    echo "Error: no config.sh/zoltan settings"
 #    echo
 #fi
 
@@ -21,7 +26,7 @@ set -x
 
 wmake $targetType renumberMethods
 
-if [ -n "$BOOST_ARCH_PATH" ]
+if [ -n "$BOOST_ARCH_PATH" -o "$boost_version" = "boost-system" ]
 then
     wmake $targetType SloanRenumber
 else
@@ -40,4 +45,4 @@ else
     echo
 fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/renumber/SloanRenumber/SloanRenumber.C b/src/renumber/SloanRenumber/SloanRenumber.C
index 24904789402f9118a107ee678159a8f5ba0f53f1..43e8006a7ab7cf01546614c8d4d4e4540f71d88e 100644
--- a/src/renumber/SloanRenumber/SloanRenumber.C
+++ b/src/renumber/SloanRenumber/SloanRenumber.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,7 @@ Foam::labelList Foam::SloanRenumber::renumber
                 nbr,
                 pbm[patchI].size(),
                 pbm[patchI].start()-mesh.nInternalFaces()
-            ).assign(pbm[patchI].faceCells());
+            ) = pbm[patchI].faceCells();
         }
     }
     syncTools::swapBoundaryFaceList(mesh, nbr);
diff --git a/src/rigidBodyDynamics/Make/files b/src/rigidBodyDynamics/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..07612c1038ee3b1bc28ff0f410dbda86fd892c6b
--- /dev/null
+++ b/src/rigidBodyDynamics/Make/files
@@ -0,0 +1,51 @@
+bodies/rigidBody/rigidBody.C
+bodies/masslessBody/masslessBody.C
+bodies/jointBody/jointBody.C
+bodies/compositeBody/compositeBody.C
+bodies/subBody/subBody.C
+bodies/sphere/sphere.C
+bodies/cuboid/cuboid.C
+
+joints/joint/joint.C
+joints/null/nullJoint.C
+joints/composite/compositeJoint.C
+joints/floating/floatingJoint.C
+
+joints/Rx/Rx.C
+joints/Ry/Ry.C
+joints/Rz/Rz.C
+joints/Ra/Ra.C
+joints/Rs/Rs.C
+joints/Rzyx/Rzyx.C
+joints/Rxyz/Rxyz.C
+joints/Ryxz/Ryxz.C
+
+joints/Px/Px.C
+joints/Py/Py.C
+joints/Pz/Pz.C
+joints/Pa/Pa.C
+joints/Pxyz/Pxyz.C
+
+restraints/restraint/rigidBodyRestraint.C
+restraints/restraint/rigidBodyRestraintNew.C
+restraints/linearSpring/linearSpring.C
+restraints/linearDamper/linearDamper.C
+restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
+restraints/sphericalAngularDamper/sphericalAngularDamper.C
+
+rigidBodyModel/rigidBodyModel.C
+rigidBodyModel/forwardDynamics.C
+
+rigidBodyModelState/rigidBodyModelState.C
+rigidBodyModelState/rigidBodyModelStateIO.C
+
+rigidBodyMotion/rigidBodyMotion.C
+rigidBodyMotion/rigidBodyMotionIO.C
+
+rigidBodySolvers/rigidBodySolver/rigidBodySolver.C
+rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C
+rigidBodySolvers/symplectic/symplectic.C
+rigidBodySolvers/Newmark/Newmark.C
+rigidBodySolvers/CrankNicolson/CrankNicolson.C
+
+LIB = $(FOAM_LIBBIN)/librigidBodyDynamics
diff --git a/src/rigidBodyDynamics/Make/options b/src/rigidBodyDynamics/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..79be6f3a7dd8fa81ba203d5ab8572c446c43a6c7
--- /dev/null
+++ b/src/rigidBodyDynamics/Make/options
@@ -0,0 +1,3 @@
+EXE_INC =
+
+LIB_LIBS =
diff --git a/src/rigidBodyDynamics/bodies/compositeBody/compositeBody.C b/src/rigidBodyDynamics/bodies/compositeBody/compositeBody.C
new file mode 100644
index 0000000000000000000000000000000000000000..3f0908601649192530ad7996632f996a4d44e8b2
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/compositeBody/compositeBody.C
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "compositeBody.H"
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::compositeBody::~compositeBody()
+{}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::compositeBody::clone() const
+{
+    return autoPtr<rigidBody>(new compositeBody(*this));
+}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+const Foam::word& Foam::RBD::compositeBody::type() const
+{
+    return body_->type();
+}
+
+
+void Foam::RBD::compositeBody::write(Ostream& os) const
+{
+    body_->write(os);
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/compositeBody/compositeBody.H b/src/rigidBodyDynamics/bodies/compositeBody/compositeBody.H
new file mode 100644
index 0000000000000000000000000000000000000000..662ed39e8ae9991993d298fdcd8a41a1c9b71deb
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/compositeBody/compositeBody.H
@@ -0,0 +1,106 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::compositeBody
+
+Description
+    This specialized rigidBody holds the original body after it has been merged
+    into a parent.
+
+SourceFiles
+    compositeBodyI.H
+    compositeBody.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_compositeBody_H
+#define RBD_compositeBody_H
+
+#include "rigidBody.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class compositeBody Declaration
+\*---------------------------------------------------------------------------*/
+
+class compositeBody
+:
+    public rigidBody
+{
+    // Private data
+
+        //- Original body from which this composite-body was constructed
+        autoPtr<rigidBody> body_;
+
+public:
+
+    // Constructors
+
+        //- Construct a merged version of the given rigidBody
+        //  providing the ID of the parent body to which this will be merged
+        //  and the transform relative to the parent
+        inline compositeBody(const autoPtr<rigidBody>& bodyPtr);
+
+        //- Return clone of this compositeBody
+        virtual autoPtr<rigidBody> clone() const;
+
+
+    //- Destructor
+    virtual ~compositeBody();
+
+
+    // Member Functions
+
+        //- Return the type name of the original body
+        virtual const word& type() const;
+
+        //- Return the original body from which this composite-body
+        //  was constructed
+        inline const rigidBody& body() const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "compositeBodyI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/compositeBody/compositeBodyI.H b/src/rigidBodyDynamics/bodies/compositeBody/compositeBodyI.H
new file mode 100644
index 0000000000000000000000000000000000000000..dee27aec8cd51e283090fc6b373560fa7c8ad8bf
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/compositeBody/compositeBodyI.H
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::compositeBody::compositeBody
+(
+    const autoPtr<rigidBody>& bodyPtr
+)
+:
+    rigidBody(bodyPtr()),
+    body_(bodyPtr)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline const Foam::RBD::rigidBody& Foam::RBD::compositeBody::body() const
+{
+    return body_();
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/cuboid/cuboid.C b/src/rigidBodyDynamics/bodies/cuboid/cuboid.C
new file mode 100644
index 0000000000000000000000000000000000000000..5309ae50b48f280a508e683830d5a09ae3eba8d8
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/cuboid/cuboid.C
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "cuboid.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(cuboid, 0);
+
+    addToRunTimeSelectionTable
+    (
+        rigidBody,
+        cuboid,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::cuboid::clone() const
+{
+    return autoPtr<rigidBody>(new cuboid(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::cuboid::~cuboid()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::cuboid::write(Ostream& os) const
+{
+    os.writeKeyword("type")
+        << type() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("mass")
+        << m() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("L")
+        << L() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/cuboid/cuboid.H b/src/rigidBodyDynamics/bodies/cuboid/cuboid.H
new file mode 100644
index 0000000000000000000000000000000000000000..7432f7cbc0738a3f5006d6aaa89de1bb6bd9f066
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/cuboid/cuboid.H
@@ -0,0 +1,124 @@
+/*---------------------------------------------------------------------------*\3
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::cuboid
+
+Description
+    Specialization of rigidBody to construct a cuboid given the mass and
+    lengths of the sides.
+
+SourceFiles
+    cuboidI.H
+    cuboid.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_cuboid_H
+#define RBD_cuboid_H
+
+#include "rigidBody.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class cuboid Declaration
+\*---------------------------------------------------------------------------*/
+
+class cuboid
+:
+    public rigidBody
+{
+    // Private member data
+
+        //- Lengths of the sides
+        vector L_;
+
+
+    // Private member functions
+
+        // Calculate and return the inertia tensor
+        inline symmTensor I(const scalar m, const vector& L) const;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("cuboid");
+
+
+    // Constructors
+
+        //- Construct from name, mass, centre of mass and lengths of the sides.
+        inline cuboid
+        (
+            const word& name,
+            const scalar m,
+            const vector& c,
+            const vector& L
+        );
+
+        //- Construct from dictionary
+        inline cuboid
+        (
+            const word& name,
+            const dictionary& dict
+        );
+
+        //- Return clone of this cuboid
+        virtual autoPtr<rigidBody> clone() const;
+
+
+    //- Destructor
+    virtual ~cuboid();
+
+
+    // Member Functions
+
+        //- Return the lengths of the sides of the cuboid
+        inline const vector& L() const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "cuboidI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H b/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H
new file mode 100644
index 0000000000000000000000000000000000000000..e18a835bc0ee9195745be9d02452b789e31817be
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/cuboid/cuboidI.H
@@ -0,0 +1,86 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+inline Foam::symmTensor Foam::RBD::cuboid::I
+(
+    const scalar m,
+    const vector& L
+) const
+{
+    const scalar mBy12 = m/12.0;
+    const scalar mSqrLx = mBy12*sqr(L.x());
+    const scalar mSqrLy = mBy12*sqr(L.y());
+    const scalar mSqrLz = mBy12*sqr(L.z());
+
+    return symmTensor
+    (
+        mSqrLy + mSqrLz, 0,               0,
+                         mSqrLx + mSqrLz, 0,
+                                          mSqrLx + mSqrLy
+    );
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::cuboid::cuboid
+(
+    const word& name,
+    const scalar m,
+    const vector& c,
+    const vector& L
+)
+:
+    rigidBody(name, m, c, I(m, L)),
+    L_(L)
+{}
+
+
+inline Foam::RBD::cuboid::cuboid
+(
+    const word& name,
+    const dictionary& dict
+)
+:
+    rigidBody(name, rigidBodyInertia()),
+    L_(dict.lookup("L"))
+{
+    const scalar m(readScalar(dict.lookup("mass")));
+    const vector c(dict.lookup("centreOfMass"));
+    rigidBodyInertia::operator=(rigidBodyInertia(m, c, I(m, L_)));
+}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+inline const Foam::vector& Foam::RBD::cuboid::L() const
+{
+    return L_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/jointBody/jointBody.C b/src/rigidBodyDynamics/bodies/jointBody/jointBody.C
new file mode 100644
index 0000000000000000000000000000000000000000..01a4a68c1d22912cdf6ff274c689a745ee29a644
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/jointBody/jointBody.C
@@ -0,0 +1,61 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "jointBody.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(jointBody, 0);
+
+    addToRunTimeSelectionTable
+    (
+        rigidBody,
+        jointBody,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::jointBody::clone() const
+{
+    return autoPtr<rigidBody>(new jointBody(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::jointBody::~jointBody()
+{}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/jointBody/jointBody.H b/src/rigidBodyDynamics/bodies/jointBody/jointBody.H
new file mode 100644
index 0000000000000000000000000000000000000000..1784de009db94ff2a0144bbc7432bbffce88e422
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/jointBody/jointBody.H
@@ -0,0 +1,99 @@
+/*---------------------------------------------------------------------------*\3
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::jointBody
+
+Description
+
+SourceFiles
+    jointBodyI.H
+    jointBody.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_jointBody_H
+#define RBD_jointBody_H
+
+#include "masslessBody.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class jointBody Declaration
+\*---------------------------------------------------------------------------*/
+
+class jointBody
+:
+    public masslessBody
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("jointBody");
+
+
+    // Constructors
+
+        //- Construct a joint body
+        inline jointBody();
+
+        //- Construct a named joint body
+        inline jointBody(const word& name);
+
+        //- Construct from dictionary
+        inline jointBody
+        (
+            const word& name,
+            const dictionary& dict
+        );
+
+        //- Return clone of this jointBody
+        virtual autoPtr<rigidBody> clone() const;
+
+
+    //- Destructor
+    virtual ~jointBody();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "jointBodyI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/jointBody/jointBodyI.H b/src/rigidBodyDynamics/bodies/jointBody/jointBodyI.H
new file mode 100644
index 0000000000000000000000000000000000000000..52f5e3bb6b307a6c0a9b248f4787a78733e1ac0a
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/jointBody/jointBodyI.H
@@ -0,0 +1,49 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::jointBody::jointBody()
+{}
+
+
+inline Foam::RBD::jointBody::jointBody(const word& name)
+:
+    masslessBody(name)
+{}
+
+
+inline Foam::RBD::jointBody::jointBody
+(
+    const word& name,
+    const dictionary& dict
+)
+:
+    masslessBody(name, dict)
+{}
+
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C
new file mode 100644
index 0000000000000000000000000000000000000000..61e5b4bc757fcab95d598047ca31c08537744463
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.C
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "masslessBody.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(masslessBody, 0);
+
+    addToRunTimeSelectionTable
+    (
+        rigidBody,
+        masslessBody,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::masslessBody::clone() const
+{
+    return autoPtr<rigidBody>(new masslessBody(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::masslessBody::~masslessBody()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+bool Foam::RBD::masslessBody::massless() const
+{
+    return true;
+}
+
+
+void Foam::RBD::masslessBody::write(Ostream& os) const
+{
+    os.writeKeyword("type")
+        << type() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.H b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.H
new file mode 100644
index 0000000000000000000000000000000000000000..a29585e3f6b0ec0673692cf585c1be1b17bb62e8
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/masslessBody/masslessBody.H
@@ -0,0 +1,108 @@
+/*---------------------------------------------------------------------------*\3
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::masslessBody
+
+Description
+
+SourceFiles
+    masslessBodyI.H
+    masslessBody.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_masslessBody_H
+#define RBD_masslessBody_H
+
+#include "rigidBody.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class masslessBody Declaration
+\*---------------------------------------------------------------------------*/
+
+class masslessBody
+:
+    public rigidBody
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("masslessBody");
+
+
+    // Constructors
+
+        //- Construct a massless body
+        inline masslessBody();
+
+        //- Construct a named massless body
+        inline masslessBody(const word& name);
+
+        //- Construct from dictionary
+        inline masslessBody
+        (
+            const word& name,
+            const dictionary& dict
+        );
+
+        //- Return clone of this masslessBody
+        virtual autoPtr<rigidBody> clone() const;
+
+
+    //- Destructor
+    virtual ~masslessBody();
+
+
+    // Member Functions
+
+        //- Return true if this body is a massless component of a composite body
+        virtual bool massless() const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "masslessBodyI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/masslessBody/masslessBodyI.H b/src/rigidBodyDynamics/bodies/masslessBody/masslessBodyI.H
new file mode 100644
index 0000000000000000000000000000000000000000..e8319b4a39ac3f6123ae7e5d939633e13955266d
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/masslessBody/masslessBodyI.H
@@ -0,0 +1,51 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::masslessBody::masslessBody()
+:
+    rigidBody("massless", rigidBodyInertia())
+{}
+
+
+inline Foam::RBD::masslessBody::masslessBody(const word& name)
+:
+    rigidBody(name, rigidBodyInertia())
+{}
+
+
+inline Foam::RBD::masslessBody::masslessBody
+(
+    const word& name,
+    const dictionary& dict
+)
+:
+    rigidBody(name, rigidBodyInertia())
+{}
+
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C
new file mode 100644
index 0000000000000000000000000000000000000000..ef744a5a0abbadb7c824ecb832506057bd4796e7
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.C
@@ -0,0 +1,136 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBody.H"
+#include "subBody.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(rigidBody, 0);
+    defineRunTimeSelectionTable(rigidBody, dictionary);
+
+    addToRunTimeSelectionTable
+    (
+        rigidBody,
+        rigidBody,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::rigidBody::clone() const
+{
+    return autoPtr<rigidBody>(new rigidBody(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::rigidBody::New
+(
+    const word& name,
+    const scalar& m,
+    const vector& c,
+    const symmTensor& Ic
+)
+{
+    return autoPtr<rigidBody>(new rigidBody(name, m, c, Ic));
+}
+
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::rigidBody::New
+(
+    const word& name,
+    const dictionary& dict
+)
+{
+    const word bodyType(dict.lookup("type"));
+
+    dictionaryConstructorTable::iterator cstrIter =
+        dictionaryConstructorTablePtr_->find(bodyType);
+
+    if (cstrIter == dictionaryConstructorTablePtr_->end())
+    {
+        FatalErrorInFunction
+            << "Unknown rigidBody type "
+            << bodyType << nl << nl
+            << "Valid rigidBody types are : " << endl
+            << dictionaryConstructorTablePtr_->sortedToc()
+            << exit(FatalError);
+    }
+
+    return autoPtr<rigidBody>(cstrIter()(name, dict));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBody::~rigidBody()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+bool Foam::RBD::rigidBody::massless() const
+{
+    return false;
+}
+
+
+void Foam::RBD::rigidBody::merge(const subBody& subBody)
+{
+    *this = rigidBody
+    (
+        name(),
+        *this + transform(subBody.masterXT(), subBody.body())
+    );
+}
+
+
+void Foam::RBD::rigidBody::write(Ostream& os) const
+{
+    os.writeKeyword("type")
+        << type() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("mass")
+        << m() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("centreOfMass")
+        << c() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("inertia")
+        << Ic() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.H b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.H
new file mode 100644
index 0000000000000000000000000000000000000000..2c8679b1e42bf964f757b6477f4e32aaece25c18
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/rigidBody/rigidBody.H
@@ -0,0 +1,176 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBody
+
+Description
+
+SourceFiles
+    rigidBodyI.H
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_rigidBody_H
+#define RBD_rigidBody_H
+
+#include "rigidBodyInertia.H"
+#include "dictionary.H"
+#include "runTimeSelectionTables.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+// Forward declaration of classes
+class subBody;
+
+// Forward declaration of friend functions and operators
+class rigidBody;
+
+inline Ostream& operator<<(Ostream&, const rigidBody&);
+
+
+/*---------------------------------------------------------------------------*\
+                         Class rigidBody Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBody
+:
+    public rigidBodyInertia
+{
+    // Private data
+
+        //- Name of body
+        word name_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("rigidBody");
+
+
+    // Declare run-time constructor selection table
+
+        declareRunTimeSelectionTable
+        (
+            autoPtr,
+            rigidBody,
+            dictionary,
+            (const word& name, const dictionary& dict),
+            (name, dict)
+        );
+
+
+    // Constructors
+
+        //- Construct from mass, centre of mass and moment of inertia tensor
+        //  about the centre of mass
+        inline rigidBody
+        (
+            const word& name,
+            const scalar& m,
+            const vector& c,
+            const symmTensor& Ic
+        );
+
+        //- Construct from with the given rigidBodyInertia
+        inline rigidBody
+        (
+            const word& name,
+            const rigidBodyInertia& rbi
+        );
+
+        //- Construct from dictionary
+        inline rigidBody
+        (
+            const word& name,
+            const dictionary& dict
+        );
+
+        //- Return clone of this rigidBody
+        virtual autoPtr<rigidBody> clone() const;
+
+
+    // Selectors
+
+        //- Select constructed from components
+        static autoPtr<rigidBody> New
+        (
+            const word& name,
+            const scalar& m,
+            const vector& c,
+            const symmTensor& Ic
+        );
+
+        //- Select constructed from name and dictionary
+        static autoPtr<rigidBody> New
+        (
+            const word& name,
+            const dictionary& dict
+        );
+
+
+    //- Destructor
+    virtual ~rigidBody();
+
+
+    // Member Functions
+
+        //- Return name
+        inline const word& name() const;
+
+        //- Return false as this body is not massless
+        virtual bool massless() const;
+
+        //- Merge a body into this parent body
+        void merge(const subBody&);
+
+        //- Write
+        virtual void write(Ostream&) const;
+
+
+    // Ostream Operator
+
+        friend Ostream& operator<<(Ostream&, const rigidBody&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/rigidBody/rigidBodyI.H b/src/rigidBodyDynamics/bodies/rigidBody/rigidBodyI.H
new file mode 100644
index 0000000000000000000000000000000000000000..3a74d42ea0517e75e5859962ddc5fcfb173764db
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/rigidBody/rigidBodyI.H
@@ -0,0 +1,80 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::rigidBody::rigidBody
+(
+    const word& name,
+    const scalar& m,
+    const vector& c,
+    const symmTensor& Ic
+)
+:
+    rigidBodyInertia(m, c, Ic),
+    name_(name)
+{}
+
+
+inline Foam::RBD::rigidBody::rigidBody
+(
+    const word& name,
+    const rigidBodyInertia& rbi
+)
+:
+    rigidBodyInertia(rbi),
+    name_(name)
+{}
+
+
+inline Foam::RBD::rigidBody::rigidBody
+(
+    const word& name,
+    const dictionary& dict
+)
+:
+    rigidBodyInertia(dict),
+    name_(name)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline const Foam::word& Foam::RBD::rigidBody::name() const
+{
+    return name_;
+}
+
+
+// * * * * * * * * * * * * * * * Ostream Operator  * * * * * * * * * * * * * //
+
+inline Foam::Ostream& Foam::RBD::operator<<(Ostream& os, const rigidBody& rb)
+{
+    rb.write(os);
+    return os;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/sphere/sphere.C b/src/rigidBodyDynamics/bodies/sphere/sphere.C
new file mode 100644
index 0000000000000000000000000000000000000000..ea4d13653e7d94875b9ffedb119967e624f8cd11
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/sphere/sphere.C
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "sphere.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(sphere, 0);
+
+    addToRunTimeSelectionTable
+    (
+        rigidBody,
+        sphere,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBody> Foam::RBD::sphere::clone() const
+{
+    return autoPtr<rigidBody>(new sphere(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::sphere::~sphere()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::sphere::write(Ostream& os) const
+{
+    os.writeKeyword("type")
+        << type() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("mass")
+        << m() << token::END_STATEMENT << nl;
+
+    os.writeKeyword("radius")
+        << r() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/sphere/sphere.H b/src/rigidBodyDynamics/bodies/sphere/sphere.H
new file mode 100644
index 0000000000000000000000000000000000000000..e3310f735d293a47dac349b47f73b127aa507870
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/sphere/sphere.H
@@ -0,0 +1,123 @@
+/*---------------------------------------------------------------------------*\3
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::sphere
+
+Description
+    Specialization of rigidBody to construct a sphere given the mass and radius.
+
+SourceFiles
+    sphereI.H
+    sphere.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_sphere_H
+#define RBD_sphere_H
+
+#include "rigidBody.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class sphere Declaration
+\*---------------------------------------------------------------------------*/
+
+class sphere
+:
+    public rigidBody
+{
+    // Private member data
+
+        //- Radius
+        scalar r_;
+
+
+    // Private member functions
+
+        // Calculate and return the inertia tensor
+        inline symmTensor I(const scalar m, const scalar r) const;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("sphere");
+
+
+    // Constructors
+
+        //- Construct from name, mass, centre of mass and radius
+        inline sphere
+        (
+            const word& name,
+            const scalar m,
+            const vector& c,
+            const scalar r
+        );
+
+        //- Construct from dictionary
+        inline sphere
+        (
+            const word& name,
+            const dictionary& dict
+        );
+
+        //- Return clone of this sphere
+        virtual autoPtr<rigidBody> clone() const;
+
+
+    //- Destructor
+    virtual ~sphere();
+
+
+    // Member Functions
+
+        //- Return the radius of the sphere
+        inline scalar r() const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "sphereI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/sphere/sphereI.H b/src/rigidBodyDynamics/bodies/sphere/sphereI.H
new file mode 100644
index 0000000000000000000000000000000000000000..49d9fc0e0b132c9d363b2d73138e140c370cc357
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/sphere/sphereI.H
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+inline Foam::symmTensor Foam::RBD::sphere::I
+(
+    const scalar m,
+    const scalar r
+) const
+{
+    return ((2.0/5.0)*m*sqr(r))*Foam::I;
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::sphere::sphere
+(
+    const word& name,
+    const scalar m,
+    const vector& c,
+    const scalar r
+)
+:
+    rigidBody(name, m, c, I(m, r)),
+    r_(r)
+{}
+
+
+inline Foam::RBD::sphere::sphere
+(
+    const word& name,
+    const dictionary& dict
+)
+:
+    rigidBody(name, rigidBodyInertia()),
+    r_(readScalar(dict.lookup("radius")))
+{
+    const scalar m(readScalar(dict.lookup("mass")));
+    const vector c(dict.lookup("centreOfMass"));
+    rigidBodyInertia::operator=(rigidBodyInertia(m, c, I(m, r_)));
+}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+inline Foam::scalar Foam::RBD::sphere::r() const
+{
+    return r_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/subBody/subBody.C b/src/rigidBodyDynamics/bodies/subBody/subBody.C
new file mode 100644
index 0000000000000000000000000000000000000000..96924506beb583f3322763af08343cadd206131d
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/subBody/subBody.C
@@ -0,0 +1,40 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "subBody.H"
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::subBody::write(Ostream& os) const
+{
+    os.writeKeyword("master")
+        << masterName_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("transform")
+        << masterXT_ << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/subBody/subBody.H b/src/rigidBodyDynamics/bodies/subBody/subBody.H
new file mode 100644
index 0000000000000000000000000000000000000000..0cd3f7c930dd721871b5db7e1381067b778f5cf5
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/subBody/subBody.H
@@ -0,0 +1,124 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::subBody
+
+Description
+    This specialized rigidBody holds the original body after it has been merged
+    into a master.
+
+SourceFiles
+    subBodyI.H
+    subBody.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_subBody_H
+#define RBD_subBody_H
+
+#include "rigidBody.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class subBody Declaration
+\*---------------------------------------------------------------------------*/
+
+class subBody
+{
+    // Private data
+
+        //- Original body from which this sub-body was constructed
+        autoPtr<rigidBody> body_;
+
+        //- Master body name
+        word masterName_;
+
+        //- Master body ID
+        label masterID_;
+
+        //- Transform with respect to master body
+        spatialTransform masterXT_;
+
+
+public:
+
+    // Constructors
+
+        //- Construct a merged version of the given rigidBody
+        //  providing the ID of the master body to which this will be merged
+        //  and the transform relative to the master
+        inline subBody
+        (
+            const autoPtr<rigidBody>& bodyPtr,
+            const word& masterName,
+            const label masterID,
+            const spatialTransform& masterXT
+        );
+
+        //- Return clone of this subBody
+        inline autoPtr<subBody> clone() const;
+
+
+    // Member Functions
+
+        //- Return the original body from which this sub-body was constructed
+        inline const rigidBody& body() const;
+
+        //- Return the body name
+        inline const word& name() const;
+
+        //- Return the master body name
+        inline const word& masterName() const;
+
+        //- Return the master body Id
+        inline label masterID() const;
+
+        //- Return the transform with respect to the master body
+        inline const spatialTransform& masterXT() const;
+
+        //- Write
+        void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "subBodyI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/bodies/subBody/subBodyI.H b/src/rigidBodyDynamics/bodies/subBody/subBodyI.H
new file mode 100644
index 0000000000000000000000000000000000000000..767ffc96126ef70fae2c1f510b085d4eb3861ae5
--- /dev/null
+++ b/src/rigidBodyDynamics/bodies/subBody/subBodyI.H
@@ -0,0 +1,81 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::subBody::subBody
+(
+    const autoPtr<rigidBody>& bodyPtr,
+    const word& masterName,
+    const label masterID,
+    const spatialTransform& masterXT
+)
+:
+    body_(bodyPtr),
+    masterName_(masterName),
+    masterID_(masterID),
+    masterXT_(masterXT)
+{}
+
+
+inline Foam::autoPtr<Foam::RBD::subBody> Foam::RBD::subBody::clone() const
+{
+    return autoPtr<subBody>(new subBody(*this));
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline const Foam::RBD::rigidBody& Foam::RBD::subBody::body() const
+{
+    return body_();
+}
+
+
+inline const Foam::word& Foam::RBD::subBody::name() const
+{
+    return body_->name();
+}
+
+
+inline const Foam::word& Foam::RBD::subBody::masterName() const
+{
+    return masterName_;
+}
+
+
+inline Foam::label Foam::RBD::subBody::masterID() const
+{
+    return masterID_;
+}
+
+
+inline const Foam::spatialTransform& Foam::RBD::subBody::masterXT() const
+{
+    return masterXT_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Pa/Pa.C b/src/rigidBodyDynamics/joints/Pa/Pa.C
new file mode 100644
index 0000000000000000000000000000000000000000..b30997acadfce95a2adca9c549c6a6e621bc9588
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Pa/Pa.C
@@ -0,0 +1,106 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Pa.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Pa, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Pa,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Pa::Pa(const vector& axis)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(Zero, axis/mag(axis));
+}
+
+
+Foam::RBD::joints::Pa::Pa(const dictionary& dict)
+:
+    joint(1)
+{
+    vector axis(dict.lookup("axis"));
+    S_[0] = spatialVector(Zero, axis/mag(axis));
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Pa::clone() const
+{
+    return autoPtr<joint>(new Pa(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Pa::~Pa()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Pa::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xt(S_[0].l()*q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = S_[0]*qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+void Foam::RBD::joints::Pa::write(Ostream& os) const
+{
+    joint::write(os);
+    os.writeKeyword("axis")
+        << S_[0].l() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Pa/Pa.H b/src/rigidBodyDynamics/joints/Pa/Pa.H
new file mode 100644
index 0000000000000000000000000000000000000000..d67af31d9a9dd29e768a220c449c542b151cb475
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Pa/Pa.H
@@ -0,0 +1,113 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Pa
+
+Description
+    Prismatic joint for translation along the specified arbitrary axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Pa.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Pa_H
+#define RBD_joints_Pa_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Pa Declaration
+\*---------------------------------------------------------------------------*/
+
+class Pa
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Pa");
+
+
+    // Constructors
+
+        //- Construct for given model and axis
+        Pa(const vector& axis);
+
+        //- Construct for given model from dictionary
+        Pa(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Pa();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Px/Px.C b/src/rigidBodyDynamics/joints/Px/Px.C
new file mode 100644
index 0000000000000000000000000000000000000000..a4a382c2a43790261f993b68107ec61040589951
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Px/Px.C
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Px.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Px, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Px,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Px::Px()
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 0, 1, 0, 0);
+}
+
+
+Foam::RBD::joints::Px::Px(const dictionary& dict)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 0, 1, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Px::clone() const
+{
+    return autoPtr<joint>(new Px(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Px::~Px()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Px::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xt(S_[0].l()*q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = S_[0]*qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Px/Px.H b/src/rigidBodyDynamics/joints/Px/Px.H
new file mode 100644
index 0000000000000000000000000000000000000000..979abcf5c001cc46662df4dbc6fbe4875dcf8e7c
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Px/Px.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Px
+
+Description
+    Prismatic joint for translation along the x-axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Px.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Px_H
+#define RBD_joints_Px_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Px Declaration
+\*---------------------------------------------------------------------------*/
+
+class Px
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Px");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Px();
+
+        //- Construct for given model from dictionary
+        Px(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Px();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Pxyz/Pxyz.C b/src/rigidBodyDynamics/joints/Pxyz/Pxyz.C
new file mode 100644
index 0000000000000000000000000000000000000000..6d87412e8194b946b8a2864cd05886cede2cb372
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Pxyz/Pxyz.C
@@ -0,0 +1,107 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Pxyz.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Pxyz, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Pxyz,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Pxyz::Pxyz()
+:
+    joint(3)
+{
+    S_[0] = spatialVector(0, 0, 0, 1, 0, 0);
+    S_[1] = spatialVector(0, 0, 0, 0, 1, 0);
+    S_[2] = spatialVector(0, 0, 0, 0, 0, 1);
+}
+
+
+Foam::RBD::joints::Pxyz::Pxyz(const dictionary& dict)
+:
+    joint(3)
+{
+    S_[0] = spatialVector(0, 0, 0, 1, 0, 0);
+    S_[1] = spatialVector(0, 0, 0, 0, 1, 0);
+    S_[2] = spatialVector(0, 0, 0, 0, 0, 1);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Pxyz::clone() const
+{
+    return autoPtr<joint>(new Pxyz(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Pxyz::~Pxyz()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Pxyz::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X.E() = tensor::I;
+    J.X.r() = q.block<vector>(qIndex_);
+
+    J.S = Zero;
+    J.S(3,0) = 1;
+    J.S(4,1) = 1;
+    J.S(5,2) = 1;
+
+    J.v = spatialVector(Zero, qDot.block<vector>(qIndex_));
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Pxyz/Pxyz.H b/src/rigidBodyDynamics/joints/Pxyz/Pxyz.H
new file mode 100644
index 0000000000000000000000000000000000000000..02746bf14c740cdbe4e7a4e267b874f13fbab8d5
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Pxyz/Pxyz.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Pxyz
+
+Description
+    Prismatic joint for translation in the x/y/z directions.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Pxyz.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Pxyz_H
+#define RBD_joints_Pxyz_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Pxyz Declaration
+\*---------------------------------------------------------------------------*/
+
+class Pxyz
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Pxyz");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Pxyz();
+
+        //- Construct for given model from dictionary
+        Pxyz(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Pxyz();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Py/Py.C b/src/rigidBodyDynamics/joints/Py/Py.C
new file mode 100644
index 0000000000000000000000000000000000000000..6fb02c4f54d820f202c9ddf9f16fc59c505c3c70
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Py/Py.C
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Py.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Py, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Py,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Py::Py()
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 0, 0, 1, 0);
+}
+
+
+Foam::RBD::joints::Py::Py(const dictionary& dict)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 0, 0, 1, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Py::clone() const
+{
+    return autoPtr<joint>(new Py(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Py::~Py()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Py::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xt(S_[0].l()*q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = S_[0]*qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Py/Py.H b/src/rigidBodyDynamics/joints/Py/Py.H
new file mode 100644
index 0000000000000000000000000000000000000000..bcbcd47785e919c6567a691e86998e62cfb44a01
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Py/Py.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Py
+
+Description
+    Prismatic joint for translation along the y-axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Py.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Py_H
+#define RBD_joints_Py_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Py Declaration
+\*---------------------------------------------------------------------------*/
+
+class Py
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Py");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Py();
+
+        //- Construct for given model from dictionary
+        Py(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Py();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Pz/Pz.C b/src/rigidBodyDynamics/joints/Pz/Pz.C
new file mode 100644
index 0000000000000000000000000000000000000000..6c90c3679062ccd3ccd4b12483a7c4f55943265f
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Pz/Pz.C
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Pz.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Pz, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Pz,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Pz::Pz()
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 0, 0, 0, 1);
+}
+
+
+Foam::RBD::joints::Pz::Pz(const dictionary& dict)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 0, 0, 0, 1);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Pz::clone() const
+{
+    return autoPtr<joint>(new Pz(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Pz::~Pz()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Pz::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xt(S_[0].l()*q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = S_[0]*qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Pz/Pz.H b/src/rigidBodyDynamics/joints/Pz/Pz.H
new file mode 100644
index 0000000000000000000000000000000000000000..611397ded5dfd1f0ce5ae88093a510b558b803d4
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Pz/Pz.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Pz
+
+Description
+    Prismatic joint for translation along the x-axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Pz.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Pz_H
+#define RBD_joints_Pz_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Pz Declaration
+\*---------------------------------------------------------------------------*/
+
+class Pz
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Pz");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Pz();
+
+        //- Construct for given model from dictionary
+        Pz(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Pz();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Ra/Ra.C b/src/rigidBodyDynamics/joints/Ra/Ra.C
new file mode 100644
index 0000000000000000000000000000000000000000..468985ea67c39da7bc9882f5682767d5c253dca0
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Ra/Ra.C
@@ -0,0 +1,106 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Ra.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Ra, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Ra,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Ra::Ra(const vector& axis)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(axis/mag(axis), Zero);
+}
+
+
+Foam::RBD::joints::Ra::Ra(const dictionary& dict)
+:
+    joint(1)
+{
+    vector axis(dict.lookup("axis"));
+    S_[0] = spatialVector(axis/mag(axis), Zero);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Ra::clone() const
+{
+    return autoPtr<joint>(new Ra(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Ra::~Ra()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Ra::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xr(S_[0].w(), q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = S_[0]*qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+void Foam::RBD::joints::Ra::write(Ostream& os) const
+{
+    joint::write(os);
+    os.writeKeyword("axis")
+        << S_[0].w() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Ra/Ra.H b/src/rigidBodyDynamics/joints/Ra/Ra.H
new file mode 100644
index 0000000000000000000000000000000000000000..cd634f7b89ce4efe2acd0f2d64b84509f43f85e1
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Ra/Ra.H
@@ -0,0 +1,113 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Ra
+
+Description
+    Revolute joint for rotation about the specified arbitrary axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Ra.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Ra_H
+#define RBD_joints_Ra_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Ra Declaration
+\*---------------------------------------------------------------------------*/
+
+class Ra
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Ra");
+
+
+    // Constructors
+
+        //- Construct for given model and axis
+        Ra(const vector& axis);
+
+        //- Construct for given model from dictionary
+        Ra(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Ra();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rs/Rs.C b/src/rigidBodyDynamics/joints/Rs/Rs.C
new file mode 100644
index 0000000000000000000000000000000000000000..da4bd36183ee1a449d5c05a42a8627b59635eb04
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rs/Rs.C
@@ -0,0 +1,113 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Rs.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Rs, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Rs,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rs::Rs()
+:
+    joint(3)
+{
+    S_[0] = spatialVector(1, 0, 0, 0, 0, 0);
+    S_[1] = spatialVector (0, 1, 0, 0, 0, 0);
+    S_[2] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Rs::Rs(const dictionary& dict)
+:
+    joint(3)
+{
+    S_[0] = spatialVector(1, 0, 0, 0, 0, 0);
+    S_[1] = spatialVector (0, 1, 0, 0, 0, 0);
+    S_[2] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Rs::clone() const
+{
+    return autoPtr<joint>(new Rs(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rs::~Rs()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+bool Foam::RBD::joints::Rs::unitQuaternion() const
+{
+    return true;
+}
+
+
+void Foam::RBD::joints::Rs::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X.E() = joint::unitQuaternion(q).R().T();
+    J.X.r() = Zero;
+
+    J.S = Zero;
+    J.S.xx() = 1;
+    J.S.yy() = 1;
+    J.S.zz() = 1;
+
+    J.v = spatialVector(qDot.block<vector>(qIndex_), Zero);
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rs/Rs.H b/src/rigidBodyDynamics/joints/Rs/Rs.H
new file mode 100644
index 0000000000000000000000000000000000000000..f689869056c224c29652693912ca4f747ef11b11
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rs/Rs.H
@@ -0,0 +1,114 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Rs
+
+Description
+    Spherical joint for rotation about the x/y/z-axes using a quaternion
+    (Euler parameters) to avoid gimble-lock.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Rs.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Rs_H
+#define RBD_joints_Rs_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Rs Declaration
+\*---------------------------------------------------------------------------*/
+
+class Rs
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Rs");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Rs();
+
+        //- Construct for given model from dictionary
+        Rs(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Rs();
+
+
+    // Member Functions
+
+        //- Return true as this joint describes rotation using a quaternion
+        virtual bool unitQuaternion() const;
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rx/Rx.C b/src/rigidBodyDynamics/joints/Rx/Rx.C
new file mode 100644
index 0000000000000000000000000000000000000000..e2d3f6953dac5abea32f369894c3df1203370557
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rx/Rx.C
@@ -0,0 +1,98 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Rx.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Rx, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Rx,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rx::Rx()
+:
+    joint(1)
+{
+    S_[0] = spatialVector(1, 0, 0, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Rx::Rx(const dictionary& dict)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(1, 0, 0, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Rx::clone() const
+{
+    return autoPtr<joint>(new Rx(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rx::~Rx()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Rx::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xrx(q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = Zero;
+    J.v.wx() = qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rx/Rx.H b/src/rigidBodyDynamics/joints/Rx/Rx.H
new file mode 100644
index 0000000000000000000000000000000000000000..892cfcb7099b4e4472afdd62f0c66c0b482a4381
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rx/Rx.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Rx
+
+Description
+    Revolute joint for rotation about the x-axis
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Rx.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Rx_H
+#define RBD_joints_Rx_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Rx Declaration
+\*---------------------------------------------------------------------------*/
+
+class Rx
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Rx");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Rx();
+
+        //- Construct for given model from dictionary
+        Rx(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Rx();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rxyz/Rxyz.C b/src/rigidBodyDynamics/joints/Rxyz/Rxyz.C
new file mode 100644
index 0000000000000000000000000000000000000000..2055c674880080ca705a9f73e7e93e3acd9316d4
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rxyz/Rxyz.C
@@ -0,0 +1,141 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Rxyz.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Rxyz, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Rxyz,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rxyz::Rxyz()
+:
+    joint(3)
+{
+    S_[0] = spatialVector(1, 0, 0, 0, 0, 0);
+    S_[1] = spatialVector(0, 1, 0, 0, 0, 0);
+    S_[2] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Rxyz::Rxyz(const dictionary& dict)
+:
+    joint(3)
+{
+    S_[0] = spatialVector(1, 0, 0, 0, 0, 0);
+    S_[1] = spatialVector(0, 1, 0, 0, 0, 0);
+    S_[2] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Rxyz::clone() const
+{
+    return autoPtr<joint>(new Rxyz(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rxyz::~Rxyz()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Rxyz::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    vector qj(q.block<vector>(qIndex_));
+
+    scalar s0 = sin(qj.x());
+    scalar c0 = cos(qj.x());
+    scalar s1 = sin(qj.y());
+    scalar c1 = cos(qj.y());
+    scalar s2 = sin(qj.z());
+    scalar c2 = cos(qj.z());
+
+    J.X.E() = tensor
+    (
+        c2*c1,            s2*c0 + c2*s1*s0, s2*s0 - c2*s1*c0,
+       -s2*c1,            c2*c0 - s2*s1*s0, c2*s0 + s2*s1*c0,
+        s1,              -c1*s0,            c1*c0
+    );
+    J.X.r() = Zero;
+
+    J.S = Zero;
+    J.S.xx() = c2*c1;
+    J.S.xy() = s2;
+    J.S.yx() = -s2*c1;
+    J.S.yy() = c2;
+    J.S.zx() = s1;
+    J.S.zz() = 1;
+
+    vector qDotj(qDot.block<vector>(qIndex_));
+    J.v = J.S & qDotj;
+
+    J.c = spatialVector
+    (
+       -s2*c1*qDotj.z()*qDotj.x()
+      - c2*s1*qDotj.y()*qDotj.x()
+      + c2*qDotj.z()*qDotj.y(),
+
+       -c2*c1*qDotj.z()*qDotj.x()
+      + s2*s1*qDotj.y()*qDotj.x()
+      - s2*qDotj.z()*qDotj.y(),
+
+        c1*qDotj.y()*qDotj.x(),
+
+        0,
+        0,
+        0
+    );
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rxyz/Rxyz.H b/src/rigidBodyDynamics/joints/Rxyz/Rxyz.H
new file mode 100644
index 0000000000000000000000000000000000000000..43582796dee2a3f71b2e1b4e21777bf267d42e75
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rxyz/Rxyz.H
@@ -0,0 +1,111 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Rxyz
+
+Description
+    Spherical joint for rotation about the x/y/z-axes using Euler-angles
+    in the order x, y, z.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Rxyz.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Rxyz_H
+#define RBD_joints_Rxyz_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Rxyz Declaration
+\*---------------------------------------------------------------------------*/
+
+class Rxyz
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Rxyz");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Rxyz();
+
+        //- Construct for given model from dictionary
+        Rxyz(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Rxyz();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Ry/Ry.C b/src/rigidBodyDynamics/joints/Ry/Ry.C
new file mode 100644
index 0000000000000000000000000000000000000000..89d414ecc33e047e4b2872453941dc6abd88a225
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Ry/Ry.C
@@ -0,0 +1,98 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Ry.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Ry, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Ry,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Ry::Ry()
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 1, 0, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Ry::Ry(const dictionary& dict)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 1, 0, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Ry::clone() const
+{
+    return autoPtr<joint>(new Ry(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Ry::~Ry()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Ry::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xry(q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = Zero;
+    J.v.wy() = qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Ry/Ry.H b/src/rigidBodyDynamics/joints/Ry/Ry.H
new file mode 100644
index 0000000000000000000000000000000000000000..0a870bd9254dfd3fc44318dc908e5303b5578e7b
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Ry/Ry.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Ry
+
+Description
+    Revolute joint for rotation about the y-axis
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Ry.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Ry_H
+#define RBD_joints_Ry_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Ry Declaration
+\*---------------------------------------------------------------------------*/
+
+class Ry
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Ry");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Ry();
+
+        //- Construct for given model from dictionary
+        Ry(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Ry();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Ryxz/Ryxz.C b/src/rigidBodyDynamics/joints/Ryxz/Ryxz.C
new file mode 100644
index 0000000000000000000000000000000000000000..fd5f942e3341bfff1c495a6657f12037a4798b49
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Ryxz/Ryxz.C
@@ -0,0 +1,141 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Ryxz.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Ryxz, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Ryxz,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Ryxz::Ryxz()
+:
+    joint(3)
+{
+    S_[0] = spatialVector(0, 1, 0, 0, 0, 0);
+    S_[1] = spatialVector(1, 0, 0, 0, 0, 0);
+    S_[2] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Ryxz::Ryxz(const dictionary& dict)
+:
+    joint(3)
+{
+    S_[0] = spatialVector(0, 1, 0, 0, 0, 0);
+    S_[1] = spatialVector(1, 0, 0, 0, 0, 0);
+    S_[2] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Ryxz::clone() const
+{
+    return autoPtr<joint>(new Ryxz(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Ryxz::~Ryxz()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Ryxz::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    vector qj(q.block<vector>(qIndex_));
+
+    scalar s0 = sin(qj.x());
+    scalar c0 = cos(qj.x());
+    scalar s1 = sin(qj.y());
+    scalar c1 = cos(qj.y());
+    scalar s2 = sin(qj.z());
+    scalar c2 = cos(qj.z());
+
+    J.X.E() = tensor
+    (
+        c2*c0 + s2*s1*s0, s2*c1,           -c2*s0 + s2*s1*c0,
+       -s2*c0 + c2*s1*s0, c2*c1,            s2*s0 + c2*s1*c0,
+        c1*s0,           -s1,               c1*c0
+    );
+    J.X.r() = Zero;
+
+    J.S = Zero;
+    J.S.xx() = s2*c1;
+    J.S.xy() = c2;
+    J.S.yx() = c2*c1;
+    J.S.yy() = -s2;
+    J.S.zx() = -s1;
+    J.S.zz() = 1;
+
+    vector qDotj(qDot.block<vector>(qIndex_));
+    J.v = J.S & qDotj;
+
+    J.c = spatialVector
+    (
+        c2*c1*qDotj.z()*qDotj.x()
+      - s2*s1*qDotj.y()*qDotj.x()
+      - s2*qDotj.z()*qDotj.y(),
+
+       -s2*c1*qDotj.z()*qDotj.x()
+      - c2*s1*qDotj.y()*qDotj.x()
+      - c2*qDotj.z()*qDotj.y(),
+
+       -c1*qDotj.y()*qDotj.x(),
+
+        0,
+        0,
+        0
+    );
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Ryxz/Ryxz.H b/src/rigidBodyDynamics/joints/Ryxz/Ryxz.H
new file mode 100644
index 0000000000000000000000000000000000000000..1371abcf8000938232a8255b9aa8adf8f4e486a0
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Ryxz/Ryxz.H
@@ -0,0 +1,111 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Ryxz
+
+Description
+    Spherical joint for rotation about the x/y/z-axes using Euler-angles
+    in the order y, x, z.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Ryxz.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Ryxz_H
+#define RBD_joints_Ryxz_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Ryxz Declaration
+\*---------------------------------------------------------------------------*/
+
+class Ryxz
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Ryxz");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Ryxz();
+
+        //- Construct for given model from dictionary
+        Ryxz(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Ryxz();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rz/Rz.C b/src/rigidBodyDynamics/joints/Rz/Rz.C
new file mode 100644
index 0000000000000000000000000000000000000000..c02ba9cec12f8de31728c8c9ba24aff8058adace
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rz/Rz.C
@@ -0,0 +1,98 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Rz.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Rz, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Rz,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rz::Rz()
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Rz::Rz(const dictionary& dict)
+:
+    joint(1)
+{
+    S_[0] = spatialVector(0, 0, 1, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Rz::clone() const
+{
+    return autoPtr<joint>(new Rz(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rz::~Rz()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Rz::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    J.X = Xrz(q[qIndex_]);
+    J.S1 = S_[0];
+    J.v = Zero;
+    J.v.wz() = qDot[qIndex_];
+    J.c = Zero;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rz/Rz.H b/src/rigidBodyDynamics/joints/Rz/Rz.H
new file mode 100644
index 0000000000000000000000000000000000000000..01ed3139b0a05cc45ea629859fb14aeba1e977ed
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rz/Rz.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Rz
+
+Description
+    Revolute joint for rotation about the z-axis
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Rz.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Rz_H
+#define RBD_joints_Rz_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Rz Declaration
+\*---------------------------------------------------------------------------*/
+
+class Rz
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Rz");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Rz();
+
+        //- Construct for given model from dictionary
+        Rz(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Rz();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rzyx/Rzyx.C b/src/rigidBodyDynamics/joints/Rzyx/Rzyx.C
new file mode 100644
index 0000000000000000000000000000000000000000..1e359322220fbc6083726ebe504bec66f8cc27b9
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rzyx/Rzyx.C
@@ -0,0 +1,141 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Rzyx.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(Rzyx, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        Rzyx,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rzyx::Rzyx()
+:
+    joint(3)
+{
+    S_[0] = spatialVector(0, 0, 1, 0, 0, 0);
+    S_[1] = spatialVector(0, 1, 0, 0, 0, 0);
+    S_[2] = spatialVector(1, 0, 0, 0, 0, 0);
+}
+
+
+Foam::RBD::joints::Rzyx::Rzyx(const dictionary& dict)
+:
+    joint(3)
+{
+    S_[0] = spatialVector(0, 0, 1, 0, 0, 0);
+    S_[1] = spatialVector(0, 1, 0, 0, 0, 0);
+    S_[2] = spatialVector(1, 0, 0, 0, 0, 0);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Rzyx::clone() const
+{
+    return autoPtr<joint>(new Rzyx(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::Rzyx::~Rzyx()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::Rzyx::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    vector qj(q.block<vector>(qIndex_));
+
+    scalar s0 = sin(qj.x());
+    scalar c0 = cos(qj.x());
+    scalar s1 = sin(qj.y());
+    scalar c1 = cos(qj.y());
+    scalar s2 = sin(qj.z());
+    scalar c2 = cos(qj.z());
+
+    J.X.E() = tensor
+    (
+        c0*c1,            s0*c1,           -s1,
+        c0*s1*s2 - s0*c2, s0*s1*s2 + c0*c2, c1*s2,
+        c0*s1*c2 + s0*s2, s0*s1*c2 - c0*s2, c1*c2
+    );
+    J.X.r() = Zero;
+
+    J.S = Zero;
+    J.S.xx() = -s1;
+    J.S.xz() = 1;
+    J.S.yx() = c1*s2;
+    J.S.yy() = c2;
+    J.S.zx() = c1*c2;
+    J.S.zy() = -s2;
+
+    vector qDotj(qDot.block<vector>(qIndex_));
+    J.v = J.S & qDotj;
+
+    J.c = spatialVector
+    (
+       -c1*qDotj.x()*qDotj.y(),
+
+       -s1*s2*qDotj.x()*qDotj.y()
+      + c1*c2*qDotj.x()*qDotj.z()
+      - s2*qDotj.y()*qDotj.z(),
+
+       -s1*c2*qDotj.x()*qDotj.y()
+      - c1*s2*qDotj.x()*qDotj.z()
+      - c2*qDotj.y()*qDotj.z(),
+
+        0,
+        0,
+        0
+    );
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/Rzyx/Rzyx.H b/src/rigidBodyDynamics/joints/Rzyx/Rzyx.H
new file mode 100644
index 0000000000000000000000000000000000000000..3aeb85dd63780bcab0f05c9de0f115d977904ab7
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/Rzyx/Rzyx.H
@@ -0,0 +1,111 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::Rzyx
+
+Description
+    Spherical joint for rotation about the x/y/z-axes using Euler-angles
+    in the order z, y, x.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    Rzyx.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_Rzyx_H
+#define RBD_joints_Rzyx_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class Rzyx Declaration
+\*---------------------------------------------------------------------------*/
+
+class Rzyx
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("Rzyx");
+
+
+    // Constructors
+
+        //- Construct for given model
+        Rzyx();
+
+        //- Construct for given model from dictionary
+        Rzyx(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~Rzyx();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/composite/compositeJoint.C b/src/rigidBodyDynamics/joints/composite/compositeJoint.C
new file mode 100644
index 0000000000000000000000000000000000000000..a7d1fd887563ba401471323b05202352b9999547
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/composite/compositeJoint.C
@@ -0,0 +1,108 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "compositeJoint.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(composite, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        composite,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
+
+void Foam::RBD::joints::composite::setLastJoint()
+{
+    last().joint::operator=(*this);
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::composite::composite(const PtrList<joint>& joints)
+:
+    PtrList<joint>(joints),
+    joint(last())
+{}
+
+
+Foam::RBD::joints::composite::composite(const dictionary& dict)
+:
+    PtrList<joint>(dict.lookup("joints")),
+    joint(last())
+{}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::composite::clone() const
+{
+    return autoPtr<joint>(new composite(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::composite::~composite()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::composite::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    last().jcalc(J, q, qDot);
+}
+
+
+void Foam::RBD::joints::composite::write(Ostream& os) const
+{
+    joint::write(os);
+    os.writeKeyword("joints");
+    os << static_cast<const PtrList<joint>&>(*this);
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/composite/compositeJoint.H b/src/rigidBodyDynamics/joints/composite/compositeJoint.H
new file mode 100644
index 0000000000000000000000000000000000000000..5d12bf5025d70be05943b4fdaa16d0d7a6b6f7c3
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/composite/compositeJoint.H
@@ -0,0 +1,127 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::composite
+
+Description
+    Prismatic joint for translation along the specified arbitrary axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    composite.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_composite_H
+#define RBD_joints_composite_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+// Forward declaration of classes
+class rigidBodyModel;
+
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class composite Declaration
+\*---------------------------------------------------------------------------*/
+
+class composite
+:
+    public PtrList<joint>,
+    public joint
+{
+    // Private member functions
+
+        //- Set the properties of the last joint following construction
+        //  of the body containing the joint
+        void setLastJoint();
+
+
+public:
+
+    //- Runtime type information
+    TypeName("composite");
+
+    //- Allow the rigidBodyModel class to set the last joint state
+    friend class Foam::RBD::rigidBodyModel;
+
+
+    // Constructors
+
+        //- Construct for given PtrList<joint>
+        composite(const PtrList<joint>& joints);
+
+        //- Construct for given model from dictionary
+        composite(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~composite();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/floating/floatingJoint.C b/src/rigidBodyDynamics/joints/floating/floatingJoint.C
new file mode 100644
index 0000000000000000000000000000000000000000..766e6504f696ba26cad44d6f4f60c094b5fbab3f
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/floating/floatingJoint.C
@@ -0,0 +1,108 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "floatingJoint.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+#include "Rs.H"
+#include "Rzyx.H"
+#include "Pxyz.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(floating, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        floating,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::joints::composite>
+Foam::RBD::joints::floating::sixDoF()
+{
+    PtrList<joint> cj(2);
+    cj.set(0, new joints::Pxyz());
+
+    // The quaternion-based spherical joint could be used
+    // but then w must be set appropriately
+    //cj.set(1, new joints::Rs());
+
+    // Alternatively the Euler-angle joint can be used
+    cj.set(1, new joints::Rzyx());
+
+    return autoPtr<composite>(new composite(cj));
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::floating::floating()
+:
+    composite(sixDoF())
+{}
+
+
+Foam::RBD::joints::floating::floating(const dictionary& dict)
+:
+    composite(sixDoF())
+{}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::floating::clone() const
+{
+    return autoPtr<joint>(new floating(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::floating::~floating()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::floating::write(Ostream& os) const
+{
+    joint::write(os);
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/floating/floatingJoint.H b/src/rigidBodyDynamics/joints/floating/floatingJoint.H
new file mode 100644
index 0000000000000000000000000000000000000000..58c314d7840ad18e21540ba18276e485c64c56d0
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/floating/floatingJoint.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::floating
+
+Description
+    Prismatic joint for translation along the specified arbitrary axis.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    floating.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_floating_H
+#define RBD_joints_floating_H
+
+#include "compositeJoint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class floating Declaration
+\*---------------------------------------------------------------------------*/
+
+class floating
+:
+    public composite
+{
+    // Private member functions
+
+        //- Return a list of joints needed to emulate a floating body
+        static autoPtr<composite> sixDoF();
+
+
+public:
+
+    //- Runtime type information
+    TypeName("floating");
+
+
+    // Constructors
+
+        //- Construct
+        floating();
+
+        //- Construct for given model from dictionary
+        floating(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~floating();
+
+
+    // Member Functions
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/joint/joint.C b/src/rigidBodyDynamics/joints/joint/joint.C
new file mode 100644
index 0000000000000000000000000000000000000000..f13ee347ea9ffd7500b133a5a4f020e271a590de
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/joint/joint.C
@@ -0,0 +1,87 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "joint.H"
+#include "rigidBodyModel.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(joint, 0);
+    defineRunTimeSelectionTable(joint, dictionary);
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joint::New(joint* jointPtr)
+{
+    return autoPtr<joint>(jointPtr);
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joint::New
+(
+    const dictionary& dict
+)
+{
+    const word bodyType(dict.lookup("type"));
+
+    dictionaryConstructorTable::iterator cstrIter =
+        dictionaryConstructorTablePtr_->find(bodyType);
+
+    if (cstrIter == dictionaryConstructorTablePtr_->end())
+    {
+        FatalErrorInFunction
+            << "Unknown joint type "
+            << bodyType << nl << nl
+            << "Valid joint types are : " << endl
+            << dictionaryConstructorTablePtr_->sortedToc()
+            << exit(FatalError);
+    }
+
+    return autoPtr<joint>(cstrIter()(dict));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joint::~joint()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joint::write(Ostream& os) const
+{
+    os.writeKeyword("type") << type() << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/joint/joint.H b/src/rigidBodyDynamics/joints/joint/joint.H
new file mode 100644
index 0000000000000000000000000000000000000000..0ea00b678bcd0699eaa16bd109caabcfd7ce40c2
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/joint/joint.H
@@ -0,0 +1,270 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Namespace
+    Foam::RBD::joints
+
+Description
+    Namespace for rigid-body joints
+
+Class
+    Foam::RBD::joint
+
+Description
+    Abstract base-class for all rigid-body joints.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    jointI.H
+    joint.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joint_H
+#define RBD_joint_H
+
+#include "List.H"
+#include "spatialVector.H"
+#include "compactSpatialTensor.H"
+#include "CompactSpatialTensorT.H"
+#include "spatialTransform.H"
+#include "quaternion.H"
+#include "scalarField.H"
+#include "runTimeSelectionTables.H"
+
+namespace Foam
+{
+namespace RBD
+{
+
+// Forward declaration of classes
+class rigidBodyModel;
+
+// Forward declaration of friend functions and operators
+class joint;
+
+inline Ostream& operator<<(Ostream&, const joint&);
+
+
+/*---------------------------------------------------------------------------*\
+                         Class joint Declaration
+\*---------------------------------------------------------------------------*/
+
+class joint
+{
+
+protected:
+
+    // Protected data
+
+    //- Joint motion sub-space
+    List<spatialVector> S_;
+
+    //- Index of this joint in the rigidBodyModel
+    label index_;
+
+    //- Index of this joints data in the rigidBodyModel state
+    label qIndex_;
+
+
+private:
+
+    // Private member functions to be used by rigidBodyModel
+
+        //- Allow the rigidBodyModel to set the index for this joint
+        label& index()
+        {
+            return index_;
+        }
+
+        //- Allow the rigidBodyModel to set the qIndex for this joint
+        label& qIndex()
+        {
+            return qIndex_;
+        }
+
+
+public:
+
+    //- Allow the rigidBodyModel class to set the joint indices
+    friend class rigidBodyModel;
+
+    //- Joint state returned by jcalc
+    class XSvc
+    {
+    public:
+
+        //- The joint transformation
+        spatialTransform X;
+
+        //- The joint motion sub-space (3-DoF)
+        compactSpatialTensor S;
+
+        //- The joint motion sub-space (1-DoF)
+        spatialVector S1;
+
+        //- The constrained joint velocity
+        spatialVector v;
+
+        //- The constrained joint acceleration correction
+        //  due to changes in the motion sub-space S
+        spatialVector c;
+
+        //- Null constructor
+        XSvc()
+        :
+            X(),
+            v(Zero),
+            c(Zero)
+        {}
+    };
+
+
+public:
+
+    //- Runtime type information
+    TypeName("joint");
+
+
+    // Declare run-time constructor selection table
+
+        declareRunTimeSelectionTable
+        (
+            autoPtr,
+            joint,
+            dictionary,
+            (const dictionary& dict),
+            (dict)
+        );
+
+
+    // Constructors
+
+        //- Construct joint setting the size of the motion sub-space
+        //  to the given degrees of freedom of the joint
+        inline joint(const label nDoF);
+
+        //- Clone this joint (needed by PtrList)
+        virtual autoPtr<joint> clone() const = 0;
+
+        class iNew
+        {
+
+        public:
+
+            iNew()
+            {}
+
+            inline autoPtr<joint> operator()(Istream& is) const;
+        };
+
+
+    //- Destructor
+    virtual ~joint();
+
+
+    // Selectors
+
+        //- Simple selector to return an autoPtr<joint> of the given joint*
+        static autoPtr<joint> New(joint* jointPtr);
+
+        //- Select from dictionary
+        static autoPtr<joint> New(const dictionary& dict);
+
+
+    // Member Functions
+
+        //- Return the number of degrees of freedom in this joint
+        inline label nDoF() const;
+
+        //- Return true if this joint describes rotation using a quaternion
+        inline virtual bool unitQuaternion() const;
+
+        //- Return the index of this joint in the model
+        inline label index() const;
+
+        //- Return start index for the state variables for this joint
+        //  in the rigidBodyModel state fields
+        inline label qIndex() const;
+
+        //- Return the joint motion sub-space
+        inline const List<spatialVector>& S() const;
+
+        //- Update the rigidBodyModel state for the joint given
+        //  the joint state q, w and velocity qDot
+        virtual void jcalc
+        (
+            XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const = 0;
+
+        //- Write
+        virtual void write(Ostream&) const;
+
+
+    // Member Operators
+
+        //- Return the unit quaternion for this joint
+        //  if it uses a quaternion representation for rotation
+        inline quaternion unitQuaternion
+        (
+            const scalarField& q
+        ) const;
+
+        //- Set the unit quaternion for this joint
+        //  if it uses a quaternion representation for rotation
+        inline void unitQuaternion
+        (
+            const quaternion& quat,
+            scalarField& q
+        ) const;
+
+
+    // Ostream Operator
+
+        friend Ostream& operator<<(Ostream&, const joint&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "jointI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/joint/jointI.H b/src/rigidBodyDynamics/joints/joint/jointI.H
new file mode 100644
index 0000000000000000000000000000000000000000..eb6e36a2ca8408c1505eaad0a46f1a752cafa2bc
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/joint/jointI.H
@@ -0,0 +1,123 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::joint::joint(const label nDoF)
+:
+    S_(nDoF),
+    index_(0),
+    qIndex_(0)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline Foam::label Foam::RBD::joint::nDoF() const
+{
+    return S_.size();
+}
+
+inline bool Foam::RBD::joint::unitQuaternion() const
+{
+    return false;
+}
+
+inline Foam::label Foam::RBD::joint::index() const
+{
+    return index_;
+}
+
+inline Foam::label Foam::RBD::joint::qIndex() const
+{
+    return qIndex_;
+}
+
+inline const Foam::List<Foam::spatialVector>& Foam::RBD::joint::S() const
+{
+    return S_;
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+inline Foam::quaternion Foam::RBD::joint::unitQuaternion
+(
+    const scalarField& q
+) const
+{
+    if (!unitQuaternion())
+    {
+        FatalErrorInFunction
+            << "Attempt to get the quaternion for a non-spherical joint"
+            << abort(FatalError);
+    }
+
+    return quaternion::unit(q.block<vector>(qIndex_));
+}
+
+
+inline void Foam::RBD::joint::unitQuaternion
+(
+    const quaternion& quat,
+    scalarField& q
+) const
+{
+    if (!unitQuaternion())
+    {
+        FatalErrorInFunction
+            << "Attempt to set quaternion for a non-spherical joint"
+            << abort(FatalError);
+    }
+
+    q[qIndex_] = quat.v().x();
+    q[qIndex_+1] = quat.v().y();
+    q[qIndex_+2] = quat.v().z();
+}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joint::iNew::operator()
+(
+    Istream& is
+) const
+{
+    dictionary dict(is);
+    return New(dict);
+}
+
+
+// * * * * * * * * * * * * * * * Ostream Operator  * * * * * * * * * * * * * //
+
+inline Foam::Ostream& Foam::RBD::operator<<(Ostream& os, const joint& j)
+{
+    os  << indent << token::BEGIN_BLOCK << incrIndent << endl;
+    j.write(os);
+    os  << decrIndent << indent << token::END_BLOCK;
+
+    return os;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/joints.H b/src/rigidBodyDynamics/joints/joints.H
new file mode 100644
index 0000000000000000000000000000000000000000..b95829646b4ca3e7388740a70ae466aac56c04cd
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/joints.H
@@ -0,0 +1,25 @@
+// Null joint for the root-body
+#include "nullJoint.H"
+
+// Composite joint to handle combination of rotations and translations
+#include "compositeJoint.H"
+
+// 6-DoF joint for floating bodies
+#include "floatingJoint.H"
+
+// Revolute joints
+#include "Rx.H"
+#include "Ry.H"
+#include "Rz.H"
+#include "Ra.H"
+#include "Rs.H"
+#include "Rzyx.H"
+#include "Rxyz.H"
+#include "Ryxz.H"
+
+// Prismatic joints
+#include "Px.H"
+#include "Py.H"
+#include "Pz.H"
+#include "Pa.H"
+#include "Pxyz.H"
diff --git a/src/rigidBodyDynamics/joints/null/nullJoint.C b/src/rigidBodyDynamics/joints/null/nullJoint.C
new file mode 100644
index 0000000000000000000000000000000000000000..baed48767f6a7c7b48440eba8e7caac6b8b65799
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/null/nullJoint.C
@@ -0,0 +1,92 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "nullJoint.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+    defineTypeNameAndDebug(null, 0);
+
+    addToRunTimeSelectionTable
+    (
+        joint,
+        null,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::null::null()
+:
+    joint(0)
+{}
+
+
+Foam::RBD::joints::null::null(const dictionary& dict)
+:
+    joint(0)
+{}
+
+
+Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::null::clone() const
+{
+    return autoPtr<joint>(new null(*this));
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::joints::null::~null()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::joints::null::jcalc
+(
+    joint::XSvc& J,
+    const scalarField& q,
+    const scalarField& qDot
+) const
+{
+    FatalErrorInFunction
+        << "Cannot calculate the state of a null-joint"
+        << abort(FatalError);
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/joints/null/nullJoint.H b/src/rigidBodyDynamics/joints/null/nullJoint.H
new file mode 100644
index 0000000000000000000000000000000000000000..cc97aed72bc7952f075174a1f9c820f14d6aae33
--- /dev/null
+++ b/src/rigidBodyDynamics/joints/null/nullJoint.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::joints::null
+
+Description
+    Null joint for the root-body.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    nullJoint.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_joints_null_H
+#define RBD_joints_null_H
+
+#include "joint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace joints
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class null Declaration
+\*---------------------------------------------------------------------------*/
+
+class null
+:
+    public joint
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("null");
+
+
+    // Constructors
+
+        //- Construct for given model
+        null();
+
+        //- Construct for given model from dictionary
+        null(const dictionary& dict);
+
+        //- Clone this joint
+        virtual autoPtr<joint> clone() const;
+
+
+    //- Destructor
+    virtual ~null();
+
+
+    // Member Functions
+
+        //- Update the model state for this joint
+        virtual void jcalc
+        (
+            joint::XSvc& J,
+            const scalarField& q,
+            const scalarField& qDot
+        ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace joints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
new file mode 100644
index 0000000000000000000000000000000000000000..8f0b6143e5cea8844309f5cf2be741667a626f77
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
@@ -0,0 +1,201 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "linearAxialAngularSpring.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+    defineTypeNameAndDebug(linearAxialAngularSpring, 0);
+
+    addToRunTimeSelectionTable
+    (
+        restraint,
+        linearAxialAngularSpring,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::linearAxialAngularSpring::linearAxialAngularSpring
+(
+    const word& name,
+    const dictionary& dict,
+    const rigidBodyModel& model
+)
+:
+    restraint(name, dict, model)
+{
+    read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::linearAxialAngularSpring::~linearAxialAngularSpring()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::restraints::linearAxialAngularSpring::restrain
+(
+    scalarField& tau,
+    Field<spatialVector>& fx
+) const
+{
+    vector refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 1, 0);
+
+    vector oldDir = refQ_ & refDir;
+    vector newDir = model_.X0(bodyID_).E() & refDir;
+
+    if (mag(oldDir & axis_) > 0.95 || mag(newDir & axis_) > 0.95)
+    {
+        // Directions close to the axis, changing reference
+        refDir = rotationTensor(vector(1, 0, 0), axis_) & vector(0, 0, 1);
+        oldDir = refQ_ & refDir;
+        newDir = model_.X0(bodyID_).E() & refDir;
+    }
+
+    // Removing axis component from oldDir and newDir and normalising
+    oldDir -= (axis_ & oldDir)*axis_;
+    oldDir /= (mag(oldDir) + VSMALL);
+
+    newDir -= (axis_ & newDir)*axis_;
+    newDir /= (mag(newDir) + VSMALL);
+
+    scalar theta = mag(acos(min(oldDir & newDir, 1.0)));
+
+    // Temporary axis with sign information
+    vector a = (oldDir ^ newDir);
+
+    // Ensure a is in direction of axis
+    a = (a & axis_)*axis_;
+
+    scalar magA = mag(a);
+
+    if (magA > VSMALL)
+    {
+        a /= magA;
+    }
+    else
+    {
+        a = Zero;
+    }
+
+    // Damping of along axis angular velocity only
+    vector moment
+    (
+        -(
+            stiffness_*theta
+          + damping_*(model_.v(model_.master(bodyID_)).w() & a)
+         )*a
+    );
+
+    if (model_.debug)
+    {
+        Info<< " angle " << theta*sign(a & axis_)
+            << " moment " << moment
+            << endl;
+    }
+
+    // Accumulate the force for the restrained body
+    fx[bodyIndex_] += spatialVector(moment, Zero);
+}
+
+
+bool Foam::RBD::restraints::linearAxialAngularSpring::read
+(
+    const dictionary& dict
+)
+{
+    restraint::read(dict);
+
+    refQ_ = coeffs_.lookupOrDefault<tensor>("referenceOrientation", I);
+
+    if (mag(mag(refQ_) - sqrt(3.0)) > 1e-9)
+    {
+        FatalErrorInFunction
+            << "referenceOrientation " << refQ_ << " is not a rotation tensor. "
+            << "mag(referenceOrientation) - sqrt(3) = "
+            << mag(refQ_) - sqrt(3.0) << nl
+            << exit(FatalError);
+    }
+
+    axis_ = coeffs_.lookup("axis");
+
+    scalar magAxis(mag(axis_));
+
+    if (magAxis > VSMALL)
+    {
+        axis_ /= magAxis;
+    }
+    else
+    {
+        FatalErrorInFunction
+            << "axis has zero length"
+            << abort(FatalError);
+    }
+
+    coeffs_.lookup("stiffness") >> stiffness_;
+    coeffs_.lookup("damping") >> damping_;
+
+    return true;
+}
+
+
+void Foam::RBD::restraints::linearAxialAngularSpring::write
+(
+    Ostream& os
+) const
+{
+    restraint::write(os);
+
+    os.writeKeyword("referenceOrientation")
+        << refQ_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("axis")
+        << axis_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("stiffness")
+        << stiffness_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("damping")
+        << damping_ << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.H b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.H
new file mode 100644
index 0000000000000000000000000000000000000000..66b34e0df79c621ffb3ef4d8bd17e266175a2916
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.H
@@ -0,0 +1,130 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::restraints::linearAxialAngularSpring
+
+Description
+    Linear axial angular spring restraint.
+
+SourceFiles
+    linearAxialAngularSpring.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef linearAxialAngularSpring_H
+#define linearAxialAngularSpring_H
+
+#include "rigidBodyRestraint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+
+/*---------------------------------------------------------------------------*\
+                   Class linearAxialAngularSpring Declaration
+\*---------------------------------------------------------------------------*/
+
+class linearAxialAngularSpring
+:
+    public restraint
+{
+    // Private data
+
+        //- Reference orientation where there is no moment
+        tensor refQ_;
+
+        //- Global unit axis around which the motion is sprung
+        vector axis_;
+
+        //- Spring stiffness coefficient [Nm/rad]
+        scalar stiffness_;
+
+        //- Damping coefficient [Nms/rad]
+        scalar damping_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("linearAxialAngularSpring");
+
+
+    // Constructors
+
+        //- Construct from components
+        linearAxialAngularSpring
+        (
+            const word& name,
+            const dictionary& dict,
+            const rigidBodyModel& model
+        );
+
+        //- Construct and return a clone
+        virtual autoPtr<restraint> clone() const
+        {
+            return autoPtr<restraint>
+            (
+                new linearAxialAngularSpring(*this)
+            );
+        }
+
+
+    //- Destructor
+    virtual ~linearAxialAngularSpring();
+
+
+    // Member Functions
+
+        //- Accumulate the retraint internal joint forces into the tau field and
+        //  external forces into the fx field
+        virtual void restrain
+        (
+            scalarField& tau,
+            Field<spatialVector>& fx
+        ) const;
+
+        //- Update properties from given dictionary
+        virtual bool read(const dictionary& dict);
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C
new file mode 100644
index 0000000000000000000000000000000000000000..d3e4e063da47e91283415b6ee135ea4076c597b0
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C
@@ -0,0 +1,117 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "linearDamper.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+    defineTypeNameAndDebug(linearDamper, 0);
+
+    addToRunTimeSelectionTable
+    (
+        restraint,
+        linearDamper,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::linearDamper::linearDamper
+(
+    const word& name,
+    const dictionary& dict,
+    const rigidBodyModel& model
+)
+:
+    restraint(name, dict, model)
+{
+    read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::linearDamper::~linearDamper()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::restraints::linearDamper::restrain
+(
+    scalarField& tau,
+    Field<spatialVector>& fx
+) const
+{
+    vector force = -coeff_*model_.v(model_.master(bodyID_)).l();
+
+    if (model_.debug)
+    {
+        Info<< " force " << force << endl;
+    }
+
+    // Accumulate the force for the restrained body
+    fx[bodyIndex_] += spatialVector(Zero, force);
+}
+
+
+bool Foam::RBD::restraints::linearDamper::read
+(
+    const dictionary& dict
+)
+{
+    restraint::read(dict);
+
+    coeffs_.lookup("coeff") >> coeff_;
+
+    return true;
+}
+
+
+void Foam::RBD::restraints::linearDamper::write
+(
+    Ostream& os
+) const
+{
+    restraint::write(os);
+
+    os.writeKeyword("coeff")
+        << coeff_ << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.H b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.H
new file mode 100644
index 0000000000000000000000000000000000000000..c0a2c3728824cfd67570f1a5abeb1bb7841c2d20
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.H
@@ -0,0 +1,121 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::restraints::linearDamper
+
+Description
+    Linear damper restraint.  Operates in the local frame of the body.
+
+SourceFiles
+    linearDamper.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_restraints_linearDamper_H
+#define RBD_restraints_linearDamper_H
+
+#include "rigidBodyRestraint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+
+/*---------------------------------------------------------------------------*\
+                          Class linearDamper Declaration
+\*---------------------------------------------------------------------------*/
+
+class linearDamper
+:
+    public restraint
+{
+    // Private data
+
+        //- Damping coefficient [Ns/m]
+        scalar coeff_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("linearDamper");
+
+
+    // Constructors
+
+        //- Construct from components
+        linearDamper
+        (
+            const word& name,
+            const dictionary& dict,
+            const rigidBodyModel& model
+        );
+
+        //- Construct and return a clone
+        virtual autoPtr<restraint> clone() const
+        {
+            return autoPtr<restraint>
+            (
+                new linearDamper(*this)
+            );
+        }
+
+
+    //- Destructor
+    virtual ~linearDamper();
+
+
+    // Member Functions
+
+        //- Accumulate the retraint internal joint forces into the tau field and
+        //  external forces into the fx field
+        virtual void restrain
+        (
+            scalarField& tau,
+            Field<spatialVector>& fx
+        ) const;
+
+        //- Update properties from given dictionary
+        virtual bool read(const dictionary& dict);
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace restraints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C
new file mode 100644
index 0000000000000000000000000000000000000000..9449d60042d059fc05731bf72efee029df292ebb
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.C
@@ -0,0 +1,154 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "linearSpring.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+    defineTypeNameAndDebug(linearSpring, 0);
+
+    addToRunTimeSelectionTable
+    (
+        restraint,
+        linearSpring,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::linearSpring::linearSpring
+(
+    const word& name,
+    const dictionary& dict,
+    const rigidBodyModel& model
+)
+:
+    restraint(name, dict, model)
+{
+    read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::linearSpring::~linearSpring()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::restraints::linearSpring::restrain
+(
+    scalarField& tau,
+    Field<spatialVector>& fx
+) const
+{
+    point attachmentPt = bodyPoint(refAttachmentPt_);
+
+    // Current axis of the spring
+    vector r = attachmentPt - anchor_;
+    scalar magR = mag(r);
+    r /= (magR + VSMALL);
+
+    // Velocity of the attached end of the spring
+    vector v = bodyPointVelocity(refAttachmentPt_).l();
+
+    // Force and moment on the master body including optional damping
+    vector force
+    (
+        (-stiffness_*(magR - restLength_) - damping_*(r & v))*r
+    );
+
+    vector moment(attachmentPt ^ force);
+
+    if (model_.debug)
+    {
+        Info<< " attachmentPt " << attachmentPt
+            << " attachmentPt - anchor " << r*magR
+            << " spring length " << magR
+            << " force " << force
+            << " moment " << moment
+            << endl;
+    }
+
+    // Accumulate the force for the restrained body
+    fx[bodyIndex_] += spatialVector(moment, force);
+}
+
+
+bool Foam::RBD::restraints::linearSpring::read
+(
+    const dictionary& dict
+)
+{
+    restraint::read(dict);
+
+    coeffs_.lookup("anchor") >> anchor_;
+    coeffs_.lookup("refAttachmentPt") >> refAttachmentPt_;
+    coeffs_.lookup("stiffness") >> stiffness_;
+    coeffs_.lookup("damping") >> damping_;
+    coeffs_.lookup("restLength") >> restLength_;
+
+    return true;
+}
+
+
+void Foam::RBD::restraints::linearSpring::write
+(
+    Ostream& os
+) const
+{
+    restraint::write(os);
+
+    os.writeKeyword("anchor")
+        << anchor_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("refAttachmentPt")
+        << refAttachmentPt_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("stiffness")
+        << stiffness_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("damping")
+        << damping_ << token::END_STATEMENT << nl;
+
+    os.writeKeyword("restLength")
+        << restLength_ << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.H b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.H
new file mode 100644
index 0000000000000000000000000000000000000000..b7a90f77d0049965bb28bc536c6d90871a6d7749
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/linearSpring/linearSpring.H
@@ -0,0 +1,134 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::restraints::linearSpring
+
+Description
+    Linear spring restraint.
+
+SourceFiles
+    linearSpring.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_restraints_linearSpring_H
+#define RBD_restraints_linearSpring_H
+
+#include "rigidBodyRestraint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+
+/*---------------------------------------------------------------------------*\
+                          Class linearSpring Declaration
+\*---------------------------------------------------------------------------*/
+
+class linearSpring
+:
+    public restraint
+{
+    // Private data
+
+        //- Anchor point, where the spring is attached to an immovable
+        //  object
+        point anchor_;
+
+        //- Reference point of attachment to the solid body
+        point refAttachmentPt_;
+
+        //- Spring stiffness coefficient [N/m]
+        scalar stiffness_;
+
+        //- Damping coefficient [Ns/m]
+        scalar damping_;
+
+        //- Rest length - length of spring when no forces are applied to it
+        scalar restLength_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("linearSpring");
+
+
+    // Constructors
+
+        //- Construct from components
+        linearSpring
+        (
+            const word& name,
+            const dictionary& dict,
+            const rigidBodyModel& model
+        );
+
+        //- Construct and return a clone
+        virtual autoPtr<restraint> clone() const
+        {
+            return autoPtr<restraint>
+            (
+                new linearSpring(*this)
+            );
+        }
+
+
+    //- Destructor
+    virtual ~linearSpring();
+
+
+    // Member Functions
+
+        //- Accumulate the retraint internal joint forces into the tau field and
+        //  external forces into the fx field
+        virtual void restrain
+        (
+            scalarField& tau,
+            Field<spatialVector>& fx
+        ) const;
+
+        //- Update properties from given dictionary
+        virtual bool read(const dictionary& dict);
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace restraints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C
new file mode 100644
index 0000000000000000000000000000000000000000..be56e7b08428123362d065ccf0eb7cd4c343bf14
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.C
@@ -0,0 +1,88 @@
+/*---------------------------------------------------------------------------* \
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyRestraint.H"
+#include "rigidBodyModel.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(restraint, 0);
+    defineRunTimeSelectionTable(restraint, dictionary);
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::restraint::restraint
+(
+    const word& name,
+    const dictionary& dict,
+    const rigidBodyModel& model
+)
+:
+    name_(name),
+    bodyID_(model.bodyID(dict.lookup("body"))),
+    bodyIndex_(model.master(bodyID_)),
+    coeffs_(dict),
+    model_(model)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::restraint::~restraint()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+const Foam::dictionary& Foam::RBD::restraint::coeffDict() const
+{
+    return coeffs_;
+}
+
+
+bool Foam::RBD::restraint::read(const dictionary& dict)
+{
+    coeffs_ = dict;
+    return true;
+}
+
+
+void Foam::RBD::restraint::write(Ostream& os) const
+{
+    os.writeKeyword("type")
+        << type() << token::END_STATEMENT << nl;
+    os.writeKeyword("body")
+        << model_.name(bodyID_) << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.H b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.H
new file mode 100644
index 0000000000000000000000000000000000000000..acb392de163a40c915a21d0f390813ec00382c17
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraint.H
@@ -0,0 +1,192 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Namespace
+    Foam::RBD::restraints
+
+Description
+    Namespace for rigid-body dynamics restraints
+
+Class
+    Foam::RBD::restraint
+
+Description
+    Base class for defining restraints for rigid-body dynamics
+
+SourceFiles
+    rigidBodyRestraint.C
+    rigidBodyRestraintNew.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_rigidBodyRestraint_H
+#define RBD_rigidBodyRestraint_H
+
+#include "dictionary.H"
+#include "autoPtr.H"
+#include "spatialVector.H"
+#include "point.H"
+#include "scalarField.H"
+#include "runTimeSelectionTables.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+// Forward declaration of classes
+class rigidBodyModel;
+
+/*---------------------------------------------------------------------------*\
+                Class restraint Declaration
+\*---------------------------------------------------------------------------*/
+
+class restraint
+{
+
+protected:
+
+    // Protected data
+
+        //- Name of the restraint
+        word name_;
+
+        //- ID of the body the restraint is applied to
+        label bodyID_;
+
+        //- Index of the body the force is applied to
+        label bodyIndex_;
+
+        //- Restraint model specific coefficient dictionary
+        dictionary coeffs_;
+
+        //- Reference to the model
+        const rigidBodyModel& model_;
+
+        //- Transform the given point on the restrained body to the global frame
+        inline point bodyPoint(const point& p) const;
+
+        //- Transform the velocity of the given point on the restrained body
+        //  to the global frame
+        inline spatialVector bodyPointVelocity(const point& p) const;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("restraint");
+
+
+    // Declare run-time constructor selection table
+
+        declareRunTimeSelectionTable
+        (
+            autoPtr,
+            restraint,
+            dictionary,
+            (
+                const word& name,
+                const dictionary& dict,
+                const rigidBodyModel& model
+            ),
+            (name, dict, model)
+        );
+
+
+    // Constructors
+
+        //- Construct from the dict dictionary and Time
+        restraint
+        (
+            const word& name,
+            const dictionary& dict,
+            const rigidBodyModel& model
+        );
+
+        //- Construct and return a clone
+        virtual autoPtr<restraint> clone() const = 0;
+
+
+    // Selectors
+
+        //- Select constructed from the dict dictionary and Time
+        static autoPtr<restraint> New
+        (
+            const word& name,
+            const dictionary& dict,
+            const rigidBodyModel& model
+        );
+
+
+    //- Destructor
+    virtual ~restraint();
+
+
+    // Member Functions
+
+        //- Return the name
+        const word& name() const
+        {
+            return name_;
+        }
+
+        label bodyID() const
+        {
+            return bodyID_;
+        }
+
+        //- Accumulate the retraint internal joint forces into the tau field and
+        //  external forces into the fx field
+        virtual void restrain
+        (
+            scalarField& tau,
+            Field<spatialVector>& fx
+        ) const = 0;
+
+        //- Update properties from given dictionary
+        virtual bool read(const dictionary& dict);
+
+        //- Return access to coeffs
+        const dictionary& coeffDict() const;
+
+        //- Write
+        virtual void write(Ostream&) const = 0;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyRestraintI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintI.H b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintI.H
new file mode 100644
index 0000000000000000000000000000000000000000..11679170c49ff70bb2beffd4b93d8eb99656c2f4
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintI.H
@@ -0,0 +1,48 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyModel.H"
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline Foam::point Foam::RBD::restraint::bodyPoint
+(
+    const point& p
+) const
+{
+    return (model_.X0(bodyID_).inv() && spatialVector(Zero, p)).l();
+}
+
+
+inline Foam::spatialVector Foam::RBD::restraint::bodyPointVelocity
+(
+    const point& p
+) const
+{
+    return model_.v(bodyID_, p);
+}
+
+
+// ************************************************************************* //
diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C
similarity index 58%
rename from src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C
rename to src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C
index fdb53965c760420f39db1f67395706771fc7e593..ee8e0f2f1c844e8a7bc65e8d018d81cedf37bb05 100644
--- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C
+++ b/src/rigidBodyDynamics/restraints/restraint/rigidBodyRestraintNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,33 +23,34 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "IOdictionary.H"
-#include "Pstream.H"
+#include "rigidBodyRestraint.H"
 
-// * * * * * * * * * * * * * * * Members Functions * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
-bool Foam::IOdictionary::readData(Istream& is)
+Foam::autoPtr<Foam::RBD::restraint>
+Foam::RBD::restraint::New
+(
+    const word& name,
+    const dictionary& dict,
+    const rigidBodyModel& model
+)
 {
-    is >> *this;
+    const word restraintType(dict.lookup("type"));
 
-    if (writeDictionaries && Pstream::master() && !is.bad())
+    dictionaryConstructorTable::iterator cstrIter =
+        dictionaryConstructorTablePtr_->find(restraintType);
+
+    if (cstrIter == dictionaryConstructorTablePtr_->end())
     {
-        Sout<< nl
-            << "--- IOdictionary " << name()
-            << ' ' << objectPath() << ":" << nl;
-        writeHeader(Sout);
-        writeData(Sout);
-        Sout<< "--- End of IOdictionary " << name() << nl << endl;
+        FatalErrorInFunction
+            << "Unknown restraint type "
+            << restraintType << nl << nl
+            << "Valid restraint types are : " << endl
+            << dictionaryConstructorTablePtr_->sortedToc()
+            << exit(FatalError);
     }
 
-    return !is.bad();
-}
-
-
-bool Foam::IOdictionary::writeData(Ostream& os) const
-{
-    dictionary::write(os, false);
-    return os.good();
+    return autoPtr<restraint>(cstrIter()(name, dict, model));
 }
 
 
diff --git a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C
new file mode 100644
index 0000000000000000000000000000000000000000..8ef17486b78232b6b3d104b8a7e3bbf7441c078e
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C
@@ -0,0 +1,116 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "sphericalAngularDamper.H"
+#include "rigidBodyModel.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+    defineTypeNameAndDebug(sphericalAngularDamper, 0);
+
+    addToRunTimeSelectionTable
+    (
+        restraint,
+        sphericalAngularDamper,
+        dictionary
+    );
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::sphericalAngularDamper::sphericalAngularDamper
+(
+    const word& name,
+    const dictionary& dict,
+    const rigidBodyModel& model
+)
+:
+    restraint(name, dict, model)
+{
+    read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::restraints::sphericalAngularDamper::~sphericalAngularDamper()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::restraints::sphericalAngularDamper::restrain
+(
+    scalarField& tau,
+    Field<spatialVector>& fx
+) const
+{
+    vector moment = -coeff_*model_.v(model_.master(bodyID_)).w();
+
+    if (model_.debug)
+    {
+        Info<< " moment " << moment << endl;
+    }
+
+    // Accumulate the force for the restrained body
+    fx[bodyIndex_] += spatialVector(moment, Zero);
+}
+
+
+bool Foam::RBD::restraints::sphericalAngularDamper::read
+(
+    const dictionary& dict
+)
+{
+    restraint::read(dict);
+
+    coeffs_.lookup("coeff") >> coeff_;
+
+    return true;
+}
+
+
+void Foam::RBD::restraints::sphericalAngularDamper::write
+(
+    Ostream& os
+) const
+{
+    restraint::write(os);
+
+    os.writeKeyword("coeff") << coeff_ << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.H b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.H
new file mode 100644
index 0000000000000000000000000000000000000000..ccff2ff660863913966f7477b95ec12f00c9ef09
--- /dev/null
+++ b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.H
@@ -0,0 +1,122 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::restraints::sphericalAngularDamper
+
+Description
+    Spherical angular damper restraint.
+    Operates in the local frame of the body.
+
+SourceFiles
+    sphericalAngularDamper.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef sphericalAngularDamper_H
+#define sphericalAngularDamper_H
+
+#include "rigidBodyRestraint.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace restraints
+{
+
+/*---------------------------------------------------------------------------*\
+                   Class sphericalAngularDamper Declaration
+\*---------------------------------------------------------------------------*/
+
+class sphericalAngularDamper
+:
+    public restraint
+{
+    // Private data
+
+        //- Damping coefficient [Nms/rad]
+        scalar coeff_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("sphericalAngularDamper");
+
+
+    // Constructors
+
+        //- Construct from components
+        sphericalAngularDamper
+        (
+            const word& name,
+            const dictionary& dict,
+            const rigidBodyModel& model
+        );
+
+        //- Construct and return a clone
+        virtual autoPtr<restraint> clone() const
+        {
+            return autoPtr<restraint>
+            (
+                new sphericalAngularDamper(*this)
+            );
+        }
+
+
+    //- Destructor
+    virtual ~sphericalAngularDamper();
+
+
+    // Member Functions
+
+        //- Accumulate the retraint internal joint forces into the tau field and
+        //  external forces into the fx field
+        virtual void restrain
+        (
+            scalarField& tau,
+            Field<spatialVector>& fx
+        ) const;
+
+        //- Update properties from given dictionary
+        virtual bool read(const dictionary& dict);
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace restraints
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertia.H b/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertia.H
new file mode 100644
index 0000000000000000000000000000000000000000..44cc221c143660aa4428178117ab8c6f9d11e44a
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertia.H
@@ -0,0 +1,178 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::rigidBodyInertia
+
+Description
+    This class represents the linear and angular inertia of a rigid body
+    by the mass, centre of mass and moment of inertia tensor about the
+    centre of mass.
+
+    Reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+    \endverbatim
+
+SourceFiles
+    rigidBodyInertiaI.H
+    rigidBodyInertia.C
+    rigidBodyInertiaIO.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_rigidBodyInertia_H
+#define RBD_rigidBodyInertia_H
+
+#include "vector.H"
+#include "symmTensor.H"
+#include "spatialVector.H"
+#include "spatialTensor.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of classes
+class Istream;
+class Ostream;
+
+namespace RBD
+{
+
+// Forward declaration of friend functions and operators
+class rigidBodyInertia;
+Istream& operator>>(Istream&, rigidBodyInertia&);
+Ostream& operator<<(Ostream&, const rigidBodyInertia&);
+
+
+/*---------------------------------------------------------------------------*\
+                         Class rigidBodyInertia Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBodyInertia
+{
+    // Private data
+
+        //- Mass of the rigid-body
+        scalar m_;
+
+        //- Centre of mass of the rigid-body
+        vector c_;
+
+        //- Inertia tensor about the centre of mass
+        symmTensor Ic_;
+
+
+public:
+
+    // Static member functions
+
+        //- Return the difference between the inertia tensor of the rigid-body
+        //  about the origin - about the centre of mass
+        //  for the given mass and centre of mass
+        inline static symmTensor Ioc(const scalar m, const vector& c);
+
+
+    // Constructors
+
+        //- Null constructor, initializes to zero
+        inline rigidBodyInertia();
+
+        //- Construct from mass, centre of mass and moment of inertia tensor
+        //  about the centre of mass
+        inline rigidBodyInertia
+        (
+            const scalar m,
+            const vector& c,
+            const symmTensor& Ic
+        );
+
+        //- Construct from dictionary
+        inline rigidBodyInertia(const dictionary& dict);
+
+        //- Construct from the components of a spatial tensor
+        inline explicit rigidBodyInertia(const spatialTensor& st);
+
+        //- Construct from Istream
+        inline explicit rigidBodyInertia(Istream& is);
+
+
+    // Member Functions
+
+        //- Return the mass of the rigid-body
+        inline scalar m() const;
+
+        //- Return the centre of mass of the rigid-body
+        inline const vector& c() const;
+
+        //- Return the inertia tensor of the rigid-body about the centre of mass
+        inline const symmTensor& Ic() const;
+
+        //- Return the difference between the inertia tensor of the rigid-body
+        //  about the origin - about the centre of mass
+        inline symmTensor Ioc() const;
+
+        //- Return the difference between the inertia tensor of the rigid-body
+        //  about the a new centre of mass - about the current centre of mass
+        inline symmTensor Icc(const vector& c) const;
+
+        //- Return the inertia tensor of the rigid-body about the origin
+        inline symmTensor Io() const;
+
+        //- Return the kinetic energy of the body with the given velocity
+        inline scalar kineticEnergy(const spatialVector& v);
+
+
+    // Member Operators
+
+        //- Conversion to spatial tensor
+        inline operator spatialTensor() const;
+
+        inline void operator+=(const rigidBodyInertia&);
+
+
+    // IOstream Operators
+
+        friend Istream& operator>>(Istream&, rigidBodyInertia&);
+        friend Ostream& operator<<(Ostream&, const rigidBodyInertia&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyInertiaI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H b/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H
new file mode 100644
index 0000000000000000000000000000000000000000..78d74db2155bee7f3ac5af158f7e41df5be76457
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyInertia/rigidBodyInertiaI.H
@@ -0,0 +1,252 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "spatialTransform.H"
+#include "transform.H"
+#include "dictionary.H"
+
+// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
+
+inline Foam::symmTensor Foam::RBD::rigidBodyInertia::Ioc
+(
+    const scalar m,
+    const vector& c
+)
+{
+    return m*(Foam::I*magSqr(c) - sqr(c));
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::RBD::rigidBodyInertia::rigidBodyInertia()
+:
+    m_(0),
+    c_(Zero),
+    Ic_(Zero)
+{}
+
+
+inline Foam::RBD::rigidBodyInertia::rigidBodyInertia
+(
+    const scalar m,
+    const vector& c,
+    const symmTensor& Ic
+)
+:
+    m_(m),
+    c_(c),
+    Ic_(Ic)
+{}
+
+
+inline Foam::RBD::rigidBodyInertia::rigidBodyInertia(const dictionary& dict)
+:
+    m_(readScalar(dict.lookup("mass"))),
+    c_(dict.lookup("centreOfMass")),
+    Ic_(dict.lookup("inertia"))
+{}
+
+
+inline Foam::RBD::rigidBodyInertia::rigidBodyInertia(const spatialTensor& st)
+:
+    m_(st(3, 3)),
+    c_(vector(-st(1, 5), st(0, 5), -st(0, 4))/m_),
+    Ic_(symm(st.block<tensor, 0, 0>()()) - Ioc())
+{}
+
+
+inline Foam::RBD::rigidBodyInertia::rigidBodyInertia(Istream& is)
+:
+    m_(readScalar(is)),
+    c_(is),
+    Ic_(is)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline Foam::scalar Foam::RBD::rigidBodyInertia::m() const
+{
+    return m_;
+}
+
+inline const Foam::vector& Foam::RBD::rigidBodyInertia::c() const
+{
+    return c_;
+}
+
+inline const Foam::symmTensor& Foam::RBD::rigidBodyInertia::Ic() const
+{
+    return Ic_;
+}
+
+inline Foam::symmTensor Foam::RBD::rigidBodyInertia::Ioc() const
+{
+    return Ioc(m_, c_);
+}
+
+inline Foam::symmTensor Foam::RBD::rigidBodyInertia::Icc(const vector& c) const
+{
+    return Ioc(m_, c - c_);
+}
+
+inline Foam::symmTensor Foam::RBD::rigidBodyInertia::Io() const
+{
+    return Ic_ + Ioc();
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+inline Foam::RBD::rigidBodyInertia::operator spatialTensor() const
+{
+    tensor mcStar(m_*(*c_));
+
+    return spatialTensor
+    (
+        Io(),   mcStar,
+       -mcStar, m_*I
+    );
+}
+
+
+// * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * * //
+
+inline Foam::Istream& Foam::RBD::operator>>
+(
+    Istream& is,
+    rigidBodyInertia& rbi
+)
+{
+    is  >> rbi.m_ >> rbi.c_ >> rbi.Ic_;
+    return is;
+}
+
+
+inline Foam::Ostream& Foam::RBD::operator<<
+(
+    Ostream& os,
+    const rigidBodyInertia& rbi
+)
+{
+    os  << rbi.m_ << nl << rbi.c_ << nl << rbi.Ic_ << endl;
+    return os;
+}
+
+
+// * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+//- Return the rigid-body inertia of the combined body
+inline rigidBodyInertia operator+
+(
+    const rigidBodyInertia& rbi1,
+    const rigidBodyInertia& rbi2
+)
+{
+    const scalar m12 = rbi1.m() + rbi2.m();
+    const vector c12 = (rbi1.m()*rbi1.c() + rbi2.m()*rbi2.c())/m12;
+
+    return rigidBodyInertia
+    (
+        m12,
+        c12,
+        rbi1.Ic() + rbi1.Icc(c12) + rbi2.Ic() + rbi2.Icc(c12)
+    );
+}
+
+
+//- Inner-product with a spatialVector (e.g. velocity returning the momentum)
+inline spatialVector operator&
+(
+    const rigidBodyInertia& rbi,
+    const spatialVector& sv
+)
+{
+    const vector av(sv.w());
+    const vector lv(sv.l());
+
+    return spatialVector
+    (
+        (rbi.Io() & av) + rbi.m()*(rbi.c() ^ lv),
+        rbi.m()*lv - rbi.m()*(rbi.c() ^ av)
+    );
+}
+
+
+//- Return (^BX_A)^* I ^AX_B
+inline rigidBodyInertia transform
+(
+    const spatialTransform& X,
+    const rigidBodyInertia& I
+)
+{
+    const vector Xc((X.E().T() & I.c()) + X.r());
+
+    return rigidBodyInertia
+    (
+        I.m(),
+        Xc,
+        transform(X.E().T(), I.Ic())
+    );
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline Foam::scalar Foam::RBD::rigidBodyInertia::kineticEnergy
+(
+    const spatialVector& v
+)
+{
+    return 0.5*(v && (*this & v));
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+inline void Foam::RBD::rigidBodyInertia::operator+=
+(
+    const rigidBodyInertia& rbi
+)
+{
+    *this = *this + rbi;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModel/forwardDynamics.C b/src/rigidBodyDynamics/rigidBodyModel/forwardDynamics.C
new file mode 100644
index 0000000000000000000000000000000000000000..97d837abb5ca87023bcdb1bb0f68b1c2622c3560
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModel/forwardDynamics.C
@@ -0,0 +1,264 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyModel.H"
+#include "rigidBodyModelState.H"
+#include "rigidBodyRestraint.H"
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodyModel::applyRestraints
+(
+    scalarField& tau,
+    Field<spatialVector>& fx
+) const
+{
+    if (restraints_.empty())
+    {
+        return;
+    }
+
+    forAll(restraints_, ri)
+    {
+        DebugInfo << "Restraint " << restraints_[ri].name();
+
+        // Accumulate the restraint forces
+        restraints_[ri].restrain(tau, fx);
+    }
+}
+
+
+void Foam::RBD::rigidBodyModel::forwardDynamics
+(
+    rigidBodyModelState& state,
+    const scalarField& tau,
+    const Field<spatialVector>& fx
+) const
+{
+    const scalarField& q = state.q();
+    const scalarField& qDot = state.qDot();
+    scalarField& qDdot = state.qDdot();
+
+    DebugInFunction
+        << "q = " << q << nl
+        << "qDot = " << qDot << nl
+        << "tau = " << tau << endl;
+
+    // Joint state returned by jcalc
+    joint::XSvc J;
+
+    v_[0] = Zero;
+
+    for (label i=1; i<nBodies(); i++)
+    {
+        const joint& jnt = joints()[i];
+        jnt.jcalc(J, q, qDot);
+
+        S_[i] = J.S;
+        S1_[i] = J.S1;
+
+        Xlambda_[i] = J.X & XT_[i];
+
+        const label lambdai = lambda_[i];
+
+        if (lambdai != 0)
+        {
+            X0_[i] = Xlambda_[i] & X0_[lambdai];
+        }
+        else
+        {
+            X0_[i] = Xlambda_[i];
+        }
+
+        v_[i] = (Xlambda_[i] & v_[lambdai]) + J.v;
+        c_[i] = J.c + (v_[i] ^ J.v);
+        IA_[i] = I(i);
+        pA_[i] = v_[i] ^* (I(i) & v_[i]);
+
+        if (fx.size())
+        {
+            pA_[i] -= *X0_[i] & fx[i];
+        }
+    }
+
+    for (label i=nBodies()-1; i>0; i--)
+    {
+        const joint& jnt = joints()[i];
+        const label qi = jnt.qIndex();
+
+        if (jnt.nDoF() == 1)
+        {
+            U1_[i] = IA_[i] & S1_[i];
+            Dinv_[i].xx() = 1/(S1_[i] && U1_[i]);
+            u_[i].x() = tau[qi] - (S1_[i] && pA_[i]);
+
+            const label lambdai = lambda_[i];
+
+            if (lambdai != 0)
+            {
+                const spatialTensor Ia
+                (
+                    IA_[i] - (U1_[i]*(Dinv_[i].xx()*U1_[i]))
+                );
+
+                const spatialVector pa
+                (
+                    pA_[i] + (Ia & c_[i]) + U1_[i]*(Dinv_[i].xx()*u_[i].x())
+                );
+
+                IA_[lambdai] +=
+                    spatialTensor(Xlambda_[i].T())
+                  & Ia
+                  & spatialTensor(Xlambda_[i]);
+
+                pA_[lambdai] += Xlambda_[i].T() & pa;
+            }
+        }
+        else
+        {
+            U_[i] = IA_[i] & S_[i];
+            Dinv_[i] = (S_[i].T() & U_[i]).inv();
+
+            u_[i] = tau.block<vector>(qi) - (S_[i].T() & pA_[i]);
+
+            const label lambdai = lambda_[i];
+
+            if (lambdai != 0)
+            {
+                spatialTensor Ia
+                (
+                    IA_[i]
+                  - (U_[i] & Dinv_[i] & U_[i].T())
+                );
+
+                spatialVector pa
+                (
+                    pA_[i]
+                  + (Ia & c_[i])
+                  + (U_[i] & Dinv_[i] & u_[i])
+                );
+
+                IA_[lambdai] +=
+                    spatialTensor(Xlambda_[i].T())
+                  & Ia
+                  & spatialTensor(Xlambda_[i]);
+
+                pA_[lambdai] += Xlambda_[i].T() & pa;
+            }
+        }
+    }
+
+    a_[0] = spatialVector(Zero, -g_);
+
+    for (label i=1; i<nBodies(); i++)
+    {
+        const joint& jnt = joints()[i];
+        const label qi = jnt.qIndex();
+
+        a_[i] = (Xlambda_[i] & a_[lambda_[i]]) + c_[i];
+
+        if (jnt.nDoF() == 1)
+        {
+            qDdot[qi] = Dinv_[i].xx()*(u_[i].x() - (U1_[i] && a_[i]));
+            a_[i] += S1_[i]*qDdot[qi];
+        }
+        else
+        {
+            vector qDdoti(Dinv_[i] & (u_[i] - (U_[i].T() & a_[i])));
+
+            // Need to add mutable "block<vector>" to Field
+            qDdot[qi] = qDdoti.x();
+            qDdot[qi+1] = qDdoti.y();
+            qDdot[qi+2] = qDdoti.z();
+
+            a_[i] += (S_[i] & qDdoti);
+        }
+    }
+
+    DebugInfo
+        << "qDdot = " << qDdot << nl
+        << "a = " << a_ << endl;
+}
+
+
+void Foam::RBD::rigidBodyModel::forwardDynamicsCorrection
+(
+    const rigidBodyModelState& state
+) const
+{
+    DebugInFunction << endl;
+
+    const scalarField& q = state.q();
+    const scalarField& qDot = state.qDot();
+    const scalarField& qDdot = state.qDdot();
+
+    // Joint state returned by jcalc
+    joint::XSvc J;
+
+    v_[0] = Zero;
+    a_[0] = spatialVector(Zero, -g_);
+
+    for (label i=1; i<nBodies(); i++)
+    {
+        const joint& jnt = joints()[i];
+        const label qi = jnt.qIndex();
+
+        jnt.jcalc(J, q, qDot);
+
+        S_[i] = J.S;
+        S1_[i] = J.S1;
+
+        Xlambda_[i] = J.X & XT_[i];
+
+        const label lambdai = lambda_[i];
+
+        if (lambdai != 0)
+        {
+            X0_[i] = Xlambda_[i] & X0_[lambdai];
+        }
+        else
+        {
+            X0_[i] = Xlambda_[i];
+        }
+
+        v_[i] = (Xlambda_[i] & v_[lambdai]) + J.v;
+        c_[i] = J.c + (v_[i] ^ J.v);
+        a_[i] = (Xlambda_[i] & a_[lambdai]) + c_[i];
+
+        if (jnt.nDoF() == 1)
+        {
+            a_[i] += S1_[i]*qDdot[qi];
+        }
+        else
+        {
+            a_[i] += S_[i] & qDdot.block<vector>(qi);
+        }
+    }
+
+    DebugInfo<< "a = " << a_ << endl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C
new file mode 100644
index 0000000000000000000000000000000000000000..aebfb762edcbea4e4b59df797da6c597ccee6b9a
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.C
@@ -0,0 +1,474 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyModel.H"
+#include "masslessBody.H"
+#include "compositeBody.H"
+#include "jointBody.H"
+#include "nullJoint.H"
+#include "rigidBodyRestraint.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+    defineTypeNameAndDebug(rigidBodyModel, 0);
+}
+}
+
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodyModel::initializeRootBody()
+{
+    bodies_.append(new masslessBody("root"));
+    lambda_.append(0);
+    bodyIDs_.insert("root", 0);
+    joints_.append(new joints::null());
+    XT_.append(spatialTransform());
+
+    nDoF_ = 0;
+    unitQuaternions_ = false;
+
+    resizeState();
+}
+
+
+void Foam::RBD::rigidBodyModel::resizeState()
+{
+    Xlambda_.append(spatialTransform());
+    X0_.append(spatialTransform());
+
+    v_.append(Zero);
+    a_.append(Zero);
+    c_.append(Zero);
+
+    IA_.append(spatialTensor::I);
+    pA_.append(Zero);
+
+    S_.append(Zero);
+    S1_.append(Zero);
+    U_.append(Zero);
+    U1_.append(Zero);
+    Dinv_.append(Zero);
+    u_.append(Zero);
+}
+
+
+void Foam::RBD::rigidBodyModel::addRestraints
+(
+    const dictionary& dict
+)
+{
+    if (dict.found("restraints"))
+    {
+        const dictionary& restraintDict = dict.subDict("restraints");
+
+        label i = 0;
+
+        restraints_.setSize(restraintDict.size());
+
+        forAllConstIter(IDLList<entry>, restraintDict, iter)
+        {
+            if (iter().isDict())
+            {
+                restraints_.set
+                (
+                    i++,
+                    restraint::New
+                    (
+                        iter().keyword(),
+                        iter().dict(),
+                        *this
+                    )
+                );
+            }
+        }
+
+        restraints_.setSize(i);
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodyModel::rigidBodyModel()
+:
+    g_(Zero)
+{
+    initializeRootBody();
+}
+
+
+Foam::RBD::rigidBodyModel::rigidBodyModel(const dictionary& dict)
+:
+    g_(Zero)
+{
+    initializeRootBody();
+
+    const dictionary& bodiesDict = dict.subDict("bodies");
+
+    forAllConstIter(IDLList<entry>, bodiesDict, iter)
+    {
+        const dictionary& bodyDict = iter().dict();
+
+        if (bodyDict.found("mergeWith"))
+        {
+            merge
+            (
+                bodyID(bodyDict.lookup("mergeWith")),
+                bodyDict.lookup("transform"),
+                rigidBody::New(iter().keyword(), bodyDict)
+            );
+        }
+        else
+        {
+            join
+            (
+                bodyID(bodyDict.lookup("parent")),
+                bodyDict.lookup("transform"),
+                joint::New(bodyDict.subDict("joint")),
+                rigidBody::New(iter().keyword(), bodyDict)
+            );
+        }
+    }
+
+    // Read the restraints and any other re-readable settings.
+    read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodyModel::~rigidBodyModel()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+Foam::label Foam::RBD::rigidBodyModel::join_
+(
+    const label parentID,
+    const spatialTransform& XT,
+    autoPtr<joint> jointPtr,
+    autoPtr<rigidBody> bodyPtr
+)
+{
+    // Append the body
+    const rigidBody& body = bodyPtr();
+    bodies_.append(bodyPtr);
+    const label bodyID = nBodies()-1;
+    bodyIDs_.insert(body.name(), bodyID);
+
+    // If the parentID refers to a merged body find the parent into which it has
+    // been merged and set lambda and XT accordingly
+    if (merged(parentID))
+    {
+        const subBody& sBody = mergedBody(parentID);
+        lambda_.append(sBody.masterID());
+        XT_.append(XT & sBody.masterXT());
+    }
+    else
+    {
+        lambda_.append(parentID);
+        XT_.append(XT);
+    }
+
+    // Append the joint
+    const joint& prevJoint = joints_[joints_.size() - 1];
+    joints_.append(jointPtr);
+    joint& curJoint = joints_[joints_.size() - 1];
+    curJoint.index() = joints_.size() - 1;
+    curJoint.qIndex() = prevJoint.qIndex() + prevJoint.nDoF();
+
+    // Increment the degrees of freedom
+    nDoF_ += curJoint.nDoF();
+    unitQuaternions_ = unitQuaternions_ || curJoint.unitQuaternion();
+
+    resizeState();
+
+    return bodyID;
+}
+
+
+Foam::label Foam::RBD::rigidBodyModel::join
+(
+    const label parentID,
+    const spatialTransform& XT,
+    autoPtr<joint> jointPtr,
+    autoPtr<rigidBody> bodyPtr
+)
+{
+    if (isA<joints::composite>(jointPtr()))
+    {
+        return join
+        (
+            parentID,
+            XT,
+            autoPtr<joints::composite>
+            (
+                dynamic_cast<joints::composite*>(jointPtr.ptr())
+            ),
+            bodyPtr
+        );
+    }
+    else
+    {
+        return join_
+        (
+            parentID,
+            XT,
+            jointPtr,
+            bodyPtr
+        );
+    }
+}
+
+
+Foam::label Foam::RBD::rigidBodyModel::join
+(
+    const label parentID,
+    const spatialTransform& XT,
+    autoPtr<joints::composite> cJointPtr,
+    autoPtr<rigidBody> bodyPtr
+)
+{
+    label parent = parentID;
+    joints::composite& cJoint = cJointPtr();
+
+    // For all but the final joint in the set add a jointBody with the
+    // joint and transform
+    for (label j=0; j<cJoint.size()-1; j++)
+    {
+        parent = join_
+        (
+            parent,
+            j == 0 ? XT : spatialTransform(),
+            cJoint[j].clone(),
+            autoPtr<rigidBody>(new jointBody)
+        );
+    }
+
+    // For the final joint in the set add the real body
+    parent = join_
+    (
+        parent,
+        cJoint.size() == 1 ? XT : spatialTransform(),
+        autoPtr<joint>(cJointPtr.ptr()),
+        bodyPtr
+    );
+
+    // Set the properties of the last joint in the list to those set
+    // by rigidBodyModel
+    cJoint.setLastJoint();
+
+    return parent;
+}
+
+
+void Foam::RBD::rigidBodyModel::makeComposite(const label bodyID)
+{
+    if (!isA<compositeBody>(bodies_[bodyID]))
+    {
+        // Retrieve the un-merged body
+        autoPtr<rigidBody> bodyPtr = bodies_.set(bodyID, NULL);
+
+        // Insert the compositeBody containing the original body
+        bodies_.set
+        (
+            bodyID,
+            new compositeBody(bodyPtr)
+        );
+    }
+}
+
+
+Foam::label Foam::RBD::rigidBodyModel::merge
+(
+    const label parentID,
+    const spatialTransform& XT,
+    autoPtr<rigidBody> bodyPtr
+)
+{
+    autoPtr<subBody> sBodyPtr;
+
+    // If the parentID refers to a merged body find the parent into which it has
+    // been merged and merge this on into the same parent with the appropriate
+    // transform
+    if (merged(parentID))
+    {
+        const subBody& sBody = mergedBody(parentID);
+
+        makeComposite(sBody.masterID());
+
+        sBodyPtr.set
+        (
+            new subBody
+            (
+                bodyPtr,
+                bodies_[sBody.masterID()].name(),
+                sBody.masterID(),
+                XT & sBody.masterXT()
+            )
+        );
+    }
+    else
+    {
+        makeComposite(parentID);
+
+        sBodyPtr.set
+        (
+            new subBody
+            (
+                bodyPtr,
+                bodies_[parentID].name(),
+                parentID,
+                XT
+            )
+        );
+    }
+
+    const subBody& sBody = sBodyPtr();
+    mergedBodies_.append(sBodyPtr);
+
+    // Merge the sub-body with the parent
+    bodies_[sBody.masterID()].merge(sBody);
+
+    const label sBodyID = mergedBodyID(mergedBodies_.size() - 1);
+    bodyIDs_.insert(sBody.name(), sBodyID);
+
+    return sBodyID;
+}
+
+
+Foam::spatialTransform Foam::RBD::rigidBodyModel::X0
+(
+    const label bodyId
+) const
+{
+    if (merged(bodyId))
+    {
+        const subBody& mBody = mergedBody(bodyId);
+        return mBody.masterXT() & X0_[mBody.masterID()];
+    }
+    else
+    {
+        return X0_[bodyId];
+    }
+}
+
+
+void Foam::RBD::rigidBodyModel::write(Ostream& os) const
+{
+    os  << indent << "bodies" << nl
+        << indent << token::BEGIN_BLOCK << incrIndent << nl;
+
+    // Write the moving bodies
+    for (label i=1; i<nBodies(); i++)
+    {
+        // Do not write joint-bodies created automatically to support elements
+        // of composite joints
+        if (!isType<jointBody>(bodies_[i]))
+        {
+            os  << indent << bodies_[i].name() << nl
+                << indent << token::BEGIN_BLOCK << incrIndent << endl;
+
+            bodies_[i].write(os);
+
+            os.writeKeyword("parent")
+                << bodies_[lambda_[i]].name() << token::END_STATEMENT << nl;
+
+            os.writeKeyword("transform")
+                << XT_[i] << token::END_STATEMENT << nl;
+
+            os  << indent << "joint" << nl << joints_[i] << endl;
+
+            os  << decrIndent << indent << token::END_BLOCK << endl;
+        }
+    }
+
+    // Write the bodies merged into the parent bodies for efficiency
+    forAll(mergedBodies_, i)
+    {
+        os  << indent << mergedBodies_[i].name() << nl
+            << indent << token::BEGIN_BLOCK << incrIndent << endl;
+
+        mergedBodies_[i].body().write(os);
+
+        os.writeKeyword("transform")
+            << mergedBodies_[i].masterXT() << token::END_STATEMENT << nl;
+
+        os.writeKeyword("mergeWith")
+            << mergedBodies_[i].masterName() << token::END_STATEMENT << nl;
+
+        os  << decrIndent << indent << token::END_BLOCK << endl;
+    }
+
+    os  << decrIndent << indent << token::END_BLOCK << nl;
+
+
+    if (!restraints_.empty())
+    {
+        os  << indent << "restraints" << nl
+            << indent << token::BEGIN_BLOCK << incrIndent << nl;
+
+        forAll(restraints_, ri)
+        {
+            word restraintType = restraints_[ri].type();
+
+            os  << indent << restraints_[ri].name() << nl
+                << indent << token::BEGIN_BLOCK << incrIndent << endl;
+
+            restraints_[ri].write(os);
+
+            os  << decrIndent << indent << token::END_BLOCK << endl;
+        }
+
+        os  << decrIndent << indent << token::END_BLOCK << nl;
+    }
+}
+
+
+bool Foam::RBD::rigidBodyModel::read(const dictionary& dict)
+{
+    restraints_.clear();
+    addRestraints(dict);
+
+    return true;
+}
+
+
+// * * * * * * * * * * * * * * * Ostream Operator  * * * * * * * * * * * * * //
+
+Foam::Ostream& Foam::RBD::operator<<(Ostream& os, const rigidBodyModel& rbm)
+{
+    rbm.write(os);
+    return os;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.H b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.H
new file mode 100644
index 0000000000000000000000000000000000000000..d7d8f8e5b9a1aba0f16b36405bc116013618c758
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModel.H
@@ -0,0 +1,372 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodyModel
+
+Description
+    Basic rigid-body model representing a system of rigid-bodies connected by
+    1-6 DoF joints.
+
+    This class holds various body and joint state fields needed by the
+    kinematics and forward-dynamics algorithms presented in
+
+    reference:
+    \verbatim
+        Featherstone, R. (2008).
+        Rigid body dynamics algorithms.
+        Springer.
+        Chapter 4.
+    \endverbatim
+
+SourceFiles
+    rigidBodyModel.C
+    kinematics.C
+    forwardDynamics.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_rigidBodyModel_H
+#define RBD_rigidBodyModel_H
+
+#include "rigidBody.H"
+#include "subBody.H"
+#include "joint.H"
+#include "compositeJoint.H"
+#include "PtrList.H"
+#include "HashTable.H"
+
+namespace Foam
+{
+namespace RBD
+{
+
+// Forward declaration of friend functions and operators
+class rigidBodyModel;
+
+Ostream& operator<<(Ostream&, const rigidBodyModel&);
+
+class rigidBodyModelState;
+class restraint;
+
+
+/*---------------------------------------------------------------------------*\
+                         Class rigidBodyModel Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBodyModel
+{
+    // Private member functions
+
+        //- Initialize the model with the root-body
+        //  which is a fixed massless bodyat the origin.
+        void initializeRootBody();
+
+        //- Resize the state fields following the joining of a body
+        void resizeState();
+
+        //- Convert the body with given ID into a composite-body
+        void makeComposite(const label bodyID);
+
+        //- Add restraints to the motion
+        void addRestraints(const dictionary& dict);
+
+protected:
+
+    // Protected data representing the model structure
+
+        //- List of the bodies.
+        //  The 0'th body represents the fixed origin and is constructed
+        //  automatically.  The subsequent (moving) bodies are appended by the
+        //  join member function.
+        PtrList<rigidBody> bodies_;
+
+        //- Bodies may be merged into existing bodies, the inertia of which is
+        //  updated to represent the combined body which is more efficient than
+        //  attaching them with fixed joints.  These 'merged' bodies are held on
+        //  this list.
+        PtrList<subBody> mergedBodies_;
+
+        //- Lookup-table of the IDs of the bodies
+        HashTable<label, word> bodyIDs_;
+
+        //- List of indices of the parent of each body
+        DynamicList<label> lambda_;
+
+        //- Each body it attached with a joint which are held on this list.
+        PtrList<joint> joints_;
+
+        //- Transform from the parent body frame to the joint frame.
+        DynamicList<spatialTransform> XT_;
+
+        //- The number of degrees of freedom of the model
+        //  used to set the size of the of joint state fields q, qDot and qDdot.
+        label nDoF_;
+
+        //- True if any of the joints using quaternions
+        bool unitQuaternions_;
+
+        //- Motion restraints
+        PtrList<restraint> restraints_;
+
+
+    // Other protected member data
+
+        //- Acceleration due to gravity
+        vector g_;
+
+
+    // Mutable transforms maintained by kinematics and forward-dynamics
+
+        //- Transform from the parent body to the current body
+        mutable DynamicList<spatialTransform> Xlambda_;
+
+        //- Transform for external forces to the bodies reference frame
+        mutable DynamicList<spatialTransform> X0_;
+
+
+    // Mutable kinematic body state fields
+
+        //- The spatial velocity of the bodies
+        mutable DynamicList<spatialVector> v_;
+
+        //- The spatial acceleration of the bodies
+        mutable DynamicList<spatialVector> a_;
+
+        //- The velocity dependent spatial acceleration of the joints
+        mutable DynamicList<spatialVector> c_;
+
+
+    // Mutable state fields needed by the forward-dynamics algorithm
+
+        //- Velocity-product acceleration
+
+        //- Articulated body inertia
+        mutable DynamicList<spatialTensor> IA_;
+
+        //- Articulated body bias force
+        mutable DynamicList<spatialVector> pA_;
+
+
+    // Mutable joint state fields
+
+        //- Motion subspace for joints with 3 degrees of freedom
+        mutable DynamicList<compactSpatialTensor> S_;
+
+        //- Motion subspace for joints with 1 degrees of freedom
+        mutable DynamicList<spatialVector> S1_;
+
+        //- Sub-expression IA.S in the forward-dynamics algorithm
+        mutable DynamicList<compactSpatialTensor> U_;
+
+        //- Sub-expression IA.S1 in the forward-dynamics algorithm
+        mutable DynamicList<spatialVector> U1_;
+
+        //- Sub-expression (S^T.U)^-1 in the forward-dynamics algorithm
+        mutable DynamicList<tensor> Dinv_;
+
+        //- Sub-expression tau - S^T.pA in the forward-dynamics algorithm
+        mutable DynamicList<vector> u_;
+
+
+    // Protected member functions
+
+        //- Join the given body to the parent with ID parentID via the given
+        //  joint with transform from the parent frame to the joint frame XT.
+        virtual label join_
+        (
+            const label parentID,
+            const spatialTransform& XT,
+            autoPtr<joint> jointPtr,
+            autoPtr<rigidBody> bodyPtr
+        );
+
+
+public:
+
+    //- Runtime type information
+    TypeName("rigidBodyModel");
+
+
+    // Constructors
+
+        //- Null-constructor which adds the single root-body at the origin
+        rigidBodyModel();
+
+        //- Construct from dictionary
+        rigidBodyModel(const dictionary& dict);
+
+
+    //- Destructor
+    virtual ~rigidBodyModel();
+
+
+    // Member Functions
+
+        //- Return the number of bodies in the model (bodies().size())
+        inline label nBodies() const;
+
+        //- Return the list of the bodies in the model
+        inline PtrList<rigidBody> bodies() const;
+
+        //- List of indices of the parent of each body
+        inline const DynamicList<label>& lambda() const;
+
+        //- Return the list of joints in the model
+        inline const PtrList<joint>& joints() const;
+
+        //- Return the number of degrees of freedom of the model
+        //  used to set the size of the of joint state fields q, qDot and qDdot.
+        inline label nDoF() const;
+
+        //- Return true if any of the joints using quaternions
+        inline bool unitQuaternions() const;
+
+        //- Return the acceleration due to gravity
+        inline const vector& g() const;
+
+        //- Allow the acceleration due to gravity to be set
+        //  after model construction
+        inline vector& g();
+
+        //- Return the name of body with the given ID
+        inline const word& name(const label bodyID) const;
+
+        //- Return the inertia of body i
+        inline const rigidBodyInertia& I(const label i) const;
+
+        //- Return the spatial velocity of the bodies
+        inline const spatialVector& v(const label i) const;
+
+        //- Join the given body to the parent with ID parentID via the given
+        //  joint with transform from the parent frame to the joint frame XT.
+        virtual label join
+        (
+            const label parentID,
+            const spatialTransform& XT,
+            autoPtr<joint> jointPtr,
+            autoPtr<rigidBody> bodyPtr
+        );
+
+        //- Join the given body to the parent with ID parentID via the given
+        //  composite joint (specified as a list of co-located joints) with
+        //  transform from the parent frame to the joint frame XT.
+        //  Composite joins are useful to represent complex joints with degrees
+        //  of freedom other than 1 or 3 which are directly supported.
+        label join
+        (
+            const label parentID,
+            const spatialTransform& XT,
+            autoPtr<joints::composite> cJoint,
+            autoPtr<rigidBody> bodyPtr
+        );
+
+        //- Merge the given body with transform X into the parent with ID
+        //  parentID.  The parent body assumes the properties of the combined
+        //  body (inertia etc.) and the merged body is held on a
+        //  separate list for reference.
+        label merge
+        (
+            const label parentID,
+            const spatialTransform& X,
+            autoPtr<rigidBody> bodyPtr
+        );
+
+        //- Return true if the body with given ID has been merged with a parent
+        inline bool merged(label bodyID) const;
+
+        //- Return the ID of the master body for a sub-body otherwise
+        //  return the given body ID
+        inline label master(label bodyID) const;
+
+        //- Return the index of the merged body in the mergedBody list
+        //  from the given body ID
+        inline label mergedBodyIndex(const label mergedBodyID) const;
+
+        //- Return the merged body ID for the given merged body index
+        //  in the mergedBody list
+        inline label mergedBodyID(const label mergedBodyIndex) const;
+
+        //- Return the merged body for the given body ID
+        inline const subBody& mergedBody(label mergedBodyID) const;
+
+        //- Return the ID of the body with the given name
+        inline label bodyID(const word& name) const;
+
+        //- Return the current transform to the global frame for the given body
+        spatialTransform X0(const label bodyId) const;
+
+        // Find the corresponding point in the master body frame
+        vector masterPoint(const label bodyID, const vector& p) const;
+
+        //- Return the velocity of the given point on the given body
+        spatialVector v(const label bodyID, const vector& p) const;
+
+        //- Apply the restraints and accumulate the internal joint forces
+        //  into the tau field and external forces into the fx field
+        void applyRestraints(scalarField& tau, Field<spatialVector>& fx) const;
+
+        //- Calculate the joint acceleration qDdot from the joint state q,
+        //  velocity qDot, internal force tau (in the joint frame) and
+        //  external force fx (in the global frame) using the articulated body
+        //  algorithm (Section 7.3 and Table 7.1)
+        void forwardDynamics
+        (
+            rigidBodyModelState& state,
+            const scalarField& tau,
+            const Field<spatialVector>& fx
+        ) const;
+
+        //- Correct the velocity and acceleration of the bodies in the model
+        //  from the given joint state fields following an integration step
+        //  of the forwardDynamics
+        void forwardDynamicsCorrection(const rigidBodyModelState& state) const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+
+        //- Read coefficients dictionary and update system parameters,
+        //  restraints but not the current state
+        bool read(const dictionary& dict);
+
+
+    // Ostream Operator
+
+        friend Ostream& operator<<(Ostream&, const rigidBodyModel&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyModelI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModelI.H b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModelI.H
new file mode 100644
index 0000000000000000000000000000000000000000..b2fc636ff5e090007db1979e11f8a837ecaa8878
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModel/rigidBodyModelI.H
@@ -0,0 +1,201 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline Foam::label Foam::RBD::rigidBodyModel::nBodies() const
+{
+    return bodies_.size();
+}
+
+
+inline Foam::PtrList<Foam::RBD::rigidBody>
+Foam::RBD::rigidBodyModel::bodies() const
+{
+    return bodies_;
+}
+
+
+inline const Foam::DynamicList<Foam::label>&
+Foam::RBD::rigidBodyModel::lambda() const
+{
+    return lambda_;
+}
+
+
+inline const Foam::PtrList<Foam::RBD::joint>&
+Foam::RBD::rigidBodyModel::joints() const
+{
+    return joints_;
+}
+
+
+inline Foam::label Foam::RBD::rigidBodyModel::nDoF() const
+{
+    return nDoF_;
+}
+
+
+inline bool Foam::RBD::rigidBodyModel::unitQuaternions() const
+{
+    return unitQuaternions_;
+}
+
+
+inline const Foam::vector& Foam::RBD::rigidBodyModel::g() const
+{
+    return g_;
+}
+
+
+inline Foam::vector& Foam::RBD::rigidBodyModel::g()
+{
+    return g_;
+}
+
+
+inline const Foam::word& Foam::RBD::rigidBodyModel::name
+(
+    const label bodyID
+) const
+{
+    if (merged(bodyID))
+    {
+        return mergedBody(bodyID).name();
+    }
+    else
+    {
+        return bodies_[bodyID].name();
+    }
+}
+
+
+inline const Foam::RBD::rigidBodyInertia&
+Foam::RBD::rigidBodyModel::I(const label i) const
+{
+    return bodies_[i];
+}
+
+
+inline const Foam::spatialVector&
+Foam::RBD::rigidBodyModel::v(const label i) const
+{
+    return v_[i];
+}
+
+
+inline bool Foam::RBD::rigidBodyModel::merged(label bodyID) const
+{
+    return bodyID < 0;
+}
+
+
+inline Foam::label Foam::RBD::rigidBodyModel::master(label bodyID) const
+{
+    if (bodyID < 0)
+    {
+        return mergedBody(bodyID).masterID();
+    }
+    else
+    {
+        return bodyID;
+    }
+}
+
+
+inline Foam::label
+Foam::RBD::rigidBodyModel::mergedBodyID(const label mergedBodyIndex) const
+{
+    return -1 - mergedBodyIndex;
+}
+
+
+inline Foam::label
+Foam::RBD::rigidBodyModel::mergedBodyIndex(const label mergedBodyID) const
+{
+    return -1 - mergedBodyID;
+}
+
+
+inline const Foam::RBD::subBody&
+Foam::RBD::rigidBodyModel::mergedBody(label mergedBodyID) const
+{
+    if (!merged(mergedBodyID))
+    {
+        FatalErrorInFunction
+            << "Body " << mergedBodyID << " has not been merged"
+            << abort(FatalError);
+    }
+
+    return mergedBodies_[mergedBodyIndex(mergedBodyID)];
+}
+
+
+inline Foam::label Foam::RBD::rigidBodyModel::bodyID(const word& name) const
+{
+    return bodyIDs_[name];
+}
+
+
+inline Foam::vector Foam::RBD::rigidBodyModel::masterPoint
+(
+    const label bodyID,
+    const vector& p
+) const
+{
+    if (merged(bodyID))
+    {
+        return
+        (
+            mergedBody(bodyID).masterXT().inv()
+         && spatialVector(Zero, p)
+        ).l();
+    }
+    else
+    {
+        return p;
+    }
+}
+
+
+inline Foam::spatialVector Foam::RBD::rigidBodyModel::v
+(
+    const label bodyID,
+    const vector& p
+) const
+{
+    return
+    (
+        spatialTransform
+        (
+            X0_[master(bodyID)].E().T(),
+            masterPoint(bodyID, p)
+        )
+      & v_[master(bodyID)]
+    );
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C
new file mode 100644
index 0000000000000000000000000000000000000000..c1a086ec142a316f6e36866a415cd32ab8aaec23
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C
@@ -0,0 +1,55 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyModelState.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodyModelState::rigidBodyModelState
+(
+    const rigidBodyModel& model
+)
+:
+    q_(model.nDoF(), Zero),
+    qDot_(model.nDoF(), Zero),
+    qDdot_(model.nDoF(), Zero),
+    deltaT_(0)
+{}
+
+
+Foam::RBD::rigidBodyModelState::rigidBodyModelState
+(
+    const rigidBodyModel& model,
+    const dictionary& dict
+)
+:
+    q_(dict.lookupOrDefault("q", scalarField(model.nDoF(), Zero))),
+    qDot_(dict.lookupOrDefault("qDot", scalarField(model.nDoF(), Zero))),
+    qDdot_(dict.lookupOrDefault("qDdot", scalarField(model.nDoF(), Zero))),
+    deltaT_(dict.lookupOrDefault<scalar>("deltaT", 0))
+{}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.H b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.H
new file mode 100644
index 0000000000000000000000000000000000000000..6b10ac355ed2f29a1cd03a26b1d9d016b9e08d57
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.H
@@ -0,0 +1,161 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodyModelState
+
+Description
+    Holds the motion state of rigid-body model.
+
+SourceFiles
+    rigidBodyModelStateI.H
+    rigidBodyModelState.C
+    rigidBodyModelStateIO.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef rigidBodyModelState_H
+#define rigidBodyModelState_H
+
+#include "rigidBodyModel.H"
+#include "scalarField.H"
+#include "dictionary.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of classes
+class Istream;
+class Ostream;
+
+namespace RBD
+{
+
+// Forward declaration of friend functions and operators
+class rigidBodyModelState;
+Istream& operator>>(Istream&, rigidBodyModelState&);
+Ostream& operator<<(Ostream&, const rigidBodyModelState&);
+
+
+/*---------------------------------------------------------------------------*\
+                  Class rigidBodyModelState Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBodyModelState
+{
+    // Private data
+
+        //- Joint position and orientation
+        scalarField q_;
+
+        //- Joint velocity
+        scalarField qDot_;
+
+        //- Joint acceleration
+        scalarField qDdot_;
+
+        //- The time-step used to integrate to this state
+        scalar deltaT_;
+
+
+public:
+
+    // Constructors
+
+        //- Construct for the given rigidBodyModel
+        rigidBodyModelState(const rigidBodyModel& model);
+
+        //- Construct from dictionary for the given rigidBodyModel
+        rigidBodyModelState
+        (
+            const rigidBodyModel& model,
+            const dictionary& dict
+        );
+
+
+    // Member Functions
+
+        // Access
+
+            //- Return access to the joint position and orientation
+            inline const scalarField& q() const;
+
+            //- Return access to the joint quaternion
+
+            //- Return access to the joint velocity
+            inline const scalarField& qDot() const;
+
+            //- Return access to the joint acceleration
+            inline const scalarField& qDdot() const;
+
+            //- Return access to the time-step
+            inline scalar deltaT() const;
+
+
+        // Edit
+
+            //- Return access to the joint position and orientation
+            inline scalarField& q();
+
+            //- Return access to the joint quaternion
+
+            //- Return access to the joint velocity
+            inline scalarField& qDot();
+
+            //- Return access to the joint acceleration
+            inline scalarField& qDdot();
+
+            //- Return access to the time-step
+            inline scalar& deltaT();
+
+
+        //- Write to dictionary
+        void write(dictionary& dict) const;
+
+        //- Write to stream
+        void write(Ostream&) const;
+
+
+    // IOstream Operators
+
+        friend Istream& operator>>(Istream&, rigidBodyModelState&);
+        friend Ostream& operator<<(Ostream&, const rigidBodyModelState&);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyModelStateI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateI.H b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateI.H
new file mode 100644
index 0000000000000000000000000000000000000000..e3fb2678f48967415de58a9a78b94cc0bd11b0e1
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateI.H
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline const Foam::scalarField& Foam::RBD::rigidBodyModelState::q() const
+{
+    return q_;
+}
+
+
+inline const Foam::scalarField& Foam::RBD::rigidBodyModelState::qDot() const
+{
+    return qDot_;
+}
+
+
+inline const Foam::scalarField& Foam::RBD::rigidBodyModelState::qDdot() const
+{
+    return qDdot_;
+}
+
+
+inline Foam::scalar Foam::RBD::rigidBodyModelState::deltaT() const
+{
+    return deltaT_;
+}
+
+
+inline Foam::scalarField& Foam::RBD::rigidBodyModelState::q()
+{
+    return q_;
+}
+
+
+inline Foam::scalarField& Foam::RBD::rigidBodyModelState::qDot()
+{
+    return qDot_;
+}
+
+
+inline Foam::scalarField& Foam::RBD::rigidBodyModelState::qDdot()
+{
+    return qDdot_;
+}
+
+
+inline Foam::scalar& Foam::RBD::rigidBodyModelState::deltaT()
+{
+    return deltaT_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C
new file mode 100644
index 0000000000000000000000000000000000000000..c17819b410d922abb3ac92b818df8beaa2f81216
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C
@@ -0,0 +1,95 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyModelState.H"
+#include "IOstreams.H"
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodyModelState::write(dictionary& dict) const
+{
+    dict.add("q", q_);
+    dict.add("qDot", qDot_);
+    dict.add("qDdot", qDdot_);
+    dict.add("deltaT", deltaT_);
+}
+
+
+void Foam::RBD::rigidBodyModelState::write(Ostream& os) const
+{
+    os.writeKeyword("q") << q_ << token::END_STATEMENT << nl;
+    os.writeKeyword("qDot") << qDot_ << token::END_STATEMENT << nl;
+    os.writeKeyword("qDdot") << qDdot_ << token::END_STATEMENT << nl;
+    os.writeKeyword("deltaT") << deltaT_ << token::END_STATEMENT << nl;
+}
+
+
+// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
+
+Foam::Istream& Foam::RBD::operator>>
+(
+    Istream& is,
+    rigidBodyModelState& state
+)
+{
+    is  >> state.q_
+        >> state.qDot_
+        >> state.qDdot_
+        >> state.deltaT_;
+
+    // Check state of Istream
+    is.check
+    (
+        "Foam::Istream& Foam::operator>>"
+        "(Foam::Istream&, Foam::RBD::rigidBodyModelState&)"
+    );
+
+    return is;
+}
+
+
+Foam::Ostream& Foam::RBD::operator<<
+(
+    Ostream& os,
+    const rigidBodyModelState& state
+)
+{
+    os  << state.q_
+        << token::SPACE << state.qDot_
+        << token::SPACE << state.qDdot_
+        << token::SPACE << state.deltaT_;
+
+    // Check state of Ostream
+    os.check
+    (
+        "Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
+        "const Foam::RBD::rigidBodyModelState&)"
+    );
+
+    return os;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C
new file mode 100644
index 0000000000000000000000000000000000000000..9eb21c396912a14f9ba25e6311004450931d783e
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C
@@ -0,0 +1,284 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyMotion.H"
+#include "rigidBodySolver.H"
+#include "septernion.H"
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodyMotion::initialize()
+{
+    // Calculate the initial body-state
+    forwardDynamicsCorrection(rigidBodyModelState(*this));
+    X00_ = X0_;
+
+    // Update the body-state to correspond to the current joint-state
+    forwardDynamicsCorrection(motionState_);
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodyMotion::rigidBodyMotion()
+:
+    rigidBodyModel(),
+    motionState_(*this),
+    motionState0_(*this),
+    aRelax_(1.0),
+    aDamp_(1.0),
+    report_(false),
+    solver_(NULL)
+{}
+
+Foam::RBD::rigidBodyMotion::rigidBodyMotion
+(
+    const dictionary& dict
+)
+:
+    rigidBodyModel(dict),
+    motionState_(*this, dict),
+    motionState0_(motionState_),
+    X00_(X0_.size()),
+    aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)),
+    aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
+    report_(dict.lookupOrDefault<Switch>("report", false)),
+    solver_(rigidBodySolver::New(*this, dict.subDict("solver")))
+{
+    if (dict.found("g"))
+    {
+        g() = vector(dict.lookup("g"));
+    }
+
+    initialize();
+}
+
+
+Foam::RBD::rigidBodyMotion::rigidBodyMotion
+(
+    const dictionary& dict,
+    const dictionary& stateDict
+)
+:
+    rigidBodyModel(dict),
+    motionState_(*this, stateDict),
+    motionState0_(motionState_),
+    X00_(X0_.size()),
+    aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)),
+    aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
+    report_(dict.lookupOrDefault<Switch>("report", false)),
+    solver_(rigidBodySolver::New(*this, dict.subDict("solver")))
+{
+    if (dict.found("g"))
+    {
+        g() = vector(dict.lookup("g"));
+    }
+
+    initialize();
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodyMotion::~rigidBodyMotion()
+{}
+
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+Foam::spatialTransform Foam::RBD::rigidBodyMotion::X00
+(
+    const label bodyId
+) const
+{
+    if (merged(bodyId))
+    {
+        const subBody& mBody = mergedBody(bodyId);
+        return mBody.masterXT() & X00_[mBody.masterID()];
+    }
+    else
+    {
+        return X00_[bodyId];
+    }
+}
+
+
+void Foam::RBD::rigidBodyMotion::forwardDynamics
+(
+    rigidBodyModelState& state,
+    const scalarField& tau,
+    const Field<spatialVector>& fx
+) const
+{
+    scalarField qDdotPrev = state.qDdot();
+    rigidBodyModel::forwardDynamics(state, tau, fx);
+    state.qDdot() = aDamp_*(aRelax_*state.qDdot() + (1 - aRelax_)*qDdotPrev);
+}
+
+
+void Foam::RBD::rigidBodyMotion::solve
+(
+    scalar deltaT,
+    const scalarField& tau,
+    const Field<spatialVector>& fx
+)
+{
+    motionState_.deltaT() = deltaT;
+
+    if (motionState0_.deltaT() < SMALL)
+    {
+        motionState0_.deltaT() = deltaT;
+    }
+
+    if (Pstream::master())
+    {
+        solver_->solve(tau, fx);
+    }
+
+    Pstream::scatter(motionState_);
+
+    // Update the body-state to correspond to the current joint-state
+    forwardDynamicsCorrection(motionState_);
+}
+
+
+void Foam::RBD::rigidBodyMotion::status(const label bodyID) const
+{
+    const spatialTransform CofR(X0(bodyID));
+    const spatialVector vCofR(v(bodyID, Zero));
+
+    Info<< "Rigid-body motion of the " << name(bodyID) << nl
+        << "    Centre of rotation: " << CofR.r() << nl
+        << "    Orientation: " << CofR.E() << nl
+        << "    Linear velocity: " << vCofR.l() << nl
+        << "    Angular velocity: " << vCofR.w()
+        << endl;
+}
+
+
+Foam::tmp<Foam::pointField> Foam::RBD::rigidBodyMotion::transformPoints
+(
+    const label bodyID,
+    const scalarField& weight,
+    const pointField& initialPoints
+) const
+{
+    // Calculate the transform from the initial state in the global frame
+    // to the current state in the global frame
+    spatialTransform X(X0(bodyID).inv() & X00(bodyID));
+
+    // Calculate the septernion equivalent of the transformation for 'slerp'
+    // interpolation
+    septernion s(X);
+
+    tmp<pointField> tpoints(new pointField(initialPoints));
+    pointField& points = tpoints.ref();
+
+    forAll(points, i)
+    {
+        // Move non-stationary points
+        if (weight[i] > SMALL)
+        {
+            // Use solid-body motion where weight = 1
+            if (weight[i] > 1 - SMALL)
+            {
+                points[i] = X.transformPoint(initialPoints[i]);
+            }
+            // Slerp septernion interpolation
+            else
+            {
+                points[i] =
+                    slerp(septernion::I, s, weight[i])
+                   .transformPoint(initialPoints[i]);
+            }
+        }
+    }
+
+    return tpoints;
+}
+
+
+Foam::tmp<Foam::pointField> Foam::RBD::rigidBodyMotion::transformPoints
+(
+    const labelList& bodyIDs,
+    const List<const scalarField*>& weights,
+    const pointField& initialPoints
+) const
+{
+    List<septernion> ss(bodyIDs.size() + 1);
+    ss[bodyIDs.size()] = septernion::I;
+
+    forAll(bodyIDs, bi)
+    {
+        const label bodyID = bodyIDs[bi];
+
+        // Calculate the transform from the initial state in the global frame
+        // to the current state in the global frame
+        spatialTransform X(X0(bodyID).inv() & X00(bodyID));
+
+        // Calculate the septernion equivalent of the transformation
+        ss[bi] = septernion(X);
+    }
+
+    tmp<pointField> tpoints(new pointField(initialPoints));
+    pointField& points = tpoints.ref();
+
+    List<scalar> w(ss.size());
+
+    forAll(points, i)
+    {
+        // Sum (1 - wi) and find the maximum wi
+        scalar sum1mw = 0;
+        scalar maxw = 0;
+
+        forAll(bodyIDs, bi)
+        {
+            w[bi] = (*(weights[bi]))[i];
+            sum1mw += 1 - w[bi];
+            maxw = max(maxw, w[bi]);
+        }
+
+        // Calculate the limiter for (1 - wi) to ensure the sum(wi) = maxw
+        scalar lambda = (w.size() - 1 - maxw)/sum1mw;
+
+        // Limit (1 - wi) and sum the resulting wi
+        scalar sumw = 0;
+        forAll(bodyIDs, bi)
+        {
+            w[bi] = 1 - lambda*(1 - w[bi]);
+            sumw += w[bi];
+        }
+
+        // Calculate the weight for the stationary far-field
+        w[bodyIDs.size()] = 1 - sumw;
+
+        points[i] = average(ss, w).transformPoint(initialPoints[i]);
+    }
+
+    return tpoints;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.H b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.H
new file mode 100644
index 0000000000000000000000000000000000000000..c386169064bdbde0380c03fb7a46144ccf1d7bda
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.H
@@ -0,0 +1,229 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodyMotion
+
+Description
+    Six degree of freedom motion for a rigid body.
+
+    Angular momentum stored in body fixed reference frame.  Reference
+    orientation of the body (where Q = I) must align with the cartesian axes
+    such that the Inertia tensor is in principle component form.  Can add
+    restraints (e.g. a spring) and constraints (e.g. motion may only be on a
+    plane).
+
+    The time-integrator for the motion is run-time selectable with options for
+    symplectic (explicit), Crank-Nicolson and Newmark schemes.
+
+SourceFiles
+    rigidBodyMotionI.H
+    rigidBodyMotion.C
+    rigidBodyMotionIO.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef rigidBodyMotion_H
+#define rigidBodyMotion_H
+
+#include "rigidBodyModel.H"
+#include "rigidBodyModelState.H"
+#include "pointField.H"
+#include "Switch.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+// Forward declarations
+class rigidBodySolver;
+
+/*---------------------------------------------------------------------------*\
+                      Class rigidBodyMotion Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBodyMotion
+:
+    public rigidBodyModel
+{
+    friend class rigidBodySolver;
+
+    // Private data
+
+        //- Motion state data object
+        rigidBodyModelState motionState_;
+
+        //- Motion state data object for previous time-step
+        rigidBodyModelState motionState0_;
+
+        //- Initial transform for external forces to the bodies reference frame
+        List<spatialTransform> X00_;
+
+        //- Acceleration relaxation coefficient
+        scalar aRelax_;
+
+        //- Acceleration damping coefficient (for steady-state simulations)
+        scalar aDamp_;
+
+        //- Switch to turn reporting of motion data on and off
+        Switch report_;
+
+        //- Motion solver
+        autoPtr<rigidBodySolver> solver_;
+
+
+    // Private Member Functions
+
+        //- Initialize the body-state
+        void initialize();
+
+        //- Disallow copy construct
+        rigidBodyMotion(const rigidBodyMotion&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const rigidBodyMotion&);
+
+
+public:
+
+    // Constructors
+
+        //- Construct null
+        rigidBodyMotion();
+
+        //- Construct from dictionary
+        rigidBodyMotion
+        (
+            const dictionary& dict
+        );
+
+        //- Construct from constant and state dictionaries
+        rigidBodyMotion
+        (
+            const dictionary& dict,
+            const dictionary& stateDict
+        );
+
+
+    //- Destructor
+    ~rigidBodyMotion();
+
+
+    // Member Functions
+
+        // Access
+
+            //- Return the report Switch
+            inline bool report() const;
+
+            //- Return the motion state
+            inline const rigidBodyModelState& state() const;
+
+            //- Return the motion state for modification
+            inline rigidBodyModelState& state();
+
+            //- Return the initial transform to the global frame for the
+            //  given body
+            spatialTransform X00(const label bodyId) const;
+
+
+        // Edit
+
+            //- Store the motion state at the beginning of the time-step
+            inline void newTime();
+
+
+        // Update state
+
+            //- Calculate and optionally relax the joint acceleration qDdot from
+            //  the joint state q, velocity qDot, internal force tau (in the
+            //  joint frame) and external force fx (in the global frame)
+            void forwardDynamics
+            (
+                rigidBodyModelState& state,
+                const scalarField& tau,
+                const Field<spatialVector>& fx
+            ) const;
+
+            //- Integrate velocities, orientation and position
+            //  for the given time-step
+            void solve
+            (
+                scalar deltaT,
+                const scalarField& tau,
+                const Field<spatialVector>& fx
+            );
+
+            //- Report the status of the motion of the given body
+            void status(const label bodyID) const;
+
+
+        // Transformations
+
+            //- Transform the given initial pointField of the specified body
+            //  to correspond to the current motion state scaled using
+            //  'slerp' interpolation
+            tmp<pointField> transformPoints
+            (
+                const label bodyID,
+                const scalarField& weight,
+                const pointField& initialPoints
+            ) const;
+
+            //- Transform the given initial pointField of the specified body
+            //  to correspond to the current motion state scaled using
+            //  'slerp' interpolation
+            tmp<pointField> transformPoints
+            (
+                const labelList& bodyIDs,
+                const List<const scalarField*>& weights,
+                const pointField& initialPoints
+            ) const;
+
+
+        //- Write
+        void write(Ostream&) const;
+
+        //- Read coefficients dictionary and update system parameters,
+        //  constraints and restraints but not the current state
+        bool read(const dictionary& dict);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyMotionI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionI.H b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionI.H
new file mode 100644
index 0000000000000000000000000000000000000000..8b11b1ca28a2e37e6d4e768cebfb07d6f1af40e5
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionI.H
@@ -0,0 +1,54 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+inline bool Foam::RBD::rigidBodyMotion::report() const
+{
+    return report_;
+}
+
+
+inline const Foam::RBD::rigidBodyModelState&
+Foam::RBD::rigidBodyMotion::state() const
+{
+    return motionState_;
+}
+
+
+inline Foam::RBD::rigidBodyModelState&
+Foam::RBD::rigidBodyMotion::state()
+{
+    return motionState_;
+}
+
+
+inline void Foam::RBD::rigidBodyMotion::newTime()
+{
+    motionState0_ = motionState_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C
new file mode 100644
index 0000000000000000000000000000000000000000..915af7f56f1a5fd3dd467a889f74fdf6709c1f08
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionIO.C
@@ -0,0 +1,56 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyMotion.H"
+#include "IOstreams.H"
+
+// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
+
+bool Foam::RBD::rigidBodyMotion::read(const dictionary& dict)
+{
+    rigidBodyModel::read(dict);
+
+    aRelax_ = dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0);
+    aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0);
+    report_ = dict.lookupOrDefault<Switch>("report", false);
+
+    return true;
+}
+
+
+void Foam::RBD::rigidBodyMotion::write(Ostream& os) const
+{
+    rigidBodyModel::write(os);
+
+    os.writeKeyword("accelerationRelaxation")
+        << aRelax_ << token::END_STATEMENT << nl;
+    os.writeKeyword("accelerationDamping")
+        << aDamp_ << token::END_STATEMENT << nl;
+    os.writeKeyword("report")
+        << report_ << token::END_STATEMENT << nl;
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C b/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C
new file mode 100644
index 0000000000000000000000000000000000000000..590b9708bae5185a0f53705bf31caa349426461f
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.C
@@ -0,0 +1,90 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "CrankNicolson.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace rigidBodySolvers
+{
+    defineTypeNameAndDebug(CrankNicolson, 0);
+    addToRunTimeSelectionTable(rigidBodySolver, CrankNicolson, dictionary);
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolvers::CrankNicolson::CrankNicolson
+(
+    rigidBodyMotion& body,
+    const dictionary& dict
+)
+:
+    rigidBodySolver(body),
+    aoc_(dict.lookupOrDefault<scalar>("aoc", 0.5)),
+    voc_(dict.lookupOrDefault<scalar>("voc", 0.5))
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolvers::CrankNicolson::~CrankNicolson()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodySolvers::CrankNicolson::solve
+(
+    const scalarField& tau,
+    const Field<spatialVector>& fx
+)
+{
+    // Accumulate the restraint forces
+    scalarField rtau(tau);
+    Field<spatialVector> rfx(fx);
+    model_.applyRestraints(rtau, rfx);
+
+    // Calculate the accelerations for the given state and forces
+    model_.forwardDynamics(state(), rtau, rfx);
+
+    // Correct velocity
+    qDot() = qDot0() + deltaT()*(aoc_*qDdot() + (1 - aoc_)*qDdot0());
+
+    // Correct position
+    q() = q0() + deltaT()*(voc_*qDot() + (1 - voc_)*qDot0());
+
+    correctQuaternionJoints();
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.H b/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.H
new file mode 100644
index 0000000000000000000000000000000000000000..0aa3a387ab5375c1eb18d4e91b98f72ec102e136
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/CrankNicolson/CrankNicolson.H
@@ -0,0 +1,126 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodySolvers::CrankNicolson
+
+Description
+    Crank-Nicolson 2nd-order time-integrator for 6DoF solid-body motion.
+
+    The off-centering coefficients for acceleration (velocity integration) and
+    velocity (position/orientation integration) may be specified but default
+    values of 0.5 for each are used if they are not specified.  With the default
+    off-centering this scheme is equivalent to the Newmark scheme with default
+    coefficients.
+
+    Example specification in dynamicMeshDict:
+    \verbatim
+    solver
+    {
+        type    CrankNicolson;
+        aoc     0.5;    // Acceleration off-centering coefficient
+        voc     0.5;    // Velocity off-centering coefficient
+    }
+    \endverbatim
+
+SeeAlso
+    Foam::RBD::rigidBodySolvers::Newmark
+
+SourceFiles
+    CrankNicolson.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef CrankNicolson_H
+#define CrankNicolson_H
+
+#include "rigidBodySolver.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace rigidBodySolvers
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class CrankNicolson Declaration
+\*---------------------------------------------------------------------------*/
+
+class CrankNicolson
+:
+    public rigidBodySolver
+{
+    // Private data
+
+        //- Acceleration off-centering coefficient (default: 0.5)
+        const scalar aoc_;
+
+        //- Velocity off-centering coefficient (default: 0.5)
+        const scalar voc_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("CrankNicolson");
+
+
+    // Constructors
+
+        //- Construct for the given body from dictionary
+        CrankNicolson
+        (
+            rigidBodyMotion& body,
+            const dictionary& dict
+        );
+
+
+    //- Destructor
+    virtual ~CrankNicolson();
+
+
+    // Member Functions
+
+        //- Integrate the rigid-body motion for one time-step
+        virtual void solve
+        (
+            const scalarField& tau,
+            const Field<spatialVector>& fx
+        );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace rigidBodySolvers
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C b/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C
new file mode 100644
index 0000000000000000000000000000000000000000..3722f9e9f88375443c0744a7e0e0b6d6d01aadd3
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.C
@@ -0,0 +1,100 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "Newmark.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace rigidBodySolvers
+{
+    defineTypeNameAndDebug(Newmark, 0);
+    addToRunTimeSelectionTable(rigidBodySolver, Newmark, dictionary);
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolvers::Newmark::Newmark
+(
+    rigidBodyMotion& body,
+    const dictionary& dict
+)
+:
+    rigidBodySolver(body),
+    gamma_(dict.lookupOrDefault<scalar>("gamma", 0.5)),
+    beta_
+    (
+        max
+        (
+            0.25*sqr(gamma_ + 0.5),
+            dict.lookupOrDefault<scalar>("beta", 0.25)
+        )
+    )
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolvers::Newmark::~Newmark()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodySolvers::Newmark::solve
+(
+    const scalarField& tau,
+    const Field<spatialVector>& fx
+)
+{
+    // Accumulate the restraint forces
+    scalarField rtau(tau);
+    Field<spatialVector> rfx(fx);
+    model_.applyRestraints(rtau, rfx);
+
+    // Calculate the accelerations for the given state and forces
+    model_.forwardDynamics(state(), rtau, rfx);
+
+    // Correct velocity
+    qDot() = qDot0()
+      + deltaT()*(gamma_*qDdot() + (1 - gamma_)*qDdot0());
+
+    // Correct position
+    q() = q0()
+      + deltaT()*qDot0()
+      + sqr(deltaT())*(beta_*qDdot() + (0.5 - beta_)*qDdot0());
+
+    correctQuaternionJoints();
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.H b/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.H
new file mode 100644
index 0000000000000000000000000000000000000000..b6745e2732163de7bb5ce38e5a68abec34990859
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/Newmark/Newmark.H
@@ -0,0 +1,124 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodySolvers::Newmark
+
+Description
+    Newmark 2nd-order time-integrator for 6DoF solid-body motion.
+
+    Reference:
+    \verbatim
+        Newmark, N. M. (1959).
+        A method of computation for structural dynamics.
+        Journal of the Engineering Mechanics Division, 85(3), 67-94.
+    \endverbatim
+
+    Example specification in dynamicMeshDict:
+    \verbatim
+    solver
+    {
+        type    Newmark;
+        gamma   0.5;    // Velocity integration coefficient
+        beta    0.25;   // Position integration coefficient
+    }
+    \endverbatim
+
+SourceFiles
+    Newmark.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Newmark_H
+#define Newmark_H
+
+#include "rigidBodySolver.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace rigidBodySolvers
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class Newmark Declaration
+\*---------------------------------------------------------------------------*/
+
+class Newmark
+:
+    public rigidBodySolver
+{
+    // Private data
+
+        //- Coefficient for velocity integration (default: 0.5)
+        const scalar gamma_;
+
+        //- Coefficient for position and orientation integration (default: 0.25)
+        const scalar beta_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("Newmark");
+
+
+    // Constructors
+
+        //- Construct for the given body from dictionary
+        Newmark
+        (
+            rigidBodyMotion& body,
+            const dictionary& dict
+        );
+
+
+    //- Destructor
+    virtual ~Newmark();
+
+
+    // Member Functions
+
+        //- Integrate the rigid-body motion for one time-step
+        virtual void solve
+        (
+            const scalarField& tau,
+            const Field<spatialVector>& fx
+        );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace rigidBodySolvers
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C
new file mode 100644
index 0000000000000000000000000000000000000000..8db7777f7758d5dbf7f6d857515dbdbcc05d39bf
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/newRigidBodySolver.C
@@ -0,0 +1,57 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodySolver.H"
+
+// * * * * * * * * * * * * * * * * Selector  * * * * * * * * * * * * * * * * //
+
+Foam::autoPtr<Foam::RBD::rigidBodySolver> Foam::RBD::rigidBodySolver::New
+(
+    rigidBodyMotion& body,
+    const dictionary& dict
+)
+{
+    word rigidBodySolverType(dict.lookup("type"));
+
+    Info<< "Selecting rigidBodySolver " << rigidBodySolverType << endl;
+
+    dictionaryConstructorTable::iterator cstrIter =
+        dictionaryConstructorTablePtr_->find(rigidBodySolverType);
+
+    if (cstrIter == dictionaryConstructorTablePtr_->end())
+    {
+        FatalErrorInFunction
+            << "Unknown rigidBodySolverType type "
+            << rigidBodySolverType << endl << endl
+            << "Valid rigidBodySolver types are : " << endl
+            << dictionaryConstructorTablePtr_->sortedToc()
+            << exit(FatalError);
+    }
+
+    return cstrIter()(body, dict);
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.C b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.C
new file mode 100644
index 0000000000000000000000000000000000000000..5944a933d6875a98ee9fa98299c450dcc652e376
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.C
@@ -0,0 +1,91 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodySolver.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+
+    defineTypeNameAndDebug(rigidBodySolver, 0);
+    defineRunTimeSelectionTable(rigidBodySolver, dictionary);
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolver::rigidBodySolver(rigidBodyMotion& body)
+:
+    model_(body)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolver::~rigidBodySolver()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodySolver::correctQuaternionJoints()
+{
+    if (model_.unitQuaternions())
+    {
+        forAll(model_.joints(), i)
+        {
+            const label qi = model_.joints()[i].qIndex();
+
+            if (model_.joints()[i].unitQuaternion())
+            {
+                // Calculate the change in the unit quaternion
+                vector dv((q().block<vector>(qi) - q0().block<vector>(qi)));
+                scalar magDv = mag(dv);
+
+                if (magDv > SMALL)
+                {
+                    // Calculate the unit quaternion corresponding to the change
+                    quaternion dQuat(dv/magDv, cos(magDv), true);
+
+                    // Transform the previous time unit quaternion
+                    quaternion quat
+                    (
+                        normalize(model_.joints()[i].unitQuaternion(q0())*dQuat)
+                    );
+
+                    // Update the joint unit quaternion
+                    model_.joints()[i].unitQuaternion(quat, q());
+                }
+            }
+        }
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.H b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.H
new file mode 100644
index 0000000000000000000000000000000000000000..6c2c3c678b83c58c02a521d67f79f9ebefdcbbc3
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.H
@@ -0,0 +1,165 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodySolver
+
+Description
+
+SourceFiles
+    rigidBodySolver.C
+    newSixDoFSolver.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef RBD_rigidBodySolver_H
+#define RBD_rigidBodySolver_H
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodyMotion.H"
+#include "runTimeSelectionTables.H"
+
+namespace Foam
+{
+namespace RBD
+{
+
+/*---------------------------------------------------------------------------*\
+                         Class rigidBodySolver Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBodySolver
+{
+protected:
+
+    // Protected data
+
+        //- The rigid-body model
+        rigidBodyMotion& model_;
+
+
+        //- Return the motion state
+        inline rigidBodyModelState& state();
+
+        //- Return the current joint position and orientation
+        inline scalarField& q();
+
+        //- Return the current joint quaternion
+
+        //- Return the current joint velocity
+        inline scalarField& qDot();
+
+        //- Return the current joint acceleration
+        inline scalarField& qDdot();
+
+        //- Return the current time-step
+        inline scalar deltaT() const;
+
+
+        //- Return the previous motion state
+        inline const rigidBodyModelState& state0() const;
+
+        //- Return the current joint position and orientation
+        inline const scalarField& q0() const;
+
+        //- Return the current joint quaternion
+
+        //- Return the current joint velocity
+        inline const scalarField& qDot0() const;
+
+        //- Return the current joint acceleration
+        inline const scalarField& qDdot0() const;
+
+        //- Return the previous time-step
+        inline scalar deltaT0() const;
+
+        //- Correct the quaternion joints based on the current change in q
+        void correctQuaternionJoints();
+
+
+public:
+
+    //- Runtime type information
+    TypeName("rigidBodySolver");
+
+
+    // Declare runtime construction
+
+        declareRunTimeSelectionTable
+        (
+            autoPtr,
+            rigidBodySolver,
+            dictionary,
+            (
+                rigidBodyMotion& body,
+                const dictionary& dict
+            ),
+            (body, dict)
+        );
+
+
+    // Constructors
+
+        // Construct for given body
+        rigidBodySolver(rigidBodyMotion& body);
+
+
+    //- Destructor
+    virtual ~rigidBodySolver();
+
+
+    // Selectors
+
+        static autoPtr<rigidBodySolver> New
+        (
+            rigidBodyMotion& body,
+            const dictionary& dict
+        );
+
+
+    // Member Functions
+
+        //- Integrate the rigid-body motion for one time-step
+        virtual void solve
+        (
+            const scalarField& tau,
+            const Field<spatialVector>& fx
+        ) = 0;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "rigidBodySolverI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolverI.H b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolverI.H
new file mode 100644
index 0000000000000000000000000000000000000000..afac3376373000872329156178f9af5f75ed90fa
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolverI.H
@@ -0,0 +1,88 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * //
+
+inline Foam::RBD::rigidBodyModelState& Foam::RBD::rigidBodySolver::state()
+{
+    return model_.motionState_;
+}
+
+
+inline Foam::scalarField& Foam::RBD::rigidBodySolver::q()
+{
+    return state().q();
+}
+
+
+inline Foam::scalarField& Foam::RBD::rigidBodySolver::qDot()
+{
+    return state().qDot();
+}
+
+
+inline Foam::scalarField& Foam::RBD::rigidBodySolver::qDdot()
+{
+    return state().qDdot();
+}
+
+
+inline Foam::scalar Foam::RBD::rigidBodySolver::deltaT() const
+{
+    return model_.motionState_.deltaT();
+}
+
+
+inline const Foam::RBD::rigidBodyModelState&
+Foam::RBD::rigidBodySolver::state0() const
+{
+    return model_.motionState0_;
+}
+
+inline const Foam::scalarField& Foam::RBD::rigidBodySolver::q0() const
+{
+    return state0().q();
+}
+
+
+inline const Foam::scalarField& Foam::RBD::rigidBodySolver::qDot0() const
+{
+    return state0().qDot();
+}
+
+
+inline const Foam::scalarField& Foam::RBD::rigidBodySolver::qDdot0() const
+{
+    return state0().qDdot();
+}
+
+
+inline Foam::scalar Foam::RBD::rigidBodySolver::deltaT0() const
+{
+    return model_.motionState0_.deltaT();
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/symplectic/symplectic.C b/src/rigidBodyDynamics/rigidBodySolvers/symplectic/symplectic.C
new file mode 100644
index 0000000000000000000000000000000000000000..f1b3338c3220c77d25987e1755e1e562d6fef2cb
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/symplectic/symplectic.C
@@ -0,0 +1,96 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "symplectic.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace rigidBodySolvers
+{
+    defineTypeNameAndDebug(symplectic, 0);
+    addToRunTimeSelectionTable(rigidBodySolver, symplectic, dictionary);
+}
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolvers::symplectic::symplectic
+(
+    rigidBodyMotion& body,
+    const dictionary& dict
+)
+:
+    rigidBodySolver(body)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::RBD::rigidBodySolvers::symplectic::~symplectic()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+void Foam::RBD::rigidBodySolvers::symplectic::solve
+(
+    const scalarField& tau,
+    const Field<spatialVector>& fx
+)
+{
+    // First simplectic step:
+    //     Half-step for linear and angular velocities
+    //     Update position and orientation
+    qDot() = qDot0() + 0.5*deltaT0()*qDdot();
+    q() = q0() + deltaT()*qDot();
+
+    correctQuaternionJoints();
+
+    // Update the body-state prior to the evaluation of the restraints
+    model_.forwardDynamicsCorrection(state());
+
+    // Accumulate the restraint forces
+    scalarField rtau(tau);
+    Field<spatialVector> rfx(fx);
+    model_.applyRestraints(rtau, rfx);
+
+    // Calculate the body acceleration for the given state
+    // and restraint forces
+    model_.forwardDynamics(state(), rtau, rfx);
+
+    // Second simplectic step:
+    //     Complete update of linear and angular velocities
+    qDot() += 0.5*deltaT()*qDdot();
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyDynamics/rigidBodySolvers/symplectic/symplectic.H b/src/rigidBodyDynamics/rigidBodySolvers/symplectic/symplectic.H
new file mode 100644
index 0000000000000000000000000000000000000000..ec3f91d0484a41661c16d767d2ef2ea3dcf91cb6
--- /dev/null
+++ b/src/rigidBodyDynamics/rigidBodySolvers/symplectic/symplectic.H
@@ -0,0 +1,123 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::RBD::rigidBodySolvers::symplectic
+
+Description
+    Symplectic 2nd-order explicit time-integrator for rigid-body motion.
+
+    Reference:
+    \verbatim
+        Dullweber, A., Leimkuhler, B., & McLachlan, R. (1997).
+        Symplectic splitting methods for rigid body molecular dynamics.
+        The Journal of chemical physics, 107(15), 5840-5851.
+    \endverbatim
+
+    Can only be used for explicit integration of the motion of the body,
+    i.e. may only be called once per time-step, no outer-correctors may be
+    applied.  For implicit integration with outer-correctors choose either
+    CrankNicolson or Newmark schemes.
+
+    Example specification in dynamicMeshDict:
+    \verbatim
+    solver
+    {
+        type    symplectic;
+    }
+    \endverbatim
+
+SeeAlso
+    Foam::RBD::rigidBodySolvers::CrankNicolson
+    Foam::RBD::rigidBodySolvers::Newmark
+
+SourceFiles
+    symplectic.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef symplectic_H
+#define symplectic_H
+
+#include "rigidBodySolver.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace RBD
+{
+namespace rigidBodySolvers
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class symplectic Declaration
+\*---------------------------------------------------------------------------*/
+
+class symplectic
+:
+    public rigidBodySolver
+{
+
+public:
+
+    //- Runtime type information
+    TypeName("symplectic");
+
+
+    // Constructors
+
+        //- Construct for the given body from dictionary
+        symplectic
+        (
+            rigidBodyMotion& body,
+            const dictionary& dict
+        );
+
+
+    //- Destructor
+    virtual ~symplectic();
+
+
+    // Member Functions
+
+        //- Integrate the rigid-body motion for one time-step
+        virtual void solve
+        (
+            const scalarField& tau,
+            const Field<spatialVector>& fx
+        );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace rigidBodySolvers
+} // End namespace RBD
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/rigidBodyMeshMotion/Make/files b/src/rigidBodyMeshMotion/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..f7fcbc136171b7095bf66b6ffb19c9b3ebea49c6
--- /dev/null
+++ b/src/rigidBodyMeshMotion/Make/files
@@ -0,0 +1,3 @@
+rigidBodyMeshMotion.C
+
+LIB = $(FOAM_LIBBIN)/librigidBodyMeshMotion
diff --git a/src/rigidBodyMeshMotion/Make/options b/src/rigidBodyMeshMotion/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..92a8f72b4d2910be4c41401bbbbe32923227a48c
--- /dev/null
+++ b/src/rigidBodyMeshMotion/Make/options
@@ -0,0 +1,14 @@
+EXE_INC = -ggdb3 -DFULLDEBUG \
+    -I$(LIB_SRC)/rigidBodyDynamics/lnInclude \
+    -I$(LIB_SRC)/finiteVolume/lnInclude \
+    -I$(LIB_SRC)/meshTools/lnInclude \
+    -I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude \
+    -I$(LIB_SRC)/fileFormats/lnInclude \
+    -I$(LIB_SRC)/dynamicMesh/lnInclude
+
+LIB_LIBS = \
+    -lrigidBodyDynamics \
+    -lforces \
+    -lmeshTools \
+    -lfileFormats \
+    -ldynamicMesh
diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion.C
new file mode 100644
index 0000000000000000000000000000000000000000..97b67a042d3f04da93b5a33327cea8dec5d279a8
--- /dev/null
+++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion.C
@@ -0,0 +1,354 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "rigidBodyMeshMotion.H"
+#include "addToRunTimeSelectionTable.H"
+#include "polyMesh.H"
+#include "pointPatchDist.H"
+#include "pointConstraints.H"
+#include "uniformDimensionedFields.H"
+#include "forces.H"
+#include "mathematicalConstants.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTypeNameAndDebug(rigidBodyMeshMotion, 0);
+
+    addToRunTimeSelectionTable
+    (
+        motionSolver,
+        rigidBodyMeshMotion,
+        dictionary
+    );
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::rigidBodyMeshMotion::bodyMesh::bodyMesh
+(
+    const polyMesh& mesh,
+    const word& name,
+    const label bodyID,
+    const dictionary& dict
+)
+:
+    name_(name),
+    bodyID_(bodyID),
+    patches_(wordReList(dict.lookup("patches"))),
+    patchSet_(mesh.boundaryMesh().patchSet(patches_)),
+    di_(readScalar(dict.lookup("innerDistance"))),
+    do_(readScalar(dict.lookup("outerDistance"))),
+    weight_
+    (
+        IOobject
+        (
+            name_ + ".motionScale",
+            mesh.time().timeName(),
+            mesh,
+            IOobject::NO_READ,
+            IOobject::NO_WRITE,
+            false
+        ),
+        pointMesh::New(mesh),
+        dimensionedScalar("zero", dimless, 0.0)
+    )
+{}
+
+
+Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
+(
+    const polyMesh& mesh,
+    const IOdictionary& dict
+)
+:
+    displacementMotionSolver(mesh, dict, typeName),
+    model_
+    (
+        coeffDict(),
+        IOobject
+        (
+            "rigidBodyMotionState",
+            mesh.time().timeName(),
+            "uniform",
+            mesh
+        ).typeHeaderOk<IOdictionary>(true)
+      ? IOdictionary
+        (
+            IOobject
+            (
+                "rigidBodyMotionState",
+                mesh.time().timeName(),
+                "uniform",
+                mesh,
+                IOobject::READ_IF_PRESENT,
+                IOobject::NO_WRITE,
+                false
+            )
+        )
+      : coeffDict()
+    ),
+    test_(coeffDict().lookupOrDefault<Switch>("test", false)),
+    rhoInf_(1.0),
+    rhoName_(coeffDict().lookupOrDefault<word>("rhoName", "rho")),
+    curTimeIndex_(-1)
+{
+    if (rhoName_ == "rhoInf")
+    {
+        rhoInf_ = readScalar(coeffDict().lookup("rhoInf"));
+    }
+
+    const dictionary& bodiesDict = coeffDict().subDict("bodies");
+
+    forAllConstIter(IDLList<entry>, bodiesDict, iter)
+    {
+        const dictionary& bodyDict = iter().dict();
+
+        if (bodyDict.found("patches"))
+        {
+            bodyMeshes_.append
+            (
+                new bodyMesh
+                (
+                    mesh,
+                    iter().keyword(),
+                    model_.bodyID(iter().keyword()),
+                    bodyDict
+                )
+            );
+        }
+    }
+
+    // Calculate scaling factor everywhere for each meshed body
+    forAll(bodyMeshes_, bi)
+    {
+        const pointMesh& pMesh = pointMesh::New(mesh);
+
+        pointPatchDist pDist(pMesh, bodyMeshes_[bi].patchSet_, points0());
+
+        pointScalarField& scale = bodyMeshes_[bi].weight_;
+
+        // Scaling: 1 up to di then linear down to 0 at do away from patches
+        scale.internalField() =
+            min
+            (
+                max
+                (
+                    (bodyMeshes_[bi].do_ - pDist.internalField())
+                   /(bodyMeshes_[bi].do_ - bodyMeshes_[bi].di_),
+                    scalar(0)
+                ),
+                scalar(1)
+            );
+
+        // Convert the scale function to a cosine
+        scale.internalField() =
+            min
+            (
+                max
+                (
+                    0.5
+                  - 0.5
+                   *cos(scale.internalField()
+                   *Foam::constant::mathematical::pi),
+                    scalar(0)
+                ),
+                scalar(1)
+            );
+
+        pointConstraints::New(pMesh).constrain(scale);
+        //scale.write();
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::rigidBodyMeshMotion::~rigidBodyMeshMotion()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::tmp<Foam::pointField>
+Foam::rigidBodyMeshMotion::curPoints() const
+{
+    return points0() + pointDisplacement_.internalField();
+}
+
+
+void Foam::rigidBodyMeshMotion::solve()
+{
+    const Time& t = mesh().time();
+
+    if (mesh().nPoints() != points0().size())
+    {
+        FatalErrorInFunction
+            << "The number of points in the mesh seems to have changed." << endl
+            << "In constant/polyMesh there are " << points0().size()
+            << " points; in the current mesh there are " << mesh().nPoints()
+            << " points." << exit(FatalError);
+    }
+
+    // Store the motion state at the beginning of the time-step
+    if (curTimeIndex_ != this->db().time().timeIndex())
+    {
+        model_.newTime();
+        curTimeIndex_ = this->db().time().timeIndex();
+    }
+
+    if (db().foundObject<uniformDimensionedVectorField>("g"))
+    {
+        model_.g() =
+            db().lookupObject<uniformDimensionedVectorField>("g").value();
+    }
+
+    if (test_)
+    {
+        label nIter(readLabel(coeffDict().lookup("nIter")));
+
+        for (label i=0; i<nIter; i++)
+        {
+            model_.solve
+            (
+                t.deltaTValue(),
+                scalarField(model_.nDoF(), Zero),
+                Field<spatialVector>(model_.nBodies(), Zero)
+            );
+        }
+    }
+    else
+    {
+        Field<spatialVector> fx(model_.nBodies(), Zero);
+
+        forAll(bodyMeshes_, bi)
+        {
+            const label bodyID = bodyMeshes_[bi].bodyID_;
+
+            dictionary forcesDict;
+            forcesDict.add("type", forces::typeName);
+            forcesDict.add("patches", bodyMeshes_[bi].patches_);
+            forcesDict.add("rhoInf", rhoInf_);
+            forcesDict.add("rhoName", rhoName_);
+            forcesDict.add("CofR", vector::zero);
+
+            forces f("forces", db(), forcesDict);
+            f.calcForcesMoment();
+
+            fx[bodyID] = spatialVector(f.momentEff(), f.forceEff());
+        }
+
+        model_.solve
+        (
+            t.deltaTValue(),
+            scalarField(model_.nDoF(), Zero),
+            fx
+        );
+    }
+
+    if (Pstream::master() && model_.report())
+    {
+        forAll(bodyMeshes_, bi)
+        {
+            model_.status(bodyMeshes_[bi].bodyID_);
+        }
+    }
+
+    // Update the displacements
+    if (bodyMeshes_.size() == 1)
+    {
+        pointDisplacement_.internalField() = model_.transformPoints
+        (
+            bodyMeshes_[0].bodyID_,
+            bodyMeshes_[0].weight_,
+            points0()
+        ) - points0();
+    }
+    else
+    {
+        labelList bodyIDs(bodyMeshes_.size());
+        List<const scalarField*> weights(bodyMeshes_.size());
+        forAll(bodyIDs, bi)
+        {
+            bodyIDs[bi] = bodyMeshes_[bi].bodyID_;
+            weights[bi] = &bodyMeshes_[bi].weight_;
+        }
+
+        pointDisplacement_.internalField() =
+            model_.transformPoints(bodyIDs, weights, points0()) - points0();
+    }
+
+    // Displacement has changed. Update boundary conditions
+    pointConstraints::New
+    (
+        pointDisplacement_.mesh()
+    ).constrainDisplacement(pointDisplacement_);
+}
+
+
+bool Foam::rigidBodyMeshMotion::writeObject
+(
+    IOstream::streamFormat fmt,
+    IOstream::versionNumber ver,
+    IOstream::compressionType cmp
+) const
+{
+    IOdictionary dict
+    (
+        IOobject
+        (
+            "rigidBodyMotionState",
+            mesh().time().timeName(),
+            "uniform",
+            mesh(),
+            IOobject::NO_READ,
+            IOobject::NO_WRITE,
+            false
+        )
+    );
+
+    model_.state().write(dict);
+    return dict.regIOobject::write();
+}
+
+
+bool Foam::rigidBodyMeshMotion::read()
+{
+    if (displacementMotionSolver::read())
+    {
+        model_.read(coeffDict());
+
+        return true;
+    }
+    else
+    {
+        return false;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion.H b/src/rigidBodyMeshMotion/rigidBodyMeshMotion.H
new file mode 100644
index 0000000000000000000000000000000000000000..35234268d915a39f02ff21288fcd45583301b5ce
--- /dev/null
+++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion.H
@@ -0,0 +1,184 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::rigidBodyMeshMotion
+
+Description
+    Rigid-body mesh motion solver for fvMesh.
+
+    Applies septernion interpolation of movement as function of distance to the
+    object surface.
+
+SourceFiles
+    rigidBodyMeshMotion.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef rigidBodyMeshMotion_H
+#define rigidBodyMeshMotion_H
+
+#include "displacementMotionSolver.H"
+#include "rigidBodyMotion.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                     Class rigidBodyMeshMotion Declaration
+\*---------------------------------------------------------------------------*/
+
+class rigidBodyMeshMotion
+:
+    public displacementMotionSolver
+{
+    //- Class containing the patches and point motion weighting for each body
+    class bodyMesh
+    {
+        //- Name of the body
+        const word name_;
+
+        //- ID of the body in the RBD::rigidBodyMotion
+        const label bodyID_;
+
+        //- List of mesh patches associated with this body
+        const wordReList patches_;
+
+        //- Patches to integrate forces
+        const labelHashSet patchSet_;
+
+        //- Inner morphing distance (limit of solid-body region)
+        const scalar di_;
+
+        //- Outer morphing distance (limit of linear interpolation region)
+        const scalar do_;
+
+        //- Current interpolation weight
+        //  (1 at patches and within di_, 0 at do_ and beyond)
+        pointScalarField weight_;
+
+
+    public:
+
+        friend class rigidBodyMeshMotion;
+
+        bodyMesh
+        (
+            const polyMesh& mesh,
+            const word& name,
+            const label bodyID,
+            const dictionary& dict
+        );
+    };
+
+
+    // Private data
+
+        //- Rigid-body model
+        RBD::rigidBodyMotion model_;
+
+        //- List of the bodyMeshes containing the patches and point motion
+        //  weighting for each body
+        PtrList<bodyMesh> bodyMeshes_;
+
+        //- Switch for test-mode in which only the
+        //  gravitational body-force is applied
+        Switch test_;
+
+        //- Reference density required by the forces object for
+        //  incompressible calculations, required if rhoName == rhoInf
+        scalar rhoInf_;
+
+        //- Name of density field, optional unless used for an
+        //  incompressible simulation, when this needs to be specified
+        //  as rhoInf
+        word rhoName_;
+
+        //- Current time index (used for updating)
+        label curTimeIndex_;
+
+
+    // Private Member Functions
+
+        //- Disallow default bitwise copy construct
+        rigidBodyMeshMotion
+        (
+            const rigidBodyMeshMotion&
+        );
+
+        //- Disallow default bitwise assignment
+        void operator=(const rigidBodyMeshMotion&);
+
+
+public:
+
+    //- Runtime type information
+    TypeName("rigidBodyMotion");
+
+
+    // Constructors
+
+        //- Construct from polyMesh and IOdictionary
+        rigidBodyMeshMotion
+        (
+            const polyMesh&,
+            const IOdictionary& dict
+        );
+
+
+    //- Destructor
+    ~rigidBodyMeshMotion();
+
+
+    // Member Functions
+
+        //- Return point location obtained from the current motion field
+        virtual tmp<pointField> curPoints() const;
+
+        //- Solve for motion
+        virtual void solve();
+
+        //- Write state using given format, version and compression
+        virtual bool writeObject
+        (
+            IOstream::streamFormat fmt,
+            IOstream::versionNumber ver,
+            IOstream::compressionType cmp
+        ) const;
+
+        //- Read dynamicMeshDict dictionary
+        virtual bool read();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/sampling/cuttingPlane/cuttingPlane.H b/src/sampling/cuttingPlane/cuttingPlane.H
index 8bb9889262e76d2036ce210fdb7c209836e4eea9..d8309cf9421a3918ff567318e6acae6da128d40c 100644
--- a/src/sampling/cuttingPlane/cuttingPlane.H
+++ b/src/sampling/cuttingPlane/cuttingPlane.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -169,10 +169,10 @@ public:
 
         //- Sample the cell field
         template<class Type>
-        tmp<Field<Type> > sample(const Field<Type>&) const;
+        tmp<Field<Type>> sample(const Field<Type>&) const;
 
         template<class Type>
-        tmp<Field<Type> > sample(const tmp<Field<Type> >&) const;
+        tmp<Field<Type>> sample(const tmp<Field<Type>>&) const;
 
 
     // Member Operators
@@ -188,7 +188,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "cuttingPlaneTemplates.C"
+    #include "cuttingPlaneTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/cuttingPlane/cuttingPlaneTemplates.C b/src/sampling/cuttingPlane/cuttingPlaneTemplates.C
index c71cc9c980b654c445366631bb72afdf49df0661..ba1c80eb72258ed2e2d6f66e2e54b857b43a0d06 100644
--- a/src/sampling/cuttingPlane/cuttingPlaneTemplates.C
+++ b/src/sampling/cuttingPlane/cuttingPlaneTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,22 +33,22 @@ Description
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
+Foam::tmp<Foam::Field<Type>> Foam::cuttingPlane::sample
 (
     const Field<Type>& fld
 ) const
 {
-    return tmp<Field<Type> >(new Field<Type>(fld, cutCells()));
+    return tmp<Field<Type>>(new Field<Type>(fld, cutCells()));
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::cuttingPlane::sample
+Foam::tmp<Foam::Field<Type>> Foam::cuttingPlane::sample
 (
-    const tmp<Field<Type> >& tfld
+    const tmp<Field<Type>>& tfld
 ) const
 {
-    tmp<Field<Type> > tsf = sample(tfld());
+    tmp<Field<Type>> tsf = sample(tfld());
     tfld.clear();
     return tsf;
 }
diff --git a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C
index ba2f2b39221bc1b96575c04521344ab42ee66bc0..d684d99386680fdc9511043746e8ad609e66c459 100644
--- a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C
+++ b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -106,11 +106,11 @@ void Foam::cellVolumeWeightMethod::calculateAddressing
     label srcCellI = srcSeedI;
     label tgtCellI = tgtSeedI;
 
-    List<DynamicList<label> > srcToTgtAddr(src_.nCells());
-    List<DynamicList<scalar> > srcToTgtWght(src_.nCells());
+    List<DynamicList<label>> srcToTgtAddr(src_.nCells());
+    List<DynamicList<scalar>> srcToTgtWght(src_.nCells());
 
-    List<DynamicList<label> > tgtToSrcAddr(tgt_.nCells());
-    List<DynamicList<scalar> > tgtToSrcWght(tgt_.nCells());
+    List<DynamicList<label>> tgtToSrcAddr(tgt_.nCells());
+    List<DynamicList<scalar>> tgtToSrcWght(tgt_.nCells());
 
     // list of tgt cell neighbour cells
     DynamicList<label> nbrTgtCells(10);
diff --git a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H
index b14dd573e4740d65f9d54ceaef0f3981c1c289fe..45d0e9f0b79389434bfc0438433bbf4bb00867ce 100644
--- a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H
+++ b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,6 +93,11 @@ protected:
             labelList& seedCells
         ) const;
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         cellVolumeWeightMethod(const cellVolumeWeightMethod&);
 
diff --git a/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C b/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C
index db7d034b25daf63fca2a507af82fe453857c0b1d..384198ca850e1cbd245849dd2d8ec7fad90f64aa 100644
--- a/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C
+++ b/src/sampling/meshToMesh/calcMethod/correctedCellVolumeWeight/correctedCellVolumeWeightMethod.C
@@ -59,13 +59,13 @@ void Foam::correctedCellVolumeWeightMethod::calculateAddressing
     label srcCellI = srcSeedI;
     label tgtCellI = tgtSeedI;
 
-    List<DynamicList<label> > srcToTgtAddr(src_.nCells());
-    List<DynamicList<scalar> > srcToTgtWght(src_.nCells());
-    List<DynamicList<point> > srcToTgtVec(src_.nCells());
+    List<DynamicList<label>> srcToTgtAddr(src_.nCells());
+    List<DynamicList<scalar>> srcToTgtWght(src_.nCells());
+    List<DynamicList<point>> srcToTgtVec(src_.nCells());
 
-    List<DynamicList<label> > tgtToSrcAddr(tgt_.nCells());
-    List<DynamicList<scalar> > tgtToSrcWght(tgt_.nCells());
-    List<DynamicList<point> > tgtToSrcVec(tgt_.nCells());
+    List<DynamicList<label>> tgtToSrcAddr(tgt_.nCells());
+    List<DynamicList<scalar>> tgtToSrcWght(tgt_.nCells());
+    List<DynamicList<point>> tgtToSrcVec(tgt_.nCells());
 
     // list of tgt cell neighbour cells
     DynamicList<label> nbrTgtCells(10);
diff --git a/src/sampling/meshToMesh/calcMethod/direct/directMethod.C b/src/sampling/meshToMesh/calcMethod/direct/directMethod.C
index 4667f48bebee0d6128fb43e56a093dac3c8c292c..ef30ad58874f2bbaff3356f6e020a0d8d29d7401 100644
--- a/src/sampling/meshToMesh/calcMethod/direct/directMethod.C
+++ b/src/sampling/meshToMesh/calcMethod/direct/directMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -110,8 +110,8 @@ void Foam::directMethod::calculateAddressing
     // store a list of src cells already mapped
     labelList srcTgtSeed(src_.nCells(), -1);
 
-    List<DynamicList<label> > srcToTgt(src_.nCells());
-    List<DynamicList<label> > tgtToSrc(tgt_.nCells());
+    List<DynamicList<label>> srcToTgt(src_.nCells());
+    List<DynamicList<label>> tgtToSrc(tgt_.nCells());
 
     DynamicList<label> srcSeeds(10);
 
diff --git a/src/sampling/meshToMesh/calcMethod/direct/directMethod.H b/src/sampling/meshToMesh/calcMethod/direct/directMethod.H
index 5f95e5aee1d603b02acfdb172d1694d424612eef..35015395f3e78b737930eda3f6c65bcfcb603b59 100644
--- a/src/sampling/meshToMesh/calcMethod/direct/directMethod.H
+++ b/src/sampling/meshToMesh/calcMethod/direct/directMethod.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,6 +98,11 @@ protected:
             label& tgtSeedI
         ) const;
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         directMethod(const directMethod&);
 
diff --git a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C
index 950f02f61ba31e8daafcb4805ca4fc12817c274a..8e9ba33432f1f584820fb905a9221d314aca60df 100644
--- a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C
+++ b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -102,8 +102,8 @@ void Foam::mapNearestMethod::calculateAddressing
     label& startSeedI
 )
 {
-    List<DynamicList<label> > srcToTgt(src_.nCells());
-    List<DynamicList<label> > tgtToSrc(tgt_.nCells());
+    List<DynamicList<label>> srcToTgt(src_.nCells());
+    List<DynamicList<label>> tgtToSrc(tgt_.nCells());
 
     const scalarField& srcVc = src_.cellVolumes();
     const scalarField& tgtVc = tgt_.cellVolumes();
@@ -284,7 +284,7 @@ void Foam::mapNearestMethod::setNextNearestCells
 Foam::label Foam::mapNearestMethod::findMappedSrcCell
 (
     const label tgtCellI,
-    const List<DynamicList<label> >& tgtToSrc
+    const List<DynamicList<label>>& tgtToSrc
 ) const
 {
     DynamicList<label> testCells(10);
diff --git a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H
index 581ad31bf675e35f7ba73ff1b8fd43ffa45d1640..7b82924db6350b63941be54fa60d7d494c189941 100644
--- a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H
+++ b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,7 +108,7 @@ protected:
         virtual label findMappedSrcCell
         (
             const label tgtCellI,
-            const List<DynamicList<label> >& tgtToSrc
+            const List<DynamicList<label>>& tgtToSrc
         ) const;
 
         //- Disallow default bitwise copy construct
diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C
index 53b13c6da9d089b8f1a2df5494242890c122d229..04afc2cef8c380976b0dbe806432707381dac63b 100644
--- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C
+++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C
@@ -146,7 +146,7 @@ Foam::meshToMeshMethod::interVolAndCentroid
     if (volAndInertia.first() <= ROOTVSMALL)
     {
         volAndInertia.first() = 0.0;
-        volAndInertia.second() = vector::zero;
+        volAndInertia.second() = Zero;
     }
     else
     {
diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H
index 4c906a993b9e073fb438aeeb593cfa6f2ebab6ed..07be67e3214d387a776d6969c651654933a56600 100644
--- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H
+++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H
@@ -1,8 +1,8 @@
-/*---------------------------------------------------------------------------*\
+/*---------------------------------------------------------------------------* \
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -109,6 +109,11 @@ protected:
             scalarListList& tgtToTgtWght
         ) const;
 
+
+private:
+
+    // Private member functions
+
         //- Disallow default bitwise copy construct
         meshToMeshMethod(const meshToMeshMethod&);
 
diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C
index 47c1403db348b291dc40e9af9d319db5e57c906b..98d622e00c5fa76d687a667799cb5a21371c588a 100644
--- a/src/sampling/meshToMesh/meshToMesh.C
+++ b/src/sampling/meshToMesh/meshToMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -581,7 +581,7 @@ void Foam::meshToMesh::calculate(const word& methodName)
         );
 
         // cache maps and reset addresses
-        List<Map<label> > cMap;
+        List<Map<label>> cMap;
         srcMapPtr_.reset
         (
             new mapDistribute(globalSrcCells, tgtToSrcCellAddr_, cMap)
diff --git a/src/sampling/meshToMesh/meshToMesh.H b/src/sampling/meshToMesh/meshToMesh.H
index 0e3e6259a5840d716315f30512db3c9f25196db4..26227235db0f7244c8925308468da7e252ad4e10 100644
--- a/src/sampling/meshToMesh/meshToMesh.H
+++ b/src/sampling/meshToMesh/meshToMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -416,7 +416,7 @@ public:
                 //- Return the src field mapped to the tgt mesh with a defined
                 //  operation. Initial values of the result are set to zero
                 template<class Type, class CombineOp>
-                tmp<Field<Type> > mapSrcToTgt
+                tmp<Field<Type>> mapSrcToTgt
                 (
                     const Field<Type>& srcFld,
                     const CombineOp& cop
@@ -425,16 +425,16 @@ public:
                 //- Convenience function to map a tmp field to the tgt mesh
                 //  with a defined operation
                 template<class Type, class CombineOp>
-                tmp<Field<Type> > mapSrcToTgt
+                tmp<Field<Type>> mapSrcToTgt
                 (
-                    const tmp<Field<Type> >& tsrcFld,
+                    const tmp<Field<Type>>& tsrcFld,
                     const CombineOp& cop
                 ) const;
 
                 //- Convenience function to map a field to the tgt mesh with a
                 //  default operation (plusEqOp)
                 template<class Type>
-                tmp<Field<Type> > mapSrcToTgt
+                tmp<Field<Type>> mapSrcToTgt
                 (
                     const Field<Type>& srcFld
                 ) const;
@@ -442,9 +442,9 @@ public:
                 //- Convenience function to map a tmp field to the tgt mesh
                 //  with a default operation (plusEqOp)
                 template<class Type>
-                tmp<Field<Type> > mapSrcToTgt
+                tmp<Field<Type>> mapSrcToTgt
                 (
-                    const tmp<Field<Type> >& tsrcFld
+                    const tmp<Field<Type>>& tsrcFld
                 ) const;
 
 
@@ -479,7 +479,7 @@ public:
                 //- Return the tgt field mapped to the src mesh with a defined
                 //  operation. Initial values of the result are set to zero
                 template<class Type, class CombineOp>
-                tmp<Field<Type> > mapTgtToSrc
+                tmp<Field<Type>> mapTgtToSrc
                 (
                     const Field<Type>& tgtFld,
                     const CombineOp& cop
@@ -488,16 +488,16 @@ public:
                 //- Convenience function to map a tmp field to the src mesh
                 //  with a defined operation
                 template<class Type, class CombineOp>
-                tmp<Field<Type> > mapTgtToSrc
+                tmp<Field<Type>> mapTgtToSrc
                 (
-                    const tmp<Field<Type> >& ttgtFld,
+                    const tmp<Field<Type>>& ttgtFld,
                     const CombineOp& cop
                 ) const;
 
                 //- Convenience function to map a field to the src mesh with a
                 //  default operation (plusEqOp)
                 template<class Type>
-                tmp<Field<Type> > mapTgtToSrc
+                tmp<Field<Type>> mapTgtToSrc
                 (
                     const Field<Type>& tgtFld
                 ) const;
@@ -505,9 +505,9 @@ public:
                 //- Convenience function to map a tmp field to the src mesh
                 //  with a default operation (plusEqOp)
                 template<class Type>
-                tmp<Field<Type> > mapTgtToSrc
+                tmp<Field<Type>> mapTgtToSrc
                 (
-                    const tmp<Field<Type> >& ttgtFld
+                    const tmp<Field<Type>>& ttgtFld
                 ) const;
 
 
@@ -529,7 +529,7 @@ public:
                 //- Interpolate a field with a defined operation.  The initial
                 //  values of the result are set to zero
                 template<class Type, class CombineOp>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
                 (
                     const GeometricField<Type, fvPatchField, volMesh>& field,
                     const CombineOp& cop,
@@ -539,9 +539,9 @@ public:
                 //- Interpolate a tmp field with a defined operation.  The
                 //  initial values of the result are set to zero
                 template<class Type, class CombineOp>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
                 (
-                    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+                    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
                         tfield,
                     const CombineOp& cop,
                     const bool secondOrder = true
@@ -550,7 +550,7 @@ public:
                 //- Convenience function to map a field with a default
                 //  operation (plusEqOp)
                 template<class Type>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
                 (
                     const GeometricField<Type, fvPatchField, volMesh>& field,
                     const bool secondOrder = true
@@ -559,9 +559,9 @@ public:
                 //- Convenience function to map a tmp field with a default
                 //  operation (plusEqOp)
                 template<class Type>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapSrcToTgt
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapSrcToTgt
                 (
-                    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+                    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
                         tfield,
                     const bool secondOrder = true
                 ) const;
@@ -585,7 +585,7 @@ public:
                 //- Interpolate a field with a defined operation.  The initial
                 //  values of the result are set to zero
                 template<class Type, class CombineOp>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
                 (
                     const GeometricField<Type, fvPatchField, volMesh>& field,
                     const CombineOp& cop,
@@ -595,9 +595,9 @@ public:
                 //- Interpolate a tmp field with a defined operation.  The
                 //  initial values of the result are set to zero
                 template<class Type, class CombineOp>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
                 (
-                    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+                    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
                         tfield,
                     const CombineOp& cop,
                     const bool secondOrder = true
@@ -606,7 +606,7 @@ public:
                 //- Convenience function to map a field with a default
                 //  operation (plusEqOp)
                 template<class Type>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
                 (
                     const GeometricField<Type, fvPatchField, volMesh>& field,
                     const bool secondOrder = true
@@ -615,9 +615,9 @@ public:
                 //- Convenience function to map a tmp field with a default
                 //  operation (plusEqOp)
                 template<class Type>
-                tmp<GeometricField<Type, fvPatchField, volMesh> > mapTgtToSrc
+                tmp<GeometricField<Type, fvPatchField, volMesh>> mapTgtToSrc
                 (
-                    const tmp<GeometricField<Type, fvPatchField, volMesh> >&
+                    const tmp<GeometricField<Type, fvPatchField, volMesh>>&
                         tfield,
                     const bool secondOrder = true
                 ) const;
diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C
index 004b3bcce6b628a58887cdd4918e55b4ebc1a74b..1a97a62f7b62edaf191b362924abf2c9a2eb90d2 100644
--- a/src/sampling/meshToMesh/meshToMeshParallelOps.C
+++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -64,7 +64,7 @@ Foam::label Foam::meshToMesh::calcDistribution
             procI = -1;
             if (debug)
             {
-                Info<< "meshToMesh::calcDistribution: "
+                InfoInFunction
                     << "Meshes split across multiple processors" << endl;
             }
         }
@@ -73,7 +73,7 @@ Foam::label Foam::meshToMesh::calcDistribution
             procI = findIndex(cellsPresentOnProc, 1);
             if (debug)
             {
-                Info<< "meshToMesh::calcDistribution: "
+                InfoInFunction
                     << "Meshes local to processor" << procI << endl;
             }
         }
@@ -143,7 +143,8 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap
 
     if (debug)
     {
-        Info<< "Determining extent of src mesh per processor:" << nl
+        InfoInFunction
+            << "Determining extent of src mesh per processor:" << nl
             << "\tproc\tbb" << endl;
         forAll(procBb, procI)
         {
@@ -161,7 +162,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap
 
     {
         // per processor indices into all segments to send
-        List<DynamicList<label> > dynSendMap(Pstream::nProcs());
+        List<DynamicList<label>> dynSendMap(Pstream::nProcs());
         label iniSize = floor(tgt.nCells()/Pstream::nProcs());
 
         forAll(dynSendMap, procI)
@@ -584,7 +585,7 @@ void Foam::meshToMesh::distributeAndMergeCells
 
     // Count any coupled faces
     typedef FixedList<label, 3> label3;
-    typedef HashTable<label, label3, label3::Hash<> > procCoupleInfo;
+    typedef HashTable<label, label3, label3::Hash<>> procCoupleInfo;
     procCoupleInfo procFaceToGlobalCell;
 
     forAll(allNbrProcIDs, procI)
@@ -648,17 +649,14 @@ void Foam::meshToMesh::distributeAndMergeCells
     forAll(allPoints, procI)
     {
         const pointField& pts = allPoints[procI];
-        SubList<point>(tgtPoints, pts.size(), pointOffset[procI]).assign(pts);
+        SubList<point>(tgtPoints, pts.size(), pointOffset[procI]) = pts;
     }
 
     // Insert cellIDs
     forAll(allTgtCellIDs, procI)
     {
         const labelList& cellIDs = allTgtCellIDs[procI];
-        SubList<label>(tgtCellIDs, cellIDs.size(), cellOffset[procI]).assign
-        (
-            cellIDs
-        );
+        SubList<label>(tgtCellIDs, cellIDs.size(), cellOffset[procI]) = cellIDs;
     }
 
 
@@ -675,7 +673,7 @@ void Foam::meshToMesh::distributeAndMergeCells
             allNInternalFaces[procI],
             internalFaceOffset[procI]
         );
-        slice.assign(SubList<face>(fcs, allNInternalFaces[procI]));
+        slice = SubList<face>(fcs, allNInternalFaces[procI]);
         forAll(slice, i)
         {
             add(slice[i], pointOffset[procI]);
@@ -687,7 +685,7 @@ void Foam::meshToMesh::distributeAndMergeCells
             allNInternalFaces[procI],
             internalFaceOffset[procI]
         );
-        ownSlice.assign(SubField<label>(faceOs, allNInternalFaces[procI]));
+        ownSlice = SubField<label>(faceOs, allNInternalFaces[procI]);
         add(ownSlice, cellOffset[procI]);
 
         SubField<label> nbrSlice
@@ -696,7 +694,7 @@ void Foam::meshToMesh::distributeAndMergeCells
             allNInternalFaces[procI],
             internalFaceOffset[procI]
         );
-        nbrSlice.assign(SubField<label>(faceNs, allNInternalFaces[procI]));
+        nbrSlice = SubField<label>(faceNs, allNInternalFaces[procI]);
         add(nbrSlice, cellOffset[procI]);
 
         internalFaceOffset[procI] += allNInternalFaces[procI];
diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C
index 3e5c097b35a705b33196d0888b26dfc3541de34a..56dd95d341c767ce7400c8029009aab2ee67d2b9 100644
--- a/src/sampling/meshToMesh/meshToMeshTemplates.C
+++ b/src/sampling/meshToMesh/meshToMeshTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -112,6 +112,7 @@ void Foam::meshToMesh::mapSrcToTgt
 
             if (srcAddress.size())
             {
+//                result[cellI] = Zero;
                 result[cellI] *= (1.0 - sum(srcWeight));
                 forAll(srcAddress, i)
                 {
@@ -131,6 +132,7 @@ void Foam::meshToMesh::mapSrcToTgt
 
             if (srcAddress.size())
             {
+//                result[cellI] = Zero;
                 result[cellI] *= (1.0 - sum(srcWeight));
                 forAll(srcAddress, i)
                 {
@@ -239,31 +241,31 @@ void Foam::meshToMesh::mapSrcToTgt
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
 (
     const Field<Type>& srcField,
     const CombineOp& cop
 ) const
 {
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
         new Field<Type>
         (
             tgtToSrcCellAddr_.size(),
-            pTraits<Type>::zero
+            Zero
         )
     );
 
-    mapSrcToTgt(srcField, cop, tresult());
+    mapSrcToTgt(srcField, cop, tresult.ref());
 
     return tresult;
 }
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
 (
-    const tmp<Field<Type> >& tsrcField,
+    const tmp<Field<Type>>& tsrcField,
     const CombineOp& cop
 ) const
 {
@@ -272,7 +274,7 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
 (
     const Field<Type>& srcField
 ) const
@@ -282,9 +284,9 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapSrcToTgt
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
 (
-    const tmp<Field<Type> >& tsrcField
+    const tmp<Field<Type>>& tsrcField
 ) const
 {
     return mapSrcToTgt(tsrcField());
@@ -444,31 +446,31 @@ void Foam::meshToMesh::mapTgtToSrc
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
 (
     const Field<Type>& tgtField,
     const CombineOp& cop
 ) const
 {
-    tmp<Field<Type> > tresult
+    tmp<Field<Type>> tresult
     (
         new Field<Type>
         (
             srcToTgtCellAddr_.size(),
-            pTraits<Type>::zero
+            Zero
         )
     );
 
-    mapTgtToSrc(tgtField, cop, tresult());
+    mapTgtToSrc(tgtField, cop, tresult.ref());
 
     return tresult;
 }
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
 (
-    const tmp<Field<Type> >& ttgtField,
+    const tmp<Field<Type>>& ttgtField,
     const CombineOp& cop
 ) const
 {
@@ -477,7 +479,7 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
 (
     const Field<Type>& tgtField
 ) const
@@ -487,9 +489,9 @@ Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> > Foam::meshToMesh::mapTgtToSrc
+Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
 (
-    const tmp<Field<Type> >& ttgtField
+    const tmp<Field<Type>>& ttgtField
 ) const
 {
     return mapTgtToSrc(ttgtField(), plusEqOp<Type>());
@@ -531,7 +533,7 @@ void Foam::meshToMesh::mapAndOpSrcToTgt
     const CombineOp& cop
 ) const
 {
-    tgtField = pTraits<Type>::zero;
+    tgtField = Type(Zero);
 
     AMI.interpolateToTarget
     (
@@ -567,7 +569,7 @@ void Foam::meshToMesh::mapSrcToTgt
 
 
         // Clone and map (since rmap does not do general mapping)
-        tmp<fvPatchField<Type> > tnewTgt
+        tmp<fvPatchField<Type>> tnewTgt
         (
             fvPatchField<Type>::New
             (
@@ -592,7 +594,6 @@ void Foam::meshToMesh::mapSrcToTgt
         // tgtField
         tgtField.rmap(tnewTgt(), identity(tgtField.size()));
 
-
         // Override value to account for CombineOp (note: is dummy template
         // specialisation for plusEqOp)
         mapAndOpSrcToTgt(AMIList[i], srcField, tgtField, cop);
@@ -608,7 +609,7 @@ void Foam::meshToMesh::mapSrcToTgt
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapSrcToTgt
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
@@ -624,7 +625,7 @@ Foam::meshToMesh::mapSrcToTgt
     const typename fieldType::GeometricBoundaryField& srcBfld =
         field.boundaryField();
 
-    PtrList<fvPatchField<Type> > tgtPatchFields(tgtBm.size());
+    PtrList<fvPatchField<Type>> tgtPatchFields(tgtBm.size());
 
     // constuct tgt boundary patch types as copy of 'field' boundary types
     // note: this will provide place holders for fields with additional
@@ -687,22 +688,22 @@ Foam::meshToMesh::mapSrcToTgt
             ),
             tgtMesh,
             field.dimensions(),
-            Field<Type>(tgtMesh.nCells(), pTraits<Type>::zero),
+            Field<Type>(tgtMesh.nCells(), Zero),
             tgtPatchFields
         )
     );
 
-    mapSrcToTgt(field, cop, tresult(), secondOrder);
+    mapSrcToTgt(field, cop, tresult.ref(), secondOrder);
 
     return tresult;
 }
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapSrcToTgt
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
     const CombineOp& cop,
     const bool secondOrder
 ) const
@@ -712,7 +713,7 @@ Foam::meshToMesh::mapSrcToTgt
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapSrcToTgt
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
@@ -724,10 +725,10 @@ Foam::meshToMesh::mapSrcToTgt
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapSrcToTgt
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
     const bool secondOrder
 ) const
 {
@@ -770,7 +771,7 @@ void Foam::meshToMesh::mapAndOpTgtToSrc
     const CombineOp& cop
 ) const
 {
-    srcField = pTraits<Type>::zero;
+    srcField = Type(Zero);
 
     AMI.interpolateToSource
     (
@@ -804,9 +805,8 @@ void Foam::meshToMesh::mapTgtToSrc
         fvPatchField<Type>& srcField = result.boundaryField()[srcPatchI];
         const fvPatchField<Type>& tgtField = field.boundaryField()[tgtPatchI];
 
-
         // Clone and map (since rmap does not do general mapping)
-        tmp<fvPatchField<Type> > tnewSrc
+        tmp<fvPatchField<Type>> tnewSrc
         (
             fvPatchField<Type>::New
             (
@@ -831,7 +831,6 @@ void Foam::meshToMesh::mapTgtToSrc
         // tgtField
         srcField.rmap(tnewSrc(), identity(srcField.size()));
 
-
         // Override value to account for CombineOp (could be dummy for
         // plusEqOp)
         mapAndOpTgtToSrc(AMIList[i], srcField, tgtField, cop);
@@ -847,7 +846,7 @@ void Foam::meshToMesh::mapTgtToSrc
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapTgtToSrc
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
@@ -863,7 +862,7 @@ Foam::meshToMesh::mapTgtToSrc
     const typename fieldType::GeometricBoundaryField& tgtBfld =
         field.boundaryField();
 
-    PtrList<fvPatchField<Type> > srcPatchFields(srcBm.size());
+    PtrList<fvPatchField<Type>> srcPatchFields(srcBm.size());
 
     // constuct src boundary patch types as copy of 'field' boundary types
     // note: this will provide place holders for fields with additional
@@ -926,22 +925,22 @@ Foam::meshToMesh::mapTgtToSrc
             ),
             srcMesh,
             field.dimensions(),
-            Field<Type>(srcMesh.nCells(), pTraits<Type>::zero),
+            Field<Type>(srcMesh.nCells(), Zero),
             srcPatchFields
         )
     );
 
-    mapTgtToSrc(field, cop, tresult(), secondOrder);
+    mapTgtToSrc(field, cop, tresult.ref(), secondOrder);
 
     return tresult;
 }
 
 
 template<class Type, class CombineOp>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapTgtToSrc
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
     const CombineOp& cop,
     const bool secondOrder
 ) const
@@ -951,7 +950,7 @@ Foam::meshToMesh::mapTgtToSrc
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapTgtToSrc
 (
     const GeometricField<Type, fvPatchField, volMesh>& field,
@@ -963,10 +962,10 @@ Foam::meshToMesh::mapTgtToSrc
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh::mapTgtToSrc
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfield,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfield,
     const bool secondOrder
 ) const
 {
diff --git a/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C b/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C
index a3ca751858a7084aa3e3446a090dc38a88cbda74..7aea0547209b3e6848295e0c19e15841359cb324 100644
--- a/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C
+++ b/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -41,8 +41,8 @@ void Foam::meshToMesh0::calcAddressing()
 {
     if (debug)
     {
-        Info<< "meshToMesh0::calculateAddressing() : "
-            << "calculating mesh-to-mesh cell addressing" << endl;
+        InfoInFunction
+            << "Calculating mesh-to-mesh cell addressing" << endl;
     }
 
     // set reference to cells
@@ -62,8 +62,7 @@ void Foam::meshToMesh0::calcAddressing()
 
     if (debug)
     {
-        Info<< "meshToMesh0::calculateAddressing() : "
-            << "Setting up rescue" << endl;
+        InfoInFunction << "Setting up rescue" << endl;
     }
 
     List<bool> boundaryCell(fromCells.size(), false);
@@ -203,8 +202,8 @@ void Foam::meshToMesh0::calcAddressing()
 
     if (debug)
     {
-        Info<< "meshToMesh0::calculateAddressing() : "
-            << "finished calculating mesh-to-mesh cell addressing" << endl;
+        InfoInFunction
+            << "Finished calculating mesh-to-mesh cell addressing" << endl;
     }
 }
 
diff --git a/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C b/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C
index 7cf00f98958b805d45a6727dea9201a0656c3873..277e5e6d91d605b345499d9c16e5ba809adc502f 100644
--- a/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C
+++ b/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,8 @@ void Foam::meshToMesh0::calculateInverseDistanceWeights() const
 {
     if (debug)
     {
-        Info<< "meshToMesh0::calculateInverseDistanceWeights() : "
-            << "calculating inverse distance weighting factors" << endl;
+        InfoInFunction
+            << "Calculating inverse distance weighting factors" << endl;
     }
 
     if (inverseDistanceWeightsPtr_)
@@ -134,8 +134,8 @@ void Foam::meshToMesh0::calculateInverseVolumeWeights() const
 {
     if (debug)
     {
-        Info<< "meshToMesh0::calculateInverseVolumeWeights() : "
-            << "calculating inverse volume weighting factors" << endl;
+        InfoInFunction
+            << "Calculating inverse volume weighting factors" << endl;
     }
 
     if (inverseVolumeWeightsPtr_)
@@ -197,8 +197,8 @@ void Foam::meshToMesh0::calculateCellToCellAddressing() const
 {
     if (debug)
     {
-        Info<< "meshToMesh0::calculateCellToCellAddressing() : "
-            << "calculating cell to cell addressing" << endl;
+        InfoInFunction
+            << "Calculating cell to cell addressing" << endl;
     }
 
     if (cellToCellAddressingPtr_)
@@ -223,9 +223,6 @@ void Foam::meshToMesh0::calculateCellToCellAddressing() const
             overlapEngine.overlappingCells(fromMesh_, toMesh_, iTo);
         if (overLapCells.size() > 0)
         {
-            //Info << "To " << iTo << endl;
-            //Info << "cellToCell " << overLapCells << endl;
-
             cellToCell[iTo].setSize(overLapCells.size());
             forAll(overLapCells, j)
             {
diff --git a/src/sampling/meshToMesh0/meshToMesh0.H b/src/sampling/meshToMesh0/meshToMesh0.H
index d2c7ff03e4ed57ee5a45860db27e2773580c3c0d..885d4baeb05bc95508fe593381f27a8464db7228 100644
--- a/src/sampling/meshToMesh0/meshToMesh0.H
+++ b/src/sampling/meshToMesh0/meshToMesh0.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -311,7 +311,7 @@ public:
             void interpolateInternalField
             (
                 Field<Type>&,
-                const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+                const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
                 order=INTERPOLATE,
                 const CombineOp& cop = eqOp<Type>()
             ) const;
@@ -331,7 +331,7 @@ public:
             void interpolate
             (
                 GeometricField<Type, fvPatchField, volMesh>&,
-                const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+                const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
                 order=INTERPOLATE,
                 const CombineOp& cop = eqOp<Type>()
             ) const;
@@ -339,7 +339,7 @@ public:
 
             //- Interpolate volume field
             template<class Type, class CombineOp>
-            tmp<GeometricField<Type, fvPatchField, volMesh> > interpolate
+            tmp<GeometricField<Type, fvPatchField, volMesh>> interpolate
             (
                 const GeometricField<Type, fvPatchField, volMesh>&,
                 order=INTERPOLATE,
@@ -347,9 +347,9 @@ public:
             ) const;
 
             template<class Type, class CombineOp>
-            tmp<GeometricField<Type, fvPatchField, volMesh> > interpolate
+            tmp<GeometricField<Type, fvPatchField, volMesh>> interpolate
             (
-                const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
+                const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
                 order=INTERPOLATE,
                 const CombineOp& cop = eqOp<Type>()
             ) const;
@@ -363,7 +363,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "meshToMesh0Templates.C"
+    #include "meshToMesh0Templates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/meshToMesh0/meshToMesh0Templates.C b/src/sampling/meshToMesh0/meshToMesh0Templates.C
index 9595399bd20092f2ad544dfd097a28762ed948da..b36d2c55d4b2a9a4594738bc5254c3b2b3429e0a 100644
--- a/src/sampling/meshToMesh0/meshToMesh0Templates.C
+++ b/src/sampling/meshToMesh0/meshToMesh0Templates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,7 +70,7 @@ void Foam::meshToMesh0::interpolateField
         const labelList& overlapCells = adr[celli];
         const scalarList& w = weights[celli];
 
-        Type f = pTraits<Type>::zero;
+        Type f = Zero;
         forAll(overlapCells, i)
         {
             label fromCelli = overlapCells[i];
@@ -232,7 +232,7 @@ template<class Type, class CombineOp>
 void Foam::meshToMesh0::interpolateInternalField
 (
     Field<Type>& toF,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfromVf,
     meshToMesh0::order ord,
     const CombineOp& cop
 ) const
@@ -310,9 +310,9 @@ void Foam::meshToMesh0::interpolate
                         << exit(FatalError);
             }
 
-            if (isA<mixedFvPatchField<Type> >(toVf.boundaryField()[patchi]))
+            if (isA<mixedFvPatchField<Type>>(toVf.boundaryField()[patchi]))
             {
-                refCast<mixedFvPatchField<Type> >
+                refCast<mixedFvPatchField<Type>>
                 (
                     toVf.boundaryField()[patchi]
                 ).refValue() = toVf.boundaryField()[patchi];
@@ -354,7 +354,7 @@ template<class Type, class CombineOp>
 void Foam::meshToMesh0::interpolate
 (
     GeometricField<Type, fvPatchField, volMesh>& toVf,
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfromVf,
     meshToMesh0::order ord,
     const CombineOp& cop
 ) const
@@ -365,7 +365,7 @@ void Foam::meshToMesh0::interpolate
 
 
 template<class Type, class CombineOp>
-Foam::tmp< Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh0::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& fromVf,
@@ -388,7 +388,7 @@ Foam::meshToMesh0::interpolate
     }
 
     // Create and map the patch field values
-    PtrList<fvPatchField<Type> > patchFields
+    PtrList<fvPatchField<Type>> patchFields
     (
         boundaryAddressing_.size()
     );
@@ -413,7 +413,7 @@ Foam::meshToMesh0::interpolate
 
 
     // Create the complete field from the pieces
-    tmp<GeometricField<Type, fvPatchField, volMesh> > ttoF
+    tmp<GeometricField<Type, fvPatchField, volMesh>> ttoF
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -437,15 +437,15 @@ Foam::meshToMesh0::interpolate
 
 
 template<class Type, class CombineOp>
-Foam::tmp< Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::meshToMesh0::interpolate
 (
-    const tmp<GeometricField<Type, fvPatchField, volMesh> >& tfromVf,
+    const tmp<GeometricField<Type, fvPatchField, volMesh>>& tfromVf,
     meshToMesh0::order ord,
     const CombineOp& cop
 ) const
 {
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tint =
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tint =
         interpolate(tfromVf(), ord, cop);
     tfromVf.clear();
 
diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C
index 23868f5f8ddcc498d278eb5c041436549dc8efee..511fa12378a4c58ba101cd977f272027ea9f3286 100644
--- a/src/sampling/probes/patchProbes.C
+++ b/src/sampling/probes/patchProbes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,6 @@ License
 #include "patchProbes.H"
 #include "volFields.H"
 #include "IOmanip.H"
-// For 'nearInfo' helper class only
 #include "mappedPatchBase.H"
 #include "treeBoundBox.H"
 #include "treeDataFace.H"
@@ -172,7 +171,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
 
     if (debug)
     {
-        Info<< "patchProbes::findElements" << " : " << endl;
+        InfoInFunction << endl;
         forAll(nearest, sampleI)
         {
             label procI = nearest[sampleI].second().second();
diff --git a/src/sampling/probes/patchProbes.H b/src/sampling/probes/patchProbes.H
index e24b05efcec3f5ad4d9a621af52f3ac3369d450a..3d006eddd447a13d654753638ad053da5dbb2f26 100644
--- a/src/sampling/probes/patchProbes.H
+++ b/src/sampling/probes/patchProbes.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,21 +128,21 @@ protected:
 
         //- Sample a volume field at all locations
         template<class Type>
-        tmp<Field<Type> > sample
+        tmp<Field<Type>> sample
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
         //- Sample a surface field at all locations
         template<class Type>
-        tmp<Field<Type> > sample
+        tmp<Field<Type>> sample
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>&
         ) const;
 
         //- Sample a single field on all sample locations
         template<class Type>
-        tmp<Field<Type> > sample(const word& fieldName) const;
+        tmp<Field<Type>> sample(const word& fieldName) const;
 
         //- Find elements containing patchProbes
         virtual void findElements(const fvMesh&);
@@ -199,7 +199,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "patchProbesTemplates.C"
+    #include "patchProbesTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C
index e0ff2206e74b893c498f5ebf2529efb1ef9d92bf..78cd41b9255295f0065d162e9f9a6c87bc867ee4 100644
--- a/src/sampling/probes/patchProbesTemplates.C
+++ b/src/sampling/probes/patchProbesTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -123,7 +123,7 @@ void Foam::patchProbes::sampleAndWrite
                 sampleAndWrite
                 (
                     mesh_.lookupObject
-                    <GeometricField<Type, fvPatchField, volMesh> >
+                    <GeometricField<Type, fvPatchField, volMesh>>
                     (
                         fields[fieldI]
                     )
@@ -175,7 +175,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
                 sampleAndWrite
                 (
                     mesh_.lookupObject
-                    <GeometricField<Type, fvsPatchField, surfaceMesh> >
+                    <GeometricField<Type, fvsPatchField, surfaceMesh>>
                     (
                         fields[fieldI]
                     )
@@ -189,7 +189,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::patchProbes::sample
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
@@ -197,12 +197,12 @@ Foam::patchProbes::sample
 {
     const Type unsetVal(-VGREAT*pTraits<Type>::one);
 
-    tmp<Field<Type> > tValues
+    tmp<Field<Type>> tValues
     (
         new Field<Type>(this->size(), unsetVal)
     );
 
-    Field<Type>& values = tValues();
+    Field<Type>& values = tValues.ref();
 
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
@@ -226,12 +226,12 @@ Foam::patchProbes::sample
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::patchProbes::sample(const word& fieldName) const
 {
     return sample
     (
-        mesh_.lookupObject<GeometricField<Type, fvPatchField, volMesh> >
+        mesh_.lookupObject<GeometricField<Type, fvPatchField, volMesh>>
         (
             fieldName
         )
@@ -240,7 +240,7 @@ Foam::patchProbes::sample(const word& fieldName) const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::patchProbes::sample
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& sField
@@ -248,12 +248,12 @@ Foam::patchProbes::sample
 {
     const Type unsetVal(-VGREAT*pTraits<Type>::one);
 
-    tmp<Field<Type> > tValues
+    tmp<Field<Type>> tValues
     (
         new Field<Type>(this->size(), unsetVal)
     );
 
-    Field<Type>& values = tValues();
+    Field<Type>& values = tValues.ref();
 
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C
index 078d79673a2f5a4ffb490739b4fc90b1f534fd68..e9dfa5648d37bb4944220981f7aae19b92a836b2 100644
--- a/src/sampling/probes/probes.C
+++ b/src/sampling/probes/probes.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -67,7 +67,7 @@ void Foam::probes::findElements(const fvMesh& mesh)
             const vector& cellCentre = mesh.cellCentres()[cellI];
             scalar minDistance = GREAT;
             label minFaceID = -1;
-            forAll (cellFaces, i)
+            forAll(cellFaces, i)
             {
                 label faceI = cellFaces[i];
                 vector dist = mesh.faceCentres()[faceI] - cellCentre;
diff --git a/src/sampling/probes/probes.H b/src/sampling/probes/probes.H
index ec759f11139df2fc067fad5accba6a2cbc185796..95d8b980ab384527553c108a080d28570248fe03 100644
--- a/src/sampling/probes/probes.H
+++ b/src/sampling/probes/probes.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -313,22 +313,22 @@ public:
 
         //- Sample a volume field at all locations
         template<class Type>
-        tmp<Field<Type> > sample
+        tmp<Field<Type>> sample
         (
             const GeometricField<Type, fvPatchField, volMesh>&
         ) const;
 
         //- Sample a single vol field on all sample locations
         template<class Type>
-        tmp<Field<Type> > sample(const word& fieldName) const;
+        tmp<Field<Type>> sample(const word& fieldName) const;
 
         //- Sample a single scalar field on all sample locations
         template<class Type>
-        tmp<Field<Type> > sampleSurfaceFields(const word& fieldName) const;
+        tmp<Field<Type>> sampleSurfaceFields(const word& fieldName) const;
 
         //- Sample a surface field at all locations
         template<class Type>
-        tmp<Field<Type> > sample
+        tmp<Field<Type>> sample
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>&
         ) const;
@@ -342,7 +342,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "probesTemplates.C"
+    #include "probesTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/probes/probesTemplates.C b/src/sampling/probes/probesTemplates.C
index 6e358f9795642542294ede17dcf5b5bdd802277a..9f1332547864b89db53e8dec2a583831f4179e48 100644
--- a/src/sampling/probes/probesTemplates.C
+++ b/src/sampling/probes/probesTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,7 +34,6 @@ License
 namespace Foam
 {
 
-//- Comparison operator for probes class
 template<class T>
 class isNotEqOp
 {
@@ -150,7 +149,7 @@ void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
                 sampleAndWrite
                 (
                     mesh_.lookupObject
-                    <GeometricField<Type, fvPatchField, volMesh> >
+                    <GeometricField<Type, fvPatchField, volMesh>>
                     (
                         fields[fieldI]
                     )
@@ -199,7 +198,7 @@ void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
                 sampleAndWrite
                 (
                     mesh_.lookupObject
-                    <GeometricField<Type, fvsPatchField, surfaceMesh> >
+                    <GeometricField<Type, fvsPatchField, surfaceMesh>>
                     (
                         fields[fieldI]
                     )
@@ -212,7 +211,7 @@ void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::probes::sample
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
@@ -220,16 +219,16 @@ Foam::probes::sample
 {
     const Type unsetVal(-VGREAT*pTraits<Type>::one);
 
-    tmp<Field<Type> > tValues
+    tmp<Field<Type>> tValues
     (
         new Field<Type>(this->size(), unsetVal)
     );
 
-    Field<Type>& values = tValues();
+    Field<Type>& values = tValues.ref();
 
     if (fixedLocations_)
     {
-        autoPtr<interpolation<Type> > interpolator
+        autoPtr<interpolation<Type>> interpolator
         (
             interpolation<Type>::New(interpolationScheme_, vField)
         );
@@ -268,12 +267,12 @@ Foam::probes::sample
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::probes::sample(const word& fieldName) const
 {
     return sample
     (
-        mesh_.lookupObject<GeometricField<Type, fvPatchField, volMesh> >
+        mesh_.lookupObject<GeometricField<Type, fvPatchField, volMesh>>
         (
             fieldName
         )
@@ -282,7 +281,7 @@ Foam::probes::sample(const word& fieldName) const
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::probes::sample
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& sField
@@ -290,12 +289,12 @@ Foam::probes::sample
 {
     const Type unsetVal(-VGREAT*pTraits<Type>::one);
 
-    tmp<Field<Type> > tValues
+    tmp<Field<Type>> tValues
     (
         new Field<Type>(this->size(), unsetVal)
     );
 
-    Field<Type>& values = tValues();
+    Field<Type>& values = tValues.ref();
 
     forAll(*this, probeI)
     {
@@ -313,12 +312,12 @@ Foam::probes::sample
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::probes::sampleSurfaceFields(const word& fieldName) const
 {
     return sample
     (
-        mesh_.lookupObject<GeometricField<Type, fvsPatchField, surfaceMesh> >
+        mesh_.lookupObject<GeometricField<Type, fvsPatchField, surfaceMesh>>
         (
             fieldName
         )
diff --git a/src/sampling/sampledSet/face/faceOnlySet.C b/src/sampling/sampledSet/face/faceOnlySet.C
index d3e1ff847e8c966684d80e614f00015566a5d9b9..48a0f5be3c52061061a76fc5fba61a160b327f57 100644
--- a/src/sampling/sampledSet/face/faceOnlySet.C
+++ b/src/sampling/sampledSet/face/faceOnlySet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,6 +36,8 @@ namespace Foam
 {
     defineTypeNameAndDebug(faceOnlySet, 0);
     addToRunTimeSelectionTable(sampledSet, faceOnlySet, word);
+
+    const scalar faceOnlySet::tol = 1e-6;
 }
 
 
@@ -45,20 +47,15 @@ bool Foam::faceOnlySet::trackToBoundary
 (
     passiveParticleCloud& particleCloud,
     passiveParticle& singleParticle,
+    const scalar smallDist,
     DynamicList<point>& samplingPts,
     DynamicList<label>& samplingCells,
     DynamicList<label>& samplingFaces,
     DynamicList<scalar>& samplingCurveDist
 ) const
 {
-    // distance vector between sampling points
-    const vector offset = end_ - start_;
-    const vector smallVec = tol*offset;
-    const scalar smallDist = mag(smallVec);
-
     particle::TrackingData<passiveParticleCloud> trackData(particleCloud);
 
-    // Alias
     const point& trackPt = singleParticle.position();
 
     while(true)
@@ -78,12 +75,12 @@ bool Foam::faceOnlySet::trackToBoundary
 
         if (mag(trackPt - end_) < smallDist)
         {
-            // end reached
+            // End reached
             return false;
         }
         else if (singleParticle.onBoundary())
         {
-            // Boundary reached.
+            // Boundary reached
             return true;
         }
     }
@@ -99,7 +96,7 @@ void Foam::faceOnlySet::calcSamples
     DynamicList<scalar>& samplingCurveDist
 ) const
 {
-    // distance vector between sampling points
+    // Distance vector between sampling points
     if (mag(end_ - start_) < SMALL)
     {
         FatalErrorInFunction
@@ -136,31 +133,29 @@ void Foam::faceOnlySet::calcSamples
     }
 
     // Get first tracking point. Use bPoint, bFaceI if provided.
-
     point trackPt;
     label trackCellI = -1;
     label trackFaceI = -1;
 
-    //Info<< "before getTrackingPoint : bPoint:" << bPoint
-    //    << " bFaceI:" << bFaceI << endl;
+    // Pout<< "before getTrackingPoint : bPoint:" << bPoint
+    //     << " bFaceI:" << bFaceI << endl;
 
     getTrackingPoint
     (
-        offset,
         start_,
         bPoint,
         bFaceI,
-
+        smallDist,
         trackPt,
         trackCellI,
         trackFaceI
     );
 
-    //Info<< "after getTrackingPoint : "
-    //    << " trackPt:" << trackPt
-    //    << " trackCellI:" << trackCellI
-    //    << " trackFaceI:" << trackFaceI
-    //    << endl;
+    // Pout<< "after getTrackingPoint : "
+    //     << " trackPt:" << trackPt
+    //     << " trackCellI:" << trackCellI
+    //     << " trackFaceI:" << trackFaceI
+    //     << endl;
 
     if (trackCellI == -1)
     {
@@ -180,11 +175,11 @@ void Foam::faceOnlySet::calcSamples
         trackFaceI = findNearFace(trackCellI, trackPt, smallDist);
     }
 
-    //Info<< "calcSamples : got first point to track from :"
-    //    << "  trackPt:" << trackPt
-    //    << "  trackCell:" << trackCellI
-    //    << "  trackFace:" << trackFaceI
-    //    << endl;
+    // Pout<< "calcSamples : got first point to track from :"
+    //     << "  trackPt:" << trackPt
+    //     << "  trackCell:" << trackCellI
+    //     << "  trackFace:" << trackFaceI
+    //     << endl;
 
     //
     // Track until hit end of all boundary intersections
@@ -199,11 +194,11 @@ void Foam::faceOnlySet::calcSamples
     // index in bHits; current boundary intersection
     label bHitI = 1;
 
-    while(true)
+    while (true)
     {
         if (trackFaceI != -1)
         {
-            //Info<< "trackPt:" << trackPt << " on face so use." << endl;
+            // Pout<< "trackPt:" << trackPt << " on face so use." << endl;
             samplingPts.append(trackPt);
             samplingCells.append(trackCellI);
             samplingFaces.append(trackFaceI);
@@ -222,32 +217,27 @@ void Foam::faceOnlySet::calcSamples
         (
             particleCloud,
             singleParticle,
+            smallDist,
             samplingPts,
             samplingCells,
             samplingFaces,
             samplingCurveDist
         );
 
-        // fill sampleSegments
+        // Fill sampleSegments
         for (label i = samplingPts.size() - 1; i >= startSegmentI; --i)
         {
             samplingSegments.append(segmentI);
         }
 
-
         if (!reachedBoundary)
         {
-            //Info<< "calcSamples : Reached end of samples: "
-            //    << "  samplePt now:" << singleParticle.position()
-            //    << endl;
+            // Pout<< "calcSamples : Reached end of samples: "
+            //     << "  samplePt now:" << singleParticle.position()
+            //     << endl;
             break;
         }
 
-
-        // Go past boundary intersection where tracking stopped
-        // Use coordinate comparison instead of face comparison for
-        // accuracy reasons
-
         bool foundValidB = false;
 
         while (bHitI < bHits.size())
@@ -256,15 +246,15 @@ void Foam::faceOnlySet::calcSamples
                 (bHits[bHitI].hitPoint() - singleParticle.position())
               & normOffset;
 
-            //Info<< "Finding next boundary : "
-            //    << "bPoint:" << bHits[bHitI].hitPoint()
-            //    << "  tracking:" << singleParticle.position()
-            //    << "  dist:" << dist
-            //    << endl;
+            // Pout<< "Finding next boundary : "
+            //     << "bPoint:" << bHits[bHitI].hitPoint()
+            //     << "  tracking:" << singleParticle.position()
+            //     << "  dist:" << dist
+            //     << endl;
 
             if (dist > smallDist)
             {
-                // hitpoint is past tracking position
+                // Hit-point is past tracking position
                 foundValidB = true;
                 break;
             }
@@ -274,7 +264,7 @@ void Foam::faceOnlySet::calcSamples
             }
         }
 
-        if (!foundValidB)
+        if (!foundValidB || bHitI == bHits.size() - 1)
         {
             // No valid boundary intersection found beyond tracking position
             break;
diff --git a/src/sampling/sampledSet/face/faceOnlySet.H b/src/sampling/sampledSet/face/faceOnlySet.H
index fdb47d4d435d3d7cc138a1e0cdc638a1a35ffe64..009c3b66e7b771ae262fbfbdd0b10da936f98e6a 100644
--- a/src/sampling/sampledSet/face/faceOnlySet.H
+++ b/src/sampling/sampledSet/face/faceOnlySet.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,6 +70,7 @@ class faceOnlySet
         (
             passiveParticleCloud& particleCloud,
             passiveParticle& singleParticle,
+            const scalar smallDist,
             DynamicList<point>& samplingPts,
             DynamicList<label>& samplingCells,
             DynamicList<label>& samplingFaces,
@@ -96,6 +97,14 @@ public:
     //- Runtime type information
     TypeName("face");
 
+
+    // Static data
+
+        //- Tolerance when comparing points relative to difference between
+        //  start_ and end_
+        static const scalar tol;
+
+
     // Constructors
 
         //- Construct from components
diff --git a/src/sampling/sampledSet/midPoint/midPointSet.C b/src/sampling/sampledSet/midPoint/midPointSet.C
index d0ea99108c8e9649a213519d4e49fe9cf68c60e7..38031ee7b00ead9c8bd59e1817d0492c7810baff 100644
--- a/src/sampling/sampledSet/midPoint/midPointSet.C
+++ b/src/sampling/sampledSet/midPoint/midPointSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,6 +25,7 @@ License
 
 #include "midPointSet.H"
 #include "polyMesh.H"
+#include "meshSearch.H"
 #include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -47,58 +48,46 @@ void Foam::midPointSet::genSamples()
     labelList midSegments(2*size());
     scalarList midCurveDist(2*size());
 
-    label midI = 0;
+    label mSamplei = 0;
+    label samplei = 0;
 
-    label sampleI = 0;
-
-    while(true && size()>0)
+    while (size() > 0)
     {
-        // calculate midpoint between sampleI and sampleI+1 (if in same segment)
+        // Calculate midpoint between samplei and samplei+1 (if in same segment)
         while
         (
-            (sampleI < size() - 1)
-         && (segments_[sampleI] == segments_[sampleI+1])
+            (samplei < size() - 1)
+         && (segments_[samplei] == segments_[samplei+1])
         )
         {
-            midPoints[midI] =
-                0.5*(operator[](sampleI) + operator[](sampleI+1));
-
-            label cell1 = getCell(faces_[sampleI], midPoints[midI]);
-            label cell2 = getCell(faces_[sampleI+1], midPoints[midI]);
+            point midPoint(0.5*(operator[](samplei) + operator[](samplei+1)));
+            label cellm = pointInCell(midPoint, samplei);
 
-            if (cell1 != cell2)
+            if (cellm != -1)
             {
-                FatalErrorInFunction
-                    << "  midI:" << midI
-                    << "  sampleI:" << sampleI
-                    << "  pts[sampleI]:" << operator[](sampleI)
-                    << "  face[sampleI]:" << faces_[sampleI]
-                    << "  pts[sampleI+1]:" << operator[](sampleI+1)
-                    << "  face[sampleI+1]:" << faces_[sampleI+1]
-                    << "  cell1:" << cell1
-                    << "  cell2:" << cell2
-                    << abort(FatalError);
+                midPoints[mSamplei] = midPoint;
+                midCells[mSamplei] = cellm;
+                midSegments[mSamplei] = segments_[samplei];
+                midCurveDist[mSamplei] = mag(midPoints[mSamplei] - start());
+                mSamplei++;
             }
 
-            midCells[midI] = cell1;
-            midSegments[midI] = segments_[sampleI];
-            midCurveDist[midI] = mag(midPoints[midI] - start());
-
-            midI++;
-            sampleI++;
+            samplei++;
         }
 
-        if (sampleI == size() - 1)
+        if (samplei == size() - 1)
         {
             break;
         }
-        sampleI++;
+
+        samplei++;
     }
 
-    midPoints.setSize(midI);
-    midCells.setSize(midI);
-    midSegments.setSize(midI);
-    midCurveDist.setSize(midI);
+    midPoints.setSize(mSamplei);
+    midCells.setSize(mSamplei);
+    midSegments.setSize(mSamplei);
+    midCurveDist.setSize(mSamplei);
+
     setSamples
     (
         midPoints,
diff --git a/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C b/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C
index 7a57549855957e856cfc10c044b14dd8ea8bc417..1628ca50ef1c5889f6fe20757515a0eb9758775f 100644
--- a/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C
+++ b/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,101 +39,83 @@ namespace Foam
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
-// Rework faceOnlySet samples.
-// Take two consecutive samples
 void Foam::midPointAndFaceSet::genSamples()
 {
     // Generate midpoints and add to face points
 
-    List<point> newSamplePoints(3*size());
-    labelList newSampleCells(3*size());
-    labelList newSampleFaces(3*size());
-    labelList newSampleSegments(3*size());
-    scalarList newSampleCurveDist(3*size());
+    List<point> mpfSamplePoints(3*size());
+    labelList mpfSampleCells(3*size());
+    labelList mpfSampleFaces(3*size());
+    labelList mpfSampleSegments(3*size());
+    scalarList mpfSampleCurveDist(3*size());
 
-    label newSampleI = 0;
+    label mpfSamplei = 0;
+    label samplei = 0;
 
-    label sampleI = 0;
-
-    while(true && size()>0)
+    while (size() > 0)
     {
-        // sampleI is start of segment
-
-        // Add sampleI
-        newSamplePoints[newSampleI] = operator[](sampleI);
-        newSampleCells[newSampleI] = cells_[sampleI];
-        newSampleFaces[newSampleI] = faces_[sampleI];
-        newSampleSegments[newSampleI] = segments_[sampleI];
-        newSampleCurveDist[newSampleI] = curveDist_[sampleI];
-        newSampleI++;
+        // Add first face
+        mpfSamplePoints[mpfSamplei] = operator[](samplei);
+        mpfSampleCells[mpfSamplei] = cells_[samplei];
+        mpfSampleFaces[mpfSamplei] = faces_[samplei];
+        mpfSampleSegments[mpfSamplei] = segments_[samplei];
+        mpfSampleCurveDist[mpfSamplei] = curveDist_[samplei];
+        mpfSamplei++;
 
         while
         (
-            (sampleI < size() - 1)
-         && (segments_[sampleI] == segments_[sampleI+1])
+            (samplei < size() - 1)
+         && (segments_[samplei] == segments_[samplei+1])
         )
         {
-            // Add mid point
-            const point mid = 0.5*(operator[](sampleI) + operator[](sampleI+1));
-
-            label cell1 = getCell(faces_[sampleI], mid);
-            label cell2 = getCell(faces_[sampleI+1], mid);
+            point midPoint(0.5*(operator[](samplei) + operator[](samplei+1)));
+            label cellm = pointInCell(midPoint, samplei);
 
-            if (cell1 != cell2)
+            if (cellm != -1)
             {
-                FatalErrorInFunction
-                    << "  newSampleI:" << newSampleI
-                    << "  pts[sampleI]:" << operator[](sampleI)
-                    << "  face[sampleI]:" << faces_[sampleI]
-                    << "  pts[sampleI+1]:" << operator[](sampleI+1)
-                    << "  face[sampleI+1]:" << faces_[sampleI+1]
-                    << "  cell1:" << cell1
-                    << "  cell2:" << cell2
-                    << abort(FatalError);
+                mpfSamplePoints[mpfSamplei] = midPoint;
+                mpfSampleCells[mpfSamplei] = cellm;
+                mpfSampleFaces[mpfSamplei] = -1;
+                mpfSampleSegments[mpfSamplei] = segments_[samplei];
+                mpfSampleCurveDist[mpfSamplei] =
+                    mag(mpfSamplePoints[mpfSamplei] - start());
+
+                mpfSamplei++;
             }
 
-            newSamplePoints[newSampleI] = mid;
-            newSampleCells[newSampleI] = cell1;
-            newSampleFaces[newSampleI] = -1;
-            newSampleSegments[newSampleI] = segments_[sampleI];
-            newSampleCurveDist[newSampleI] =
-                mag(newSamplePoints[newSampleI] - start());
-
-            newSampleI++;
-
-            // Add sampleI+1
-            newSamplePoints[newSampleI] = operator[](sampleI+1);
-            newSampleCells[newSampleI] = cells_[sampleI+1];
-            newSampleFaces[newSampleI] = faces_[sampleI+1];
-            newSampleSegments[newSampleI] = segments_[sampleI+1];
-            newSampleCurveDist[newSampleI] =
-                mag(newSamplePoints[newSampleI] - start());
+            // Add second face
+            mpfSamplePoints[mpfSamplei] = operator[](samplei+1);
+            mpfSampleCells[mpfSamplei] = cells_[samplei+1];
+            mpfSampleFaces[mpfSamplei] = faces_[samplei+1];
+            mpfSampleSegments[mpfSamplei] = segments_[samplei+1];
+            mpfSampleCurveDist[mpfSamplei] =
+                mag(mpfSamplePoints[mpfSamplei] - start());
 
-            newSampleI++;
+            mpfSamplei++;
 
-            sampleI++;
+            samplei++;
         }
 
-        if (sampleI == size() - 1)
+        if (samplei == size() - 1)
         {
             break;
         }
-        sampleI++;
+        samplei++;
     }
 
-    newSamplePoints.setSize(newSampleI);
-    newSampleCells.setSize(newSampleI);
-    newSampleFaces.setSize(newSampleI);
-    newSampleSegments.setSize(newSampleI);
-    newSampleCurveDist.setSize(newSampleI);
+    mpfSamplePoints.setSize(mpfSamplei);
+    mpfSampleCells.setSize(mpfSamplei);
+    mpfSampleFaces.setSize(mpfSamplei);
+    mpfSampleSegments.setSize(mpfSamplei);
+    mpfSampleCurveDist.setSize(mpfSamplei);
 
     setSamples
     (
-        newSamplePoints,
-        newSampleCells,
-        newSampleFaces,
-        newSampleSegments,
-        newSampleCurveDist
+        mpfSamplePoints,
+        mpfSampleCells,
+        mpfSampleFaces,
+        mpfSampleSegments,
+        mpfSampleCurveDist
     );
 }
 
diff --git a/src/sampling/sampledSet/polyLine/polyLineSet.C b/src/sampling/sampledSet/polyLine/polyLineSet.C
index 7ce2e3fdc23e162ef4709e458b9b2e8ddfeb2cfe..f5ff5b461bbc5c5d0a5df6512a6b45a65758e020 100644
--- a/src/sampling/sampledSet/polyLine/polyLineSet.C
+++ b/src/sampling/sampledSet/polyLine/polyLineSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,6 +36,8 @@ namespace Foam
 {
     defineTypeNameAndDebug(polyLineSet, 0);
     addToRunTimeSelectionTable(sampledSet, polyLineSet, word);
+
+    const scalar polyLineSet::tol = 1e-6;
 }
 
 
@@ -205,10 +207,10 @@ void Foam::polyLineSet::calcSamples
             bool isSample =
                 getTrackingPoint
                 (
-                    sampleCoords_[sampleI+1] - sampleCoords_[sampleI],
                     sampleCoords_[sampleI],
                     bPoint,
                     bFaceI,
+                    smallDist,
 
                     trackPt,
                     trackCellI,
diff --git a/src/sampling/sampledSet/polyLine/polyLineSet.H b/src/sampling/sampledSet/polyLine/polyLineSet.H
index 3dc880246a84f8289619fa2304d9811b3a2bea9e..c97ff9fc7d0de9742920d2421dcf0743dbf67480 100644
--- a/src/sampling/sampledSet/polyLine/polyLineSet.H
+++ b/src/sampling/sampledSet/polyLine/polyLineSet.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,6 +95,13 @@ public:
     TypeName("polyLine");
 
 
+    // Static data
+
+        //- Tolerance when comparing points relative to difference between
+        //  start_ and end_
+        static const scalar tol;
+
+
     // Constructors
 
         //- Construct from components
diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C
index 4be25ac3e1e117eecb9f07193f724f49e7632cfc..6930bdcb8003cd4c8986ce61aa1dbd6e01baf7a2 100644
--- a/src/sampling/sampledSet/sampledSet/sampledSet.C
+++ b/src/sampling/sampledSet/sampledSet/sampledSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,8 +34,6 @@ License
 
 namespace Foam
 {
-    const scalar sampledSet::tol = 1e-6;
-
     defineTypeNameAndDebug(sampledSet, 0);
     defineRunTimeSelectionTable(sampledSet, word);
 }
@@ -49,61 +47,88 @@ Foam::label Foam::sampledSet::getBoundaryCell(const label faceI) const
 }
 
 
-Foam::label Foam::sampledSet::getCell
-(
-    const label faceI,
-    const point& sample
-) const
+Foam::label Foam::sampledSet::getNeighbourCell(const label faceI) const
 {
-    if (faceI == -1)
-    {
-        FatalErrorInFunction
-            << "Illegal face label " << faceI
-            << abort(FatalError);
-    }
-
     if (faceI >= mesh().nInternalFaces())
     {
-        label cellI = getBoundaryCell(faceI);
-
-        if (!mesh().pointInCell(sample, cellI, searchEngine_.decompMode()))
-        {
-            FatalErrorInFunction
-                << "Found cell " << cellI << " using face " << faceI
-                << ". But cell does not contain point " << sample
-                << abort(FatalError);
-        }
-        return cellI;
+        return mesh().faceOwner()[faceI];
     }
     else
     {
-        // Try owner and neighbour to see which one contains sample
+        return mesh().faceNeighbour()[faceI];
+    }
+}
 
-        label cellI = mesh().faceOwner()[faceI];
 
-        if (mesh().pointInCell(sample, cellI, searchEngine_.decompMode()))
-        {
-            return cellI;
-        }
-        else
+Foam::label Foam::sampledSet::pointInCell
+(
+    const point& p,
+    const label samplei
+) const
+{
+    // Collect the face owner and neighbour cells of the sample into an array
+    // for convenience
+    label cells[4] =
+    {
+        mesh().faceOwner()[faces_[samplei]],
+        getNeighbourCell(faces_[samplei]),
+        mesh().faceOwner()[faces_[samplei+1]],
+        getNeighbourCell(faces_[samplei+1])
+    };
+
+    // Find the sampled cell by checking the owners and neighbours of the
+    // sampled faces
+    label cellm =
+        (cells[0] == cells[2] || cells[0] == cells[3]) ? cells[0]
+      : (cells[1] == cells[2] || cells[1] == cells[3]) ? cells[1]
+      : -1;
+
+    if (cellm != -1)
+    {
+        // If found the sampled cell check the point is in the cell
+        // otherwise ignore
+        if (!mesh().pointInCell(p, cellm, searchEngine_.decompMode()))
         {
-            cellI = mesh().faceNeighbour()[faceI];
+           cellm = -1;
 
-            if (mesh().pointInCell(sample, cellI, searchEngine_.decompMode()))
+            if (debug)
             {
-                return cellI;
+                WarningInFunction
+                    << "Could not find mid-point " << p
+                    << " cell " << cellm << endl;
             }
-            else
+        }
+    }
+    else
+    {
+        // If the sample does not pass through a single cell check if the point
+        // is in any of the owners or neighbours otherwise ignore
+        for (label i=0; i<4; i++)
+        {
+            if (mesh().pointInCell(p, cells[i], searchEngine_.decompMode()))
             {
-                FatalErrorInFunction
-                    << "None of the neighbours of face "
-                    << faceI << " contains point " << sample
-                    << abort(FatalError);
-
-                return -1;
+                return cells[i];
             }
         }
+
+        if (debug)
+        {
+            WarningInFunction
+                << "Could not find cell for mid-point" << nl
+                << "  samplei: " << samplei
+                << "  pts[samplei]: " << operator[](samplei)
+                << "  face[samplei]: " << faces_[samplei]
+                << "  pts[samplei+1]: " << operator[](samplei+1)
+                << "  face[samplei+1]: " << faces_[samplei+1]
+                << "  cellio: " << cells[0]
+                << "  cellin: " << cells[1]
+                << "  celljo: " << cells[2]
+                << "  celljn: " << cells[3]
+                << endl;
+        }
     }
+
+    return cellm;
 }
 
 
@@ -119,7 +144,7 @@ Foam::scalar Foam::sampledSet::calcSign
 
     if (magVec < VSMALL)
     {
-        // sample on face centre. Regard as inside
+        // Sample on face centre. Regard as inside
         return -1;
     }
 
@@ -133,7 +158,6 @@ Foam::scalar Foam::sampledSet::calcSign
 }
 
 
-// Return face (or -1) of face which is within smallDist of sample
 Foam::label Foam::sampledSet::findNearFace
 (
     const label cellI,
@@ -169,8 +193,6 @@ Foam::label Foam::sampledSet::findNearFace
 }
 
 
-// 'Pushes' point facePt (which is almost on face) in direction of cell centre
-// so it is clearly inside.
 Foam::point Foam::sampledSet::pushIn
 (
     const point& facePt,
@@ -224,30 +246,22 @@ Foam::point Foam::sampledSet::pushIn
             << abort(FatalError);
     }
 
-    //Info<< "pushIn : moved " << facePt << " to " << newPosition
-    //    << endl;
-
     return newPosition;
 }
 
 
-// Calculates start of tracking given samplePt and first boundary intersection
-// (bPoint, bFaceI). bFaceI == -1 if no boundary intersection.
-// Returns true if trackPt is sampling point
 bool Foam::sampledSet::getTrackingPoint
 (
-    const vector& offset,
     const point& samplePt,
     const point& bPoint,
     const label bFaceI,
+    const scalar smallDist,
 
     point& trackPt,
     label& trackCellI,
     label& trackFaceI
 ) const
 {
-    const scalar smallDist = mag(tol*offset);
-
     bool isGoodSample = false;
 
     if (bFaceI == -1)
@@ -268,9 +282,6 @@ bool Foam::sampledSet::getTrackingPoint
         {
             // Line samplePt - end_ does not intersect domain at all.
             // (or is along edge)
-            //Info<< "getTrackingPoint : samplePt outside domain : "
-            //    << "  samplePt:" << samplePt
-            //    << endl;
 
             trackCellI = -1;
             trackFaceI = -1;
@@ -279,11 +290,7 @@ bool Foam::sampledSet::getTrackingPoint
         }
         else
         {
-            // start is inside. Use it as tracking point
-            //Info<< "getTrackingPoint : samplePt inside :"
-            //    << "  samplePt:" << samplePt
-            //    << "  trackCellI:" << trackCellI
-            //    << endl;
+            // Start is inside. Use it as tracking point
 
             trackPt = samplePt;
             trackFaceI = -1;
@@ -293,10 +300,6 @@ bool Foam::sampledSet::getTrackingPoint
     }
     else if (mag(samplePt - bPoint) < smallDist)
     {
-        //Info<< "getTrackingPoint : samplePt:" << samplePt
-        //    << " close to bPoint:"
-        //    << bPoint << endl;
-
         // samplePt close to bPoint. Snap to it
         trackPt = pushIn(bPoint, bFaceI);
         trackFaceI = bFaceI;
@@ -330,8 +333,7 @@ bool Foam::sampledSet::getTrackingPoint
 
     if (debug)
     {
-        Info<< "sampledSet::getTrackingPoint :"
-            << " offset:" << offset
+        InfoInFunction
             << " samplePt:" << samplePt
             << " bPoint:" << bPoint
             << " bFaceI:" << bFaceI
diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.H b/src/sampling/sampledSet/sampledSet/sampledSet.H
index 810d4565edca9c66a54e1629b4e937a20f971b62..9b3eee907240d281832a5d40c624ef14de1c86e3 100644
--- a/src/sampling/sampledSet/sampledSet/sampledSet.H
+++ b/src/sampling/sampledSet/sampledSet/sampledSet.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -92,12 +92,12 @@ protected:
         //- Returns cell next to boundary face
         label getBoundaryCell(const label) const;
 
-        //- Returns cell using face and containing sample
-        label getCell
-        (
-            const label faceI,
-            const point& sample
-        ) const;
+        //- Returns the neigbour cell or the owner if face in on the boundary
+        label getNeighbourCell(const label) const;
+
+        //- Return the cell in which the point on the sample line
+        //  resides if found otherwise return -1
+        label pointInCell(const point& p, const label samplei) const;
 
         //- Calculates inproduct of face normal and vector sample-face centre
         //  <0 if sample inside.
@@ -125,10 +125,10 @@ protected:
         //  trackFaceI, trackCellI (-1 if no tracking point found)
         bool getTrackingPoint
         (
-            const vector& offset,
             const point& samplePt,
             const point& bPoint,
             const label bFaceI,
+            const scalar smallDist,
 
             point& trackPt,
             label& trackCellI,
@@ -193,13 +193,6 @@ public:
         };
 
 
-    // Static data
-
-        //- Tolerance when comparing points. Usually relative to difference
-        //  between start_ and end_
-        static const scalar tol;
-
-
     // Constructors
 
         //- Construct from components
diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C
index ffee2ac3cc95db0af72373a0c65a6c8d9e9009c2..95940fdb53b98ad513f68b9e4c9d70857fca0c13 100644
--- a/src/sampling/sampledSet/sampledSets/sampledSets.C
+++ b/src/sampling/sampledSet/sampledSets/sampledSets.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ void Foam::sampledSets::combineSampledSets
         const sampledSet& samplePts = sampledSets[setI];
 
         // Collect data from all processors
-        List<List<point> > gatheredPts(Pstream::nProcs());
+        List<List<point>> gatheredPts(Pstream::nProcs());
         gatheredPts[Pstream::myProcNo()] = samplePts;
         Pstream::gatherList(gatheredPts);
 
@@ -79,9 +79,9 @@ void Foam::sampledSets::combineSampledSets
         // Combine processor lists into one big list.
         List<point> allPts
         (
-            ListListOps::combine<List<point> >
+            ListListOps::combine<List<point>>
             (
-                gatheredPts, accessOp<List<point> >()
+                gatheredPts, accessOp<List<point>>()
             )
         );
         labelList allSegments
diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.H b/src/sampling/sampledSet/sampledSets/sampledSets.H
index 168eee9c39a60e5e10c51327a5b798e46dfdc517..2f007a879bcef06619fb59adcf9b86928a50a016 100644
--- a/src/sampling/sampledSet/sampledSets/sampledSets.H
+++ b/src/sampling/sampledSet/sampledSets/sampledSets.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -74,7 +74,7 @@ class sampledSets
         public:
 
             //- The set formatter
-            autoPtr< writer<Type> > formatter;
+            autoPtr<writer<Type>> formatter;
 
             //- Construct null
             fieldGroup()
@@ -110,7 +110,7 @@ class sampledSets
         template<class Type>
         class volFieldSampler
         :
-            public List<Field<Type> >
+            public List<Field<Type>>
         {
             //- Name of this collection of values
             const word name_;
@@ -135,7 +135,7 @@ class sampledSets
             //- Construct from components
             volFieldSampler
             (
-                const List<Field<Type> >& values,
+                const List<Field<Type>>& values,
                 const word& name
             );
 
@@ -222,16 +222,16 @@ class sampledSets
         template<class T>
         void combineSampledValues
         (
-            const PtrList<volFieldSampler<T> >& sampledFields,
+            const PtrList<volFieldSampler<T>>& sampledFields,
             const labelListList& indexSets,
-            PtrList<volFieldSampler<T> >& masterFields
+            PtrList<volFieldSampler<T>>& masterFields
         );
 
         template<class Type>
         void writeSampleFile
         (
             const coordSet& masterSampleSet,
-            const PtrList<volFieldSampler<Type> >& masterFields,
+            const PtrList<volFieldSampler<Type>>& masterFields,
             const label setI,
             const fileName& timeDir,
             const writer<Type>& formatter
@@ -310,7 +310,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledSetsTemplates.C"
+    #include "sampledSetsTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C b/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C
index 778e2739534f2fe1abc40b6695344947ea81018e..3a0d5903431c6388928d28e384ebb86717ee2b08 100644
--- a/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C
+++ b/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -37,10 +37,10 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
     const PtrList<sampledSet>& samplers
 )
 :
-    List<Field<Type> >(samplers.size()),
+    List<Field<Type>>(samplers.size()),
     name_(field.name())
 {
-    autoPtr<interpolation<Type> > interpolator
+    autoPtr<interpolation<Type>> interpolator
     (
         interpolation<Type>::New(interpolationScheme, field)
     );
@@ -83,7 +83,7 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
     const PtrList<sampledSet>& samplers
 )
 :
-    List<Field<Type> >(samplers.size()),
+    List<Field<Type>>(samplers.size()),
     name_(field.name())
 {
     forAll(samplers, setI)
@@ -112,11 +112,11 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
 template<class Type>
 Foam::sampledSets::volFieldSampler<Type>::volFieldSampler
 (
-    const List<Field<Type> >& values,
+    const List<Field<Type>>& values,
     const word& name
 )
 :
-    List<Field<Type> >(values),
+    List<Field<Type>>(values),
     name_(name)
 {}
 
@@ -125,7 +125,7 @@ template<class Type>
 void Foam::sampledSets::writeSampleFile
 (
     const coordSet& masterSampleSet,
-    const PtrList<volFieldSampler<Type> >& masterFields,
+    const PtrList<volFieldSampler<Type>>& masterFields,
     const label setI,
     const fileName& timeDir,
     const writer<Type>& formatter
@@ -176,19 +176,19 @@ void Foam::sampledSets::writeSampleFile
 template<class T>
 void Foam::sampledSets::combineSampledValues
 (
-    const PtrList<volFieldSampler<T> >& sampledFields,
+    const PtrList<volFieldSampler<T>>& sampledFields,
     const labelListList& indexSets,
-    PtrList<volFieldSampler<T> >& masterFields
+    PtrList<volFieldSampler<T>>& masterFields
 )
 {
     forAll(sampledFields, fieldi)
     {
-        List<Field<T> > masterValues(indexSets.size());
+        List<Field<T>> masterValues(indexSets.size());
 
         forAll(indexSets, setI)
         {
             // Collect data from all processors
-            List<Field<T> > gatheredData(Pstream::nProcs());
+            List<Field<T>> gatheredData(Pstream::nProcs());
             gatheredData[Pstream::myProcNo()] = sampledFields[fieldi][setI];
             Pstream::gatherList(gatheredData);
 
@@ -196,10 +196,10 @@ void Foam::sampledSets::combineSampledValues
             {
                 Field<T> allData
                 (
-                    ListListOps::combine<Field<T> >
+                    ListListOps::combine<Field<T>>
                     (
                         gatheredData,
-                        Foam::accessOp<Field<T> >()
+                        Foam::accessOp<Field<T>>()
                     )
                 );
 
@@ -238,7 +238,7 @@ void Foam::sampledSets::sampleAndWrite(fieldGroup<Type>& fields)
         }
 
         // Storage for interpolated values
-        PtrList<volFieldSampler<Type> > sampledFields(fields.size());
+        PtrList<volFieldSampler<Type>> sampledFields(fields.size());
 
         forAll(fields, fieldi)
         {
@@ -297,7 +297,7 @@ void Foam::sampledSets::sampleAndWrite(fieldGroup<Type>& fields)
                         (
                             interpolationScheme_,
                             mesh_.lookupObject
-                            <GeometricField<Type, fvPatchField, volMesh> >
+                            <GeometricField<Type, fvPatchField, volMesh>>
                             (fields[fieldi]),
                             *this
                         )
@@ -311,7 +311,7 @@ void Foam::sampledSets::sampleAndWrite(fieldGroup<Type>& fields)
                         new volFieldSampler<Type>
                         (
                             mesh_.lookupObject
-                            <GeometricField<Type, fvPatchField, volMesh> >
+                            <GeometricField<Type, fvPatchField, volMesh>>
                             (fields[fieldi]),
                             *this
                         )
@@ -323,7 +323,7 @@ void Foam::sampledSets::sampleAndWrite(fieldGroup<Type>& fields)
         // Combine sampled fields from processors.
         // Note: only master results are valid
 
-        PtrList<volFieldSampler<Type> > masterFields(sampledFields.size());
+        PtrList<volFieldSampler<Type>> masterFields(sampledFields.size());
         combineSampledValues(sampledFields, indexSets_, masterFields);
 
         if (Pstream::master())
diff --git a/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsDict b/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsDict
new file mode 100644
index 0000000000000000000000000000000000000000..dc989e813cd69414b21883b9ae7703bab638fccd
--- /dev/null
+++ b/src/sampling/sampledSet/sampledSetsFunctionObject/sampledSetsDict
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+functions
+{
+    // Example of sampling on a line
+    lines
+    {
+        type sets;
+
+        functionObjectLibs ("libsampling.so");
+
+        outputControl   outputTime;
+        setFormat       gnuplot;
+        fields          (p U);
+        interpolationScheme cellPoint;
+        sets
+        (
+            diagonal
+            {
+                type midPoint;
+
+                axis x;
+                start (-0.0206 -0.0254 -0.0005);
+                end (0.29 0.0254 0.0005);
+            }
+        );
+    }
+}
diff --git a/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C b/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C
index cdf9384be62024b463fc5cf1e21fe719587b90f6..c4e4773376a0027df0c9d67184074c62f166e126 100644
--- a/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C
+++ b/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -169,7 +169,7 @@ Foam::point Foam::triSurfaceMeshPointSet::getRefPoint(const List<point>& pts)
     }
     else
     {
-        return vector::zero;
+        return Zero;
     }
 }
 
diff --git a/src/sampling/sampledSet/uniform/uniformSet.C b/src/sampling/sampledSet/uniform/uniformSet.C
index 650a094eb286b5db427276d754beb264de0a49c8..12f8999aae1e9d203a8a109450027a73392b769c 100644
--- a/src/sampling/sampledSet/uniform/uniformSet.C
+++ b/src/sampling/sampledSet/uniform/uniformSet.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,6 +36,8 @@ namespace Foam
 {
     defineTypeNameAndDebug(uniformSet, 0);
     addToRunTimeSelectionTable(sampledSet, uniformSet, word);
+
+    const scalar uniformSet::tol = 1e-3;
 }
 
 
@@ -260,10 +262,10 @@ void Foam::uniformSet::calcSamples
     bool isSample =
         getTrackingPoint
         (
-            offset,
             start_,
             bPoint,
             bFaceI,
+            smallDist,
 
             trackPt,
             trackCellI,
diff --git a/src/sampling/sampledSet/uniform/uniformSet.H b/src/sampling/sampledSet/uniform/uniformSet.H
index edd5212e51772f3e80cf9db20adb266d9bf8dad7..a9f29ed2b9a97911b218f8a933d0c4d29f9bb372 100644
--- a/src/sampling/sampledSet/uniform/uniformSet.H
+++ b/src/sampling/sampledSet/uniform/uniformSet.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -112,6 +112,14 @@ public:
     //- Runtime type information
     TypeName("uniform");
 
+
+    // Static data
+
+        //- Tolerance when comparing points relative to difference between
+        //  start_ and end_
+        static const scalar tol;
+
+
     // Constructors
 
         //- Construct from components
diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurface.H b/src/sampling/sampledSurface/distanceSurface/distanceSurface.H
index aa3f63251144fa3a46ba4140c416070d87b0f3df..755eb818e487d80537efc1488d2aa1010192f964 100644
--- a/src/sampling/sampledSurface/distanceSurface/distanceSurface.H
+++ b/src/sampling/sampledSurface/distanceSurface/distanceSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -108,14 +108,14 @@ class distanceSurface
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
 
@@ -278,7 +278,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "distanceSurfaceTemplates.C"
+    #include "distanceSurfaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurfaceTemplates.C b/src/sampling/sampledSurface/distanceSurface/distanceSurfaceTemplates.C
index fb076b86ea1bcea3c1a0d9fae39571c7645ad82f..c1411e378b9eb42c3ce14ba8a1fc6102b867188c 100644
--- a/src/sampling/sampledSurface/distanceSurface/distanceSurfaceTemplates.C
+++ b/src/sampling/sampledSurface/distanceSurface/distanceSurfaceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::distanceSurface::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
@@ -39,14 +39,14 @@ Foam::distanceSurface::sampleField
 {
     if (cell_)
     {
-        return tmp<Field<Type> >
+        return tmp<Field<Type>>
         (
             new Field<Type>(vField, isoSurfCellPtr_().meshCells())
         );
     }
     else
     {
-        return tmp<Field<Type> >
+        return tmp<Field<Type>>
         (
             new Field<Type>(vField, isoSurfPtr_().meshCells())
         );
@@ -55,7 +55,7 @@ Foam::distanceSurface::sampleField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::distanceSurface::interpolateField
 (
     const interpolation<Type>& interpolator
@@ -67,7 +67,7 @@ Foam::distanceSurface::interpolateField
     const GeometricField<Type, fvPatchField, volMesh>& volFld =
         interpolator.psi();
 
-    tmp<GeometricField<Type, pointPatchField, pointMesh> > pointFld
+    tmp<GeometricField<Type, pointPatchField, pointMesh>> pointFld
     (
         volPointInterpolation::New(fvm).interpolate(volFld)
     );
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C
index f14b84e419556c6b46d62f19eaeb27f4538c815b..e563cc25243bd0f84062a607529e5d7c7b6f1f74 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurface.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -43,25 +43,24 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(isoSurface, 0);
+    defineTypeNameAndDebug(isoSurface, 0);
 
-// Helper class for slicing triangles
-class storeOp
-{
-public:
-    DynamicList<triPoints>& tris_;
-
-    inline storeOp(DynamicList<triPoints>& tris)
-    :
-        tris_(tris)
-    {}
-
-    inline void operator()(const triPoints& tri)
+    // Helper class for slicing triangles
+    class storeOp
     {
-        tris_.append(tri);
-    }
-};
+    public:
+        DynamicList<triPoints>& tris_;
 
+        inline storeOp(DynamicList<triPoints>& tris)
+        :
+            tris_(tris)
+        {}
+
+        inline void operator()(const triPoints& tri)
+        {
+            tris_.append(tri);
+        }
+    };
 }
 
 
@@ -82,7 +81,6 @@ bool Foam::isoSurface::noTransform(const tensor& tt) const
 }
 
 
-// Calculates per face whether couple is collocated.
 bool Foam::isoSurface::collocatedPatch(const polyPatch& pp)
 {
     const coupledPolyPatch& cpp = refCast<const coupledPolyPatch>(pp);
@@ -90,7 +88,6 @@ bool Foam::isoSurface::collocatedPatch(const polyPatch& pp)
 }
 
 
-// Calculates per face whether couple is collocated.
 Foam::PackedBoolList Foam::isoSurface::collocatedFaces
 (
     const coupledPolyPatch& pp
@@ -321,7 +318,6 @@ bool Foam::isoSurface::isEdgeOfFaceCut
 }
 
 
-// Get neighbour value and position.
 void Foam::isoSurface::getNeighbour
 (
     const labelList& boundaryRegion,
@@ -355,7 +351,6 @@ void Foam::isoSurface::getNeighbour
 }
 
 
-// Determine for every face/cell whether it (possibly) generates triangles.
 void Foam::isoSurface::calcCutTypes
 (
     const labelList& boundaryRegion,
@@ -495,10 +490,9 @@ void Foam::isoSurface::calcCutTypes
 }
 
 
-// Caculate centre of surface.
 Foam::point Foam::isoSurface::calcCentre(const triSurface& s)
 {
-    vector sum = vector::zero;
+    vector sum = Zero;
 
     forAll(s, i)
     {
@@ -508,8 +502,6 @@ Foam::point Foam::isoSurface::calcCentre(const triSurface& s)
 }
 
 
-// Determine per cell centre whether all the intersections get collapsed
-// to a single point
 void Foam::isoSurface::calcSnappedCc
 (
     const labelList& boundaryRegion,
@@ -540,7 +532,7 @@ void Foam::isoSurface::calcSnappedCc
 
             localTriPoints.clear();
             label nOther = 0;
-            point otherPointSum = vector::zero;
+            point otherPointSum = Zero;
 
             // Create points for all intersections close to cell centre
             // (i.e. from pyramid edges)
@@ -675,8 +667,6 @@ void Foam::isoSurface::calcSnappedCc
 }
 
 
-// Determine per meshpoint whether all the intersections get collapsed
-// to a single point
 void Foam::isoSurface::calcSnappedPoint
 (
     const PackedBoolList& isBoundaryPoint,
@@ -728,7 +718,7 @@ void Foam::isoSurface::calcSnappedPoint
 
         localTriPoints.clear();
         label nOther = 0;
-        point otherPointSum = vector::zero;
+        point otherPointSum = Zero;
 
         forAll(pFaces, pFaceI)
         {
@@ -1191,8 +1181,8 @@ void Foam::isoSurface::trimToBox
     DynamicList<label>& triMap,     // map from (new) triangle to original
     labelList& triPointMap,         // map from (new) point to original
     labelList& interpolatedPoints,  // labels of newly introduced points
-    List<FixedList<label, 3> >& interpolatedOldPoints,// and their interpolation
-    List<FixedList<scalar, 3> >& interpolationWeights
+    List<FixedList<label, 3>>& interpolatedOldPoints,// and their interpolation
+    List<FixedList<scalar, 3>>& interpolationWeights
 )
 {
     const List<point> oldTriPoints(triPoints);
@@ -1207,8 +1197,8 @@ void Foam::isoSurface::trimToBox
     //   (interpolatedOldPoints)
     label sz = oldTriPoints.size()/100;
     DynamicList<label> dynInterpolatedPoints(sz);
-    DynamicList<FixedList<label, 3> > dynInterpolatedOldPoints(sz);
-    DynamicList<FixedList<scalar, 3> > dynInterpolationWeights(sz);
+    DynamicList<FixedList<label, 3>> dynInterpolatedOldPoints(sz);
+    DynamicList<FixedList<scalar, 3>> dynInterpolationWeights(sz);
 
 
     triPointMap.setSize(triPoints.size());
@@ -1265,7 +1255,6 @@ void Foam::isoSurface::trimToBox
 }
 
 
-// Does face use valid vertices?
 bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
 {
     // Simple check on indices ok.
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.H b/src/sampling/sampledSurface/isoSurface/isoSurface.H
index c74586a2ce1f4f1ee07aa9f59261582beef3339b..d207917c10862bc7badff8f8b709d9843ef9d76a 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurface.H
+++ b/src/sampling/sampledSurface/isoSurface/isoSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -143,10 +143,10 @@ class isoSurface
         DynamicList<label> interpolatedPoints_;
 
         //- corresponding original, unmerged points
-        DynamicList<FixedList<label, 3> > interpolatedOldPoints_;
+        DynamicList<FixedList<label, 3>> interpolatedOldPoints_;
 
         //- corresponding weights
-        DynamicList<FixedList<scalar, 3> > interpolationWeights_;
+        DynamicList<FixedList<scalar, 3>> interpolationWeights_;
 
 
     // Private Member Functions
@@ -186,6 +186,7 @@ class isoSurface
             const bool neiLower
         ) const;
 
+        //- Get neighbour value and position.
         void getNeighbour
         (
             const labelList& boundaryRegion,
@@ -197,7 +198,8 @@ class isoSurface
             point& nbrPoint
         ) const;
 
-        //- Set faceCutType,cellCutType.
+        //- Determine for every face/cell whether it (possibly) generates
+        //  triangles.
         void calcCutTypes
         (
             const labelList& boundaryRegion,
@@ -237,7 +239,7 @@ class isoSurface
         //- Return input field with coupled (and empty) patch values rewritten
         template<class Type>
         tmp<SlicedGeometricField
-        <Type, fvPatchField, slicedFvPatchField, volMesh> >
+        <Type, fvPatchField, slicedFvPatchField, volMesh>>
         adaptPatchFields
         (
             const GeometricField<Type, fvPatchField, volMesh>& fld
@@ -258,6 +260,9 @@ class isoSurface
             const Type& snapP1
         ) const;
 
+
+        //- Note: cannot use simpler isoSurfaceCell::generateTriPoints since
+        //  the need here to sometimes pass in remote 'snappedPoints'
         template<class Type>
         void generateTriPoints
         (
@@ -325,13 +330,13 @@ class isoSurface
         ) const;
 
         template<class Type>
-        static tmp<Field<Type> > interpolate
+        static tmp<Field<Type>> interpolate
         (
             const label nPoints,
             const labelList& triPointMergeMap,
             const labelList& interpolatedPoints,
-            const List<FixedList<label, 3> >& interpolatedOldPoints,
-            const List<FixedList<scalar, 3> >& interpolationWeights,
+            const List<FixedList<label, 3>>& interpolatedOldPoints,
+            const List<FixedList<scalar, 3>>& interpolationWeights,
             const DynamicList<Type>& unmergedValues
         );
 
@@ -368,8 +373,8 @@ class isoSurface
             DynamicList<label>& triMap,
             labelList& triPointMap,
             labelList& interpolatedPoints,
-            List<FixedList<label, 3> >& interpolatedOldPoints,
-            List<FixedList<scalar, 3> >& interpolationWeights
+            List<FixedList<label, 3>>& interpolatedOldPoints,
+            List<FixedList<scalar, 3>>& interpolationWeights
         );
 
         //- Check single triangle for (topological) validity
@@ -420,7 +425,7 @@ public:
         //- Interpolates cCoords,pCoords. Uses the references to the original
         //  fields used to create the iso surface.
         template<class Type>
-        tmp<Field<Type> > interpolate
+        tmp<Field<Type>> interpolate
         (
             const GeometricField<Type, fvPatchField, volMesh>& cCoords,
             const Field<Type>& pCoords
@@ -436,7 +441,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "isoSurfaceTemplates.C"
+    #include "isoSurfaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C
index 0ce6bbf78b26a4b7402b2d080811b0f1cf23f5d0..f7b7f24ed6a5aae10fe17f1052b21da4b1033be4 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,7 @@ License
 
 namespace Foam
 {
-defineTypeNameAndDebug(isoSurfaceCell, 0);
+    defineTypeNameAndDebug(isoSurfaceCell, 0);
 }
 
 
@@ -215,8 +215,6 @@ void Foam::isoSurfaceCell::calcCutTypes
 }
 
 
-
-// Return the two common points between two triangles
 Foam::labelPair Foam::isoSurfaceCell::findCommonPoints
 (
     const labelledTri& tri0,
@@ -253,10 +251,9 @@ Foam::labelPair Foam::isoSurfaceCell::findCommonPoints
 }
 
 
-// Caculate centre of surface.
 Foam::point Foam::isoSurfaceCell::calcCentre(const triSurface& s)
 {
-    vector sum = vector::zero;
+    vector sum = Zero;
 
     forAll(s, i)
     {
@@ -266,8 +263,6 @@ Foam::point Foam::isoSurfaceCell::calcCentre(const triSurface& s)
 }
 
 
-// Replace surface (localPoints, localTris) with single point. Returns
-// point. Destructs arguments.
 Foam::pointIndexHit Foam::isoSurfaceCell::collapseSurface
 (
     const label cellI,
@@ -275,7 +270,7 @@ Foam::pointIndexHit Foam::isoSurfaceCell::collapseSurface
     DynamicList<labelledTri, 64>& localTris
 ) const
 {
-    pointIndexHit info(false, vector::zero, localTris.size());
+    pointIndexHit info(false, Zero, localTris.size());
 
     if (localTris.size() == 1)
     {
@@ -535,7 +530,6 @@ void Foam::isoSurfaceCell::calcSnappedCc
 }
 
 
-// Generate triangles for face connected to pointI
 void Foam::isoSurfaceCell::genPointTris
 (
     const scalarField& cellValues,
@@ -608,7 +602,6 @@ void Foam::isoSurfaceCell::genPointTris
 }
 
 
-// Generate triangle for tet connected to pointI
 void Foam::isoSurfaceCell::genPointTris
 (
     const scalarField& pointValues,
@@ -1056,7 +1049,6 @@ Foam::triSurface Foam::isoSurfaceCell::stitchTriPoints
 }
 
 
-// Does face use valid vertices?
 bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI)
 {
     // Simple check on indices ok.
@@ -1127,7 +1119,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI)
 void Foam::isoSurfaceCell::calcAddressing
 (
     const triSurface& surf,
-    List<FixedList<label, 3> >& faceEdges,
+    List<FixedList<label, 3>>& faceEdges,
     labelList& edgeFace0,
     labelList& edgeFace1,
     Map<labelList>& edgeFacesRest
@@ -1225,7 +1217,6 @@ void Foam::isoSurfaceCell::calcAddressing
 }
 
 
-// Checks if triangle is connected through edgeI only.
 bool Foam::isoSurfaceCell::danglingTriangle
 (
     const FixedList<label, 3>& fEdges,
@@ -1252,10 +1243,9 @@ bool Foam::isoSurfaceCell::danglingTriangle
 }
 
 
-// Mark triangles to keep. Returns number of dangling triangles.
 Foam::label Foam::isoSurfaceCell::markDanglingTriangles
 (
-    const List<FixedList<label, 3> >& faceEdges,
+    const List<FixedList<label, 3>>& faceEdges,
     const labelList& edgeFace0,
     const labelList& edgeFace1,
     const Map<labelList>& edgeFacesRest,
@@ -1523,7 +1513,6 @@ Foam::isoSurfaceCell::isoSurfaceCell
         }
 
 
-
         // Merge points and compact out non-valid triangles
         labelList triMap;
         triSurface::operator=
@@ -1588,7 +1577,7 @@ Foam::isoSurfaceCell::isoSurfaceCell
 
     if (regularise)
     {
-        List<FixedList<label, 3> > faceEdges;
+        List<FixedList<label, 3>> faceEdges;
         labelList edgeFace0, edgeFace1;
         Map<labelList> edgeFacesRest;
 
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H
index 910f3fe46ed7bdeef88d173fa1c64cceb705331c..1ff14c689f87e3f20c9210953f80b2cc059de1b1 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H
+++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -115,10 +115,10 @@ class isoSurfaceCell
         DynamicList<label> interpolatedPoints_;
 
         //- corresponding original, unmerged points
-        DynamicList<FixedList<label, 3> > interpolatedOldPoints_;
+        DynamicList<FixedList<label, 3>> interpolatedOldPoints_;
 
         //- corresponding weights
-        DynamicList<FixedList<scalar, 3> > interpolationWeights_;
+        DynamicList<FixedList<scalar, 3>> interpolationWeights_;
 
 
     // Private Member Functions
@@ -153,14 +153,18 @@ class isoSurfaceCell
             const scalarField& pointValues
         );
 
+        //- Return the two common points between two triangles
         static labelPair findCommonPoints
         (
             const labelledTri&,
             const labelledTri&
         );
 
+        //- Caculate centre of surface.
         static point calcCentre(const triSurface&);
 
+        //- Replace surface (localPoints, localTris) with single point.
+        //  Returns point.  Destroys arguments.
         pointIndexHit collapseSurface
         (
             const label cellI,
@@ -275,7 +279,7 @@ class isoSurfaceCell
         void calcAddressing
         (
             const triSurface& surf,
-            List<FixedList<label, 3> >& faceEdges,
+            List<FixedList<label, 3>>& faceEdges,
             labelList& edgeFace0,
             labelList& edgeFace1,
             Map<labelList>& edgeFacesRest
@@ -291,7 +295,7 @@ class isoSurfaceCell
         //- Mark all non-fully connected triangles
         static label markDanglingTriangles
         (
-            const List<FixedList<label, 3> >& faceEdges,
+            const List<FixedList<label, 3>>& faceEdges,
             const labelList& edgeFace0,
             const labelList& edgeFace1,
             const Map<labelList>& edgeFacesRest,
@@ -338,7 +342,7 @@ public:
 
         //- Interpolates cCoords,pCoords.
         template<class Type>
-        tmp<Field<Type> > interpolate
+        tmp<Field<Type>> interpolate
         (
             const Field<Type>& cCoords,
             const Field<Type>& pCoords
@@ -353,7 +357,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "isoSurfaceCellTemplates.C"
+    #include "isoSurfaceCellTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C
index a59f44022a36a0b8e826bca27c8e67714c413874..9d08fdf734d59ab67d7456115245cccb59d8f8e4 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -523,7 +523,7 @@ void Foam::isoSurfaceCell::generateTriPoints
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::isoSurfaceCell::interpolate
 (
     const Field<Type>& cCoords,
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
index 2db94efe54d69c7a290e94588e8a494dfbb462ab..42066633a82ef1c436400491e4d67851956b3180 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,13 +33,16 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::SlicedGeometricField
+Foam::tmp
 <
-    Type,
-    Foam::fvPatchField,
-    Foam::slicedFvPatchField,
-    Foam::volMesh
-> >
+    Foam::SlicedGeometricField
+    <
+        Type,
+        Foam::fvPatchField,
+        Foam::slicedFvPatchField,
+        Foam::volMesh
+    >
+>
 Foam::isoSurface::adaptPatchFields
 (
     const GeometricField<Type, fvPatchField, volMesh>& fld
@@ -70,7 +73,7 @@ Foam::isoSurface::adaptPatchFields
             true        // preserveCouples
         )
     );
-    FieldType& sliceFld = tsliceFld();
+    FieldType& sliceFld = tsliceFld.ref();
 
     const fvMesh& mesh = fld.mesh();
 
@@ -125,7 +128,7 @@ Foam::isoSurface::adaptPatchFields
 
             const scalarField& w = mesh.weights().boundaryField()[patchI];
 
-            tmp<Field<Type> > f =
+            tmp<Field<Type>> f =
                 w*pfld.patchInternalField()
               + (1.0-w)*pfld.patchNeighbourField();
 
@@ -235,7 +238,7 @@ void Foam::isoSurface::generateTriPoints
         triIndex |= 8;
     }
 
-    /* Form the vertices of the triangles for each case */
+    // Form the vertices of the triangles for each case
     switch (triIndex)
     {
         case 0x00:
@@ -470,7 +473,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
             (
                 snappedPoint[pointI] != -1
               ? snappedPoints[snappedPoint[pointI]]
-              : pTraits<Type>::zero
+              : Type(Zero)
             ),
 
             pVals[nextPointI],
@@ -479,7 +482,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
             (
                 snappedPoint[nextPointI] != -1
               ? snappedPoints[snappedPoint[nextPointI]]
-              : pTraits<Type>::zero
+              : Type(Zero)
             ),
 
             cVals[own],
@@ -488,7 +491,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
             (
                 snappedCc[own] != -1
               ? snappedPoints[snappedCc[own]]
-              : pTraits<Type>::zero
+              : Type(Zero)
             ),
 
             neiVal,
@@ -584,7 +587,7 @@ void Foam::isoSurface::generateTriPoints
                 (
                     snappedCc[nei[faceI]] != -1
                   ? snappedPoints[snappedCc[nei[faceI]]]
-                  : pTraits<Type>::zero
+                  : Type(Zero)
                 ),
 
                 triPoints,
@@ -596,7 +599,7 @@ void Foam::isoSurface::generateTriPoints
 
     // Determine neighbouring snap status
     boolList neiSnapped(mesh_.nFaces()-mesh_.nInternalFaces(), false);
-    List<Type> neiSnappedPoint(neiSnapped.size(), pTraits<Type>::zero);
+    List<Type> neiSnappedPoint(neiSnapped.size(), Type(Zero));
     forAll(patches, patchI)
     {
         const polyPatch& pp = patches[patchI];
@@ -682,7 +685,7 @@ void Foam::isoSurface::generateTriPoints
                             cVals.boundaryField()[patchI][i],
                             cCoords.boundaryField()[patchI][i],
                             false,
-                            pTraits<Type>::zero,
+                            Type(Zero),
 
                             triPoints,
                             triMeshCells
@@ -715,7 +718,7 @@ void Foam::isoSurface::generateTriPoints
                         cVals.boundaryField()[patchI][i],
                         cCoords.boundaryField()[patchI][i],
                         false,  // fc not snapped
-                        pTraits<Type>::zero,
+                        Type(Zero),
 
                         triPoints,
                         triMeshCells
@@ -731,29 +734,21 @@ void Foam::isoSurface::generateTriPoints
 }
 
 
-//template<class Type>
-//Foam::tmp<Foam::Field<Type> >
-//Foam::isoSurface::sample(const Field<Type>& vField) const
-//{
-//    return tmp<Field<Type> >(new Field<Type>(vField, meshCells()));
-//}
-
-
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::isoSurface::interpolate
 (
     const label nPoints,
     const labelList& triPointMergeMap,
     const labelList& interpolatedPoints,
-    const List<FixedList<label, 3> >& interpolatedOldPoints,
-    const List<FixedList<scalar, 3> >& interpolationWeights,
+    const List<FixedList<label, 3>>& interpolatedOldPoints,
+    const List<FixedList<scalar, 3>>& interpolationWeights,
     const DynamicList<Type>& unmergedValues
 )
 {
     // One value per point
-    tmp<Field<Type> > tvalues(new Field<Type>(nPoints, pTraits<Type>::zero));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(nPoints, Type(Zero)));
+    Field<Type>& values = tvalues.ref();
 
 
     // Pass1: unweighted average of merged point values
@@ -791,7 +786,7 @@ Foam::isoSurface::interpolate
 
         // Note: zeroing should not be necessary if interpolation only done
         //       for newly introduced points (i.e. not in triPointMergeMap)
-        values[pointI] = pTraits<Type>::zero;
+        values[pointI] = Type(Zero);
         forAll(oldPoints, j)
         {
             values[pointI] = w[j]*unmergedValues[oldPoints[j]];
@@ -803,7 +798,7 @@ Foam::isoSurface::interpolate
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::isoSurface::interpolate
 (
     const GeometricField<Type, fvPatchField, volMesh>& cCoords,
@@ -817,7 +812,7 @@ Foam::isoSurface::interpolate
         fvPatchField,
         slicedFvPatchField,
         volMesh
-    > > c2(adaptPatchFields(cCoords));
+    >> c2(adaptPatchFields(cCoords));
 
 
     DynamicList<Type> triPoints(3*nCutCells_);
diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C
index 440c281d6a7fdf65580d3b066753b9344636e37d..1830927ae94480ad12a9c2afbe6da4936c48d2cf 100644
--- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C
+++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,8 +56,8 @@ void Foam::sampledIsoSurface::getIsoFields() const
     {
         if (debug)
         {
-            Info<< "sampledIsoSurface::getIsoFields() : lookup volField "
-                << isoField_ << endl;
+            InfoInFunction
+                << "Lookup volField " << isoField_ << endl;
         }
         storedVolFieldPtr_.clear();
         volFieldPtr_ = &fvm.lookupObject<volScalarField>(isoField_);
@@ -68,8 +68,9 @@ void Foam::sampledIsoSurface::getIsoFields() const
 
         if (debug)
         {
-            Info<< "sampledIsoSurface::getIsoFields() : checking "
-                << isoField_ << " for same time " << fvm.time().timeName()
+            InfoInFunction
+                << "Checking " << isoField_
+                << " for same time " << fvm.time().timeName()
                 << endl;
         }
 
@@ -81,8 +82,9 @@ void Foam::sampledIsoSurface::getIsoFields() const
         {
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() : reading volField "
-                    << isoField_ << " from time " << fvm.time().timeName()
+                InfoInFunction
+                    << "Reading volField " << isoField_
+                    << " from time " << fvm.time().timeName()
                     << endl;
             }
 
@@ -111,9 +113,9 @@ void Foam::sampledIsoSurface::getIsoFields() const
             else
             {
                 FatalErrorInFunction
-                << "Cannot find isosurface field " << isoField_
-                << " in database or directory " << vfHeader.path()
-                << exit(FatalError);
+                    << "Cannot find isosurface field " << isoField_
+                    << " in database or directory " << vfHeader.path()
+                    << exit(FatalError);
             }
         }
     }
@@ -126,8 +128,7 @@ void Foam::sampledIsoSurface::getIsoFields() const
     // "volPointInterpolate(p)" so register it and re-use it. This is the
     // same as the 'cache' functionality from volPointInterpolate but
     // unfortunately that one does not guarantee that the field pointer
-    // remain: e.g. some other
-    // functionObject might delete the cached version.
+    // remain: e.g. some other functionObject might delete the cached version.
     // (volPointInterpolation::interpolate with cache=false deletes any
     //  registered one or if mesh.changing())
 
@@ -144,8 +145,8 @@ void Foam::sampledIsoSurface::getIsoFields() const
         {
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() :"
-                    << " lookup pointField " << pointFldName << endl;
+                InfoInFunction
+                    << "lookup pointField " << pointFldName << endl;
             }
             const pointScalarField& pfld = fvm.lookupObject<pointScalarField>
             (
@@ -156,8 +157,9 @@ void Foam::sampledIsoSurface::getIsoFields() const
             {
                 if (debug)
                 {
-                    Info<< "sampledIsoSurface::getIsoFields() :"
-                        << " updating pointField " << pointFldName << endl;
+                    InfoInFunction
+                        << "updating pointField "
+                        << pointFldName << endl;
                 }
                 // Update the interpolated value
                 volPointInterpolation::New(fvm).interpolate
@@ -175,12 +177,15 @@ void Foam::sampledIsoSurface::getIsoFields() const
 
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() :"
-                    << " creating and storing pointField "
-                    << pointFldName << " for time "
-                    << fvm.time().timeName() << endl;
+                InfoInFunction
+                    << "Checking pointField " << pointFldName
+                    << " for same time " << fvm.time().timeName()
+                    << endl;
             }
 
+            // Interpolate without cache. Note that we're registering it
+            // below so next time round it goes into the condition
+            // above.
             tmp<pointScalarField> tpfld
             (
                 volPointInterpolation::New(fvm).interpolate
@@ -209,11 +214,12 @@ void Foam::sampledIsoSurface::getIsoFields() const
 
         if (debug)
         {
-            Info<< "sampledIsoSurface::getIsoFields() : volField "
-                << volFieldPtr_->name() << " min:" << min(*volFieldPtr_).value()
+            InfoInFunction
+                << "volField " << volFieldPtr_->name()
+                << " min:" << min(*volFieldPtr_).value()
                 << " max:" << max(*volFieldPtr_).value() << endl;
-            Info<< "sampledIsoSurface::getIsoFields() : pointField "
-                << pointFieldPtr_->name()
+            InfoInFunction
+                << "pointField " << pointFieldPtr_->name()
                 << " min:" << gMin(pointFieldPtr_->internalField())
                 << " max:" << gMax(pointFieldPtr_->internalField()) << endl;
         }
@@ -229,8 +235,8 @@ void Foam::sampledIsoSurface::getIsoFields() const
         {
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() :"
-                    << " submesh lookup volField "
+                InfoInFunction
+                    << "Sub-mesh lookup volField "
                     << isoField_ << endl;
             }
             storedVolSubFieldPtr_.clear();
@@ -240,8 +246,8 @@ void Foam::sampledIsoSurface::getIsoFields() const
         {
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() : "
-                    << "subsetting volField " << isoField_ << endl;
+                InfoInFunction
+                    << "Sub-setting volField " << isoField_ << endl;
             }
             storedVolSubFieldPtr_.reset
             (
@@ -268,8 +274,8 @@ void Foam::sampledIsoSurface::getIsoFields() const
         {
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() :"
-                    << " submesh lookup pointField " << pointFldName << endl;
+                InfoInFunction
+                    << "Sub-mesh lookup pointField " << pointFldName << endl;
             }
             const pointScalarField& pfld = subFvm.lookupObject<pointScalarField>
             (
@@ -298,8 +304,8 @@ void Foam::sampledIsoSurface::getIsoFields() const
         {
             if (debug)
             {
-                Info<< "sampledIsoSurface::getIsoFields() :"
-                    << " interpolating submesh volField "
+                InfoInFunction
+                    << "Interpolating submesh volField "
                     << volSubFieldPtr_->name()
                     << " to get submesh pointField " << pointFldName << endl;
             }
@@ -329,11 +335,13 @@ void Foam::sampledIsoSurface::getIsoFields() const
 
         if (debug)
         {
-            Info<< "sampledIsoSurface::getIsoFields() : volSubField "
+            InfoInFunction
+                << "volSubField "
                 << volSubFieldPtr_->name()
                 << " min:" << min(*volSubFieldPtr_).value()
                 << " max:" << max(*volSubFieldPtr_).value() << endl;
-            Info<< "sampledIsoSurface::getIsoFields() : pointSubField "
+            InfoInFunction
+                << "pointSubField "
                 << pointSubFieldPtr_->name()
                 << " min:" << gMin(pointSubFieldPtr_->internalField())
                 << " max:" << gMax(pointSubFieldPtr_->internalField()) << endl;
diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H
index 488ba56452544309557a54de64611341025913d8..a0ea5063372400010a10e310ab82d7b9d3f13917 100644
--- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H
+++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,14 +124,14 @@ class sampledIsoSurface
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
 
@@ -277,7 +277,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledIsoSurfaceTemplates.C"
+    #include "sampledIsoSurfaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C
index 4c21257ce7b07de49a65b131d687531b03e2d74d..c6bb1597de418757412849e6baaa06ff80e4cdaf 100644
--- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C
+++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,8 +75,7 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const
     {
         if (debug)
         {
-            Info<< "sampledIsoSurfaceCell::updateGeometry() : lookup "
-                << isoField_ << endl;
+            InfoInFunction << "Lookup " << isoField_ << endl;
         }
 
         cellFldPtr = &fvm.lookupObject<volScalarField>(isoField_);
@@ -87,8 +86,9 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const
 
         if (debug)
         {
-            Info<< "sampledIsoSurfaceCell::updateGeometry() : reading "
-                << isoField_ << " from time " <<fvm.time().timeName()
+            InfoInFunction
+                << "Reading " << isoField_
+                << " from time " <<fvm.time().timeName()
                 << endl;
         }
 
@@ -216,15 +216,7 @@ Foam::sampledIsoSurfaceCell::sampledIsoSurfaceCell
     facesPtr_(NULL),
     prevTimeIndex_(-1),
     meshCells_(0)
-{
-//    dict.readIfPresent("zone", zoneKey_);
-//
-//    if (debug && zoneKey_.size() && mesh.cellZones().findZoneID(zoneKey_) < 0)
-//    {
-//        Info<< "cellZone " << zoneKey_
-//            << " not found - using entire mesh" << endl;
-//    }
-}
+{}
 
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H
index 0cfa6a7461a9ec02b6b022e989d24c961222f528..b404976ee07192b091a75b838decf47eb09d98a7 100644
--- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H
+++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,14 +95,14 @@ class sampledIsoSurfaceCell
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
 
@@ -239,7 +239,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledIsoSurfaceCellTemplates.C"
+    #include "sampledIsoSurfaceCellTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C
index b0d6eaa6eb02a1c1e03c76c2d0e65ddd0367c794..72bcbbf701bcdc11770a3755ab1649cc4350d6f3 100644
--- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C
+++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,7 +32,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledIsoSurfaceCell::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
@@ -41,12 +41,12 @@ Foam::sampledIsoSurfaceCell::sampleField
     // Recreate geometry if time has changed
     updateGeometry();
 
-    return tmp<Field<Type> >(new Field<Type>(vField, meshCells_));
+    return tmp<Field<Type>>(new Field<Type>(vField, meshCells_));
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledIsoSurfaceCell::interpolateField
 (
     const interpolation<Type>& interpolator
@@ -56,8 +56,8 @@ Foam::sampledIsoSurfaceCell::interpolateField
     updateGeometry();
 
     // One value per point
-    tmp<Field<Type> > tvalues(new Field<Type>(points().size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(points().size()));
+    Field<Type>& values = tvalues.ref();
 
     boolList pointDone(points().size(), false);
 
diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTemplates.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTemplates.C
index 513cf2fb5d76202007660c94150acb37f3a8aa96..55acd17b19dc2e2678d3f650c8549855eebc88ac 100644
--- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTemplates.C
+++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,7 +31,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledIsoSurface::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
@@ -40,12 +40,12 @@ Foam::sampledIsoSurface::sampleField
     // Recreate geometry if time has changed
     updateGeometry();
 
-    return tmp<Field<Type> >(new Field<Type>(vField, surface().meshCells()));
+    return tmp<Field<Type>>(new Field<Type>(vField, surface().meshCells()));
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledIsoSurface::interpolateField
 (
     const interpolation<Type>& interpolator
@@ -60,13 +60,13 @@ Foam::sampledIsoSurface::interpolateField
 
     if (subMeshPtr_.valid())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tvolSubFld =
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tvolSubFld =
             subMeshPtr_().interpolate(volFld);
 
         const GeometricField<Type, fvPatchField, volMesh>& volSubFld =
             tvolSubFld();
 
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > tpointSubFld =
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> tpointSubFld =
             volPointInterpolation::New(volSubFld.mesh()).interpolate(volSubFld);
 
         // Sample.
@@ -82,7 +82,7 @@ Foam::sampledIsoSurface::interpolateField
     }
     else
     {
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > tpointFld =
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> tpointFld =
             volPointInterpolation::New(volFld.mesh()).interpolate(volFld);
 
         // Sample.
diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H
index 308bdcd46a01aeb8bb5fa5aad007141ade2fd886..46253977786ae477637587949a2a465acedeffbf 100644
--- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H
+++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,14 +106,14 @@ class sampledCuttingPlane
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
 
@@ -255,7 +255,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledCuttingPlaneTemplates.C"
+    #include "sampledCuttingPlaneTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C
index 00171fce51a048cd3d9f1acf295d9c2499c21365..8756deabd0ad3947499ede17531e08935be6981a 100644
--- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C
+++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlaneTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,18 +31,18 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledCuttingPlane::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
 ) const
 {
-    return tmp<Field<Type> >(new Field<Type>(vField, surface().meshCells()));
+    return tmp<Field<Type>>(new Field<Type>(vField, surface().meshCells()));
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledCuttingPlane::interpolateField
 (
     const interpolation<Type>& interpolator
@@ -54,13 +54,13 @@ Foam::sampledCuttingPlane::interpolateField
 
     if (subMeshPtr_.valid())
     {
-        tmp<GeometricField<Type, fvPatchField, volMesh> > tvolSubFld =
+        tmp<GeometricField<Type, fvPatchField, volMesh>> tvolSubFld =
             subMeshPtr_().interpolate(volFld);
 
         const GeometricField<Type, fvPatchField, volMesh>& volSubFld =
             tvolSubFld();
 
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > tpointSubFld =
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> tpointSubFld =
             volPointInterpolation::New(volSubFld.mesh()).interpolate(volSubFld);
 
         // Sample.
@@ -76,7 +76,7 @@ Foam::sampledCuttingPlane::interpolateField
     }
     else
     {
-        tmp<GeometricField<Type, pointPatchField, pointMesh> > tpointFld
+        tmp<GeometricField<Type, pointPatchField, pointMesh>> tpointFld
         (
             volPointInterpolation::New(volFld.mesh()).interpolate(volFld)
         );
diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatch.H b/src/sampling/sampledSurface/sampledPatch/sampledPatch.H
index f0b810a5baee60624f0c5fe06b5a5dc2f27186ae..b16ddef634e82ec3667fa609a5137109dbaa29b6 100644
--- a/src/sampling/sampledSurface/sampledPatch/sampledPatch.H
+++ b/src/sampling/sampledSurface/sampledPatch/sampledPatch.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,20 +84,20 @@ class sampledPatch
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
         //- Sample surface field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvsPatchField, surfaceMesh>& sField
         ) const;
 
         template<class Type>
-        tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
+        tmp<Field<Type>> interpolateField(const interpolation<Type>&) const;
 
         //- Re-map action on triangulation or cleanup
         virtual void remapFaces(const labelUList& faceMap);
@@ -287,7 +287,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledPatchTemplates.C"
+    #include "sampledPatchTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C
index 2ffcb3a010db59786e73ecc5c6d2a6797f0747dd..58bd02fcb0fa29f9608038cc1722c69191ecfe78 100644
--- a/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C
+++ b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,15 +28,15 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPatch::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
 ) const
 {
     // One value per face
-    tmp<Field<Type> > tvalues(new Field<Type>(patchFaceLabels_.size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(patchFaceLabels_.size()));
+    Field<Type>& values = tvalues.ref();
     forAll(patchFaceLabels_, i)
     {
         label patchI = patchIDs_[patchIndex_[i]];
@@ -49,15 +49,15 @@ Foam::sampledPatch::sampleField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPatch::sampleField
 (
     const GeometricField<Type, fvsPatchField, surfaceMesh>& sField
 ) const
 {
     // One value per face
-    tmp<Field<Type> > tvalues(new Field<Type>(patchFaceLabels_.size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(patchFaceLabels_.size()));
+    Field<Type>& values = tvalues.ref();
 
     forAll(patchFaceLabels_, i)
     {
@@ -70,15 +70,15 @@ Foam::sampledPatch::sampleField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPatch::interpolateField
 (
     const interpolation<Type>& interpolator
 ) const
 {
     // One value per vertex
-    tmp<Field<Type> > tvalues(new Field<Type>(points().size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(points().size()));
+    Field<Type>& values = tvalues.ref();
 
     const labelList& own = mesh().faceOwner();
 
diff --git a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.H b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.H
index 8a423c60e8b38bcecca98c5710e481fdaf767684..59671c946ef0a2fa7c6b58d19b2a57eb82b50980 100644
--- a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.H
+++ b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,13 +66,13 @@ class sampledPatchInternalField
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
         template<class Type>
-        tmp<Field<Type> > interpolateField(const interpolation<Type>&) const;
+        tmp<Field<Type>> interpolateField(const interpolation<Type>&) const;
 
 
 public:
@@ -176,7 +176,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledPatchInternalFieldTemplates.C"
+    #include "sampledPatchInternalFieldTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C
index 2d187fa3148768efe1c22e56df6fd88dff933456..803fa5c6fa21b6e8375d7b4a6b2013de6fc7e523 100644
--- a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C
+++ b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,15 +30,15 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPatchInternalField::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
 ) const
 {
     // One value per face
-    tmp<Field<Type> > tvalues(new Field<Type>(patchFaceLabels().size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(patchFaceLabels().size()));
+    Field<Type>& values = tvalues.ref();
 
     forAll(patchStart(), i)
     {
@@ -65,7 +65,7 @@ Foam::sampledPatchInternalField::sampleField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPatchInternalField::interpolateField
 (
     const interpolation<Type>& interpolator
@@ -109,7 +109,7 @@ Foam::sampledPatchInternalField::interpolateField
 
         // Now patchVals holds the interpolated data in patch face order.
         // Collect.
-        SubList<Type>(allPatchVals, patchVals.size(), sz).assign(patchVals);
+        SubList<Type>(allPatchVals, patchVals.size(), sz) = patchVals;
         sz += patchVals.size();
     }
 
diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H
index 4add35f3f6bfda977facd21121a25e06e66973e7..02a4147a8140d697118c5c8c410c7fb2dc59102e 100644
--- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H
+++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -70,14 +70,14 @@ class sampledPlane
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
 
@@ -220,7 +220,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledPlaneTemplates.C"
+    #include "sampledPlaneTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C b/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C
index b5083803766f84facf90be9ad97169003c4cf147..60e6b5a489b1f6647c8c6e0d993b1f097afff97f 100644
--- a/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C
+++ b/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,26 +28,26 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPlane::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
 ) const
 {
-    return tmp<Field<Type> >(new Field<Type>(vField, meshCells()));
+    return tmp<Field<Type>>(new Field<Type>(vField, meshCells()));
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledPlane::interpolateField
 (
     const interpolation<Type>& interpolator
 ) const
 {
     // One value per point
-    tmp<Field<Type> > tvalues(new Field<Type>(points().size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(points().size()));
+    Field<Type>& values = tvalues.ref();
 
     boolList pointDone(points().size(), false);
 
diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C
index acf3558bba80ebc315a947d57bb5ca7ce95a9975..38c478edc09ef183409670e0e959b1f54d84256d 100644
--- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C
+++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -287,11 +287,11 @@ Foam::tmp<Foam::tensorField> Foam::sampledSurface::sample
 }
 
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::sampledSurface::project(const Field<scalar>& field) const
 {
-    tmp<Field<scalar> > tRes(new Field<scalar>(faces().size()));
-    Field<scalar>& res = tRes();
+    tmp<Field<scalar>> tRes(new Field<scalar>(faces().size()));
+    Field<scalar>& res = tRes.ref();
 
     forAll(faces(), faceI)
     {
@@ -302,38 +302,38 @@ Foam::sampledSurface::project(const Field<scalar>& field) const
 }
 
 
-Foam::tmp<Foam::Field<Foam::scalar> >
+Foam::tmp<Foam::Field<Foam::scalar>>
 Foam::sampledSurface::project(const Field<vector>& field) const
 {
-    tmp<Field<scalar> > tRes(new Field<scalar>(faces().size()));
-    project(tRes(), field);
+    tmp<Field<scalar>> tRes(new Field<scalar>(faces().size()));
+    project(tRes.ref(), field);
     return tRes;
 }
 
 
-Foam::tmp<Foam::Field<Foam::vector> >
+Foam::tmp<Foam::Field<Foam::vector>>
 Foam::sampledSurface::project(const Field<sphericalTensor>& field) const
 {
-    tmp<Field<vector> > tRes(new Field<vector>(faces().size()));
-    project(tRes(), field);
+    tmp<Field<vector>> tRes(new Field<vector>(faces().size()));
+    project(tRes.ref(), field);
     return tRes;
 }
 
 
-Foam::tmp<Foam::Field<Foam::vector> >
+Foam::tmp<Foam::Field<Foam::vector>>
 Foam::sampledSurface::project(const Field<symmTensor>& field) const
 {
-    tmp<Field<vector> > tRes(new Field<vector>(faces().size()));
-    project(tRes(), field);
+    tmp<Field<vector>> tRes(new Field<vector>(faces().size()));
+    project(tRes.ref(), field);
     return tRes;
 }
 
 
-Foam::tmp<Foam::Field<Foam::vector> >
+Foam::tmp<Foam::Field<Foam::vector>>
 Foam::sampledSurface::project(const Field<tensor>& field) const
 {
-    tmp<Field<vector> > tRes(new Field<vector>(faces().size()));
-    project(tRes(), field);
+    tmp<Field<vector>> tRes(new Field<vector>(faces().size()));
+    project(tRes.ref(), field);
     return tRes;
 }
 
diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H
index fca1b028b2a601c6e6ec2ab70697a8630e817a0c..0fdcca5dd70cc2127c9d28d0769895bbc82409a6 100644
--- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H
+++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -135,12 +135,12 @@ class sampledSurface
         void project
         (
             Field<ReturnType>&,
-            const tmp<Field<Type> >&
+            const tmp<Field<Type>>&
         ) const;
 
         //- Project field onto surface
         template<class ReturnType, class Type>
-        tmp<Field<ReturnType> > project(const tmp<Field<Type> >&) const;
+        tmp<Field<ReturnType>> project(const tmp<Field<Type>>&) const;
 
 
 protected:
@@ -295,7 +295,7 @@ public:
 
         //- Integration of a field across the surface
         template<class Type>
-        Type integrate(const tmp<Field<Type> >&) const;
+        Type integrate(const tmp<Field<Type>>&) const;
 
         //- Area-averaged value of a field across the surface
         template<class Type>
@@ -303,26 +303,26 @@ public:
 
         //- Area-averaged value of a field across the surface
         template<class Type>
-        Type average(const tmp<Field<Type> >&) const;
+        Type average(const tmp<Field<Type>>&) const;
 
         //- Project field onto surface
-        tmp<Field<scalar> > project(const Field<scalar>&) const;
+        tmp<Field<scalar>> project(const Field<scalar>&) const;
 
         //- Project field onto surface
-        tmp<Field<scalar> > project(const Field<vector>&) const;
+        tmp<Field<scalar>> project(const Field<vector>&) const;
 
         //- Project field onto surface
-        tmp<Field<vector> > project(const Field<sphericalTensor>&) const;
+        tmp<Field<vector>> project(const Field<sphericalTensor>&) const;
 
         //- Project field onto surface
-        tmp<Field<vector> > project(const Field<symmTensor>&) const;
+        tmp<Field<vector>> project(const Field<symmTensor>&) const;
 
         //- Project field onto surface
-        tmp<Field<vector> > project(const Field<tensor>&) const;
+        tmp<Field<vector>> project(const Field<tensor>&) const;
 
         //- Interpolate from points to cell centre
         template<class Type>
-        tmp<GeometricField<Type, fvPatchField, volMesh> > pointAverage
+        tmp<GeometricField<Type, fvPatchField, volMesh>> pointAverage
         (
             const GeometricField<Type, pointPatchField, pointMesh>& pfld
         ) const;
@@ -445,7 +445,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledSurfaceTemplates.C"
+    #include "sampledSurfaceTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C
index 2ad3b90e796623bf3ff33f78c11f6021cd0e58aa..758c3395ed68e62b74fde3cd58f52210253daa93 100644
--- a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C
+++ b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -49,7 +49,7 @@ bool Foam::sampledSurface::checkFieldSize(const Field<Type>& field) const
 template<class Type>
 Type Foam::sampledSurface::integrate(const Field<Type>& field) const
 {
-    Type value = pTraits<Type>::zero;
+    Type value = Zero;
 
     if (checkFieldSize(field))
     {
@@ -62,7 +62,7 @@ Type Foam::sampledSurface::integrate(const Field<Type>& field) const
 
 
 template<class Type>
-Type Foam::sampledSurface::integrate(const tmp<Field<Type> >& field) const
+Type Foam::sampledSurface::integrate(const tmp<Field<Type>>& field) const
 {
     Type value = integrate(field());
     field.clear();
@@ -73,7 +73,7 @@ Type Foam::sampledSurface::integrate(const tmp<Field<Type> >& field) const
 template<class Type>
 Type Foam::sampledSurface::average(const Field<Type>& field) const
 {
-    Type value = pTraits<Type>::zero;
+    Type value = Zero;
 
     if (checkFieldSize(field))
     {
@@ -89,13 +89,13 @@ Type Foam::sampledSurface::average(const Field<Type>& field) const
     }
     else
     {
-        return pTraits<Type>::zero;
+        return Zero;
     }
 }
 
 
 template<class Type>
-Type Foam::sampledSurface::average(const tmp<Field<Type> >& field) const
+Type Foam::sampledSurface::average(const tmp<Field<Type>>& field) const
 {
     Type value = average(field());
     field.clear();
@@ -130,7 +130,7 @@ template<class ReturnType, class Type>
 void Foam::sampledSurface::project
 (
     Field<ReturnType>& res,
-    const tmp<Field<Type> >& field
+    const tmp<Field<Type>>& field
 ) const
 {
     project(res, field());
@@ -139,20 +139,20 @@ void Foam::sampledSurface::project
 
 
 template<class ReturnType, class Type>
-Foam::tmp<Foam::Field<ReturnType> >
+Foam::tmp<Foam::Field<ReturnType>>
 Foam::sampledSurface::project
 (
-    const tmp<Field<Type> >& field
+    const tmp<Field<Type>>& field
 ) const
 {
-    tmp<Field<ReturnType> > tRes(new Field<ReturnType>(faces().size()));
+    tmp<Field<ReturnType>> tRes(new Field<ReturnType>(faces().size()));
     project(tRes(), field);
     return tRes;
 }
 
 
 template<class Type>
-Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
+Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>>
 Foam::sampledSurface::pointAverage
 (
     const GeometricField<Type, pointPatchField, pointMesh>& pfld
@@ -160,7 +160,7 @@ Foam::sampledSurface::pointAverage
 {
     const fvMesh& mesh = dynamic_cast<const fvMesh&>(pfld.mesh()());
 
-    tmp<GeometricField<Type, fvPatchField, volMesh> > tcellAvg
+    tmp<GeometricField<Type, fvPatchField, volMesh>> tcellAvg
     (
         new GeometricField<Type, fvPatchField, volMesh>
         (
@@ -174,10 +174,10 @@ Foam::sampledSurface::pointAverage
                 false
             ),
             mesh,
-            dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
+            dimensioned<Type>("zero", dimless, Zero)
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& cellAvg = tcellAvg();
+    GeometricField<Type, fvPatchField, volMesh>& cellAvg = tcellAvg.ref();
 
     labelField nPointCells(mesh.nCells(), 0);
     {
diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H
index a94b38f0f573f050316e9516c45eb18482747016..8d23810200843601c279b1dff9588f9b05874f0b 100644
--- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H
+++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -252,7 +252,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledSurfacesTemplates.C"
+    #include "sampledSurfacesTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesTemplates.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesTemplates.C
index f43ffdf6effc8e5689c4c487684e59e5bef43843..b1f5a81b887562922d0439f315055d336e547add 100644
--- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesTemplates.C
+++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfacesTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -45,7 +45,7 @@ void Foam::sampledSurfaces::writeSurface
     if (Pstream::parRun())
     {
         // Collect values from all processors
-        List<Field<Type> > gatheredValues(Pstream::nProcs());
+        List<Field<Type>> gatheredValues(Pstream::nProcs());
         gatheredValues[Pstream::myProcNo()] = values;
         Pstream::gatherList(gatheredValues);
 
@@ -54,10 +54,10 @@ void Foam::sampledSurfaces::writeSurface
             // Combine values into single field
             Field<Type> allValues
             (
-                ListListOps::combine<Field<Type> >
+                ListListOps::combine<Field<Type>>
                 (
                     gatheredValues,
-                    accessOp<Field<Type> >()
+                    accessOp<Field<Type>>()
                 )
             );
 
@@ -121,7 +121,7 @@ void Foam::sampledSurfaces::sampleAndWrite
 )
 {
     // interpolator for this field
-    autoPtr<interpolation<Type> > interpolatorPtr;
+    autoPtr<interpolation<Type>> interpolatorPtr;
 
     const word& fieldName = vField.name();
     const fileName outputDir = outputPath_/vField.time().timeName();
diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H
index 973beb2acbc881af265f4c3d4248aecdda4e4d4f..6a41255075237d01ec63bac6dc6a290733949695 100644
--- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H
+++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -118,7 +118,7 @@ private:
         mutable bool needsUpdate_;
 
         //- Search tree for all non-coupled boundary faces
-        mutable autoPtr<indexedOctree<treeDataFace> > boundaryTreePtr_;
+        mutable autoPtr<indexedOctree<treeDataFace>> boundaryTreePtr_;
 
         //- From local surface triangle to mesh cell/face.
         labelList sampleElements_;
@@ -134,14 +134,14 @@ private:
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
         bool update(const meshSearch& meshSearcher);
@@ -291,7 +291,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledTriSurfaceMeshTemplates.C"
+    #include "sampledTriSurfaceMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
index d251431a550ea89caf5e5c7fd67c4bf2a56919e3..e2242536e545eb2c26bae9a5b7fef8e6262b1a2c 100644
--- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
+++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,15 +28,15 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledTriSurfaceMesh::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
 ) const
 {
     // One value per face
-    tmp<Field<Type> > tvalues(new Field<Type>(sampleElements_.size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(sampleElements_.size()));
+    Field<Type>& values = tvalues.ref();
 
     if (sampleSource_ == cells || sampleSource_ == insideCells)
     {
@@ -56,7 +56,7 @@ Foam::sampledTriSurfaceMesh::sampleField
 
         // Create flat boundary field
 
-        Field<Type> bVals(nBnd, pTraits<Type>::zero);
+        Field<Type> bVals(nBnd, Zero);
 
         forAll(vField.boundaryField(), patchI)
         {
@@ -67,7 +67,7 @@ Foam::sampledTriSurfaceMesh::sampleField
                 bVals,
                 vField.boundaryField()[patchI].size(),
                 bFaceI
-            ).assign(vField.boundaryField()[patchI]);
+            ) = vField.boundaryField()[patchI];
         }
 
         // Sample in flat boundary field
@@ -84,15 +84,15 @@ Foam::sampledTriSurfaceMesh::sampleField
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledTriSurfaceMesh::interpolateField
 (
     const interpolation<Type>& interpolator
 ) const
 {
     // One value per vertex
-    tmp<Field<Type> > tvalues(new Field<Type>(sampleElements_.size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(sampleElements_.size()));
+    Field<Type>& values = tvalues.ref();
 
     if (sampleSource_ == cells || sampleSource_ == insideCells)
     {
diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C
index c71c6eba0d3b335066da91c2d5482e14c49c4571..2f1007cb57908fb06bf5db3701c503eacd35e92a 100644
--- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C
+++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "sampledThresholdCellFaces.H"
-
 #include "dictionary.H"
 #include "volFields.H"
 #include "volPointInterpolation.H"
@@ -70,8 +69,7 @@ bool Foam::sampledThresholdCellFaces::updateGeometry() const
     {
         if (debug)
         {
-            Info<< "sampledThresholdCellFaces::updateGeometry() : lookup "
-                << fieldName_ << endl;
+            InfoInFunction<< "Lookup " << fieldName_ << endl;
         }
 
         cellFldPtr = &fvm.lookupObject<volScalarField>(fieldName_);
@@ -82,8 +80,9 @@ bool Foam::sampledThresholdCellFaces::updateGeometry() const
 
         if (debug)
         {
-            Info<< "sampledThresholdCellFaces::updateGeometry() : reading "
-                << fieldName_ << " from time " << fvm.time().timeName()
+            InfoInFunction
+                << "Reading " << fieldName_
+                << " from time " << fvm.time().timeName()
                 << endl;
         }
 
@@ -167,14 +166,6 @@ Foam::sampledThresholdCellFaces::sampledThresholdCellFaces
             << "require at least one of 'lowerLimit' or 'upperLimit'" << endl
             << abort(FatalError);
     }
-
-//    dict.readIfPresent("zone", zoneKey_);
-//
-//    if (debug && zoneKey_.size() && mesh.cellZones().findZoneID(zoneKey_) < 0)
-//    {
-//        Info<< "cellZone " << zoneKey_
-//            << " not found - using entire mesh" << endl;
-//    }
 }
 
 
diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H
index f3758a6239037e8961c909dca7c63694cd11ad06..840a9920ad1c1a051c62afd256656ea3ae6055ff 100644
--- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H
+++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,14 +90,14 @@ class sampledThresholdCellFaces
 
         //- Sample field on faces
         template<class Type>
-        tmp<Field<Type> > sampleField
+        tmp<Field<Type>> sampleField
         (
             const GeometricField<Type, fvPatchField, volMesh>& vField
         ) const;
 
 
         template<class Type>
-        tmp<Field<Type> >
+        tmp<Field<Type>>
         interpolateField(const interpolation<Type>&) const;
 
 
@@ -211,7 +211,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "sampledThresholdCellFacesTemplates.C"
+    #include "sampledThresholdCellFacesTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C
index ed6b5c3a9f65cb71ecce78584539764027d9e73c..03c2fffb4adeb32ae980338cd2e2b235c19349ab 100644
--- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C
+++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,7 +33,7 @@ License
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledThresholdCellFaces::sampleField
 (
     const GeometricField<Type, fvPatchField, volMesh>& vField
@@ -42,12 +42,12 @@ Foam::sampledThresholdCellFaces::sampleField
     // Recreate geometry if time has changed
     updateGeometry();
 
-    return tmp<Field<Type> >(new Field<Type>(vField, meshCells_));
+    return tmp<Field<Type>>(new Field<Type>(vField, meshCells_));
 }
 
 
 template<class Type>
-Foam::tmp<Foam::Field<Type> >
+Foam::tmp<Foam::Field<Type>>
 Foam::sampledThresholdCellFaces::interpolateField
 (
     const interpolation<Type>& interpolator
@@ -57,8 +57,8 @@ Foam::sampledThresholdCellFaces::interpolateField
     updateGeometry();
 
     // One value per point
-    tmp<Field<Type> > tvalues(new Field<Type>(points().size()));
-    Field<Type>& values = tvalues();
+    tmp<Field<Type>> tvalues(new Field<Type>(points().size()));
+    Field<Type>& values = tvalues.ref();
 
     boolList pointDone(points().size(), false);
 
diff --git a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C
index dd2edd5d93c521026541ec27307a48ede9383740..1abe638e484b48a65c4071f22cfaa13fda59c207 100644
--- a/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C
+++ b/src/sampling/sampledSurface/writers/boundaryData/boundaryDataSurfaceWriterTemplates.C
@@ -123,7 +123,7 @@ Foam::fileName Foam::boundaryDataSurfaceWriter::writeTemplate
                 IOobject::NO_WRITE,
                 false
             ),
-            pTraits<Type>::zero,
+            Type(Zero),
             values
         );
 
diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C
index e351afd676aea2b2182c01bbfabc7bbc187a3283..1248f42c153b1251b7f3119e3aed296d9a302023 100644
--- a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C
@@ -80,7 +80,7 @@ Foam::fileName Foam::foamFileSurfaceWriter::write
 
     // Face centers. Not really necessary but very handy when reusing as inputs
     // for e.g. timeVaryingMapped bc.
-    pointField faceCentres(faces.size(),point::zero);
+    pointField faceCentres(faces.size(), Zero);
 
     forAll(faces, faceI)
     {
diff --git a/src/sampling/sampledSurface/writers/makeSurfaceWriterMethods.H b/src/sampling/sampledSurface/writers/makeSurfaceWriterMethods.H
index 8fbcce27a97ffbd7a2a6897b9461c80b39117692..448cff18c5a8d36190af7dc9af7305bf11cdae7b 100644
--- a/src/sampling/sampledSurface/writers/makeSurfaceWriterMethods.H
+++ b/src/sampling/sampledSurface/writers/makeSurfaceWriterMethods.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -41,43 +41,43 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSurfaceWriterType(ThisClass)                                      \
-    defineTypeNameAndDebug(ThisClass, 0);                                     \
+#define makeSurfaceWriterType(ThisClass)                                       \
+    defineTypeNameAndDebug(ThisClass, 0);                                      \
     addToRunTimeSelectionTable(surfaceWriter, ThisClass, word)
 
 
-#define defineSurfaceWriterWriteField(ThisClass, FieldType)                   \
-    Foam::fileName ThisClass::write                                           \
-    (                                                                         \
-        const fileName& outputDir,                                            \
-        const fileName& surfaceName,                                          \
-        const pointField& points,                                             \
-        const faceList& faces,                                                \
-        const word& fieldName,                                                \
-        const Field<FieldType>& values,                                       \
-        const bool isNodeValues,                                              \
-        const bool verbose                                                    \
-    ) const                                                                   \
-    {                                                                         \
-        return writeTemplate                                                  \
-        (                                                                     \
-            outputDir,                                                        \
-            surfaceName,                                                      \
-            points,                                                           \
-            faces,                                                            \
-            fieldName,                                                        \
-            values,                                                           \
-            isNodeValues,                                                     \
-            verbose                                                           \
-        );                                                                    \
+#define defineSurfaceWriterWriteField(ThisClass, FieldType)                    \
+    Foam::fileName ThisClass::write                                            \
+    (                                                                          \
+        const fileName& outputDir,                                             \
+        const fileName& surfaceName,                                           \
+        const pointField& points,                                              \
+        const faceList& faces,                                                 \
+        const word& fieldName,                                                 \
+        const Field<FieldType>& values,                                        \
+        const bool isNodeValues,                                               \
+        const bool verbose                                                     \
+    ) const                                                                    \
+    {                                                                          \
+        return writeTemplate                                                          \
+        (                                                                      \
+            outputDir,                                                         \
+            surfaceName,                                                       \
+            points,                                                            \
+            faces,                                                             \
+            fieldName,                                                         \
+            values,                                                            \
+            isNodeValues,                                                      \
+            verbose                                                            \
+        );                                                                     \
     }
 
 
-#define defineSurfaceWriterWriteFields(ThisClass)                             \
-    defineSurfaceWriterWriteField(ThisClass, scalar);                         \
-    defineSurfaceWriterWriteField(ThisClass, vector);                         \
-    defineSurfaceWriterWriteField(ThisClass, sphericalTensor);                \
-    defineSurfaceWriterWriteField(ThisClass, symmTensor);                     \
+#define defineSurfaceWriterWriteFields(ThisClass)                              \
+    defineSurfaceWriterWriteField(ThisClass, scalar);                          \
+    defineSurfaceWriterWriteField(ThisClass, vector);                          \
+    defineSurfaceWriterWriteField(ThisClass, sphericalTensor);                 \
+    defineSurfaceWriterWriteField(ThisClass, symmTensor);                      \
     defineSurfaceWriterWriteField(ThisClass, tensor)
 
 
diff --git a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C
index dfe2a9f8cea9a1e09e28262ec1ee5939d13adfd4..857d6816a79cba870d5aa716028fdfbac94914bb 100644
--- a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -288,7 +288,7 @@ void Foam::nastranSurfaceWriter::writeGeometry
 (
     const pointField& points,
     const faceList& faces,
-    List<DynamicList<face> >& decomposedFaces,
+    List<DynamicList<face>>& decomposedFaces,
     OFstream& os
 ) const
 {
@@ -408,7 +408,7 @@ Foam::nastranSurfaceWriter::nastranSurfaceWriter(const dictionary& options)
         separator_ = ",";
     }
 
-    List<Tuple2<word, word> > fieldSet(options.lookup("fields"));
+    List<Tuple2<word, word>> fieldSet(options.lookup("fields"));
 
     forAll(fieldSet, i)
     {
@@ -453,7 +453,7 @@ Foam::fileName Foam::nastranSurfaceWriter::write
         << "$" << nl
         << "BEGIN BULK" << nl;
 
-    List<DynamicList<face> > decomposedFaces(faces.size());
+    List<DynamicList<face>> decomposedFaces(faces.size());
 
     writeGeometry(points, faces, decomposedFaces, os);
 
diff --git a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.H b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.H
index 733c1a0d070a594a976a9eb2a55742c4257e4e69..4cf8bc2c2c2fbda9bc803206c663b4ee7135b9f7 100644
--- a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.H
+++ b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -135,7 +135,7 @@ private:
         (
             const pointField& points,
             const faceList& faces,
-            List<DynamicList<face> >& decomposedFaces,
+            List<DynamicList<face>>& decomposedFaces,
             OFstream& os
         ) const;
 
diff --git a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C
index 9b1815787d0463ad2e1b17f325e34fbaf48cd582..a21b29a0c06422b7677ad332e34779a668620576 100644
--- a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C
+++ b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -192,7 +192,7 @@ Foam::fileName Foam::nastranSurfaceWriter::writeTemplate
         << "$" << nl
         << "BEGIN BULK" << nl;
 
-    List<DynamicList<face> > decomposedFaces(faces.size());
+    List<DynamicList<face>> decomposedFaces(faces.size());
 
     writeGeometry(points, faces, decomposedFaces, os);
 
@@ -210,7 +210,7 @@ Foam::fileName Foam::nastranSurfaceWriter::writeTemplate
             const DynamicList<face>& dFaces = decomposedFaces[i];
             forAll(dFaces, faceI)
             {
-                Type v = pTraits<Type>::zero;
+                Type v = Zero;
                 const face& f = dFaces[faceI];
 
                 forAll(f, fptI)
diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
index 0d62326da7cdd5b542ab8131d0e17fce0624b252..2ac91fca0fc5fb4760bf979734abd49d6c71ef02 100644
--- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -31,6 +31,7 @@ License
 namespace Foam
 {
     makeSurfaceWriterType(rawSurfaceWriter);
+    addToRunTimeSelectionTable(surfaceWriter, rawSurfaceWriter, wordDict);
 }
 
 
@@ -207,10 +208,24 @@ namespace Foam
 
 Foam::rawSurfaceWriter::rawSurfaceWriter()
 :
-    surfaceWriter()
+    surfaceWriter(),
+    writeCompression_(IOstream::UNCOMPRESSED)
 {}
 
 
+Foam::rawSurfaceWriter::rawSurfaceWriter(const dictionary& options)
+:
+    surfaceWriter(),
+    writeCompression_(IOstream::UNCOMPRESSED)
+{
+    if (options.found("compression"))
+    {
+        writeCompression_ =
+            IOstream::compressionEnum(options.lookup("compression"));
+    }
+}
+
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::rawSurfaceWriter::~rawSurfaceWriter()
@@ -233,7 +248,13 @@ Foam::fileName Foam::rawSurfaceWriter::write
         mkDir(outputDir);
     }
 
-    OFstream os(outputDir/surfaceName + ".raw");
+    OFstream os
+    (
+        outputDir/surfaceName + ".raw",
+        IOstream::ASCII,
+        IOstream::currentVersion,
+        writeCompression_
+    );
 
     if (verbose)
     {
@@ -241,7 +262,7 @@ Foam::fileName Foam::rawSurfaceWriter::write
     }
 
 
-    // header
+    // Header
     os  << "# geometry NO_DATA " << faces.size() << nl
         << "#  x  y  z" << nl;
 
@@ -258,7 +279,9 @@ Foam::fileName Foam::rawSurfaceWriter::write
 }
 
 
-// create write methods
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Create write methods
 defineSurfaceWriterWriteFields(Foam::rawSurfaceWriter);
 
 
diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H
index fbfccee75f9aad954a171bb6203121d114e61285..9304b5485792f8f3e424f4c676e0c3dfb5c5beae 100644
--- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H
+++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -51,6 +51,12 @@ class rawSurfaceWriter
 :
     public surfaceWriter
 {
+    // Private data
+
+        //- Output compression, defaults to uncompressed
+        IOstream::compressionType writeCompression_;
+
+
     // Private Member Functions
 
         static inline void writeLocation
@@ -106,6 +112,9 @@ public:
         //- Construct null
         rawSurfaceWriter();
 
+        //- Construct with some output options
+        rawSurfaceWriter(const dictionary& options);
+
 
     //- Destructor
     virtual ~rawSurfaceWriter();
diff --git a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C
index f62f88699276b00b84e39e7f004efad9c8ba2486..5ab19e05be36a608b5adb2e69a13ddb8c001dbb7 100644
--- a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
@@ -51,7 +51,7 @@ void Foam::vtkSurfaceWriter::writeGeometry
         << "DATASET POLYDATA" << nl;
 
     // Write vertex coords
-    os  << "POINTS " << points.size() << " float" << nl;
+    os  << "POINTS " << points.size() << " double" << nl;
     forAll(points, pointI)
     {
         const point& pt = points[pointI];
diff --git a/src/sixDoFRigidBodyMotion/Make/files b/src/sixDoFRigidBodyMotion/Make/files
index 1184c6ad72d33ab7e051c816f76e94b9d53e0fc0..837d2df3fd19a45f3ff0ab7af532f190f69d1fdd 100644
--- a/src/sixDoFRigidBodyMotion/Make/files
+++ b/src/sixDoFRigidBodyMotion/Make/files
@@ -28,8 +28,6 @@ pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacement
 pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
 
 sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
-sixDoFRigidBodyMotionSolver/externalPointEdgePoint.C
-sixDoFRigidBodyMotionSolver/pointPatchDist.C
 
 sixDoFSolvers/sixDoFSolver/sixDoFSolver.C
 sixDoFSolvers/sixDoFSolver/newSixDoFSolver.C
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
index b69b8065be3eeacbebb5d36a907fad5fdc386036..0595948e73d86cfef774c2343a31f9504377173e 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ sixDoFRigidBodyDisplacementPointPatchVectorField
     rhoInf_(1.0),
     rhoName_("rho"),
     lookupGravity_(-1),
-    g_(vector::zero),
+    g_(Zero),
     curTimeIndex_(-1)
 {}
 
@@ -70,7 +70,7 @@ sixDoFRigidBodyDisplacementPointPatchVectorField
     rhoInf_(1.0),
     rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
     lookupGravity_(-1),
-    g_(vector::zero),
+    g_(Zero),
     curTimeIndex_(-1)
 {
     if (rhoName_ == "rhoInf")
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H
index a4d9865a3637d9cc5742cdd1b93ddf64ec30e937..6eb52b4c39aa760872a25483fd0d5c54c8e50788 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -121,9 +121,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new sixDoFRigidBodyDisplacementPointPatchVectorField
                 (
@@ -140,12 +140,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new sixDoFRigidBodyDisplacementPointPatchVectorField
                 (
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
index d567e3e04aa9249b364552a5ee5576e35bc8b6a3..98d1fc871bff88cb8c0d4469e125a1195090adfd 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -160,7 +160,7 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
         firstIter = true;
     }
 
-    vector gravity = vector::zero;
+    vector gravity = Zero;
 
     if (db().foundObject<uniformDimensionedVectorField>("g"))
     {
@@ -175,7 +175,7 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
     (
         firstIter,
         gravity*motion_.mass(),
-        vector::zero,
+        Zero,
         t.deltaTValue(),
         t.deltaT0Value()
     );
diff --git a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H
index bd7538ad7127b2bb617c8562c88f07f4e5c67b88..b5025104db503503d87a61e6a8fcd426669b6ef3 100644
--- a/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H
+++ b/src/sixDoFRigidBodyMotion/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,9 +96,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<pointPatchField<vector> > clone() const
+        virtual autoPtr<pointPatchField<vector>> clone() const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
                 (
@@ -115,12 +115,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual autoPtr<pointPatchField<vector> > clone
+        virtual autoPtr<pointPatchField<vector>> clone
         (
             const DimensionedField<vector, pointMesh>& iF
         ) const
         {
-            return autoPtr<pointPatchField<vector> >
+            return autoPtr<pointPatchField<vector>>
             (
                 new uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField
                 (
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/orientation/sixDoFRigidBodyMotionOrientationConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/orientation/sixDoFRigidBodyMotionOrientationConstraint.C
index 90b162078ff684dcba8e5fe389855a2d5a3aa732..c3a0cb965bad06610ab243bfabb42565dd058b98 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/orientation/sixDoFRigidBodyMotionOrientationConstraint.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/orientation/sixDoFRigidBodyMotionOrientationConstraint.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,7 +82,7 @@ constrainRotation
     pointConstraint& pc
 ) const
 {
-    pc.combine(pointConstraint(Tuple2<label, vector>(3, vector::zero)));
+    pc.combine(pointConstraint(Tuple2<label, vector>(3, Zero)));
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C
index 56e79b30f532a95a54bdcab8730b95a26e914d96..32021c0747676d5fdae8a76144358176aa103811 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/constraints/point/sixDoFRigidBodyMotionPointConstraint.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -83,7 +83,7 @@ void Foam::sixDoFRigidBodyMotionConstraints::point::constrainTranslation
     pointConstraint& pc
 ) const
 {
-    pc.combine(pointConstraint(Tuple2<label, vector>(3, vector::zero)));
+    pc.combine(pointConstraint(Tuple2<label, vector>(3, Zero)));
 }
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
index 7f0d8ddb0107547cad527061bc1db37e38b52b3d..2237bf6963c3816b7a425782cb99e84718fc3298 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,13 +120,13 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
     }
     else
     {
-        a = vector::zero;
+        a = Zero;
     }
 
     // Damping of along axis angular velocity only
     restraintMoment = -stiffness_*theta*a - damping_*(motion.omega() & a)*a;
 
-    restraintForce = vector::zero;
+    restraintForce = Zero;
 
     // Not needed to be altered as restraintForce is zero, but set to
     // centreOfRotation to be sure of no spurious moment
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C
index 3ce4308d9f3aab484910e74f9da73a0901ab010f..5d70d4db1121e71fe4562b337661de087751f805 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearDamper/linearDamper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearDamper::restrain
 ) const
 {
     restraintForce = -coeff_*motion.v();
-    restraintMoment = vector::zero;
+    restraintMoment = Zero;
 
     if (motion.report())
     {
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C
index 754177bbd5dd78bc39f4c771904215575277e6ff..40b19b2006cacd0a6cad623eac602e6c464b5147 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/linearSpring/linearSpring.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -91,7 +91,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpring::restrain
 
     restraintForce = -stiffness_*(magR - restLength_)*r - damping_*(r & v)*r;
 
-    restraintMoment = vector::zero;
+    restraintMoment = Zero;
 
     if (motion.report())
     {
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C
index d372a671489c7cf40dfd6873ebb1eabf9d25d597..f0731256666d03a3d5bb1415f553bac527790598 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularDamper/sphericalAngularDamper.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,7 +79,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularDamper::restrain
 ) const
 {
     restraintMoment = -coeff_*motion.omega();
-    restraintForce = vector::zero;
+    restraintForce = Zero;
 
     if (motion.report())
     {
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C
index 4ae6f217a400ffc21836b506733e9f5d2871bd2c..aa012153ce948e5e75d478ed3f5a8821b6a328d7 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/sphericalAngularSpring/sphericalAngularSpring.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,14 +80,14 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::restrain
     vector& restraintMoment
 ) const
 {
-    restraintMoment = vector::zero;
+    restraintMoment = Zero;
 
     for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
     {
-        vector axis = vector::zero;
+        vector axis = Zero;
         axis[cmpt] = 1;
 
-        vector refDir = vector::zero;
+        vector refDir = Zero;
         refDir[(cmpt + 1) % 3] = 1;
 
         vector newDir = motion.orientation() & refDir;
@@ -101,7 +101,7 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::restrain
 
     restraintMoment += -damping_*motion.omega();
 
-    restraintForce = vector::zero;
+    restraintForce = Zero;
 
     // Not needed to be altered as restraintForce is zero, but set to
     // centreOfRotation to be sure of no spurious moment
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C
index acaeea98fcd1d2d292b84ec17963c1146e6be0d4..000ca2618f3b27d3a871e7adb0cbe547c33bc2e6 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,7 +127,7 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
     // Damping of along axis angular velocity only
     restraintMoment = moment*axis_ - damping_*(motion.omega() & axis_)*axis_;
 
-    restraintForce = vector::zero;
+    restraintForce = Zero;
 
     // Not needed to be altered as restraintForce is zero, but set to
     // centreOfRotation to be sure of no spurious moment
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
index e7a8b92d339880ba8820abd4946cd0bd8abf96f6..06774ef78be1c281f6e017d40aff60ffcbb6f79a 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -46,13 +46,13 @@ void Foam::sixDoFRigidBodyMotion::applyRestraints()
             }
 
             // Restraint position
-            point rP = vector::zero;
+            point rP = Zero;
 
             // Restraint force
-            vector rF = vector::zero;
+            vector rF = Zero;
 
             // Restraint moment
-            vector rM = vector::zero;
+            vector rM = Zero;
 
             // Accumulate the restraints
             restraints_[rI].restrain(*this, rP, rF, rM);
@@ -78,8 +78,8 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion()
     constraints_(),
     tConstraints_(tensor::I),
     rConstraints_(tensor::I),
-    initialCentreOfMass_(vector::zero),
-    initialCentreOfRotation_(vector::zero),
+    initialCentreOfMass_(Zero),
+    initialCentreOfRotation_(Zero),
     initialQ_(I),
     mass_(VSMALL),
     momentOfInertia_(diagTensor::one*VSMALL),
@@ -352,11 +352,11 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::transform
     septernion s
     (
         centreOfRotation() - initialCentreOfRotation(),
-        quaternion(Q() & initialQ().T())
+        quaternion(Q().T() & initialQ())
     );
 
     tmp<pointField> tpoints(new pointField(initialPoints));
-    pointField& points = tpoints();
+    pointField& points = tpoints.ref();
 
     forAll(points, pointi)
     {
@@ -375,7 +375,7 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::transform
 
                 points[pointi] =
                     initialCentreOfRotation()
-                  + ss.transform
+                  + ss.invTransformPoint
                     (
                         initialPoints[pointi]
                       - initialCentreOfRotation()
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C
index 24eeda45d8aef1f3ff776dcb6be3758b1dc05856..f6328c10573bc732ce90e930839d793a73a02d4d 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,12 +29,12 @@ License
 
 Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState()
 :
-    centreOfRotation_(vector::zero),
+    centreOfRotation_(Zero),
     Q_(I),
-    v_(vector::zero),
-    a_(vector::zero),
-    pi_(vector::zero),
-    tau_(vector::zero)
+    v_(Zero),
+    a_(Zero),
+    pi_(Zero),
+    tau_(Zero)
 {}
 
 
diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
index e671ce7bbd2b6372a5eacabc955d7bb3d4337023..eb4d7ae3a3fe9e119b5713187c5e940bf3be7872 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -187,7 +187,7 @@ void Foam::sixDoFRigidBodyMotionSolver::solve()
         firstIter = true;
     }
 
-    dimensionedVector g("g", dimAcceleration, vector::zero);
+    dimensionedVector g("g", dimAcceleration, Zero);
 
     if (db().foundObject<uniformDimensionedVectorField>("g"))
     {
diff --git a/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C b/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C
index 4f39b3266c92c8a9ef0fe8c670dc74437d6d07fc..5a392b1b47ce831efd7140c869e84a34f9d20554 100644
--- a/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C
+++ b/src/sixDoFRigidBodyMotion/sixDoFSolvers/Newmark/Newmark.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ void Foam::sixDoFSolvers::Newmark::solve
             tConstraints()
           & (
                 deltaT*v0()
-              + sqr(deltaT)*beta_*a() + sqr(deltaT)*(0.5 - beta_)*a0()
+              + aDamp()*sqr(deltaT)*(beta_*a() + (0.5 - beta_)*a0())
             )
         );
 
@@ -105,7 +105,7 @@ void Foam::sixDoFSolvers::Newmark::solve
         rConstraints()
       & (
             deltaT*pi0()
-          + sqr(deltaT)*beta_*tau() + sqr(deltaT)*(0.5 - beta_)*tau0()
+          + aDamp()*sqr(deltaT)*(beta_*tau() + (0.5 - beta_)*tau0())
         );
     Tuple2<tensor, vector> Qpi = rotate(Q0(), piDeltaT, 1);
     Q() = Qpi.first();
diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C
index a79dfe052149e66a125011e49b9b25fd7fc8d3c9..6eebe1a080851fcf107dcad7d9b364a027e47645 100644
--- a/src/surfMesh/MeshedSurface/MeshedSurface.C
+++ b/src/surfMesh/MeshedSurface/MeshedSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,10 +119,7 @@ void Foam::MeshedSurface<Face>::write
 {
     if (debug)
     {
-        Info<< "MeshedSurface::write"
-            "(const fileName&, const MeshedSurface&) : "
-            "writing to " << name
-            << endl;
+        InfoInFunction << "Writing to " << name << endl;
     }
 
     const word ext = name.ext();
@@ -168,7 +165,7 @@ template<class Face>
 Foam::MeshedSurface<Face>::MeshedSurface
 (
     const Xfer<pointField>& pointLst,
-    const Xfer<List<Face> >& faceLst,
+    const Xfer<List<Face>>& faceLst,
     const Xfer<surfZoneList>& zoneLst
 )
 :
@@ -183,7 +180,7 @@ template<class Face>
 Foam::MeshedSurface<Face>::MeshedSurface
 (
     const Xfer<pointField>& pointLst,
-    const Xfer<List<Face> >& faceLst,
+    const Xfer<List<Face>>& faceLst,
     const labelUList& zoneSizes,
     const UList<word>& zoneNames
 )
@@ -392,7 +389,7 @@ Foam::MeshedSurface<Face>::MeshedSurface
 template<class Face>
 Foam::MeshedSurface<Face>::MeshedSurface
 (
-    const Xfer<UnsortedMeshedSurface<Face> >& surf
+    const Xfer<UnsortedMeshedSurface<Face>>& surf
 )
 :
     ParentType(List<Face>(), pointField())
@@ -404,7 +401,7 @@ Foam::MeshedSurface<Face>::MeshedSurface
 template<class Face>
 Foam::MeshedSurface<Face>::MeshedSurface
 (
-    const Xfer<MeshedSurface<Face> >& surf
+    const Xfer<MeshedSurface<Face>>& surf
 )
 :
     ParentType(List<Face>(), pointField())
@@ -515,7 +512,7 @@ template<class Face>
 void Foam::MeshedSurface<Face>::reset
 (
     const Xfer<pointField>& pointLst,
-    const Xfer<List<Face> >& faceLst,
+    const Xfer<List<Face>>& faceLst,
     const Xfer<surfZoneList>& zoneLst
 )
 {
@@ -543,8 +540,8 @@ void Foam::MeshedSurface<Face>::reset
 template<class Face>
 void Foam::MeshedSurface<Face>::reset
 (
-    const Xfer<List<point> >& pointLst,
-    const Xfer<List<Face> >& faceLst,
+    const Xfer<List<point>>& pointLst,
+    const Xfer<List<Face>>& faceLst,
     const Xfer<surfZoneList>& zoneLst
 )
 {
@@ -603,8 +600,7 @@ bool Foam::MeshedSurface<Face>::stitchFaces
 
     if (verbose)
     {
-        Info<< "MeshedSurface::stitchFaces : Renumbering all faces"
-            << endl;
+        InfoInFunction<< "Renumbering all faces" << endl;
     }
 
     // Set the coordinates to the merged ones
@@ -1091,7 +1087,7 @@ void Foam::MeshedSurface<Face>::transfer
 
 
 template<class Face>
-Foam::Xfer<Foam::MeshedSurface<Face> > Foam::MeshedSurface<Face>::xfer()
+Foam::Xfer<Foam::MeshedSurface<Face>> Foam::MeshedSurface<Face>::xfer()
 {
     return xferMove(*this);
 }
diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.H b/src/surfMesh/MeshedSurface/MeshedSurface.H
index 00e25f46e878d8e651134a0de27141cff47497cb..e3d99ca9993ada566849671313c2e90a7efd8c2f 100644
--- a/src/surfMesh/MeshedSurface/MeshedSurface.H
+++ b/src/surfMesh/MeshedSurface/MeshedSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -145,8 +145,8 @@ protected:
         //- Sort faces by zones and store sorted faces
         void sortFacesAndStore
         (
-            const Xfer<List<Face> >& unsortedFaces,
-            const Xfer<List<label> >& zoneIds,
+            const Xfer<List<Face>>& unsortedFaces,
+            const Xfer<List<label>>& zoneIds,
             const bool sorted
         );
 
@@ -192,7 +192,7 @@ public:
         MeshedSurface
         (
             const Xfer<pointField>&,
-            const Xfer<List<Face> >&,
+            const Xfer<List<Face>>&,
             const Xfer<surfZoneList>&
         );
 
@@ -201,7 +201,7 @@ public:
         MeshedSurface
         (
             const Xfer<pointField>&,
-            const Xfer<List<Face> >&,
+            const Xfer<List<Face>>&,
             const labelUList& zoneSizes = labelUList(),
             const UList<word>& zoneNames = UList<word>()
         );
@@ -223,10 +223,10 @@ public:
         MeshedSurface(const surfMesh&);
 
         //- Construct by transferring the contents from a UnsortedMeshedSurface
-        MeshedSurface(const Xfer<UnsortedMeshedSurface<Face> >&);
+        MeshedSurface(const Xfer<UnsortedMeshedSurface<Face>>&);
 
         //- Construct by transferring the contents from a MeshedSurface
-        MeshedSurface(const Xfer<MeshedSurface<Face> >&);
+        MeshedSurface(const Xfer<MeshedSurface<Face>>&);
 
         //- Construct from file name (uses extension to determine type)
         MeshedSurface(const fileName&);
@@ -354,7 +354,7 @@ public:
             virtual void reset
             (
                 const Xfer<pointField >& points,
-                const Xfer<List<Face> >& faces,
+                const Xfer<List<Face>>& faces,
                 const Xfer<surfZoneList>& zones
             );
 
@@ -362,8 +362,8 @@ public:
             //  Note, optimized to avoid overwriting data (with Xfer::null)
             virtual void reset
             (
-                const Xfer<List<point> >& points,
-                const Xfer<List<Face> >& faces,
+                const Xfer<List<point>>& points,
+                const Xfer<List<Face>>& faces,
                 const Xfer<surfZoneList >& zones
             );
 
@@ -412,7 +412,7 @@ public:
             void transfer(UnsortedMeshedSurface<Face>&);
 
             //- Transfer contents to the Xfer container
-            Xfer<MeshedSurface<Face> > xfer();
+            Xfer<MeshedSurface<Face>> xfer();
 
 
         // Read
@@ -485,7 +485,7 @@ inline label MeshedSurface<triFace>::triangulate(List<label>& faceMap)
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MeshedSurface.C"
+    #include "MeshedSurface.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C b/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C
index d20c3fc77936e9f9397bfa5b7420b430bfab32b0..41da2d6a1a55fdba1d3839fc32039b345b098003 100644
--- a/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C
+++ b/src/surfMesh/MeshedSurface/MeshedSurfaceNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,16 +28,13 @@ License
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-
 template<class Face>
-Foam::autoPtr< Foam::MeshedSurface<Face> >
+Foam::autoPtr<Foam::MeshedSurface<Face>>
 Foam::MeshedSurface<Face>::New(const fileName& name, const word& ext)
 {
     if (debug)
     {
-        Info<< "MeshedSurface::New(const fileName&, const word&) : "
-            "constructing MeshedSurface"
-            << endl;
+        InfoInFunction << "Constructing MeshedSurface" << endl;
     }
 
     typename fileExtensionConstructorTable::iterator cstrIter =
@@ -50,7 +47,7 @@ Foam::MeshedSurface<Face>::New(const fileName& name, const word& ext)
         if (supported.found(ext))
         {
             // create indirectly
-            autoPtr< MeshedSurface<Face> > surf(new MeshedSurface<Face>);
+            autoPtr<MeshedSurface<Face>> surf(new MeshedSurface<Face>);
             surf().transfer(FriendType::New(name, ext)());
 
             return surf;
@@ -66,12 +63,12 @@ Foam::MeshedSurface<Face>::New(const fileName& name, const word& ext)
             << exit(FatalError);
     }
 
-    return autoPtr< MeshedSurface<Face> >(cstrIter()(name));
+    return autoPtr<MeshedSurface<Face>>(cstrIter()(name));
 }
 
 
 template<class Face>
-Foam::autoPtr< Foam::MeshedSurface<Face> >
+Foam::autoPtr<Foam::MeshedSurface<Face>>
 Foam::MeshedSurface<Face>::New(const fileName& name)
 {
     word ext = name.ext();
@@ -82,4 +79,5 @@ Foam::MeshedSurface<Face>::New(const fileName& name)
     return New(name, ext);
 }
 
+
 // ************************************************************************* //
diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C b/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C
index cea56fc0724d19c1524cbda7526ef4ef535e81f5..f99d18179a6c329db4c47a3a9111f48fa1a33a8b 100644
--- a/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C
+++ b/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -64,8 +64,8 @@ void Foam::MeshedSurface<Face>::checkZones()
 template<class Face>
 void Foam::MeshedSurface<Face>::sortFacesAndStore
 (
-    const Xfer<List<Face> >& unsortedFaces,
-    const Xfer<List<label> >& zoneIds,
+    const Xfer<List<Face>>& unsortedFaces,
+    const Xfer<List<label>>& zoneIds,
     const bool sorted
 )
 {
diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaces.C b/src/surfMesh/MeshedSurface/MeshedSurfaces.C
index 7cc72bb7e9972f4c3ea15bfcf02e468b4d8d7e3f..999c755c7e5faaceeddbf6a2236b9d4dcf57333b 100644
--- a/src/surfMesh/MeshedSurface/MeshedSurfaces.C
+++ b/src/surfMesh/MeshedSurface/MeshedSurfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,15 +32,15 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define makeSurface(surfType, faceType)                                       \
-    defineNamedTemplateTypeNameAndDebug(surfType<faceType>, 0);               \
-    defineTemplatedRunTimeSelectionTable(surfType,fileExtension,faceType);    \
-    defineTemplatedMemberFunctionSelectionTable                               \
-    (                                                                         \
-        surfType,                                                             \
-        write,                                                                \
-        fileExtension,                                                        \
-        faceType                                                              \
+#define makeSurface(surfType, faceType)                                        \
+    defineNamedTemplateTypeNameAndDebug(surfType<faceType>, 0);                \
+    defineTemplatedRunTimeSelectionTable(surfType,fileExtension,faceType);     \
+    defineTemplatedMemberFunctionSelectionTable                                \
+    (                                                                          \
+        surfType,                                                              \
+        write,                                                                 \
+        fileExtension,                                                         \
+        faceType                                                               \
     );
 
 
diff --git a/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.C b/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.C
index ddf71ab6e1d4d91483e9850f5bff7c8e95684770..9d063409df601955d2bfe725957b545e10563c16 100644
--- a/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.C
+++ b/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,7 +84,7 @@ void Foam::MeshedSurfaceIOAllocator::clear()
 
 void Foam::MeshedSurfaceIOAllocator::resetFaces
 (
-    const Xfer<List<face> >& faces,
+    const Xfer<List<face>>& faces,
     const Xfer<surfZoneList>& zones
 )
 {
@@ -120,7 +120,7 @@ void Foam::MeshedSurfaceIOAllocator::reset
 
 void Foam::MeshedSurfaceIOAllocator::reset
 (
-    const Xfer<List<point> >& points,
+    const Xfer<List<point>>& points,
     const Xfer<faceList>& faces,
     const Xfer<surfZoneList>& zones
 )
diff --git a/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.H b/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.H
index bd4d8ad6b55bce713000472974ad72c960afbb59..0e9d481cb494b9b16efb0bc3b134ed97e9f36ffd 100644
--- a/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.H
+++ b/src/surfMesh/MeshedSurfaceAllocator/MeshedSurfaceIOAllocator.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,7 +173,7 @@ public:
             //  Note, optimized to avoid overwriting data (with Xfer::null)
             void reset
             (
-                const Xfer<List<point> >& points,
+                const Xfer<List<point>>& points,
                 const Xfer<faceList>& faces,
                 const Xfer<surfZoneList>& zones
             );
diff --git a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C
index ac75fa52d89bd18f06b1d3728f50f53a95113bd7..4b8a754bcaa66afb1696f4e2b1cab24c845fdd6d 100644
--- a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C
+++ b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -62,10 +62,7 @@ void Foam::MeshedSurfaceProxy<Face>::write
 {
     if (debug)
     {
-        Info<< "MeshedSurfaceProxy::write"
-            "(const fileName&, const MeshedSurfaceProxy&) : "
-            "writing to " << name
-            << endl;
+        InfoInFunction << "Writing to " << name << endl;
     }
 
     word ext = name.ext();
@@ -98,14 +95,11 @@ void Foam::MeshedSurfaceProxy<Face>::write
 
     if (debug)
     {
-        Info<< "MeshedSurfaceProxy::write"
-            "(const Time&, const word&) : "
-            "writing to " << name
-            << endl;
+        InfoInFunction << "Writing to " << name << endl;
     }
 
 
-    // the local location
+    // The local location
     const fileName objectDir
     (
         t.timePath()/surfaceRegistry::prefix/name/surfMesh::meshSubDir
diff --git a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H
index 7824533ee1f580b10211d0a92a80205c935bbddf..4cc7264a4348cd1c0aecfc9978f3d8f138df9d81 100644
--- a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H
+++ b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxy.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -187,7 +187,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "MeshedSurfaceProxy.C"
+    #include "MeshedSurfaceProxy.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxyCore.C b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxyCore.C
index 6dca32fd2e3ce0858c5f1b82f35b7c354a1ae247..76750a14d448ebe715f89bed5cc1c9c31eb30c8e 100644
--- a/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxyCore.C
+++ b/src/surfMesh/MeshedSurfaceProxy/MeshedSurfaceProxyCore.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,14 +33,14 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define makeSurface(surfType, faceType)                                       \
-    defineNamedTemplateTypeNameAndDebug(surfType<faceType>, 0);               \
-    defineTemplatedMemberFunctionSelectionTable                               \
-    (                                                                         \
-        surfType,                                                             \
-        write,                                                                \
-        fileExtension,                                                        \
-        faceType                                                              \
+#define makeSurface(surfType, faceType)                                        \
+    defineNamedTemplateTypeNameAndDebug(surfType<faceType>, 0);                \
+    defineTemplatedMemberFunctionSelectionTable                                \
+    (                                                                          \
+        surfType,                                                              \
+        write,                                                                 \
+        fileExtension,                                                         \
+        faceType                                                               \
     );
 
 
diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C
index 16d2ad18eb3f7f4581d607f5f716a8bfa1d79e8a..10a973eb053477fc186556a8fe525fa20d7db865 100644
--- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C
+++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,10 +107,7 @@ void Foam::UnsortedMeshedSurface<Face>::write
 {
     if (debug)
     {
-        Info<< "UnsortedMeshedSurface::write"
-            "(const fileName&, const UnsortedMeshedSurface&) : "
-            "writing to " << name
-            << endl;
+        InfoInFunction << "Writing to " << name << endl;
     }
 
     const word ext = name.ext();
@@ -156,8 +153,8 @@ template<class Face>
 Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface
 (
     const Xfer<pointField>& pointLst,
-    const Xfer<List<Face> >& faceLst,
-    const Xfer<List<label> >& zoneIds,
+    const Xfer<List<Face>>& faceLst,
+    const Xfer<List<label>>& zoneIds,
     const Xfer<surfZoneIdentifierList>& zoneTofc
 )
 :
@@ -171,7 +168,7 @@ template<class Face>
 Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface
 (
     const Xfer<pointField>& pointLst,
-    const Xfer<List<Face> >& faceLst,
+    const Xfer<List<Face>>& faceLst,
     const labelUList& zoneSizes,
     const UList<word>& zoneNames
 )
@@ -231,7 +228,7 @@ Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface
 template<class Face>
 Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface
 (
-    const Xfer<UnsortedMeshedSurface<Face> >& surf
+    const Xfer<UnsortedMeshedSurface<Face>>& surf
 )
 :
     ParentType()
@@ -243,7 +240,7 @@ Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface
 template<class Face>
 Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface
 (
-    const Xfer<MeshedSurface<Face> >& surf
+    const Xfer<MeshedSurface<Face>>& surf
 )
 :
     ParentType()
@@ -598,8 +595,8 @@ template<class Face>
 void Foam::UnsortedMeshedSurface<Face>::reset
 (
     const Xfer<pointField>& pointLst,
-    const Xfer<List<Face> >& faceLst,
-    const Xfer<List<label> >& zoneIds
+    const Xfer<List<Face>>& faceLst,
+    const Xfer<List<label>>& zoneIds
 )
 {
     ParentType::reset
@@ -619,9 +616,9 @@ void Foam::UnsortedMeshedSurface<Face>::reset
 template<class Face>
 void Foam::UnsortedMeshedSurface<Face>::reset
 (
-    const Xfer<List<point> >& pointLst,
-    const Xfer<List<Face> >& faceLst,
-    const Xfer<List<label> >& zoneIds
+    const Xfer<List<point>>& pointLst,
+    const Xfer<List<Face>>& faceLst,
+    const Xfer<List<label>>& zoneIds
 )
 {
     ParentType::reset
@@ -677,7 +674,7 @@ void Foam::UnsortedMeshedSurface<Face>::transfer
 
 
 template<class Face>
-Foam::Xfer<Foam::UnsortedMeshedSurface<Face> >
+Foam::Xfer<Foam::UnsortedMeshedSurface<Face>>
 Foam::UnsortedMeshedSurface<Face>::xfer()
 {
     return xferMove(*this);
diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H
index 1a8cc16d2e1b9aebae6450dbacd43b6a2787ceab..52cbddd3bc2c2d82d2a00273d8abb7961bc1c006 100644
--- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H
+++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,8 +166,8 @@ public:
         UnsortedMeshedSurface
         (
             const Xfer<pointField>&,
-            const Xfer<List<Face> >&,
-            const Xfer<List<label> >& zoneIds,
+            const Xfer<List<Face>>&,
+            const Xfer<List<label>>& zoneIds,
             const Xfer<surfZoneIdentifierList>&
         );
 
@@ -176,7 +176,7 @@ public:
         UnsortedMeshedSurface
         (
             const Xfer<pointField>&,
-            const Xfer<List<Face> >&,
+            const Xfer<List<Face>>&,
             const labelUList& zoneSizes = labelUList(),
             const UList<word>& zoneNames = UList<word>()
         );
@@ -188,10 +188,10 @@ public:
         UnsortedMeshedSurface(const MeshedSurface<Face>&);
 
         //- Construct by transferring the contents from a UnsortedMeshedSurface
-        UnsortedMeshedSurface(const Xfer<UnsortedMeshedSurface<Face> >&);
+        UnsortedMeshedSurface(const Xfer<UnsortedMeshedSurface<Face>>&);
 
         //- Construct by transferring the contents from a meshedSurface
-        UnsortedMeshedSurface(const Xfer<MeshedSurface<Face> >&);
+        UnsortedMeshedSurface(const Xfer<MeshedSurface<Face>>&);
 
         //- Construct from file name (uses extension to determine type)
         UnsortedMeshedSurface(const fileName&);
@@ -323,16 +323,16 @@ public:
             virtual void reset
             (
                 const Xfer<pointField>&,
-                const Xfer<List<Face> >&,
-                const Xfer<List<label> >& zoneIds
+                const Xfer<List<Face>>&,
+                const Xfer<List<label>>& zoneIds
             );
 
             //- Transfer components (points, faces, zone ids).
             virtual void reset
             (
-                const Xfer<List<point> >&,
-                const Xfer<List<Face> >&,
-                const Xfer<List<label> >& zoneIds
+                const Xfer<List<point>>&,
+                const Xfer<List<Face>>&,
+                const Xfer<List<label>>& zoneIds
             );
 
             //- Transfer the contents of the argument and annul the argument
@@ -342,7 +342,7 @@ public:
             void transfer(MeshedSurface<Face>&);
 
             //- Transfer contents to the Xfer container
-            Xfer<UnsortedMeshedSurface<Face> > xfer();
+            Xfer<UnsortedMeshedSurface<Face>> xfer();
 
 
         // Read
@@ -382,7 +382,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "UnsortedMeshedSurface.C"
+    #include "UnsortedMeshedSurface.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C
index 9a2e01992db10d114383d9fcfd8df985ad586ada..e61df5c6fc06cbd1f3598e78049488109263d4d0 100644
--- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C
+++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaceNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,14 +28,12 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class Face>
-Foam::autoPtr< Foam::UnsortedMeshedSurface<Face> >
+Foam::autoPtr<Foam::UnsortedMeshedSurface<Face>>
 Foam::UnsortedMeshedSurface<Face>::New(const fileName& name, const word& ext)
 {
     if (debug)
     {
-        Info<< "UnsortedMeshedSurface::New(const fileName&, const word&) : "
-            "constructing UnsortedMeshedSurface"
-            << endl;
+        InfoInFunction << "Constructing UnsortedMeshedSurface" << endl;
     }
 
     typename fileExtensionConstructorTable::iterator cstrIter =
@@ -48,7 +46,7 @@ Foam::UnsortedMeshedSurface<Face>::New(const fileName& name, const word& ext)
         if (supported.found(ext))
         {
             // create indirectly
-            autoPtr<UnsortedMeshedSurface<Face> > surf
+            autoPtr<UnsortedMeshedSurface<Face>> surf
             (
                 new UnsortedMeshedSurface<Face>
             );
@@ -67,12 +65,12 @@ Foam::UnsortedMeshedSurface<Face>::New(const fileName& name, const word& ext)
             << exit(FatalError);
     }
 
-    return autoPtr<UnsortedMeshedSurface<Face> >(cstrIter()(name));
+    return autoPtr<UnsortedMeshedSurface<Face>>(cstrIter()(name));
 }
 
 
 template<class Face>
-Foam::autoPtr< Foam::UnsortedMeshedSurface<Face> >
+Foam::autoPtr<Foam::UnsortedMeshedSurface<Face>>
 Foam::UnsortedMeshedSurface<Face>::New(const fileName& name)
 {
     word ext = name.ext();
diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaces.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaces.C
index 39589e79c3d9727bbd2f421f0f27ee9ce443b045..400cafb1487272d1ed0f67c8d66ba74aa083c1cb 100644
--- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaces.C
+++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,15 +32,15 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-#define makeSurface(surfType, faceType)                                       \
-    defineNamedTemplateTypeNameAndDebug(surfType<faceType>, 0);               \
-    defineTemplatedRunTimeSelectionTable(surfType,fileExtension,faceType);    \
-    defineTemplatedMemberFunctionSelectionTable                               \
-    (                                                                         \
-        surfType,                                                             \
-        write,                                                                \
-        fileExtension,                                                        \
-        faceType                                                              \
+#define makeSurface(surfType, faceType)                                        \
+    defineNamedTemplateTypeNameAndDebug(surfType<faceType>, 0);                \
+    defineTemplatedRunTimeSelectionTable(surfType,fileExtension,faceType);     \
+    defineTemplatedMemberFunctionSelectionTable                                \
+    (                                                                          \
+        surfType,                                                              \
+        write,                                                                 \
+        fileExtension,                                                         \
+        faceType                                                               \
     );
 
 
diff --git a/src/surfMesh/surfMesh/surfMesh.C b/src/surfMesh/surfMesh/surfMesh.C
index 6d234e8e8f09b572a5dc1620cad2bac2f5ab2c5b..1cc3ddcba46736391813c080c62cd8b78f5338ab 100644
--- a/src/surfMesh/surfMesh/surfMesh.C
+++ b/src/surfMesh/surfMesh/surfMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -157,7 +157,7 @@ Foam::surfMesh::surfMesh
 Foam::surfMesh::surfMesh
 (
     const IOobject& io,
-    const Xfer<MeshedSurface<face> >& surf,
+    const Xfer<MeshedSurface<face>>& surf,
     const word& surfName
 )
 :
@@ -229,7 +229,7 @@ Foam::surfMesh::~surfMesh()
 
 void Foam::surfMesh::updatePointsRef()
 {
-    // assign the reference to the points (this is truly ugly)
+    // Assign the reference to the points (this is truly ugly)
     reinterpret_cast<SubField<point>&>
     (
         const_cast<Field<point>&>(MeshReference::points())
@@ -239,8 +239,8 @@ void Foam::surfMesh::updatePointsRef()
 
 void Foam::surfMesh::updateFacesRef()
 {
-    // assign the reference to the faces
-    static_cast<UList<face>&>(*this) = this->storedFaces();
+    // Assign the reference to the faces
+    shallowCopy(this->storedFaces());
 }
 
 
@@ -288,9 +288,9 @@ void Foam::surfMesh::transfer
 }
 
 
-Foam::Xfer<Foam::MeshedSurface<Foam::face> > Foam::surfMesh::xfer()
+Foam::Xfer<Foam::MeshedSurface<Foam::face>> Foam::surfMesh::xfer()
 {
-    Xfer<MeshedSurface<face> > xf;
+    Xfer<MeshedSurface<face>> xf;
 
     xf().storedPoints().transfer(this->storedPoints());
     xf().storedFaces().transfer(this->storedFaces());
diff --git a/src/surfMesh/surfMesh/surfMesh.H b/src/surfMesh/surfMesh/surfMesh.H
index 1a9204afd7a8d96c2f06af9417dada79f1db8d25..538862680326b1f7bb3af81cdfba2b24367570e5 100644
--- a/src/surfMesh/surfMesh/surfMesh.H
+++ b/src/surfMesh/surfMesh/surfMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -171,7 +171,7 @@ public:
         surfMesh
         (
             const IOobject&,
-            const Xfer<MeshedSurface<face> >& surf,
+            const Xfer<MeshedSurface<face>>& surf,
             const word& surfName=""
         );
 
@@ -271,7 +271,7 @@ public:
         //  Storage management
 
             //- Transfer contents to the Xfer container as a MeshedSurface
-            Xfer<MeshedSurface<face> > xfer();
+            Xfer<MeshedSurface<face>> xfer();
 
             //- Clear geometry
             void clearGeom();
diff --git a/src/surfMesh/surfMesh/surfMeshClear.C b/src/surfMesh/surfMesh/surfMeshClear.C
index e166059c75c2eee0d7a7cc98e4630f8297f75338..179f202c2d5c589aa01718ef5d1147db45a08cf9 100644
--- a/src/surfMesh/surfMesh/surfMeshClear.C
+++ b/src/surfMesh/surfMesh/surfMeshClear.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -33,9 +33,7 @@ void Foam::surfMesh::removeZones()
 {
     if (debug)
     {
-        Info<< "void surfMesh::removeZones(): "
-            << "Removing surface zones."
-            << endl;
+        InfoInFunction << "Removing surface zones." << endl;
     }
 
     // Remove the surface zones
@@ -51,9 +49,7 @@ void Foam::surfMesh::clearGeom()
 {
     if (debug)
     {
-        Info<< "void surfMesh::clearGeom() : "
-            << "clearing geometric data"
-            << endl;
+        InfoInFunction << "Clearing geometric data" << endl;
     }
 
     MeshReference::clearGeom();
@@ -64,9 +60,7 @@ void Foam::surfMesh::clearAddressing()
 {
     if (debug)
     {
-        Info<< "void surfMesh::clearAddressing() : "
-            << "clearing topology"
-            << endl;
+        InfoInFunction << "clearing topology" << endl;
     }
 
     MeshReference::clearPatchMeshAddr();
diff --git a/src/surfMesh/surfMesh/surfMeshIO.C b/src/surfMesh/surfMesh/surfMeshIO.C
index 9cf516bebf1a11ff1204c85d6f56446ff8faf1c1..5e7072e3a44480aa5a7f2d2a51c74331c3848eeb 100644
--- a/src/surfMesh/surfMesh/surfMeshIO.C
+++ b/src/surfMesh/surfMesh/surfMeshIO.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,7 @@ void Foam::surfMesh::setInstance(const fileName& inst)
 {
     if (debug)
     {
-        Info<< "void surfMesh::setInstance(const fileName& inst) : "
-            << "Resetting file instance to " << inst << endl;
+        InfoInFunction << "Resetting file instance to " << inst << endl;
     }
 
     instance() = inst;
@@ -53,8 +52,7 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
 {
     if (debug)
     {
-        Info<< "surfMesh::readUpdateState surfMesh::readUpdate() : "
-            << "Updating mesh based on saved data." << endl;
+        InfoInFunction << "Updating mesh based on saved data." << endl;
     }
 
     // Find point and face instances
diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C
index f226acc91d457d596728dc40940ea6e482935b5d..60301d6776a79af3386ff5cc4f68c4072d20c8f4 100644
--- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C
+++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ bool Foam::fileFormats::AC3DsurfaceFormat<Face>::read
 
         // number of vertices for this zone
         label  nZonePoints = 0;
-        vector location(pTraits<vector>::zero);
+        vector location(Zero);
         // tensor rotation(I);
 
         // Read all info for current zone
diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H
index d613b0ce2cca04df7a06e9e5fbb64245eb857f70..8d626099c34ae456dcdd735b3c23fab6db8c7f2e 100644
--- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,9 +84,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new AC3DsurfaceFormat<Face>(name)
             );
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AC3DsurfaceFormat.C"
+    #include "AC3DsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H
index ab3ae8e799326079388599ab9688b9ad1e1fe844..602ca1856540c3c579b5270506b09f08061538f1 100644
--- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H
+++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormatCore.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,7 +89,7 @@ protected:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "AC3DsurfaceFormatCoreTemplates.C"
+    #include "AC3DsurfaceFormatCoreTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C
index 418bcd9ce7dcd0745b5261744c9007f594200dc2..bc5b582cdc4cad7d237b71f5647ccf5e104deb83 100644
--- a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C
+++ b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,7 +63,7 @@ bool Foam::fileFormats::FTRsurfaceFormat<Face>::read
     is >> this->storedPoints();
 
     // triFaces read with attached keys
-    List< Keyed<triFace> > facesRead(is);
+    List<Keyed<triFace>> facesRead(is);
 
     List<Face>  faceLst(facesRead.size());
     List<label> zoneIds(facesRead.size());
diff --git a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.H b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.H
index a2829ecc0dcadd1c757e538bdef6b7c8408cf778..790fd8c51f44710482d1f58e18525faece5edd35 100644
--- a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,9 +105,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<UnsortedMeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<UnsortedMeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<UnsortedMeshedSurface<Face> >
+            return autoPtr<UnsortedMeshedSurface<Face>>
             (
                 new FTRsurfaceFormat<Face>(name)
             );
@@ -134,7 +134,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "FTRsurfaceFormat.C"
+    #include "FTRsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H
index 2f182822cb26c090f7b208cbc3ed43dd9e791c4b..7a0175d0d29992e27c8b4ab475b1a15bfd5759e5 100644
--- a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,9 +77,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<UnsortedMeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<UnsortedMeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<UnsortedMeshedSurface<Face> >
+            return autoPtr<UnsortedMeshedSurface<Face>>
             (
                 new GTSsurfaceFormat<Face>(name)
             );
@@ -118,7 +118,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "GTSsurfaceFormat.C"
+    #include "GTSsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H
index 45425dcfef6992e63c97864e64dafe4221145b03..65f22eecf7b4e5e3d6cefa4cbd66036558f871f4 100644
--- a/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/nas/NASsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,9 +85,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new NASsurfaceFormat<Face>(name)
             );
@@ -114,7 +114,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NASsurfaceFormat.C"
+    #include "NASsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H
index 8b53a0223c3c5f911a1f7f33ae22b2458315922a..7162078175478fc366c91e7db9b33f6b255527af 100644
--- a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,9 +77,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new OBJsurfaceFormat<Face>(name)
             );
@@ -115,7 +115,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "OBJsurfaceFormat.C"
+    #include "OBJsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H
index 34b72915cdba90b1028b3e18fb4c9543ed82d8ab..d861a92a6d59c2477bdcd38d2f2017d17ef549cc 100644
--- a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -85,9 +85,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new OFFsurfaceFormat(name)
             );
@@ -124,7 +124,7 @@ public:
 
 
 #ifdef NoRepository
-#   include "OFFsurfaceFormat.C"
+    #include "OFFsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.H b/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.H
index d80e0b3bff81dab4da1cfffbe005b1fcd1769433..33ab7212a52a4de87002c452c129db0f74e6cb07 100644
--- a/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -82,9 +82,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new OFSsurfaceFormat<Face>(name)
             );
@@ -145,7 +145,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "OFSsurfaceFormat.C"
+    #include "OFSsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H
index 0b1b53c48168f3af6144b02f7f50e32bc5ca8689..cd00d23e8f3f258d849cfbfcd36da5962d776e0b 100644
--- a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -104,7 +104,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "SMESHsurfaceFormat.C"
+    #include "SMESHsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H
index 3c5a1974fb965dae70fafc5031542820d4c5b791..12093d490b751d7b7159cae24bd467aeb3fe3a18 100644
--- a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,9 +100,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new STARCDsurfaceFormat<Face>(name)
             );
@@ -138,7 +138,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "STARCDsurfaceFormat.C"
+    #include "STARCDsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H
index 900f5a20dc33736d96beba4a9135549bc2eff3e3..02c12ae24b56dde6543bc2a22aa8062e85f14e5d 100644
--- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,9 +98,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new STLsurfaceFormat<Face>(name)
             );
@@ -169,7 +169,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "STLsurfaceFormat.C"
+    #include "STLsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
index e54cca5ebfb715eabb60a13494ef3b3c9864a5fc..a3f9e47a6ce06cfb629bf7b78c2ab5fe01b9791e 100644
--- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
+++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,7 +50,7 @@ int yyFlexLexer::yylex()
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
 //! \cond dummy
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H
index 7ab51e69bdbea8021fb8fe61abe3c174a6a561fc..12834226f4f3ba20d12d5e8a43711105a265bba6 100644
--- a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,9 +88,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new TRIsurfaceFormat<Face>(name)
             );
@@ -130,7 +130,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "TRIsurfaceFormat.C"
+    #include "TRIsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H
index 01c47373a1cb197bd5ab9fdfa07c9f1df3bb7c2d..0691f404141664fa22ce037f44abb9638d98d6f1 100644
--- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -81,9 +81,9 @@ public:
     // Selectors
 
         //- Read file and return surface
-        static autoPtr<MeshedSurface<Face> > New(const fileName& name)
+        static autoPtr<MeshedSurface<Face>> New(const fileName& name)
         {
-            return autoPtr<MeshedSurface<Face> >
+            return autoPtr<MeshedSurface<Face>>
             (
                 new VTKsurfaceFormat<Face>(name)
             );
@@ -123,7 +123,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "VTKsurfaceFormat.C"
+    #include "VTKsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.H b/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.H
index 70b069da9a12bee4af4ba8583d0280eb3e8f314e..191da0738605df350ace64ea9af79855cd95c404 100644
--- a/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -101,7 +101,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "WRLsurfaceFormat.C"
+    #include "WRLsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H
index a3dfd2b3b371943f840c97d2c04b94fb5b58e59a..1dce035069ad8b0a83110b75826cd6198b33fc14 100644
--- a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H
+++ b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -100,7 +100,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "X3DsurfaceFormat.C"
+    #include "X3DsurfaceFormat.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake
index 0a4dfc8d3543ee87c5ee9b2014eb2e320acf528a..1d987bb0dbab3fe0fb36b557bafc268b79d1affe 100755
--- a/src/thermophysicalModels/Allwmake
+++ b/src/thermophysicalModels/Allwmake
@@ -24,4 +24,4 @@ wmake $targetType solidChemistryModel
 
 wmake $targetType radiation
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H
index 9d4fc5851968aa5a70bf0730c787f3a43e404eb7..c1d299dbb7449e15f9a0f9b1a17f865c74f6af52 100644
--- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H
+++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -453,7 +453,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "basicThermoTemplates.C"
+    #include "basicThermoTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H
index 833072ad07a475fa409adf9318fe5001cb204b93..44c95ab72bc37292fe989f08dd960a75dbf79328 100644
--- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H
+++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -44,7 +44,7 @@ SourceFiles
 #define energyJumpFvPatchScalarField_H
 
 #include "fixedJumpFvPatchField.H"
-#include "DataEntry.H"
+#include "Function1.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -99,9 +99,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new energyJumpFvPatchScalarField(*this)
             );
@@ -115,12 +115,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new energyJumpFvPatchScalarField(*this, iF)
             );
diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H
index e000c6b2004706e00f97533cecbb4255ff234521..517c29c130a191b48723c99a5a76278677f6eea1 100644
--- a/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H
+++ b/src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,9 +99,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual tmp<fvPatchField<scalar> > clone() const
+        virtual tmp<fvPatchField<scalar>> clone() const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new energyJumpAMIFvPatchScalarField(*this)
             );
@@ -115,12 +115,12 @@ public:
         );
 
         //- Construct and return a clone setting internal field reference
-        virtual tmp<fvPatchField<scalar> > clone
+        virtual tmp<fvPatchField<scalar>> clone
         (
             const DimensionedField<scalar, volMesh>& iF
         ) const
         {
-            return tmp<fvPatchField<scalar> >
+            return tmp<fvPatchField<scalar>>
             (
                 new energyJumpAMIFvPatchScalarField(*this, iF)
             );
diff --git a/src/thermophysicalModels/basic/fluidThermo/makeThermo.H b/src/thermophysicalModels/basic/fluidThermo/makeThermo.H
index 7a136ebfb02543ff8cd50fbcde5b7835af9d1872..8581ff50256b5af9cb63a5ba23c240af35ecaad8 100644
--- a/src/thermophysicalModels/basic/fluidThermo/makeThermo.H
+++ b/src/thermophysicalModels/basic/fluidThermo/makeThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,75 +38,75 @@ Description
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #define makeThermoTypedefs(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
-                                                                              \
-typedef                                                                       \
-    Transport                                                                 \
-    <                                                                         \
-        species::thermo                                                       \
-        <                                                                     \
-            Thermo                                                            \
-            <                                                                 \
-                EqnOfState                                                    \
-                <                                                             \
-                    Specie                                                    \
-                >                                                             \
-            >,                                                                \
-            Type                                                              \
-        >                                                                     \
-    > Transport##Type##Thermo##EqnOfState##Specie;                            \
-                                                                              \
-typedef                                                                       \
-    Cthermo                                                                   \
-    <                                                                         \
-        BaseThermo,                                                           \
-        Mixture<Transport##Type##Thermo##EqnOfState##Specie>                  \
-    > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie;          \
-                                                                              \
-defineTemplateTypeNameAndDebugWithName                                        \
-(                                                                             \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    (                                                                         \
-        #Cthermo"<"#Mixture"<"                                                \
-      + Transport##Type##Thermo##EqnOfState##Specie::typeName()               \
-      + ">>"                                                                  \
-    ).c_str(),                                                                \
-    0                                                                         \
+                                                                               \
+typedef                                                                        \
+    Transport                                                                  \
+    <                                                                          \
+        species::thermo                                                        \
+        <                                                                      \
+            Thermo                                                             \
+            <                                                                  \
+                EqnOfState                                                     \
+                <                                                              \
+                    Specie                                                     \
+                >                                                              \
+            >,                                                                 \
+            Type                                                               \
+        >                                                                      \
+    > Transport##Type##Thermo##EqnOfState##Specie;                             \
+                                                                               \
+typedef                                                                        \
+    Cthermo                                                                    \
+    <                                                                          \
+        BaseThermo,                                                            \
+        Mixture<Transport##Type##Thermo##EqnOfState##Specie>                   \
+    > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie;           \
+                                                                               \
+defineTemplateTypeNameAndDebugWithName                                         \
+(                                                                              \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    (                                                                          \
+        #Cthermo"<"#Mixture"<"                                                 \
+      + Transport##Type##Thermo##EqnOfState##Specie::typeName()                \
+      + ">>"                                                                   \
+    ).c_str(),                                                                 \
+    0                                                                          \
 );
 
 
 #define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
-                                                                              \
-makeThermoTypedefs                                                            \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo,                                                                  \
-    Mixture,                                                                  \
-    Transport,                                                                \
-    Type,                                                                     \
-    Thermo,                                                                   \
-    EqnOfState,                                                               \
-    Specie                                                                    \
-)                                                                             \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    basicThermo,                                                              \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    fluidThermo,                                                              \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    fvMesh                                                                    \
+                                                                               \
+makeThermoTypedefs                                                             \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo,                                                                   \
+    Mixture,                                                                   \
+    Transport,                                                                 \
+    Type,                                                                      \
+    Thermo,                                                                    \
+    EqnOfState,                                                                \
+    Specie                                                                     \
+)                                                                              \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    basicThermo,                                                               \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    fluidThermo,                                                               \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    fvMesh                                                                     \
 );
 
 
diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C
index 0cc1354ffa30e7999a6581b680bed8eff9c61e3e..1db5c4ac7ca00ef6ebcad689b4ab7b00155dd3b3 100644
--- a/src/thermophysicalModels/basic/heThermo/heThermo.C
+++ b/src/thermophysicalModels/basic/heThermo/heThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -184,7 +184,7 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::he
         )
     );
 
-    volScalarField& he = the();
+    volScalarField& he = the.ref();
     scalarField& heCells = he.internalField();
     const scalarField& pCells = p.internalField();
     const scalarField& TCells = T.internalField();
@@ -221,7 +221,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
 ) const
 {
     tmp<scalarField> the(new scalarField(T.size()));
-    scalarField& he = the();
+    scalarField& he = the.ref();
 
     forAll(T, celli)
     {
@@ -241,7 +241,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
 ) const
 {
     tmp<scalarField> the(new scalarField(T.size()));
-    scalarField& he = the();
+    scalarField& he = the.ref();
 
     forAll(T, facei)
     {
@@ -277,7 +277,7 @@ Foam::heThermo<BasicThermo, MixtureType>::hc() const
         )
     );
 
-    volScalarField& hcf = thc();
+    volScalarField& hcf = thc.ref();
     scalarField& hcCells = hcf.internalField();
 
     forAll(hcCells, celli)
@@ -308,7 +308,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp
 ) const
 {
     tmp<scalarField> tCp(new scalarField(T.size()));
-    scalarField& cp = tCp();
+    scalarField& cp = tCp.ref();
 
     forAll(T, facei)
     {
@@ -344,7 +344,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cp() const
         )
     );
 
-    volScalarField& cp = tCp();
+    volScalarField& cp = tCp.ref();
 
     forAll(this->T_, celli)
     {
@@ -379,7 +379,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv
 ) const
 {
     tmp<scalarField> tCv(new scalarField(T.size()));
-    scalarField& cv = tCv();
+    scalarField& cv = tCv.ref();
 
     forAll(T, facei)
     {
@@ -415,7 +415,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
         )
     );
 
-    volScalarField& cv = tCv();
+    volScalarField& cv = tCv.ref();
 
     forAll(this->T_, celli)
     {
@@ -446,7 +446,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::gamma
 ) const
 {
     tmp<scalarField> tgamma(new scalarField(T.size()));
-    scalarField& cpv = tgamma();
+    scalarField& cpv = tgamma.ref();
 
     forAll(T, facei)
     {
@@ -482,7 +482,7 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
         )
     );
 
-    volScalarField& cpv = tgamma();
+    volScalarField& cpv = tgamma.ref();
 
     forAll(this->T_, celli)
     {
@@ -519,7 +519,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cpv
 ) const
 {
     tmp<scalarField> tCpv(new scalarField(T.size()));
-    scalarField& cpv = tCpv();
+    scalarField& cpv = tCpv.ref();
 
     forAll(T, facei)
     {
@@ -555,7 +555,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
         )
     );
 
-    volScalarField& cpv = tCpv();
+    volScalarField& cpv = tCpv.ref();
 
     forAll(this->T_, celli)
     {
@@ -589,7 +589,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::CpByCpv
 ) const
 {
     tmp<scalarField> tCpByCpv(new scalarField(T.size()));
-    scalarField& cpByCpv = tCpByCpv();
+    scalarField& cpByCpv = tCpByCpv.ref();
 
     forAll(T, facei)
     {
@@ -625,7 +625,7 @@ Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const
         )
     );
 
-    volScalarField& cpByCpv = tCpByCpv();
+    volScalarField& cpByCpv = tCpByCpv.ref();
 
     forAll(this->T_, celli)
     {
@@ -666,7 +666,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
 ) const
 {
     tmp<scalarField> tT(new scalarField(h.size()));
-    scalarField& T = tT();
+    scalarField& T = tT.ref();
 
     forAll(h, celli)
     {
@@ -689,7 +689,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
 {
 
     tmp<scalarField> tT(new scalarField(h.size()));
-    scalarField& T = tT();
+    scalarField& T = tT.ref();
     forAll(h, facei)
     {
         T[facei] = this->patchFaceMixture
@@ -708,7 +708,7 @@ Foam::tmp<Foam::volScalarField>
 Foam::heThermo<BasicThermo, MixtureType>::kappa() const
 {
     tmp<Foam::volScalarField> kappa(Cp()*this->alpha_);
-    kappa().rename("kappa");
+    kappa.ref().rename("kappa");
     return kappa;
 }
 
@@ -737,7 +737,7 @@ Foam::heThermo<BasicThermo, MixtureType>::kappaEff
 ) const
 {
     tmp<Foam::volScalarField> kappaEff(Cp()*(this->alpha_ + alphat));
-    kappaEff().rename("kappaEff");
+    kappaEff.ref().rename("kappaEff");
     return kappaEff;
 }
 
@@ -772,7 +772,7 @@ Foam::heThermo<BasicThermo, MixtureType>::alphaEff
 ) const
 {
     tmp<Foam::volScalarField> alphaEff(this->CpByCpv()*(this->alpha_ + alphat));
-    alphaEff().rename("alphaEff");
+    alphaEff.ref().rename("alphaEff");
     return alphaEff;
 }
 
diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H
index 9858f16a31fdfedcd50c29fdb833a342667fb106..7967cc44cc98f6796f23fdf69d36cb4c6ce5d49b 100644
--- a/src/thermophysicalModels/basic/heThermo/heThermo.H
+++ b/src/thermophysicalModels/basic/heThermo/heThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -304,7 +304,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "heThermo.C"
+    #include "heThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H
index 95c61d4eeb68cd777baa09506ed8f4e7e98a0002..d49aa797ff73b20bd387f4a530adf9fecd0b524b 100644
--- a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H
+++ b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,7 +120,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "pureMixture.C"
+    #include "pureMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C
index 970fc82fe3e57bc851d99a715deeaa74bd6731d6..67063b57c457bb600983f8daa685e76540318f59 100644
--- a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C
+++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,8 +131,7 @@ void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::correct()
 {
     if (debug)
     {
-        Info<< "entering hePsiThermo<BasicPsiThermo, MixtureType>::correct()"
-            << endl;
+        InfoInFunction << endl;
     }
 
     // force the saving of the old-time values
@@ -142,8 +141,7 @@ void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::correct()
 
     if (debug)
     {
-        Info<< "exiting hePsiThermo<BasicPsiThermo, MixtureType>::correct()"
-            << endl;
+        Info<< "    Finished" << endl;
     }
 }
 
diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.H
index 08e531a3f2ec6037f2b6a480e257a9f883560abe..ca5a89f73f14c55cfaf1d8043707fca29e6ef0c6 100644
--- a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.H
+++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "hePsiThermo.C"
+    #include "hePsiThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C
index ec7aad7e72a0dc68d25b1a787fd5df2800b954e1..7db79d8fc8f46f060b040993eb213a73d64e6ee9 100644
--- a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C
+++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,14 +133,14 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::correct()
 {
     if (debug)
     {
-        Info<< "entering heRhoThermo<MixtureType>::correct()" << endl;
+        InfoInFunction << endl;
     }
 
     calculate();
 
     if (debug)
     {
-        Info<< "exiting heRhoThermo<MixtureType>::correct()" << endl;
+        Info<< "    Finished" << endl;
     }
 }
 
diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.H
index ec453442ad70553777e1bf2b98954c28dc176df0..7e2138d12745db5732397f6a8ea90e2b18634898 100644
--- a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.H
+++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "heRhoThermo.C"
+    #include "heRhoThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H
index 9a2b4a56fa9588cf1ae48758801d36339db38004..eb927e71b2871d6c5c31167753ea5c81fa324dc8 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -147,7 +147,7 @@ public:
                 ) = 0;
 
                 //- Return reaction rate of the speciei in reactioni
-                virtual tmp<DimensionedField<scalar, volMesh> > calculateRR
+                virtual tmp<DimensionedField<scalar, volMesh>> calculateRR
                 (
                     const label reactioni,
                     const label speciei
@@ -187,7 +187,7 @@ public:
 #include "basicChemistryModelI.H"
 
 #ifdef NoRepository
-#   include "basicChemistryModelTemplates.C"
+    #include "basicChemistryModelTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C
index aea9440f77ba23c272ef01c2f9f0aa51905a3ef7..1b424d1ccf0ebf50b5ca0893024bc233ddff6e77 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,6 +26,7 @@ License
 #include "chemistryModel.H"
 #include "reactingMixture.H"
 #include "UniformField.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -103,7 +104,7 @@ Foam::chemistryModel<CompType, ThermoType>::omega
     label lRef, rRef;
 
     tmp<scalarField> tom(new scalarField(nEqns(), 0.0));
-    scalarField& om = tom();
+    scalarField& om = tom.ref();
 
     forAll(reactions_, i)
     {
@@ -340,7 +341,7 @@ void Foam::chemistryModel<CompType, ThermoType>::jacobian
     {
         for (label j=0; j<nEqns(); j++)
         {
-            dfdc[i][j] = 0.0;
+            dfdc(i, j) = 0.0;
         }
     }
 
@@ -495,11 +496,11 @@ Foam::chemistryModel<CompType, ThermoType>::tc() const
             ),
             this->mesh(),
             dimensionedScalar("zero", dimTime, SMALL),
-            zeroGradientFvPatchScalarField::typeName
+            extrapolatedCalculatedFvPatchScalarField::typeName
         )
     );
 
-    scalarField& tc = ttc();
+    scalarField& tc = ttc.ref();
     const scalarField& T = this->thermo().T();
     const scalarField& p = this->thermo().p();
 
@@ -539,7 +540,7 @@ Foam::chemistryModel<CompType, ThermoType>::tc() const
     }
 
 
-    ttc().correctBoundaryConditions();
+    ttc.ref().correctBoundaryConditions();
 
     return ttc;
 }
@@ -563,15 +564,13 @@ Foam::chemistryModel<CompType, ThermoType>::Sh() const
                 false
             ),
             this->mesh_,
-            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
         )
     );
 
-
     if (this->chemistry_)
     {
-        scalarField& Sh = tSh();
+        scalarField& Sh = tSh.ref();
 
         forAll(Y_, i)
         {
@@ -605,14 +604,13 @@ Foam::chemistryModel<CompType, ThermoType>::dQ() const
                 false
             ),
             this->mesh_,
-            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
         )
     );
 
     if (this->chemistry_)
     {
-        volScalarField& dQ = tdQ();
+        volScalarField& dQ = tdQ.ref();
         dQ.dimensionedInternalField() = this->mesh_.V()*Sh()();
     }
 
@@ -629,7 +627,7 @@ Foam::label Foam::chemistryModel<CompType, ThermoType>::nEqns() const
 
 
 template<class CompType, class ThermoType>
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::chemistryModel<CompType, ThermoType>::calculateRR
 (
     const label reactionI,
@@ -653,7 +651,7 @@ Foam::chemistryModel<CompType, ThermoType>::calculateRR
         this->thermo().rho()
     );
 
-    tmp<DimensionedField<scalar, volMesh> > tRR
+    tmp<DimensionedField<scalar, volMesh>> tRR
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -670,7 +668,7 @@ Foam::chemistryModel<CompType, ThermoType>::calculateRR
         )
     );
 
-    DimensionedField<scalar, volMesh>& RR = tRR();
+    DimensionedField<scalar, volMesh>& RR = tRR.ref();
 
     const scalarField& T = this->thermo().T();
     const scalarField& p = this->thermo().p();
@@ -850,7 +848,7 @@ Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
     // Don't allow the time-step to change more than a factor of 2
     return min
     (
-        this->solve<UniformField<scalar> >(UniformField<scalar>(deltaT)),
+        this->solve<UniformField<scalar>>(UniformField<scalar>(deltaT)),
         2*deltaT
     );
 }
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H
index dfcea6c611f1f93eff8c007a24e58b43fabc6416..720ad96b99506ccf936a1d1dbab77c83a25b009f 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -86,7 +86,7 @@ protected:
         PtrList<volScalarField>& Y_;
 
         //- Reactions
-        const PtrList<Reaction<ThermoType> >& reactions_;
+        const PtrList<Reaction<ThermoType>>& reactions_;
 
         //- Thermodynamic data of the species
         const PtrList<ThermoType>& specieThermo_;
@@ -101,14 +101,14 @@ protected:
         scalar Treact_;
 
         //- List of reaction rate per specie [kg/m3/s]
-        PtrList<DimensionedField<scalar, volMesh> > RR_;
+        PtrList<DimensionedField<scalar, volMesh>> RR_;
 
 
     // Protected Member Functions
 
         //- Write access to chemical source terms
         //  (e.g. for multi-chemistry model)
-        inline PtrList<DimensionedField<scalar, volMesh> >& RR();
+        inline PtrList<DimensionedField<scalar, volMesh>>& RR();
 
 
 public:
@@ -130,7 +130,7 @@ public:
     // Member Functions
 
         //- The reactions
-        inline const PtrList<Reaction<ThermoType> >& reactions() const;
+        inline const PtrList<Reaction<ThermoType>>& reactions() const;
 
         //- Thermodynamic data of the species
         inline const PtrList<ThermoType>& specieThermo() const;
@@ -208,7 +208,7 @@ public:
             );
 
             //- Return reaction rate of the speciei in reactionI
-            virtual tmp<DimensionedField<scalar, volMesh> > calculateRR
+            virtual tmp<DimensionedField<scalar, volMesh>> calculateRR
             (
                 const label reactionI,
                 const label speciei
@@ -274,7 +274,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "chemistryModel.C"
+    #include "chemistryModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModelI.H
index 0779bcb30fb9fd99e98aa26c3eb8051a3d1b8e7e..44d813c64ddb7d7c3be9dd65467d4c686e41252d 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModelI.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModelI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class CompType, class ThermoType>
-inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
+inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>&
 Foam::chemistryModel<CompType, ThermoType>::RR()
 {
     return RR_;
@@ -37,7 +37,7 @@ Foam::chemistryModel<CompType, ThermoType>::RR()
 
 
 template<class CompType, class ThermoType>
-inline const Foam::PtrList<Foam::Reaction<ThermoType> >&
+inline const Foam::PtrList<Foam::Reaction<ThermoType>>&
 Foam::chemistryModel<CompType, ThermoType>::reactions() const
 {
     return reactions_;
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/makeChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/makeChemistryModel.H
index c0ae64edf456f1b9c998724ad3e259dd53bdf417..d28059ec3f3a1b490a818e82735ee8b294189e7f 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/makeChemistryModel.H
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/makeChemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -39,15 +39,15 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeChemistryModel(SS, Comp, Thermo)                                  \
-                                                                              \
-    typedef SS<Comp, Thermo> SS##Comp##Thermo;                                \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        SS##Comp##Thermo,                                                     \
-        (#SS"<"#Comp"," + Thermo::typeName() + ">").c_str(),                  \
-        0                                                                     \
+#define makeChemistryModel(SS, Comp, Thermo)                                   \
+                                                                               \
+    typedef SS<Comp, Thermo> SS##Comp##Thermo;                                 \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        SS##Comp##Thermo,                                                      \
+        (#SS"<"#Comp"," + Thermo::typeName() + ">").c_str(),                   \
+        0                                                                      \
     );
 
 
diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C
index 15a256f66b8278f4f7ef691a5a401b47c24885c0..2b52c0a7cf1b4e9fdf5998f4ae082bd31215202b 100644
--- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C
+++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -151,7 +151,7 @@ void Foam::EulerImplicit<ChemistryModel>::solve
         scalar d = 0;
         for (label j=0; j<nSpecie; j++)
         {
-            d -= RR[i][j]*c[j];
+            d -= RR(i, j)*c[j];
         }
 
         if (d < -SMALL)
@@ -172,7 +172,7 @@ void Foam::EulerImplicit<ChemistryModel>::solve
     // Add the diagonal and source contributions from the time-derivative
     for (label i=0; i<nSpecie; i++)
     {
-        RR[i][i] += 1.0/deltaT;
+        RR(i, i) += 1.0/deltaT;
         RR.source()[i] = c[i]/deltaT;
     }
 
diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H
index 0b6c7e08f9d3890b82ac9d5ed6149dfc3a12205b..8196d846714856616535ae32de9fa7f62b5eecf6 100644
--- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H
+++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -119,7 +119,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "EulerImplicit.C"
+    #include "EulerImplicit.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H
index b5fb3adca1237b0eb9488158c881d8933cc71915..fa7ec343f76dbd86148b383961774871c490c4ce 100644
--- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H
+++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,7 +87,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "chemistrySolver.C"
+    #include "chemistrySolver.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolverTypes.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolverTypes.H
index 272b78b4b3946a35c8526d3b0cbc79513dee83d4..53f42c81aa7a9e77b808d260145db795ffff8d2e 100644
--- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolverTypes.H
+++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolverTypes.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,48 +36,48 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeChemistrySolverType(SS, Comp, Thermo)                             \
-                                                                              \
-    typedef SS<chemistryModel<Comp, Thermo> > SS##Comp##Thermo;               \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        SS##Comp##Thermo,                                                     \
-        (#SS"<" + word(Comp::typeName_())                                     \
-      + "," + Thermo::typeName() + ">").c_str(),                              \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        Comp,                                                                 \
-        SS##Comp##Thermo,                                                     \
-        fvMesh                                                                \
+#define makeChemistrySolverType(SS, Comp, Thermo)                              \
+                                                                               \
+    typedef SS<chemistryModel<Comp, Thermo>> SS##Comp##Thermo;                 \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        SS##Comp##Thermo,                                                      \
+        (#SS"<" + word(Comp::typeName_())                                      \
+      + "," + Thermo::typeName() + ">").c_str(),                               \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        Comp,                                                                  \
+        SS##Comp##Thermo,                                                      \
+        fvMesh                                                                 \
     );
 
 
-#define makeChemistrySolverTypes(CompChemModel,Thermo)                        \
-                                                                              \
-    makeChemistrySolverType                                                   \
-    (                                                                         \
-        noChemistrySolver,                                                    \
-        CompChemModel,                                                        \
-        Thermo                                                                \
-    );                                                                        \
-                                                                              \
-    makeChemistrySolverType                                                   \
-    (                                                                         \
-        EulerImplicit,                                                        \
-        CompChemModel,                                                        \
-        Thermo                                                                \
-    );                                                                        \
-                                                                              \
-    makeChemistrySolverType                                                   \
-    (                                                                         \
-        ode,                                                                  \
-        CompChemModel,                                                        \
-        Thermo                                                                \
-    );                                                                        \
+#define makeChemistrySolverTypes(CompChemModel,Thermo)                         \
+                                                                               \
+    makeChemistrySolverType                                                    \
+    (                                                                          \
+        noChemistrySolver,                                                     \
+        CompChemModel,                                                         \
+        Thermo                                                                 \
+    );                                                                         \
+                                                                               \
+    makeChemistrySolverType                                                    \
+    (                                                                          \
+        EulerImplicit,                                                         \
+        CompChemModel,                                                         \
+        Thermo                                                                 \
+    );                                                                         \
+                                                                               \
+    makeChemistrySolverType                                                    \
+    (                                                                          \
+        ode,                                                                   \
+        CompChemModel,                                                         \
+        Thermo                                                                 \
+    );                                                                         \
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H
index c0e9d642a4e4a3afe02d85286907fa4890c50dcf..e0f5db3f60c114cbb3fcc8d993d72b449a8690d6 100644
--- a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H
+++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -90,7 +90,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "noChemistrySolver.C"
+    #include "noChemistrySolver.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H
index cfd8164f471f6c0e58274416cd96a71e6b082daa..1b301dca4e63c012571a2258e2806cd657b2e072 100644
--- a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H
+++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ode.C"
+    #include "ode.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C
index a1563921c2bd340d46323c9893f4311f2e606a0e..8ed9f358537b1f8a56afa092781ab26842b5df3a 100644
--- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C
+++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
@@ -179,7 +179,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C
index 173e3d8841515f2f36c23836fb409f97a8482bde..74e62e71143010b26b21bfd40edc51b7f18c219d 100644
--- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C
+++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -128,7 +128,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
@@ -181,7 +181,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
diff --git a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C
index d3f2fc1aa972b36356ee669eab0c269462268231..c3eaf9c0e908baf207a2536274d35710d6fc1402 100644
--- a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C
+++ b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -99,7 +99,7 @@ void Foam::laminarFlameSpeedModels::RaviPetersen::checkPointsMonotonicity
 void Foam::laminarFlameSpeedModels::RaviPetersen::checkCoefficientArrayShape
 (
     const word& name,
-    const List<List<List<scalar> > >& x
+    const List<List<List<scalar>>>& x
 ) const
 {
     bool ok = true;
@@ -343,7 +343,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, cellI)
     {
diff --git a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.H b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.H
index 92f1b9387172d0c8ebdbe5b9deed6552f841bb4f..7cf2969449496fd93d4e7c5bccf877972e4361d3 100644
--- a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.H
+++ b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -74,10 +74,10 @@ class RaviPetersen
         List<scalar> EqRPoints_;
 
         //- Correlation alpha coefficients
-        List<List<List<scalar> > > alpha_;
+        List<List<List<scalar>>> alpha_;
 
         //- Correlation beta coefficients
-        List<List<List<scalar> > > beta_;
+        List<List<List<scalar>>> beta_;
 
         //- Reference temperature
         scalar TRef_;
@@ -96,7 +96,7 @@ class RaviPetersen
         void checkCoefficientArrayShape
         (
             const word& name,
-            const List<List<List<scalar> > >& x
+            const List<List<List<scalar>>>& x
         ) const;
 
         //- Find and interpolate a value in the data point arrays
diff --git a/src/thermophysicalModels/properties/Allwmake b/src/thermophysicalModels/properties/Allwmake
index 6ee093bc11a25dbddd315f1096567c96da302d21..b8ec516416032882650bcf051111ae7bb48f331f 100755
--- a/src/thermophysicalModels/properties/Allwmake
+++ b/src/thermophysicalModels/properties/Allwmake
@@ -12,4 +12,4 @@ wmake $targetType solidProperties
 wmake $targetType solidMixtureProperties
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options b/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options
index 138f439935dc242e7002b938b31644854d43b28b..6e1d19dbb60b095df0f8c87b45e1d7cdf4449c9e 100644
--- a/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options
+++ b/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options
@@ -8,4 +8,3 @@ EXE_INC = \
 LIB_LIBS = \
     -lliquidProperties \
     -lthermophysicalFunctions
-
diff --git a/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C b/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C
index 49ac4ab660b9851101c689fd701be9bb025aaae7..042e11df953540ef2e47aa89140efa1dcc1adae5 100644
--- a/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C
+++ b/src/thermophysicalModels/properties/liquidProperties/liquidProperties/liquidProperties.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,8 +122,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New(Istream& is)
 {
     if (debug)
     {
-        Info<< "liquidProperties::New(Istream&): "
-            << "constructing liquidProperties" << endl;
+        InfoInFunction << "Constructing liquidProperties" << endl;
     }
 
     const word liquidPropertiesType(is);
@@ -170,8 +169,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
 {
     if (debug)
     {
-        Info<< "liquidProperties::New(const dictionary&):"
-            << "constructing liquidProperties" << endl;
+        InfoInFunction << "Constructing liquidProperties" << endl;
     }
 
     const word& liquidPropertiesTypeName = dict.dictName();
diff --git a/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C b/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C
index a913aa71d3ca9d350bef00e0b82e04a22d281de7..203e7e2a27f7a923c71bc76768f3b289c05527b3 100644
--- a/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C
+++ b/src/thermophysicalModels/properties/solidProperties/solidProperties/solidPropertiesNew.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -32,8 +32,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New(Istream& is)
 {
     if (debug)
     {
-        Info<< "solidProperties::New(Istream&): constructing solid"
-            << endl;
+        InfoInFunction << "Constructing solid" << endl;
     }
 
     const word solidType(is);
@@ -79,8 +78,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
 {
     if (debug)
     {
-        Info<< "solidProperties::New(const dictionary&): constructing solid"
-            << endl;
+        InfoInFunction << "Constructing solid" << endl;
     }
 
     const word solidType(dict.dictName());
@@ -115,4 +113,4 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C
index aa3e086e20ef374b0b48ae479bc49fdc8c2ae211..7e4f7f4bdce81b60b9948ff726265f62be28bcf3 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C
@@ -136,7 +136,7 @@ boundaryRadiationPropertiesFvPatchField
                 );
             }
 
-           // if (dict.found("transmissivityModel"))
+            // if (dict.found("transmissivityModel"))
             {
                 transmissivity_.reset
                 (
@@ -230,9 +230,11 @@ transmissiveModel() const
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::
-boundaryRadiationPropertiesFvPatchField::
-emissivity(const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity
+(
+    const label bandI
+) const
 {
     switch (method_)
     {
@@ -304,8 +306,8 @@ emissivity(const label bandI) const
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::
-boundaryRadiationPropertiesFvPatchField::absorptivity
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity
 (
     const label bandI
 ) const
@@ -380,9 +382,11 @@ boundaryRadiationPropertiesFvPatchField::absorptivity
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::
-boundaryRadiationPropertiesFvPatchField::
-transmissivity(const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity
+(
+    const label bandI
+) const
 {
     switch (method_)
     {
@@ -457,9 +461,11 @@ transmissivity(const label bandI) const
 
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::
-boundaryRadiationPropertiesFvPatchField::
-reflectivity(const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationPropertiesFvPatchField::reflectivity
+(
+    const label bandI
+) const
 {
     const tmp<scalarField> tt = transmissivity(bandI);
     const tmp<scalarField> ta = absorptivity(bandI);
@@ -468,16 +474,18 @@ reflectivity(const label bandI) const
 }
 
 
-void Foam::radiation::boundaryRadiationPropertiesFvPatchField::
-write(Ostream& os) const
+void Foam::radiation::boundaryRadiationPropertiesFvPatchField::write
+(
+    Ostream& os
+) const
 {
     calculatedFvPatchScalarField::write(os);
 
     os.writeKeyword("mode") << methodTypeNames_[method_]
         << token::END_STATEMENT << nl;
 
-     switch (method_)
-     {
+    switch (method_)
+    {
         case MODEL:
         {
             word modelType
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
index 5ae7ff434bee0f6db97fb8354c940744e9a67a98..47b43d108e96fb2b2c2c834a1fb30ff8ca09a4c7 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
@@ -151,7 +151,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField::Qro() const
         const radiationModel& radiation =
             db().lookupObject<radiationModel>("radiationProperties");
 
-        tQrt() += patch().lookupPatchField<volScalarField,scalar>
+        tQrt.ref() += patch().lookupPatchField<volScalarField,scalar>
         (
             radiation.externalRadHeatFieldName_
         );
diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C
index 68c7422580fcbf04bca8f7df86329203e9550f84..be11a729ee243b36a4b0bced247df8198ef7e44d 100644
--- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C
+++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -276,7 +276,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::P1::Rp() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::radiation::P1::Ru() const
 {
     const DimensionedField<scalar, volMesh>& G =
diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.H b/src/thermophysicalModels/radiation/radiationModels/P1/P1.H
index 9a060f7017423abd9925afca2cfead2a05668fea..f25467d5a947623ff76bd3f576e938a2b457a01a 100644
--- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.H
+++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -122,7 +122,7 @@ public:
             virtual tmp<volScalarField> Rp() const;
 
             //- Source term component (constant)
-            virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
+            virtual tmp<DimensionedField<scalar, volMesh>> Ru() const;
 };
 
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
index fc5f9389b892b42501f2668d15e1efa763db36dd..b2fdb85d1632b48b63af64a36ac1dff199fefc2e 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -30,7 +30,7 @@ using namespace Foam::constant;
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
-const Foam::List<Foam::Tuple2<Foam::scalar, Foam::scalar> >
+const Foam::List<Foam::Tuple2<Foam::scalar, Foam::scalar>>
 Foam::radiation::blackBodyEmission::emissivePowerTable
 (
     IStringStream
@@ -227,18 +227,15 @@ Foam::radiation::blackBodyEmission::EbDeltaLambdaT
     }
     else
     {
+        scalarField& Ebif = Eb.ref();
+
         forAll(T, i)
         {
             scalar T1 = fLambdaT(band[1]*T[i]);
             scalar T2 = fLambdaT(band[0]*T[i]);
-            dimensionedScalar fLambdaDelta
-            (
-                "fLambdaDelta",
-                dimless,
-                T1 - T2
-            );
-            Eb()[i] = Eb()[i]*fLambdaDelta.value();
+            Ebif[i] *= T1 - T2;
         }
+
         return Eb;
     }
 }
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.H b/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.H
index a619139b8d9bbf00cb8eebf2ca3596380d7f5eb1..d7f175fc5c6f373ed4e18bddd765d51dbb99e1ec 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.H
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ class blackBodyEmission
 public:
 
     //- Static table of black body emissive power
-    static const List<Tuple2<scalar, scalar> > emissivePowerTable;
+    static const List<Tuple2<scalar, scalar>> emissivePowerTable;
 
 
 private:
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
index 469710573999922239a333392e9a7c7bf78fade8..baad4756560627cb453a8b5926299bdecbef01c7 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -323,7 +323,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
     solarLoad_(),
     meshOrientation_
     (
-        coeffs_.lookupOrDefault<vector>("meshOrientation", vector::zero)
+        coeffs_.lookupOrDefault<vector>("meshOrientation", Zero)
     )
 {
     initialise();
@@ -418,7 +418,7 @@ Foam::radiation::fvDOM::fvDOM
     solarLoad_(),
     meshOrientation_
     (
-        coeffs_.lookupOrDefault<vector>("meshOrientation", vector::zero)
+        coeffs_.lookupOrDefault<vector>("meshOrientation", Zero)
     )
 {
     initialise();
@@ -513,7 +513,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::fvDOM::Rp() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::radiation::fvDOM::Ru() const
 {
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.H b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.H
index 4fb15edbc56a9920a55ac4905ca95d6e9beb8514..5b0895bfddc71d393a5bd373d9bd921b88edb52f 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.H
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,7 +139,7 @@ class fvDOM
         scalar maxIter_;
 
         //- List of cached fvMatrices for rays
-        List<PtrList<fvScalarMatrix> >fvRayDiv_;
+        List<PtrList<fvScalarMatrix>>fvRayDiv_;
 
         //- Cache convection div matrix
         bool cacheDiv_;
@@ -217,7 +217,7 @@ public:
             virtual tmp<volScalarField> Rp() const;
 
             //- Source term component (constant)
-            virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
+            virtual tmp<DimensionedField<scalar, volMesh>> Ru() const;
 
 
         // Access
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
index a31fad4067785ac80e577def60b4096f9fc6fbc7..cb6f8417a2c49aee184c24f5da1eae7597a0d216 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,8 +106,8 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
         mesh_,
         dimensionedScalar("Qem", dimMass/pow3(dimTime), 0.0)
     ),
-    d_(vector::zero),
-    dAve_(vector::zero),
+    d_(Zero),
+    dAve_(Zero),
     theta_(theta),
     phi_(phi),
     omega_(0.0),
@@ -137,7 +137,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
 
     if (mesh_.nSolutionD() == 2)
     {
-        vector meshDir(vector::zero);
+        vector meshDir(Zero);
         if (dom_.meshOrientation() != vector::zero)
         {
             meshDir = dom_.meshOrientation();
@@ -161,7 +161,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
     }
     else if (mesh_.nSolutionD() == 1)
     {
-        vector meshDir(vector::zero);
+        vector meshDir(Zero);
         if (dom_.meshOrientation() != vector::zero)
         {
             meshDir = dom_.meshOrientation();
@@ -195,7 +195,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
             IOobject::AUTO_WRITE
         );
 
-        // check if field exists and can be read
+        // Check if field exists and can be read
         if (IHeader.typeHeaderOk<volScalarField>(true))
         {
             ILambda_.set
@@ -295,11 +295,11 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
             );
         }
 
-        IiEq().relax();
+        IiEq.ref().relax();
 
         const solverPerformance ILambdaSol = solve
         (
-            IiEq(),
+            IiEq.ref(),
             mesh_.solver("Ii")
         );
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C
index c48ca46fc44a1463aacff6e7b92614705891940f..e89127328ad83f30dc10977a07a1979cce5c9abf 100644
--- a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C
+++ b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -106,10 +106,10 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::radiation::noRadiation::Ru() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
diff --git a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.H b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.H
index 75ab459d6bf338658061c9845e90a42f9eeca12a..dde1edfe3f228e2190c66ce33684773a029b2e66 100644
--- a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.H
+++ b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -95,7 +95,7 @@ public:
             tmp<volScalarField> Rp() const;
 
             //- Source term component (constant)
-            tmp<DimensionedField<scalar, volMesh> > Ru() const;
+            tmp<DimensionedField<scalar, volMesh>> Ru() const;
 };
 
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C
index 212c67b759af531237b5758a88cb889143b12740..dd5b0268db018bca575cc9ba0cf5aa3a74431c80 100644
--- a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C
+++ b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -107,10 +107,10 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::radiation::opaqueSolid::Ru() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
diff --git a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.H b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.H
index f2f0ea89347a8f4d3736b0dc274c473c2401deaf..7fdc3b0bb53380ddec55d94e93b03d39487c4413 100644
--- a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.H
+++ b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ public:
             tmp<volScalarField> Rp() const;
 
             //- Source term component (constant)
-            tmp<DimensionedField<scalar, volMesh> > Ru() const;
+            tmp<DimensionedField<scalar, volMesh>> Ru() const;
 };
 
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.H b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.H
index 7c11eab46a013f66f8bb7210ca9da646a30ceaaf..5f11ddd19f059747ae50c57f148159d4b2d0b627 100644
--- a/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.H
+++ b/src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -235,7 +235,7 @@ public:
             virtual tmp<volScalarField> Rp() const = 0;
 
             //- Source term component (constant)
-            virtual tmp<DimensionedField<scalar, volMesh> > Ru() const = 0;
+            virtual tmp<DimensionedField<scalar, volMesh>> Ru() const = 0;
 
             //- Energy source term
             virtual tmp<fvScalarMatrix> Sh(fluidThermo& thermo) const;
@@ -261,20 +261,20 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define addToRadiationRunTimeSelectionTables(model)                           \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        radiationModel,                                                       \
-        model,                                                                \
-        dictionary                                                            \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        radiationModel,                                                       \
-        model,                                                                \
-        T                                                                     \
+#define addToRadiationRunTimeSelectionTables(model)                            \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        radiationModel,                                                        \
+        model,                                                                 \
+        dictionary                                                             \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        radiationModel,                                                        \
+        model,                                                                 \
+        T                                                                      \
     );
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
index 0389e6562f3d78198dab2c21dafdf3f125391819..6188b294681141baaa6d54e4d63da09d9afa5da9 100644
--- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
+++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
@@ -334,7 +334,7 @@ void Foam::faceShading::calculate()
         // Collect the rays which has 'only one not wall' obstacle bettween
         // start and end.
         // If the ray hit itself get stored in dRayIs
-        forAll (hitInfo, rayI)
+        forAll(hitInfo, rayI)
         {
             if (!hitInfo[rayI].hit())
             {
@@ -379,10 +379,10 @@ void Foam::faceShading::calculate()
             )
         );
 
-        volScalarField& hitFaces = thitFaces();
+        volScalarField& hitFaces = thitFaces.ref();
 
         hitFaces.boundaryField() = 0.0;
-        forAll (rayStartFaces_, i)
+        forAll(rayStartFaces_, i)
         {
             const label faceI = rayStartFaces_[i];
             label patchID = patches.whichPatch(faceI);
diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C
index 469a33e1f58ab1558d9b52bd1ca5b553c82b0d70..a69cfbd0ebbeeb0f6b278817548aef86c08fe84a 100644
--- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C
+++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2016 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -44,8 +44,8 @@ namespace Foam
     }
 }
 
-const Foam::word Foam::radiation::solarLoad::viewFactorWalls
-    = "viewFactorWall";
+const Foam::word Foam::radiation::solarLoad::viewFactorWalls = "viewFactorWall";
+
 
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
@@ -120,15 +120,13 @@ void Foam::radiation::solarLoad::updateDirectHitRadiation
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
     const scalarField& V = mesh_.V();
 
-    forAll (hitFacesId, i)
+    forAll(hitFacesId, i)
     {
         const label faceI = hitFacesId[i];
         label patchID = patches.whichPatch(faceI);
         const polyPatch& pp = patches[patchID];
         const label localFaceI = faceI - pp.start();
-        const vector qPrim =
-              solarCalc_.directSolarRad()
-            * solarCalc_.direction();
+        const vector qPrim = solarCalc_.directSolarRad()*solarCalc_.direction();
 
         if (includeMappedPatchBasePatches[patchID])
         {
@@ -182,7 +180,7 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
                 const vectorField n = pp.faceNormals();
                 const labelList& cellIds = pp.faceCells();
 
-                forAll (n, faceI)
+                forAll(n, faceI)
                 {
                     const scalar cosEpsilon(verticalDir_ & -n[faceI]);
 
@@ -220,9 +218,9 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
                         // Ground reflected
                         Er =
                             solarCalc_.directSolarRad()
-                         * (solarCalc_.C() + Foam::sin(solarCalc_.beta()))
-                         * solarCalc_.groundReflectivity()
-                         * (1.0 - cosEpsilon)/2.0;
+                          * (solarCalc_.C() + Foam::sin(solarCalc_.beta()))
+                          * solarCalc_.groundReflectivity()
+                          * (1.0 - cosEpsilon)/2.0;
                     }
 
                     const label cellI = cellIds[faceI];
@@ -241,10 +239,10 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
                         for (label bandI = 0; bandI < nBands_; bandI++)
                         {
                             Ru_[cellI] +=
-                                  (Ed + Er)
-                                * spectralDistribution_[bandI]
-                                * absorptivity_[patchID][bandI]()[faceI]
-                                * sf[faceI]/V[cellI];
+                                (Ed + Er)
+                              * spectralDistribution_[bandI]
+                              * absorptivity_[patchID][bandI]()[faceI]
+                              * sf[faceI]/V[cellI];
                         }
                     }
                 }
@@ -261,7 +259,7 @@ void Foam::radiation::solarLoad::updateSkyDiffusiveRadiation
                 const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
 
                 const labelList& cellIds = pp.faceCells();
-                forAll (pp, faceI)
+                forAll(pp, faceI)
                 {
                     const label cellI = cellIds[faceI];
                     if (includeMappedPatchBasePatches[patchID])
@@ -337,20 +335,9 @@ void Foam::radiation::solarLoad::initialise(const dictionary& coeffs)
         );
     }
 
-    if (coeffs.found("solidCoupled"))
-    {
-         coeffs.lookup("solidCoupled") >> solidCoupled_;
-    }
-
-    if (coeffs.found("wallCoupled"))
-    {
-         coeffs.lookup("wallCoupled") >> wallCoupled_;
-    }
-
-    if (coeffs.found("updateAbsorptivity"))
-    {
-        coeffs.lookup("updateAbsorptivity") >> updateAbsorptivity_;
-    }
+    coeffs.readIfPresent("solidCoupled", solidCoupled_);
+    coeffs.readIfPresent("wallCoupled", wallCoupled_);
+    coeffs.readIfPresent("updateAbsorptivity", updateAbsorptivity_);
 }
 
 
@@ -399,8 +386,7 @@ void Foam::radiation::solarLoad::calculateQdiff
     forAll(includePatches_, i)
     {
         const label patchI = includePatches_[i];
-        nLocalVFCoarseFaces +=
-            coarseMesh_->boundaryMesh()[patchI].size();
+        nLocalVFCoarseFaces += coarseMesh_->boundaryMesh()[patchI].size();
     }
 
     label totalFVNCoarseFaces = nLocalVFCoarseFaces;
@@ -413,7 +399,7 @@ void Foam::radiation::solarLoad::calculateQdiff
 
     scalarField compactCoarseRave(map_->constructSize(), 0.0);
     scalarField compactCoarsePartialArea(map_->constructSize(), 0.0);
-    vectorList compactCoarseNorm(map_->constructSize(), vector::zero);
+    vectorList compactCoarseNorm(map_->constructSize(), Zero);
 
     const boundaryRadiationProperties& boundaryRadiation =
         boundaryRadiationProperties::New(mesh_);
@@ -424,7 +410,7 @@ void Foam::radiation::solarLoad::calculateQdiff
 
     label startI = 0;
     label compactI = 0;
-    forAll (includePatches_, i)
+    forAll(includePatches_, i)
     {
         const label patchID = includePatches_[i];
         const polyPatch& pp = mesh_.boundaryMesh()[patchID];
@@ -443,8 +429,8 @@ void Foam::radiation::solarLoad::calculateQdiff
         for (label bandI = 0; bandI < nBands_; bandI++)
         {
             const tmp<scalarField> tr =
-               spectralDistribution_[bandI]
-              *boundaryRadiation.reflectivity(patchID, bandI);
+                spectralDistribution_[bandI]
+               *boundaryRadiation.reflectivity(patchID, bandI);
             r += tr();
         }
 
@@ -456,17 +442,12 @@ void Foam::radiation::solarLoad::calculateQdiff
         const labelList& coarsePatchFace =
             coarseMesh_->patchFaceMap()[patchID];
 
-        forAll (cpp, coarseI)
+        forAll(cpp, coarseI)
         {
             const label coarseFaceID = coarsePatchFace[coarseI];
-            const labelList& fineFaces =
-                coarseToFine_[i][coarseFaceID];
+            const labelList& fineFaces = coarseToFine_[i][coarseFaceID];
 
-            UIndirectList<scalar> fineSf
-            (
-                sf,
-                fineFaces
-            );
+            UIndirectList<scalar> fineSf(sf, fineFaces);
             scalar fineArea = sum(fineSf());
 
             scalar fullArea = 0.0;
@@ -489,7 +470,7 @@ void Foam::radiation::solarLoad::calculateQdiff
             localCoarseRave,
             Rave.size(),
             startI
-        ).assign(Rave);
+        ) = Rave;
 
 
         const vectorList coarseNSf = cpp.faceNormals();
@@ -498,43 +479,36 @@ void Foam::radiation::solarLoad::calculateQdiff
             localCoarseNorm,
             cpp.size(),
             startI
-        ).assign(coarseNSf);
+        ) = coarseNSf;
         startI += cpp.size();
     }
 
 
-     SubList<scalar>(compactCoarsePartialArea, nLocalVFCoarseFaces).assign
-     (
-         localCoarsePartialArea
-     );
+    SubList<scalar>(compactCoarsePartialArea, nLocalVFCoarseFaces) =
+        localCoarsePartialArea;
 
-     SubList<scalar>(compactCoarseRave, nLocalVFCoarseFaces).assign
-     (
-         localCoarseRave
-     );
+    SubList<scalar>(compactCoarseRave, nLocalVFCoarseFaces) =
+        localCoarseRave;
 
-     SubList<vector>(compactCoarseNorm, nLocalVFCoarseFaces).assign
-     (
-         localCoarseNorm
-     );
+    SubList<vector>(compactCoarseNorm, nLocalVFCoarseFaces) =
+        localCoarseNorm;
 
-     map_->distribute(compactCoarsePartialArea);
-     map_->distribute(compactCoarseRave);
-     map_->distribute(compactCoarseNorm);
+    map_->distribute(compactCoarsePartialArea);
+    map_->distribute(compactCoarseRave);
+    map_->distribute(compactCoarseNorm);
 
 
     // Calculate coarse hitFaces and Sun direct hit heat fluxes
     scalarList localqDiffusive(nLocalVFCoarseFaces, 0.0);
 
     label locaFaceI = 0;
-    forAll (includePatches_, i)
+    forAll(includePatches_, i)
     {
         const label patchID = includePatches_[i];
         const polyPatch& pp = coarseMesh_->boundaryMesh()[patchID];
         const polyPatch& ppf = mesh_.boundaryMesh()[patchID];
 
-        const labelList& coarsePatchFace =
-            coarseMesh_->patchFaceMap()[patchID];
+        const labelList& coarsePatchFace = coarseMesh_->patchFaceMap()[patchID];
         const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
 
         scalarField a(ppf.size(), 0.0);
@@ -546,15 +520,11 @@ void Foam::radiation::solarLoad::calculateQdiff
             a += ta();
         }
 
-        forAll (pp, coarseI)
+        forAll(pp, coarseI)
         {
             const label coarseFaceID = coarsePatchFace[coarseI];
             const labelList& fineFaces = coarseToFine_[i][coarseFaceID];
-            UIndirectList<scalar> fineSf
-            (
-                sf,
-                fineFaces
-            );
+            UIndirectList<scalar> fineSf(sf, fineFaces);
             scalar fineArea = sum(fineSf());
 
             scalar aAve = 0.0;
@@ -569,17 +539,17 @@ void Foam::radiation::solarLoad::calculateQdiff
             const labelList& compactFaces = visibleFaceFaces_[locaFaceI];
 
 
-            forAll (compactFaces, j)
+            forAll(compactFaces, j)
             {
                 label compactI = compactFaces[j];
 
                 localqDiffusive[locaFaceI] +=
-                      compactCoarsePartialArea[compactI]
-                    * aAve
-                    * (solarCalc_.directSolarRad()*solarCalc_.direction())
-                    & compactCoarseNorm[compactI]
-                    * vf[j]
-                    * compactCoarseRave[compactI];
+                    compactCoarsePartialArea[compactI]
+                  * aAve
+                  * (solarCalc_.directSolarRad()*solarCalc_.direction())
+                  & compactCoarseNorm[compactI]
+                  * vf[j]
+                  * compactCoarseRave[compactI];
 
             }
             locaFaceI++;
@@ -588,7 +558,7 @@ void Foam::radiation::solarLoad::calculateQdiff
 
     // Fill QsecondRad_
     label compactId = 0;
-    forAll (includePatches_, i)
+    forAll(includePatches_, i)
     {
         const label patchID = includePatches_[i];
         const polyPatch& pp = coarseMesh_->boundaryMesh()[patchID];
@@ -630,7 +600,7 @@ void Foam::radiation::solarLoad::calculateQdiff
             const polyPatch& pp = patches[patchID];
             const labelList& cellIds = pp.faceCells();
             const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
-            forAll (pp, faceI)
+            forAll(pp, faceI)
             {
                 const label cellI = cellIds[faceI];
                 Ru_[cellI] += qSecond[faceI]*sf[faceI]/V[cellI];
@@ -699,7 +669,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T)
         dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0)
     ),
     solarCalc_(this->subDict(typeName + "Coeffs"), mesh_),
-    verticalDir_(vector::zero),
+    verticalDir_(Zero),
     useVFbeamToDiffuse_(false),
     includePatches_(mesh_.boundary().size(), -1),
     coarseToFine_(),
@@ -789,7 +759,7 @@ Foam::radiation::solarLoad::solarLoad
         dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0)
     ),
     solarCalc_(coeffs_, mesh_),
-    verticalDir_(vector::zero),
+    verticalDir_(Zero),
     useVFbeamToDiffuse_(false),
     includePatches_(mesh_.boundary().size(), -1),
     coarseToFine_(),
@@ -881,7 +851,7 @@ Foam::radiation::solarLoad::solarLoad
         dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0)
     ),
     solarCalc_(dict, mesh_),
-    verticalDir_(vector::zero),
+    verticalDir_(Zero),
     useVFbeamToDiffuse_(false),
     includePatches_(mesh_.boundary().size(), -1),
     coarseToFine_(),
@@ -1034,10 +1004,11 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::solarLoad::Rp() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::radiation::solarLoad::Ru() const
 {
     return Ru_;
 }
 
+
 // ************************************************************************* //
diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.H b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.H
index ee24701171dfa4bdc64d25e0955687329b1fcc18..73c57432e6d8f693e9e880341ce854659f84c828 100644
--- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.H
+++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.H
@@ -147,7 +147,7 @@ private:
         bool wallCoupled_;
 
         //- Absorptivity list
-        List<List<tmp<scalarField> > > absorptivity_;
+        List<List<tmp<scalarField>>> absorptivity_;
 
         //- Update absorptivity
         bool updateAbsorptivity_;
@@ -233,7 +233,7 @@ public:
             virtual tmp<volScalarField> Rp() const;
 
             //- Source term component (constant)
-            virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
+            virtual tmp<DimensionedField<scalar, volMesh>> Ru() const;
 
 
     // Access
diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
index 9ef90cd5eed4520946ae6aa630e07439f7834249..4a950f0edda891c073cf2fb267bbaf34df69eb89 100644
--- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
+++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,7 +133,7 @@ void Foam::radiation::viewFactor::initialise()
     {
         Fmatrix_.reset
         (
-            new scalarSquareMatrix(totalNCoarseFaces_, totalNCoarseFaces_, 0.0)
+            new scalarSquareMatrix(totalNCoarseFaces_, 0.0)
         );
 
         if (debug)
@@ -169,12 +169,12 @@ void Foam::radiation::viewFactor::initialise()
                 scalar sumF = 0.0;
                 for (label j=0; j<totalNCoarseFaces_; j++)
                 {
-                    sumF += Fmatrix_()[i][j];
+                    sumF += Fmatrix_()(i, j);
                 }
                 scalar delta = sumF - 1.0;
                 for (label j=0; j<totalNCoarseFaces_; j++)
                 {
-                    Fmatrix_()[i][j] *= (1.0 - delta/(sumF + 0.001));
+                    Fmatrix_()(i, j) *= (1.0 - delta/(sumF + 0.001));
                 }
             }
         }
@@ -184,15 +184,10 @@ void Foam::radiation::viewFactor::initialise()
         {
             CLU_.reset
             (
-                new scalarSquareMatrix
-                (
-                    totalNCoarseFaces_,
-                    totalNCoarseFaces_,
-                    0.0
-                )
+                new scalarSquareMatrix(totalNCoarseFaces_, 0.0)
             );
 
-            pivotIndices_.setSize(CLU_().n());
+            pivotIndices_.setSize(CLU_().m());
         }
     }
 
@@ -470,10 +465,9 @@ void Foam::radiation::viewFactor::calculate()
     }
 
     // Fill the local values to distribute
-    SubList<scalar>(compactCoarseT,nLocalCoarseFaces_).assign(localCoarseTave);
-    SubList<scalar>(compactCoarseE,nLocalCoarseFaces_).assign(localCoarseEave);
-    SubList<scalar>
-        (compactCoarseHo,nLocalCoarseFaces_).assign(localCoarseHoave);
+    SubList<scalar>(compactCoarseT,nLocalCoarseFaces_) = localCoarseTave;
+    SubList<scalar>(compactCoarseE,nLocalCoarseFaces_) = localCoarseEave;
+    SubList<scalar>(compactCoarseHo,nLocalCoarseFaces_) = localCoarseHoave;
 
     // Distribute data
     map_->distribute(compactCoarseT);
@@ -494,7 +488,7 @@ void Foam::radiation::viewFactor::calculate()
     (
         compactGlobalIds,
         nLocalCoarseFaces_
-    ).assign(localGlobalIds);
+    ) = localGlobalIds;
 
     map_->distribute(compactGlobalIds);
 
@@ -527,7 +521,7 @@ void Foam::radiation::viewFactor::calculate()
         // Variable emissivity
         if (!constEmissivity_)
         {
-            scalarSquareMatrix C(totalNCoarseFaces_, totalNCoarseFaces_, 0.0);
+            scalarSquareMatrix C(totalNCoarseFaces_, 0.0);
 
             for (label i=0; i<totalNCoarseFaces_; i++)
             {
@@ -539,13 +533,13 @@ void Foam::radiation::viewFactor::calculate()
 
                     if (i==j)
                     {
-                        C[i][j] = invEj - (invEj - 1.0)*Fmatrix_()[i][j];
-                        q[i] += (Fmatrix_()[i][j] - 1.0)*sigmaT4 - QrExt[j];
+                        C(i, j) = invEj - (invEj - 1.0)*Fmatrix_()(i, j);
+                        q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4 - QrExt[j];
                     }
                     else
                     {
-                        C[i][j] = (1.0 - invEj)*Fmatrix_()[i][j];
-                        q[i] += Fmatrix_()[i][j]*sigmaT4;
+                        C(i, j) = (1.0 - invEj)*Fmatrix_()(i, j);
+                        q[i] += Fmatrix_()(i, j)*sigmaT4;
                     }
 
                 }
@@ -568,11 +562,11 @@ void Foam::radiation::viewFactor::calculate()
                         scalar invEj = 1.0/E[j];
                         if (i==j)
                         {
-                            CLU_()[i][j] = invEj-(invEj-1.0)*Fmatrix_()[i][j];
+                            CLU_()(i, j) = invEj-(invEj-1.0)*Fmatrix_()(i, j);
                         }
                         else
                         {
-                            CLU_()[i][j] = (1.0 - invEj)*Fmatrix_()[i][j];
+                            CLU_()(i, j) = (1.0 - invEj)*Fmatrix_()(i, j);
                         }
                     }
                 }
@@ -596,11 +590,11 @@ void Foam::radiation::viewFactor::calculate()
 
                     if (i==j)
                     {
-                        q[i] += (Fmatrix_()[i][j] - 1.0)*sigmaT4  - QrExt[j];
+                        q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4  - QrExt[j];
                     }
                     else
                     {
-                        q[i] += Fmatrix_()[i][j]*sigmaT4;
+                        q[i] += Fmatrix_()(i, j)*sigmaT4;
                     }
                 }
             }
@@ -704,10 +698,10 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::radiation::viewFactor::Ru() const
 {
-    return tmp<DimensionedField<scalar, volMesh> >
+    return tmp<DimensionedField<scalar, volMesh>>
     (
         new DimensionedField<scalar, volMesh>
         (
diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H
index bbeb69b7ed2f2aa1fa1f442188fe8b8a2febbe08..0202238dffc2ef48c286689138c04f0ed80aee98 100644
--- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H
+++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -177,7 +177,7 @@ public:
             virtual tmp<volScalarField> Rp() const;
 
             //- Source term component (constant)
-            virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
+            virtual tmp<DimensionedField<scalar, volMesh>> Ru() const;
 
 
     // Access
diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C
index d697bfa91461742278f323c989af6fc91cd03e70..5320f14d6dd30f3dcfe4923bbd0ec72cf0238612 100644
--- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C
+++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -26,7 +26,7 @@ License
 #include "greyMeanAbsorptionEmission.H"
 #include "addToRunTimeSelectionTable.H"
 #include "unitConversion.H"
-#include "zeroGradientFvPatchFields.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 #include "basicSpecieMixture.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -208,11 +208,11 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const
             ),
             mesh(),
             dimensionedScalar("a", dimless/dimLength, 0.0),
-            zeroGradientFvPatchVectorField::typeName
+            extrapolatedCalculatedFvPatchVectorField::typeName
         )
     );
 
-    scalarField& a = ta().internalField();
+    scalarField& a = ta.ref().internalField();
 
     forAll(a, cellI)
     {
@@ -233,7 +233,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const
             else
             {
                 scalar invWt = 0.0;
-                forAll (mixture.Y(), s)
+                forAll(mixture.Y(), s)
                 {
                     invWt += mixture.Y(s)[cellI]/mixture.W(s);
                 }
@@ -260,7 +260,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const
                 );
         }
     }
-    ta().correctBoundaryConditions();
+    ta.ref().correctBoundaryConditions();
     return ta;
 }
 
@@ -299,11 +299,11 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const
 
         if (dQ.dimensions() == dimEnergy/dimTime)
         {
-            E().internalField() = EhrrCoeff_*dQ/mesh_.V();
+            E.ref().internalField() = EhrrCoeff_*dQ/mesh_.V();
         }
         else if (dQ.dimensions() == dimEnergy/dimTime/dimVolume)
         {
-            E().internalField() = EhrrCoeff_*dQ;
+            E.ref().internalField() = EhrrCoeff_*dQ;
         }
         else
         {
diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.H b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.H
index b5f74bfd7007214ebb8412e9e628153f2d83dcfa..72864d5de7b8633aa1d7b0f7393cfc4eba028e53 100644
--- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.H
+++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -131,7 +131,7 @@ private:
         FixedList<label, nSpecies_> specieIndex_;
 
         //- Look-up table of species related to ft
-        mutable autoPtr<interpolationLookUpTable<scalar> > lookUpTablePtr_;
+        mutable autoPtr<interpolationLookUpTable<scalar>> lookUpTablePtr_;
 
         //- SLG thermo package
         const fluidThermo& thermo_;
diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
index 32d5c52114488341299205b58c8935f2bc6bf157..ade482077b9213da352402f63f62c780993ee910 100644
--- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
+++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -26,6 +26,7 @@ License
 #include "greyMeanSolidAbsorptionEmission.H"
 #include "addToRunTimeSelectionTable.H"
 #include "unitConversion.H"
+#include "extrapolatedCalculatedFvPatchFields.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -53,16 +54,16 @@ greyMeanSolidAbsorptionEmission::X(const word specie) const
     const volScalarField& p = thermo_.p();
 
     tmp<scalarField> tXj(new scalarField(T.internalField().size(), 0.0));
-    scalarField& Xj = tXj();
+    scalarField& Xj = tXj.ref();
 
     tmp<scalarField> tRhoInv(new scalarField(T.internalField().size(), 0.0));
-    scalarField& rhoInv = tRhoInv();
+    scalarField& rhoInv = tRhoInv.ref();
 
     forAll(mixture_.Y(), specieI)
     {
         const scalarField& Yi = mixture_.Y()[specieI];
 
-        forAll (rhoInv, iCell)
+        forAll(rhoInv, iCell)
         {
             rhoInv[iCell] +=
                 Yi[iCell]/mixture_.rho(specieI, p[iCell], T[iCell]);
@@ -156,11 +157,11 @@ calc(const label propertyId) const
             ),
             mesh(),
             dimensionedScalar("a", dimless/dimLength, 0.0),
-            zeroGradientFvPatchVectorField::typeName
+            extrapolatedCalculatedFvPatchVectorField::typeName
         )
     );
 
-    scalarField& a = ta().internalField();
+    scalarField& a = ta.ref().internalField();
 
     forAllConstIter(HashTable<label>, speciesNames_, iter)
     {
@@ -170,7 +171,7 @@ calc(const label propertyId) const
         }
     }
 
-    ta().correctBoundaryConditions();
+    ta.ref().correctBoundaryConditions();
     return ta;
 }
 
diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H
index 4ea4d1e5f52be989b557fdd9bfb828031faac1c0..5172b16c146f3835be4e48454255f47894dacc52 100644
--- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H
+++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.H
@@ -2,8 +2,8 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenCFD Ltd
-     \\/     M anipulation  |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -81,7 +81,7 @@ private:
         const basicSpecieMixture& mixture_;
 
         //- List of solid species data
-        List<FixedList<scalar, 2> > solidData_;
+        List<FixedList<scalar, 2>> solidData_;
 
 
     // Private member functions
diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
index 7147a96065aae1213e93327306a88c6dd42a97dc..673043c39bebba79e6343a789259a08af98b6929 100644
--- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
+++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -177,7 +177,7 @@ Foam::radiation::wideBandAbsorptionEmission::aCont(const label bandI) const
         )
     );
 
-    scalarField& a = ta().internalField();
+    scalarField& a = ta.ref().internalField();
 
     forAll(a, i)
     {
@@ -255,7 +255,7 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandI) const
 
         if (dQ.dimensions() == dimEnergy/dimTime)
         {
-            E().internalField() =
+            E.ref().internalField() =
                 iEhrrCoeffs_[bandI]
                *dQ.internalField()
                *(iBands_[bandI][1] - iBands_[bandI][0])
@@ -264,7 +264,7 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandI) const
         }
         else if (dQ.dimensions() == dimEnergy/dimTime/dimVolume)
         {
-            E().internalField() =
+            E.ref().internalField() =
                 iEhrrCoeffs_[bandI]
                *dQ.internalField()
                *(iBands_[bandI][1] - iBands_[bandI][0])
diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C
index 709c03a7788cba321a1c1107862914fd8447398e..3ac0961c9c5127fa8bb9760d30752f694bd7e4f7 100644
--- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C
+++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C
@@ -38,40 +38,11 @@ namespace Foam
 }
 
 
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
-
-Foam::IOobject Foam::radiation::boundaryRadiationProperties::createIOobject
-(
-    const fvMesh& mesh, const word name
-) const
-{
-    IOobject io
-    (
-        name,
-        mesh.time().constant(),
-        mesh,
-        IOobject::MUST_READ,
-        IOobject::NO_WRITE
-    );
-
-    if (io.typeHeaderOk<volScalarField>(true))
-    {
-        io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
-        return io;
-    }
-    else
-    {
-        io.readOpt() = IOobject::NO_READ;
-        return io;
-    }
-}
-
-
 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
 
 Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
 (
-     const fvMesh& mesh
+    const fvMesh& mesh
 )
 :
     MeshObject
@@ -82,12 +53,16 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
     >(mesh),
     radBoundaryProperties_()
 {
-    const IOobject boundaryIO
+    IOobject boundaryIO
     (
-        createIOobject(mesh, boundaryRadiationProperties::typeName)
+        boundaryRadiationProperties::typeName,
+        mesh.time().constant(),
+        mesh,
+        IOobject::MUST_READ,
+        IOobject::NO_WRITE
     );
 
-    if (boundaryIO.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
+    if (boundaryIO.typeHeaderOk<volScalarField>(true))
     {
         radBoundaryProperties_.set
         (
@@ -99,51 +74,52 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
 
 // * * * * * * * * * * * * * * * Member fucntions * * * * * * * * * * * * *  //
 
-const Foam::volScalarField& Foam::radiation::boundaryRadiationProperties::
-radBoundaryProperties() const
-{
-    return radBoundaryProperties_();
-}
-
-
-Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
-emissivity(const label index, const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationProperties::emissivity
+(
+    const label patchI,
+    const label bandI
+) const
 {
     if (!radBoundaryProperties_.empty())
     {
         return refCast<const boundaryRadiationPropertiesFvPatchField>
         (
-            radBoundaryProperties_->boundaryField()[index]
+            radBoundaryProperties_->boundaryField()[patchI]
         ).emissivity(bandI);
     }
     else
     {
         FatalErrorInFunction
             << "Field 'boundaryRadiationProperties'"
-            << "is not found in the constant directory."
-            << "Please add it "
+            << "is not found in the constant directory. "
+            << "Please add it"
             << exit(FatalError);
 
-         return tmp<scalarField>(new scalarField());
+        return tmp<scalarField>(new scalarField());
     }
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
-absorptivity(const label index, const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationProperties::absorptivity
+(
+    const label patchI,
+    const label bandI
+) const
 {
     if (!radBoundaryProperties_.empty())
     {
         return refCast<const boundaryRadiationPropertiesFvPatchField>
         (
-            radBoundaryProperties_->boundaryField()[index]
+            radBoundaryProperties_->boundaryField()[patchI]
         ).absorptivity(bandI);
     }
     else
     {
         FatalErrorInFunction
             << "Field 'boundaryRadiationProperties'"
-            << "is not found in the constant directory."
+            << "is not found in the constant directory. "
             << "Please add it "
             << exit(FatalError);
 
@@ -152,22 +128,26 @@ absorptivity(const label index, const label bandI) const
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
-transmissivity(const label index, const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationProperties::transmissivity
+(
+    const label patchI,
+    const label bandI
+) const
 {
     if (!radBoundaryProperties_.empty())
     {
         return refCast<const boundaryRadiationPropertiesFvPatchField>
         (
-            radBoundaryProperties_->boundaryField()[index]
+            radBoundaryProperties_->boundaryField()[patchI]
         ).transmissivity(bandI);
     }
     else
     {
         FatalErrorInFunction
             << "Field 'boundaryRadiationProperties'"
-            << "is not found in the constant directory."
-            << "Please add it "
+            << "is not found in the constant directory. "
+            << "Please add it"
             << exit(FatalError);
 
         return tmp<scalarField>(new scalarField());
@@ -175,22 +155,26 @@ transmissivity(const label index, const label bandI) const
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
-reflectivity(const label index, const label bandI) const
+Foam::tmp<Foam::scalarField>
+Foam::radiation::boundaryRadiationProperties::reflectivity
+(
+    const label patchI,
+    const label bandI
+) const
 {
     if (!radBoundaryProperties_.empty())
     {
         return refCast<const boundaryRadiationPropertiesFvPatchField>
         (
-            radBoundaryProperties_->boundaryField()[index]
+            radBoundaryProperties_->boundaryField()[patchI]
         ).reflectivity(bandI);
     }
     else
     {
         FatalErrorInFunction
             << "Field 'boundaryRadiationProperties'"
-            << "is not found in the constant directory."
-            << "Please add it "
+            << "is not found in the constant directory. "
+            << "Please add it"
             << exit(FatalError);
 
         return tmp<scalarField>(new scalarField());
diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H
index 0bb1cc4d8d531bcb344dc764d8661adec9c25fe9..7fd29d7a1791db9947792e089ce77871fa57dfbb 100644
--- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H
+++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H
@@ -22,12 +22,11 @@ License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
 Class
-    Foam::fv::boundaryRadiationProperties
+    Foam::radiation::boundaryRadiationProperties
 
 Description
     Boundary radiation properties holder
 
-
 SourceFiles
     boundaryRadiationProperties.C
 
@@ -70,12 +69,6 @@ class boundaryRadiationProperties
         autoPtr<volScalarField> radBoundaryProperties_;
 
 
-    // Private member functions
-
-        //- Create IO object if dictionary is present
-        IOobject createIOobject(const fvMesh& mesh, const word) const;
-
-
 public:
 
     // Declare name of the class and its debug switch
@@ -84,8 +77,8 @@ public:
 
     // Constructors
 
-        //- Construct given fvMesh and IOobject
-        boundaryRadiationProperties(const fvMesh&);
+        //- Construct given fvMesh
+        explicit boundaryRadiationProperties(const fvMesh&);
 
 
     // Member Functions
@@ -93,7 +86,7 @@ public:
         //- Access boundary emissivity on patch
         tmp<scalarField> emissivity
         (
-            const label patchId,
+            const label patchI,
             const label bandI = 0
         ) const;
 
@@ -101,7 +94,7 @@ public:
         //- Access boundary absorptivity on patch
         tmp<scalarField> absorptivity
         (
-            const label patchId,
+            const label patchI,
             const label bandI = 0
         ) const;
 
@@ -109,27 +102,23 @@ public:
         //- Access boundary transmissivity on patch
         tmp<scalarField> transmissivity
         (
-            const label patchId,
+            const label patchI,
             const label bandI = 0
         ) const;
 
         //- Access boundary reflectivity on patch
         tmp<scalarField> reflectivity
         (
-            const label patchId,
+            const label patchI,
             const label bandI = 0
         ) const;
 
 
-        //- Access to radBoundaryProperties
-        const volScalarField& radBoundaryProperties() const;
-
-
     //- Destructor
     virtual ~boundaryRadiationProperties();
-
 };
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 } // End namespace radiation
diff --git a/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C b/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C
index 08abcf2853a29b8b077694c9e9834f00d55ab1a0..cc712b4cb244449767e46ea3ba70a1e80d5fd033 100644
--- a/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C
+++ b/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C
@@ -123,7 +123,7 @@ void Foam::solarCalculator::calculateSunDirection()
 
     coord_.reset
     (
-        new coordinateSystem("grid", vector::zero, gridUp_, eastDir_)
+        new coordinateSystem("grid", Zero, gridUp_, eastDir_)
     );
 
     direction_.z() = -sin(beta_);
@@ -236,7 +236,7 @@ Foam::solarCalculator::solarCalculator
 :
     mesh_(mesh),
     dict_(dict),
-    direction_(vector::zero),
+    direction_(Zero),
     directSolarRad_(0.0),
     diffuseSolarRad_(0.0),
     groundReflectivity_(0.0),
diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C
index 444fd6c6495b1eea9aa1499dcc390417912b4138..6e60dece1bb70c429810bad4405e9489b5852648 100644
--- a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C
+++ b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ Foam::radiation::mixtureFractionSoot<ThermoType>::checkThermo
     const fluidThermo& thermo
 )
 {
-    if (isA<singleStepReactingMixture<ThermoType> >(thermo))
+    if (isA<singleStepReactingMixture<ThermoType>>(thermo))
     {
         return dynamic_cast<const singleStepReactingMixture<ThermoType>& >
         (
diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.H b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.H
index 6c8eb065cb3292a51d293a6c0e7bcf97392840cb..ca65aca1d10e7dfcbfc53dc77b9cf65a892583a1 100644
--- a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.H
+++ b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -169,7 +169,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "mixtureFractionSoot.C"
+    #include "mixtureFractionSoot.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/makeSootTypes.H b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/makeSootTypes.H
index 4676b5efe73818b747da72758b19bf35c6e1a2bf..3a54e2246efbfa2e3243e3b00fc94f5e58a3b9a9 100644
--- a/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/makeSootTypes.H
+++ b/src/thermophysicalModels/radiation/submodels/sootModel/sootModel/makeSootTypes.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -31,30 +31,30 @@ License
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSootTypesThermo(sootModelType, Thermo)                            \
-    typedef Foam::radiation::sootModelType<Foam::Thermo>                      \
-        sootModelType##Thermo;                                                \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        sootModelType##Thermo,                                                \
-        #sootModelType"<"#Thermo">",                                          \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    namespace Foam                                                            \
-    {                                                                         \
-        namespace radiation                                                   \
-        {                                                                     \
-            typedef sootModelType<Thermo> sootModelType##Thermo;              \
-                                                                              \
-            addToRunTimeSelectionTable                                        \
-            (                                                                 \
-                sootModel,                                                    \
-                sootModelType##Thermo,                                        \
-                dictionary                                                    \
-            );                                                                \
-        }                                                                     \
+#define makeSootTypesThermo(sootModelType, Thermo)                             \
+    typedef Foam::radiation::sootModelType<Foam::Thermo>                       \
+        sootModelType##Thermo;                                                 \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        sootModelType##Thermo,                                                 \
+        #sootModelType"<"#Thermo">",                                           \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    namespace Foam                                                             \
+    {                                                                          \
+        namespace radiation                                                    \
+        {                                                                      \
+            typedef sootModelType<Thermo> sootModelType##Thermo;               \
+                                                                               \
+            addToRunTimeSelectionTable                                         \
+            (                                                                  \
+                sootModel,                                                     \
+                sootModelType##Thermo,                                         \
+                dictionary                                                     \
+            );                                                                 \
+        }                                                                      \
     }
 
 
diff --git a/src/thermophysicalModels/reactionThermo/Make/files b/src/thermophysicalModels/reactionThermo/Make/files
index 57f14fc0d1fdc57d397585523cc8a404d65cb7da..8870103dfe05d72dc41520b0d43172d771f9103e 100644
--- a/src/thermophysicalModels/reactionThermo/Make/files
+++ b/src/thermophysicalModels/reactionThermo/Make/files
@@ -19,4 +19,6 @@ derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField
 derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C
 derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C
 
+functionObjects/moleFractions/moleFractionsFunctionObjects.C
+
 LIB = $(FOAM_LIBBIN)/libreactionThermophysicalModels
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C
index 54ac871cf8b100d7c8e1e66e452aae674811d3f9..22c5f63f0b188eaf0ada05045d6183a80dd1610f 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ License
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 template<class ThermoType>
-Foam::autoPtr<Foam::chemistryReader<ThermoType> >
+Foam::autoPtr<Foam::chemistryReader<ThermoType>>
 Foam::chemistryReader<ThermoType>::New
 (
     const dictionary& thermoDict,
@@ -57,7 +57,7 @@ Foam::chemistryReader<ThermoType>::New
             << exit(FatalError);
     }
 
-    return autoPtr<chemistryReader<ThermoType> >
+    return autoPtr<chemistryReader<ThermoType>>
     (
         cstrIter()(thermoDict, species)
     );
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.H
index 13313b9772c9d5788f7b895e0ff2a60ed5288789..f298f1b9b7c6768653f6fd570c11c301c910b79a 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.H
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -127,35 +127,35 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "chemistryReader.C"
+    #include "chemistryReader.C"
 #endif
 
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 
-#define makeChemistryReader(Thermo)                                           \
-    defineTemplateTypeNameAndDebug(chemistryReader<Thermo>, 0);               \
+#define makeChemistryReader(Thermo)                                            \
+    defineTemplateTypeNameAndDebug(chemistryReader<Thermo>, 0);                \
     defineTemplateRunTimeSelectionTable(chemistryReader<Thermo>, dictionary)
 
 
-#define makeChemistryReaderType(Reader, Thermo)                               \
-    defineNamedTemplateTypeNameAndDebug(Reader<Thermo>, 0);                   \
-    chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader<Thermo> > \
+#define makeChemistryReaderType(Reader, Thermo)                                \
+    defineNamedTemplateTypeNameAndDebug(Reader<Thermo>, 0);                    \
+    chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader<Thermo>> \
         add##Reader##Thermo##ConstructorToTable_
 
 
 // for non-templated chemistry readers
-#define addChemistryReaderType(Reader, Thermo)                                \
-    defineTypeNameAndDebug(Reader, 0);                                        \
-    chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader>          \
+#define addChemistryReaderType(Reader, Thermo)                                 \
+    defineTypeNameAndDebug(Reader, 0);                                         \
+    chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader>           \
         add##Reader##Thermo##ConstructorToTable_
 
 
 // for templated chemistry readers
-#define addTemplateChemistryReaderType(Reader, Thermo)                        \
-    defineNamedTemplateTypeNameAndDebug(Reader, 0);                           \
-    chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader>          \
+#define addTemplateChemistryReaderType(Reader, Thermo)                         \
+    defineNamedTemplateTypeNameAndDebug(Reader, 0);                            \
+    chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader>           \
         add##Reader##Thermo##ConstructorToTable_
 
 
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
index 1c8af0b1235393d544c82ef8bd19772496d41607..318cd7ab4974acedb50dea548348a09232305de9 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ int yyFlexLexer::yylex()
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
 //! \cond dummy
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
@@ -547,7 +547,7 @@ bool finishReaction = false;
 
         currentSpecieComposition.setSize(nSpecieElements);
 
-        HashTable<List<specieElement> >::iterator specieCompositionIter
+        HashTable<List<specieElement>>::iterator specieCompositionIter
         (
             specieComposition_.find(currentSpecieName)
         );
@@ -631,7 +631,7 @@ bool finishReaction = false;
             currentSpecieName,
             new gasHThermoPhysics
             (
-                janafThermo<perfectGas<specie> >
+                janafThermo<perfectGas<specie>>
                 (
                     specie
                     (
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H
index 74ee5512dac350ad37d17066f85b13794e38f953..916c8c06f8b435f9b02c3f181ea62668ff452cc8 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -203,7 +203,7 @@ private:
         HashPtrTable<gasHThermoPhysics> speciesThermo_;
 
         //- Table of species composition
-        HashTable<List<specieElement> > specieComposition_;
+        HashTable<List<specieElement>> specieComposition_;
 
         //- List of the reactions
         ReactionList<gasHThermoPhysics> reactions_;
@@ -382,7 +382,7 @@ public:
         }
 
         //- Table of species composition
-        const HashTable<List<specieElement> >& specieComposition() const
+        const HashTable<List<specieElement>>& specieComposition() const
         {
             return specieComposition_;
         }
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.H
index 925692dc7aa4d90018647610f4e5f7165604635c..16046fd29cdb107b0491f07193cf09b50018864c 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.H
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/foamChemistryReader/foamChemistryReader.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -144,7 +144,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "foamChemistryReader.C"
+    #include "foamChemistryReader.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C
index 11cbf9ff78a1458f475c63b7a3876deaaee32db3..1d058ed2ad66323f8f1cf660946469e94d13eae3 100644
--- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C
+++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C
@@ -1,33 +1,33 @@
- /*---------------------------------------------------------------------------*\
-   =========                 |
-   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-    \\    /   O peration     |
-     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-      \\/     M anipulation  |
- -------------------------------------------------------------------------------
- License
-     This file is part of OpenFOAM.
-
-     OpenFOAM is free software: you can redistribute it and/or modify it
-     under the terms of the GNU General Public License as published by
-     the Free Software Foundation, either version 3 of the License, or
-     (at your option) any later version.
-
-     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-     for more details.
-
-     You should have received a copy of the GNU General Public License
-     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-
- \*---------------------------------------------------------------------------*/
-
- #include "mixedUnburntEnthalpyFvPatchScalarField.H"
- #include "addToRunTimeSelectionTable.H"
- #include "fvPatchFieldMapper.H"
- #include "volFields.H"
- #include "psiuReactionThermo.H"
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "mixedUnburntEnthalpyFvPatchScalarField.H"
+#include "addToRunTimeSelectionTable.H"
+#include "fvPatchFieldMapper.H"
+#include "volFields.H"
+#include "psiuReactionThermo.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
diff --git a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C
new file mode 100644
index 0000000000000000000000000000000000000000..4ae994033c9a6a8f788c688394449032203e822e
--- /dev/null
+++ b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C
@@ -0,0 +1,144 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "moleFractions.H"
+#include "basicThermo.H"
+
+// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+
+template<class ThermoType>
+void Foam::moleFractions<ThermoType>::calculateMoleFractions()
+{
+    const ThermoType& thermo =
+        mesh_.lookupObject<ThermoType>(basicThermo::dictName);
+
+    const PtrList<volScalarField>& Y = thermo.composition().Y();
+
+    const volScalarField W(thermo.composition().W());
+
+    forAll(Y, i)
+    {
+        X_[i] = W*Y[i]/thermo.composition().W(i);
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class ThermoType>
+Foam::moleFractions<ThermoType>::moleFractions
+(
+    const word& name,
+    const objectRegistry& obr,
+    const dictionary& dict,
+    const bool loadFromFiles
+)
+:
+    functionObjectFile(obr, name),
+    name_(name),
+    mesh_(refCast<const fvMesh>(obr))
+{
+    if (mesh_.foundObject<ThermoType>(basicThermo::dictName))
+    {
+        const ThermoType& thermo =
+            mesh_.lookupObject<ThermoType>(basicThermo::dictName);
+
+        const PtrList<volScalarField>& Y = thermo.composition().Y();
+
+        X_.setSize(Y.size());
+
+        forAll(Y, i)
+        {
+            X_.set
+            (
+                i,
+                new volScalarField
+                (
+                    IOobject
+                    (
+                        "X_" + Y[i].name(),
+                        mesh_.time().timeName(),
+                        mesh_,
+                        IOobject::NO_READ,
+                        IOobject::AUTO_WRITE
+                    ),
+                    mesh_,
+                    dimensionedScalar("X", dimless, 0)
+                )
+            );
+        }
+
+        calculateMoleFractions();
+    }
+    else
+    {
+        FatalErrorInFunction
+            << "Cannot find thermodynamics model of type "
+            << ThermoType::typeName
+            << exit(FatalError);
+    }
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+template<class ThermoType>
+Foam::moleFractions<ThermoType>::~moleFractions()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class ThermoType>
+void Foam::moleFractions<ThermoType>::read
+(
+    const dictionary& dict
+)
+{}
+
+
+template<class ThermoType>
+void Foam::moleFractions<ThermoType>::execute()
+{
+    calculateMoleFractions();
+}
+
+
+template<class ThermoType>
+void Foam::moleFractions<ThermoType>::end()
+{}
+
+
+template<class ThermoType>
+void Foam::moleFractions<ThermoType>::timeSet()
+{}
+
+
+template<class ThermoType>
+void Foam::moleFractions<ThermoType>::write()
+{}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.H b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.H
new file mode 100644
index 0000000000000000000000000000000000000000..fa158e47545468317f002fd17819cf6109968418
--- /dev/null
+++ b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.H
@@ -0,0 +1,174 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::moleFractions
+
+Description
+    This function object calculates mole-fraction fields from the mass-fraction
+    fields of the psi/rhoReactionThermo and caches them for output and further
+    post-processing.
+
+    The names of the mole-fraction fields are obtained from the corresponding
+    mass-fraction fields prepended by "X_"
+
+    Example of function object specification:
+    \verbatim
+    moleFractions
+    {
+        type psiReactionThermoMoleFractions;
+    }
+    \endverbatim
+    or
+    \verbatim
+    moleFractions
+    {
+        type rhoReactionThermoMoleFractions;
+    }
+    \endverbatim
+    depending on the thermodynamics package used in the solver.
+
+SeeAlso
+    Foam::functionObject
+    Foam::OutputFilterFunctionObject
+
+SourceFiles
+    moleFractions.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef moleFractions_H
+#define moleFractions_H
+
+#include "functionObjectFile.H"
+#include "volFields.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                    Class moleFractions Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class ThermoType>
+class moleFractions
+:
+    public functionObjectFile
+{
+    // Private data
+
+        //- Name of moleFractions functionObject
+        word name_;
+
+        //- Reference to the mesh
+        const fvMesh& mesh_;
+
+        //- Species mole fractions
+        PtrList<volScalarField> X_;
+
+
+    // Private Member Functions
+
+        //- Calculate the mole fraction fields
+        virtual void calculateMoleFractions();
+
+        //- Disallow default bitwise copy construct
+        moleFractions(const moleFractions&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const moleFractions&);
+
+
+public:
+
+    //- Runtime type information
+    TypeName("moleFractions");
+
+
+    // Constructors
+
+        //- Construct for given objectRegistry and dictionary.
+        //  Allow the possibility to load fields from files
+        moleFractions
+        (
+            const word& name,
+            const objectRegistry&,
+            const dictionary&,
+            const bool loadFromFiles = false
+        );
+
+
+    //- Destructor
+    virtual ~moleFractions();
+
+
+    // Member Functions
+
+        //- Return name of the moleFractions functionObject
+        virtual const word& name() const
+        {
+            return name_;
+        }
+
+        //- Read the moleFractions data
+        virtual void read(const dictionary&);
+
+        //- Execute, currently does nothing
+        virtual void execute();
+
+        //- Execute at the final time-loop, currently does nothing
+        virtual void end();
+
+        //- Called when time was set at the end of the Time::operator++
+        virtual void timeSet();
+
+        //- Calculate the moleFractions and write
+        virtual void write();
+
+        //- Update for changes of mesh
+        virtual void updateMesh(const mapPolyMesh&)
+        {}
+
+        //- Update for changes of mesh
+        virtual void movePoints(const polyMesh&)
+        {}
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+    #include "moleFractions.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractionsFunctionObjects.C b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractionsFunctionObjects.C
new file mode 100644
index 0000000000000000000000000000000000000000..09c5a1d8cceade58d1519d6c787bf0f7e59f3c28
--- /dev/null
+++ b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractionsFunctionObjects.C
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "moleFractionsFunctionObjects.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    defineTemplateTypeNameAndDebugWithName
+    (
+        moleFractions<psiReactionThermo>,
+        "psiReactionThermoMoleFractions",
+        0
+    );
+
+    defineTemplateTypeNameAndDebugWithName
+    (
+        psiReactionThermoMoleFractionsFunctionObject,
+        "psiReactionThermoMoleFractions",
+        0
+    );
+
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        psiReactionThermoMoleFractionsFunctionObject,
+        dictionary
+    );
+
+    defineTemplateTypeNameAndDebugWithName
+    (
+        moleFractions<rhoReactionThermo>,
+        "rhoReactionThermoMoleFractions",
+        0
+    );
+
+    defineTemplateTypeNameAndDebugWithName
+    (
+        rhoReactionThermoMoleFractionsFunctionObject,
+        "rhoReactionThermoMoleFractions",
+        0
+    );
+
+    addToRunTimeSelectionTable
+    (
+        functionObject,
+        rhoReactionThermoMoleFractionsFunctionObject,
+        dictionary
+    );
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractionsFunctionObjects.H b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractionsFunctionObjects.H
new file mode 100644
index 0000000000000000000000000000000000000000..21092bba3b4b0540f1382a52f4ad5f18ddd85a87
--- /dev/null
+++ b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractionsFunctionObjects.H
@@ -0,0 +1,61 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Typedef
+    Foam::moleFractionsFunctionObject
+
+Description
+    FunctionObject wrapper around moleFractions to allow
+    it to be created via the functions entry within controlDict.
+
+SourceFiles
+    moleFractionsFunctionObjects.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef moleFractionsFunctionObjects_H
+#define moleFractionsFunctionObjects_H
+
+#include "OutputFilterFunctionObject.H"
+#include "moleFractions.H"
+#include "psiReactionThermo.H"
+#include "rhoReactionThermo.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    typedef OutputFilterFunctionObject<moleFractions<psiReactionThermo>>
+        psiReactionThermoMoleFractionsFunctionObject;
+
+
+    typedef OutputFilterFunctionObject<moleFractions<rhoReactionThermo>>
+        rhoReactionThermoMoleFractionsFunctionObject;
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/SpecieMixture/SpecieMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/SpecieMixture/SpecieMixture.H
index 533caad0bfaed6531e9857de3e73f876bba5a0b3..24f95915abf5bdf57fd1e42b441b8f156c7c3e4d 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/SpecieMixture/SpecieMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/SpecieMixture/SpecieMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -232,7 +232,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "SpecieMixture.C"
+    #include "SpecieMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C
index d9062e03f496fcc56644b54e20990b137b9d7898..a3643c0d30b0dab0da6dbeacde183afadbb5d939 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C
+++ b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -68,7 +68,7 @@ Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::W() const
         )
     );
 
-    volScalarField& rW = trW();
+    volScalarField& rW = trW.ref();
 
     forAll(Y, i)
     {
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H
index 808d08b79d2125632637e737f910673f3a66669b..fa81aa92e1464a1e5e9806da48139bd8cc1492da 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -180,7 +180,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "egrMixture.C"
+    #include "egrMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H
index 17e907574f64040f10a500a9de79985983a819a1..31915735d163f002bacf9a9e2df24506d4c9eba4 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -138,7 +138,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "homogeneousMixture.C"
+    #include "homogeneousMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H
index 78f33cd99aa40eb89f40128904686cef1518b4ee..ef9284dde8d525759c39e1a52c866848cb5f78f9 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -169,7 +169,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "inhomogeneousMixture.C"
+    #include "inhomogeneousMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H
index 61c9d59ee6e0517dff80f58fe3e0263ebf0f75ff..eaf395a91e94d075d51a9ff71b7fd220841ae59d 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -155,7 +155,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "multiComponentMixture.C"
+    #include "multiComponentMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.C
index 595487e2e14f688c8f360e467525f0b6cbf011bc..1f726fcdd6a04677b9f7acedda099aceb9bc1318 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.C
+++ b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,7 +37,7 @@ Foam::reactingMixture<ThermoType>::reactingMixture
 )
 :
     speciesTable(),
-    autoPtr<chemistryReader<ThermoType> >
+    autoPtr<chemistryReader<ThermoType>>
     (
         chemistryReader<ThermoType>::New(thermoDict, *this)
     ),
@@ -45,16 +45,16 @@ Foam::reactingMixture<ThermoType>::reactingMixture
     (
         thermoDict,
         *this,
-        autoPtr<chemistryReader<ThermoType> >::operator()().speciesThermo(),
+        autoPtr<chemistryReader<ThermoType>>::operator()().speciesThermo(),
         mesh,
         phaseName
     ),
-    PtrList<Reaction<ThermoType> >
+    PtrList<Reaction<ThermoType>>
     (
-        autoPtr<chemistryReader<ThermoType> >::operator()().reactions()
+        autoPtr<chemistryReader<ThermoType>>::operator()().reactions()
     )
 {
-    autoPtr<chemistryReader<ThermoType> >::clear();
+    autoPtr<chemistryReader<ThermoType>>::clear();
 }
 
 
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H
index 944828b6274d640a7aa50725b36b291ac80d1872..5261eb726ed481f596c044c63b65f6b83d7baf0c 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -52,9 +52,9 @@ template<class ThermoType>
 class reactingMixture
 :
     public speciesTable,
-    public autoPtr<chemistryReader<ThermoType> >,
+    public autoPtr<chemistryReader<ThermoType>>,
     public multiComponentMixture<ThermoType>,
-    public PtrList<Reaction<ThermoType> >
+    public PtrList<Reaction<ThermoType>>
 {
     // Private Member Functions
 
@@ -89,17 +89,17 @@ public:
 
         label size() const
         {
-            return PtrList<Reaction<ThermoType> >::size();
+            return PtrList<Reaction<ThermoType>>::size();
         }
 
         Reaction<ThermoType>& operator [] (const label i)
         {
-            return PtrList<Reaction<ThermoType> >::operator[](i);
+            return PtrList<Reaction<ThermoType>>::operator[](i);
         }
 
         const Reaction<ThermoType>& operator [] (const label i) const
         {
-            return PtrList<Reaction<ThermoType> >::operator[](i);
+            return PtrList<Reaction<ThermoType>>::operator[](i);
         }
 };
 
@@ -111,7 +111,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "reactingMixture.C"
+    #include "reactingMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C
index f090b17b5ef5d0326a4a61a695662d49d035f0d3..3dea24f248b707ef7e12a6468db52389987a2905 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C
+++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -237,7 +237,7 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture
 
         calculateMaxProducts();
 
-        autoPtr<chemistryReader<ThermoType> >::clear();
+        autoPtr<chemistryReader<ThermoType>>::clear();
     }
     else
     {
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H
index 2e9f32768067db64463a7876366ed2810bb4cf02..b5a4a90fbf1ffcca76d3b38152b4f97a9d7cefe4 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -87,12 +87,6 @@ protected:
 
     // Protected member functions
 
-        //- Disallow default bitwise copy construct
-        singleStepReactingMixture(const singleStepReactingMixture&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const singleStepReactingMixture&);
-
         //- Calculate qFuel
         void calculateqFuel();
 
@@ -103,6 +97,17 @@ protected:
         void calculateMaxProducts();
 
 
+private:
+
+    // Private member functions
+
+        //- Disallow default bitwise copy construct
+        singleStepReactingMixture(const singleStepReactingMixture&);
+
+        //- Disallow default bitwise assignment
+        void operator=(const singleStepReactingMixture&);
+
+
 public:
 
     //- The type of thermo package this mixture is instantiated for
@@ -179,7 +184,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "singleStepReactingMixture.C"
+    #include "singleStepReactingMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H
index 9748acdb2b3f2cc42f501c949712450c46ac321e..2e852b80c1c8d9c476927c565400851b9e43439e 100644
--- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H
+++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -175,7 +175,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "veryInhomogeneousMixture.C"
+    #include "veryInhomogeneousMixture.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
index 982446ccb11bbedfe5323f644b6f55329a3474da..5f963582dca0695fd8f13e1058cf774a240817f3 100644
--- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
+++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -204,8 +204,7 @@ void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()
 {
     if (debug)
     {
-        Info<< "entering heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()"
-            << endl;
+        InfoInFunction << endl;
     }
 
     // force the saving of the old-time values
@@ -215,8 +214,7 @@ void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()
 
     if (debug)
     {
-        Info<< "exiting heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()"
-            << endl;
+        Info<< "    Finished" << endl;
     }
 }
 
@@ -231,7 +229,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
 ) const
 {
     tmp<scalarField> theu(new scalarField(Tu.size()));
-    scalarField& heu = theu();
+    scalarField& heu = theu.ref();
 
     forAll(Tu, celli)
     {
@@ -252,7 +250,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
 ) const
 {
     tmp<scalarField> theu(new scalarField(Tu.size()));
-    scalarField& heu = theu();
+    scalarField& heu = theu.ref();
 
     forAll(Tu, facei)
     {
@@ -285,7 +283,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::Tb() const
         )
     );
 
-    volScalarField& Tb_ = tTb();
+    volScalarField& Tb_ = tTb.ref();
     scalarField& TbCells = Tb_.internalField();
     const scalarField& pCells = this->p_.internalField();
     const scalarField& TCells = this->T_.internalField();
@@ -343,7 +341,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psiu() const
         )
     );
 
-    volScalarField& psiu = tpsiu();
+    volScalarField& psiu = tpsiu.ref();
     scalarField& psiuCells = psiu.internalField();
     const scalarField& TuCells = this->Tu_.internalField();
     const scalarField& pCells = this->p_.internalField();
@@ -395,7 +393,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psib() const
         )
     );
 
-    volScalarField& psib = tpsib();
+    volScalarField& psib = tpsib.ref();
     scalarField& psibCells = psib.internalField();
     const volScalarField Tb_(Tb());
     const scalarField& TbCells = Tb_.internalField();
@@ -448,7 +446,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::muu() const
         )
     );
 
-    volScalarField& muu_ = tmuu();
+    volScalarField& muu_ = tmuu.ref();
     scalarField& muuCells = muu_.internalField();
     const scalarField& pCells = this->p_.internalField();
     const scalarField& TuCells = this->Tu_.internalField();
@@ -504,7 +502,7 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::mub() const
         )
     );
 
-    volScalarField& mub_ = tmub();
+    volScalarField& mub_ = tmub.ref();
     scalarField& mubCells = mub_.internalField();
     const volScalarField Tb_(Tb());
     const scalarField& pCells = this->p_.internalField();
diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.H b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.H
index 4c52e775ed7464e172aa84e0de90a55b49a57e98..725ce90e3a8aaa568a1ef1a5f3fe390dd5982a52 100644
--- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.H
+++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 #ifdef NoRepository
-#   include "heheuPsiThermo.C"
+    #include "heheuPsiThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.C
index fb397d9b9dd9d303741085482b89cae227c9f7f2..8d6899d49509701df454ec31bbb3781f78640116 100644
--- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.C
+++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -77,7 +77,7 @@ Foam::basicSolidChemistryModel::RR(const label i)
 }
 
 
-Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::basicSolidChemistryModel::calculateRR
 (
     const label reactionI,
@@ -86,7 +86,7 @@ Foam::basicSolidChemistryModel::calculateRR
 {
     NotImplemented;
 
-    return dynamic_cast<tmp<DimensionedField<scalar, volMesh> >&>
+    return dynamic_cast<tmp<DimensionedField<scalar, volMesh>>&>
     (
         const_cast<DimensionedField<scalar, volMesh>& >
         (
diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H
index 7ee840c4412586045a07746bd99eca9f21daf8f0..0cb1ee1444f634d55a3ca7b04a4a4eaf3a70af43 100644
--- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H
+++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,10 +120,10 @@ public:
         inline const solidReactionThermo& solidThermo() const;
 
         //- Return total gases mass source term [kg/m3/s]
-        virtual tmp<DimensionedField<scalar, volMesh> > RRg() const = 0;
+        virtual tmp<DimensionedField<scalar, volMesh>> RRg() const = 0;
 
         //- Return total solids mass source term [kg/m3/s]
-        virtual tmp<DimensionedField<scalar, volMesh> > RRs() const = 0;
+        virtual tmp<DimensionedField<scalar, volMesh>> RRs() const = 0;
 
         //- Return chemical source terms for solids [kg/m3/s]
         virtual const DimensionedField<scalar, volMesh>& RRs
@@ -138,7 +138,7 @@ public:
         ) const = 0;
 
         //- Returns the reaction rate of the speciei in reactionI
-        virtual tmp<DimensionedField<scalar, volMesh> > calculateRR
+        virtual tmp<DimensionedField<scalar, volMesh>> calculateRR
         (
             const label reactionI,
             const label speciei
diff --git a/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H
index 912c44ef95bd20ffc81b58700b47c65aae86dd0c..1a025f5d1ed844ca91817f21a26f753859130ba1 100644
--- a/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H
+++ b/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -34,31 +34,31 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSolidChemistryModel(sChemistry, SS, Comp, SThermo)                \
-                                                                              \
-    typedef Foam::sChemistry<Foam::Comp, Foam::SThermo>                       \
-        sChemistry##Comp##SThermo;                                            \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        sChemistry##Comp##SThermo,                                            \
-        (Foam::word(sChemistry##Comp##SThermo::typeName_()) + "<"#Comp","     \
-        + SThermo::typeName() + ">").c_str(),                                 \
-        0                                                                     \
+#define makeSolidChemistryModel(sChemistry, SS, Comp, SThermo)                 \
+                                                                               \
+    typedef Foam::sChemistry<Foam::Comp, Foam::SThermo>                        \
+        sChemistry##Comp##SThermo;                                             \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        sChemistry##Comp##SThermo,                                             \
+        (Foam::word(sChemistry##Comp##SThermo::typeName_()) + "<"#Comp","      \
+        + SThermo::typeName() + ">").c_str(),                                  \
+        0                                                                      \
     );
 
 
-#define makeSolidGasChemistryModel(sChemistry, SS, Comp, SThermo, GThermo)    \
-                                                                              \
-    typedef Foam::SS<Foam::Comp, Foam::SThermo, Foam::GThermo>                \
-        SS##Comp##SThermo##GThermo;                                           \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        SS##Comp##SThermo##GThermo,                                           \
-        (Foam::word(SS##Comp##SThermo##GThermo::typeName_()) + "<"#Comp","    \
-        + SThermo::typeName() + "," + GThermo::typeName() + ">").c_str(),     \
-        0                                                                     \
+#define makeSolidGasChemistryModel(sChemistry, SS, Comp, SThermo, GThermo)     \
+                                                                               \
+    typedef Foam::SS<Foam::Comp, Foam::SThermo, Foam::GThermo>                 \
+        SS##Comp##SThermo##GThermo;                                            \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        SS##Comp##SThermo##GThermo,                                            \
+        (Foam::word(SS##Comp##SThermo##GThermo::typeName_()) + "<"#Comp","     \
+        + SThermo::typeName() + "," + GThermo::typeName() + ">").c_str(),      \
+        0                                                                      \
     );
 
 
diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C
index 2009e5262306a8bc75311d3357147c6d67f4bda5..1775ecd1dbc0c8d950c7eb1ed8b49df6337f4fc4 100644
--- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C
+++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -363,7 +363,7 @@ jacobian
     {
         for (label j=0; j<nEqns(); j++)
         {
-            dfdc[i][j] = 0.0;
+            dfdc(i, j) = 0.0;
         }
     }
 
@@ -619,7 +619,6 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::gasHs
     const label index
 ) const
 {
-
     tmp<volScalarField> tHs
     (
         new volScalarField
@@ -634,12 +633,11 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::gasHs
                 false
             ),
             this->mesh_,
-            dimensionedScalar("zero", dimEnergy/dimMass, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimEnergy/dimMass, 0.0)
         )
     );
 
-    volScalarField::InternalField& gasHs = tHs().internalField();
+    volScalarField::InternalField& gasHs = tHs.ref().internalField();
 
     const GasThermo& mixture = gasThermo_[index];
 
@@ -664,4 +662,6 @@ void Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::solve
 {
     NotImplemented;
 }
+
+
 // ************************************************************************* //
diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H
index 26dd830152acd32b1c08555b44fe4214743895d1..c9d2a89fe1ebe4c893064557fdcb76568da316de 100644
--- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H
+++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -79,13 +79,13 @@ protected:
         label nSpecie_;
 
         //- List of reaction rate per gas [kg/m3/s]
-        PtrList<DimensionedField<scalar, volMesh> > RRg_;
+        PtrList<DimensionedField<scalar, volMesh>> RRg_;
 
 
     // Protected Member Functions
 
         //- Write access to source terms for gases
-        inline PtrList<DimensionedField<scalar, volMesh> >& RRg();
+        inline PtrList<DimensionedField<scalar, volMesh>>& RRg();
 
 
 private:
@@ -186,7 +186,7 @@ public:
             ) const;
 
             //- Return total gas source term
-            inline tmp<DimensionedField<scalar, volMesh> > RRg() const;
+            inline tmp<DimensionedField<scalar, volMesh>> RRg() const;
 
             //- Return sensible enthalpy for gas i [J/Kg]
             virtual tmp<volScalarField> gasHs
@@ -238,12 +238,12 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "pyrolysisChemistryModelI.H"
+    #include "pyrolysisChemistryModelI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "pyrolysisChemistryModel.C"
+    #include "pyrolysisChemistryModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H
index b2d8b16e86136de80cf7843476c21ca6198a7f26..b14770004d1877946205549c95c4e29ddcf9ba34 100644
--- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H
+++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -29,7 +29,7 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class CompType, class SolidThermo, class GasThermo>
-inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
+inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>&
 Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::RRg()
 {
     return RRg_;
@@ -75,11 +75,11 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::RRg
 
 
 template<class CompType, class SolidThermo, class GasThermo>
-inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::
 RRg() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tRRg
+    tmp<DimensionedField<scalar, volMesh>> tRRg
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -98,12 +98,15 @@ RRg() const
 
     if (this->chemistry_)
     {
-        DimensionedField<scalar, volMesh>& RRg = tRRg();
+        DimensionedField<scalar, volMesh>& RRg = tRRg.ref();
         for (label i=0; i < nGases_; i++)
         {
             RRg += RRg_[i];
         }
     }
+
     return tRRg;
 }
+
+
 // ************************************************************************* //
diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C
index e39f1f63524fabd78932651c62d3810b142f9af3..8bf5ea932099bfa68411db0522d00f5058258700 100644
--- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C
+++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,7 +25,6 @@ License
 
 #include "solidChemistryModel.H"
 #include "reactingMixture.H"
-#include "zeroGradientFvPatchFields.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -131,14 +130,13 @@ Foam::solidChemistryModel<CompType, SolidThermo>::Sh() const
                 false
             ),
             this->mesh_,
-            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
         )
     );
 
     if (this->chemistry_)
     {
-        scalarField& Sh = tSh();
+        scalarField& Sh = tSh.ref();
 
         forAll(Ys_, i)
         {
@@ -172,14 +170,13 @@ Foam::solidChemistryModel<CompType, SolidThermo>::dQ() const
                 false
             ),
             this->mesh_,
-            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0),
-            zeroGradientFvPatchScalarField::typeName
+            dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
         )
     );
 
     if (this->chemistry_)
     {
-        volScalarField& dQ = tdQ();
+        volScalarField& dQ = tdQ.ref();
         dQ.dimensionedInternalField() = this->mesh_.V()*Sh()();
     }
 
diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H
index 17bde2bfbb19546b7897094c8d7bb9aa2dfccad3..f762114fbf751ae0eab3b8dcf3207b28d35a2532 100644
--- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H
+++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -78,7 +78,7 @@ protected:
         PtrList<volScalarField>& Ys_;
 
         //- Reactions
-        const PtrList<Reaction<SolidThermo> >& reactions_;
+        const PtrList<Reaction<SolidThermo>>& reactions_;
 
         //- Thermodynamic data of solids
         const PtrList<SolidThermo>& solidThermo_;
@@ -90,7 +90,7 @@ protected:
         label nReaction_;
 
         //- List of reaction rate per solid [kg/m3/s]
-        PtrList<DimensionedField<scalar, volMesh> > RRs_;
+        PtrList<DimensionedField<scalar, volMesh>> RRs_;
 
         //- List of active reacting cells
         List<bool> reactingCells_;
@@ -99,7 +99,7 @@ protected:
     // Protected Member Functions
 
         //- Write access to source terms for solids
-        inline PtrList<DimensionedField<scalar, volMesh> >& RRs();
+        inline PtrList<DimensionedField<scalar, volMesh>>& RRs();
 
         //- Set reacting status of cell, cellI
         void setCellReacting(const label cellI, const bool active);
@@ -124,7 +124,7 @@ public:
     // Member Functions
 
         //- The reactions
-        inline const PtrList<Reaction<SolidThermo> >& reactions() const;
+        inline const PtrList<Reaction<SolidThermo>>& reactions() const;
 
         //- The number of reactions
         inline label nReaction() const;
@@ -185,7 +185,7 @@ public:
             ) const;
 
             //- Return total solid source term
-            inline tmp<DimensionedField<scalar, volMesh> > RRs() const;
+            inline tmp<DimensionedField<scalar, volMesh>> RRs() const;
 
             //- Solve the reaction system for the given time step
             //  and return the characteristic time
@@ -242,12 +242,12 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#   include "solidChemistryModelI.H"
+    #include "solidChemistryModelI.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "solidChemistryModel.C"
+    #include "solidChemistryModel.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H
index f2d0dad79ab58e027031889248da0c99f4704f09..43a343b5f87196302ea376ef770a21a7510a52cd 100644
--- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H
+++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,14 +28,14 @@ License
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 template<class CompType, class SolidThermo>
-inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
+inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>&
 Foam::solidChemistryModel<CompType, SolidThermo>::RRs()
 {
     return RRs_;
 }
 
 template<class CompType, class SolidThermo>
-inline const Foam::PtrList<Foam::Reaction<SolidThermo> >&
+inline const Foam::PtrList<Foam::Reaction<SolidThermo>>&
 Foam::solidChemistryModel<CompType, SolidThermo>::reactions() const
 {
     return reactions_;
@@ -63,10 +63,10 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRs
 
 
 template<class CompType, class SolidThermo>
-inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
+inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
 Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const
 {
-    tmp<DimensionedField<scalar, volMesh> > tRRs
+    tmp<DimensionedField<scalar, volMesh>> tRRs
     (
         new DimensionedField<scalar, volMesh>
         (
@@ -85,7 +85,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const
 
     if (this->chemistry_)
     {
-        DimensionedField<scalar, volMesh>& RRs = tRRs();
+        DimensionedField<scalar, volMesh>& RRs = tRRs.ref();
         for (label i=0; i < nSolids_; i++)
         {
             RRs += RRs_[i];
diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H
index 865b41435d743c5f85a45788df5f850fc9359eb9..0a888421cd53d74c848b47aad97cb62c5b720149 100644
--- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H
+++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -43,46 +43,46 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSolidChemistrySolverType(SS, Schem, Comp, SThermo, GThermo)       \
-                                                                              \
-    typedef SS<Schem<Comp, SThermo, GThermo> >                                \
-        SS##Schem##Comp##SThermo##GThermo;                                    \
-                                                                              \
-    defineTemplateTypeNameAndDebugWithName                                    \
-    (                                                                         \
-        SS##Schem##Comp##SThermo##GThermo,                                    \
-        (#SS"<" + word(Schem<Comp, SThermo, GThermo>::typeName_())            \
-      + "<"#Comp"," + SThermo::typeName()                                     \
-      + ","  + GThermo::typeName() + ">>").c_str(),                           \
-        0                                                                     \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        Comp,                                                                 \
-        SS##Schem##Comp##SThermo##GThermo,                                    \
-        fvMesh                                                                \
+#define makeSolidChemistrySolverType(SS, Schem, Comp, SThermo, GThermo)        \
+                                                                               \
+    typedef SS<Schem<Comp, SThermo, GThermo>>                                  \
+        SS##Schem##Comp##SThermo##GThermo;                                     \
+                                                                               \
+    defineTemplateTypeNameAndDebugWithName                                     \
+    (                                                                          \
+        SS##Schem##Comp##SThermo##GThermo,                                     \
+        (#SS"<" + word(Schem<Comp, SThermo, GThermo>::typeName_())             \
+      + "<"#Comp"," + SThermo::typeName()                                      \
+      + ","  + GThermo::typeName() + ">>").c_str(),                            \
+        0                                                                      \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        Comp,                                                                  \
+        SS##Schem##Comp##SThermo##GThermo,                                     \
+        fvMesh                                                                 \
     );
 
 
-#define makeSolidChemistrySolverTypes(SolidChem, Comp, SThermo, GThermo)      \
-                                                                              \
-    makeSolidChemistrySolverType                                              \
-    (                                                                         \
-        noChemistrySolver,                                                    \
-        SolidChem,                                                            \
-        Comp,                                                                 \
-        SThermo,                                                              \
-        GThermo                                                               \
-    );                                                                        \
-                                                                              \
-    makeSolidChemistrySolverType                                              \
-    (                                                                         \
-        ode,                                                                  \
-        SolidChem,                                                            \
-        Comp,                                                                 \
-        SThermo,                                                              \
-        GThermo                                                               \
+#define makeSolidChemistrySolverTypes(SolidChem, Comp, SThermo, GThermo)       \
+                                                                               \
+    makeSolidChemistrySolverType                                               \
+    (                                                                          \
+        noChemistrySolver,                                                     \
+        SolidChem,                                                             \
+        Comp,                                                                  \
+        SThermo,                                                               \
+        GThermo                                                                \
+    );                                                                         \
+                                                                               \
+    makeSolidChemistrySolverType                                               \
+    (                                                                          \
+        ode,                                                                   \
+        SolidChem,                                                             \
+        Comp,                                                                  \
+        SThermo,                                                               \
+        GThermo                                                                \
     );
 
 
diff --git a/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.H b/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.H
index cc9eb6a7b7c71e007ff3e2c45c2cdecde3e84408..190e758123c31c9ee2fe703129ad5a1de3168898 100644
--- a/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.H
+++ b/src/thermophysicalModels/solidSpecie/reaction/Reactions/solidReaction/solidReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,21 +139,21 @@ public:
 
 
         //- Construct and return a clone
-        virtual autoPtr<Reaction<ReactionThermo> > clone() const
+        virtual autoPtr<Reaction<ReactionThermo>> clone() const
         {
-            return autoPtr<Reaction<ReactionThermo> >
+            return autoPtr<Reaction<ReactionThermo>>
             (
                 new solidReaction<ReactionThermo>(*this)
             );
         }
 
         //- Construct and return a clone with new speciesTable
-        virtual autoPtr<Reaction<ReactionThermo> > clone
+        virtual autoPtr<Reaction<ReactionThermo>> clone
         (
             const speciesTable& species
         ) const
         {
-            return autoPtr<Reaction<ReactionThermo> >
+            return autoPtr<Reaction<ReactionThermo>>
             (
                 new solidReaction<ReactionThermo>(*this, species)
             );
@@ -203,7 +203,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "solidReaction.C"
+    #include "solidReaction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidSpecie/reaction/reactions/makeSolidReaction.H b/src/thermophysicalModels/solidSpecie/reaction/reactions/makeSolidReaction.H
index 7674c457d7bdb82931fd3fbd36d536652c52dad7..bc17d12bb416b0c5fcb7f5d393f2a5e8a0b35335 100644
--- a/src/thermophysicalModels/solidSpecie/reaction/reactions/makeSolidReaction.H
+++ b/src/thermophysicalModels/solidSpecie/reaction/reactions/makeSolidReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -45,45 +45,45 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeSolidReaction(ReactionType, Thermo, ReactionRate)                 \
-                                                                              \
-    typedef solidReaction<Thermo> solidReaction##Thermo;                      \
-                                                                              \
-    typedef Reaction<Thermo> Reaction##Thermo;                                \
-                                                                              \
-    typedef ReactionType<solidReaction, Thermo, ReactionRate>                 \
-        ReactionType##Thermo##ReactionRate;                                   \
-                                                                              \
-    defineTemplateRunTimeSelectionTable(Reaction##Thermo, Istream);           \
-    defineTemplateRunTimeSelectionTable(Reaction##Thermo, dictionary);        \
-                                                                              \
-    defineTemplateTypeNameAndDebug(solidReaction##Thermo, 0);                 \
-    defineTemplateTypeNameAndDebug(Reaction##Thermo, 0);                      \
-                                                                              \
-    template<>                                                                \
-    const word ReactionType##Thermo##ReactionRate::typeName                   \
-    (                                                                         \
-        ReactionType::typeName_()                                             \
-      + ReactionRate::type()                                                  \
-      + solidReaction##Thermo::typeName_()                                    \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        Reaction##Thermo,                                                     \
-        ReactionType##Thermo##ReactionRate,                                   \
-        Istream                                                               \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        Reaction##Thermo,                                                     \
-        ReactionType##Thermo##ReactionRate,                                   \
-        dictionary                                                            \
+#define makeSolidReaction(ReactionType, Thermo, ReactionRate)                  \
+                                                                               \
+    typedef solidReaction<Thermo> solidReaction##Thermo;                       \
+                                                                               \
+    typedef Reaction<Thermo> Reaction##Thermo;                                 \
+                                                                               \
+    typedef ReactionType<solidReaction, Thermo, ReactionRate>                  \
+        ReactionType##Thermo##ReactionRate;                                    \
+                                                                               \
+    defineTemplateRunTimeSelectionTable(Reaction##Thermo, Istream);            \
+    defineTemplateRunTimeSelectionTable(Reaction##Thermo, dictionary);         \
+                                                                               \
+    defineTemplateTypeNameAndDebug(solidReaction##Thermo, 0);                  \
+    defineTemplateTypeNameAndDebug(Reaction##Thermo, 0);                       \
+                                                                               \
+    template<>                                                                 \
+    const word ReactionType##Thermo##ReactionRate::typeName                    \
+    (                                                                          \
+        ReactionType::typeName_()                                              \
+      + ReactionRate::type()                                                   \
+      + solidReaction##Thermo::typeName_()                                     \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        Reaction##Thermo,                                                      \
+        ReactionType##Thermo##ReactionRate,                                    \
+        Istream                                                                \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        Reaction##Thermo,                                                      \
+        ReactionType##Thermo##ReactionRate,                                    \
+        dictionary                                                             \
     );
 
-#define makeSolidIRReactions(Thermo, ReactionRate)                            \
-                                                                              \
+#define makeSolidIRReactions(Thermo, ReactionRate)                             \
+                                                                               \
     makeSolidReaction(IrreversibleReaction, Thermo, ReactionRate)
 
 
diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H
index 31af54fe5406b476017f039878e0afd086335ce3..d7b388ccd6e972b75cf631c48fe0f4af3bc7b1f2 100644
--- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H
+++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,10 +133,7 @@ public:
 
     // Member operators
 
-        inline constAnIsoSolidTransport& operator=
-        (
-            const constAnIsoSolidTransport&
-        );
+        inline void operator=(const constAnIsoSolidTransport&);
         inline void operator+=(const constAnIsoSolidTransport&);
         inline void operator-=(const constAnIsoSolidTransport&);
 
@@ -168,7 +165,7 @@ public:
 #include "constAnIsoSolidTransportI.H"
 
 #ifdef NoRepository
-#   include "constAnIsoSolidTransport.C"
+    #include "constAnIsoSolidTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H
index 5c66f0406cd80ddf6fed7574dd78bbb8278148c9..fabc997a8ddf58eef0bfe584d1e62d55b0d1751d 100644
--- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H
+++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,13 +50,13 @@ inline Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::constAnIsoSolidTransport<Thermo> >
+inline Foam::autoPtr<Foam::constAnIsoSolidTransport<Thermo>>
 Foam::constAnIsoSolidTransport<Thermo>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<constAnIsoSolidTransport<Thermo> >
+    return autoPtr<constAnIsoSolidTransport<Thermo>>
     (
         new constAnIsoSolidTransport<Thermo>(dict)
     );
@@ -98,15 +98,12 @@ alphah(const scalar p, const scalar T) const
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Thermo>
-inline Foam::constAnIsoSolidTransport<Thermo>&
-Foam::constAnIsoSolidTransport<Thermo>::operator=
+inline void Foam::constAnIsoSolidTransport<Thermo>::operator=
 (
     const constAnIsoSolidTransport<Thermo>& ct
 )
 {
     kappa_ = ct.kappa_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H
index d9c47ec44455989d3be7da9e13f2c871f964abdc..4439a279fac40acc92e53c5349f4d266ffd44f9d 100644
--- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H
+++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -134,10 +134,7 @@ public:
 
     // Member operators
 
-        inline constIsoSolidTransport& operator=
-        (
-            const constIsoSolidTransport&
-        );
+        inline void operator=(const constIsoSolidTransport&);
         inline void operator+=(const constIsoSolidTransport&);
         inline void operator-=(const constIsoSolidTransport&);
 
@@ -170,7 +167,7 @@ public:
 #include "constIsoSolidTransportI.H"
 
 #ifdef NoRepository
-#   include "constIsoSolidTransport.C"
+    #include "constIsoSolidTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H
index b7a2181491efe7b5e64f765ed6c22a530e1c2e5d..7ee8ee618e73c89e8525f356f9c683975b68a794 100644
--- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H
+++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -50,13 +50,13 @@ inline Foam::constIsoSolidTransport<thermo>::constIsoSolidTransport
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::constIsoSolidTransport<Thermo> >
+inline Foam::autoPtr<Foam::constIsoSolidTransport<Thermo>>
 Foam::constIsoSolidTransport<Thermo>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<constIsoSolidTransport<Thermo> >
+    return autoPtr<constIsoSolidTransport<Thermo>>
     (
         new constIsoSolidTransport<Thermo>(dict)
     );
@@ -98,15 +98,13 @@ alphah(const scalar p, const scalar T) const
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class thermo>
-inline Foam::constIsoSolidTransport<thermo>&
-Foam::constIsoSolidTransport<thermo>::operator=
+inline void Foam::constIsoSolidTransport<thermo>::operator=
 (
     const constIsoSolidTransport<thermo>& ct
 )
 {
     thermo::operator=(ct);
     kappa_ = ct.kappa_;
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H
index 1ea9ffdcac91bb10be54991e00099b741dce293e..f8c8267644bc0098a80de9008cd996f14c2cf545 100644
--- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H
+++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -142,10 +142,7 @@ public:
 
     // Member operators
 
-        inline exponentialSolidTransport& operator=
-        (
-            const exponentialSolidTransport&
-        );
+        inline void operator=(const exponentialSolidTransport&);
         inline void operator+=(const exponentialSolidTransport&);
         inline void operator-=(const exponentialSolidTransport&);
 
@@ -177,7 +174,7 @@ public:
 #include "exponentialSolidTransportI.H"
 
 #ifdef NoRepository
-#   include "exponentialSolidTransport.C"
+    #include "exponentialSolidTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H
index 4b2c6ff5b47c8ee5acfd095a244bd294c2357bd8..909106e5dbb27deba577aaadb52a852acd64d844 100644
--- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H
+++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -56,13 +56,13 @@ inline Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::exponentialSolidTransport<Thermo> >
+inline Foam::autoPtr<Foam::exponentialSolidTransport<Thermo>>
 Foam::exponentialSolidTransport<Thermo>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<exponentialSolidTransport<Thermo> >
+    return autoPtr<exponentialSolidTransport<Thermo>>
     (
         new exponentialSolidTransport<Thermo>(dict)
     );
@@ -111,8 +111,7 @@ alphah(const scalar p, const scalar T) const
 
 
 template<class Thermo>
-inline Foam::exponentialSolidTransport<Thermo>&
-Foam::exponentialSolidTransport<Thermo>::operator=
+inline void Foam::exponentialSolidTransport<Thermo>::operator=
 (
     const exponentialSolidTransport<Thermo>& ct
 )
@@ -120,7 +119,6 @@ Foam::exponentialSolidTransport<Thermo>::operator=
     kappa0_ = ct.kappa0_;
     n0_ = ct.n0_;
     Tref_ = ct.Tref_;
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H
index 90a9e52f6af3b026a42d620e052c5da5dc973abf..d2f2e45fac424227f4fc32ae57c6693e178576c8 100644
--- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H
+++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -172,10 +172,7 @@ public:
 
     // Member operators
 
-        inline polynomialSolidTransport& operator=
-        (
-            const polynomialSolidTransport&
-        );
+        inline void operator=(const polynomialSolidTransport&);
         inline void operator+=(const polynomialSolidTransport&);
         inline void operator-=(const polynomialSolidTransport&);
         inline void operator*=(const scalar);
@@ -227,7 +224,7 @@ public:
 #include "polynomialSolidTransportI.H"
 
 #ifdef NoRepository
-#   include "polynomialSolidTransport.C"
+    #include "polynomialSolidTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H
index 76f55d57a28e975483c632ce087fb62a9d04efa4..45d4e95f4952d43c88c73a7e31be94a598dbcf2c 100644
--- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H
+++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -66,10 +66,10 @@ polynomialSolidTransport
 
 
 template<class Thermo, int PolySize>
-inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize> >
+inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize>>
 Foam::polynomialSolidTransport<Thermo, PolySize>::clone() const
 {
-    return autoPtr<polynomialSolidTransport<Thermo, PolySize> >
+    return autoPtr<polynomialSolidTransport<Thermo, PolySize>>
     (
         new polynomialSolidTransport<Thermo, PolySize>(*this)
     );
@@ -77,10 +77,10 @@ Foam::polynomialSolidTransport<Thermo, PolySize>::clone() const
 
 
 template<class Thermo, int PolySize>
-inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize> >
+inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize>>
 Foam::polynomialSolidTransport<Thermo, PolySize>::New(Istream& is)
 {
-    return autoPtr<polynomialSolidTransport<Thermo, PolySize> >
+    return autoPtr<polynomialSolidTransport<Thermo, PolySize>>
     (
         new polynomialSolidTransport<Thermo, PolySize>(is)
     );
@@ -88,10 +88,10 @@ Foam::polynomialSolidTransport<Thermo, PolySize>::New(Istream& is)
 
 
 template<class Thermo, int PolySize>
-inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize> >
+inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize>>
 Foam::polynomialSolidTransport<Thermo, PolySize>::New(const dictionary& dict)
 {
-    return autoPtr<polynomialSolidTransport<Thermo, PolySize> >
+    return autoPtr<polynomialSolidTransport<Thermo, PolySize>>
     (
         new polynomialSolidTransport<Thermo, PolySize>(dict)
     );
@@ -148,8 +148,7 @@ inline Foam::scalar Foam::polynomialSolidTransport<Thermo, PolySize>::alphah
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Thermo, int PolySize>
-inline Foam::polynomialSolidTransport<Thermo, PolySize>&
-Foam::polynomialSolidTransport<Thermo, PolySize>::operator=
+inline void Foam::polynomialSolidTransport<Thermo, PolySize>::operator=
 (
     const polynomialSolidTransport<Thermo, PolySize>& pt
 )
@@ -157,8 +156,6 @@ Foam::polynomialSolidTransport<Thermo, PolySize>::operator=
     Thermo::operator=(pt);
 
     kappaCoeffs_ = pt.kappaCoeffs_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/solidThermo/solidReactionThermo/makeReactingSolidThermo.H b/src/thermophysicalModels/solidThermo/solidReactionThermo/makeReactingSolidThermo.H
index 34c958b106153521130201438fad8cd0690a1041..19467060c30c1f9c159791f79bf6445ab0721422 100644
--- a/src/thermophysicalModels/solidThermo/solidReactionThermo/makeReactingSolidThermo.H
+++ b/src/thermophysicalModels/solidThermo/solidReactionThermo/makeReactingSolidThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,60 +37,60 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 #define makeSolidReactionMixtureThermo(BaseThermo,Cthermo,Mixture,ThermoPhys) \
-                                                                              \
-typedef SpecieMixture                                                         \
-    <                                                                         \
-        Mixture                                                               \
-        <                                                                     \
-            ThermoPhys                                                        \
-        >                                                                     \
-    > SpecieMixture##Mixture##ThermoPhys;                                     \
-                                                                              \
-typedef                                                                       \
-    heThermo                                                                  \
-    <                                                                         \
-        BaseThermo,                                                           \
-        SpecieMixture##Mixture##ThermoPhys                                    \
-    > heThermo##Mixture##ThermoPhys;                                          \
-                                                                              \
-typedef                                                                       \
-    Cthermo                                                                   \
-    <                                                                         \
-        BaseThermo,                                                           \
-        SpecieMixture##Mixture##ThermoPhys                                    \
-    > Cthermo##Mixture##ThermoPhys;                                           \
-                                                                              \
-                                                                              \
-defineTemplateTypeNameAndDebugWithName                                        \
-(                                                                             \
-    Cthermo##Mixture##ThermoPhys,                                             \
-    (                                                                         \
-        #Cthermo"<"#Mixture"<"                                                \
-      + ThermoPhys::typeName()                                                \
-      + ">>"                                                                  \
-    ).c_str(),                                                                \
-    0                                                                         \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    basicThermo,                                                              \
-    Cthermo##Mixture##ThermoPhys,                                             \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##ThermoPhys,                                             \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##ThermoPhys,                                             \
-    dictionary                                                                \
+                                                                               \
+typedef SpecieMixture                                                          \
+    <                                                                          \
+        Mixture                                                                \
+        <                                                                      \
+            ThermoPhys                                                         \
+        >                                                                      \
+    > SpecieMixture##Mixture##ThermoPhys;                                      \
+                                                                               \
+typedef                                                                        \
+    heThermo                                                                   \
+    <                                                                          \
+        BaseThermo,                                                            \
+        SpecieMixture##Mixture##ThermoPhys                                     \
+    > heThermo##Mixture##ThermoPhys;                                           \
+                                                                               \
+typedef                                                                        \
+    Cthermo                                                                    \
+    <                                                                          \
+        BaseThermo,                                                            \
+        SpecieMixture##Mixture##ThermoPhys                                     \
+    > Cthermo##Mixture##ThermoPhys;                                            \
+                                                                               \
+                                                                               \
+defineTemplateTypeNameAndDebugWithName                                         \
+(                                                                              \
+    Cthermo##Mixture##ThermoPhys,                                              \
+    (                                                                          \
+        #Cthermo"<"#Mixture"<"                                                 \
+      + ThermoPhys::typeName()                                                 \
+      + ">>"                                                                   \
+    ).c_str(),                                                                 \
+    0                                                                          \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    basicThermo,                                                               \
+    Cthermo##Mixture##ThermoPhys,                                              \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##ThermoPhys,                                              \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##ThermoPhys,                                              \
+    dictionary                                                                 \
 );
 
 
diff --git a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C
index d70e42a77e4dba600364e7b675950743f98dde02..7928d9bdff7c38bf4450d1d793aa2d14e6e15063 100644
--- a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C
+++ b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -168,14 +168,14 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::correct()
 {
     if (debug)
     {
-        Info<< "entering heSolidThermo<MixtureType>::correct()" << endl;
+        InfoInFunction << endl;
     }
 
     calculate();
 
     if (debug)
     {
-        Info<< "exiting heSolidThermo<MixtureType>::correct()" << endl;
+        Info<< "    Finished" << endl;
     }
 }
 
@@ -203,7 +203,7 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
         )
     );
 
-    volVectorField& Kappa = tKappa();
+    volVectorField& Kappa = tKappa.ref();
     vectorField& KappaCells = Kappa.internalField();
     const scalarField& TCells = this->T_.internalField();
     const scalarField& pCells = this->p_.internalField();
@@ -253,7 +253,7 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
     const scalarField& Tp = this->T_.boundaryField()[patchi];
     tmp<vectorField> tKappa(new vectorField(pp.size()));
 
-    vectorField& Kappap = tKappa();
+    vectorField& Kappap = tKappa.ref();
 
     forAll(Tp, facei)
     {
diff --git a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.H
index a964b3fe53dac4f92c0f52ab61f53b40c5b493a1..588bcd16070c75109abfc8fbd1b63f33d64ea767 100644
--- a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.H
+++ b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,7 +120,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "heSolidThermo.C"
+    #include "heSolidThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H
index 07b6ffb050242c50661b5adfcff50fe1e14db104..e3f5437fa23776fa2e8e9376eee11209962e9928 100644
--- a/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H
+++ b/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,124 +36,124 @@ Description
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 #define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
-                                                                              \
-                                                                              \
-typedef                                                                       \
-    Transport                                                                 \
-    <                                                                         \
-        species::thermo                                                       \
-        <                                                                     \
-            Thermo                                                            \
-            <                                                                 \
-                EqnOfState                                                    \
-                <                                                             \
-                    Specie                                                    \
-                >                                                             \
-            >,                                                                \
-            Type                                                              \
-        >                                                                     \
-    > Transport##Type##Thermo##EqnOfState##Specie;                            \
-                                                                              \
-typedef                                                                       \
-    heThermo                                                                  \
-    <                                                                         \
-        BaseThermo,                                                           \
-        Mixture<Transport##Type##Thermo##EqnOfState##Specie>                  \
-    > heThermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie;         \
-                                                                              \
-typedef                                                                       \
-    Cthermo                                                                   \
-    <                                                                         \
-        BaseThermo,                                                           \
-        Mixture<Transport##Type##Thermo##EqnOfState##Specie>                  \
-    > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie;          \
-                                                                              \
-                                                                              \
-defineTemplateTypeNameAndDebugWithName                                        \
-(                                                                             \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    (                                                                         \
-        #Cthermo"<"#Mixture"<"                                                \
-      + Transport##Type##Thermo##EqnOfState##Specie::typeName()               \
-      + ">>"                                                                  \
-    ).c_str(),                                                                \
-    0                                                                         \
-);                                                                            \
-                                                                              \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    basicThermo,                                                              \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,            \
-    dictionary                                                                \
+                                                                               \
+                                                                               \
+typedef                                                                        \
+    Transport                                                                  \
+    <                                                                          \
+        species::thermo                                                        \
+        <                                                                      \
+            Thermo                                                             \
+            <                                                                  \
+                EqnOfState                                                     \
+                <                                                              \
+                    Specie                                                     \
+                >                                                              \
+            >,                                                                 \
+            Type                                                               \
+        >                                                                      \
+    > Transport##Type##Thermo##EqnOfState##Specie;                             \
+                                                                               \
+typedef                                                                        \
+    heThermo                                                                   \
+    <                                                                          \
+        BaseThermo,                                                            \
+        Mixture<Transport##Type##Thermo##EqnOfState##Specie>                   \
+    > heThermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie;          \
+                                                                               \
+typedef                                                                        \
+    Cthermo                                                                    \
+    <                                                                          \
+        BaseThermo,                                                            \
+        Mixture<Transport##Type##Thermo##EqnOfState##Specie>                   \
+    > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie;           \
+                                                                               \
+                                                                               \
+defineTemplateTypeNameAndDebugWithName                                         \
+(                                                                              \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    (                                                                          \
+        #Cthermo"<"#Mixture"<"                                                 \
+      + Transport##Type##Thermo##EqnOfState##Specie::typeName()                \
+      + ">>"                                                                   \
+    ).c_str(),                                                                 \
+    0                                                                          \
+);                                                                             \
+                                                                               \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    basicThermo,                                                               \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie,             \
+    dictionary                                                                 \
 );
 
 
 
 #define makeSolidThermoPhysicsType(BaseThermo,Cthermo,Mixture,SolidPhysicsType)\
-                                                                              \
-                                                                              \
-                                                                              \
-typedef                                                                       \
-    heThermo                                                                  \
-    <                                                                         \
-        BaseThermo,                                                           \
-        Mixture<SolidPhysicsType>                                             \
-    > heThermo##Mixture##SolidPhysicsType;                                    \
-                                                                              \
-typedef                                                                       \
-    Cthermo                                                                   \
-    <                                                                         \
-        BaseThermo,                                                           \
-        Mixture<SolidPhysicsType>                                             \
-    > Cthermo##Mixture##SolidPhysicsType;                                     \
-                                                                              \
-                                                                              \
-defineTemplateTypeNameAndDebugWithName                                        \
-(                                                                             \
-    Cthermo##Mixture##SolidPhysicsType,                                       \
-    (                                                                         \
-        #Cthermo"<"#Mixture"<"                                                \
-      + SolidPhysicsType::typeName()                                          \
-      + ">>"                                                                  \
-    ).c_str(),                                                                \
-    0                                                                         \
-);                                                                            \
-                                                                              \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    basicThermo,                                                              \
-    Cthermo##Mixture##SolidPhysicsType,                                       \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##SolidPhysicsType,                                       \
-    fvMesh                                                                    \
-);                                                                            \
-                                                                              \
-addToRunTimeSelectionTable                                                    \
-(                                                                             \
-    BaseThermo,                                                               \
-    Cthermo##Mixture##SolidPhysicsType,                                       \
-    dictionary                                                                \
+                                                                               \
+                                                                               \
+                                                                               \
+typedef                                                                        \
+    heThermo                                                                   \
+    <                                                                          \
+        BaseThermo,                                                            \
+        Mixture<SolidPhysicsType>                                              \
+    > heThermo##Mixture##SolidPhysicsType;                                     \
+                                                                               \
+typedef                                                                        \
+    Cthermo                                                                    \
+    <                                                                          \
+        BaseThermo,                                                            \
+        Mixture<SolidPhysicsType>                                              \
+    > Cthermo##Mixture##SolidPhysicsType;                                      \
+                                                                               \
+                                                                               \
+defineTemplateTypeNameAndDebugWithName                                         \
+(                                                                              \
+    Cthermo##Mixture##SolidPhysicsType,                                        \
+    (                                                                          \
+        #Cthermo"<"#Mixture"<"                                                 \
+      + SolidPhysicsType::typeName()                                           \
+      + ">>"                                                                   \
+    ).c_str(),                                                                 \
+    0                                                                          \
+);                                                                             \
+                                                                               \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    basicThermo,                                                               \
+    Cthermo##Mixture##SolidPhysicsType,                                        \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##SolidPhysicsType,                                        \
+    fvMesh                                                                     \
+);                                                                             \
+                                                                               \
+addToRunTimeSelectionTable                                                     \
+(                                                                              \
+    BaseThermo,                                                                \
+    Cthermo##Mixture##SolidPhysicsType,                                        \
+    dictionary                                                                 \
 );
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H
index fd64b7fcdb63a2f0225dce504418b894e423dd80..a388cbddc0016686f847474359cdef8e00bfc200 100644
--- a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H
+++ b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -173,6 +173,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -194,10 +200,7 @@ public:
 
     // Member operators
 
-        inline Boussinesq& operator=
-        (
-            const Boussinesq&
-        );
+        inline void operator=(const Boussinesq&);
         inline void operator+=(const Boussinesq&);
         inline void operator-=(const Boussinesq&);
 
@@ -250,7 +253,7 @@ public:
 #include "BoussinesqI.H"
 
 #ifdef NoRepository
-#   include "Boussinesq.C"
+    #include "Boussinesq.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H b/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H
index 4183d00e12f8fa15f15f4e6d4b91ffe87e1518eb..2d689847382d3b82163bffc6c863bd19b6c36d96 100644
--- a/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H
+++ b/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -69,10 +69,10 @@ inline Foam::Boussinesq<Specie>::Boussinesq
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::Boussinesq<Specie> >
+inline Foam::autoPtr<Foam::Boussinesq<Specie>>
 Foam::Boussinesq<Specie>::clone() const
 {
-    return autoPtr<Boussinesq<Specie> >
+    return autoPtr<Boussinesq<Specie>>
     (
         new Boussinesq<Specie>(*this)
     );
@@ -80,13 +80,13 @@ Foam::Boussinesq<Specie>::clone() const
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::Boussinesq<Specie> >
+inline Foam::autoPtr<Foam::Boussinesq<Specie>>
 Foam::Boussinesq<Specie>::New
 (
     Istream& is
 )
 {
-    return autoPtr<Boussinesq<Specie> >
+    return autoPtr<Boussinesq<Specie>>
     (
         new Boussinesq<Specie>(is)
     );
@@ -94,13 +94,13 @@ Foam::Boussinesq<Specie>::New
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::Boussinesq<Specie> >
+inline Foam::autoPtr<Foam::Boussinesq<Specie>>
 Foam::Boussinesq<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<Boussinesq<Specie> >
+    return autoPtr<Boussinesq<Specie>>
     (
         new Boussinesq<Specie>(dict)
     );
@@ -120,6 +120,20 @@ inline Foam::scalar Foam::Boussinesq<Specie>::rho
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::Boussinesq<Specie>::h(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::Boussinesq<Specie>::cp(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::Boussinesq<Specie>::s
 (
@@ -167,8 +181,7 @@ inline Foam::scalar Foam::Boussinesq<Specie>::cpMcv
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Specie>
-inline Foam::Boussinesq<Specie>&
-Foam::Boussinesq<Specie>::operator=
+inline void Foam::Boussinesq<Specie>::operator=
 (
     const Boussinesq<Specie>& b
 )
@@ -178,10 +191,9 @@ Foam::Boussinesq<Specie>::operator=
     rho0_ = b.rho0_;
     T0_ = b.T0_;
     beta_ = b.beta_;
-
-    return *this;
 }
 
+
 template<class Specie>
 inline void Foam::Boussinesq<Specie>::operator+=
 (
diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H
index 8a24f6e104fa3cdc276d3a1e86119b014d984baf..49e1445c459c0a1721590ef3068a82aee74ee8f8 100644
--- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H
+++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014  OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -168,6 +168,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -240,7 +246,7 @@ public:
 #include "PengRobinsonGasI.H"
 
 #ifdef NoRepository
-#   include "PengRobinsonGas.C"
+    #include "PengRobinsonGas.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H
index 6e5f131ab0856644e431bc13a2a9c041d55a00aa..dc2ed305b4bed1914bca62b46a560a35e9bfc650 100644
--- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H
+++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2014  OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,10 +67,10 @@ inline Foam::PengRobinsonGas<Specie>::PengRobinsonGas
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::PengRobinsonGas <Specie> >
+inline Foam::autoPtr<Foam::PengRobinsonGas <Specie>>
 Foam::PengRobinsonGas<Specie>::clone() const
 {
-    return autoPtr<PengRobinsonGas<Specie> >
+    return autoPtr<PengRobinsonGas<Specie>>
     (
         new PengRobinsonGas<Specie>(*this)
     );
@@ -78,24 +78,24 @@ Foam::PengRobinsonGas<Specie>::clone() const
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::PengRobinsonGas<Specie> >
+inline Foam::autoPtr<Foam::PengRobinsonGas<Specie>>
 Foam::PengRobinsonGas<Specie>::New
 (
     Istream& is
 )
 {
-    return autoPtr<PengRobinsonGas<Specie> >(new PengRobinsonGas<Specie>(is));
+    return autoPtr<PengRobinsonGas<Specie>>(new PengRobinsonGas<Specie>(is));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::PengRobinsonGas<Specie> >
+inline Foam::autoPtr<Foam::PengRobinsonGas<Specie>>
 Foam::PengRobinsonGas<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<PengRobinsonGas<Specie> >
+    return autoPtr<PengRobinsonGas<Specie>>
     (
         new PengRobinsonGas<Specie>(dict)
     );
@@ -111,8 +111,58 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::rho
     scalar T
 ) const
 {
-    scalar z = Z(p, T);
-    return p/(z*this->R()*T);
+    scalar Z = this->Z(p, T);
+    return p/(Z*this->R()*T);
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::PengRobinsonGas<Specie>::h(scalar p, scalar T) const
+{
+    scalar Pr = p/Pc_;
+    scalar Tr = T/Tc_;
+    scalar B = 0.07780*Pr/Tr;
+    scalar kappa = 0.37464 + 1.54226*omega_ - 0.26992*sqr(omega_);
+    scalar alpha = sqr(1 + kappa*(1 - sqrt(Tr)));
+
+    scalar Z = this->Z(p, T);
+
+    return
+        RR*Tc_
+       *(
+           Tr*(Z - 1)
+         - 2.078*(1 + kappa)*sqrt(alpha)
+          *log((Z + 2.414*B)/(Z - 0.414*B))
+        );
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::PengRobinsonGas<Specie>::cp(scalar p, scalar T) const
+{
+    scalar Tr = T/Tc_;
+    scalar a = 0.45724*sqr(RR*Tc_)/Pc_;
+    scalar b = 0.07780*RR*Tc_/Pc_;
+    scalar kappa = 0.37464 + 1.54226*omega_ - 0.26992*sqr(omega_);
+    scalar alpha = sqr(1 + kappa*(1 - sqrt(Tr)));
+
+    scalar A = a*alpha*p/sqr(RR*T);
+    scalar B = b*p/(RR*T);
+
+    scalar Z = this->Z(p, T);
+
+    scalar ap = kappa*a*(kappa/Tc_ - (1 + kappa)/sqrt(T*Tc_));
+    scalar app = kappa*a*(1 + kappa)/(2*sqrt(pow3(T)*Tc_));
+
+    scalar M = (sqr(Z) + 2*B*Z - sqr(B))/(Z - B);
+    scalar N = ap*B/(b*RR);
+
+    const scalar root2 = sqrt(2.0);
+
+    return
+        app*(T/(2*root2*b))*log((Z + (root2 + 1)*B)/(Z - (root2 - 1)*B))
+      + RR*sqr(M - N)/(sqr(M) - 2*A*(Z + B))
+      - RR;
 }
 
 
@@ -123,9 +173,21 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::s
     scalar T
 ) const
 {
-    //***HGW This is the expression for a perfect gas
-    // Need to add the entropy defect for Peng-Robinson
-    return -RR*log(p/Pstd);
+    scalar Pr = p/Pc_;
+    scalar Tr = T/Tc_;
+    scalar B = 0.07780*Pr/Tr;
+    scalar kappa = 0.37464 + 1.54226*omega_ - 0.26992*sqr(omega_);
+
+    scalar Z = this->Z(p, T);
+
+    return
+      - RR*log(p/Pstd)
+      + RR
+       *(
+           log(Z - B)
+         - 2.078*kappa*((1 + kappa)/sqrt(Tr) - kappa)
+          *log((Z + 2.414*B)/(Z - 0.414*B))
+        );
 }
 
 
@@ -136,8 +198,9 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::psi
     scalar T
 ) const
 {
-    scalar z = Z(p, T);
-    return 1.0/(z*this->R()*T);
+    scalar Z = this->Z(p, T);
+
+    return 1.0/(Z*this->R()*T);
 }
 
 
@@ -148,46 +211,40 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::Z
     scalar T
 ) const
 {
-    scalar a = 0.45724*sqr(this->R())*sqr(Tc_)/Pc_;
-    scalar b = 0.07780*this->R()*Tc_/Pc_;
     scalar Tr = T/Tc_;
+    scalar a = 0.45724*sqr(RR*Tc_)/Pc_;
+    scalar b = 0.07780*RR*Tc_/Pc_;
+    scalar kappa = 0.37464 + 1.54226*omega_ - 0.26992*sqr(omega_);
+    scalar alpha = sqr(1 + kappa*(1 - sqrt(Tr)));
 
-    scalar alpha =
-        sqr
-        (
-            1.0
-          + (0.37464 + 1.54226*omega_- 0.26992*sqr(omega_))
-          * (1.0 - sqrt(Tr))
-        );
-
-    scalar B = b*p/(this->R()*T);
-    scalar A = a*alpha*p/sqr(this->R()*T);
+    scalar A = a*alpha*p/sqr(RR*T);
+    scalar B = b*p/(RR*T);
 
-    scalar a2 = B - 1.0;
-    scalar a1 = A - 2.0*B - 3.0*sqr(B);
+    scalar a2 = B - 1;
+    scalar a1 = A - 2*B - 3*sqr(B);
     scalar a0 = -A*B + sqr(B) + pow3(B);
 
-    scalar Q = (3.0*a1 - a2*a2)/9.0;
-    scalar Rl = (9.0*a2*a1 - 27.0*a0 - 2.0*a2*a2*a2)/54;
+    scalar Q = (3*a1 - a2*a2)/9.0;
+    scalar Rl = (9*a2*a1 - 27*a0 - 2*a2*a2*a2)/54.0;
 
     scalar Q3 = Q*Q*Q;
     scalar D = Q3 + Rl*Rl;
 
-    scalar root = -1.0;
+    scalar root = -1;
 
-    if (D <= 0.0)
+    if (D <= 0)
     {
         scalar th = ::acos(Rl/sqrt(-Q3));
-        scalar qm = 2.0*sqrt(-Q);
+        scalar qm = 2*sqrt(-Q);
         scalar r1 = qm*cos(th/3.0) - a2/3.0;
-        scalar r2 = qm*cos((th + 2.0*constant::mathematical::pi)/3.0) - a2/3.0;
-        scalar r3 = qm*cos((th + 4.0*constant::mathematical::pi)/3.0) - a2/3.0;
+        scalar r2 = qm*cos((th + 2*constant::mathematical::pi)/3.0) - a2/3.0;
+        scalar r3 = qm*cos((th + 4*constant::mathematical::pi)/3.0) - a2/3.0;
 
         root = max(r1, max(r2, r3));
     }
     else
     {
-        // one root is real
+        // One root is real
         scalar D05 = sqrt(D);
         scalar S = pow(Rl + D05, 1.0/3.0);
         scalar Tl = 0;
@@ -214,7 +271,22 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::cpMcv
     scalar T
 ) const
 {
-    return RR*Z(p, T);
+    scalar Tr = T/Tc_;
+    scalar a = 0.45724*sqr(RR*Tc_)/Pc_;
+    scalar b = 0.07780*RR*Tc_/Pc_;
+    scalar kappa = 0.37464 + 1.54226*omega_ - 0.26992*sqr(omega_);
+    scalar alpha = sqr(1 + kappa*(1 - sqrt(Tr)));
+
+    scalar A = alpha*a*p/sqr(RR*T);
+    scalar B = b*p/(RR*T);
+
+    scalar Z = this->Z(p, T);
+
+    scalar ap = kappa*a*(kappa/Tc_ - (1 + kappa)/sqrt(T*Tc_));
+    scalar M = (sqr(Z) + 2*B*Z - sqr(B))/(Z - B);
+    scalar N = ap*B/(b*RR);
+
+    return RR*sqr(M - N)/(sqr(M) - 2*A*(Z + B));
 }
 
 
diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H
index 3b391410ce57731c22604d3aee4379bd83f1bd61..342e6b3bb68021faedc3598f92223c39cc1cc8e4 100644
--- a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H
+++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -167,6 +167,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -240,7 +246,7 @@ public:
 #include "adiabaticPerfectFluidI.H"
 
 #ifdef NoRepository
-#   include "adiabaticPerfectFluid.C"
+    #include "adiabaticPerfectFluid.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H
index e92266ed161e7d81912882c859350b8aa508b50e..87adcdad2bb55ebd5f969c118c59d512b296cafc 100644
--- a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H
+++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,10 +63,10 @@ inline Foam::adiabaticPerfectFluid<Specie>::adiabaticPerfectFluid
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::adiabaticPerfectFluid<Specie> >
+inline Foam::autoPtr<Foam::adiabaticPerfectFluid<Specie>>
 Foam::adiabaticPerfectFluid<Specie>::clone() const
 {
-    return autoPtr<adiabaticPerfectFluid<Specie> >
+    return autoPtr<adiabaticPerfectFluid<Specie>>
     (
         new adiabaticPerfectFluid<Specie>(*this)
     );
@@ -74,10 +74,10 @@ Foam::adiabaticPerfectFluid<Specie>::clone() const
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::adiabaticPerfectFluid<Specie> >
+inline Foam::autoPtr<Foam::adiabaticPerfectFluid<Specie>>
 Foam::adiabaticPerfectFluid<Specie>::New(Istream& is)
 {
-    return autoPtr<adiabaticPerfectFluid<Specie> >
+    return autoPtr<adiabaticPerfectFluid<Specie>>
     (
         new adiabaticPerfectFluid<Specie>(is)
     );
@@ -85,13 +85,13 @@ Foam::adiabaticPerfectFluid<Specie>::New(Istream& is)
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::adiabaticPerfectFluid<Specie> >
+inline Foam::autoPtr<Foam::adiabaticPerfectFluid<Specie>>
 Foam::adiabaticPerfectFluid<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<adiabaticPerfectFluid<Specie> >
+    return autoPtr<adiabaticPerfectFluid<Specie>>
     (
         new adiabaticPerfectFluid<Specie>(dict)
     );
@@ -111,6 +111,28 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::rho
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::h
+(
+    scalar p,
+    scalar T
+) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::cp
+(
+    scalar p,
+    scalar T
+) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::s
 (
diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H
index e2dde3e35a9ff77b6f2b86e41e6a6900f59edba3..a02883a70aadbe274d653b3ce07bd64dc56cbe8c 100644
--- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H
+++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -155,6 +155,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -176,7 +182,7 @@ public:
 
     // Member operators
 
-        inline icoPolynomial& operator=(const icoPolynomial&);
+        inline void operator=(const icoPolynomial&);
         inline void operator+=(const icoPolynomial&);
         inline void operator-=(const icoPolynomial&);
 
@@ -226,13 +232,13 @@ public:
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeIcoPolynomial(PolySize)                                          \
-                                                                             \
-defineTemplateTypeNameAndDebugWithName                                       \
-(                                                                            \
-    icoPolynomial<Specie, PolySize>,                                         \
-    "icoPolynomial<"#PolySize">",                                            \
-    0                                                                        \
+#define makeIcoPolynomial(PolySize)                                            \
+                                                                               \
+defineTemplateTypeNameAndDebugWithName                                         \
+(                                                                              \
+    icoPolynomial<Specie, PolySize>,                                           \
+    "icoPolynomial<"#PolySize">",                                              \
+    0                                                                          \
 );
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -242,7 +248,7 @@ defineTemplateTypeNameAndDebugWithName                                       \
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "icoPolynomial.C"
+    #include "icoPolynomial.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H
index 2d30033b46ed6d788066b7d2462d98f50b2a1503..03d087c74f78b64de0471cead37394cad62d8d27 100644
--- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H
+++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -65,10 +65,10 @@ inline Foam::icoPolynomial<Specie, PolySize>::icoPolynomial
 
 
 template<class Specie, int PolySize>
-inline Foam::autoPtr<Foam::icoPolynomial<Specie, PolySize> >
+inline Foam::autoPtr<Foam::icoPolynomial<Specie, PolySize>>
 Foam::icoPolynomial<Specie, PolySize>::clone() const
 {
-    return autoPtr<icoPolynomial<Specie, PolySize> >
+    return autoPtr<icoPolynomial<Specie, PolySize>>
     (
         new icoPolynomial<Specie, PolySize>(*this)
     );
@@ -76,10 +76,10 @@ Foam::icoPolynomial<Specie, PolySize>::clone() const
 
 
 template<class Specie, int PolySize>
-inline Foam::autoPtr<Foam::icoPolynomial<Specie, PolySize> >
+inline Foam::autoPtr<Foam::icoPolynomial<Specie, PolySize>>
 Foam::icoPolynomial<Specie, PolySize>::New(Istream& is)
 {
-    return autoPtr<icoPolynomial<Specie, PolySize> >
+    return autoPtr<icoPolynomial<Specie, PolySize>>
     (
         new icoPolynomial<Specie, PolySize>(is)
     );
@@ -87,10 +87,10 @@ Foam::icoPolynomial<Specie, PolySize>::New(Istream& is)
 
 
 template<class Specie, int PolySize>
-inline Foam::autoPtr<Foam::icoPolynomial<Specie, PolySize> >
+inline Foam::autoPtr<Foam::icoPolynomial<Specie, PolySize>>
 Foam::icoPolynomial<Specie, PolySize>::New(const dictionary& dict)
 {
-    return autoPtr<icoPolynomial<Specie, PolySize> >
+    return autoPtr<icoPolynomial<Specie, PolySize>>
     (
         new icoPolynomial<Specie, PolySize>(dict)
     );
@@ -110,6 +110,28 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::rho
 }
 
 
+template<class Specie, int PolySize>
+inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::h
+(
+    scalar p,
+    scalar T
+) const
+{
+    return 0;
+}
+
+
+template<class Specie, int PolySize>
+inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::cp
+(
+    scalar p,
+    scalar T
+) const
+{
+    return 0;
+}
+
+
 template<class Specie, int PolySize>
 inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::s
 (
@@ -157,8 +179,7 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::cpMcv
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Specie, int PolySize>
-inline Foam::icoPolynomial<Specie, PolySize>&
-Foam::icoPolynomial<Specie, PolySize>::operator=
+inline void Foam::icoPolynomial<Specie, PolySize>::operator=
 (
     const icoPolynomial<Specie, PolySize>& ip
 )
@@ -166,8 +187,6 @@ Foam::icoPolynomial<Specie, PolySize>::operator=
     Specie::operator=(ip);
 
     rhoCoeffs_ = ip.rhoCoeffs_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H
index 0beacf03e53d3c93e060e891f651af0679e01eb4..67adc188c243c82fdc95b1d8c67500aeda5df193 100644
--- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H
+++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -158,6 +158,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -179,10 +185,7 @@ public:
 
     // Member operators
 
-        inline incompressiblePerfectGas& operator=
-        (
-            const incompressiblePerfectGas&
-        );
+        inline void operator=(const incompressiblePerfectGas&);
         inline void operator+=(const incompressiblePerfectGas&);
         inline void operator-=(const incompressiblePerfectGas&);
 
@@ -235,7 +238,7 @@ public:
 #include "incompressiblePerfectGasI.H"
 
 #ifdef NoRepository
-#   include "incompressiblePerfectGas.C"
+    #include "incompressiblePerfectGas.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H
index e08b1d9208bbede2cbe294eb06535904cd70ba73..8816c9f317c21ae7836c482097019ecceb30eacc 100644
--- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H
+++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -63,10 +63,10 @@ inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::incompressiblePerfectGas<Specie> >
+inline Foam::autoPtr<Foam::incompressiblePerfectGas<Specie>>
 Foam::incompressiblePerfectGas<Specie>::clone() const
 {
-    return autoPtr<incompressiblePerfectGas<Specie> >
+    return autoPtr<incompressiblePerfectGas<Specie>>
     (
         new incompressiblePerfectGas<Specie>(*this)
     );
@@ -74,13 +74,13 @@ Foam::incompressiblePerfectGas<Specie>::clone() const
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::incompressiblePerfectGas<Specie> >
+inline Foam::autoPtr<Foam::incompressiblePerfectGas<Specie>>
 Foam::incompressiblePerfectGas<Specie>::New
 (
     Istream& is
 )
 {
-    return autoPtr<incompressiblePerfectGas<Specie> >
+    return autoPtr<incompressiblePerfectGas<Specie>>
     (
         new incompressiblePerfectGas<Specie>(is)
     );
@@ -88,13 +88,13 @@ Foam::incompressiblePerfectGas<Specie>::New
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::incompressiblePerfectGas<Specie> >
+inline Foam::autoPtr<Foam::incompressiblePerfectGas<Specie>>
 Foam::incompressiblePerfectGas<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<incompressiblePerfectGas<Specie> >
+    return autoPtr<incompressiblePerfectGas<Specie>>
     (
         new incompressiblePerfectGas<Specie>(dict)
     );
@@ -114,6 +114,28 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::rho
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::h
+(
+    scalar p,
+    scalar T
+) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::cp
+(
+    scalar p,
+    scalar T
+) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::s
 (
@@ -161,19 +183,16 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::cpMcv
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Specie>
-inline Foam::incompressiblePerfectGas<Specie>&
-Foam::incompressiblePerfectGas<Specie>::operator=
+inline void Foam::incompressiblePerfectGas<Specie>::operator=
 (
     const incompressiblePerfectGas<Specie>& ipg
 )
 {
     Specie::operator=(ipg);
-
     pRef_ = ipg.pRef_;
-
-    return *this;
 }
 
+
 template<class Specie>
 inline void Foam::incompressiblePerfectGas<Specie>::operator+=
 (
diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linear.H b/src/thermophysicalModels/specie/equationOfState/linear/linear.H
index acdbda013411d287c5d753b5c3113d00dc71a5f1..99d924632df7f05ecae8e96caba9c3b7b243d3b4 100644
--- a/src/thermophysicalModels/specie/equationOfState/linear/linear.H
+++ b/src/thermophysicalModels/specie/equationOfState/linear/linear.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -156,6 +156,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -229,7 +235,7 @@ public:
 #include "linearI.H"
 
 #ifdef NoRepository
-#   include "linear.C"
+    #include "linear.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linearI.H b/src/thermophysicalModels/specie/equationOfState/linear/linearI.H
index 3972e0e25bcc627522cabcc71948ac2ff9938d49..701ccc3c7ce360414c84d73feaba9f9941910c3e 100644
--- a/src/thermophysicalModels/specie/equationOfState/linear/linearI.H
+++ b/src/thermophysicalModels/specie/equationOfState/linear/linearI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,29 +57,29 @@ inline Foam::linear<Specie>::linear
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::linear<Specie> >
+inline Foam::autoPtr<Foam::linear<Specie>>
 Foam::linear<Specie>::clone() const
 {
-    return autoPtr<linear<Specie> >(new linear<Specie>(*this));
+    return autoPtr<linear<Specie>>(new linear<Specie>(*this));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::linear<Specie> >
+inline Foam::autoPtr<Foam::linear<Specie>>
 Foam::linear<Specie>::New(Istream& is)
 {
-    return autoPtr<linear<Specie> >(new linear<Specie>(is));
+    return autoPtr<linear<Specie>>(new linear<Specie>(is));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::linear<Specie> >
+inline Foam::autoPtr<Foam::linear<Specie>>
 Foam::linear<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<linear<Specie> >(new linear<Specie>(dict));
+    return autoPtr<linear<Specie>>(new linear<Specie>(dict));
 }
 
 
@@ -92,6 +92,20 @@ inline Foam::scalar Foam::linear<Specie>::rho(scalar p, scalar T) const
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::linear<Specie>::h(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::linear<Specie>::cp(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::linear<Specie>::s(scalar p, scalar T) const
 {
diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H
index fcd1b373f3b7e482fd78549e4be0e52f569aa92f..1d0e993b4e98941ccea92fdc63cee2078f87fbef 100644
--- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H
+++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -155,6 +155,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -228,7 +234,7 @@ public:
 #include "perfectFluidI.H"
 
 #ifdef NoRepository
-#   include "perfectFluid.C"
+    #include "perfectFluid.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H
index d30416c01400d339a6156c09ae6416d63be4a0ce..f58bcaaed6a73fc43462bc7c1271154f80c7ae82 100644
--- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H
+++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -58,29 +58,29 @@ inline Foam::perfectFluid<Specie>::perfectFluid
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::perfectFluid<Specie> >
+inline Foam::autoPtr<Foam::perfectFluid<Specie>>
 Foam::perfectFluid<Specie>::clone() const
 {
-    return autoPtr<perfectFluid<Specie> >(new perfectFluid<Specie>(*this));
+    return autoPtr<perfectFluid<Specie>>(new perfectFluid<Specie>(*this));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::perfectFluid<Specie> >
+inline Foam::autoPtr<Foam::perfectFluid<Specie>>
 Foam::perfectFluid<Specie>::New(Istream& is)
 {
-    return autoPtr<perfectFluid<Specie> >(new perfectFluid<Specie>(is));
+    return autoPtr<perfectFluid<Specie>>(new perfectFluid<Specie>(is));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::perfectFluid<Specie> >
+inline Foam::autoPtr<Foam::perfectFluid<Specie>>
 Foam::perfectFluid<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<perfectFluid<Specie> >(new perfectFluid<Specie>(dict));
+    return autoPtr<perfectFluid<Specie>>(new perfectFluid<Specie>(dict));
 }
 
 
@@ -100,6 +100,20 @@ inline Foam::scalar Foam::perfectFluid<Specie>::rho(scalar p, scalar T) const
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::perfectFluid<Specie>::h(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::perfectFluid<Specie>::cp(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::perfectFluid<Specie>::s(scalar p, scalar T) const
 {
diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H
index 986eecce702042474f2a4c0df4e2b69b2445e9fa..b3671e5b11eabc8608f45c507da98f4092a2b2ed 100644
--- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H
+++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -139,6 +139,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -212,7 +218,7 @@ public:
 #include "perfectGasI.H"
 
 #ifdef NoRepository
-#   include "perfectGas.C"
+    #include "perfectGas.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H
index fde836224eb34b88e3a28a5262b82bba1750db69..94e0c500ffcdfe4ee47d8c9b02a1ba05a06f9e69 100644
--- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H
+++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -48,28 +48,28 @@ inline Foam::perfectGas<Specie>::perfectGas
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::perfectGas<Specie> >
+inline Foam::autoPtr<Foam::perfectGas<Specie>>
 Foam::perfectGas<Specie>::clone() const
 {
-    return autoPtr<perfectGas<Specie> >(new perfectGas<Specie>(*this));
+    return autoPtr<perfectGas<Specie>>(new perfectGas<Specie>(*this));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::perfectGas<Specie> >
+inline Foam::autoPtr<Foam::perfectGas<Specie>>
 Foam::perfectGas<Specie>::New(Istream& is)
 {
-    return autoPtr<perfectGas<Specie> >(new perfectGas<Specie>(is));
+    return autoPtr<perfectGas<Specie>>(new perfectGas<Specie>(is));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::perfectGas<Specie> > Foam::perfectGas<Specie>::New
+inline Foam::autoPtr<Foam::perfectGas<Specie>> Foam::perfectGas<Specie>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<perfectGas<Specie> >(new perfectGas<Specie>(dict));
+    return autoPtr<perfectGas<Specie>>(new perfectGas<Specie>(dict));
 }
 
 
@@ -82,6 +82,20 @@ inline Foam::scalar Foam::perfectGas<Specie>::rho(scalar p, scalar T) const
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::perfectGas<Specie>::h(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::perfectGas<Specie>::cp(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::perfectGas<Specie>::s(scalar p, scalar T) const
 {
diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H
index 98f25471239bbc86ef565c9ecb8d197064e88b42..160015a0f3938c656a67be46ee7503bb696c911c 100644
--- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H
+++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -141,6 +141,12 @@ public:
             //- Return density [kg/m^3]
             inline scalar rho(scalar p, scalar T) const;
 
+            //- Return enthalpy departure [J/kmol]
+            inline scalar h(const scalar p, const scalar T) const;
+
+            //- Return cp departure [J/(kmol K]
+            inline scalar cp(scalar p, scalar T) const;
+
             //- Return entropy [J/(kmol K)]
             inline scalar s(const scalar p, const scalar T) const;
 
@@ -214,7 +220,7 @@ public:
 #include "rhoConstI.H"
 
 #ifdef NoRepository
-#   include "rhoConst.C"
+    #include "rhoConst.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H
index 7f415e9b3c5ff67c141db9998eb4369d5e0e5ea1..09f884b8b7bc43bd6eee5f594935ca6183ae414a 100644
--- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H
+++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,18 +54,18 @@ inline Foam::rhoConst<Specie>::rhoConst
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::rhoConst<Specie> >
+inline Foam::autoPtr<Foam::rhoConst<Specie>>
 Foam::rhoConst<Specie>::clone() const
 {
-    return autoPtr<rhoConst<Specie> >(new rhoConst<Specie>(*this));
+    return autoPtr<rhoConst<Specie>>(new rhoConst<Specie>(*this));
 }
 
 
 template<class Specie>
-inline Foam::autoPtr<Foam::rhoConst<Specie> >
+inline Foam::autoPtr<Foam::rhoConst<Specie>>
 Foam::rhoConst<Specie>::New(Istream& is)
 {
-    return autoPtr<rhoConst<Specie> >(new rhoConst<Specie>(is));
+    return autoPtr<rhoConst<Specie>>(new rhoConst<Specie>(is));
 }
 
 
@@ -78,6 +78,20 @@ inline Foam::scalar Foam::rhoConst<Specie>::rho(scalar p, scalar T) const
 }
 
 
+template<class Specie>
+inline Foam::scalar Foam::rhoConst<Specie>::h(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
+template<class Specie>
+inline Foam::scalar Foam::rhoConst<Specie>::cp(scalar p, scalar T) const
+{
+    return 0;
+}
+
+
 template<class Specie>
 inline Foam::scalar Foam::rhoConst<Specie>::s(scalar p, scalar T) const
 {
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H b/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H
index 9ab0ec7b7364799c54109fb745ef41a08d0c3e05..c5273d83026daebea331915f25768d6e9dd6f372 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H
+++ b/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<Reaction<ReactionThermo> > clone() const
+        virtual autoPtr<Reaction<ReactionThermo>> clone() const
         {
-            return autoPtr<Reaction<ReactionThermo> >
+            return autoPtr<Reaction<ReactionThermo>>
             (
                 new IrreversibleReaction
                 <
@@ -134,12 +134,12 @@ public:
         }
 
         //- Construct and return a clone with new speciesTable
-        virtual autoPtr<Reaction<ReactionThermo> > clone
+        virtual autoPtr<Reaction<ReactionThermo>> clone
         (
             const speciesTable& species
         ) const
         {
-            return autoPtr<Reaction<ReactionThermo> >
+            return autoPtr<Reaction<ReactionThermo>>
             (
                 new IrreversibleReaction
                 <
@@ -185,7 +185,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "IrreversibleReaction.C"
+    #include "IrreversibleReaction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H
index 43a1a43be4c7496e7b93e4626bb126ec2c16bcec..f1b23abfec1879ef4675aa8171e420443abf7be1 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H
+++ b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -114,9 +114,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<ReactionType<ReactionThermo> > clone() const
+        virtual autoPtr<ReactionType<ReactionThermo>> clone() const
         {
-            return autoPtr<ReactionType<ReactionThermo> >
+            return autoPtr<ReactionType<ReactionThermo>>
             (
                 new NonEquilibriumReversibleReaction
                     <ReactionType, ReactionThermo, ReactionRate>(*this)
@@ -124,12 +124,12 @@ public:
         }
 
         //- Construct and return a clone with new speciesTable
-        virtual autoPtr<ReactionType<ReactionThermo> > clone
+        virtual autoPtr<ReactionType<ReactionThermo>> clone
         (
             const speciesTable& species
         ) const
         {
-            return autoPtr<ReactionType<ReactionThermo> >
+            return autoPtr<ReactionType<ReactionThermo>>
             (
                 new NonEquilibriumReversibleReaction
                     <ReactionType, ReactionThermo, ReactionRate>
@@ -187,7 +187,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "NonEquilibriumReversibleReaction.C"
+    #include "NonEquilibriumReversibleReaction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C
index 2de276bf3cd796d8b4f67bc91b16d808571583f2..8dff4ef9380777270ac60e2b6c526826ef7a3dbf 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C
+++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -355,7 +355,7 @@ Foam::Reaction<ReactionThermo>::Reaction
 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
 
 template<class ReactionThermo>
-Foam::autoPtr<Foam::Reaction<ReactionThermo> >
+Foam::autoPtr<Foam::Reaction<ReactionThermo>>
 Foam::Reaction<ReactionThermo>::New
 (
     const speciesTable& species,
@@ -391,7 +391,7 @@ Foam::Reaction<ReactionThermo>::New
             << exit(FatalIOError);
     }
 
-    return autoPtr<Reaction<ReactionThermo> >
+    return autoPtr<Reaction<ReactionThermo>>
     (
         cstrIter()(species, thermoDatabase, is)
     );
@@ -399,7 +399,7 @@ Foam::Reaction<ReactionThermo>::New
 
 
 template<class ReactionThermo>
-Foam::autoPtr<Foam::Reaction<ReactionThermo> >
+Foam::autoPtr<Foam::Reaction<ReactionThermo>>
 Foam::Reaction<ReactionThermo>::New
 (
     const speciesTable& species,
@@ -422,7 +422,7 @@ Foam::Reaction<ReactionThermo>::New
             << exit(FatalError);
     }
 
-    return autoPtr<Reaction<ReactionThermo> >
+    return autoPtr<Reaction<ReactionThermo>>
     (
         cstrIter()(species, thermoDatabase, dict)
     );
@@ -497,7 +497,7 @@ const Foam::List<typename Foam::Reaction<ReactionThermo>::specieCoeffs>&
 Foam::Reaction<ReactionThermo>::glhs() const
 {
     NotImplemented;
-    return NullObjectRef<List<specieCoeffs> >();
+    return NullObjectRef<List<specieCoeffs>>();
 }
 
 
@@ -506,7 +506,7 @@ const Foam::List<typename Foam::Reaction<ReactionThermo>::specieCoeffs>&
 Foam::Reaction<ReactionThermo>::grhs() const
 {
     NotImplemented;
-    return NullObjectRef<List<specieCoeffs> >();
+    return NullObjectRef<List<specieCoeffs>>();
 }
 
 
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H
index 8ba7d40d8ad6f2bbb51ec4f0caa1dac4be5f93a8..ead361e11010bfb066fc5dc90fdb27b590ce5e4a 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H
+++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -252,21 +252,21 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<Reaction<ReactionThermo> > clone() const //
+        virtual autoPtr<Reaction<ReactionThermo>> clone() const //
         {
-            return autoPtr<Reaction<ReactionThermo> >
+            return autoPtr<Reaction<ReactionThermo>>
             (
                 new Reaction<ReactionThermo>(*this)
             );
         }
 
         //- Construct and return a clone with new speciesTable
-        virtual autoPtr<Reaction<ReactionThermo> > clone
+        virtual autoPtr<Reaction<ReactionThermo>> clone
         (
             const speciesTable& species
         ) const
         {
-            return autoPtr<Reaction<ReactionThermo> >
+            return autoPtr<Reaction<ReactionThermo>>
             (
                 new Reaction<ReactionThermo>(*this, species)
             );
@@ -276,7 +276,7 @@ public:
     // Selectors
 
         //- Return a pointer to new patchField created on freestore from input
-        static autoPtr<Reaction<ReactionThermo> > New
+        static autoPtr<Reaction<ReactionThermo>> New
         (
             const speciesTable& species,
             const HashPtrTable<ReactionThermo>& thermoDatabase,
@@ -284,7 +284,7 @@ public:
         );
 
         //- Return a pointer to new patchField created on freestore from dict
-        static autoPtr<Reaction<ReactionThermo> > New
+        static autoPtr<Reaction<ReactionThermo>> New
         (
             const speciesTable& species,
             const HashPtrTable<ReactionThermo>& thermoDatabase,
@@ -383,7 +383,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "Reaction.C"
+    #include "Reaction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C
index e616e1847b80390ec06bd3a91104362e4d546ffe..ca0334107db14483e16453af7272140e72827243 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C
+++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -36,7 +36,7 @@ Foam::ReactionList<ThermoType>::ReactionList
     const HashPtrTable<ThermoType>& thermoDb
 )
 :
-    SLPtrList<Reaction<ThermoType> >(),
+    SLPtrList<Reaction<ThermoType>>(),
     species_(species),
     thermoDb_(thermoDb),
     dict_(dictionary::null)
@@ -51,7 +51,7 @@ Foam::ReactionList<ThermoType>::ReactionList
     const dictionary& dict
 )
 :
-    SLPtrList<Reaction<ThermoType> >(),
+    SLPtrList<Reaction<ThermoType>>(),
     species_(species),
     thermoDb_(thermoDb),
     dict_(dict)
@@ -68,7 +68,7 @@ Foam::ReactionList<ThermoType>::ReactionList
     const fileName& fName
 )
 :
-    SLPtrList<Reaction<ThermoType> >
+    SLPtrList<Reaction<ThermoType>>
     (
         dictionary(IFstream(fName)()).lookup("reactions"),
         Reaction<ThermoType>::iNew(species, thermoDb)
@@ -82,7 +82,7 @@ Foam::ReactionList<ThermoType>::ReactionList
 template<class ThermoType>
 Foam::ReactionList<ThermoType>::ReactionList(const ReactionList& reactions)
 :
-    SLPtrList<Reaction<ThermoType> >(reactions),
+    SLPtrList<Reaction<ThermoType>>(reactions),
     species_(reactions.species_),
     thermoDb_(reactions.thermoDb_),
     dict_(reactions.dict_)
@@ -128,7 +128,7 @@ void Foam::ReactionList<ThermoType>::write(Ostream& os) const
     os  << "reactions" << nl;
     os  << token::BEGIN_BLOCK << incrIndent << nl;
 
-    forAllConstIter(typename SLPtrList<Reaction<ThermoType> >, *this, iter)
+    forAllConstIter(typename SLPtrList<Reaction<ThermoType>>, *this, iter)
     {
         const Reaction<ThermoType>& r = iter();
         os  << indent << r.name() << nl
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H
index 875a0fd4669871bc3f39005fdf7ca4ea6a51c127..c9a4b2c00158ebfd12d659cf094a0cc7a50c50d7 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H
+++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionList/ReactionList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ namespace Foam
 template<class ThermoType>
 class ReactionList
 :
-    public SLPtrList<Reaction<ThermoType> >
+    public SLPtrList<Reaction<ThermoType>>
 {
     // Private data
 
@@ -125,7 +125,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReactionList.C"
+    #include "ReactionList.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H b/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H
index b0e16bdcca7f6a149823eb57a513ff6cff0a6f96..fd801d347b7132267545789675d4dfe9935f007f 100644
--- a/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H
+++ b/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -120,9 +120,9 @@ public:
         );
 
         //- Construct and return a clone
-        virtual autoPtr<ReactionType<ReactionThermo> > clone() const
+        virtual autoPtr<ReactionType<ReactionThermo>> clone() const
         {
-            return autoPtr<ReactionType<ReactionThermo> >
+            return autoPtr<ReactionType<ReactionThermo>>
             (
                 new ReversibleReaction
                 <
@@ -134,12 +134,12 @@ public:
         }
 
         //- Construct and return a clone with new speciesTable
-        virtual autoPtr<ReactionType<ReactionThermo> > clone
+        virtual autoPtr<ReactionType<ReactionThermo>> clone
         (
             const speciesTable& species
         ) const
         {
-            return autoPtr<ReactionType<ReactionThermo> >
+            return autoPtr<ReactionType<ReactionThermo>>
             (
                 new ReversibleReaction
                 <ReactionType, ReactionThermo, ReactionRate>
@@ -200,7 +200,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "ReversibleReaction.C"
+    #include "ReversibleReaction.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H
index 66a9ab3655c414e0f00019bd8ca41e958c3b30d0..59c25bcf4b39efda9b07b0908eedd300dc4af214 100644
--- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyEfficiencies/thirdBodyEfficienciesI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -113,7 +113,7 @@ inline Foam::thirdBodyEfficiencies::thirdBodyEfficiencies
 {
     if (dict.found("coeffs"))
     {
-        List<Tuple2<word, scalar> > coeffs(dict.lookup("coeffs"));
+        List<Tuple2<word, scalar>> coeffs(dict.lookup("coeffs"));
         if (coeffs.size() != species_.size())
         {
             FatalErrorInFunction
@@ -151,7 +151,7 @@ inline Foam::scalar Foam::thirdBodyEfficiencies::M(const scalarList& c) const
 
 inline void Foam::thirdBodyEfficiencies::write(Ostream& os) const
 {
-    List<Tuple2<word, scalar> > coeffs(species_.size());
+    List<Tuple2<word, scalar>> coeffs(species_.size());
     forAll(coeffs, i)
     {
         coeffs[i].first() = species_[i];
diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H b/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H
index 0b72f6800d76391772953bb06b6f2c21746797ae..74cf7c1e486f988cadc5337288f525bfd6080917 100644
--- a/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H
+++ b/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -57,106 +57,106 @@ namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-#define makeReaction(Thermo, ReactionType, ReactionRate)                      \
-                                                                              \
-    typedef Reaction<Thermo> Reaction##Thermo;                                \
-                                                                              \
-    typedef ReactionType<Reaction, Thermo, ReactionRate>                      \
-        ReactionType##Thermo##ReactionRate;                                   \
-                                                                              \
-    template<>                                                                \
-    const word ReactionType##Thermo##ReactionRate::typeName                   \
-    (                                                                         \
-        ReactionType::typeName_()                                             \
-      + ReactionRate::type()                                                  \
-      + Reaction##Thermo::typeName_()                                         \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        Reaction##Thermo,                                                     \
-        ReactionType##Thermo##ReactionRate,                                   \
-        Istream                                                               \
-    );                                                                        \
-                                                                              \
-    addToRunTimeSelectionTable                                                \
-    (                                                                         \
-        Reaction##Thermo,                                                     \
-        ReactionType##Thermo##ReactionRate,                                   \
-        dictionary                                                            \
+#define makeReaction(Thermo, ReactionType, ReactionRate)                       \
+                                                                               \
+    typedef Reaction<Thermo> Reaction##Thermo;                                 \
+                                                                               \
+    typedef ReactionType<Reaction, Thermo, ReactionRate>                       \
+        ReactionType##Thermo##ReactionRate;                                    \
+                                                                               \
+    template<>                                                                 \
+    const word ReactionType##Thermo##ReactionRate::typeName                    \
+    (                                                                          \
+        ReactionType::typeName_()                                              \
+      + ReactionRate::type()                                                   \
+      + Reaction##Thermo::typeName_()                                          \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        Reaction##Thermo,                                                      \
+        ReactionType##Thermo##ReactionRate,                                    \
+        Istream                                                                \
+    );                                                                         \
+                                                                               \
+    addToRunTimeSelectionTable                                                 \
+    (                                                                          \
+        Reaction##Thermo,                                                      \
+        ReactionType##Thermo##ReactionRate,                                    \
+        dictionary                                                             \
     );
 
 
 #define makePressureDependentReaction\
-(                                                                             \
-    Thermo,                                                                   \
-    Reaction,                                                                 \
-    PressureDependentReactionRate,                                            \
-    ReactionRate,                                                             \
-    FallOffFunction                                                           \
-)                                                                             \
-                                                                              \
-    typedef PressureDependentReactionRate<ReactionRate, FallOffFunction>      \
-        PressureDependentReactionRate##ReactionRate##FallOffFunction;         \
-                                                                              \
-    makeReaction                                                              \
-    (                                                                         \
-        Thermo,                                                               \
-        Reaction,                                                             \
-        PressureDependentReactionRate##ReactionRate##FallOffFunction          \
+(                                                                              \
+    Thermo,                                                                    \
+    Reaction,                                                                  \
+    PressureDependentReactionRate,                                             \
+    ReactionRate,                                                              \
+    FallOffFunction                                                            \
+)                                                                              \
+                                                                               \
+    typedef PressureDependentReactionRate<ReactionRate, FallOffFunction>       \
+        PressureDependentReactionRate##ReactionRate##FallOffFunction;          \
+                                                                               \
+    makeReaction                                                               \
+    (                                                                          \
+        Thermo,                                                                \
+        Reaction,                                                              \
+        PressureDependentReactionRate##ReactionRate##FallOffFunction           \
     )
 
 
-#define makeIRReactions(Thermo, ReactionRate)                                 \
-                                                                              \
-    makeReaction(Thermo, IrreversibleReaction, ReactionRate)                  \
-                                                                              \
+#define makeIRReactions(Thermo, ReactionRate)                                  \
+                                                                               \
+    makeReaction(Thermo, IrreversibleReaction, ReactionRate)                   \
+                                                                               \
     makeReaction(Thermo, ReversibleReaction, ReactionRate)
 
 
-#define makeIRNReactions(Thermo, ReactionRate)                                \
-                                                                              \
-    makeIRReactions(Thermo, ReactionRate)                                     \
-                                                                              \
+#define makeIRNReactions(Thermo, ReactionRate)                                 \
+                                                                               \
+    makeIRReactions(Thermo, ReactionRate)                                      \
+                                                                               \
     makeReaction(Thermo, NonEquilibriumReversibleReaction, ReactionRate)
 
 
 #define makePressureDependentReactions(Thermo, ReactionRate, FallOffFunction) \
-                                                                              \
-    makePressureDependentReaction                                             \
-    (                                                                         \
-        Thermo,                                                               \
-        IrreversibleReaction,                                                 \
-        FallOffReactionRate,                                                  \
-        ReactionRate,                                                         \
-        FallOffFunction                                                       \
-    )                                                                         \
-                                                                              \
-    makePressureDependentReaction                                             \
-    (                                                                         \
-        Thermo,                                                               \
-        ReversibleReaction,                                                   \
-        FallOffReactionRate,                                                  \
-        ReactionRate,                                                         \
-        FallOffFunction                                                       \
-    )                                                                         \
-                                                                              \
-    makePressureDependentReaction                                             \
-    (                                                                         \
-        Thermo,                                                               \
-        IrreversibleReaction,                                                 \
-        ChemicallyActivatedReactionRate,                                      \
-        ReactionRate,                                                         \
-        FallOffFunction                                                       \
-    )                                                                         \
-                                                                              \
-    makePressureDependentReaction                                             \
-    (                                                                         \
-        Thermo,                                                               \
-        ReversibleReaction,                                                   \
-        ChemicallyActivatedReactionRate,                                      \
-        ReactionRate,                                                         \
-        FallOffFunction                                                       \
+                                                                               \
+    makePressureDependentReaction                                              \
+    (                                                                          \
+        Thermo,                                                                \
+        IrreversibleReaction,                                                  \
+        FallOffReactionRate,                                                   \
+        ReactionRate,                                                          \
+        FallOffFunction                                                        \
+    )                                                                          \
+                                                                               \
+    makePressureDependentReaction                                              \
+    (                                                                          \
+        Thermo,                                                                \
+        ReversibleReaction,                                                    \
+        FallOffReactionRate,                                                   \
+        ReactionRate,                                                          \
+        FallOffFunction                                                        \
+    )                                                                          \
+                                                                               \
+    makePressureDependentReaction                                              \
+    (                                                                          \
+        Thermo,                                                                \
+        IrreversibleReaction,                                                  \
+        ChemicallyActivatedReactionRate,                                       \
+        ReactionRate,                                                          \
+        FallOffFunction                                                        \
+    )                                                                          \
+                                                                               \
+    makePressureDependentReaction                                              \
+    (                                                                          \
+        Thermo,                                                                \
+        ReversibleReaction,                                                    \
+        ChemicallyActivatedReactionRate,                                       \
+        ReactionRate,                                                          \
+        FallOffFunction                                                        \
     )
 
 
diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H
index fea19e2cc6ad04e4509747b88fd93de0322945d1..6a99ba435f4d19b05c6e19a14bcf0d311bc71aff 100644
--- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H
+++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -226,7 +226,7 @@ public:
 #include "eConstThermoI.H"
 
 #ifdef NoRepository
-#   include "eConstThermo.C"
+    #include "eConstThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H
index 87a7e80cb99926cdf7a06aab3ef1dabee8a8e4b6..2c6bda1a697d579661637d42d3464d7a6470d9e4 100644
--- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H
+++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,10 +55,10 @@ inline Foam::eConstThermo<EquationOfState>::eConstThermo
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::eConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::eConstThermo<EquationOfState>>
 Foam::eConstThermo<EquationOfState>::clone() const
 {
-    return autoPtr<eConstThermo<EquationOfState> >
+    return autoPtr<eConstThermo<EquationOfState>>
     (
         new eConstThermo<EquationOfState>(*this)
     );
@@ -66,10 +66,10 @@ Foam::eConstThermo<EquationOfState>::clone() const
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::eConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::eConstThermo<EquationOfState>>
 Foam::eConstThermo<EquationOfState>::New(Istream& is)
 {
-    return autoPtr<eConstThermo<EquationOfState> >
+    return autoPtr<eConstThermo<EquationOfState>>
     (
         new eConstThermo<EquationOfState>(is)
     );
@@ -77,10 +77,10 @@ Foam::eConstThermo<EquationOfState>::New(Istream& is)
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::eConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::eConstThermo<EquationOfState>>
 Foam::eConstThermo<EquationOfState>::New(const dictionary& dict)
 {
-    return autoPtr<eConstThermo<EquationOfState> >
+    return autoPtr<eConstThermo<EquationOfState>>
     (
         new eConstThermo<EquationOfState>(dict)
     );
@@ -106,7 +106,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::cp
     const scalar T
 ) const
 {
-    return Cv_ + this->cpMcv(p, T);
+    return Cv_ + this->cpMcv(p, T) + EquationOfState::cp(p, T);
 }
 
 
@@ -117,7 +117,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::ha
     const scalar T
 ) const
 {
-    return cp(p, T)*T + Hf_;
+    return cp(p, T)*T + Hf_ + EquationOfState::h(p, T);
 }
 
 
@@ -128,7 +128,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::hs
     const scalar T
 ) const
 {
-    return cp(p, T)*T;
+    return cp(p, T)*T + EquationOfState::h(p, T);
 }
 
 
diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H
index ef33aeaf4cbbb50a8119e87a2306130c3ad6b8dc..a83346040b1c10194100e57122235f47f1faea59 100644
--- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H
+++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -219,7 +219,7 @@ public:
 #include "hConstThermoI.H"
 
 #ifdef NoRepository
-#   include "hConstThermo.C"
+    #include "hConstThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H
index bb272ce9c6e2921a5b151869228185a4469efe70..1367c7c426c82a900b1a0015925d01a2d7fb22c5 100644
--- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H
+++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,10 +55,10 @@ inline Foam::hConstThermo<EquationOfState>::hConstThermo
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hConstThermo<EquationOfState>>
 Foam::hConstThermo<EquationOfState>::clone() const
 {
-    return autoPtr<hConstThermo<EquationOfState> >
+    return autoPtr<hConstThermo<EquationOfState>>
     (
         new hConstThermo<EquationOfState>(*this)
     );
@@ -66,10 +66,10 @@ Foam::hConstThermo<EquationOfState>::clone() const
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hConstThermo<EquationOfState>>
 Foam::hConstThermo<EquationOfState>::New(Istream& is)
 {
-    return autoPtr<hConstThermo<EquationOfState> >
+    return autoPtr<hConstThermo<EquationOfState>>
     (
         new hConstThermo<EquationOfState>(is)
     );
@@ -77,10 +77,10 @@ Foam::hConstThermo<EquationOfState>::New(Istream& is)
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hConstThermo<EquationOfState>>
 Foam::hConstThermo<EquationOfState>::New(const dictionary& dict)
 {
-    return autoPtr<hConstThermo<EquationOfState> >
+    return autoPtr<hConstThermo<EquationOfState>>
     (
         new hConstThermo<EquationOfState>(dict)
     );
@@ -106,7 +106,7 @@ inline Foam::scalar Foam::hConstThermo<EquationOfState>::cp
     const scalar T
 ) const
 {
-    return Cp_;
+    return Cp_ + EquationOfState::cp(p, T);
 }
 
 
@@ -116,7 +116,7 @@ inline Foam::scalar Foam::hConstThermo<EquationOfState>::ha
     const scalar p, const scalar T
 ) const
 {
-    return Cp_*T + Hf_;
+    return Cp_*T + Hf_ + EquationOfState::h(p, T);
 }
 
 
@@ -126,7 +126,7 @@ inline Foam::scalar Foam::hConstThermo<EquationOfState>::hs
     const scalar p, const scalar T
 ) const
 {
-    return Cp_*T;
+    return Cp_*T + EquationOfState::h(p, T);
 }
 
 
diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H
index a0b557f215a9b35bff15b48a7a1ad3f902e312d3..9a671e77ecec7bec00d69c7c1a6fe9f76de413cb 100644
--- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H
+++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -187,7 +187,7 @@ public:
 
     // Member operators
 
-        inline hPolynomialThermo& operator=(const hPolynomialThermo&);
+        inline void operator=(const hPolynomialThermo&);
         inline void operator+=(const hPolynomialThermo&);
         inline void operator-=(const hPolynomialThermo&);
         inline void operator*=(const scalar);
@@ -239,7 +239,7 @@ public:
 #include "hPolynomialThermoI.H"
 
 #ifdef NoRepository
-#   include "hPolynomialThermo.C"
+    #include "hPolynomialThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H
index 47b02e3cc70db6b70abdefad7506a70997bbd451..7cef8ce2b53433c6aaad6962575af645212fcba5 100644
--- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H
+++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -98,7 +98,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::cp
     const scalar p, const scalar T
 ) const
 {
-    return CpCoeffs_.value(T);
+    return CpCoeffs_.value(T) + EquationOfState::cp(p, T);
 }
 
 
@@ -108,7 +108,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::ha
     const scalar p, const scalar T
 ) const
 {
-    return hCoeffs_.value(T);
+    return hCoeffs_.value(T) + EquationOfState::h(p, T);
 }
 
 
@@ -144,8 +144,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::s
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class EquationOfState, int PolySize>
-inline Foam::hPolynomialThermo<EquationOfState, PolySize>&
-Foam::hPolynomialThermo<EquationOfState, PolySize>::operator=
+inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator=
 (
     const hPolynomialThermo<EquationOfState, PolySize>& pt
 )
@@ -157,8 +156,6 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::operator=
     CpCoeffs_ = pt.CpCoeffs_;
     hCoeffs_ = pt.hCoeffs_;
     sCoeffs_ = pt.sCoeffs_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H
index 82852627657f0a506612ac41257b8f65c12055fd..1f0caaff09dc3dd41631cf1eecd5399ce563bf37 100644
--- a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H
+++ b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -233,8 +233,8 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "hPowerThermoI.H"
-#   include "hPowerThermo.C"
+    #include "hPowerThermoI.H"
+    #include "hPowerThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H
index e46dbf73987fc531bd998323fa590808835d3264..c9114a1dd81c261b5bc936a504a7d6d0fb0f6a28 100644
--- a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H
+++ b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -80,10 +80,10 @@ inline Foam::hPowerThermo<EquationOfState>::hPowerThermo
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hPowerThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hPowerThermo<EquationOfState>>
 Foam::hPowerThermo<EquationOfState>::clone() const
 {
-    return autoPtr<hPowerThermo<EquationOfState> >
+    return autoPtr<hPowerThermo<EquationOfState>>
     (
         new hPowerThermo<EquationOfState>(*this)
     );
@@ -91,10 +91,10 @@ Foam::hPowerThermo<EquationOfState>::clone() const
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hPowerThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hPowerThermo<EquationOfState>>
 Foam::hPowerThermo<EquationOfState>::New(Istream& is)
 {
-    return autoPtr<hPowerThermo<EquationOfState> >
+    return autoPtr<hPowerThermo<EquationOfState>>
     (
         new hPowerThermo<EquationOfState>(is)
     );
@@ -102,10 +102,10 @@ Foam::hPowerThermo<EquationOfState>::New(Istream& is)
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hPowerThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hPowerThermo<EquationOfState>>
 Foam::hPowerThermo<EquationOfState>::New(const dictionary& dict)
 {
-    return autoPtr<hPowerThermo<EquationOfState> >
+    return autoPtr<hPowerThermo<EquationOfState>>
     (
         new hPowerThermo<EquationOfState>(dict)
     );
@@ -130,7 +130,7 @@ inline Foam::scalar Foam::hPowerThermo<EquationOfState>::cp
     const scalar p, const scalar T
 ) const
 {
-    return c0_*pow(T/Tref_, n0_);
+    return c0_*pow(T/Tref_, n0_) + EquationOfState::cp(p, T);
 }
 
 
@@ -151,7 +151,8 @@ inline Foam::scalar Foam::hPowerThermo<EquationOfState>::hs
 ) const
 {
     return
-        c0_*(pow(T, n0_ + 1) - pow(Tstd, n0_ + 1))/(pow(Tref_, n0_)*(n0_ + 1));
+        c0_*(pow(T, n0_ + 1) - pow(Tstd, n0_ + 1))/(pow(Tref_, n0_)*(n0_ + 1))
+      + EquationOfState::h(p, T);
 }
 
 
diff --git a/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.H b/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.H
index 9a62231d9c00a0846a9bff6cda6165ca05b982b1..04b9d311b41c28d6353ef2cd46f6a47fe47ac146 100644
--- a/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.H
+++ b/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -223,7 +223,7 @@ public:
 #include "hRefConstThermoI.H"
 
 #ifdef NoRepository
-#   include "hRefConstThermo.C"
+    #include "hRefConstThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermoI.H b/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermoI.H
index c6a699540e3d6fc254baf3e86533bdb10f928a74..29bd2c97530a672a8ced3c1a573500278bdd328a 100644
--- a/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermoI.H
+++ b/src/thermophysicalModels/specie/thermo/hRefConst/hRefConstThermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,10 +61,10 @@ inline Foam::hRefConstThermo<EquationOfState>::hRefConstThermo
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hRefConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hRefConstThermo<EquationOfState>>
 Foam::hRefConstThermo<EquationOfState>::clone() const
 {
-    return autoPtr<hRefConstThermo<EquationOfState> >
+    return autoPtr<hRefConstThermo<EquationOfState>>
     (
         new hRefConstThermo<EquationOfState>(*this)
     );
@@ -72,10 +72,10 @@ Foam::hRefConstThermo<EquationOfState>::clone() const
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hRefConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hRefConstThermo<EquationOfState>>
 Foam::hRefConstThermo<EquationOfState>::New(Istream& is)
 {
-    return autoPtr<hRefConstThermo<EquationOfState> >
+    return autoPtr<hRefConstThermo<EquationOfState>>
     (
         new hRefConstThermo<EquationOfState>(is)
     );
@@ -83,10 +83,10 @@ Foam::hRefConstThermo<EquationOfState>::New(Istream& is)
 
 
 template<class EquationOfState>
-inline Foam::autoPtr<Foam::hRefConstThermo<EquationOfState> >
+inline Foam::autoPtr<Foam::hRefConstThermo<EquationOfState>>
 Foam::hRefConstThermo<EquationOfState>::New(const dictionary& dict)
 {
-    return autoPtr<hRefConstThermo<EquationOfState> >
+    return autoPtr<hRefConstThermo<EquationOfState>>
     (
         new hRefConstThermo<EquationOfState>(dict)
     );
@@ -112,7 +112,7 @@ inline Foam::scalar Foam::hRefConstThermo<EquationOfState>::cp
     const scalar T
 ) const
 {
-    return Cp_;
+    return Cp_ + EquationOfState::cp(p, T);
 }
 
 
@@ -122,7 +122,7 @@ inline Foam::scalar Foam::hRefConstThermo<EquationOfState>::ha
     const scalar p, const scalar T
 ) const
 {
-    return Cp_*(T-Tref_) + Href_ + Hf_;
+    return Cp_*(T-Tref_) + Href_ + Hf_ + EquationOfState::h(p, T);
 }
 
 
@@ -132,7 +132,7 @@ inline Foam::scalar Foam::hRefConstThermo<EquationOfState>::hs
     const scalar p, const scalar T
 ) const
 {
-    return Cp_*(T-Tref_) + Href_ ;
+    return Cp_*(T-Tref_) + Href_ + EquationOfState::h(p, T);
 }
 
 
diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H
index e3e4c1657f56fb4393e460f125f4f93e54777128..34f3777c51aab73ffeb52a2d860063664f1a3b17 100644
--- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H
+++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -254,7 +254,7 @@ public:
 #include "janafThermoI.H"
 
 #ifdef NoRepository
-#   include "janafThermo.C"
+    #include "janafThermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H
index 18f9d7cc735101822262f5b8113f369a1c403f72..b3fd676a297f3117b18fa85aba4b59ad7fceaf5a 100644
--- a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H
+++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -162,7 +162,9 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::cp
 ) const
 {
     const coeffArray& a = coeffs(T);
-    return RR*((((a[4]*T + a[3])*T + a[2])*T + a[1])*T + a[0]);
+    return
+        RR*((((a[4]*T + a[3])*T + a[2])*T + a[1])*T + a[0])
+      + EquationOfState::cp(p, T);
 }
 
 
@@ -178,7 +180,8 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::ha
     (
         ((((a[4]/5.0*T + a[3]/4.0)*T + a[2]/3.0)*T + a[1]/2.0)*T + a[0])*T
       + a[5]
-    );
+    )
+  + EquationOfState::h(p, T);
 }
 
 
diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermo.H b/src/thermophysicalModels/specie/thermo/thermo/thermo.H
index 53336e0479b8ab6c2817eaf81055da8cb9b286ac..9820f114734a4d14c7f1b60bba00bf093f409c22 100644
--- a/src/thermophysicalModels/specie/thermo/thermo/thermo.H
+++ b/src/thermophysicalModels/specie/thermo/thermo/thermo.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ template<class Thermo, template<class> class Type>
 class thermo
 :
     public Thermo,
-    public Type<thermo<Thermo, Type> >
+    public Type<thermo<Thermo, Type>>
 {
     // Private data
 
@@ -151,7 +151,7 @@ public:
         {
             return
                   Thermo::typeName() + ','
-                + Type<thermo<Thermo, Type> >::typeName();
+                + Type<thermo<Thermo, Type>>::typeName();
         }
 
         // Fundamental properties
@@ -397,7 +397,7 @@ public:
 #include "thermoI.H"
 
 #ifdef NoRepository
-#   include "thermo.C"
+    #include "thermo.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H
index 9b8eb307772b27fdf365c43415b2c2af9d0f4431..44197fd18f7e6a526cae47d8b591250b32819ec2 100644
--- a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H
+++ b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -93,7 +93,7 @@ template<class Thermo, template<class> class Type>
 inline Foam::word
 Foam::species::thermo<Thermo, Type>::heName()
 {
-    return Type<thermo<Thermo, Type> >::name();
+    return Type<thermo<Thermo, Type>>::name();
 }
 
 
@@ -101,7 +101,7 @@ template<class Thermo, template<class> class Type>
 inline Foam::scalar
 Foam::species::thermo<Thermo, Type>::he(const scalar p, const scalar T) const
 {
-    return Type<thermo<Thermo, Type> >::he(*this, p, T);
+    return Type<thermo<Thermo, Type>>::he(*this, p, T);
 }
 
 
@@ -117,7 +117,7 @@ template<class Thermo, template<class> class Type>
 inline Foam::scalar
 Foam::species::thermo<Thermo, Type>::cpv(const scalar p, const scalar T) const
 {
-    return Type<thermo<Thermo, Type> >::cpv(*this, p, T);
+    return Type<thermo<Thermo, Type>>::cpv(*this, p, T);
 }
 
 
@@ -138,7 +138,7 @@ Foam::species::thermo<Thermo, Type>::cpBycpv
     const scalar T
 ) const
 {
-    return Type<thermo<Thermo, Type> >::cpBycpv(*this, p, T);
+    return Type<thermo<Thermo, Type>>::cpBycpv(*this, p, T);
 }
 
 
@@ -202,7 +202,7 @@ template<class Thermo, template<class> class Type>
 inline Foam::scalar
 Foam::species::thermo<Thermo, Type>::HE(const scalar p, const scalar T) const
 {
-    return Type<thermo<Thermo, Type> >::HE(*this, p, T);
+    return Type<thermo<Thermo, Type>>::HE(*this, p, T);
 }
 
 
@@ -362,7 +362,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::THE
     const scalar T0
 ) const
 {
-    return Type<thermo<Thermo, Type> >::THE(*this, he, p, T0);
+    return Type<thermo<Thermo, Type>>::THE(*this, he, p, T0);
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H
index 65cd3c8a418b2c2793a7ec5eb5be23d939319b91..2c2e691bf2b7f7bd3da81d7aa5f9bc9fb6b61955 100644
--- a/src/thermophysicalModels/specie/transport/const/constTransport.H
+++ b/src/thermophysicalModels/specie/transport/const/constTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -161,7 +161,7 @@ public:
 
     // Member operators
 
-        inline constTransport& operator=(const constTransport&);
+        inline void operator=(const constTransport&);
 
         inline void operator+=(const constTransport&);
 
@@ -216,7 +216,7 @@ public:
 #include "constTransportI.H"
 
 #ifdef NoRepository
-#   include "constTransport.C"
+    #include "constTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H
index 2a73a4a187ec2fbefbb7120423d18a2b7dedd76d..6c304476fd24366e5505fc4cc694d52ea14c57b9 100644
--- a/src/thermophysicalModels/specie/transport/const/constTransportI.H
+++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -53,10 +53,10 @@ inline Foam::constTransport<Thermo>::constTransport
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::constTransport<Thermo> >
+inline Foam::autoPtr<Foam::constTransport<Thermo>>
 Foam::constTransport<Thermo>::clone() const
 {
-    return autoPtr<constTransport<Thermo> >
+    return autoPtr<constTransport<Thermo>>
     (
         new constTransport<Thermo>(*this)
     );
@@ -64,13 +64,13 @@ Foam::constTransport<Thermo>::clone() const
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::constTransport<Thermo> >
+inline Foam::autoPtr<Foam::constTransport<Thermo>>
 Foam::constTransport<Thermo>::New
 (
     Istream& is
 )
 {
-    return autoPtr<constTransport<Thermo> >
+    return autoPtr<constTransport<Thermo>>
     (
         new constTransport<Thermo>(is)
     );
@@ -78,13 +78,13 @@ Foam::constTransport<Thermo>::New
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::constTransport<Thermo> >
+inline Foam::autoPtr<Foam::constTransport<Thermo>>
 Foam::constTransport<Thermo>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<constTransport<Thermo> >
+    return autoPtr<constTransport<Thermo>>
     (
         new constTransport<Thermo>(dict)
     );
@@ -129,7 +129,7 @@ inline Foam::scalar Foam::constTransport<Thermo>::alphah
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Thermo>
-inline Foam::constTransport<Thermo>& Foam::constTransport<Thermo>::operator=
+inline void Foam::constTransport<Thermo>::operator=
 (
     const constTransport<Thermo>& ct
 )
@@ -138,8 +138,6 @@ inline Foam::constTransport<Thermo>& Foam::constTransport<Thermo>::operator=
 
     mu_ = ct.mu_;
     rPr_ = ct.rPr_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C
new file mode 100644
index 0000000000000000000000000000000000000000..b1fd1f8216650c157e8b7bd075e999609d00da7b
--- /dev/null
+++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C
@@ -0,0 +1,128 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "logPolynomialTransport.H"
+#include "IOstreams.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+Foam::logPolynomialTransport<Thermo, PolySize>::logPolynomialTransport
+(
+    Istream& is
+)
+:
+    Thermo(is),
+    muCoeffs_("muLogCoeffs<" + Foam::name(PolySize) + '>', is),
+    kappaCoeffs_("kappaLogCoeffs<" + Foam::name(PolySize) + '>', is)
+{
+    muCoeffs_ *= this->W();
+    kappaCoeffs_ *= this->W();
+}
+
+
+template<class Thermo, int PolySize>
+Foam::logPolynomialTransport<Thermo, PolySize>::logPolynomialTransport
+(
+    const dictionary& dict
+)
+:
+    Thermo(dict),
+    muCoeffs_
+    (
+        dict.subDict("transport").lookup
+        (
+            "muLogCoeffs<" + Foam::name(PolySize) + '>'
+        )
+    ),
+    kappaCoeffs_
+    (
+        dict.subDict("transport").lookup
+        (
+            "kappaLogCoeffs<" + Foam::name(PolySize) + '>'
+        )
+    )
+{
+    muCoeffs_ *= this->W();
+    kappaCoeffs_ *= this->W();
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+void Foam::logPolynomialTransport<Thermo, PolySize>::write(Ostream& os) const
+{
+    os  << this->name() << endl;
+    os  << token::BEGIN_BLOCK << incrIndent << nl;
+
+    Thermo::write(os);
+
+    dictionary dict("transport");
+    dict.add
+    (
+        word("muLogCoeffs<" + Foam::name(PolySize) + '>'),
+        muCoeffs_/this->W()
+    );
+    dict.add
+    (
+        word("kappaLogCoeffs<" + Foam::name(PolySize) + '>'),
+        kappaCoeffs_/this->W()
+    );
+    os  << indent << dict.dictName() << dict;
+
+    os  << decrIndent << token::END_BLOCK << nl;
+}
+
+
+// * * * * * * * * * * * * * * * IOstream Operators  * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+Foam::Ostream& Foam::operator<<
+(
+    Ostream& os,
+    const logPolynomialTransport<Thermo, PolySize>& pt
+)
+{
+    os  << static_cast<const Thermo&>(pt) << tab
+        << "muLogCoeffs<" << Foam::name(PolySize) << '>' << tab
+        << pt.muCoeffs_/pt.W() << tab
+        << "kappaLogCoeffs<" << Foam::name(PolySize) << '>' << tab
+        << pt.kappaCoeffs_/pt.W();
+
+    os.check
+    (
+        "Ostream& operator<<"
+        "("
+            "Ostream&, "
+            "const logPolynomialTransport<Thermo, PolySize>&"
+        ")"
+    );
+
+    return os;
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H
new file mode 100644
index 0000000000000000000000000000000000000000..b93f5348f4015f76d776890922192aef08f53ebe
--- /dev/null
+++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H
@@ -0,0 +1,238 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::logPolynomialTransport
+
+Description
+    Transport package using polynomial functions of ln(T) for mu and kappa:
+
+        ln(mu)    = sum_i=1^N( a[i] * ln(T)^(i-1) )
+        ln(kappa) = sum_i=1^N( b[i] * ln(T)^(i-1) )
+
+SourceFiles
+    logPolynomialTransportI.H
+    logPolynomialTransport.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef logPolynomialTransport_H
+#define logPolynomialTransport_H
+
+#include "Polynomial.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+// Forward declaration of friend functions and operators
+
+template<class Thermo, int PolySize> class logPolynomialTransport;
+
+template<class Thermo, int PolySize>
+inline logPolynomialTransport<Thermo, PolySize> operator+
+(
+    const logPolynomialTransport<Thermo, PolySize>&,
+    const logPolynomialTransport<Thermo, PolySize>&
+);
+
+template<class Thermo, int PolySize>
+inline logPolynomialTransport<Thermo, PolySize> operator-
+(
+    const logPolynomialTransport<Thermo, PolySize>&,
+    const logPolynomialTransport<Thermo, PolySize>&
+);
+
+template<class Thermo, int PolySize>
+inline logPolynomialTransport<Thermo, PolySize> operator*
+(
+    const scalar,
+    const logPolynomialTransport<Thermo, PolySize>&
+);
+
+template<class Thermo, int PolySize>
+inline logPolynomialTransport<Thermo, PolySize> operator==
+(
+    const logPolynomialTransport<Thermo, PolySize>&,
+    const logPolynomialTransport<Thermo, PolySize>&
+);
+
+template<class Thermo, int PolySize>
+Ostream& operator<<
+(
+    Ostream&,
+    const logPolynomialTransport<Thermo, PolySize>&
+);
+
+
+/*---------------------------------------------------------------------------*\
+                     Class logPolynomialTransport Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class Thermo, int PolySize=8>
+class logPolynomialTransport
+:
+    public Thermo
+{
+    // Private data
+
+        //- Dynamic viscosity polynomial coefficients
+        //  Note: input in [Pa.s], but internally uses [Pa.s/kmol]
+        Polynomial<PolySize> muCoeffs_;
+
+        //- Thermal conductivity polynomial coefficients
+        //  Note: input in [W/m/K], but internally uses [W/m/K/kmol]
+        Polynomial<PolySize> kappaCoeffs_;
+
+
+    // Private Member Functions
+
+        //- Construct from components
+        inline logPolynomialTransport
+        (
+            const Thermo& t,
+            const Polynomial<PolySize>& muPoly,
+            const Polynomial<PolySize>& kappaPoly
+        );
+
+
+public:
+
+    // Constructors
+
+        //- Construct copy
+        inline logPolynomialTransport(const logPolynomialTransport&);
+
+        //- Construct as named copy
+        inline logPolynomialTransport
+        (
+            const word&,
+            const logPolynomialTransport&
+        );
+
+        //- Construct from Istream
+        logPolynomialTransport(Istream& is);
+
+        //- Construct from dictionary
+        logPolynomialTransport(const dictionary& dict);
+
+        //- Construct and return a clone
+        inline autoPtr<logPolynomialTransport> clone() const;
+
+        // Selector from Istream
+        inline static autoPtr<logPolynomialTransport> New(Istream& is);
+
+        // Selector from dictionary
+        inline static autoPtr<logPolynomialTransport> New
+        (
+            const dictionary& dict
+        );
+
+
+    // Member functions
+
+        //- Return the instantiated type name
+        static word typeName()
+        {
+            return "logPolynomial<" + Thermo::typeName() + '>';
+        }
+
+        //- Dynamic viscosity [kg/ms]
+        inline scalar mu(const scalar p, const scalar T) const;
+
+        //- Thermal conductivity [W/mK]
+        inline scalar kappa(const scalar p, const scalar T) const;
+
+        //- Thermal diffusivity of enthalpy [kg/ms]
+        inline scalar alphah(const scalar p, const scalar T) const;
+
+        // Species diffusivity
+        //inline scalar D(const scalar p, const scalar T) const;
+
+        //- Write to Ostream
+        void write(Ostream& os) const;
+
+
+    // Member operators
+
+        inline void operator=(const logPolynomialTransport&);
+        inline void operator+=(const logPolynomialTransport&);
+        inline void operator-=(const logPolynomialTransport&);
+        inline void operator*=(const scalar);
+
+
+    // Friend operators
+
+        friend logPolynomialTransport operator+ <Thermo, PolySize>
+        (
+            const logPolynomialTransport&,
+            const logPolynomialTransport&
+        );
+
+        friend logPolynomialTransport operator- <Thermo, PolySize>
+        (
+            const logPolynomialTransport&,
+            const logPolynomialTransport&
+        );
+
+        friend logPolynomialTransport operator* <Thermo, PolySize>
+        (
+            const scalar,
+            const logPolynomialTransport&
+        );
+
+        friend logPolynomialTransport operator== <Thermo, PolySize>
+        (
+            const logPolynomialTransport&,
+            const logPolynomialTransport&
+        );
+
+
+    // Ostream Operator
+
+        friend Ostream& operator<< <Thermo, PolySize>
+        (
+            Ostream&,
+            const logPolynomialTransport&
+        );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "logPolynomialTransportI.H"
+
+#ifdef NoRepository
+    #include "logPolynomialTransport.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H
new file mode 100644
index 0000000000000000000000000000000000000000..4fb373c8939214af91e088dd97877d6d350d7fdb
--- /dev/null
+++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransportI.H
@@ -0,0 +1,274 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "specie.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize>::logPolynomialTransport
+(
+    const logPolynomialTransport& pt
+)
+:
+    Thermo(pt),
+    muCoeffs_(pt.muCoeffs_),
+    kappaCoeffs_(pt.kappaCoeffs_)
+{}
+
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize>::logPolynomialTransport
+(
+    const Thermo& t,
+    const Polynomial<PolySize>& muCoeffs,
+    const Polynomial<PolySize>& kappaCoeffs
+)
+:
+    Thermo(t),
+    muCoeffs_(muCoeffs),
+    kappaCoeffs_(kappaCoeffs)
+{}
+
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize>::logPolynomialTransport
+(
+    const word& name,
+    const logPolynomialTransport& pt
+)
+:
+    Thermo(name, pt),
+    muCoeffs_(pt.muCoeffs_),
+    kappaCoeffs_(pt.kappaCoeffs_)
+{}
+
+
+template<class Thermo, int PolySize>
+inline Foam::autoPtr<Foam::logPolynomialTransport<Thermo, PolySize>>
+Foam::logPolynomialTransport<Thermo, PolySize>::clone() const
+{
+    return autoPtr<logPolynomialTransport<Thermo, PolySize>>
+    (
+        new logPolynomialTransport<Thermo, PolySize>(*this)
+    );
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::autoPtr<Foam::logPolynomialTransport<Thermo, PolySize>>
+Foam::logPolynomialTransport<Thermo, PolySize>::New(Istream& is)
+{
+    return autoPtr<logPolynomialTransport<Thermo, PolySize>>
+    (
+        new logPolynomialTransport<Thermo, PolySize>(is)
+    );
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::autoPtr<Foam::logPolynomialTransport<Thermo, PolySize>>
+Foam::logPolynomialTransport<Thermo, PolySize>::New(const dictionary& dict)
+{
+    return autoPtr<logPolynomialTransport<Thermo, PolySize>>
+    (
+        new logPolynomialTransport<Thermo, PolySize>(dict)
+    );
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+inline Foam::scalar Foam::logPolynomialTransport<Thermo, PolySize>::mu
+(
+    const scalar p,
+    const scalar T
+) const
+{
+    return exp(muCoeffs_.value(log(T))/this->W());
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::scalar Foam::logPolynomialTransport<Thermo, PolySize>::kappa
+(
+    const scalar p,
+    const scalar T
+) const
+{
+    return exp(kappaCoeffs_.value(log(T))/this->W());
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::scalar Foam::logPolynomialTransport<Thermo, PolySize>::alphah
+(
+    const scalar p, const scalar T
+) const
+{
+    return kappa(p, T)/this->Cpv(p, T);
+}
+
+
+// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+inline void Foam::logPolynomialTransport<Thermo, PolySize>::operator=
+(
+    const logPolynomialTransport<Thermo, PolySize>& pt
+)
+{
+    Thermo::operator=(pt);
+
+    muCoeffs_ = pt.muCoeffs_;
+    kappaCoeffs_ = pt.kappaCoeffs_;
+}
+
+
+template<class Thermo, int PolySize>
+inline void Foam::logPolynomialTransport<Thermo, PolySize>::operator+=
+(
+    const logPolynomialTransport<Thermo, PolySize>& pt
+)
+{
+    scalar molr1 = this->nMoles();
+
+    Thermo::operator+=(pt);
+
+    molr1 /= this->nMoles();
+    scalar molr2 = pt.nMoles()/this->nMoles();
+
+    muCoeffs_ = molr1*muCoeffs_ + molr2*pt.muCoeffs_;
+    kappaCoeffs_ = molr1*kappaCoeffs_ + molr2*pt.kappaCoeffs_;
+}
+
+
+template<class Thermo, int PolySize>
+inline void Foam::logPolynomialTransport<Thermo, PolySize>::operator-=
+(
+    const logPolynomialTransport<Thermo, PolySize>& pt
+)
+{
+    scalar molr1 = this->nMoles();
+
+    Thermo::operator-=(pt);
+
+    molr1 /= this->nMoles();
+    scalar molr2 = pt.nMoles()/this->nMoles();
+
+    muCoeffs_ = molr1*muCoeffs_ - molr2*pt.muCoeffs_;
+    kappaCoeffs_ = molr1*kappaCoeffs_ - molr2*pt.kappaCoeffs_;
+}
+
+
+template<class Thermo, int PolySize>
+inline void Foam::logPolynomialTransport<Thermo, PolySize>::operator*=
+(
+    const scalar s
+)
+{
+    Thermo::operator*=(s);
+}
+
+
+// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize> Foam::operator+
+(
+    const logPolynomialTransport<Thermo, PolySize>& pt1,
+    const logPolynomialTransport<Thermo, PolySize>& pt2
+)
+{
+    Thermo t
+    (
+        static_cast<const Thermo&>(pt1) + static_cast<const Thermo&>(pt2)
+    );
+
+    scalar molr1 = pt1.nMoles()/t.nMoles();
+    scalar molr2 = pt2.nMoles()/t.nMoles();
+
+    return logPolynomialTransport<Thermo, PolySize>
+    (
+        t,
+        molr1*pt1.muCoeffs_ + molr2*pt2.muCoeffs_,
+        molr1*pt1.kappaCoeffs_ + molr2*pt2.kappaCoeffs_
+    );
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize> Foam::operator-
+(
+    const logPolynomialTransport<Thermo, PolySize>& pt1,
+    const logPolynomialTransport<Thermo, PolySize>& pt2
+)
+{
+    Thermo t
+    (
+        static_cast<const Thermo&>(pt1) - static_cast<const Thermo&>(pt2)
+    );
+
+    scalar molr1 = pt1.nMoles()/t.nMoles();
+    scalar molr2 = pt2.nMoles()/t.nMoles();
+
+    return logPolynomialTransport<Thermo, PolySize>
+    (
+        t,
+        molr1*pt1.muCoeffs_ - molr2*pt2.muCoeffs_,
+        molr1*pt1.kappaCoeffs_ - molr2*pt2.kappaCoeffs_
+    );
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize> Foam::operator*
+(
+    const scalar s,
+    const logPolynomialTransport<Thermo, PolySize>& pt
+)
+{
+    return logPolynomialTransport<Thermo, PolySize>
+    (
+        s*static_cast<const Thermo&>(pt),
+        pt.muCoeffs_,
+        pt.kappaCoeffs_
+    );
+}
+
+
+template<class Thermo, int PolySize>
+inline Foam::logPolynomialTransport<Thermo, PolySize> Foam::operator==
+(
+    const logPolynomialTransport<Thermo, PolySize>& pt1,
+    const logPolynomialTransport<Thermo, PolySize>& pt2
+)
+{
+    return pt2 - pt1;
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H
index 85ec167256d409b75362344730b16dd6026dcdf3..9f7be3b8e2b11103cc6a0ce27b0f17a38339a3b4 100644
--- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H
+++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -166,7 +166,7 @@ public:
 
     // Member operators
 
-        inline polynomialTransport& operator=(const polynomialTransport&);
+        inline void operator=(const polynomialTransport&);
         inline void operator+=(const polynomialTransport&);
         inline void operator-=(const polynomialTransport&);
         inline void operator*=(const scalar);
@@ -218,7 +218,7 @@ public:
 #include "polynomialTransportI.H"
 
 #ifdef NoRepository
-#   include "polynomialTransport.C"
+    #include "polynomialTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H
index 9a5ad80d5ea693a3da3d9184ae0e852de812af63..ca82f18d862ab355a725b2f36ecbe866d6fe23af 100644
--- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H
+++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -67,10 +67,10 @@ inline Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
 
 
 template<class Thermo, int PolySize>
-inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize> >
+inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize>>
 Foam::polynomialTransport<Thermo, PolySize>::clone() const
 {
-    return autoPtr<polynomialTransport<Thermo, PolySize> >
+    return autoPtr<polynomialTransport<Thermo, PolySize>>
     (
         new polynomialTransport<Thermo, PolySize>(*this)
     );
@@ -78,10 +78,10 @@ Foam::polynomialTransport<Thermo, PolySize>::clone() const
 
 
 template<class Thermo, int PolySize>
-inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize> >
+inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize>>
 Foam::polynomialTransport<Thermo, PolySize>::New(Istream& is)
 {
-    return autoPtr<polynomialTransport<Thermo, PolySize> >
+    return autoPtr<polynomialTransport<Thermo, PolySize>>
     (
         new polynomialTransport<Thermo, PolySize>(is)
     );
@@ -89,10 +89,10 @@ Foam::polynomialTransport<Thermo, PolySize>::New(Istream& is)
 
 
 template<class Thermo, int PolySize>
-inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize> >
+inline Foam::autoPtr<Foam::polynomialTransport<Thermo, PolySize>>
 Foam::polynomialTransport<Thermo, PolySize>::New(const dictionary& dict)
 {
-    return autoPtr<polynomialTransport<Thermo, PolySize> >
+    return autoPtr<polynomialTransport<Thermo, PolySize>>
     (
         new polynomialTransport<Thermo, PolySize>(dict)
     );
@@ -136,8 +136,7 @@ inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::alphah
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Thermo, int PolySize>
-inline Foam::polynomialTransport<Thermo, PolySize>&
-Foam::polynomialTransport<Thermo, PolySize>::operator=
+inline void Foam::polynomialTransport<Thermo, PolySize>::operator=
 (
     const polynomialTransport<Thermo, PolySize>& pt
 )
@@ -146,8 +145,6 @@ Foam::polynomialTransport<Thermo, PolySize>::operator=
 
     muCoeffs_ = pt.muCoeffs_;
     kappaCoeffs_ = pt.kappaCoeffs_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H
index e7da7b9a5ff510522b33758838df9d84616034d0..3c926eb00520cde258daafd522edf23b44388aac 100644
--- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H
+++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -186,7 +186,7 @@ public:
 
     // Member operators
 
-        inline sutherlandTransport& operator=(const sutherlandTransport&);
+        inline void operator=(const sutherlandTransport&);
 
         inline void operator+=(const sutherlandTransport&);
 
@@ -241,7 +241,7 @@ public:
 #include "sutherlandTransportI.H"
 
 #ifdef NoRepository
-#   include "sutherlandTransport.C"
+    #include "sutherlandTransport.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H
index 01668dda17336f3b6c61403e87a5809379130a3d..60ce87da8c532aa200e595bd01125526f2303261 100644
--- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H
+++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -88,10 +88,10 @@ inline Foam::sutherlandTransport<Thermo>::sutherlandTransport
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::sutherlandTransport<Thermo> >
+inline Foam::autoPtr<Foam::sutherlandTransport<Thermo>>
 Foam::sutherlandTransport<Thermo>::clone() const
 {
-    return autoPtr<sutherlandTransport<Thermo> >
+    return autoPtr<sutherlandTransport<Thermo>>
     (
         new sutherlandTransport<Thermo>(*this)
     );
@@ -99,13 +99,13 @@ Foam::sutherlandTransport<Thermo>::clone() const
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::sutherlandTransport<Thermo> >
+inline Foam::autoPtr<Foam::sutherlandTransport<Thermo>>
 Foam::sutherlandTransport<Thermo>::New
 (
     Istream& is
 )
 {
-    return autoPtr<sutherlandTransport<Thermo> >
+    return autoPtr<sutherlandTransport<Thermo>>
     (
         new sutherlandTransport<Thermo>(is)
     );
@@ -113,13 +113,13 @@ Foam::sutherlandTransport<Thermo>::New
 
 
 template<class Thermo>
-inline Foam::autoPtr<Foam::sutherlandTransport<Thermo> >
+inline Foam::autoPtr<Foam::sutherlandTransport<Thermo>>
 Foam::sutherlandTransport<Thermo>::New
 (
     const dictionary& dict
 )
 {
-    return autoPtr<sutherlandTransport<Thermo> >
+    return autoPtr<sutherlandTransport<Thermo>>
     (
         new sutherlandTransport<Thermo>(dict)
     );
@@ -165,8 +165,7 @@ inline Foam::scalar Foam::sutherlandTransport<Thermo>::alphah
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
 template<class Thermo>
-inline Foam::sutherlandTransport<Thermo>&
-Foam::sutherlandTransport<Thermo>::operator=
+inline void Foam::sutherlandTransport<Thermo>::operator=
 (
     const sutherlandTransport<Thermo>& st
 )
@@ -175,8 +174,6 @@ Foam::sutherlandTransport<Thermo>::operator=
 
     As_ = st.As_;
     Ts_ = st.Ts_;
-
-    return *this;
 }
 
 
diff --git a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C
index e7698de7f891be963ae99e7331a6a1fac981af0b..16e8f0971a8f029d3034d1f8ce166559535efc4c 100644
--- a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C
+++ b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -23,8 +23,6 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "error.H"
-
 #include "thermophysicalFunction.H"
 #include "HashTable.H"
 
@@ -47,8 +45,8 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
 {
     if (debug)
     {
-        Info<< "thermophysicalFunction::New(Istream&) : "
-            << "constructing thermophysicalFunction"
+        InfoInFunction
+            << "Constructing thermophysicalFunction"
             << endl;
     }
 
@@ -79,8 +77,8 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
 {
     if (debug)
     {
-        Info<< "thermophysicalFunction::New(const dictionary&) : "
-            << "constructing thermophysicalFunction"
+        InfoInFunction
+            << "Constructing thermophysicalFunction"
             << endl;
     }
 
diff --git a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C
index d3befc22e796be04144766286acddf7b510073af..ec1834fa46007529e02d81c58f1c7bb6a067596b 100644
--- a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C
+++ b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers()
      || topoChanger_.size()
     )
     {
-        Info<< "void linearValveFvMesh::addZonesAndModifiers() : "
+        InfoInFunction
             << "Zones and modifiers already present.  Skipping."
             << endl;
 
diff --git a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C
index 094e09006fc90088bed8da1a0e6142588767bc92..c86a550eb056cdc14f737110dc3bd3f8c22cb646 100644
--- a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C
+++ b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers()
      || topoChanger_.size()
     )
     {
-        Info<< "void linearValveLayersFvMesh::addZonesAndModifiers() : "
+        InfoInFunction
             << "Zones and modifiers already present.  Skipping."
             << endl;
 
@@ -417,13 +417,12 @@ void Foam::linearValveLayersFvMesh::update()
     setMorphTimeIndex(3*time().timeIndex() + 2);
     updateMesh();
 
-    Info<< "Moving points post slider attach" << endl;
-//     const pointField p = allPoints();
-//     movePoints(p);
+    //Info<< "Moving points post slider attach" << endl;
+    //const pointField p = allPoints();
+    //movePoints(p);
 
     Info<< "Sliding interfaces coupled: " << attached() << endl;
 }
 
 
 // ************************************************************************* //
-
diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C
index 9d329ba083ca67834c441a0cdf4fcbca1b44c378..f67b6cdd459bd1c4c9d2311d46aebc8c0f29833e 100644
--- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C
+++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -54,7 +54,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
      || topoChanger_.size()
     )
     {
-        Info<< "void mixerFvMesh::addZonesAndModifiers() : "
+        InfoInFunction
             << "Zones and modifiers already present.  Skipping."
             << endl;
 
@@ -196,7 +196,7 @@ void Foam::mixerFvMesh::calcMovingMasks() const
 {
     if (debug)
     {
-        Info<< "void mixerFvMesh::calcMovingMasks() const : "
+        InfoInFunction
             << "Calculating point and cell masks"
             << endl;
     }
@@ -356,7 +356,7 @@ bool Foam::mixerFvMesh::update()
     {
         if (debug)
         {
-            Info<< "Mesh topology is changing" << endl;
+            InfoInFunction << "Mesh topology is changing" << endl;
         }
 
         deleteDemandDrivenData(movingPointsMaskPtr_);
diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
index 0ed9d4625d17b6e7ec462cc8fd80f04c90ca6872..747a1c0edf21695b04533e8d9eadbb36710d07f0 100644
--- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
+++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -59,7 +59,7 @@ Foam::tmp<Foam::scalarField> Foam::movingConeTopoFvMesh::vertexMarkup
         << curLeft << " curRight: " << curRight << endl;
 
     tmp<scalarField> tvertexMarkup(new scalarField(p.size()));
-    scalarField& vertexMarkup = tvertexMarkup();
+    scalarField& vertexMarkup = tvertexMarkup.ref();
 
     forAll(p, pI)
     {
@@ -93,7 +93,7 @@ void Foam::movingConeTopoFvMesh::addZonesAndModifiers()
      || topoChanger_.size()
     )
     {
-        Info<< "void movingConeTopoFvMesh::addZonesAndModifiers() : "
+        InfoInFunction
             << "Zones and modifiers already present.  Skipping."
             << endl;
 
@@ -337,48 +337,6 @@ bool Foam::movingConeTopoFvMesh::update()
         if (topoChangeMap().hasMotionPoints())
         {
             Info<< "Topology change. Has premotion points" << endl;
-            //Info<< "preMotionPoints:" << topoChangeMap().preMotionPoints()
-            //    << endl;
-
-            //mkDir(time().timePath());
-            //{
-            //    OFstream str(time().timePath()/"meshPoints.obj");
-            //    Pout<< "Writing mesh with meshPoints to " << str.name()
-            //        << endl;
-            //
-            //    const pointField& currentPoints = points();
-            //    label vertI = 0;
-            //    forAll(currentPoints, pointI)
-            //    {
-            //        meshTools::writeOBJ(str, currentPoints[pointI]);
-            //        vertI++;
-            //    }
-            //    forAll(edges(), edgeI)
-            //    {
-            //        const edge& e = edges()[edgeI];
-            //        str << "l " << e[0]+1 << ' ' << e[1]+1 << nl;
-            //    }
-            //}
-            //{
-            //    OFstream str(time().timePath()/"preMotionPoints.obj");
-            //    Pout<< "Writing mesh with preMotionPoints to " << str.name()
-            //        << endl;
-            //
-            //    const pointField& newPoints =
-            //        topoChangeMap().preMotionPoints();
-            //    label vertI = 0;
-            //    forAll(newPoints, pointI)
-            //    {
-            //        meshTools::writeOBJ(str, newPoints[pointI]);
-            //        vertI++;
-            //    }
-            //    forAll(edges(), edgeI)
-            //    {
-            //        const edge& e = edges()[edgeI];
-            //        str << "l " << e[0]+1 << ' ' << e[1]+1 << nl;
-            //    }
-            //}
-
 
             motionMask_ =
                 vertexMarkup
diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.H b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.H
index 7fb05ce05b066c79500cb08578cea15acaac1fb1..250b70d0b4295f4fde3ad07d5dc0be57b74620b1 100644
--- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.H
+++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -105,7 +105,7 @@ public:
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef NoRepository
-#   include "rawTopoChangerFvMeshTemplates.C"
+    #include "rawTopoChangerFvMeshTemplates.C"
 #endif
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C
index f47a642e3bb40a428651ec3d512e02f1eeaf78ba..0dee7077b7981cabfa06f45d953fffae7807b914 100644
--- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C
+++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -96,7 +96,7 @@ void Foam::rawTopoChangerFvMesh::zeroUnmappedValues
                     false
                 ),
                 *this,
-                dimensioned<Type>("0", fld.dimensions(), pTraits<Type>::zero)
+                dimensioned<Type>("0", fld.dimensions(), Zero)
             )
         );
     }
diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake
index 1d9598d43657ed71c4e70cc3e435c0168ed52a34..c580b5bbe7332ffadd83894352579213f329ff4e 100755
--- a/src/transportModels/Allwmake
+++ b/src/transportModels/Allwmake
@@ -13,4 +13,4 @@ wmake $targetType incompressible
 wmake $targetType compressible
 wmake $targetType immiscibleIncompressibleTwoPhaseMixture
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C
index 3d59eda215dde59549d14d6c6736997fd157ff5d..ad110c26e937fffa072e696c8a5ada631f3d10e2 100644
--- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C
+++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -38,7 +38,6 @@ namespace Foam
 
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
 
-//- Calculate and return the laminar viscosity
 void Foam::incompressibleTwoPhaseMixture::calcNu()
 {
     nuModel1_->correct();
@@ -142,6 +141,14 @@ Foam::incompressibleTwoPhaseMixture::mu() const
 }
 
 
+Foam::tmp<Foam::scalarField>
+Foam::incompressibleTwoPhaseMixture::mu(const label patchI) const
+{
+
+    return mu()().boundaryField()[patchI];
+}
+
+
 Foam::tmp<Foam::surfaceScalarField>
 Foam::incompressibleTwoPhaseMixture::muf() const
 {
diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H
index 6928f50b58ecad5c5510256c73c69ba8eaa09f56..e867e5be75d219b915f6ba543241bc85621fde7d 100644
--- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H
+++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -133,6 +133,9 @@ public:
         //- Return the dynamic laminar viscosity
         tmp<volScalarField> mu() const;
 
+        //- Return the dynamic laminar viscosity on patch
+        tmp<scalarField> mu(const label patchI) const;
+
         //- Return the face-interpolated dynamic laminar viscosity
         tmp<surfaceScalarField> muf() const;
 
diff --git a/src/transportModels/twoPhaseProperties/Make/files b/src/transportModels/twoPhaseProperties/Make/files
index 5457dcde52ee36829f67325f5ce4cc5f0d735762..2e5b03ff0e2499523e6a06f4ad3cdf5a29f61cf3 100644
--- a/src/transportModels/twoPhaseProperties/Make/files
+++ b/src/transportModels/twoPhaseProperties/Make/files
@@ -1,5 +1,6 @@
 alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
 alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
+alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C
 alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C
 alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C
 alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
index f183641e461fe1495c87ae07fd0e361a5c813c43..78bd0115271c8e7c032a9be641bcafec1aa5f17b 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,9 +24,9 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "alphaContactAngleFvPatchScalarField.H"
-#include "addToRunTimeSelectionTable.H"
 #include "fvPatchFieldMapper.H"
 #include "volMesh.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -69,19 +69,6 @@ Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 {}
 
 
-Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
-(
-    const alphaContactAngleFvPatchScalarField& acpsf,
-    const fvPatch& p,
-    const DimensionedField<scalar, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
-)
-:
-    fixedGradientFvPatchScalarField(acpsf, p, iF, mapper),
-    limit_(acpsf.limit_)
-{}
-
-
 Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 (
     const fvPatch& p,
@@ -106,6 +93,19 @@ Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 }
 
 
+Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
+(
+    const alphaContactAngleFvPatchScalarField& acpsf,
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    fixedGradientFvPatchScalarField(acpsf, p, iF, mapper),
+    limit_(acpsf.limit_)
+{}
+
+
 Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
 (
     const alphaContactAngleFvPatchScalarField& acpsf
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
index 95f51483fca0ea909b10347cc46be656209a68a9..550868bf4573b30203ca1ae3076ada2d1b50c24c 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -35,30 +35,25 @@ Description
 
     The essential entry "limit" controls the gradient of alpha1 on the wall:
 
-    limit none;         // Calculate the gradient from the contact-angle without
-                        // limiter
-
-    limit gradient;     // Limit the wall-gradient such that alpha1 remains
-                        // bounded on the wall
-
-    limit alpha;        // Bound the calculated alpha1 on the wall
-
-    limit zeroGradient; // Set the gradient of alpha1 to 0 on the wall
-                        // i.e. reproduce previous behaviour
+    \li \c none - Calculate the gradient from the contact-angle without limiter
+    \li \c gradient - Limit the wall-gradient such that alpha1 remains bounded
+        on the wall
+    \li \c alpha - Bound the calculated alpha1 on the wall
+    \li \c zeroGradient - Set the gradient of alpha1 to 0 on the wall, i.e.
+        reproduce previous behaviour, the pressure BCs can be left as before.
 
     Note that if any of the first three options are used the boundary condition
-    on p_rgh must set to guarantee that the flux is corrected to be zero at the
-    wall e.g.
+    on \c p_rgh must set to guarantee that the flux is corrected to be zero at
+    the wall e.g.:
 
     \verbatim
     myPatch
     {
         type            alphaContactAngle;
+        limit           none;
     }
     \endverbatim
 
-    If "limit zeroGradient;" is used the pressure BCs can be left as before.
-
 SourceFiles
     alphaContactAngleFvPatchScalarField.C
 
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
index ea35d3999cfc23af7cd1d7d1ab1ae94f0726acec..c94e36ce778adc61ee8581701f93557a4f13134e 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,9 +24,9 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "constantAlphaContactAngleFvPatchScalarField.H"
-#include "addToRunTimeSelectionTable.H"
 #include "volMesh.H"
 #include "fvPatchFieldMapper.H"
+#include "addToRunTimeSelectionTable.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -45,30 +45,30 @@ constantAlphaContactAngleFvPatchScalarField
 Foam::constantAlphaContactAngleFvPatchScalarField::
 constantAlphaContactAngleFvPatchScalarField
 (
-    const constantAlphaContactAngleFvPatchScalarField& gcpsf,
     const fvPatch& p,
     const DimensionedField<scalar, volMesh>& iF,
-    const fvPatchFieldMapper& mapper
+    const dictionary& dict
 )
 :
-    alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper),
-    theta0_(gcpsf.theta0_)
-{}
+    alphaContactAngleFvPatchScalarField(p, iF, dict),
+    theta0_(readScalar(dict.lookup("theta0")))
+{
+    evaluate();
+}
 
 
 Foam::constantAlphaContactAngleFvPatchScalarField::
 constantAlphaContactAngleFvPatchScalarField
 (
+    const constantAlphaContactAngleFvPatchScalarField& gcpsf,
     const fvPatch& p,
     const DimensionedField<scalar, volMesh>& iF,
-    const dictionary& dict
+    const fvPatchFieldMapper& mapper
 )
 :
-    alphaContactAngleFvPatchScalarField(p, iF, dict),
-    theta0_(readScalar(dict.lookup("theta0")))
-{
-    evaluate();
-}
+    alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper),
+    theta0_(gcpsf.theta0_)
+{}
 
 
 Foam::constantAlphaContactAngleFvPatchScalarField::
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H
index 02eaf6b352cf30b024c26a9057561693539b64f2..7ce340390e62190b4937ce102dbc694ab4c7275e 100644
--- a/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -25,8 +25,11 @@ Class
     Foam::constantAlphaContactAngleFvPatchScalarField
 
 Description
-    A constant alphaContactAngle scalar boundary condition
-    (alphaContactAngleFvPatchScalarField)
+    A constant alphaContactAngle scalar boundary condition.
+
+SeeAlso
+    Foam::alphaContactAngleFvPatchScalarField
+    Foam::temperatureDependentAlphaContactAngleFvPatchScalarField
 
 SourceFiles
     constantAlphaContactAngleFvPatchScalarField.C
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C
new file mode 100644
index 0000000000000000000000000000000000000000..5eba3cc0b6c371746f979128a3aa7fe8e86c456b
--- /dev/null
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.C
@@ -0,0 +1,141 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "temperatureDependentAlphaContactAngleFvPatchScalarField.H"
+#include "fvPatchFieldMapper.H"
+#include "volFields.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
+temperatureDependentAlphaContactAngleFvPatchScalarField
+(
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF
+)
+:
+    alphaContactAngleFvPatchScalarField(p, iF),
+    TName_("T"),
+    theta0_()
+{}
+
+
+Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
+temperatureDependentAlphaContactAngleFvPatchScalarField
+(
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF,
+    const dictionary& dict
+)
+:
+    alphaContactAngleFvPatchScalarField(p, iF, dict),
+    TName_(dict.lookupOrDefault<word>("T", "T")),
+    theta0_(Function1<scalar>::New("theta0", dict))
+{
+    evaluate();
+}
+
+
+Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
+temperatureDependentAlphaContactAngleFvPatchScalarField
+(
+    const temperatureDependentAlphaContactAngleFvPatchScalarField& psf,
+    const fvPatch& p,
+    const DimensionedField<scalar, volMesh>& iF,
+    const fvPatchFieldMapper& mapper
+)
+:
+    alphaContactAngleFvPatchScalarField(psf, p, iF, mapper),
+    TName_(psf.TName_),
+    theta0_(psf.theta0_, false)
+{}
+
+
+Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
+temperatureDependentAlphaContactAngleFvPatchScalarField
+(
+    const temperatureDependentAlphaContactAngleFvPatchScalarField& psf
+)
+:
+    alphaContactAngleFvPatchScalarField(psf),
+    TName_(psf.TName_),
+    theta0_(psf.theta0_, false)
+{}
+
+
+Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
+temperatureDependentAlphaContactAngleFvPatchScalarField
+(
+    const temperatureDependentAlphaContactAngleFvPatchScalarField& psf,
+    const DimensionedField<scalar, volMesh>& iF
+)
+:
+    alphaContactAngleFvPatchScalarField(psf, iF),
+    TName_(psf.TName_),
+    theta0_(psf.theta0_, false)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::tmp<Foam::scalarField>
+Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::theta
+(
+    const fvPatchVectorField&,
+    const fvsPatchVectorField&
+) const
+{
+    return theta0_->value
+    (
+        patch().lookupPatchField<volScalarField, scalar>(TName_)
+    );
+}
+
+
+void Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::write
+(
+    Ostream& os
+) const
+{
+    alphaContactAngleFvPatchScalarField::write(os);
+    writeEntryIfDifferent<word>(os, "T", "T", TName_);
+    theta0_->writeData(os);
+    writeEntry("value", os);
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+    makePatchTypeField
+    (
+        fvPatchScalarField,
+        temperatureDependentAlphaContactAngleFvPatchScalarField
+    );
+}
+
+// ************************************************************************* //
diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H
new file mode 100644
index 0000000000000000000000000000000000000000..4725daa9c9fd7631303e7a8ef44c06cabbc4f0d9
--- /dev/null
+++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H
@@ -0,0 +1,182 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is part of OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::temperatureDependentAlphaContactAngleFvPatchScalarField
+
+Description
+    Temperature-dependent constant alphaContactAngle scalar boundary condition.
+
+    \heading Patch usage
+
+    \table
+        Property     | Description             | Required    | Default value
+        TName        | Temperature field name  | no          | T
+        theta0       | Contact angle data      | yes         |
+    \endtable
+
+    Example of the boundary condition specification:
+    \verbatim
+    myPatch
+    {
+        type            temperatureDependentAlphaContactAngle;
+        theta0          constant 60;
+    }
+    \endverbatim
+
+SeeAlso
+    Foam::alphaContactAngleFvPatchScalarField
+    Foam::constantAlphaContactAngleFvPatchScalarField
+
+SourceFiles
+    temperatureDependentAlphaContactAngleFvPatchScalarField.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef temperatureDependentAlphaContactAngleFvPatchScalarField_H
+#define temperatureDependentAlphaContactAngleFvPatchScalarField_H
+
+#include "alphaContactAngleFvPatchScalarField.H"
+#include "Function1.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+       Class temperatureDependentAlphaContactAngleFvPatch Declaration
+\*---------------------------------------------------------------------------*/
+
+class temperatureDependentAlphaContactAngleFvPatchScalarField
+:
+    public alphaContactAngleFvPatchScalarField
+{
+    // Private data
+
+        //- Name of temperature field, default = "T"
+        word TName_;
+
+        //- Equilibrium contact angle table
+        autoPtr<Function1<scalar>> theta0_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("temperatureDependentAlphaContactAngle");
+
+
+    // Constructors
+
+        //- Construct from patch and internal field
+        temperatureDependentAlphaContactAngleFvPatchScalarField
+        (
+            const fvPatch&,
+            const DimensionedField<scalar, volMesh>&
+        );
+
+        //- Construct from patch, internal field and dictionary
+        temperatureDependentAlphaContactAngleFvPatchScalarField
+        (
+            const fvPatch&,
+            const DimensionedField<scalar, volMesh>&,
+            const dictionary&
+        );
+
+        //- Construct by mapping given
+        //  temperatureDependentAlphaContactAngleFvPatchScalarField
+        //  onto a new patch
+        temperatureDependentAlphaContactAngleFvPatchScalarField
+        (
+            const temperatureDependentAlphaContactAngleFvPatchScalarField&,
+            const fvPatch&,
+            const DimensionedField<scalar, volMesh>&,
+            const fvPatchFieldMapper&
+        );
+
+        //- Construct as copy
+        temperatureDependentAlphaContactAngleFvPatchScalarField
+        (
+            const temperatureDependentAlphaContactAngleFvPatchScalarField&
+        );
+
+        //- Construct and return a clone
+        virtual tmp<fvPatchScalarField> clone() const
+        {
+            return tmp<fvPatchScalarField>
+            (
+                new temperatureDependentAlphaContactAngleFvPatchScalarField
+                (
+                    *this
+                )
+            );
+        }
+
+        //- Construct as copy setting internal field reference
+        temperatureDependentAlphaContactAngleFvPatchScalarField
+        (
+            const temperatureDependentAlphaContactAngleFvPatchScalarField&,
+            const DimensionedField<scalar, volMesh>&
+        );
+
+        //- Construct and return a clone setting internal field reference
+        virtual tmp<fvPatchScalarField> clone
+        (
+            const DimensionedField<scalar, volMesh>& iF
+        ) const
+        {
+            return tmp<fvPatchScalarField>
+            (
+                new temperatureDependentAlphaContactAngleFvPatchScalarField
+                (
+                    *this,
+                    iF
+                )
+            );
+        }
+
+
+    // Member functions
+
+        //- Return the equilibrium contact-angle
+        virtual tmp<scalarField> theta
+        (
+            const fvPatchVectorField& Up,
+            const fvsPatchVectorField& nHat
+        ) const;
+
+        //- Write
+        virtual void write(Ostream&) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/triSurface/faceTriangulation/faceTriangulation.C b/src/triSurface/faceTriangulation/faceTriangulation.C
index ddf905f06ba9e29434dd1c520679385be103a9f5..c34dbb1ac5b53dadd1b574ed81810e9dfd6a3bdb 100644
--- a/src/triSurface/faceTriangulation/faceTriangulation.C
+++ b/src/triSurface/faceTriangulation/faceTriangulation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ Foam::tmp<Foam::vectorField> Foam::faceTriangulation::calcEdges
 )
 {
     tmp<vectorField> tedges(new vectorField(f.size()));
-    vectorField& edges = tedges();
+    vectorField& edges = tedges.ref();
 
     forAll(f, i)
     {
@@ -218,7 +218,7 @@ void Foam::faceTriangulation::findDiagonal
 
     label faceVertI = f.fcIndex(startIndex);
 
-    pointHit minInter(false, vector::zero, GREAT, true);
+    pointHit minInter(false, Zero, GREAT, true);
     label minIndex = -1;
     scalar minPosOnEdge = GREAT;
 
diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
index 6c41d5db82c3f0ce94b1ecf97f4b9acad9eb4d9f..3c4d2fdb665f28b210a70650592429f4a01f7208 100644
--- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
+++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -55,7 +55,7 @@ int yyFlexLexer::yylex()
 // It is called by yylex but is not used as the mechanism to change file.
 // See <<EOF>>
 //! \cond dummy
-#if YY_FLEX_SUBMINOR_VERSION < 34
+#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34
 extern "C" int yywrap()
 #else
 int yyFlexLexer::yywrap()
diff --git a/src/triSurface/triSurface/interfaces/VTK/readVTK.C b/src/triSurface/triSurface/interfaces/VTK/readVTK.C
index a5ffc2e247cd59e4945bcb60befcf69896cddff3..f4f026979c4e5d7dd5f603be05bbc5ba8a54e3ba 100644
--- a/src/triSurface/triSurface/interfaces/VTK/readVTK.C
+++ b/src/triSurface/triSurface/interfaces/VTK/readVTK.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2012-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -97,7 +97,7 @@ bool Foam::triSurface::readVTK(const fileName& fName)
     (
         tris.xfer(),
         patches,
-        xferCopy<List<point> >(surf.points())
+        xferCopy<List<point>>(surf.points())
     );
 
     return true;
diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C
index 5bb5139aac695cce763465b0b43e690ad2d8c9a1..7946ae338ff33516b59c0c5f4c7947a92f00d233 100644
--- a/src/triSurface/triSurface/triSurface.C
+++ b/src/triSurface/triSurface/triSurface.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -620,10 +620,10 @@ Foam::triSurface::triSurface
     List<labelledTri>& triangles,
     const geometricSurfacePatchList& patches,
     pointField& points,
-    const bool reUse
+    const bool reuse
 )
 :
-    ParentType(triangles, points, reUse),
+    ParentType(triangles, points, reuse),
     patches_(patches),
     sortedEdgeFacesPtr_(NULL),
     edgeOwnerPtr_(NULL)
@@ -632,9 +632,9 @@ Foam::triSurface::triSurface
 
 Foam::triSurface::triSurface
 (
-    const Xfer<List<labelledTri> >& triangles,
+    const Xfer<List<labelledTri>>& triangles,
     const geometricSurfacePatchList& patches,
-    const Xfer<List<point> >& points
+    const Xfer<List<point>>& points
 )
 :
     ParentType(triangles, points),
diff --git a/src/triSurface/triSurface/triSurface.H b/src/triSurface/triSurface/triSurface.H
index a1bc21686708f472c95ed065313ca2e3905924f6..1d8629f3606086b6cbe89414dbe225f5cce87304 100644
--- a/src/triSurface/triSurface/triSurface.H
+++ b/src/triSurface/triSurface/triSurface.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -259,15 +259,15 @@ public:
             List<labelledTri>&,
             const geometricSurfacePatchList&,
             pointField&,
-            const bool reUse
+            const bool reuse
         );
 
         //- Construct from triangles, patches, points.
         triSurface
         (
-            const Xfer<List<labelledTri> >&,
+            const Xfer<List<labelledTri>>&,
             const geometricSurfacePatchList&,
-            const Xfer<List<point> >&
+            const Xfer<List<point>>&
         );
 
         //- Construct from triangles, points. Set patchnames to default.
diff --git a/tutorials/Allclean b/tutorials/Allclean
index 6b290ed0eb0f53ac23d7d10d45af849cb919218c..b66c19975f440fc6219dc0f12b5e188fffa8d8c2 100755
--- a/tutorials/Allclean
+++ b/tutorials/Allclean
@@ -13,4 +13,4 @@ foamCleanTutorials cases
 
 echo "--------"
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/Allrun b/tutorials/Allrun
index f0928d670acaa1da492842afbbc06b85ad27f6a1..1f8f12eec0eef92d116e823efe2b7e1680928af5 100755
--- a/tutorials/Allrun
+++ b/tutorials/Allrun
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -38,7 +38,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 logReport()
 {
     caseName=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
-    app=`echo $1 | sed s/"\(.*\)\."/""/g`
+    app=`echo $1 | sed s/"\(.*\)log\."/""/g`
     appAndCase="Application $app - case $caseName"
 
     fatalError=`grep "FOAM FATAL" $1`
@@ -93,4 +93,4 @@ done
 
 find . -name "log.*" -exec cat {} \; >> logs
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/Alltest b/tutorials/Alltest
index e383f771fd03701afea33bcd0aac119f7232fe25..59cf18f3d05257d79249b24e7715a0bcf388413a 100755
--- a/tutorials/Alltest
+++ b/tutorials/Alltest
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -238,4 +238,4 @@ do
     echo "" >> $SOLVERS_FILE
 done
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/DNS/dnsFoam/boxTurb16/Allclean b/tutorials/DNS/dnsFoam/boxTurb16/Allclean
index 0d748a1174476b3a8f213119b5c90acf7eba073b..d3bb35319566f89a63cf4f7a9b1fba5ec5f1b31d 100755
--- a/tutorials/DNS/dnsFoam/boxTurb16/Allclean
+++ b/tutorials/DNS/dnsFoam/boxTurb16/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -f 0/enstrophy
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/DNS/dnsFoam/boxTurb16/Allrun b/tutorials/DNS/dnsFoam/boxTurb16/Allrun
index 72f7110e0fd755200d8eada158c07b73fd03e50a..26449db3a86ff39b2e88eb7d332687b7aa00fa7a 100755
--- a/tutorials/DNS/dnsFoam/boxTurb16/Allrun
+++ b/tutorials/DNS/dnsFoam/boxTurb16/Allrun
@@ -12,4 +12,4 @@ runApplication boxTurb
 runApplication $application
 runApplication enstrophy
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/laplacianFoam/flange/Allclean b/tutorials/basic/laplacianFoam/flange/Allclean
index e6ee925badbcc759662954710fb4f84330ceaf65..c9b3f9f8d41e9647d312e1aad8b34642fb4b86f3 100755
--- a/tutorials/basic/laplacianFoam/flange/Allclean
+++ b/tutorials/basic/laplacianFoam/flange/Allclean
@@ -8,4 +8,4 @@ cleanCase
 rm -rf EnSight Ensight Fieldview > /dev/null 2>&1
 rm -f constant/polyMesh/boundary > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/laplacianFoam/flange/Allrun b/tutorials/basic/laplacianFoam/flange/Allrun
index 840fbd30c0ecc869918ac53a06c0663a61347e22..89c210c48c76536bb44da5b7dd3e198d7c1795d9 100755
--- a/tutorials/basic/laplacianFoam/flange/Allrun
+++ b/tutorials/basic/laplacianFoam/flange/Allrun
@@ -24,4 +24,4 @@ runApplication foamToEnsight
 runApplication foamToEnsightParts
 runApplication foamToVTK
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/cylinder/Allclean b/tutorials/basic/potentialFoam/cylinder/Allclean
index edd5fd5440afc3b32c9f9c0458c567b18f930a5f..5734444f4e74e87d3d685ad82df35bcb7e3b300e 100755
--- a/tutorials/basic/potentialFoam/cylinder/Allclean
+++ b/tutorials/basic/potentialFoam/cylinder/Allclean
@@ -8,4 +8,4 @@ rm -rf 0 > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/cylinder/Allrun b/tutorials/basic/potentialFoam/cylinder/Allrun
index 5f79f4c22980c4a8fa364dfb3f711cbf6a3b8af2..d8a1591738f2fa09a5413049a8b7d28190e12119 100755
--- a/tutorials/basic/potentialFoam/cylinder/Allrun
+++ b/tutorials/basic/potentialFoam/cylinder/Allrun
@@ -11,4 +11,4 @@ runApplication blockMesh
 runApplication $application -withFunctionObjects -writePhi -writep
 runApplication streamFunction
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/pitzDaily/0.org/U b/tutorials/basic/potentialFoam/pitzDaily/0.org/U
index f1b983008d55f18c2b5cf3a1b58137217665f41f..dd690bd6b810771a291d6852480fd65ac5fc7953 100644
--- a/tutorials/basic/potentialFoam/pitzDaily/0.org/U
+++ b/tutorials/basic/potentialFoam/pitzDaily/0.org/U
@@ -33,14 +33,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allclean b/tutorials/basic/potentialFoam/pitzDaily/Allclean
index edd5fd5440afc3b32c9f9c0458c567b18f930a5f..5734444f4e74e87d3d685ad82df35bcb7e3b300e 100755
--- a/tutorials/basic/potentialFoam/pitzDaily/Allclean
+++ b/tutorials/basic/potentialFoam/pitzDaily/Allclean
@@ -8,4 +8,4 @@ rm -rf 0 > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allrun b/tutorials/basic/potentialFoam/pitzDaily/Allrun
index ea05ecadcb4eed1ff0b8cd9f8ebc7eab78209a83..3383ef1dad75f515d9f84bf358665b43d3efcd4e 100755
--- a/tutorials/basic/potentialFoam/pitzDaily/Allrun
+++ b/tutorials/basic/potentialFoam/pitzDaily/Allrun
@@ -11,4 +11,4 @@ runApplication blockMesh
 runApplication $application -writePhi -writep
 runApplication streamFunction
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/basic/scalarTransportFoam/pitzDaily/0/U b/tutorials/basic/scalarTransportFoam/pitzDaily/0/U
index 4ad2d1672b790487a045187233188180a8fd86cc..3759c18d82b9eaedb3c60b988558373eb8832f21 100644
--- a/tutorials/basic/scalarTransportFoam/pitzDaily/0/U
+++ b/tutorials/basic/scalarTransportFoam/pitzDaily/0/U
@@ -12262,14 +12262,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U
index 8ae84eb32438d3f62a64f4ce84a4c983139134b6..a5b9a07a1122e665669fc360477105cb4337094e 100644
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U
@@ -29,13 +29,11 @@ boundaryField
     }
     ground
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     blockedFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     baffleWall
     {
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
index 3772d5150b1d36ccedf96f3d72fbd446120e2c1e..bfa08cad4b3bdce3b6880daed797713330a92724 100755
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allclean
@@ -13,4 +13,4 @@ rm -rf constant/polyMesh/points
 rm -rf constant/polyMesh/owner
 rm -rf constant/polyMesh/neighbour
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
index 67e2561bcc1e00a5436c80fa8ffc0956aa1ffb31..e00af435e67ec22103c9afd04b6c2f0308f84673 100755
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
@@ -16,4 +16,4 @@ runApplication PDRMesh -overwrite
 # Run
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Su b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Su
index 8a985a8c93fdd5d20a068a20f05db953d22a2af9..05abdb1211bbe959cae384bae36f9f323a333265 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Su
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Su
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/T b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/T
index 808e946efc632d6abd26bac359b808c48f56b230..6632f3a00aa2890b3ba645abcd7aff81db0f5f07 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/T
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/T
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Tu b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Tu
index 91a582f9b2d01dfd35f076acfc2b2800416b83a6..53677df70178a7bde295c99527ad4034350d677f 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Tu
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Tu
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/U b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/U
index 030e7304256f739005cb38fd77df8ee6890683c0..5cece76bbce6bd98cdd779fff15623582ab96ac9 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/U
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/U
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Xi b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Xi
index 2c82712ead216e4a2cb1f2d3ab16e6b3163311c9..cd6b58ed7504d7ab9c9be0ef2da5c4d180805b9d 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Xi
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/Xi
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/alphat b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/alphat
index 976101414961a55ce54284dc6d45fe02fb88a9d0..09f0b475a039bff2a8ad763632433b97d4b83a07 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/alphat
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/alphat
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,10 +26,12 @@ boundaryField
     inlet
     {
         type            calculated;
+        value           $internalField;
     }
     outlet
     {
         type            calculated;
+        value           $internalField;
     }
     wall
     {
@@ -38,6 +40,7 @@ boundaryField
         //value           $internalField;
 
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/b b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/b
index 2be4bf9c2367f113e1713b51eddcbfe0ab269f09..fc2816f9c815291590dac1d8cc6325497bcb32c7 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/b
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/b
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/ft b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/ft
index 60d897a688a15e61c54dea84b776ccf415bf656a..9cc8bf0958cd62921e42529d1bca3f0faa627d49 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/ft
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/ft
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/k b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/k
index f1af4c8133dbee11a8268c078317007f51f0f0a7..61a91909ceafd20830fb8e03f78028ee0adb6421 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/k
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/k
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/nut b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/nut
index 59650fd3d9acd9ef8f443f60937b1aec0f60f6b0..1a2cadee45f8981b848b336d57e0616468cae416 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/nut
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/nut
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,10 +26,12 @@ boundaryField
     inlet
     {
         type            calculated;
+        value           $internalField;
     }
     outlet
     {
         type            calculated;
+        value           $internalField;
     }
     wall
     {
@@ -37,6 +39,7 @@ boundaryField
         //value           $internalField;
 
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/p b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/p
index 23b4717001e73988b597b81ec8a69291a6feaab6..5efc7dc9bca0b943dfb1f70b43c64c3926953b90 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/p
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/p
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/pPotential b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/pPotential
index a23520366ef24cdaeec45d476699976b3f8b8a00..5a6e17f79f80beb5821fc34615a5341009ebe2a0 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/pPotential
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/0.org/pPotential
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
index 137b566fe22c4b7b75225cc715264b0046d12d1c..595770a6d1448cf428f609ff87b6bf002b9547de 100755
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun
@@ -10,10 +10,8 @@ rm -rf 0 && cp -r 0.org 0
 
 runApplication decomposePar -force
 
-n=$(echo processor* | wc -w)
-
-runParallel potentialFoam $n -pName pPotential -initialiseUBCs
+runParallel potentialFoam -pName pPotential -initialiseUBCs
 
 rm -f processor*/0/phi
 
-runParallel XiDyMFoam $n
+runParallel XiDyMFoam
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh
index 43192922b45810a921e260fb40b13c612c4535c0..27f296d69a3a392c3562ff8a138fc2f92fd792cd 100755
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun.mesh
@@ -8,14 +8,14 @@ rm -f log.* constant/polyMesh/*Level
 
 runApplication blockMesh
 
-runApplication -log log.createPatch.cyclic \
+runApplication -s cyclic \
     createPatch -dict system/createPatchDict.cyclic -overwrite
 
 runApplication snappyHexMesh -overwrite
 
 rm -rf 0
 
-runApplication -log log.createPatch.ami \
+runApplication -s ami \
     createPatch -dict system/createPatchDict.ami -overwrite
 
 runApplication transformPoints -scale '(0.01 0.01 0.01)'
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/combustionProperties b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/combustionProperties
index c4b75887e4bbf2a9269d4c3ca845e065c543b6e2..eca613ad55a514636bec0010dfb14fc78baef199 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/combustionProperties
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/combustionProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/g b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/g
index a52376e2b365ab6bdf0edaf9ee6710d8e87d7df0..e81abf3e675d85218fb2ece42593d73d8315d68e 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/g
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/g
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/thermophysicalProperties b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/thermophysicalProperties
index 29a6fead534ee9128764179570c903b8e50d28d3..3b50e446c1660488a1998e5bb29f38257a25d690 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/thermophysicalProperties
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/thermophysicalProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/turbulenceProperties b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/turbulenceProperties
index 2e5e5b4480e2b6c27f36a185a2048b3b742f6024..a936c141be03e988f5757f12229078f1707c4e01 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/turbulenceProperties
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/constant/turbulenceProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.ami b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.ami
index 4d81900c79279f54e100bcffcbfad90dcdf77b57..7052463e7b41bc78da1a57083d7c7c80622ce30e 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.ami
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.ami
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.1.x                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.cyclic b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.cyclic
index a794302a476c56596069fc12f6d48e0d9f13c0f4..704ce7ef6310225458dbaf050dd24d1fed1dd125 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.cyclic
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/createPatchDict.cyclic
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.1.x                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/decomposeParDict b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/decomposeParDict
index e2d4768fd47e9d99e3edee15982dd1cde4a440f6..3f544b2738469edd0f82fc37016d0e98b3e4fdb1 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/decomposeParDict
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSchemes b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSchemes
index b9f2b3d83c925c7d8c957aa697ebbd11d8287ed0..c035357a7de6821fbf61f316db4ddbb1f8a4f6ce 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSchemes
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSolution b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSolution
index 43248903df78c39dae72b196f99070d5b8c00657..79b943b73424732cdd93f0f96dbe8066ab4235e2 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSolution
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/meshQualityDict b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/meshQualityDict
index a5416329609a2063e1424c3f5cfee2ef3353a66a..255ac9e47e8fd1391994d07f5e53375f8f242469 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/meshQualityDict
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/meshQualityDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/snappyHexMeshDict b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/snappyHexMeshDict
index 0960aa715213fa527f2c7051c6100730c91fd4a4..e71d78cbd0d4831efc1c4a4837abf4e8bf2f6483 100644
--- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/snappyHexMeshDict
+++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/system/snappyHexMeshDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Su b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Su
index f04602c76e6509d8aac2b8ceabd1f8d6cef96c29..6b3c0e7757ec4b3bb8355791139578cc1b654ac9 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Su
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Su
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/T b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/T
index 72e2eacd9c9d8c00d85d90dcdab70b19168a5409..7096374e9bfa1eed81e6c5c14d9d8bc52df7ac56 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/T
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/T
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Tu b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Tu
index a0f6c23416635235e6fd1971ee69895b08930662..90e186763306c2eabb25155f898bd31dfc116ed3 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Tu
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Tu
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/U b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/U
index d72e121f4b16e3684e82cce2a829a37c5c61e06c..6ddf1849a9b755e99f3d1dcf063db5d8d57a279a 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/U
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/U
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Xi b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Xi
index 2e3916db131f1f5221a07badf411c154594e03b4..59adfc3d62a28798de2fc094844fb1fbd950294d 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Xi
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/Xi
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/alphat b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/alphat
index e1333cb73a7ea1727f6f657a0c96411ac241ada4..9477784ba3a8897ad419b4d5468adb607c16beb0 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/alphat
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/alphat
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/b b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/b
index a643a793209a427db796ffb90fbff66d2da8d37e..1b37814bb1299b202f2aac4f2c994ad174ae847f 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/b
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/b
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/epsilon b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/epsilon
index fddd53fa7edcf289103410ac569c34282482a25c..40308ce30a7cce67acfc0bb6d0afad3f3ebe84ca 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/epsilon
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/epsilon
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/ft b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/ft
index 2ec70b3e418917c297a22bac881c3fcbbcd2a814..76342f38788b4642d143730828663a67bc286199 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/ft
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/ft
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/k b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/k
index 8f3b312bb360d9cf7d4914abe164bdb8a2c4ed39..b9eff113bce72edaefe5f4c18bd5c649c7097cf5 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/k
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/k
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/nut b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/nut
index f9eef58ba875fc8f83d6c8bad2e41125205fdab1..d4e02be73400b09ee7e6a8c9d0f44e7fb2411a41 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/nut
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/nut
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/p b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/p
index a2597811d3371d08bbd358c167700f46ebcdf081..972fc3362ad123b7bc63fc3906b5ab96b5131ec8 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/p
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/p
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy
index fd4c761252a63c0b8b2548792d58543293082b61..3f687d1b4b6d0b5df6b156d9339eda9aa20fec74 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/0/pointDisplacementy
@@ -1,7 +1,7 @@
 /*---------------------------------------------------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/combustionProperties b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/combustionProperties
index 64315efb7b0bbf5d36da2a714db5d4dfa704ecaf..9d0175b575642324d4fe288042379117a70ea1f2 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/combustionProperties
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/combustionProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/g b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/g
index c5c44bde87b2e3574dd14a9e802d780091533d7b..e81abf3e675d85218fb2ece42593d73d8315d68e 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/g
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/g
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/polyMesh/blockMeshDict b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/polyMesh/blockMeshDict
index 08c9580ff035c33bdb55dd4cddd8d73408c94469..00a191e545782e3a096a2b93cda5003668e1403b 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/polyMesh/blockMeshDict
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/polyMesh/blockMeshDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/thermophysicalProperties b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/thermophysicalProperties
index aa818bc057ce9925ed800036bc4abb9016448cff..fed0a75edf171742a12072e7392c562332cb2639 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/thermophysicalProperties
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/thermophysicalProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/turbulenceProperties b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/turbulenceProperties
index ef08c4a188ed6b265a7c9bd0676bdb8995c6e778..8fe9b5ed38d3ed562c1cdf8fcc71b0a6ce10c8bc 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/turbulenceProperties
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/constant/turbulenceProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/controlDict b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/controlDict
index 9e126880eaf9bd4d0f8f771703949f445abf22d3..ee10c8c1608d7680b61161fdab0c58e3b1707f7f 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/controlDict
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/controlDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.1                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSchemes b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSchemes
index 1eddf3cbfab456da5ecd5bdd8f8cc7cad7851a98..1b7f1ba8f3cc3fe597344628cfa5160e4f6d6d47 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSchemes
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSolution b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSolution
index 61366e52fce5b3c2c92d9ad60216163fdf17f76f..79770c0d3c80ccbed4f89ebda3f8439f69802416 100644
--- a/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSolution
+++ b/tutorials/combustion/XiDyMFoam/oscillatingCylinder/system/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.3.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/XiFoam/ras/Allclean b/tutorials/combustion/XiFoam/ras/Allclean
index ec88313ccf09aa151f284c44098a9ac78334d361..edc01a252b9678bc3421b20a1717592078019239 100755
--- a/tutorials/combustion/XiFoam/ras/Allclean
+++ b/tutorials/combustion/XiFoam/ras/Allclean
@@ -21,4 +21,4 @@ do
     removeCase $caseName
 done
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/XiFoam/ras/Allrun b/tutorials/combustion/XiFoam/ras/Allrun
index 7079a11fc6883152ccc463ea9eb51f57036689d6..e1db61c60cdd1d1abc86274ec5fc80159e01ea76 100755
--- a/tutorials/combustion/XiFoam/ras/Allrun
+++ b/tutorials/combustion/XiFoam/ras/Allrun
@@ -51,4 +51,4 @@ cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
     runApplication `getApplication`
 )
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/gri/Allclean b/tutorials/combustion/chemFoam/gri/Allclean
index 24352b65b98006dca38a481be4b545d548655ff3..d1134cd3fc43a615d36c6e144fd518ee1348ee98 100755
--- a/tutorials/combustion/chemFoam/gri/Allclean
+++ b/tutorials/combustion/chemFoam/gri/Allclean
@@ -8,5 +8,5 @@ cleanCase
 
 \rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/gri/Allrun b/tutorials/combustion/chemFoam/gri/Allrun
index 8bc8e4c075f6729dd4bf06ff84a23f41e844a675..62adab28f3460c97ff3112e605c9fb2d5e5c8dcd 100755
--- a/tutorials/combustion/chemFoam/gri/Allrun
+++ b/tutorials/combustion/chemFoam/gri/Allrun
@@ -9,7 +9,6 @@ application=`getApplication`
 
 runApplication $application
 
-(cd validation && ./Allrun)
-
-# ----------------------------------------------------------------- end-of-file
+(cd validation && ./Allrun $*)
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/gri/validation/Allrun b/tutorials/combustion/chemFoam/gri/validation/Allrun
index ca399357b95c36b6a215dc3ca6b91301989415b8..0720352189f10e3469ea28e7dfa1e5060c4fcafc 100755
--- a/tutorials/combustion/chemFoam/gri/validation/Allrun
+++ b/tutorials/combustion/chemFoam/gri/validation/Allrun
@@ -9,6 +9,6 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 
 ./createGraph
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
 
diff --git a/tutorials/combustion/chemFoam/gri/validation/createGraph b/tutorials/combustion/chemFoam/gri/validation/createGraph
index 9e97ecfd50a61a8d88c8789270deadf7ff47d9b8..d0fb9cc013134e48bab35527cf51e043822d2de6 100755
--- a/tutorials/combustion/chemFoam/gri/validation/createGraph
+++ b/tutorials/combustion/chemFoam/gri/validation/createGraph
@@ -21,5 +21,5 @@ gnuplot<<EOF
         "chemkinII" with lines title "Chemkin II" lt -1
 EOF
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/h2/Allclean b/tutorials/combustion/chemFoam/h2/Allclean
index 24352b65b98006dca38a481be4b545d548655ff3..d1134cd3fc43a615d36c6e144fd518ee1348ee98 100755
--- a/tutorials/combustion/chemFoam/h2/Allclean
+++ b/tutorials/combustion/chemFoam/h2/Allclean
@@ -8,5 +8,5 @@ cleanCase
 
 \rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/h2/Allrun b/tutorials/combustion/chemFoam/h2/Allrun
index 8bc8e4c075f6729dd4bf06ff84a23f41e844a675..62adab28f3460c97ff3112e605c9fb2d5e5c8dcd 100755
--- a/tutorials/combustion/chemFoam/h2/Allrun
+++ b/tutorials/combustion/chemFoam/h2/Allrun
@@ -9,7 +9,6 @@ application=`getApplication`
 
 runApplication $application
 
-(cd validation && ./Allrun)
-
-# ----------------------------------------------------------------- end-of-file
+(cd validation && ./Allrun $*)
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/h2/validation/Allrun b/tutorials/combustion/chemFoam/h2/validation/Allrun
index ca399357b95c36b6a215dc3ca6b91301989415b8..0720352189f10e3469ea28e7dfa1e5060c4fcafc 100755
--- a/tutorials/combustion/chemFoam/h2/validation/Allrun
+++ b/tutorials/combustion/chemFoam/h2/validation/Allrun
@@ -9,6 +9,6 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 
 ./createGraph
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
 
diff --git a/tutorials/combustion/chemFoam/h2/validation/createGraph b/tutorials/combustion/chemFoam/h2/validation/createGraph
index 0053df1a9bc31bdda4814980c58585db22853bb6..bbb36218fac3bac5a198efc63ab7b3e3406c750a 100755
--- a/tutorials/combustion/chemFoam/h2/validation/createGraph
+++ b/tutorials/combustion/chemFoam/h2/validation/createGraph
@@ -21,5 +21,5 @@ gnuplot<<EOF
         "chemkinII" with lines title "Chemkin II" lt -1
 EOF
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allclean b/tutorials/combustion/chemFoam/ic8h18/Allclean
index 24352b65b98006dca38a481be4b545d548655ff3..d1134cd3fc43a615d36c6e144fd518ee1348ee98 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allclean
+++ b/tutorials/combustion/chemFoam/ic8h18/Allclean
@@ -8,5 +8,5 @@ cleanCase
 
 \rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allrun b/tutorials/combustion/chemFoam/ic8h18/Allrun
index 8bc8e4c075f6729dd4bf06ff84a23f41e844a675..62adab28f3460c97ff3112e605c9fb2d5e5c8dcd 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18/Allrun
@@ -9,7 +9,6 @@ application=`getApplication`
 
 runApplication $application
 
-(cd validation && ./Allrun)
-
-# ----------------------------------------------------------------- end-of-file
+(cd validation && ./Allrun $*)
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/ic8h18/validation/Allrun b/tutorials/combustion/chemFoam/ic8h18/validation/Allrun
index ca399357b95c36b6a215dc3ca6b91301989415b8..0720352189f10e3469ea28e7dfa1e5060c4fcafc 100755
--- a/tutorials/combustion/chemFoam/ic8h18/validation/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18/validation/Allrun
@@ -9,6 +9,6 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 
 ./createGraph
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
 
diff --git a/tutorials/combustion/chemFoam/ic8h18/validation/createGraph b/tutorials/combustion/chemFoam/ic8h18/validation/createGraph
index 9019192823ea8167530d83828915c182cfb7986f..4606eac7d3fba5bd5211c216e9bbfe5458b43868 100755
--- a/tutorials/combustion/chemFoam/ic8h18/validation/createGraph
+++ b/tutorials/combustion/chemFoam/ic8h18/validation/createGraph
@@ -21,5 +21,5 @@ gnuplot<<EOF
         "chemkinII" with lines title "Chemkin II" lt -1
 EOF
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allclean b/tutorials/combustion/chemFoam/nc7h16/Allclean
index 24352b65b98006dca38a481be4b545d548655ff3..d1134cd3fc43a615d36c6e144fd518ee1348ee98 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allclean
+++ b/tutorials/combustion/chemFoam/nc7h16/Allclean
@@ -8,5 +8,5 @@ cleanCase
 
 \rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allrun b/tutorials/combustion/chemFoam/nc7h16/Allrun
index 8bc8e4c075f6729dd4bf06ff84a23f41e844a675..62adab28f3460c97ff3112e605c9fb2d5e5c8dcd 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allrun
+++ b/tutorials/combustion/chemFoam/nc7h16/Allrun
@@ -9,7 +9,6 @@ application=`getApplication`
 
 runApplication $application
 
-(cd validation && ./Allrun)
-
-# ----------------------------------------------------------------- end-of-file
+(cd validation && ./Allrun $*)
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/nc7h16/validation/Allrun b/tutorials/combustion/chemFoam/nc7h16/validation/Allrun
index ca399357b95c36b6a215dc3ca6b91301989415b8..0720352189f10e3469ea28e7dfa1e5060c4fcafc 100755
--- a/tutorials/combustion/chemFoam/nc7h16/validation/Allrun
+++ b/tutorials/combustion/chemFoam/nc7h16/validation/Allrun
@@ -9,6 +9,6 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 
 ./createGraph
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
 
diff --git a/tutorials/combustion/chemFoam/nc7h16/validation/createGraph b/tutorials/combustion/chemFoam/nc7h16/validation/createGraph
index ab1432022f018e0d6ef191ecf1bea554e922e312..b2f8a4d9451e8f6f5e655385d0caaf41af56f011 100755
--- a/tutorials/combustion/chemFoam/nc7h16/validation/createGraph
+++ b/tutorials/combustion/chemFoam/nc7h16/validation/createGraph
@@ -21,5 +21,5 @@ gnuplot<<EOF
         "chemkinII" with lines title "Chemkin II" lt -1
 EOF
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
 
diff --git a/tutorials/combustion/engineFoam/kivaTest/-180/U b/tutorials/combustion/engineFoam/kivaTest/-180/U
index 6f69e9d5a53d6355555f26dc163f932969ed29fc..d30629029c532dbc9eb49392ac3d0cb46173608f 100644
--- a/tutorials/combustion/engineFoam/kivaTest/-180/U
+++ b/tutorials/combustion/engineFoam/kivaTest/-180/U
@@ -29,14 +29,12 @@ boundaryField
 
     liner
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     cylinderHead
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/combustion/engineFoam/kivaTest/Allclean b/tutorials/combustion/engineFoam/kivaTest/Allclean
index 6be1f524b7a6ca9e6c5c0773c679cd8d89bc2c2b..6904a7f0e6a19fcdbeeb9adb6fff02b5d3e1825b 100755
--- a/tutorials/combustion/engineFoam/kivaTest/Allclean
+++ b/tutorials/combustion/engineFoam/kivaTest/Allclean
@@ -12,4 +12,4 @@ rm -f constant/polyMesh/boundary > /dev/null 2>&1
 
 mv temp180 ./-180
 
-# ----------------------------------------------------------------- end-of-file
\ No newline at end of file
+#------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/tutorials/combustion/engineFoam/kivaTest/Allrun b/tutorials/combustion/engineFoam/kivaTest/Allrun
index 592be37ba2bb8b8ad0f05cfe2b8cc2f7631e2503..e51b7da7c0f9b0cc54a24d0bfd914104a9b47b10 100755
--- a/tutorials/combustion/engineFoam/kivaTest/Allrun
+++ b/tutorials/combustion/engineFoam/kivaTest/Allrun
@@ -11,4 +11,4 @@ runApplication kivaToFoam -file otape17
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/filmRegion/Uf b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/filmRegion/Uf
index fd95b8b03d2e114718a2f38b72f79a0c63e10488..d41bd78f70d54505f16000d8912caa8847ab62db 100644
--- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/filmRegion/Uf
+++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/0/filmRegion/Uf
@@ -28,8 +28,7 @@ boundaryField
 
     region0_to_filmRegion_coupledWall // Patch to pyrolysis
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     outlet
@@ -39,8 +38,7 @@ boundaryField
 
     "side.*"
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     inlet
diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allclean b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allclean
index 2484a49705ed8a212acae6ee08feb2dc6c273ecd..8f51891b2052a0bc7b0bf2705b50a3e447699a60 100755
--- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allclean
+++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allclean
@@ -11,4 +11,4 @@ rm -rf constant/pyrolysisRegion/polyMesh
 
 rm -rf system/pyrolysisRegion/filmRegion
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allrun b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allrun
index 5fa5f4af67f1bde7c02edfa49abc3019fa4a4e64..6101e96371cc712f6489b66f4394a08c1132f772 100755
--- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allrun
+++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/Allrun
@@ -38,4 +38,4 @@ runApplication `getApplication`
 
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
\ No newline at end of file
+#------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties
index 282703be6c111c1d11082acbc7aa294d832ca9ae..aff03571a82be3863a33483f00c3d1a68c7da817 100644
--- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties
+++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties
@@ -34,6 +34,11 @@ boundaryField
         absorptivity    uniform 1.0;
         transmissivity  uniform 0.0;
     }
+    "procBoundary.*"
+    {
+        type            processor;
+        value           $internalField;
+    }
 }
 
 // ************************************************************************* //
diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/N2 b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/N2
index 41a1fd23e770a82981fdcf59a39ccd5469e65c50..9869a8c1c867ca6408c4a53ace022fe4b9a572ed 100644
--- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/N2
+++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/N2
@@ -22,26 +22,31 @@ boundaryField
     top
     {
         type            calculated;
+        value           $internalField;
     }
 
     ground
     {
         type            calculated;
+        value           $internalField;
     }
 
     sides
     {
         type            calculated;
+        value           $internalField;
     }
 
     burner
     {
         type            calculated;
+        value           $internalField;
     }
 
     "(region0_to.*)"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allclean b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allclean
index 083e3d7ca00c5e69f81811b46ea40cbe5258188a..df17cd588d7312668bf46195994868a674d9c1e0 100755
--- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allclean
+++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allclean
@@ -10,4 +10,4 @@ rm -rf constant/panelRegion/polyMesh
 rm  -f 0/polyMesh/cellMap
 rm  -f constant/polyMesh/boundary
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun
index 2fe5ebd457e3f2bb764209d4e50d359956878d0d..63bace3c2cbb04b55c6bd92aca207d191e880bde 100755
--- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun
+++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun
@@ -9,32 +9,35 @@ application=`getApplication`
 
 runApplication blockMesh
 
-runApplication topoSet -dict system/cRefine.topoSetDict
+runApplication -s cRefine \
+    topoSet -dict system/cRefine.topoSetDict
+
 runApplication refineMesh -overwrite -dict system/refineMeshDict
 
-rm log.topoSet
-runApplication topoSet -dict system/f.topoSetDict
+runApplication -s f \
+    topoSet -dict system/f.topoSetDict
 
 # create the pyrolysis region.
 runApplication extrudeToRegionMesh -overwrite
 
-
-rm log.topoSet
-runApplication topoSet -dict system/fBurner.topoSetDict
+runApplication -s fBurner \
+    topoSet -dict system/fBurner.topoSetDict
 
 runApplication createPatch -overwrite
 
-# Decompose mesh, constant/boundaryRadiationProperties and fields
-decomposePar -force -constant > log.decomposePar 2>&1
+runApplication -s master \
+    decomposePar -force
 
-decomposePar -region panelRegion > log.decomposeParPanelRegion 2>&1
+runApplication -s panelRegion \
+    decomposePar -region panelRegion
 
-decomposePar -fields > log.decomposePar 2>&1
+runApplication -s fields \
+    decomposePar -fields
 
-runParallel `getApplication` 6
+runParallel `getApplication`
 
 paraFoam -touch
 paraFoam -touch -region panelRegion
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties
index 8ab0aff52cfb381d7bf021aa1552a3d6567ad898..996bc97139e1e557a9b58524294fdf745c7215e7 100644
--- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties
+++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties
@@ -20,7 +20,7 @@ internalField   uniform 0;
 
 boundaryField
 {
-     ".*"
+    ".*"
     {
         type            boundaryRadiation;
         mode            lookup;
@@ -33,6 +33,11 @@ boundaryField
         mode            solidRadiation;
         value           uniform 0;
     }
+    "procBoundary.*"
+    {
+        type            processor;
+        value           $internalField;
+    }
 }
 
 // ************************************************************************* //
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U
index 01f4b1399f60e1f155b446065bea4ca62737a7fe..ff03703ed49e545fc880f9129e305c931dff545c 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/U
@@ -31,8 +31,7 @@ boundaryField
 
     base
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     inlet
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/soot b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/soot
index 26d664667271c8aae887a7fe34f8a3d3376a435d..99aa578b2158726081e5be428b8ded3961dc7e57 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/soot
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/soot
@@ -24,6 +24,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 
     frontAndBack
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun
index 08baf65c0ee44b801224e46ed265ffd07801d317..11ae4b0d7cdefdf4570ff98eb8069733f5c17f0d 100755
--- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun
@@ -12,4 +12,4 @@ runApplication createPatch -overwrite
 # Run
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties
index e11669073696b4b9ee46cb7e0a7a2cd511bf75c3..800985f9785f474376f598ac4049000657610b84 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties
@@ -20,18 +20,22 @@ internalField   uniform 0;
 
 boundaryField
 {
-     ".*"
+    ".*"
     {
         type            boundaryRadiation;
         mode            lookup;
         emissivity      uniform 1.0;
         value           uniform 0;
     }
-
     frontAndBack
     {
         type            empty;
     }
+    "procBoundary.*"
+    {
+        type            processor;
+        value           $internalField;
+    }
 }
 
 // ************************************************************************* //
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties.twoSteps b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties.twoSteps
index a45bf57fa17cadbc6d062c177729a57bdad4a66b..7e1c8dbc7c662ad50cc59594017f875cfeaccdac 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties.twoSteps
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties.twoSteps
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/U b/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/U
index e85d6fdd4d5e5aa3886de6b54c8e52bc4724d99a..2acbda71f9909aac0e5d0563772579bd910d2a82 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/U
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/0/U
@@ -30,8 +30,7 @@ boundaryField
 
     base
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     inlet
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun
index 41634fbe09a59978d5df032fc9afb475982bb2fe..7d2349761de0132c1535adc01d9ee4667a6e2eb2 100755
--- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun
@@ -12,6 +12,6 @@ runApplication createPatch -overwrite
 runApplication decomposePar -force -constant
 
 # Run
-runParallel $application 4
+runParallel $application
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties
index 20a028ae6676de7a583a1dbbb6b08b886a68e9c1..35b6a6ef1aa7077cca49dd5b47106e08f32c6b79 100644
--- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties
+++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties
@@ -28,6 +28,11 @@ boundaryField
         absorptivity    uniform 0.0;
         value           uniform 0.0;
     }
+    "procBoundary.*"
+    {
+        type            processor;
+        value           $internalField;
+    }
 }
 
 // ************************************************************************* //
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CH4 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/CH4
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CH4
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/CH4
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CO2 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/CO2
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/CO2
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/CO2
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/H2O b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/H2O
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/H2O
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/H2O
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/N2 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/N2
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/N2
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/N2
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/O2 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/O2
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/O2
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/O2
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/T
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/T
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/U
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/U
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/Ydefault b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/Ydefault
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/Ydefault
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/Ydefault
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/alphat b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/alphat
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/alphat
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/alphat
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/p
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/0/p
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/chemistryProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/chemistryProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/combustionProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/combustionProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/reactions b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/reactions
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/reactions
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/reactions
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/thermo.compressibleGas
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/thermo.compressibleGas
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/thermophysicalProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/thermophysicalProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/turbulenceProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/constant/turbulenceProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/blockMeshDict b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/blockMeshDict
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/blockMeshDict
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/blockMeshDict
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/controlDict
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/controlDict
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/fvSchemes
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSchemes
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/fvSchemes
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/fvSolution
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D/system/fvSolution
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/CH4 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/CH4
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/CH4
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/CH4
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/CO2 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/CO2
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/CO2
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/CO2
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/H2O b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/H2O
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/H2O
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/H2O
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/N2 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/N2
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/N2
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/N2
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/O2 b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/O2
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/O2
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/O2
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/T b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/T
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/T
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/T
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/U b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/U
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/U
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/U
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/Ydefault b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/Ydefault
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/Ydefault
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/Ydefault
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/alphat b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/alphat
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/alphat
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/alphat
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/p b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/p
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/0/p
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/0/p
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/chemistryProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/chemistryProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/chemistryProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/chemistryProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/combustionProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/combustionProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/combustionProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/combustionProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/reactions b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/reactions
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/reactions
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/reactions
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/thermo.compressibleGas b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/thermo.compressibleGas
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/thermo.compressibleGas
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/thermo.compressibleGas
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/thermophysicalProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/thermophysicalProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/thermophysicalProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/thermophysicalProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/turbulenceProperties b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/turbulenceProperties
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/constant/turbulenceProperties
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/constant/turbulenceProperties
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/blockMeshDict b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/blockMeshDict
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/blockMeshDict
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/blockMeshDict
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/controlDict b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/controlDict
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/controlDict
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/controlDict
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/fvSchemes b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/fvSchemes
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/fvSchemes
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/fvSchemes
diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/fvSolution b/tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/fvSolution
similarity index 100%
rename from tutorials/combustion/reactingFoam/ras/counterFlowFlame2DLTS/system/fvSolution
rename to tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS/system/fvSolution
diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/U b/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/U
index 4edd434f319820f35b5d7bea371816c85c8636f3..b9ef295bb59deb4c56207ae7999de8dd0600ef36 100644
--- a/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/U
+++ b/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/U
@@ -28,14 +28,12 @@ boundaryField
 
     farFieldMoving
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     left
@@ -46,8 +44,7 @@ boundaryField
 
     farField
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     back
diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0.org/U b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0.org/U
index b6bfe64b473e31a272e980194987d24b8b294fd8..b854b15f7a99d7f418235289c610eae7fe9a3263 100644
--- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0.org/U
+++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0.org/U
@@ -40,8 +40,7 @@ boundaryField
 
     freestreamInlet
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     wedge1 {type wedge;}
diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0/U b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0/U
index 765516331d8fdfcbb83c5902c01997e382cd1da2..01669eefc205fa3a9ec58f53ed50bea2009c75df 100644
--- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0/U
+++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/0/U
@@ -1261,8 +1261,7 @@ boundaryField
     }
     freestreamInlet
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     freestream
     {
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
index 04e56e55df565833e49fe99d17b9d32dc2d6ece7..91996c46bbe6700e19b8f16ec21ed0a0de26fa4d 100755
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allclean
@@ -8,4 +8,4 @@ cleanCase
 cleanSamples
 rm -rf constant/polyMesh/boundary
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun
index 3132569fc6fbdade8126e8e41fe12589a2f86ba5..a1d7b7290caa7220822da7fcbcc90e7362aa53c3 100755
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/Allrun
@@ -31,4 +31,4 @@ rm $CONST/polyMesh/boundary.bak
 runApplication `getApplication`
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/sampleCone b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/sampleCone
index 0c23675f65f8dc91d44e80efe23afaa0f7c3fb0d..83c0bb6d46fa02e63534b851decfd3b972ced041 100755
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/sampleCone
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/sampleCone
@@ -20,7 +20,7 @@ USAGE
     exit 1
 }
 
-# -----------------------------------------------------------------------------
+#------------------------------------------------------------------------------
 
 unset timeOpt
 
@@ -53,4 +53,4 @@ do
     cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}
 done
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/Allclean b/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
index 05bd98ba9de9f17aee10133de7a10167941979ea..416eb9a89d9725fbe8eb68042225b95bf4c2bc5e 100755
--- a/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
+++ b/tutorials/compressible/rhoCentralFoam/shockTube/Allclean
@@ -9,4 +9,4 @@ cp -r 0.org 0
 cleanCase
 cleanSamples
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/Allrun b/tutorials/compressible/rhoCentralFoam/shockTube/Allrun
index 1acad3412297075620edcbe4bece711e00347337..7f1047e95d30274b404a5b9b781790df0708c9c0 100755
--- a/tutorials/compressible/rhoCentralFoam/shockTube/Allrun
+++ b/tutorials/compressible/rhoCentralFoam/shockTube/Allrun
@@ -8,4 +8,4 @@ runApplication blockMesh
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
index 80969a77dea8ea077460acd9e666de54295a2186..cc15617bf67c5c394ba94768696ab52a659c5d2b 100755
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
+++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
@@ -9,4 +9,4 @@ rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
index 02ce7d2b4cbdd978bc8a3fcf3191534a48618777..5bf2beb5571ea17dadd180ba1707ed19262ebffd 100755
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
+++ b/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
@@ -21,4 +21,4 @@ cp -r 0.org 0
 
 runApplication $(getApplication)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U
index 473651518d7e94e9c4d245b49aea26fd82a7da03..09ceb597af091f9f3cb20ebbd8fe9b47093301cb 100644
--- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U
+++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U
@@ -37,14 +37,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U
index d8976b3cf80ff87bf948e03074099f1edc027705..20c61e8601e9896211d61b187df530ae01829f93 100644
--- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U
+++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution
index 2d6bd63281cd577fe73113e29a59b08b8b6947ea..165083decff090244dd762b0fc8c881ed7d0f74a 100644
--- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution
+++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution
@@ -57,7 +57,7 @@ PIMPLE
     nNonOrthogonalCorrectors 0;
     consistent          yes;
 
-    rhoMin          0.5;
+    rhoMin          0.4;
     rhoMax          2.0;
 
     residualControl
diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/0/U b/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/0/U
index c8bc1bfd29d6072dcf8e1b52d2d55ab18d3e6463..6e65858097433845fe81dd7422f81ed89e0012ce 100644
--- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/0/U
+++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/U b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/U
index d085eb3d855d7575804427c97ad26314c36bc16f..125f44d41934526d327fa89d839d7a400c59c77e 100644
--- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/U
+++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/0/U
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/U b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/U
index 5569c946f5b907af83cad3fa3f030f8f1312aaee..38d820b97a8bf02576dc8db8457b47d1811770c9 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/U
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
index a97e9a4aad7deb55e1b9b293ffac6cf0198c9dd5..2a52698c048ffc2190e6ade7004cf628615b9a77 100755
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
@@ -11,4 +11,4 @@ application=`getApplication`
 runApplication blockMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/U b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/U
index 5569c946f5b907af83cad3fa3f030f8f1312aaee..38d820b97a8bf02576dc8db8457b47d1811770c9 100644
--- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/U
+++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
index a97e9a4aad7deb55e1b9b293ffac6cf0198c9dd5..2a52698c048ffc2190e6ade7004cf628615b9a77 100755
--- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
+++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
@@ -11,4 +11,4 @@ application=`getApplication`
 runApplication blockMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution
index 16d389d545a201de95914ead45301c945cf2ad90..adf061d8620c86467d58fc3f48d4b5052a8c349f 100644
--- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution
+++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution
@@ -57,7 +57,7 @@ solvers
 SIMPLE
 {
     nNonOrthogonalCorrectors 0;
-    rhoMin          0.5;
+    rhoMin          0.4;
     rhoMax          1.5;
 
     residualControl
@@ -66,7 +66,7 @@ SIMPLE
         U               1e-4;
         e               1e-3;
 
-        // possibly check turbulence fields
+        // Possibly check turbulence fields
         "(k|epsilon|omega)" 1e-3;
     }
 }
diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/U b/tutorials/compressible/rhoSimpleFoam/squareBend/0/U
index 99c880c855dc59eb766e7d8ff0ecacb1b55d875b..58e029d88f83eeacb50a0fa21435de95481a2019 100644
--- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/U
+++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/U
@@ -22,8 +22,7 @@ boundaryField
 {
     Default_Boundary_Region
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     inlet
     {
diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/0/U b/tutorials/compressible/sonicDyMFoam/movingCone/0/U
index 4edd434f319820f35b5d7bea371816c85c8636f3..b9ef295bb59deb4c56207ae7999de8dd0600ef36 100644
--- a/tutorials/compressible/sonicDyMFoam/movingCone/0/U
+++ b/tutorials/compressible/sonicDyMFoam/movingCone/0/U
@@ -28,14 +28,12 @@ boundaryField
 
     farFieldMoving
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     left
@@ -46,8 +44,7 @@ boundaryField
 
     farField
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     back
diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/0/U b/tutorials/compressible/sonicFoam/laminar/forwardStep/0/U
index 59fe0b52664fc15fc64d1b1a51d13a273f72d53c..1dde5dec2e61d35ff6ca71b674551d024c8f2f5f 100644
--- a/tutorials/compressible/sonicFoam/laminar/forwardStep/0/U
+++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/0/U
@@ -43,8 +43,7 @@ boundaryField
 
     obstacle
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     defaultFaces
diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean b/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
index 8e6e3e6365862fbee47e50cb8a9fb0b788e7c30d..a0d99d7592b95b40323d2be71a2c72b161434323 100755
--- a/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
+++ b/tutorials/compressible/sonicFoam/laminar/shockTube/Allclean
@@ -9,4 +9,4 @@ rm -rf 0
 cp -r 0.org 0
 cleanSamples
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun b/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
index 66596d4f92ef191ac8c07c5b6553cad826db4bc7..20ffce0a1503bf7c7a8a4ae7b80b8bb6c90fe005 100755
--- a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
+++ b/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
@@ -12,4 +12,4 @@ runApplication $application
 runApplication foamCalc mag U
 runApplication sample
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/U b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/U
index 1969add628a987d82574ee2e44a7ed4d976617d2..441ae6172f0ca4977bec27549a8f29f283b1d650 100644
--- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/U
+++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/0/U
@@ -44,8 +44,7 @@ boundaryField
 
     WALL10
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allclean b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allclean
index edae5c37f5a43d055f96918d5c845f384d8744f7..972da44d3401484a883ece2d0ed6057f0a86a28b 100755
--- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allclean
+++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -f constant/polyMesh/boundary > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
index 0df7881d409b3698504ee2cd85262dfade667eb4..b6157963bef3ce33c0f5f47dd8dcab1d2665d805 100755
--- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
+++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
@@ -13,4 +13,4 @@ sed -i -e 's/symmetry\([)]*;\)/empty\1/' constant/polyMesh/boundary
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/ras/prism/0/U b/tutorials/compressible/sonicFoam/ras/prism/0/U
index 7d951c3d8f90f7e79f1af969c0754908738024fe..1774e3692868dc33875c8c6694bf8e97637dff65 100644
--- a/tutorials/compressible/sonicFoam/ras/prism/0/U
+++ b/tutorials/compressible/sonicFoam/ras/prism/0/U
@@ -55,8 +55,7 @@ boundaryField
 
     prismWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     defaultFaces
diff --git a/tutorials/compressible/sonicLiquidFoam/Allclean b/tutorials/compressible/sonicLiquidFoam/Allclean
index 4dbd59a53dc6d9eaa1878a85f16b72506e07de2f..aa8cb7bc24c358893ca6bc0faa48766d84edc0ec 100755
--- a/tutorials/compressible/sonicLiquidFoam/Allclean
+++ b/tutorials/compressible/sonicLiquidFoam/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 removeCase decompressionTankFine
 foamCleanTutorials cases
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicLiquidFoam/Allrun b/tutorials/compressible/sonicLiquidFoam/Allrun
index 24f284adee8bd4e351fa9b32386bd8e33c2d851d..044fd34bfcb7057520ee4a3a2863b3ffa5ce0dd9 100755
--- a/tutorials/compressible/sonicLiquidFoam/Allrun
+++ b/tutorials/compressible/sonicLiquidFoam/Allrun
@@ -42,4 +42,4 @@ cloneCase decompressionTank decompressionTankFine
     runApplication `getApplication`
 )
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/0/U b/tutorials/compressible/sonicLiquidFoam/decompressionTank/0/U
index d0e943a8d1f56a328c077fa7dd845cebc9ac2f17..61e79b256f8df3400fb2ea673e1f546c99a4d4db 100644
--- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/0/U
+++ b/tutorials/compressible/sonicLiquidFoam/decompressionTank/0/U
@@ -22,8 +22,7 @@ boundaryField
 {
     outerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     axis
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean
index 254de826119d794785ca58258137788989ff6654..36f3cdc151b3fb59017fe01f9688e56f069e4e1f 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun
index 44ea02e029d10ca859c00af57d7035005d1c0506..120c352ecbb28eaf8d242b621877b3672e7eba8a 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun
@@ -8,4 +8,4 @@ runApplication blockMesh
 runApplication dsmcInitialise
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/system/controlDict b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/system/controlDict
index a5dda9e6530f4a0b10252962a574ded68cb668ff..55c11b304b86312652a2a5963eaf2a8e525ff04b 100644
--- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/system/controlDict
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/system/controlDict
@@ -54,7 +54,6 @@ functions
         type            fieldAverage;
         functionObjectLibs ( "libfieldFunctionObjects.so" );
         outputControl   outputTime;
-        resetOnOutput   off;
 
         fields
         (
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean
index 254de826119d794785ca58258137788989ff6654..36f3cdc151b3fb59017fe01f9688e56f069e4e1f 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun
index 44ea02e029d10ca859c00af57d7035005d1c0506..120c352ecbb28eaf8d242b621877b3672e7eba8a 100755
--- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun
@@ -8,4 +8,4 @@ runApplication blockMesh
 runApplication dsmcInitialise
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/system/controlDict b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/system/controlDict
index b43b5c3c90ab7aec1f3b86cfcf54ed6849f6d9a1..8fe57c602d34cabe5969585c43186ed53abd4fbd 100644
--- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/system/controlDict
+++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/system/controlDict
@@ -54,7 +54,7 @@ functions
         type            fieldAverage;
         functionObjectLibs ( "libfieldFunctionObjects.so" );
         outputControl   outputTime;
-        resetOnOutput   off;
+        restartOnOutput   off;
 
         fields
         (
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU
index c2a2e08928f3eb0b363ca5845cb93f18079764ae..b785e871ecd4692a4b2c5c17ab63a4f6dad0277e 100644
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU
@@ -33,8 +33,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean
index 254de826119d794785ca58258137788989ff6654..36f3cdc151b3fb59017fe01f9688e56f069e4e1f 100755
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun
index 8e706a5ac4e2a7f11c530416236a33ac964bf38e..f502a72e59f2fe886980a6fa85bfeb4729489c05 100755
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun
@@ -6,8 +6,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication blockMesh
 runApplication decomposePar
-runParallel dsmcInitialise 4
-runParallel `getApplication` 4
+runParallel dsmcInitialise
+runParallel `getApplication`
 runApplication reconstructPar -noLagrangian
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict
index 5991885d85c1adb0b198e393785a7fcc49b6afe1..6d222c1b5fc83efc04c0bf13433bd9360e5f2501 100644
--- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict
+++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/system/controlDict
@@ -54,7 +54,6 @@ functions
         type            fieldAverage;
         functionObjectLibs ( "libfieldFunctionObjects.so" );
         outputControl   outputTime;
-        resetOnOutput   off;
 
         fields
         (
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU
index a50501d95b289e805e16124cf2bfca27476f0e11..e0123a38924a4ef92f46fea1fb040524047c0eb1 100644
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU
@@ -28,8 +28,7 @@ boundaryField
 
     obstacle
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean
index 254de826119d794785ca58258137788989ff6654..36f3cdc151b3fb59017fe01f9688e56f069e4e1f 100755
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
index 51572e4010a556bac225bf8801689b7b8d370a26..45c06e38e538e2f5edd69507cad30c258915be46 100755
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
@@ -6,9 +6,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication blockMesh
 runApplication decomposePar
-runParallel dsmcInitialise 4
-runParallel `getApplication` 4
+runParallel dsmcInitialise
+runParallel `getApplication`
 runApplication reconstructPar -noLagrangian
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict
index c62f54e0ef351dc321e7cbed82898cf0688bb1dc..de2d880ff88307555e64f68dc2b0313dcf76e0f8 100644
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict
@@ -54,7 +54,6 @@ functions
         type            fieldAverage;
         functionObjectLibs ( "libfieldFunctionObjects.so" );
         outputControl   outputTime;
-        resetOnOutput   off;
 
         fields
         (
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allclean
deleted file mode 100755
index 57436cf0e0499493cce8dc94b81e8dcfc0d55f29..0000000000000000000000000000000000000000
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allclean
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-(
-    cd periodicCubeArgon || exit
-
-    rm -rf 0/lagrangian 0/uniform
-    rm -f Ar-Ar
-    rm -f electrostatic
-    rm -f constant/idList
-    rm -rf constant/polyMesh/sets
-    cleanCase
-)
-
-
-(
-    cd periodicCubeWater || exit
-
-    rm -rf 0/lagrangian 0/uniform
-    rm -f O-O
-    rm -f electrostatic
-    rm -f constant/idList
-    rm -rf constant/polyMesh/sets
-    cleanCase
-)
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun
deleted file mode 100755
index 7221dc68dbac6e574dc5fa1fba3cf7307efebb01..0000000000000000000000000000000000000000
--- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-for caseName in periodicCubeArgon periodicCubeWater
-do
-(
-    cd $caseName || exit
-
-    runApplication blockMesh
-    runApplication mdInitialise
-    runApplication `getApplication`
-)
-done
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..9852503f2cbb2cde23704919366eba86795aa532
--- /dev/null
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allclean
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+rm -rf 0/lagrangian 0/uniform
+rm -f Ar-Ar
+rm -f electrostatic
+rm -f constant/idList
+rm -rf constant/polyMesh/sets
+cleanCase
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..4830eb007fe98f9584308f2323607e754f89c3ad
--- /dev/null
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/Allrun
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+runApplication mdInitialise
+runApplication `getApplication`
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..ec56cfe28b5c5e42f3612988c3f892f2e13a9b82
--- /dev/null
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allclean
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+rm -rf 0/lagrangian 0/uniform
+rm -f O-O
+rm -f electrostatic
+rm -f constant/idList
+rm -rf constant/polyMesh/sets
+cleanCase
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..4830eb007fe98f9584308f2323607e754f89c3ad
--- /dev/null
+++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/Allrun
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+runApplication mdInitialise
+runApplication `getApplication`
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/0/U b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/0/U
index 33caa3d67593fec14966f01cd9eaab3d8d46d722..409ed179ec2a012eb22caeda67585a08d9c6f6c3 100644
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/0/U
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/0/U
@@ -22,33 +22,27 @@ boundaryField
 {
     sectionAEnd
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     sectionCEnd
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     top
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     bottom
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
index 8755dc7125fb2003ec2968de182851d16a516941..21cb83d5ac45c55ab65be79e1f03aa7fab9824f0 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allclean
@@ -8,4 +8,4 @@ rm -rf constant/polyMesh/sets
 rm -rf processor[0-9]
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
index 697eb2c899aa791b767d8acc8cbd03c4dae2b7b3..9f9a93ff378bac9ef7afdd63d968b65a47a67d65 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
@@ -11,9 +11,9 @@ runApplication blockMesh
 
 runApplication decomposePar
 
-runParallel mdInitialise 4
-runParallel $application 4
+runParallel mdInitialise
+runParallel $application
 
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/0/U b/tutorials/electromagnetics/mhdFoam/hartmann/0/U
index f669321344bae4d840d7ad43c63f32d737265db0..972940d726a399b366df463694f66d9fd898ecaa 100644
--- a/tutorials/electromagnetics/mhdFoam/hartmann/0/U
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/0/U
@@ -33,14 +33,12 @@ boundaryField
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/Allclean b/tutorials/electromagnetics/mhdFoam/hartmann/Allclean
index 7c88a67bdc9f7af94f1498b47d68e94b16d18d7e..a5e65c7d81ba11f5fce4451cefd5d25886c31879 100755
--- a/tutorials/electromagnetics/mhdFoam/hartmann/Allclean
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 cleanSamples
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/Allrun b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
index 162944f130d9257a3913e01deb2e0693aee1de9a..bb8053763d99c22c3d43a793b99a030fa5c09c3b 100755
--- a/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
@@ -12,4 +12,4 @@ runApplication $application
 runApplication foamCalc components U
 runApplication sample
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution
index d072743140eba4a9b9895cc939864f32ee087c80..dc77f6c3c2016bace6425d463d2ac4b0a519c515 100644
--- a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution
@@ -22,6 +22,12 @@ solvers
         solver          PCG;
         preconditioner  DIC;
         tolerance       1e-06;
+        relTol          0.05;
+    }
+
+    pFinal
+    {
+        $p;
         relTol          0;
     }
 
@@ -32,6 +38,12 @@ solvers
         relTol          0;
     }
 
+    pBFinal
+    {
+        $pB;
+        relTol          0;
+    }
+
     "(U|B)"
     {
         solver          smoothSolver;
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U
index 6a60ba64be90e6bd737274e74dae96a837e1ec90..63f212816cdc297812ee2a550f5cf034b5a951d4 100644
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U
+++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U
@@ -22,20 +22,17 @@ boundaryField
 {
     floor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     ceiling
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean
index 27aafbb5aa83d37a2162cff776783a871205b051..be62031288e5a2bff16d8a47a26c833d6cd30e81 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -f 0/T
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
index 8ca1b4cab660b248e5a2bcff971ef405452e16e8..0ecf4b2d131e04439b920ab89e582a41b75ef79b 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
@@ -11,4 +11,4 @@ cp 0/T.org 0/T
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U
index 6a60ba64be90e6bd737274e74dae96a837e1ec90..63f212816cdc297812ee2a550f5cf034b5a951d4 100644
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U
@@ -22,20 +22,17 @@ boundaryField
 {
     floor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     ceiling
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean
index 27aafbb5aa83d37a2162cff776783a871205b051..be62031288e5a2bff16d8a47a26c833d6cd30e81 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -f 0/T
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
index 8ca1b4cab660b248e5a2bcff971ef405452e16e8..0ecf4b2d131e04439b920ab89e582a41b75ef79b 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
@@ -11,4 +11,4 @@ cp 0/T.org 0/T
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/U b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/U
index eb358fdad3afe238b3f3a2138890c85b6375723c..ea88eb638e09f1c7d3bf277d8abd8df5a89a6ed0 100644
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/U
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/U
@@ -25,8 +25,7 @@ boundaryField
 
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun
index 8e4457d3429c8bc47050b539153c0e84b116b8c1..de3f6389f8d419db1c3c0de06a858071503bfb90 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun
@@ -8,4 +8,4 @@ runApplication blockMesh
 runApplication snappyHexMesh -overwrite
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U
index 6a60ba64be90e6bd737274e74dae96a837e1ec90..63f212816cdc297812ee2a550f5cf034b5a951d4 100644
--- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U
@@ -22,20 +22,17 @@ boundaryField
 {
     floor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     ceiling
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean
index b26bcec9bb0597f2bfb17b050584a9f0115f3a65..6fe57d72bb88c7736433c3c3f301d03fd4930d17 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 cp 0/T.org 0/T
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun
index 5871e056f3260104b19b93ad34d5da34ff9be99f..0df95afd2e081913dc5c6a301fa9f299262850a1 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun
@@ -11,4 +11,4 @@ runApplication blockMesh
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/U b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/U
index 486dbdbada1e31adae2952e6db88778e8b46bae4..950f27d37d203ea83f2db7e0e282dd2162aa9343 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/U
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/U
@@ -23,26 +23,22 @@ boundaryField
 {
     frontAndBack
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     topAndBottom
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     hot
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     cold
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
index 8de310cd2b4ff70155b760e7546db040da684c97..f436bc02bbc0b9a414cb5c6f6d53a7a6b92f384e 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
@@ -8,4 +8,4 @@ cleanCase
 rm -rf sets
 rm -f validation/*.eps
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
index 7e09552b26f38f784a6682518442eedf2139cb5f..740f3a5ed6583c98a7c1c95911d6e64798403c76 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
@@ -13,4 +13,4 @@ runApplication sample -latestTime
 
 ( cd validation && ./createGraphs )
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U
index 56ae4c8ee955e35b7b9e7110615127e3a4b6ef51..34038d2a6a7264d5e31f46eaf1a132b20a2a4950 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U
@@ -26,13 +26,11 @@ boundaryField
 
     floor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     ceiling
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     inlet
     {
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
index 0ec295ba7bc49fbd2a1216539e8246c7a1e986e3..eabb05d8f40e073e52e0c2fb100624a2d98e4e92 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
@@ -9,4 +9,4 @@ rm -rf constant/baffle3DRegion
 rm -rf constant/polyMesh/boundary
 rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes
index 3de4b63f5d6fad28a1b22ac8e0bb861c4ec02bd9..16681585c0be0fe4b426e79fef055a1173c68794 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes
@@ -38,13 +38,7 @@ divSchemes
 
 laplacianSchemes
 {
-    default         none;
-    laplacian((rho*nuEff),U) Gauss linear uncorrected;
-    laplacian(rhorAUf,p_rgh) Gauss linear uncorrected;
-    laplacian(alphaEff,h) Gauss linear uncorrected;
-    laplacian((rho*DkEff),k) Gauss linear uncorrected;
-    laplacian((rho*DepsilonEff),epsilon) Gauss linear uncorrected;
-    laplacian((rho*DomegaEff),omega) Gauss linear uncorrected;
+    default         Gauss linear uncorrected;
 }
 
 interpolationSchemes
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/U b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/U
index 5666a4c0f7129685cd8b4074ffee79f976a9d1bc..48f6f4c7b326320da869f5dad9c683d39add74de 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/U
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/0/U
@@ -22,26 +22,22 @@ boundaryField
 {
     floor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     ceiling
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     box
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean
index 10920439bb1b8b65bd8f7602a46ef4550dd83545..6b45f82a41b0f9a0739a80a41a680be892e55243 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allclean
@@ -6,4 +6,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
index 1533de82df3afc2f8128562bcf6dd72c02881e8e..2d455d1fbce4041066fbb25494d9e84b6162fbb9 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication blockMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/U b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/U
index 5666a4c0f7129685cd8b4074ffee79f976a9d1bc..48f6f4c7b326320da869f5dad9c683d39add74de 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/U
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/0/U
@@ -22,26 +22,22 @@ boundaryField
 {
     floor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     ceiling
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     box
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean
index 10920439bb1b8b65bd8f7602a46ef4550dd83545..6b45f82a41b0f9a0739a80a41a680be892e55243 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allclean
@@ -6,4 +6,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
index 1533de82df3afc2f8128562bcf6dd72c02881e8e..2d455d1fbce4041066fbb25494d9e84b6162fbb9 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication blockMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
index bfb99ee4d13156c295080e7ab823d786351661c3..b2f87f4120d40a02d84330232dcab13861722129 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/Allrun
@@ -8,7 +8,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 ./Allrun.pre
 
 #-- Run on single processor
-#runApplication `getApplication` &
+#runApplication $(getApplication) &
 # Simulated external solver
 #runApplication ./externalSolver
 
@@ -16,7 +16,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 runApplication decomposePar -allRegions
 
 # Run OpenFOAM
-runParallel `getApplication` 4 &
+runParallel $(getApplication) &
 
 # Simulated external solver
 runApplication ./externalSolver
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver
index cf8caf9c6b75fbdc6ddfc610887baac9f71ee005..89c5f53cb9faa812c7ba8621394285c4f7491794 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater/externalSolver
@@ -101,4 +101,4 @@ done
 log "done"
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/U b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/U
index 60762613ed0fa288afdd70dd8876a7c787cfb4b4..24706cea71e2627197e70f79a33b302614bd8d3f 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/U
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/bottomWater/U
@@ -34,33 +34,27 @@ boundaryField
     }
     minY
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     minZ
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     maxZ
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     bottomWater_to_rightSolid
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     bottomWater_to_leftSolid
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     bottomWater_to_heater
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
index b46db24de70f7cc71970a62712f7ee9972af1853..bf5077c90ac3b551ddb0c4741bcc8d464c4d3442 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allclean
@@ -19,4 +19,4 @@ rm -rf constant/heater/polyMesh
 rm -rf constant/leftSolid/polyMesh
 rm -rf constant/rightSolid/polyMesh
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
index bf6e7f74877057e6882321811f2629a3e1a7ee49..602f7159e246c7a5884657fe1cb5338285a73cfc 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
@@ -18,7 +18,7 @@ done
 
 for i in bottomWater topAir heater leftSolid rightSolid
 do
-   changeDictionary -region $i > log.changeDictionary.$i 2>&1
+   runApplication -s $i  changeDictionary -region $i
 done
 
 
@@ -29,7 +29,7 @@ done
 runApplication decomposePar -allRegions
 
 # Run
-runParallel `getApplication` 4
+runParallel `getApplication`
 
 # Reconstruct
 runApplication reconstructPar -allRegions
@@ -40,4 +40,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
index 5dc7b1cfd9cc6767b0a96cbee3f782a91abad836..f56be82da793799b52135652c4864db7914b1014 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean
@@ -23,4 +23,4 @@ rm -rf constant/heater/polyMesh
 rm -rf constant/leftSolid/polyMesh
 rm -rf constant/rightSolid/polyMesh
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
index 1b68a368e417128360141863aac2c763304b9625..6e65d8528093282cbcb3559e2a71956e765244f7 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
@@ -22,7 +22,7 @@ done
 
 for i in bottomAir topAir heater leftSolid rightSolid
 do
-   changeDictionary -region $i > log.changeDictionary.$i 2>&1
+   runApplication -s $i  changeDictionary -region $i
 done
 
 
@@ -34,7 +34,7 @@ runApplication `getApplication`
 #runApplication decomposePar -allRegions
 #
 ## Run
-#runParallel `getApplication` 4
+#runParallel `getApplication`
 #
 ## Reconstruct
 #runApplication reconstructPar -allRegions
@@ -45,4 +45,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.org/ice/U b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.org/ice/U
index 955920c267518a4170a1634023041c8deb4eea97..ebe245ba29749d208a1827ab068146c2e6782bd4 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.org/ice/U
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.org/ice/U
@@ -27,13 +27,11 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     ice_to_cabin
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     ice_to_exterior
     {
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
index b3628006eb02e21402e4c3eb39d9f858a1826f43..ba2fd3c6bb13e449cba1bd26389fe050283b9db3 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
@@ -9,17 +9,14 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Set application name
 application=$(getApplication)
 
-# Get number of processors to run on
-nProcs=4 #$(getNumberOfProcessors)
-
 # decompose
-runApplication -log log.decomposePar.cabin decomposePar -region cabin
-runApplication -log log.decomposePar.ice decomposePar -region ice
-runApplication -log log.decomposePar.exterior decomposePar -region exterior
+runApplication -s cabin decomposePar -region cabin
+runApplication -s ice decomposePar -region ice
+runApplication -s exterior decomposePar -region exterior
 
-runParallel $application $nProcs
+runParallel $application
 
-runApplication -log log.reconstructPar.cabin reconstructPar -region cabin
-runApplication -log log.reconstructPar.ice reconstructPar -region ice
-runApplication -log log.reconstructPar.exterior reconstructPar -region exterior
+runApplication -s cabin reconstructPar -region cabin
+runApplication -s ice reconstructPar -region ice
+runApplication -s exterior reconstructPar -region exterior
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/U b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/U
index 0d2fcb2cb0aac8e2d0075b2f9f1ac36867e68829..89590e575b1a7170b31976eddf25882b09e233b7 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/U
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/air/U
@@ -23,8 +23,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     inlet
     {
@@ -39,8 +38,7 @@ boundaryField
     }
     blades
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/porous/U b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/porous/U
index 8661f4acde52aef517edae739beddddc972ea018..83baa560032cafa6841e3641917a4f399d29cb15 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/porous/U
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/0.org/porous/U
@@ -34,8 +34,7 @@ boundaryField
     }
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
index 70ac496b64589500134eee9a8e078eb8af05e047..9e5b931edcb44dc7ec6ab0c66b863e0c48736d27 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
@@ -7,16 +7,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 ./Allrun.pre
 
-runApplication decomposePar -region air
-mv log.decomposePar log.decomposePar.air
+runApplication -s air    decomposePar -region air
+runApplication -s porous decomposePar -region porous
 
-runApplication decomposePar -region porous
-mv log.decomposePar log.decomposePar.porous
+runParallel $(getApplication)
 
-runParallel $(getApplication) 4
-
-runApplication reconstructPar -latestTime -region air
-mv log.reconstructPar log.reconstructPar.air
-
-runApplication reconstructPar -latestTime -region porous
-mv log.reconstructPar log.reconstructPar.porous
+runApplication -s air    reconstructPar -latestTime -region air
+runApplication -s porous reconstructPar -latestTime -region porous
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
index 87f198c629890c2e5fa0f02ce5df356bebe3209b..020b201778e407bdb250930be2a642fec4faffec 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
@@ -6,20 +6,18 @@ cd ${0%/*} || exit 1    # Run from this directory
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 #create meshes
-runApplication blockMesh -region air
-mv log.blockMesh log.blockMesh.air
-runApplication blockMesh -region porous
-mv log.blockMesh log.blockMesh.porous
+runApplication -s air    blockMesh -region air
+runApplication -s porous blockMesh -region porous
 
 # create rotor blades in air region
-runApplication topoSet -region air -dict system/topoSetDict.1
-mv log.topoSet log.topoSet.air.1
+runApplication -s air.1 \
+    topoSet -region air -dict system/topoSetDict.1
 
 runApplication createBaffles -region air -overwrite
 
 # create rotor zone in air region for MRF
-runApplication topoSet -region air -dict system/topoSetDict.2
-mv log.topoSet log.topoSet.air.2
+runApplication -s air.2 \
+    topoSet -region air -dict system/topoSetDict.2
 
 rm -rf constant/air/polyMesh/sets
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/G b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/G
index c347dd5a71bee4ffa426294cb076ce44661dbbf4..8949bb3792f1fa6bd28c9cafa133add94f09d982 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/G
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/G
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/IDefault b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/IDefault
index b81f6e1b3b2c0856a626114531a8d597f064a49f..c3533a86d5af6b30cf3099e031c4068d9fec2ba4 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/IDefault
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/IDefault
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/Qr b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/Qr
index 36a5212a353f264b51ab94e1b863d5918646353f..6e7a1a927749412123e41f6981d9d554c13ff9a8 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/Qr
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/Qr
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/T b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/T
index fb7bece9ef9e46d111acdca17fee1b2ce760d5fc..65205f56ce74e9ac5fb6c418fa6e25eb3134939b 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/T
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/T
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/U b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/U
index 86aec98f122ecb1acafcfda26b379ee3d45858c9..a8a4f00c71217515c6511276e5233b96bf420557 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/U
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/U
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/epsilon b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/epsilon
index a545c483c39cc35e77bb64632e78f6c75cd61083..d41dcae9e4ce39360080442c18bee3db79e092ad 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/epsilon
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/epsilon
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/k b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/k
index b362914ce7c5570a6b538297896731d7764f5919..8a819d272ecd1693adbc85517fb59974fe93e9aa 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/k
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/k
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p
index c035db7fb04583bca8d089cfe5e57fd4e8998a95..24b94d43e759af18d92568c2def36374b6322050 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p_rgh b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p_rgh
index 542f0269de92c24a14c75e530252ee37fc1c2941..2e144189ab8ac0ee30efc01152fce0f9818b769c 100644
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p_rgh
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/0/p_rgh
@@ -23,6 +23,7 @@ boundaryField
     ".*"
     {
         type            calculated;
+        value           $internalField;
     }
 }
 
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
index a6a8d2c5447c33216947b6f3ec6da8d397e38741..e440375b6a98867ab69afbcf83ec2101e32b09f8 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean
@@ -37,4 +37,4 @@ rm -f constant/topAir/subMap
 rm -f constant/topAir/visibleFaceFaces
 rm -f constant/topAir/mapDist
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
index bc2866e68b5afcfa2f0894f18c2802426b23fe8d..1b32e96d009a5187e710cc385beb62bfc7a67ab2 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
@@ -15,13 +15,15 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Agglomerate patch faces
 for i in bottomAir topAir
 do
-    faceAgglomerate -region $i -dict constant/viewFactorsDict > log.faceAgglomerate.$i 2>&1
+    runApplication -s $i \
+        faceAgglomerate -region $i -dict constant/viewFactorsDict
 done
 
 # Generate view factors
 for i in bottomAir topAir
 do
-    viewFactorsGen -region $i > log.viewFactorsGen.$i 2>&1
+    runApplication -s $i \
+        viewFactorsGen -region $i
 done
 
 runApplication `getApplication`
@@ -33,4 +35,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
index ea086b20bce383ade70868b974241f31d659ce23..f248b4fb32d4b9118de184d09d45ffb7ce33ec64 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
@@ -18,17 +18,19 @@ runApplication decomposePar -allRegions
 # Agglomerate patch faces
 for i in bottomAir topAir
 do
-    mpirun -np 4 faceAgglomerate -region $i -dict constant/viewFactorsDict -parallel>   log.faceAgglomerate.$i 2>&1
+    runParallel -s $i -np 4 \
+        faceAgglomerate -region $i -dict constant/viewFactorsDict
 done
 
 # Generate view factors
 for i in bottomAir topAir
 do
-    mpirun -np 4 viewFactorsGen -region $i -parallel > log.viewFactorsGen.$i 2>&1
+    runParallel -s $i -np 4 \
+        viewFactorsGen -region $i
 done
 
 # Run
-runParallel `getApplication` 4
+runParallel `getApplication`
 
 # Reconstruct
 runApplication reconstructPar -allRegions
@@ -40,4 +42,4 @@ echo "creating files for paraview post-processing"
 echo
 paraFoam -touchAll
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
index 9ce6c565d54a49aba1e5a5a5334740be3a98765e..22b2e59f126117fc69efe40e2c3c9d2709fe41eb 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
@@ -17,8 +17,8 @@ done
 
 for i in bottomAir topAir heater leftSolid rightSolid
 do
-    changeDictionary -region $i > log.changeDictionary.$i 2>&1
+    runApplication -s $i  changeDictionary -region $i
 done
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/Urel b/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/Urel
index b0aad73428b48a02d08d14fa244a9248b94a4eb9..add6cf479edba69f77373a3c7499cec8ab2d24aa 100644
--- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/Urel
+++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/Urel
@@ -22,8 +22,7 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     freestream
diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun b/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
index 0c62ec6ec548c57de24a8c7619e775b7a3db775d..85523c3f63f17d1a0ce22c3ab71f10bb03efa83e 100755
--- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
+++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/makeMesh b/tutorials/incompressible/SRFPimpleFoam/rotor2D/makeMesh
index b0e33568ef87ea22f8bf0594cd974c1b57121050..ea511db9f4aae5fe13cf5301cd200028ec03cfef 100755
--- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/makeMesh
+++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/makeMesh
@@ -6,4 +6,4 @@ set -x
 m4 < system/blockMeshDict.m4 > system/blockMeshDict
 blockMesh > log.blockMesh 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/0/Urel b/tutorials/incompressible/SRFSimpleFoam/mixer/0/Urel
index 52951f749e879c47ec26f207bdfb58ec3c43ce7f..fc1c7ad4c417c188bb74a23550d5500027810587 100644
--- a/tutorials/incompressible/SRFSimpleFoam/mixer/0/Urel
+++ b/tutorials/incompressible/SRFSimpleFoam/mixer/0/Urel
@@ -35,8 +35,7 @@ boundaryField
     }
     innerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     outerWall
     {
diff --git a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/U b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/U
index bed8e4812bb21137a6b75c8db355e1280a5c2cef..aaf7155459c84045e2175cf04a8437c304c1f11f 100644
--- a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/U
+++ b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/U
@@ -35,14 +35,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/Ua b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/Ua
index c600e7f5387a8c868530a01f96e22c9f2026afc3..66b61f572257905cde2c4605b26873be0b528630 100644
--- a/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/Ua
+++ b/tutorials/incompressible/adjointShapeOptimizationFoam/pitzDaily/0/Ua
@@ -37,14 +37,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/0/U b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/0/U
index 25b4f42c5ca453e481697c498159edba0a16bae1..b3d06602e84f143fb129487a741ff3da38a98c93 100644
--- a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/0/U
+++ b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/0/U
@@ -23,13 +23,11 @@ boundaryField
 {
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/U b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/U
index 901e1a8508f66caf6fe4bffacad92866031354a7..d065573bc413226311c8774afd42ca1cba968012 100644
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/U
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/U
@@ -23,13 +23,11 @@ boundaryField
 {
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/U b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/U
index 24d4659c604896d45ec2784e99c9120663f56011..3cc4c1a8c734b15c5c421735f4328cc432a2be04 100644
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/U
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/0/U
@@ -23,13 +23,11 @@ boundaryField
 {
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean
index c4004d5fa5f41d1cdbe32ea6bc14f32a61bfb4b3..98908744330933baf3c93c4abfb4121ee7cc30b8 100755
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allclean
@@ -9,4 +9,4 @@ cleanCase
 rm -rf logs
 rm -f *.eps yPlus_vs_uPlus
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
index 88c12b688b127989895bc7b87b32fc2c1d7f0c2b..26d2834e812715c80ebc6ae0c5619da949dfb174 100755
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
@@ -17,15 +17,11 @@ do
     sed "s/XXX/$e/g" constant/transportProperties.template \
         > constant/transportProperties
 
-    runApplication `getApplication`
-
-    mv log.boundaryFoam log.boundaryFoam_$e
+    runApplication -s $e  `getApplication`
 
     # extract y+, U+
     # note: both must be added to foamLog.db
-    runApplication foamLog log.boundaryFoam_$e
-
-    mv log.foamLog log.foamLog_$e
+    runApplication -s $e  foamLog log.boundaryFoam.$e
 
     if [ -e logs/yPlus_0 ]
     then
@@ -73,4 +69,4 @@ EOF
 
 echo Done
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/Allclean b/tutorials/incompressible/icoFoam/cavity/Allclean
similarity index 57%
rename from tutorials/incompressible/icoFoam/Allclean
rename to tutorials/incompressible/icoFoam/cavity/Allclean
index 012a6bba344496b61342ca7b175f97563d28ced0..842bb7ced7d3256ae703992120af550e34d5448a 100755
--- a/tutorials/incompressible/icoFoam/Allclean
+++ b/tutorials/incompressible/icoFoam/cavity/Allclean
@@ -4,20 +4,14 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-keepCases="cavity cavityGrade cavityClipped elbow"
+keepCases="cavity cavityGrade cavityClipped"
 loseCases="cavityFine cavityHighRe"
 
 for caseName in $keepCases
 do
 (
     cd $caseName || exit
-
     foamCleanTutorials
-
-    if [ "$caseName" = elbow ]
-    then
-        rm -rf fluentInterface
-    fi
 )
 done
 
@@ -26,7 +20,4 @@ do
     removeCase $caseName
 done
 
-
-(cd elbow && ./Allclean)
-
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/Allrun b/tutorials/incompressible/icoFoam/cavity/Allrun
similarity index 85%
rename from tutorials/incompressible/icoFoam/Allrun
rename to tutorials/incompressible/icoFoam/cavity/Allrun
index 723784c4271f6b69e2ec6c8d9445a29e9799c327..97f489d7f8aa7d9837e884ddfee18b787cb1d8bc 100755
--- a/tutorials/incompressible/icoFoam/Allrun
+++ b/tutorials/incompressible/icoFoam/cavity/Allrun
@@ -79,11 +79,6 @@ do
     cavityClipped)
         cp -r $caseName/0 $caseName/0.5
         runMapFields cavity $caseName
-        if [ ".`grep nonuniform $caseName/0.5/U`" != "." ]
-        then
-            sed -f resetFixedWallsScr $caseName/0.5/U > $caseName/0.5/U.temp
-            mv $caseName/0.5/U.temp $caseName/0.5/U
-        fi
         ;;
     esac
 
@@ -91,8 +86,4 @@ do
     ( cd $caseName && runApplication `getApplication` )
 done
 
-
-# elbow case for testing Fluent-FOAM conversion tools
-(cd elbow && ./Allrun)
-
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/cavity/0/U b/tutorials/incompressible/icoFoam/cavity/cavity/0/U
similarity index 93%
rename from tutorials/incompressible/icoFoam/cavity/0/U
rename to tutorials/incompressible/icoFoam/cavity/cavity/0/U
index d7c2b91165036e340fb792eee998e00d2277a39e..cf8ef735e0e9fbeda242d4f7bb287d44f195e05b 100644
--- a/tutorials/incompressible/icoFoam/cavity/0/U
+++ b/tutorials/incompressible/icoFoam/cavity/cavity/0/U
@@ -28,8 +28,7 @@ boundaryField
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/icoFoam/cavity/0/p b/tutorials/incompressible/icoFoam/cavity/cavity/0/p
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavity/0/p
rename to tutorials/incompressible/icoFoam/cavity/cavity/0/p
diff --git a/tutorials/incompressible/icoFoam/cavity/constant/transportProperties b/tutorials/incompressible/icoFoam/cavity/cavity/constant/transportProperties
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavity/constant/transportProperties
rename to tutorials/incompressible/icoFoam/cavity/cavity/constant/transportProperties
diff --git a/tutorials/incompressible/icoFoam/cavity/system/blockMeshDict b/tutorials/incompressible/icoFoam/cavity/cavity/system/blockMeshDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavity/system/blockMeshDict
rename to tutorials/incompressible/icoFoam/cavity/cavity/system/blockMeshDict
diff --git a/tutorials/incompressible/icoFoam/cavity/system/controlDict b/tutorials/incompressible/icoFoam/cavity/cavity/system/controlDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavity/system/controlDict
rename to tutorials/incompressible/icoFoam/cavity/cavity/system/controlDict
diff --git a/tutorials/incompressible/icoFoam/cavity/system/fvSchemes b/tutorials/incompressible/icoFoam/cavity/cavity/system/fvSchemes
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavity/system/fvSchemes
rename to tutorials/incompressible/icoFoam/cavity/cavity/system/fvSchemes
diff --git a/tutorials/incompressible/icoFoam/cavity/system/fvSolution b/tutorials/incompressible/icoFoam/cavity/cavity/system/fvSolution
similarity index 95%
rename from tutorials/incompressible/icoFoam/cavity/system/fvSolution
rename to tutorials/incompressible/icoFoam/cavity/cavity/system/fvSolution
index 8b7913e8159fa88fe5c57d54edf037636ee65df0..fb6e8e4622bd61357b957200d65625fc51c67b5f 100644
--- a/tutorials/incompressible/icoFoam/cavity/system/fvSolution
+++ b/tutorials/incompressible/icoFoam/cavity/cavity/system/fvSolution
@@ -22,6 +22,12 @@ solvers
         solver          PCG;
         preconditioner  DIC;
         tolerance       1e-06;
+        relTol          0.05;
+    }
+
+    pFinal
+    {
+        $p;
         relTol          0;
     }
 
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/0/U b/tutorials/incompressible/icoFoam/cavity/cavityClipped/0/U
similarity index 93%
rename from tutorials/incompressible/icoFoam/cavityClipped/0/U
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/0/U
index cc1a07631d3050bccc7cf216ca6a9e73b135e6ae..50ffb701dc464e93a0d02b3ea92adb2f12a49a41 100644
--- a/tutorials/incompressible/icoFoam/cavityClipped/0/U
+++ b/tutorials/incompressible/icoFoam/cavity/cavityClipped/0/U
@@ -28,8 +28,7 @@ boundaryField
     }
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/0/p b/tutorials/incompressible/icoFoam/cavity/cavityClipped/0/p
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityClipped/0/p
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/0/p
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/constant/transportProperties b/tutorials/incompressible/icoFoam/cavity/cavityClipped/constant/transportProperties
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityClipped/constant/transportProperties
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/constant/transportProperties
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/blockMeshDict b/tutorials/incompressible/icoFoam/cavity/cavityClipped/system/blockMeshDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityClipped/system/blockMeshDict
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/system/blockMeshDict
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/controlDict b/tutorials/incompressible/icoFoam/cavity/cavityClipped/system/controlDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityClipped/system/controlDict
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/system/controlDict
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes b/tutorials/incompressible/icoFoam/cavity/cavityClipped/system/fvSchemes
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityClipped/system/fvSchemes
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/system/fvSchemes
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSolution b/tutorials/incompressible/icoFoam/cavity/cavityClipped/system/fvSolution
similarity index 95%
rename from tutorials/incompressible/icoFoam/cavityClipped/system/fvSolution
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/system/fvSolution
index 8b7913e8159fa88fe5c57d54edf037636ee65df0..fb6e8e4622bd61357b957200d65625fc51c67b5f 100644
--- a/tutorials/incompressible/icoFoam/cavityClipped/system/fvSolution
+++ b/tutorials/incompressible/icoFoam/cavity/cavityClipped/system/fvSolution
@@ -22,6 +22,12 @@ solvers
         solver          PCG;
         preconditioner  DIC;
         tolerance       1e-06;
+        relTol          0.05;
+    }
+
+    pFinal
+    {
+        $p;
         relTol          0;
     }
 
diff --git a/tutorials/incompressible/icoFoam/cavityClipped/system/mapFieldsDict b/tutorials/incompressible/icoFoam/cavity/cavityClipped/system/mapFieldsDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityClipped/system/mapFieldsDict
rename to tutorials/incompressible/icoFoam/cavity/cavityClipped/system/mapFieldsDict
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/0/U b/tutorials/incompressible/icoFoam/cavity/cavityGrade/0/U
similarity index 93%
rename from tutorials/incompressible/icoFoam/cavityGrade/0/U
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/0/U
index d83e92651fdcb57c4a213615db647e40edd8564d..da1647bfe060576722d3c7d59e81bc2077af9fa6 100644
--- a/tutorials/incompressible/icoFoam/cavityGrade/0/U
+++ b/tutorials/incompressible/icoFoam/cavity/cavityGrade/0/U
@@ -28,8 +28,7 @@ boundaryField
     }
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/0/p b/tutorials/incompressible/icoFoam/cavity/cavityGrade/0/p
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityGrade/0/p
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/0/p
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/constant/transportProperties b/tutorials/incompressible/icoFoam/cavity/cavityGrade/constant/transportProperties
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityGrade/constant/transportProperties
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/constant/transportProperties
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/blockMeshDict b/tutorials/incompressible/icoFoam/cavity/cavityGrade/system/blockMeshDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityGrade/system/blockMeshDict
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/system/blockMeshDict
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/controlDict b/tutorials/incompressible/icoFoam/cavity/cavityGrade/system/controlDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityGrade/system/controlDict
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/system/controlDict
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes b/tutorials/incompressible/icoFoam/cavity/cavityGrade/system/fvSchemes
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityGrade/system/fvSchemes
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/system/fvSchemes
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSolution b/tutorials/incompressible/icoFoam/cavity/cavityGrade/system/fvSolution
similarity index 95%
rename from tutorials/incompressible/icoFoam/cavityGrade/system/fvSolution
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/system/fvSolution
index 8b7913e8159fa88fe5c57d54edf037636ee65df0..fb6e8e4622bd61357b957200d65625fc51c67b5f 100644
--- a/tutorials/incompressible/icoFoam/cavityGrade/system/fvSolution
+++ b/tutorials/incompressible/icoFoam/cavity/cavityGrade/system/fvSolution
@@ -22,6 +22,12 @@ solvers
         solver          PCG;
         preconditioner  DIC;
         tolerance       1e-06;
+        relTol          0.05;
+    }
+
+    pFinal
+    {
+        $p;
         relTol          0;
     }
 
diff --git a/tutorials/incompressible/icoFoam/cavityGrade/system/mapFieldsDict b/tutorials/incompressible/icoFoam/cavity/cavityGrade/system/mapFieldsDict
similarity index 100%
rename from tutorials/incompressible/icoFoam/cavityGrade/system/mapFieldsDict
rename to tutorials/incompressible/icoFoam/cavity/cavityGrade/system/mapFieldsDict
diff --git a/tutorials/incompressible/icoFoam/elbow/0/U b/tutorials/incompressible/icoFoam/elbow/0/U
index 4801e93458a4c13912176fa95b6b12964826651b..486eb44935f7811264aa07a64bc7430c574117bf 100644
--- a/tutorials/incompressible/icoFoam/elbow/0/U
+++ b/tutorials/incompressible/icoFoam/elbow/0/U
@@ -22,8 +22,7 @@ boundaryField
 {
     wall-4
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     velocity-inlet-5
@@ -45,8 +44,7 @@ boundaryField
 
     wall-8
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBackPlanes
diff --git a/tutorials/incompressible/icoFoam/elbow/Allclean b/tutorials/incompressible/icoFoam/elbow/Allclean
index e44a03c204afdd3ea4905796da56fa977c34c041..f2da619e3dc41408d96034326836d3a3784aea8e 100755
--- a/tutorials/incompressible/icoFoam/elbow/Allclean
+++ b/tutorials/incompressible/icoFoam/elbow/Allclean
@@ -8,4 +8,4 @@ rm -f constant/polyMesh/boundary > /dev/null 2>&1
 rm -rf fluentInterface
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/elbow/Allrun b/tutorials/incompressible/icoFoam/elbow/Allrun
index 093641823aae35d2b58894724a0ad9afd78a6aee..60c5cad9436d849fb485521dbae712d9bbe576e0 100755
--- a/tutorials/incompressible/icoFoam/elbow/Allrun
+++ b/tutorials/incompressible/icoFoam/elbow/Allrun
@@ -12,4 +12,4 @@ runApplication "$application"
 runApplication foamMeshToFluent
 runApplication foamDataToFluent
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/elbow/system/fvSolution b/tutorials/incompressible/icoFoam/elbow/system/fvSolution
index fba2d589f0354e5b75fff90564d4e7c9ce74341e..7da2fbd20e4c72be12ecde6a933e36d4a312b923 100644
--- a/tutorials/incompressible/icoFoam/elbow/system/fvSolution
+++ b/tutorials/incompressible/icoFoam/elbow/system/fvSolution
@@ -22,6 +22,12 @@ solvers
         solver          PCG;
         preconditioner  DIC;
         tolerance       1e-06;
+        relTol          0.05;
+    }
+
+    pFinal
+    {
+        $p;
         relTol          0;
     }
 
diff --git a/tutorials/incompressible/icoFoam/resetFixedWallsScr b/tutorials/incompressible/icoFoam/resetFixedWallsScr
deleted file mode 100644
index 5a8d98ce462da5095632a9ad2cd29867838b55e0..0000000000000000000000000000000000000000
--- a/tutorials/incompressible/icoFoam/resetFixedWallsScr
+++ /dev/null
@@ -1,8 +0,0 @@
-/fixedWalls/,/}/{
-/fixedWalls/p
-/{/p
-/type            fixedValue;/p
-s/value[ \t]*nonuniform[ \t]*List<vector>[ \t]*/value           uniform (0 0 0);/p
-/}/p
-d
-}
diff --git a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/0/U b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/0/U
index d5ed21c0c9b917be035d82e2b90979e08bae02b8..461e1c1930ce4f8bbcc956171729d95f341e1a97 100644
--- a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/0/U
+++ b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/0/U
@@ -33,20 +33,17 @@ boundaryField
 
     down
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     up
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     cylinder
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     defaultFaces
diff --git a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSolution b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSolution
index 623c7d7750b4be7ce06b970ce339a53701513abf..d72d4aac4e9b5c03dddca8c5443ff9f43f3ee743 100644
--- a/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSolution
+++ b/tutorials/incompressible/nonNewtonianIcoFoam/offsetCylinder/system/fvSolution
@@ -20,7 +20,7 @@ solvers
     p
     {
         solver          GAMG;
-        tolerance       0;
+        tolerance       1e-6;
         relTol          0.1;
         smoother        GaussSeidel;
         nPreSweeps      0;
@@ -31,6 +31,12 @@ solvers
         mergeLevels     1;
     }
 
+    pFinal
+    {
+        $p;
+        relTol          0;
+    }
+
     U
     {
         solver          smoothSolver;
@@ -42,8 +48,8 @@ solvers
 
 PISO
 {
-    nCorrectors     4;
-    nNonOrthogonalCorrectors 2;
+    nCorrectors     5;
+    nNonOrthogonalCorrectors 0;
 }
 
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/0/U b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/0/U
index 5a816d590ac26d300528b79b4d88debd9cee1647..8a3472efb14e104cc0996c642afacab9f2d10b59 100644
--- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/0/U
+++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/0/U
@@ -22,13 +22,13 @@ boundaryField
 {
     rotor
     {
-        type            movingWallVelocity; // fixedValue;
+        type            movingWallVelocity;
         value           uniform (0 0 0);
     }
 
     stator
     {
-        type            movingWallVelocity; // fixedValue;
+        type            movingWallVelocity;
         value           uniform (0 0 0);
     }
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
index 80a0ee95cf530b182c8ecd7923daaba54705084e..ebb40610158eefe6f05f4487a386212b57b26264 100755
--- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
@@ -10,7 +10,7 @@ application=`getApplication`
 
 #runApplication $application
 runApplication decomposePar
-runParallel $application 4
+runParallel $application
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh
index adf298d6f36a18a4153579fdba7113c8e5aa94ca..bcb12c0e9ac17c9aefbf669bd022c29c97052727 100755
--- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh
+++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh
@@ -10,4 +10,4 @@ runApplication blockMesh
 
 runApplication topoSet
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
index 4edd434f319820f35b5d7bea371816c85c8636f3..b9ef295bb59deb4c56207ae7999de8dd0600ef36 100644
--- a/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
+++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
@@ -28,14 +28,12 @@ boundaryField
 
     farFieldMoving
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     fixedWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     left
@@ -46,8 +44,7 @@ boundaryField
 
     farField
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     back
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/U b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/U
index 88ca62aaba33a2f04096ae517860eccf2b7846d3..f4d6339a405f45ba49c662f45858d213eb88645b 100644
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/U
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/0.org/U
@@ -43,8 +43,7 @@ boundaryField
     }
     ACMI1_blockage
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     ACMI1_couple
     {
@@ -53,8 +52,7 @@ boundaryField
     }
     ACMI2_blockage
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     ACMI2_couple
     {
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
index 0ee115c5777e5bccbfca6856aa9e90dc877d3637..3f7cab5d82e34e43d25b7b1a4dfbe80e21a7248f 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
@@ -8,6 +8,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication decomposePar
 
-runParallel $(getApplication) 4
+runParallel $(getApplication)
 
 runApplication reconstructPar
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U
index 3ad87329783c823be87d15bb43aa909e166d6afc..0d291633010cd32bc22e72ea34fd549dc4bb2314 100644
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U
@@ -39,8 +39,7 @@ boundaryField
 
     outerCylinder
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     "propeller.*"
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
index 755e96529929c8328294ed04ad744382d59b8d55..1d24256eb001c223c17e9fda2ebb9b33acd77dbc 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
@@ -8,6 +8,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication decomposePar
 
-runParallel `getApplication` 4
+runParallel `getApplication`
 
 runApplication reconstructPar
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
index 65057eef6fb6b55463e9fba33ee66ed39ac05f01..997bdd6cfb8e308c6c960552cef3909f00713369 100755
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun
@@ -19,12 +19,12 @@ runApplication simpleFoam
 # Copy the mesh from the steady state case and map the results to a
 # mesh motion case, then solve transient.
 cd ../wingMotion2D_pimpleDyMFoam
-cp -r ../wingMotion2D_simpleFoam/constant/polyMesh/ constant/
+cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant
 cp -r 0.org 0
 runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
 mv 0/pointDisplacement.unmapped 0/pointDisplacement
 runApplication decomposePar
-runParallel `getApplication` 4
+runParallel `getApplication`
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/0.org/U b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/0.org/U
index f96b0f60582bf4909f55c3d16f38f6d4d4079f62..c039bf464356153baf82e551715bff400aba9460 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/0.org/U
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/0.org/U
@@ -34,8 +34,7 @@ boundaryField
 
     wing
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     #include "include/frontBackTopBottomPatches"
diff --git a/tutorials/incompressible/pimpleFoam/TJunction/0/U b/tutorials/incompressible/pimpleFoam/TJunction/0/U
index c267acda0383dbc8bb0cab5d9fc2a246f0fa5685..d0660ba682331fc94650ae9ede9288bc0a6d4d0c 100644
--- a/tutorials/incompressible/pimpleFoam/TJunction/0/U
+++ b/tutorials/incompressible/pimpleFoam/TJunction/0/U
@@ -42,8 +42,7 @@ boundaryField
 
     defaultFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/0.org/U b/tutorials/incompressible/pimpleFoam/TJunctionFan/0.org/U
index db36a6aee6db54196cb183d76ff59aa9ab4ddf29..0bfd174a74e727962f15b2eccdc06fdd80a32c4d 100644
--- a/tutorials/incompressible/pimpleFoam/TJunctionFan/0.org/U
+++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/0.org/U
@@ -40,8 +40,7 @@ boundaryField
     }
     defaultFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean
index 4e8a5b29fd3acc06e09c7bc14777b42826906e3e..61edfb303237d95429c1833e5f77dfbfd671288b 100755
--- a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean
+++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/channel395/0.org/U b/tutorials/incompressible/pimpleFoam/channel395/0.org/U
index 9322d870eddbe5561c35c3f0bfd54f06312d20c6..e0952c42a2a1a1d74b812ebe1ee4285ee87f4bd5 100644
--- a/tutorials/incompressible/pimpleFoam/channel395/0.org/U
+++ b/tutorials/incompressible/pimpleFoam/channel395/0.org/U
@@ -23,13 +23,11 @@ boundaryField
 {
     bottomWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     topWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     sides1_half0
     {
diff --git a/tutorials/incompressible/pimpleFoam/channel395/Allrun b/tutorials/incompressible/pimpleFoam/channel395/Allrun
index a94c6e72a3b70b30bf1db73b8204ab3aad0771bf..989291cfddfce20bf3ec218c646f46f00f39d47e 100755
--- a/tutorials/incompressible/pimpleFoam/channel395/Allrun
+++ b/tutorials/incompressible/pimpleFoam/channel395/Allrun
@@ -14,9 +14,9 @@ runApplication blockMesh
 
 #- Run parallel
 runApplication decomposePar -cellDist
-runParallel $application 4
+runParallel $application
 runApplication reconstructPar
 
 runApplication postChannel
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U
index 98b9dba46aa2ba945b741cb3fad7d5c79825f33f..ef282eab01aa42ac7eccc1e5fcc272ace5c6c50c 100644
--- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U
+++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U
@@ -37,8 +37,7 @@ boundaryField
     }
     hole
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allclean b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allclean
index 10920439bb1b8b65bd8f7602a46ef4550dd83545..6b45f82a41b0f9a0739a80a41a680be892e55243 100755
--- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allclean
+++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allclean
@@ -6,4 +6,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun
index 138bb82e894531b45f4061d28e244720e47178bc..c82525b2f17e8de026c0598241acb3900553cc93 100755
--- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun
+++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun
@@ -23,4 +23,4 @@ runApplication topoSet
 runApplication createPatch -overwrite
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/0/U b/tutorials/incompressible/pimpleFoam/pitzDaily/0/U
index f1b983008d55f18c2b5cf3a1b58137217665f41f..dd690bd6b810771a291d6852480fd65ac5fc7953 100644
--- a/tutorials/incompressible/pimpleFoam/pitzDaily/0/U
+++ b/tutorials/incompressible/pimpleFoam/pitzDaily/0/U
@@ -33,14 +33,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes b/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes
index b07530a695b4df1440260705308550e72617f378..c6a2a276057a4138862f06057ccf21c384113254 100644
--- a/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes
+++ b/tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes
@@ -23,8 +23,6 @@ ddtSchemes
 gradSchemes
 {
     default         Gauss linear;
-    grad(p)         Gauss linear;
-    grad(U)         Gauss linear;
 }
 
 divSchemes
@@ -41,19 +39,12 @@ divSchemes
 
 laplacianSchemes
 {
-    default         none;
-    laplacian(nuEff,U) Gauss linear corrected;
-    laplacian(rAUf,p)  Gauss linear corrected;
-    laplacian(DkEff,k) Gauss linear corrected;
-    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
-    laplacian(DREff,R) Gauss linear corrected;
-    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
+    default         Gauss linear corrected;
 }
 
 interpolationSchemes
 {
     default         linear;
-    interpolate(U)  linear;
 }
 
 snGradSchemes
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/0/U b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/0/U
new file mode 100644
index 0000000000000000000000000000000000000000..6d9b2d37529352580cce6c8b0ab0f692f7d8aa6a
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/0/U
@@ -0,0 +1,39 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volVectorField;
+    object      U;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (1 0 0);
+
+boundaryField
+{
+    //- Set patchGroups for constraint patches
+    #includeEtc "caseDicts/setConstraintTypes"
+
+    inlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+
+    outlet
+    {
+        type            pressureInletOutletVelocity;
+        value           $internalField;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/0/p b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/0/p
new file mode 100644
index 0000000000000000000000000000000000000000..77fa018868e35b6ef98f0e11ec6dedd5f0f9da05
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/0/p
@@ -0,0 +1,38 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      p;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    //- Set patchGroups for constraint patches
+    #includeEtc "caseDicts/setConstraintTypes"
+
+    inlet
+    {
+        type            zeroGradient;
+    }
+
+    outlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..a651bf5d0e69bc5ea56363628127017d56b6977e
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
@@ -0,0 +1,15 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+application=`getApplication`
+
+runApplication blockMesh
+
+runApplication topoSet
+
+runApplication $application
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/fvOptions b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/fvOptions
new file mode 100644
index 0000000000000000000000000000000000000000..e6ced18415c2ff60b1b60f916c12875ba086effa
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/fvOptions
@@ -0,0 +1,56 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      fvOptions;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+porosity1
+{
+    type            explicitPorositySource;
+    active          yes;
+
+    explicitPorositySourceCoeffs
+    {
+        selectionMode   cellZone;
+        cellZone        porousBlockage;
+
+        type            DarcyForchheimer;
+
+        // D 100;  // Very little blockage
+        // D 200;  // Some blockage but steady flow
+        // D 500;  // Slight waviness in the far wake
+        D 1000; // Fully shedding behavior
+
+        DarcyForchheimerCoeffs
+        {
+            d   ($D $D $D);
+            f   (0 0 0);
+
+            coordinateSystem
+            {
+                type    cartesian;
+                origin  (0 0 0);
+                coordinateRotation
+                {
+                    type    axesRotation;
+                    e1  (1 0 0);
+                    e2  (0 1 0);
+                }
+            }
+        }
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/transportProperties b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/transportProperties
new file mode 100644
index 0000000000000000000000000000000000000000..4220fccc4eb23af7721539290ae1fc484d1d3e59
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/transportProperties
@@ -0,0 +1,22 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      transportProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+transportModel  Newtonian;
+
+nu              [0 2 -1 0 0 0 0] 5e-3; // Re_blockage = 200
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/turbulenceProperties b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/turbulenceProperties
new file mode 100644
index 0000000000000000000000000000000000000000..fd6f708b460e6638de5c64717a70fafabeb0335b
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/constant/turbulenceProperties
@@ -0,0 +1,20 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      turbulenceProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+simulationType laminar;
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/blockMeshDict b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/blockMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..b597b2ba1adcb42dcc0b832c28c951353ba47eb1
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/blockMeshDict
@@ -0,0 +1,86 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      blockMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+convertToMeters 1;
+
+vertices
+(
+    (-2 -2 -0.1)
+    (6  -2 -0.1)
+    (6   2 -0.1)
+    (-2  2 -0.1)
+    (-2 -2  0.1)
+    (6  -2  0.1)
+    (6   2  0.1)
+    (-2  2  0.1)
+);
+
+blocks
+(
+    hex (0 1 2 3 4 5 6 7) (64 32 1) simpleGrading (1 1 1)
+);
+
+boundary
+(
+    inlet
+    {
+        type patch;
+        faces
+        (
+            (0 4 7 3)
+        );
+    }
+
+    outlet
+    {
+        type patch;
+        faces
+        (
+            (2 6 5 1)
+        );
+    }
+
+    top
+    {
+        type symmetryPlane;
+        faces
+        (
+            (3 7 6 2)
+        );
+    }
+
+    bottom
+    {
+        type symmetryPlane;
+        faces
+        (
+
+            (1 5 4 0)
+        );
+    }
+
+    frontAndBack
+    {
+        type empty;
+        faces
+        (
+            (0 3 2 1)
+            (4 5 6 7)
+        );
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/controlDict b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/controlDict
new file mode 100644
index 0000000000000000000000000000000000000000..21ef9978b9c4d3e30422f1ab04287054830203f0
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/controlDict
@@ -0,0 +1,49 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+application     pisoFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         100;
+
+deltaT          0.05;
+
+writeControl    runTime;
+
+writeInterval   1;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable true;
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/fvSchemes b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/fvSchemes
new file mode 100644
index 0000000000000000000000000000000000000000..875b064b038dbaed284bd5aee76eb593742b9990
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/fvSchemes
@@ -0,0 +1,51 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         Euler;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      Gauss LUST grad(U);
+    div((nuEff*dev2(T(grad(U))))) Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear uncorrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         uncorrected;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/fvSolution b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/fvSolution
new file mode 100644
index 0000000000000000000000000000000000000000..06a4bd7883e01521e6546686feea153411b96c7c
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/fvSolution
@@ -0,0 +1,59 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    p
+    {
+        solver          GAMG;
+        tolerance       1e-06;
+        relTol          0.1;
+        smoother        GaussSeidel;
+        nPreSweeps      0;
+        nPostSweeps     2;
+        cacheAgglomeration on;
+        agglomerator    faceAreaPair;
+        nCellsInCoarsestLevel 10;
+        mergeLevels     1;
+    }
+
+    pFinal
+    {
+        $p;
+        tolerance       1e-06;
+        relTol          0;
+    }
+
+    "(U|k|epsilon|omega|R|nuTilda)"
+    {
+        solver          smoothSolver;
+        smoother        GaussSeidel;
+        tolerance       1e-05;
+        relTol          0;
+    }
+}
+
+PISO
+{
+    nCorrectors     2;
+    nNonOrthogonalCorrectors 0;
+    pRefCell        0;
+    pRefValue       0;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/topoSetDict b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/topoSetDict
new file mode 100644
index 0000000000000000000000000000000000000000..fe5651876d30e6f8eff7fa374b2249d70d8d816e
--- /dev/null
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/system/topoSetDict
@@ -0,0 +1,43 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+actions
+(
+    // porousBlockage
+    {
+        name    porousBlockageCellSet;
+        type    cellSet;
+        action  new;
+        source  boxToCell;
+        sourceInfo
+        {
+            box (-0.5 -0.5 -1) (0.5 0.5 1);
+        }
+    }
+    {
+        name    porousBlockage;
+        type    cellZoneSet;
+        action  new;
+        source  setToCellZone;
+        sourceInfo
+        {
+            set porousBlockageCellSet;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/Allclean b/tutorials/incompressible/pisoFoam/les/motorBike/Allclean
index e4b31c374005405598dd522a858ce4c47f936772..5521d49681a3ead981a446f58bdd42d3d9531a8b 100755
--- a/tutorials/incompressible/pisoFoam/les/motorBike/Allclean
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/Allclean
@@ -8,4 +8,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 rm -rf motorBikeLES
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/Allrun
index ebba3c5ff42ecbd3750bb9eb6eeb91a217b1e725..15e3932e9e01c5ce530208c23cc3acca4ef67ccf 100755
--- a/tutorials/incompressible/pisoFoam/les/motorBike/Allrun
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/Allrun
@@ -25,11 +25,14 @@ cloneParallelCase()
 # Do the Spalart-Allmaras steady-state case
 (cd motorBike && foamRunTutorials)
 
-# Clone the steady-state case to the LES case
-cloneParallelCase motorBike motorBikeLES
+if ! isTest $@
+then
+    # Clone the steady-state case to the LES case
+    cloneParallelCase motorBike motorBikeLES
 
-# Do the LES case
-cp lesFiles/Allrun motorBikeLES/
-(cd motorBikeLES && foamRunTutorials)
+    # Do the LES case
+    cp lesFiles/Allrun motorBikeLES/
+    (cd motorBikeLES && foamRunTutorials)
+fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/Alltest b/tutorials/incompressible/pisoFoam/les/motorBike/Alltest
deleted file mode 100755
index 97e6f4816053c800bc5556ce343a6ebae6adf7d7..0000000000000000000000000000000000000000
--- a/tutorials/incompressible/pisoFoam/les/motorBike/Alltest
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-# Do the Spalart-Allmaras steady-state case
-(cd motorBike && foamRunTutorials)
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun
index d39ce623e950e6b42fe863288dd0a3b238f855a6..be0ad68bf8d0eeedf28a164a183ebcc1d08c9fcf 100755
--- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun
@@ -11,7 +11,7 @@ ls -d processor* | xargs -I {} rm -rf ./{}/0 $1
 ls -d processor* | xargs -I {} mv ./{}/500 ./{}/0 $1
 ls -d processor* | xargs -I {} rm -rf ./{}/0/uniform $1
 
-runParallel pisoFoam 8
+runParallel pisoFoam
 
 runApplication reconstructParMesh -constant -mergeTol 1e-6
 
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes
index ebcd27ac3f9e57968d4b02efdd1574220c833492..418156cfdc40a2e96ac0ea1a54f4172f17b637c5 100644
--- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSchemes
@@ -10,6 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       dictionary;
+    location    "system";
     object      fvSchemes;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution
index 8b34e1a1967ab2db1c52dbf91e559d80dc0e0f33..3c2768770ad3613f3b32519eab7fd1eceed94fed 100644
--- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/fvSolution
@@ -10,6 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       dictionary;
+    location    "system";
     object      fvSolution;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -31,13 +32,13 @@ solvers
         nCellsInCoarsestLevel 50;
         agglomerator    faceAreaPair;
         mergeLevels     1;
-    };
+    }
 
     pFinal
     {
         $p;
         relTol          0;
-    };
+    }
 
     "(U|k|B|nuTilda)"
     {
@@ -45,7 +46,7 @@ solvers
         smoother        symGaussSeidel;
         tolerance       1e-7;
         relTol          0;
-    };
+    }
 }
 
 PISO
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U
index 79fe92790445a313db5bd43b96b29473012f8461..2c9710aed0e31ff4e07053174a4f2083812e0d19 100644
--- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U
@@ -47,8 +47,7 @@ boundaryField
     }
     "motorBike_.*"
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     upperWall
     {
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean
index cdb4fd6182ed2592dbeae7e9e8b679a8ad87a1ac..a48c67fbef85230fab9bc8c5710aecdf1e2d5e73 100755
--- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allclean
@@ -14,4 +14,4 @@ cleanCase
 # Reset decomposeParDict
 cp system/decomposeParDict.hierarchical system/decomposeParDict
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun
index 29462ed538cdd197b219401e27ef36c55b0c2611..b24684ca2af25d3c5245b75913d6d2f8decfa249 100755
--- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun
@@ -15,16 +15,16 @@ cp system/decomposeParDict.hierarchical system/decomposeParDict
 runApplication decomposePar
 
 cp system/decomposeParDict.ptscotch system/decomposeParDict
-runParallel snappyHexMesh 8 -overwrite -parallel
+runParallel snappyHexMesh -overwrite -parallel
 
 find . -type f -iname "*level*" -exec rm {} \;
 
 ls -d processor* | xargs -I {} cp -r 0.org ./{}/0 $1
 
-runParallel renumberMesh 8 -overwrite
+runParallel renumberMesh -overwrite
 
-runParallel potentialFoam 8 -initialiseUBCs
+runParallel potentialFoam -initialiseUBCs
 
-runParallel `getApplication` 8
+runParallel `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution
index 3e0fdf83d0af53f47891712d495da8d291f41bbb..88e348e4713a476957ea1243405492fae343cdac 100644
--- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/fvSolution
@@ -36,7 +36,7 @@ solvers
         $p;
         tolerance       1e-6;
         relTol          0;
-    };
+    }
 
     Phi
     {
diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/0/U b/tutorials/incompressible/pisoFoam/les/pitzDaily/0/U
index 443ad8b7eefa668ad890732613f7ccddb982dfe2..7c0bbd1e90832bd9e6a27d4a276a72b0c4f634af 100644
--- a/tutorials/incompressible/pisoFoam/les/pitzDaily/0/U
+++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/0/U
@@ -37,14 +37,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/0/U b/tutorials/incompressible/pisoFoam/ras/cavity/0/U
index d7c2b91165036e340fb792eee998e00d2277a39e..cf8ef735e0e9fbeda242d4f7bb287d44f195e05b 100644
--- a/tutorials/incompressible/pisoFoam/ras/cavity/0/U
+++ b/tutorials/incompressible/pisoFoam/ras/cavity/0/U
@@ -28,8 +28,7 @@ boundaryField
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/0/U b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/0/U
index d7c2b91165036e340fb792eee998e00d2277a39e..cf8ef735e0e9fbeda242d4f7bb287d44f195e05b 100644
--- a/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/0/U
+++ b/tutorials/incompressible/pisoFoam/ras/cavityCoupledU/0/U
@@ -28,8 +28,7 @@ boundaryField
 
     fixedWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U
index 449708f7ce0ecdc202768190b0c52f8d8c98db6b..c5fcae49739afa632cc0de91235f8eedd474fa6c 100644
--- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/0/U b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/0/U
index a06acf3b5b3413c4aeccd85eb19f13d4a9f3a1f2..d4adaf5001212c6e72b3ef504ed6c899194b46e9 100644
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/0/U
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
index 5aaa172c9c3cda6d360af84a2484c77c3dc422b7..f7e384215e413bf60b4cf501fcc080f648c3cd9f 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean
@@ -11,4 +11,4 @@ rm constant/polyMesh/boundary > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun
index be374658890b44f5f736e34eda5f7438b8c20bec..f3df037202e8b5ecfe2cd19cce9cb8c6a079e159 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun
@@ -8,4 +8,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
index a6ca09c2102519bad173909fca920a8c5e525ef0..cbf9866f1a1f47decab17f4d1cc06d74b85974da 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
@@ -9,13 +9,12 @@ runApplication surfaceFeatureExtract
 runApplication foamyHexMesh
 
 # Collapse only patch faces from incomplete conformation
-cp system/collapseDict.indirectPatchFaces system/collapseDict
-runApplication collapseEdges -collapseFaceSet indirectPatchFaces -latestTime -overwrite
-mv log.collapseEdges log.collapseEdges-indirectPatchFaces
+runApplication -s indirectPatchFaces \
+    collapseEdges -collapseFaceSet indirectPatchFaces -latestTime -overwrite
 
 # Collapse small edges and sliver faces
-cp system/collapseDict.collapseFaces system/collapseDict
-runApplication collapseEdges -collapseFaces -latestTime -overwrite
+runApplication -s collapseFaces \
+    collapseEdges -collapseFaces -latestTime -overwrite
 
 runApplication checkMesh -allTopology -allGeometry -latestTime
 
@@ -28,4 +27,4 @@ latestTime=`foamInfoExec -latestTime`
 # Clean up intermediate meshes
 \rm -r [1-9]*
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/0/U b/tutorials/incompressible/simpleFoam/airFoil2D/0/U
index 0fd8d092ad22863c110bd568a9f41187afb15b76..ba119821d3924c0d55832450c07a08d039a7986b 100644
--- a/tutorials/incompressible/simpleFoam/airFoil2D/0/U
+++ b/tutorials/incompressible/simpleFoam/airFoil2D/0/U
@@ -34,8 +34,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean
index b77d47d991c605a56c57139d08c269240bd08409..c89fe3143ec469261888941ae84708ce1b245469 100755
--- a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean
+++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean
@@ -6,4 +6,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 rm -rf *[1-9]*
 rm -f log.* 2>/dev/null
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allrun b/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
index 81444e70c8e4be61af8729ad49abf5379b212fdd..271817324757b30b55bebcb63da5e059b8bc2203 100755
--- a/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
+++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
@@ -8,4 +8,4 @@ application=`getApplication`
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/airFoil2D/constant/polyMesh/boundary
index 9178f4de7fed9646a712e69124eb7b7479ba8868..017b516d09a5f6a8ad412b34e8b44b9631f8091b 100644
--- a/tutorials/incompressible/simpleFoam/airFoil2D/constant/polyMesh/boundary
+++ b/tutorials/incompressible/simpleFoam/airFoil2D/constant/polyMesh/boundary
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/0/U b/tutorials/incompressible/simpleFoam/mixerVessel2D/0/U
index d085eb3d855d7575804427c97ad26314c36bc16f..125f44d41934526d327fa89d839d7a400c59c77e 100644
--- a/tutorials/incompressible/simpleFoam/mixerVessel2D/0/U
+++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/0/U
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun b/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
index 0c62ec6ec548c57de24a8c7619e775b7a3db775d..85523c3f63f17d1a0ce22c3ab71f10bb03efa83e 100755
--- a/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
+++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh b/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh
index afad253d6ed34087fd117d27151cdd647c640b83..5cd24a55282eac9c5d606be0eed4b95803cfd2d5 100755
--- a/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh
+++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/makeMesh
@@ -8,4 +8,4 @@ m4 < system/blockMeshDict.m4 > system/blockMeshDict
 
 runApplication blockMesh
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/U b/tutorials/incompressible/simpleFoam/motorBike/0.org/U
index 0db667b2ae4fd3d81eee729671208dcf9a23ea5c..c1545dff3a8dd48e584cac5b55a38eec12171ab7 100644
--- a/tutorials/incompressible/simpleFoam/motorBike/0.org/U
+++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/U
@@ -43,8 +43,7 @@ boundaryField
 
     motorBikeGroup
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     #include "include/frontBackUpperPatches"
diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allrun b/tutorials/incompressible/simpleFoam/motorBike/Allrun
index 7b751e1a1fd3966d031c3981015e292e384fe607..39b3f3785b7003711d021432eb89281e5582f37a 100755
--- a/tutorials/incompressible/simpleFoam/motorBike/Allrun
+++ b/tutorials/incompressible/simpleFoam/motorBike/Allrun
@@ -11,7 +11,7 @@ runApplication surfaceFeatureExtract
 runApplication blockMesh
 
 runApplication decomposePar
-runParallel snappyHexMesh 6 -overwrite
+runParallel snappyHexMesh -overwrite
 
 #- For non-parallel running
 #cp -r 0.org 0 > /dev/null 2>&1
@@ -20,11 +20,11 @@ runParallel snappyHexMesh 6 -overwrite
 ls -d processor* | xargs -I {} rm -rf ./{}/0
 ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
 
-runParallel patchSummary 6
-runParallel potentialFoam 6
-runParallel $(getApplication) 6
+runParallel patchSummary
+runParallel potentialFoam
+runParallel $(getApplication)
 
 runApplication reconstructParMesh -constant
 runApplication reconstructPar -latestTime
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/U b/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/U
index a4028d3fa507f913b4703ff81b1f4f6c1ac8af13..abb5f6dec63a2bc9f77f6005699f69fbe625a758 100644
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/U
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/U
@@ -48,8 +48,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
index edd5fd5440afc3b32c9f9c0458c567b18f930a5f..5734444f4e74e87d3d685ad82df35bcb7e3b300e 100755
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
@@ -8,4 +8,4 @@ rm -rf 0 > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
index 28f5ac16f87f4c5f7e6247cd14e2952ea2630f85..8d9f834d23ca2bf9b18061d35c71787dd7cc86a8 100755
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
@@ -14,8 +14,8 @@ cp -r 0.org 0
 
 #runApplication $application
 runApplication decomposePar -cellDist
-runParallel $application 5
+runParallel $application
 
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/0/U b/tutorials/incompressible/simpleFoam/pitzDaily/0/U
index f1b983008d55f18c2b5cf3a1b58137217665f41f..dd690bd6b810771a291d6852480fd65ac5fc7953 100644
--- a/tutorials/incompressible/simpleFoam/pitzDaily/0/U
+++ b/tutorials/incompressible/simpleFoam/pitzDaily/0/U
@@ -33,14 +33,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/U b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/U
index 3574934a754ca4b138de37d13508116917f88e66..3792103eb02c5779af0a882f21764b458bfdfcc3 100644
--- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/U
+++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/U
@@ -34,14 +34,12 @@ boundaryField
 
     upperWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allrun b/tutorials/incompressible/simpleFoam/rotorDisk/Allrun
index 8a5b1de58cc6ddb55a6d4de247711c162cee0916..14d69c2a9a5ba99af346359cf50848ff1b8b47dc 100755
--- a/tutorials/incompressible/simpleFoam/rotorDisk/Allrun
+++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allrun
@@ -12,4 +12,4 @@ runApplication createPatch -overwrite
 
 runApplication $(getApplication)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/simpleCar/Allrun b/tutorials/incompressible/simpleFoam/simpleCar/Allrun
index 134af49c10c9813d9db17250d211a14c9c9b66a2..db65453658e3edd89a9ea29fd51553d50eac62e1 100755
--- a/tutorials/incompressible/simpleFoam/simpleCar/Allrun
+++ b/tutorials/incompressible/simpleFoam/simpleCar/Allrun
@@ -8,4 +8,4 @@ runApplication blockMesh
 runApplication topoSet
 runApplication $(getApplication)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/Allclean b/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
index ddc37ada43b51be3ed59975db59d8d344a47b539..aae8b75f8001d1185e98aed5bdf34ec320ab0918 100755
--- a/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/Allclean
@@ -11,4 +11,4 @@ cleanCase
 # Remove decomposeParDict
 rm -f system/decomposeParDict
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/Allrun b/tutorials/incompressible/simpleFoam/turbineSiting/Allrun
index e2cd04e37a2c11559bb5221f262025486da9544b..c8ff7fbe9db40baba8d57759e10e0f6f8772ddf4 100755
--- a/tutorials/incompressible/simpleFoam/turbineSiting/Allrun
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/Allrun
@@ -12,16 +12,16 @@ cp system/decomposeParDict.hierarchical system/decomposeParDict
 runApplication decomposePar
 
 cp system/decomposeParDict.ptscotch system/decomposeParDict
-runParallel snappyHexMesh 4 -overwrite
+runParallel snappyHexMesh -overwrite
 
 find . -type f -iname "*level*" -exec rm {} \;
 
-ls -d processor* | xargs -I {} cp -r 0.org ./{}/0 $1
+ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
 
-runParallel topoSet 4
-runParallel `getApplication` 4
+runParallel topoSet
+runParallel `getApplication`
 
 runApplication reconstructParMesh -constant
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/0/U b/tutorials/incompressible/simpleFoam/windAroundBuildings/0/U
index 7cfc26c1f9fd9e810a25965442ed6ebe1b263bdb..6b20896f9297687b11a4e8fbad6bdac03247e4aa 100644
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/0/U
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/0/U
@@ -36,8 +36,7 @@ boundaryField
 
     wall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     #includeEtc "caseDicts/setConstraintTypes"
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
index 3427112d737fed6a0945fab87e0c7678bf8d8e61..baa135b1d4b849a9052e86c1900402eeb91e66bb 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
@@ -10,4 +10,4 @@ rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 rm -f constant/triSurface/buildings.eMesh > /dev/null 2>&1
 rm -f constant/polyMesh/boundary > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
index 1e6e2f73189e4d7be3fccdf9942cba82755de8fa..753dd9c94293e38a432f9bad986484eda22d7b7b 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
@@ -11,4 +11,4 @@ runApplication snappyHexMesh -overwrite
 
 runApplication $(getApplication)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/DPMFoam/Goldschmidt/0/U.air b/tutorials/lagrangian/DPMFoam/Goldschmidt/0/U.air
index 90d202412c2743c3b357b8c1733a56dbe1489eb5..9d5223b95054f724585aa128b6248262d7873889 100644
--- a/tutorials/lagrangian/DPMFoam/Goldschmidt/0/U.air
+++ b/tutorials/lagrangian/DPMFoam/Goldschmidt/0/U.air
@@ -23,8 +23,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     top
diff --git a/tutorials/lagrangian/MPPICFoam/Goldschmidt/0/U.air b/tutorials/lagrangian/MPPICFoam/Goldschmidt/0/U.air
index 90d202412c2743c3b357b8c1733a56dbe1489eb5..9d5223b95054f724585aa128b6248262d7873889 100644
--- a/tutorials/lagrangian/MPPICFoam/Goldschmidt/0/U.air
+++ b/tutorials/lagrangian/MPPICFoam/Goldschmidt/0/U.air
@@ -23,8 +23,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     top
diff --git a/tutorials/lagrangian/MPPICFoam/Goldschmidt/constant/kinematicCloudProperties b/tutorials/lagrangian/MPPICFoam/Goldschmidt/constant/kinematicCloudProperties
index 01718226ce00cf2e891c7b696af470602dc2cd20..4c22612f0aafb945bc424b96d0a435eaf2316f1e 100644
--- a/tutorials/lagrangian/MPPICFoam/Goldschmidt/constant/kinematicCloudProperties
+++ b/tutorials/lagrangian/MPPICFoam/Goldschmidt/constant/kinematicCloudProperties
@@ -148,6 +148,7 @@ subModels
     {
         alphaMin 0.0001;
         rhoMin 1.0;
+        applyLimiting true;
         applyGravity false;
         particleStressModel
         {
diff --git a/tutorials/lagrangian/MPPICFoam/column/0/U.air b/tutorials/lagrangian/MPPICFoam/column/0/U.air
index 50d0af142b6a220220383f62c0a6877e0bff9ec9..f18fca0ca44d332e944afccf5a436672c28d612f 100644
--- a/tutorials/lagrangian/MPPICFoam/column/0/U.air
+++ b/tutorials/lagrangian/MPPICFoam/column/0/U.air
@@ -28,14 +28,12 @@ boundaryField
 
     top
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     bottom
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/MPPICFoam/column/constant/kinematicCloudProperties b/tutorials/lagrangian/MPPICFoam/column/constant/kinematicCloudProperties
index 731a8cab20bfe0bd025d9d9786e22a4d4133590a..9de150055b03e9b6d9c9e4ecbe1435cd182e18b5 100644
--- a/tutorials/lagrangian/MPPICFoam/column/constant/kinematicCloudProperties
+++ b/tutorials/lagrangian/MPPICFoam/column/constant/kinematicCloudProperties
@@ -140,6 +140,7 @@ subModels
     {
         alphaMin 0.0001;
         rhoMin 1.0;
+        applyLimiting true;
         applyGravity true;
         particleStressModel
         {
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/0/U.air b/tutorials/lagrangian/MPPICFoam/cyclone/0/U.air
index 9226c1c797f6ac24c48d74772b1802f055e3f3b3..ae263e1721d38c1b46a4d1c7a61ac166a10ba583 100644
--- a/tutorials/lagrangian/MPPICFoam/cyclone/0/U.air
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/0/U.air
@@ -37,8 +37,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allrun b/tutorials/lagrangian/MPPICFoam/cyclone/Allrun
index aafb01639e4bb92f1a59d7a636aeedcaedec496f..8af86abdc32cc5dbcbc5af39dd0018234384fa52 100755
--- a/tutorials/lagrangian/MPPICFoam/cyclone/Allrun
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allrun
@@ -1,9 +1,10 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
-cd ${0%/*} || exit 1
-
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
+
 cp $FOAM_TUTORIALS/resources/geometry/cyclone.stl.gz constant/triSurface
 
 runApplication blockMesh
@@ -12,4 +13,6 @@ runApplication snappyHexMesh -overwrite
 
 runApplication decomposePar
 
-runParallel MPPICFoam $(echo processor* | wc -w)
+runParallel MPPICFoam
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/constant/kinematicCloudProperties b/tutorials/lagrangian/MPPICFoam/cyclone/constant/kinematicCloudProperties
index a48260484f5197e5fc528fe57a1acc73d57b2071..3a685fa3552ca4d20342ef222bb101ad1fd79100 100644
--- a/tutorials/lagrangian/MPPICFoam/cyclone/constant/kinematicCloudProperties
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/constant/kinematicCloudProperties
@@ -145,6 +145,7 @@ subModels
     {
         alphaMin 0.0001;
         rhoMin 1.0;
+        applyLimiting true;
         applyGravity false;
         particleStressModel
         {
diff --git a/tutorials/lagrangian/MPPICFoam/injectionChannel/0/U.air b/tutorials/lagrangian/MPPICFoam/injectionChannel/0/U.air
index 2b1f1312592c19a55b9d2e13087b1977ea94b75f..cf2e3c5702b0b3199e737e773701a6d67e044191 100644
--- a/tutorials/lagrangian/MPPICFoam/injectionChannel/0/U.air
+++ b/tutorials/lagrangian/MPPICFoam/injectionChannel/0/U.air
@@ -23,8 +23,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     lowerInlet
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U
index 94b3b4fbe476dccc98d7ac4ad52029d466c10319..e970df9bfcda174db97e3f9ed0b48124faf25d4c 100644
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U
@@ -23,18 +23,15 @@ boundaryField
 {
     top
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     bottom
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     symmetry
     {
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
index 73f7cc98e68ab1dccb3ab60bd3de0247cef3803c..b11e5980cf9937842110aeb249e97a8ed59969f1 100755
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
@@ -14,4 +14,4 @@ runApplication topoSet
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
index 0617cfbbf8aa32cc06a494c1322adadb0bf5f81c..7e6645913764bac716ad9e5ef6a80da9b096aaee 100755
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allclean
@@ -11,4 +11,4 @@ cd ../hopperEmptying
 cleanCase
 rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun
index 27f3f41e51d87ad29a62b890f4cd1dd3f8b82314..6a0667ccb8449a8adcaedfef8319a6ecb176a017 100755
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun
@@ -7,7 +7,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 cd hopperInitialState
 runApplication blockMesh
 runApplication decomposePar
-runParallel `getApplication` 4
+runParallel `getApplication`
 runApplication reconstructPar -latestTime
 cd ..
 
@@ -17,7 +17,7 @@ cp -r 0.org 0
 runApplication blockMesh
 runApplication mapFields ../hopperInitialState -sourceTime latestTime
 runApplication decomposePar
-runParallel `getApplication` 4
+runParallel `getApplication`
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/0.org/U b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/0.org/U
index 26b5b92e49259db40427b172c607248fcdb713ea..bc16ce9555b4986f08ed89885523965b10673dde 100644
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/0.org/U
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/0.org/U
@@ -23,13 +23,11 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     inlet
     {
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/fvSchemes b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/fvSchemes
index 612cd77d5d2a9c03ff3b6c23ec183c6e2d8e3dd0..2d0375715454f749ece7b803df5173a5247eaf7f 100644
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/fvSchemes
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/system/fvSchemes
@@ -37,7 +37,7 @@ laplacianSchemes
 
 interpolationSchemes
 {
-    default         none;
+    default         linear;
 }
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/0/U b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/0/U
index cf87ea1d035ad4af532de88b9cc7231e4c3d3aab..04b73f9a93593c7d137caa8358b399821487c251 100644
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/0/U
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/0/U
@@ -27,13 +27,11 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/fvSchemes b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/fvSchemes
index 612cd77d5d2a9c03ff3b6c23ec183c6e2d8e3dd0..2d0375715454f749ece7b803df5173a5247eaf7f 100644
--- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/fvSchemes
+++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/system/fvSchemes
@@ -37,7 +37,7 @@ laplacianSchemes
 
 interpolationSchemes
 {
-    default         none;
+    default         linear;
 }
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U
index 36c10a990fc790310668ac2e3e09662df3620fc2..412a432b174068757e7433c6cd8a36c063789f61 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/U
@@ -23,13 +23,11 @@ boundaryField
 {
     "(sides|frontAndBack)"
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     region0_to_wallFilmRegion_wallFilmFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/wallFilmRegion/Uf b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/wallFilmRegion/Uf
index 5c72ba549fe229a900e1710ba820390056bb9c00..49a49f27bb1d9be629efe4469aee0bb59ec8d7f7 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/wallFilmRegion/Uf
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/0.org/wallFilmRegion/Uf
@@ -28,14 +28,12 @@ boundaryField
 
     region0_to_wallFilmRegion_wallFilmFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     sides
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBack
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
index 0f11ae6d527c128b5852a553ac4ed4223fade0ef..77256434358799e3d17b6b07fc28b59cb7932e6c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allclean
@@ -10,4 +10,4 @@ rm -rf constant/wallFilmRegion
 rm -rf 0
 rm -f *.obj
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
index 70e1cd081ef970937604c98e0f8616d5a0837d5b..ae65df0e2591de6620bef310130590ead5e4e323 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
@@ -5,7 +5,6 @@ cp -rf 0.org 0
 runApplication blockMesh
 
 #runApplication setSet -batch wallFilmRegion.setSet
-#mv log.setSet log.wallFilmRegion.setSet
 runApplication topoSet
 
 runApplication extrudeToRegionMesh -overwrite
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/wallFilmRegion/Uf b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/wallFilmRegion/Uf
index 53f666b9778ca1fd5391292cc21c7f1f81e2b6c0..3e321c28de73e3bc3f6712f0284016efc89f4348 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/wallFilmRegion/Uf
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/0.org/wallFilmRegion/Uf
@@ -42,8 +42,7 @@ boundaryField
     // floor sides
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean
index 0bac6f8f8462976fa2331030537761b38f2ba5d0..db95457745278b3ebe1e811db469c43638b94cf8 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allclean
@@ -11,4 +11,4 @@ rm -rf constant/wallFilmRegion
 rm -rf 0
 rm -f *.obj
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel
index f3b7aecb79d365b59d9b055fee64769f1a2507a5..29817ff80b6042d4611b1141298fbd6764310619 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel
@@ -8,15 +8,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 application=`getApplication`
 
-runApplication decomposePar -region wallFilmRegion
-mv log.decomposePar log.decomposePar.wallFilmRegion
-runApplication decomposePar
-mv log.decomposePar log.decomposePar.primaryRegion
+runApplication -s wallFilmRegion decomposePar -region wallFilmRegion
+runApplication -s primaryRegion  decomposePar
 
-runParallel $application 4
+runParallel $application
 
-runApplication reconstructPar -region wallFilmRegion
-mv log.reconstructPar log.reconstructPar.wallFilmRegion
-runApplication reconstructPar
-mv log.reconstructPar log.reconstructPar.primaryRegion
+runApplication -s wallFilmRegion reconstructPar -region wallFilmRegion
+runApplication -s primaryRegion  reconstructPar
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
index 06e9e9ec5fbc896f71d419e30e515d6267493d5e..784b007b2c128a47398e9bb2266add5f8495ab93 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
@@ -16,8 +16,7 @@ runApplication topoSet
 runApplication subsetMesh c0 -patch wallFilm -overwrite
 
 # split the obstacle patches into cube[1-6]_patch[1-6]
-echo "running patchifyObstacles"
-./patchifyObstacles > log.patchifyObstacles 2>&1
+runApplication ./patchifyObstacles
 
 # Create the wall film region via extrusion
 runApplication extrudeToRegionMesh -overwrite
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/U b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/U
index 8d3489a11ffc18f89be0d6143f73cec512dd22dd..d613194c89a628bf65bf743ac3700422a055aa29 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/U
@@ -38,8 +38,7 @@ boundaryField
     }
     region0_to_wallFilmRegion_wallFilmFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/wallFilmRegion/Uf b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/wallFilmRegion/Uf
index ae1b2252b7f03db249746d6d47be327e3a2130fc..1519e99b03f53a114c9e9df47b964327efe0926a 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/wallFilmRegion/Uf
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/0.org/wallFilmRegion/Uf
@@ -28,8 +28,7 @@ boundaryField
 
     region0_to_wallFilmRegion_wallFilmFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     inlet
@@ -45,8 +44,7 @@ boundaryField
 
     sides
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean
index 0f11ae6d527c128b5852a553ac4ed4223fade0ef..77256434358799e3d17b6b07fc28b59cb7932e6c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allclean
@@ -10,4 +10,4 @@ rm -rf constant/wallFilmRegion
 rm -rf 0
 rm -f *.obj
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre
index 3ab62f90f5307504261f66f5a5d021ab15cb4e65..d00e6b23ff0cb06a855c516123420d3a01d0639d 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre
@@ -6,7 +6,6 @@ cp -rf 0.org 0
 runApplication blockMesh
 
 #runApplication setSet -batch wallFilmRegion.setSet
-#mv log.setSet log.wallFilmRegion.setSet
 runApplication topoSet -dict system/wallFilmRegion.topoSet
 
 runApplication extrudeToRegionMesh -overwrite
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U
index 2f9acde8524702566fbc69c25907b3d95513933e..efb39ea95baf6d1c0b2c74227f170f1d2d41f622 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/U
@@ -28,8 +28,7 @@ boundaryField
     }
     region0_to_wallFilmRegion_wallFilmFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/wallFilmRegion/Uf b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/wallFilmRegion/Uf
index 0648e42ff31bc87ec5d1a7eb794a87fc06e10563..5c1f99388e9d76dc247c722c875fceab78b47757 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/wallFilmRegion/Uf
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/wallFilmRegion/Uf
@@ -28,32 +28,27 @@ boundaryField
 
     region0_to_wallFilmRegion_wallFilmFaces
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     side1
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     side2
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     side3
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     side4
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
index 0f11ae6d527c128b5852a553ac4ed4223fade0ef..77256434358799e3d17b6b07fc28b59cb7932e6c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allclean
@@ -10,4 +10,4 @@ rm -rf constant/wallFilmRegion
 rm -rf 0
 rm -f *.obj
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
index 6924ed900165047cace544a019bc7969ba9ffef7..512715678f49206e4727aeef3f39ecf25a1114de 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
@@ -5,17 +5,25 @@ cp -rf 0.org 0
 
 runApplication blockMesh
 
-#runApplication setSet -batch wallFilmRegion.setSet
-#mv log.setSet log.wallFilmRegion.setSet
-runApplication topoSet -dict system/wallFilmRegion.topoSet
-mv log.topoSet log.wallFilmRegion.topoSet
+#If using batch mode
+#runApplication -s wallFilmRegion \
+#    setSet -batch wallFilmRegion.setSet
+
+#If using dictionary mode
+runApplication -s wallFilmRegion \
+    topoSet -dict system/wallFilmRegion.topoSet
 
 runApplication extrudeToRegionMesh -overwrite
 
-#runApplication setSet -region wallFilmRegion -batch createWallFilmRegionPatches.setSet
-#mv log.setSet log.createWallFilmRegionPatches.setSet
-runApplication topoSet -region wallFilmRegion -dict system/createWallFilmRegionPatches.topoSet
-mv log.topoSet log.createWallFilmRegionPatches.topoSet
+#If using batch mode
+#runApplication -s createWallFilmRegionPatches \
+#    setSet -region wallFilmRegion \
+#           -batch createWallFilmRegionPatches.setSet
+
+#If using dictionary mode
+runApplication -s createWallFilmRegionPatches \
+    topoSet -region wallFilmRegion \
+            -dict system/createWallFilmRegionPatches.topoSet
 
 runApplication createPatch -region wallFilmRegion -overwrite
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/U b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/U
index 81821d490fe8869e8fc0834a3b9d38112468d854..3e05c93586cc51a32d73a3562874d0edf64a5740 100644
--- a/tutorials/lagrangian/reactingParcelFoam/filter/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/0.org/U
@@ -23,8 +23,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     inlet
     {
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/0/U b/tutorials/lagrangian/reactingParcelFoam/filter/0/U
index 81821d490fe8869e8fc0834a3b9d38112468d854..3e05c93586cc51a32d73a3562874d0edf64a5740 100644
--- a/tutorials/lagrangian/reactingParcelFoam/filter/0/U
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/0/U
@@ -23,8 +23,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     inlet
     {
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allclean b/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
index 1a895d90275c82126147580ce9a40999ab930153..a298a17347fb11180b118d58176da9d590322bea 100755
--- a/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allclean
@@ -15,4 +15,4 @@ rm -rf postProcessing
 # copy 0.org to 0
 cp -r 0.org 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun
index ada691c0d47b5fc724f454ccf9f5b0182cd161e4..5163ff42ca6d71582e7eff1d775eab21de59d325 100755
--- a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun
@@ -17,4 +17,4 @@ runApplication createBaffles -overwrite
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/parcelInBox/0/U b/tutorials/lagrangian/reactingParcelFoam/parcelInBox/0/U
index 91166a0d5d064cde48543747dc5a452cd49530c2..d6f8ef6160077ab0a9bccabf645e180ca5ca7ee5 100644
--- a/tutorials/lagrangian/reactingParcelFoam/parcelInBox/0/U
+++ b/tutorials/lagrangian/reactingParcelFoam/parcelInBox/0/U
@@ -31,8 +31,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     outlet
     {
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/U b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/U
index 4baab51d94d21d0d425eb996390e2363089d61c6..84171b7c653cc63b79a70c60d84e8c26c5e19ff7 100644
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/0.org/U
@@ -48,8 +48,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
index b2a7c0da6f7982e851685dbd57b61b3d88e52f75..df77730bc36a67aea467817e807431c476e580ef 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allclean
@@ -9,4 +9,4 @@ rm -rf 0 *[1-9]* processor* postProcessing
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun
index 01c85119b172b0de543d47d84c04bb5b97440879..35dc16c075d91d91b244bc9bb9b426964f569404 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun
@@ -17,4 +17,4 @@ rm -f 0/phi
 # run the solver
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0.org/U b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0.org/U
index 6a9915025bd267f37ddf29efb4a25a65cdfaa632..d0a367501dd6a38ba445053e087a199807a0770a 100644
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0.org/U
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0.org/U
@@ -48,8 +48,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0/U b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0/U
index 6a9915025bd267f37ddf29efb4a25a65cdfaa632..d0a367501dd6a38ba445053e087a199807a0770a 100644
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0/U
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/0/U
@@ -48,8 +48,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
index 6fab2f86da0c132f20d8aefe9b447a5c5601240a..f0cffd5b25f22795149cf4c67cc6f806a61659bb 100755
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allclean
@@ -13,4 +13,4 @@ cp -r 0.org 0
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U
index 76413d9b85dcce67569f3295eefcc8e4328d98a6..94158b3fe6fafaae71fe2a3a5f7f3cd06c067847 100644
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U
@@ -50,8 +50,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U
index 76413d9b85dcce67569f3295eefcc8e4328d98a6..94158b3fe6fafaae71fe2a3a5f7f3cd06c067847 100644
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U
@@ -50,8 +50,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
index 0dfbfeaff9760fe215f7a99bc3321610e0351b54..fa0d0929d9603d7d2e4b639d9255e7d07fe0545d 100755
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean
@@ -12,4 +12,4 @@ cp -r 0.org 0
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
index 03f2f3a086d8881d5ff0cd996232e65a01fde14f..94c17f61f5b8f414e5cd35b0e1812125168bdba8 100755
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun
@@ -16,4 +16,4 @@ rm -f 0/phi
 
 runApplication $(getApplication)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/Allrun b/tutorials/mesh/foamyHexMesh/Allrun
index e33b67e64709c848517514c324400871e0c67809..93da24214e4b55618418fc256cf2e22006166697 100755
--- a/tutorials/mesh/foamyHexMesh/Allrun
+++ b/tutorials/mesh/foamyHexMesh/Allrun
@@ -1,29 +1,32 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Any cases that are links to solver test cases and are run when the Allrun
+# scripts of those solvers are run.  This script avoids meshing these cases
+# twice.
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 (
     cd blob || exit
-    ./Allrun
-)
-(
-    cd flange || exit
-    ./Allrun
+    ./Allrun $*
 )
 (
     cd simpleShapes || exit
-    ./Allrun
+    ./Allrun $*
 )
-(
-    cd mixerVessel || exit
-    ./Allrun
-)
-
-exit 0
-
-# Any cases that are links to solver test cases and are run when the Allrun
-# scripts of those solvers are run.
 
-# This dummy Allrun script avoids meshing these cases twice.
+if ! isTest $@
+then
+    (
+        cd flange || exit
+        ./Allrun $*
+    )
+    (
+        cd mixerVessel || exit
+        ./Allrun $*
+    )
+fi
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allclean b/tutorials/mesh/foamyHexMesh/blob/Allclean
index d93d01fea6268afe14aca52d1aebbb38229b3932..7563c7a99b428cfaf27303919459881e34fe37ec 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allclean
+++ b/tutorials/mesh/foamyHexMesh/blob/Allclean
@@ -24,4 +24,4 @@ rm -rf snapToSurface?.obj > /dev/null 2>&1
 rm -rf tetsToSnapTo.obj > /dev/null 2>&1
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allrun b/tutorials/mesh/foamyHexMesh/blob/Allrun
index a1a4c2efd77c15259590ece7d0dbb3297e8fbb2f..a4d7bd61d581785dba4d4d06fadc964ad034441a 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allrun
+++ b/tutorials/mesh/foamyHexMesh/blob/Allrun
@@ -9,13 +9,13 @@ cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
 
 runApplication foamyHexMesh
 
-runApplication collapseEdges -latestTime -collapseFaces
-mv log.collapseEdges log.collapseFaces
+runApplication -s collapseFaces \
+    collapseEdges -latestTime -collapseFaces
 
-runApplication collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
-mv log.collapseEdges log.collapseFaceSet
+runApplication -s collapseFaceSet \
+    collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
 
 runApplication checkMesh -latestTime -allGeometry -allTopology
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel
index ef0ef9e42f899b6401a202059a34a27d23295410..7947ab35f21ac2bfa5f5fb57ab52ac220e686ef3 100755
--- a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel
+++ b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel
@@ -4,26 +4,23 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get the number of processors to run on from system/decomposeParDict
-nProc=$(getNumberOfProcessors)
-
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
 
 runApplication blockMesh -region backgroundMeshDecomposition
 runApplication decomposePar -region backgroundMeshDecomposition
 
-runParallel foamyHexMesh $nProc
+runParallel foamyHexMesh
 
-runParallel collapseEdges $nProc -latestTime -collapseFaces
-mv log.collapseEdges log.collapseFaces
+runParallel -s collapseFaces \
+    collapseEdges -latestTime -collapseFaces
 
-runParallel collapseEdges $nProc -latestTime -collapseFaceSet indirectPatchFaces
-mv log.collapseEdges log.collapseFaceSet
+runParallel -s collapseFaceSet \
+    collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
 
-runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
+runParallel checkMesh -latestTime -allTopology -allGeometry
 
 runApplication reconstructParMesh -latestTime
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allclean b/tutorials/mesh/foamyHexMesh/flange/Allclean
index 889d63dbda99013e4d1d85b8c3cbd44d4007627a..2ceecfe1f9a862f15e8234fea4c5e3727262db6b 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allclean
+++ b/tutorials/mesh/foamyHexMesh/flange/Allclean
@@ -21,4 +21,4 @@ rm -r *.obj > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun b/tutorials/mesh/foamyHexMesh/flange/Allrun
index 590de20db99d21878563c387095f44d3b5caf78a..414ca8f4a3d33ece6f2f2ccd74ad9ec861442b43 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allrun
+++ b/tutorials/mesh/foamyHexMesh/flange/Allrun
@@ -9,13 +9,13 @@ cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
 
 runApplication foamyHexMesh
 
-runApplication collapseEdges -latestTime -collapseFaces
-mv log.collapseEdges log.collapseFaces
+runApplication -s collapseFaces \
+    collapseEdges -latestTime -collapseFaces
 
-runApplication collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
-mv log.collapseEdges log.collapseFaceSet
+runApplication -s collapseFaceSet \
+    collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
 
 runApplication checkMesh -latestTime -allGeometry -allTopology
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel
index 9912810e623030c575d44b6653440a574e2cd10f..fb57faff8e1f3d70a0096bba298baefe06641a83 100755
--- a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel
+++ b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get the number of processors to run on from system/decomposeParDict
-nProc=$(getNumberOfProcessors)
-
 # copy flange surface from resources directory
 cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
 
@@ -14,17 +11,17 @@ cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
 runApplication blockMesh -region backgroundMeshDecomposition
 runApplication decomposePar -region backgroundMeshDecomposition
 
-runParallel foamyHexMesh $nProc
+runParallel foamyHexMesh
 
-runParallel collapseEdges $nProc -latestTime -collapseFaces
-mv log.collapseEdges log.collapseFaces
+runParallel -s collapseFaces \
+    collapseEdges -latestTime -collapseFaces
 
-runParallel collapseEdges $nProc -latestTime -collapseFaceSet indirectPatchFaces
-mv log.collapseEdges log.collapseFaceSet
+runParallel -s collapseFaceSet \
+    collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
 
-runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
+runParallel checkMesh -latestTime -allTopology -allGeometry
 
 runApplication reconstructParMesh -latestTime
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/flange/Alltest b/tutorials/mesh/foamyHexMesh/flange/Alltest
deleted file mode 100755
index 6d4a1544480785ab6e6ad451f1187598e3342ece..0000000000000000000000000000000000000000
--- a/tutorials/mesh/foamyHexMesh/flange/Alltest
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-# copy flange surface from resources directory
-cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
-
-cp system/controlDict system/controlDict.org
-
-sed -e s/"\(endTime[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
-    -e s/"\(writeInterval[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
-    system/controlDict.org > system/controlDict
-
-runApplication foamyHexMesh
-
-# Change collapseEdges to only do one iteration
-cp system/collapseDict system/collapseDict.org
-
-sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \
-    system/collapseDict.org > system/collapseDict
-
-runApplication collapseEdges -latestTime -collapseFaces
-
-cp system/controlDict.org system/controlDict
-cp system/collapseDict.org system/collapseDict
-
-rm -f system/controlDict.org system/collapseDict.org
-
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
index 91fe865deefda0218b9530f3f0fb781d4e33fc59..55c1a652c28b5fb34905147d2d2213a150bcdf04 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean
@@ -21,4 +21,4 @@ cleanCase
 \rm -f constant/backgroundMeshDecomposition/polyMesh/points
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun
index 846609a59e7bb8b99359e15f6931b36cf68e913d..b66c25a9a4a92ef8f37f9102f5358ba201224309 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun
@@ -10,4 +10,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Run simulation
 ./Allrun-simulation
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
index f1ad54e60bf64f6180656c9643c894d9774875b0..51b38f7a83a6bb7e3e5a461e25babc932577a278 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
@@ -6,27 +6,19 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 intersectSurfaces()
 {
-    runApplication              \
-        surfaceBooleanFeatures  \
-        intersection            \
-        "$@"
-
     outputName1=$(basename $1)
     outputName1=${outputName1%.*}
 
     outputName2=$(basename $2)
     outputName2=${outputName2%.*}
 
-    mv log.surfaceBooleanFeatures \
-       log.surfaceBooleanFeatures.$outputName1:$outputName2
+    runApplication -s $outputName1:$outputName2 \
+        surfaceBooleanFeatures intersection "$@"
 }
 
 # Set application name
 application=$(getApplication)
 
-# Get number of processors to run on
-nProcs=$(getNumberOfProcessors)
-
 \rm -rf 0
 
 
@@ -59,25 +51,28 @@ done
 
 # Meshing
 \cp system/controlDict.mesh system/controlDict
-\cp system/collapseDict.collapseFaces system/collapseDict
 
 runApplication blockMesh -region backgroundMeshDecomposition
 
-runApplication decomposePar -region backgroundMeshDecomposition
+runApplication -s backgroundMeshDecomposition \
+    decomposePar -region backgroundMeshDecomposition
 
 runApplication surfaceFeatureExtract
 
-runParallel foamyHexMesh $nProcs
+runParallel foamyHexMesh
 
-runParallel -log log.collapseFaces collapseEdges $nProcs -collapseFaces -latestTime
+runParallel -s faces \
+    collapseEdges -collapseFaces -latestTime \
+                  -dict system/collapseDict.collapseFaces
 
-#\cp system/collapseDict.indirectPatchFaces system/collapseDict
-#runParallel collapseEdges $nProcs -collapseFaceSet indirectPatchFaces -latestTime
-#mv log.collapseEdges log.collapseFaceSet
+#runParallel -s faceSet  \
+#    collapseEdges -collapseFaceSet indirectPatchFaces -latestTime \
+#                  -dict system/collapseDict.indirectPatchFaces
 
-runParallel checkMesh $nProcs -allTopology -allGeometry -latestTime
+runParallel checkMesh -allTopology -allGeometry -latestTime
 
-# Copy the mesh into polyMesh and delete the latest time directory
+# Copy the mesh from the latest time folder into polyMesh and delete that
+# latest time folder
 latestTime=$(foamInfoExec -case processor0 -latestTime)
 if [ "$latestTime" != "constant" ] && [ -d processor0/$latestTime/polyMesh ]
 then
@@ -88,4 +83,4 @@ then
 fi
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
index ddaf6768393a08b201450c172e8d043052a577fe..6d2f7197876afc0a9f174885ccb8e903546effea 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
@@ -9,9 +9,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Set application name
 application=$(getApplication)
 
-# Get number of processors to run on
-nProcs=$(getNumberOfProcessors)
-
 \rm -rf 0
 
 runApplication createBaffles -overwrite
@@ -27,14 +24,14 @@ runApplication createPatch -overwrite
 runApplication setFields
 
 # Decompose
-\rm log.decomposePar
-runApplication decomposePar -force
+runApplication -s main \
+    decomposePar -force
 
 # Run
-runParallel $application $nProcs
+runParallel $application
 
 # Reconstruct
 runApplication reconstructPar -noFunctionObjects
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Alltest b/tutorials/mesh/foamyHexMesh/mixerVessel/Alltest
deleted file mode 100755
index 56c0410d553104258e0d397b68fe14d47e95619b..0000000000000000000000000000000000000000
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Alltest
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-# Do nothing for now.
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh
index 95ae932c0c57a875f70850c820056470c9ce2315..a030e2075820b2ce61e7646794aab49ff2f8f185 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh
@@ -31,4 +31,4 @@ surfaceCheck stirrer_baffles.stl
 \mv stirrer_baffles_0.obj stirrer_baffles_plate.obj
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
index 5e7012aaebf588b08c2dc52b4ce0778e601fb8aa..66229e46ca5fe8a4f79754ab7ceca7fe88bd9e11 100755
--- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
+++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean
@@ -19,4 +19,4 @@ rm -rf 0/
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun b/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun
index a504552e46c95d8a28b63535b9d2088515b98706..1254efdb611bd53de693db98a9ebbd4e436804e6 100755
--- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun
+++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun
@@ -4,23 +4,28 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-runApplication -log log.surfaceOrient.cone surfaceOrient \
-    constant/triSurface/cone.stl \
-    -inside '(0 -0.5 0)' \
-    constant/triSurface/cone_orient.stl
+runApplication -s cone \
+    surfaceOrient constant/triSurface/cone.stl \
+                  -inside '(0 -0.5 0)' \
+                  constant/triSurface/cone_orient.stl
 
-runApplication -log log.surfaceOrient.sphere surfaceOrient \
-    constant/triSurface/sphere.stl \
-    -inside '(0 -0.5 0)' \
-    constant/triSurface/sphere_orient.stl
+runApplication -s sphere \
+    surfaceOrient constant/triSurface/sphere.stl \
+                  -inside '(0 -0.5 0)' \
+                  constant/triSurface/sphere_orient.stl
 
-runApplication surfaceBooleanFeatures intersection cone_orient.stl sphere_orient.stl
+runApplication \
+    surfaceBooleanFeatures intersection \
+                           constant/triSurface/cone_orient.stl \
+                           constant/triSurface/sphere_orient.stl
 
 runApplication foamyHexMesh
 
-runApplication -log log.collapseFaceSet collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
+runApplication -s collapseFaceSet \
+    collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
 
-runApplication collapseEdges -latestTime -collapseFaces
+runApplication -s collapseFaces \
+    collapseEdges -latestTime -collapseFaces
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U
index 5d3cfce689ad298d18f88fbb2f4d42fe3735b030..f66937f998da6fe9a16fac27703e7d7bd42932d6 100644
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U
@@ -51,8 +51,7 @@ boundaryField
 
     letters
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
index 16e19b4e2ffb077374fbbd218eceecd6cad82a1a..ab8099c64971dbd3141d6156a18bedd38f08b925 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean
@@ -12,4 +12,4 @@ rm -rf MeshedSurface.obj > /dev/null 2>&1
 cleanCase
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
index 984c12f9253998f9e8e289cf8e0f51976bd9d2b1..8653b499f5fd849d23ea523422ff563dc667d28c 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
@@ -17,4 +17,4 @@ runApplication extrude2DMesh -overwrite polyMesh2D
 runApplication checkMesh -allGeometry -allTopology -constant -noZero
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
index b917a3f3453361cff1760b767d18d05ee45bab4e..8ab7ec82512e37c4c62a8512aaa8647065541121 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
@@ -4,15 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get the number of processors to run on from system/decomposeParDict
-nProcs=$(getNumberOfProcessors)
-
 cp system/controlDict.rhoCentralFoam system/controlDict
 cp -r 0.org 0
 
 runApplication decomposePar
-runParallel rhoCentralFoam $nProcs
+runParallel rhoCentralFoam
 runApplication reconstructPar
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
index ff6b5a8a2f4e4b249cc0cf8e0bbc2db58bde1dbf..3a0c2229939d24c1c4e2f55609fd85dd6651260e 100755
--- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean
@@ -13,4 +13,4 @@ rm -rf MeshedSurface.obj > /dev/null 2>&1
 cleanCase
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
index 6fb3f8d5d09ba6caf9d85673006dd2e0c8514f6f..150693b9fe41dfcd2771350c996a0bccfd1b9885 100755
--- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
@@ -10,4 +10,4 @@ runApplication extrude2DMesh -overwrite MeshedSurface
 runApplication checkMesh -allGeometry -allTopology -constant -noZero
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/square/Allclean b/tutorials/mesh/foamyQuadMesh/square/Allclean
index 44c35cfccb85324360d871cf03743ad24e38ff13..d8936babb013ad9f884be606f76121024066f516 100755
--- a/tutorials/mesh/foamyQuadMesh/square/Allclean
+++ b/tutorials/mesh/foamyQuadMesh/square/Allclean
@@ -13,4 +13,4 @@ rm -rf MeshedSurface*.obj > /dev/null 2>&1
 cleanCase
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/square/Allrun b/tutorials/mesh/foamyQuadMesh/square/Allrun
index 186fe936563e0512dd1a1fc4d4cc27a53a80ff54..26543eaac4ccfe5c4a5950be41c095b65e5332c4 100755
--- a/tutorials/mesh/foamyQuadMesh/square/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/square/Allrun
@@ -10,4 +10,4 @@ runApplication extrude2DMesh -overwrite polyMesh2D
 runApplication checkMesh -allGeometry -allTopology -constant -noZero
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/cavity/Allrun b/tutorials/mesh/parallel/cavity/Allrun
index 22412ea2871c949d4307e6a6c163b3637baa8214..dc0492c1a7256e92db80fa1239e63c67cec3b365 100755
--- a/tutorials/mesh/parallel/cavity/Allrun
+++ b/tutorials/mesh/parallel/cavity/Allrun
@@ -10,27 +10,31 @@ runApplication blockMesh
 #runApplication decomposePar
 
 # redistributePar to do decomposition
-runParallel redistributePar 2 -decompose
+runParallel -s decompose redistributePar -decompose
 
 # Bit of renumbering and running
-runParallel -log log.renumberMesh-CuthillMcKee renumberMesh 2 -overwrite
-runParallel -log log.icoFoam-CuthillMcKee icoFoam 2
+runParallel -s CuthillMcKee renumberMesh -overwrite
+runParallel -s CuthillMcKee icoFoam
 
 # Bit of bad renumbering and running
-runParallel -log log.renumberMesh-parallel renumberMesh 2 -overwrite -dict system/renumberMeshDict-random
-runParallel -log log.icoFoam-random icoFoam 2
+runParallel -s random renumberMesh \
+    -overwrite -dict system/renumberMeshDict-random
+runParallel -s random icoFoam
 
 # Pick up last result
 cp system/controlDict-latestTime system/controlDict
 
 # Redistribute to 5 processors
-runParallel -log log.redistributePar-5 redistributePar 5 -decomposeParDict system/decomposeParDict-5 -cellDist
+runParallel -s 5 -np 5 redistributePar \
+    -decomposeParDict system/decomposeParDict-5 -cellDist
 
 # Run a bit more
-runParallel -log log.icoFoam-5 icoFoam 5 -decomposeParDict system/decomposeParDict-5
+runParallel -s 5 -np 5 icoFoam \
+    -decomposeParDict system/decomposeParDict-5
 
 # Reconstruct mesh and results
-runParallel -log log.redistributePar-1 redistributePar 5 -reconstruct -decomposeParDict system/decomposeParDict
+runParallel -s reconstruct redistributePar \
+    -reconstruct -decomposeParDict system/decomposeParDict
 
 
-# ----------------------------------------------------------------- end-of-file
+# -----------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/cavity/system/fvSolution b/tutorials/mesh/parallel/cavity/system/fvSolution
index 8b7913e8159fa88fe5c57d54edf037636ee65df0..3be65f5ab562344fb13785933c69541e9b74ccba 100644
--- a/tutorials/mesh/parallel/cavity/system/fvSolution
+++ b/tutorials/mesh/parallel/cavity/system/fvSolution
@@ -17,7 +17,7 @@ FoamFile
 
 solvers
 {
-    p
+    "(p|pFinal)"
     {
         solver          PCG;
         preconditioner  DIC;
diff --git a/tutorials/mesh/parallel/filter/Allclean b/tutorials/mesh/parallel/filter/Allclean
index 48ffd679aa10c6021edb1306c5b98879657b5243..4d4ba35b8b06fd49edcb843e62d14d489df8d4e7 100755
--- a/tutorials/mesh/parallel/filter/Allclean
+++ b/tutorials/mesh/parallel/filter/Allclean
@@ -12,4 +12,4 @@ rm -rf 0
 # remove post-processing directory
 rm -rf postProcessing
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/filter/Allrun b/tutorials/mesh/parallel/filter/Allrun
index 8367f6c36fe2f0167c241b69602245165e18d50b..9dabedb155fce0535a3214c27dfa6fc4d3d1e938 100755
--- a/tutorials/mesh/parallel/filter/Allrun
+++ b/tutorials/mesh/parallel/filter/Allrun
@@ -4,30 +4,30 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=`getApplication`
+application=$(getApplication)
 
-# create mesh
+# Create mesh
 runApplication blockMesh
 
-# copy 0.org to 0
+# Copy 0.org to 0
 cp -r 0.org 0
 
-# create sets
+# Create sets
 runApplication topoSet
 
-# create baffles and fields
+# Create baffles and fields
 runApplication createBaffles -overwrite
 
 runApplication $application
 
-#- redistributePar to do decomposition
-runParallel redistributePar 3 -decompose -cellDist
+#- RedistributePar to do decomposition
+runParallel redistributePar -decompose -cellDist
 
 #- Continue running for a bit more
-runParallel -log log.reactingParcelFoam-par $application 3
+runParallel -s parallel $application
 
 #- Reconstruct all times
-runParallel -log log.redistributePar-1 redistributePar 3 -reconstruct
+runParallel -s 1 redistributePar -reconstruct
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allclean b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..5734444f4e74e87d3d685ad82df35bcb7e3b300e
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allclean
@@ -0,0 +1,11 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+rm -rf 0 > /dev/null 2>&1
+
+cleanCase
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..c3bdd39961898d8634201e7418b12ab17fc1b7c4
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun
@@ -0,0 +1,51 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+wmake calcRadiusField
+wclean calcRadiusField
+
+runApplication blockMesh
+
+##### Procedure for special refinement over Z
+
+# We need the 0 folder to exist for these steps
+mkdir 0
+
+# Refine over Z, in 6 passes
+for index in 1 2 3 4 5 6; do
+
+  runApplication -s tier$index  calcRadiusField
+
+  runApplication -s tier$index \
+      topoSet -dict system/topoSetDict.tier$index
+
+  ## foamToVTK -cellSet tier$index
+
+  runApplication -s tier$index \
+      refineMesh -dict system/refineMeshDict.tier$index -overwrite
+
+  rm -r 0/*
+
+done
+
+# Refine over cylindrical coordinates, in 3 passes
+for index in 1 2 3; do
+
+  runApplication -s range$index  calcRadiusField -calcDirections
+
+  runApplication -s range$index \
+      topoSet -dict system/topoSetDict.range$index
+
+  ## foamToVTK -cellSet tier$index
+
+  runApplication -s range$index \
+      refineMesh -dict system/refineMeshDict.range$index -overwrite
+
+  rm -r 0/*
+
+done
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/Make/files b/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/Make/files
new file mode 100644
index 0000000000000000000000000000000000000000..70a9508ff5d6599532837247671f694d710c5306
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/Make/files
@@ -0,0 +1,3 @@
+calcRadiusField.C
+
+EXE = $(FOAM_USER_APPBIN)/calcRadiusField
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/Make/options b/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/Make/options
new file mode 100644
index 0000000000000000000000000000000000000000..fa15f124528ebfcaf279a88a73a0d7954f2e9dc1
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/Make/options
@@ -0,0 +1,5 @@
+EXE_INC = \
+    -I$(LIB_SRC)/finiteVolume/lnInclude
+
+EXE_LIBS = \
+    -lfiniteVolume
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/calcRadiusField.C b/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/calcRadiusField.C
new file mode 100644
index 0000000000000000000000000000000000000000..a607777d034b1e10ee113e92e1acf979a19f96f2
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/calcRadiusField/calcRadiusField.C
@@ -0,0 +1,164 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+License
+    This file is derived from OpenFOAM.
+
+    OpenFOAM is free software: you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+
+Description
+    Write the volScalarField "radiusFieldXY" that has the distance to the
+    origin over X,Y.
+
+    And also write the direction fields based on the option "-calcDirections".
+    The resulting fields are:
+      - radialDirection
+      - angularDirection
+      - heightDirection
+
+    Derived from:
+      $FOAM_UTILITIES/postProcessing/miscellaneous/writeCellCentres
+
+\*---------------------------------------------------------------------------*/
+
+#include "argList.H"
+#include "timeSelector.H"
+#include "Time.H"
+#include "fvMesh.H"
+#include "vectorIOField.H"
+#include "volFields.H"
+
+using namespace Foam;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+    timeSelector::addOptions();
+    #include "addRegionOption.H"
+
+    argList::addBoolOption
+    (
+        "calcDirections",
+        "calculate the direction fields as well"
+    );
+
+    #include "setRootCase.H"
+    #include "createTime.H"
+
+    instantList timeDirs = timeSelector::select0(runTime, args);
+    const bool calcDirections = args.optionFound("calcDirections");
+
+    #include "createNamedMesh.H"
+
+    forAll(timeDirs, timeI)
+    {
+        runTime.setTime(timeDirs[timeI], timeI);
+
+        Info<< "Time = " << runTime.timeName() << endl;
+
+        // Check for new mesh
+        mesh.readUpdate();
+
+        Info<< "Writing radius field over X,Y in "
+            <<  runTime.timeName() << endl;
+
+        volScalarField radiusFieldXY
+        (
+            IOobject
+            (
+                "radiusFieldXY",
+                runTime.timeName(),
+                mesh,
+                IOobject::NO_READ,
+                IOobject::AUTO_WRITE
+            ),
+            sqrt
+            (
+                mesh.C().component(0)*mesh.C().component(0)
+              + mesh.C().component(1)*mesh.C().component(1)
+            )
+        );
+        radiusFieldXY.write();
+
+
+        if(calcDirections)
+        {
+
+            vectorIOField radialDirection
+            (
+                IOobject
+                (
+                    "radialDirection",
+                    runTime.timeName(),
+                    mesh,
+                    IOobject::NO_READ,
+                    IOobject::NO_WRITE
+                ),
+                mesh.C()/magSqr(mesh.C())
+            );
+            radialDirection.replace(vector::Z, scalar(0.0));
+            radialDirection /= sqrt(magSqr(radialDirection));
+            radialDirection.write();
+
+
+            const tensor transform2Tangencial
+            (
+                0, -1, 0,
+                1,  0, 0,
+                0,  0, 1
+            );
+            vectorIOField angularDirection
+            (
+                IOobject
+                (
+                    "angularDirection",
+                    runTime.timeName(),
+                    mesh,
+                    IOobject::NO_READ,
+                    IOobject::NO_WRITE
+                ),
+                transform2Tangencial & mesh.C()
+            );
+            angularDirection.replace(vector::Z, scalar(0.0));
+            angularDirection /= sqrt(magSqr(angularDirection));
+            angularDirection.write();
+
+            vectorIOField heightDirection
+            (
+                IOobject
+                (
+                    "heightDirection",
+                    runTime.timeName(),
+                    mesh,
+                    IOobject::NO_READ,
+                    IOobject::NO_WRITE
+                ),
+                radialDirection ^ angularDirection
+            );
+            heightDirection.write();
+        }
+    }
+
+    Info<< "\nEnd\n" << endl;
+
+    return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/blockMeshDict b/tutorials/mesh/refineMesh/refineFieldDirs/system/blockMeshDict
new file mode 100644
index 0000000000000000000000000000000000000000..cf3f3d5bdfcfbcb1cf6586e5345017960d2c5ae7
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/blockMeshDict
@@ -0,0 +1,98 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant/polyMesh";
+    object      blockMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+convertToMeters 1;
+
+/*
+
+ A ------------------------------- B
+  /  H                          /
+ C\                            /
+     \                        /
+        \                    /
+           \                /     G
+              \            /
+                 \        /
+                    \    /
+                       \/
+                         D
+*/
+
+Ax  0.438912;    Ay  0.000000;
+Bx  18.28800;    By  0.000000;
+Cx  0.310358;    Cy  -0.310358;
+Dx  12.931569;   Dy  -12.931569;
+
+Hx  0.405502;    Hy  -0.167964;
+Gx  16.895909;   Gy  -6.998515;
+
+Z_DB_low  -0.88706;
+Z_AC_low  -1.07;
+Z_high  4.39208;
+
+vertices
+(
+   ($Cx  $Cy  $Z_AC_low)  //0
+   ($Dx  $Dy  $Z_DB_low)  //1
+   ($Bx  $By  $Z_DB_low)  //2
+   ($Ax  $Ay  $Z_AC_low)  //3
+   ($Cx  $Cy  $Z_high)    //4
+   ($Dx  $Dy  $Z_high)    //5
+   ($Bx  $By  $Z_high)    //6
+   ($Ax  $Ay  $Z_high)    //7
+);
+
+blocks
+(
+   hex (0 1 2 3 4 5 6 7)    (47 10 4) simpleGrading (41.6669 1 1)
+);
+
+edges
+(
+  arc 0 3 ($Hx $Hy $Z_AC_low)
+  arc 4 7 ($Hx $Hy $Z_high)
+
+  arc 1 2 ($Gx $Gy $Z_DB_low)
+  arc 5 6 ($Gx $Gy $Z_high)
+);
+
+patches
+(
+   patch maxX
+   (
+       (1 2 6 5)
+   )
+   patch minX
+   (
+       (0 4 7 3)
+   )
+   patch maxY
+   (
+       (3 7 6 2)
+   )
+   patch minY
+   (
+       (1 5 4 0)
+   )
+   patch maxZ
+   (
+       (4 5 6 7)
+   )
+   patch minZ
+   (
+       (0 3 2 1)
+   )
+);
+
+mergePatchPairs
+(
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/controlDict b/tutorials/mesh/refineMesh/refineFieldDirs/system/controlDict
new file mode 100644
index 0000000000000000000000000000000000000000..4cf366b92fb578d9b02ed18ef90a09a45e1de313
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/controlDict
@@ -0,0 +1,55 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+application     potentialFoam;
+
+startFrom       latestTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         1000;
+
+deltaT          1.0;
+
+writeControl    runTime;
+
+writeInterval   1;
+
+purgeWrite      0;
+
+
+//- Uncomment to have regular (every 2 hours of run time) restart files
+//secondaryWriteControl    cpuTime; // runtime
+//secondaryWriteInterval   7200;    // seconds
+//secondaryPurgeWrite      1;       // keep all but last dump
+
+
+writeFormat     binary;
+
+writePrecision  8;
+
+writeCompression uncompressed;
+
+timeFormat      general;
+
+timePrecision   8;
+
+runTimeModifiable yes;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/fvSchemes b/tutorials/mesh/refineMesh/refineFieldDirs/system/fvSchemes
new file mode 100644
index 0000000000000000000000000000000000000000..ba4587b0d73d111fb43092a51b21696d129c6953
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/fvSchemes
@@ -0,0 +1,48 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         none;
+}
+
+gradSchemes
+{
+    default         none;
+}
+
+divSchemes
+{
+    default         none;
+}
+
+laplacianSchemes
+{
+    default         none;
+}
+
+interpolationSchemes
+{
+    default         none;
+}
+
+snGradSchemes
+{
+    default         none;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/fvSolution b/tutorials/mesh/refineMesh/refineFieldDirs/system/fvSolution
new file mode 100644
index 0000000000000000000000000000000000000000..e514a0f84bc1687636f3550dd2f7918e460cf155
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/fvSolution
@@ -0,0 +1,23 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range1 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range1
new file mode 100644
index 0000000000000000000000000000000000000000..bfb756a0fbf1e67e76499f094be77a67c3fe1fc7
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range1
@@ -0,0 +1,63 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set range1;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+//coordinateSystem global;
+//coordinateSystem patchLocal;
+coordinateSystem fieldBased;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch maxX;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 -1 0);
+}
+
+// List of directions to refine
+directions
+(
+    radialDirection
+    angularDirection
+    heightDirection
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range2 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range2
new file mode 100644
index 0000000000000000000000000000000000000000..bfb756a0fbf1e67e76499f094be77a67c3fe1fc7
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range2
@@ -0,0 +1,63 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set range1;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+//coordinateSystem global;
+//coordinateSystem patchLocal;
+coordinateSystem fieldBased;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch maxX;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 -1 0);
+}
+
+// List of directions to refine
+directions
+(
+    radialDirection
+    angularDirection
+    heightDirection
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range3 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range3
new file mode 100644
index 0000000000000000000000000000000000000000..bfb756a0fbf1e67e76499f094be77a67c3fe1fc7
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.range3
@@ -0,0 +1,63 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set range1;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+//coordinateSystem global;
+//coordinateSystem patchLocal;
+coordinateSystem fieldBased;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch maxX;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 -1 0);
+}
+
+// List of directions to refine
+directions
+(
+    radialDirection
+    angularDirection
+    heightDirection
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier1 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier1
new file mode 100644
index 0000000000000000000000000000000000000000..7be29a0492a9929f59cc1417ae2ea6b53b964b0e
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier1
@@ -0,0 +1,60 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set tier1;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+coordinateSystem global;
+//coordinateSystem patchLocal;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch outside;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 0 0);
+}
+
+// List of directions to refine
+directions
+(
+    normal
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier2 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier2
new file mode 100644
index 0000000000000000000000000000000000000000..fdf671239f6f8d60295440727668d90c91c007bd
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier2
@@ -0,0 +1,60 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set tier2;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+coordinateSystem global;
+//coordinateSystem patchLocal;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch outside;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 0 0);
+}
+
+// List of directions to refine
+directions
+(
+    normal
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier3 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier3
new file mode 100644
index 0000000000000000000000000000000000000000..d75190c73355a702554076cca2d0f9b6af2a485e
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier3
@@ -0,0 +1,60 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set tier3;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+coordinateSystem global;
+//coordinateSystem patchLocal;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch outside;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 0 0);
+}
+
+// List of directions to refine
+directions
+(
+    normal
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier4 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier4
new file mode 100644
index 0000000000000000000000000000000000000000..169a61864df419d0204dbcfd09e5f9c03fbd249d
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier4
@@ -0,0 +1,60 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set tier4;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+coordinateSystem global;
+//coordinateSystem patchLocal;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch outside;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 0 0);
+}
+
+// List of directions to refine
+directions
+(
+    normal
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier5 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier5
new file mode 100644
index 0000000000000000000000000000000000000000..d1cc375692e1617bf6bc9835ea1fb2257eb4ed3e
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier5
@@ -0,0 +1,60 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set tier5;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+coordinateSystem global;
+//coordinateSystem patchLocal;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch outside;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 0 0);
+}
+
+// List of directions to refine
+directions
+(
+    normal
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier6 b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier6
new file mode 100644
index 0000000000000000000000000000000000000000..7399354ae6d81de157354df5a6dfc14a1c69769e
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/refineMeshDict.tier6
@@ -0,0 +1,60 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      refineMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// Cells to refine; name of cell set
+set tier6;
+
+// Type of coordinate system:
+// - global : coordinate system same for every cell. Usually aligned with
+//   x,y,z axis. Specify in globalCoeffs section below.
+// - patchLocal : coordinate system different for every cell. Specify in
+//   patchLocalCoeffs section below.
+coordinateSystem global;
+//coordinateSystem patchLocal;
+
+// .. and its coefficients. x,y in this case. (normal direction is calculated
+// as tan1^tan2)
+globalCoeffs
+{
+    tan1 (1 0 0);
+    tan2 (0 1 0);
+}
+
+patchLocalCoeffs
+{
+    patch outside;  // Normal direction is facenormal of zero'th face of patch
+    tan1 (1 0 0);
+}
+
+// List of directions to refine
+directions
+(
+    normal
+);
+
+// Whether to use hex topology. This will
+// - if patchLocal: all cells on selected patch should be hex
+// - split all hexes in 2x2x2 through the middle of edges.
+useHexTopology  false;
+
+// Cut purely geometric (will cut hexes through vertices) or take topology
+// into account. Incompatible with useHexTopology
+geometricCut    true;
+
+// Write meshes from intermediate steps
+writeMesh       false;
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range1 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range1
new file mode 100644
index 0000000000000000000000000000000000000000..88a7956777fe66fffe004111a3937bbd107c24cd
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range1
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    range1;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         13.36;
+          max         18.47;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range2 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range2
new file mode 100644
index 0000000000000000000000000000000000000000..21e7b42a8f5f04a45f77f36b2443fb94fe27008c
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range2
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    range1;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         7.00;
+          max         18.47;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range3 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range3
new file mode 100644
index 0000000000000000000000000000000000000000..672a540857c92ba066f0215f894fd626f4707b35
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.range3
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    range1;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         3.67;
+          max         18.47;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier1 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier1
new file mode 100644
index 0000000000000000000000000000000000000000..495a3ad91f947346270d3a38824125b43876fbcb
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier1
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    tier1;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         0.0;
+          max         0.64;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier2 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier2
new file mode 100644
index 0000000000000000000000000000000000000000..676e34183c26ec59c78322ee5495db6ec74bbe0e
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier2
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    tier2;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         0.0;
+          max         1.03;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier3 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier3
new file mode 100644
index 0000000000000000000000000000000000000000..587a64465fec1c9aa20eb25aa016e2f3a7d0a568
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier3
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    tier3;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         0.0;
+          max         1.94;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier4 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier4
new file mode 100644
index 0000000000000000000000000000000000000000..f82365d4d433d8b9a47d8104c8fcc173d171878b
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier4
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    tier4;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         0.0;
+          max         3.67;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier5 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier5
new file mode 100644
index 0000000000000000000000000000000000000000..e7581de7371051e7e69f23153cc61f8da76a9dae
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier5
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    tier5;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         0.0;
+          max         7.00;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier6 b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier6
new file mode 100644
index 0000000000000000000000000000000000000000..b3c903928fdf67586859e7f59a6518451d6ed103
--- /dev/null
+++ b/tutorials/mesh/refineMesh/refineFieldDirs/system/topoSetDict.tier6
@@ -0,0 +1,34 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      topoSetDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+actions
+(
+    {
+        name    tier6;
+        type    cellSet;
+        action  new;
+        source fieldToCell;
+        sourceInfo
+        {
+          fieldName   radiusFieldXY;
+          min         0.0;
+          max         13.36;
+        }
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/mesh/snappyHexMesh/Allrun b/tutorials/mesh/snappyHexMesh/Allrun
index aeac877153ec1b48cca38698cb13279bb7892cde..f81482f8745bab6d49b428e388a03fb539f5891d 100755
--- a/tutorials/mesh/snappyHexMesh/Allrun
+++ b/tutorials/mesh/snappyHexMesh/Allrun
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 (
     cd flange || exit
-    ./Allrun
+    ./Allrun $*
 )
 
 (
@@ -24,4 +24,4 @@ exit 0
 
 # This dummy Allrun script avoids meshing these cases twice.
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun b/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun
index 8d81745f1177f11caa3d4535854e303646c2fa3f..7a0dffe68c369c56281581ff568e976742e369a4 100755
--- a/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun
+++ b/tutorials/mesh/snappyHexMesh/addLayersToFaceZone/Allrun
@@ -15,4 +15,4 @@ runApplication checkMesh
 
 runApplication simpleFoam
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/snappyHexMesh/flange/Allclean b/tutorials/mesh/snappyHexMesh/flange/Allclean
index 3075372076f8a8d3156cdcbc308b7e1ed14172bf..abcfd9e6e66ac95c36e206b13b82364b72e47bef 100755
--- a/tutorials/mesh/snappyHexMesh/flange/Allclean
+++ b/tutorials/mesh/snappyHexMesh/flange/Allclean
@@ -15,4 +15,4 @@ rm -f constant/polyMesh/boundary
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/snappyHexMesh/gap_detection/Allrun b/tutorials/mesh/snappyHexMesh/gap_detection/Allrun
index c2975fc5270b72b128646f990d11836780d8e805..fb62f26883d416529919b7c306c5b57a04092236 100755
--- a/tutorials/mesh/snappyHexMesh/gap_detection/Allrun
+++ b/tutorials/mesh/snappyHexMesh/gap_detection/Allrun
@@ -8,8 +8,8 @@ runApplication blockMesh
 
 runApplication decomposePar
 
-runParallel snappyHexMesh 8 -overwrite
+runParallel snappyHexMesh -overwrite
 
 runApplication reconstructParMesh -constant
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/les/Allrun b/tutorials/multiphase/cavitatingFoam/les/Allrun
index e15cc1a1dbf69ecaf0eb5463651cd26a5355bb84..e0ffdffe185953ba18d157f0f9deb4d76a07df2a 100755
--- a/tutorials/multiphase/cavitatingFoam/les/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/les/Allrun
@@ -3,12 +3,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 (
     cd throttle || exit
-    ./Allrun
+    ./Allrun $*
 )
 
 (
     cd throttle3D || exit
-    ./Allrun
+    ./Allrun $*
 )
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/0/U b/tutorials/multiphase/cavitatingFoam/les/throttle/0/U
index 7a2fc4e542fd62d34ded66b03543ace4d64b999b..b691bec7bb6ec11e4d058634d0c1c31f24d44e92 100644
--- a/tutorials/multiphase/cavitatingFoam/les/throttle/0/U
+++ b/tutorials/multiphase/cavitatingFoam/les/throttle/0/U
@@ -34,8 +34,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontBack
diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean
index 5a37749d809e3394da191397516ddabba99e1c32..57c93208bcd205e53f0528094047832e8ecc2926 100755
--- a/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean
@@ -9,4 +9,4 @@ rm -rf 0/polyMesh > /dev/null 2>&1
 rm system/topoSetDict > /dev/null 2>&1
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun
index 69a82ea55296b47cd48d6dd4d29e63c7e4bbcc35..d0b7026c3a66ba62758d228d09fc5e5d339b60c4 100755
--- a/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun
@@ -29,4 +29,4 @@ runApplication blockMesh
 refineMeshByCellSet 1 2 3
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/U b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/U
index 2c4536caf22c748bab6d74575145f78a811b92b2..d611f01203f46ed0fedc4196899cc8bb54a16a45 100644
--- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/U
+++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/U
@@ -34,14 +34,12 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontBack
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean
index b4be099821ef7f0735b4fe2f46297962759e37f3..d1fd91d5d36810bf19137be1017ecb7f7bcba27e 100755
--- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean
@@ -10,4 +10,4 @@ rm system/topoSetDict > /dev/null 2>&1
 rm -rf processor[0-9] > /dev/null 2>&1
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun
index 49c90a1c22a1ba38b119ff385e68a3bd31fe27a6..fb55f327c68bf87cf5926194b5206b66e61254c6 100755
--- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun
@@ -34,7 +34,7 @@ refineMeshByCellSet 1 2 3
 #runApplication mapFields ../throttle -sourceTime latestTime
 
 runApplication decomposePar
-runParallel $application 4
+runParallel $application
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/0/U b/tutorials/multiphase/cavitatingFoam/ras/throttle/0/U
index 7a2fc4e542fd62d34ded66b03543ace4d64b999b..b691bec7bb6ec11e4d058634d0c1c31f24d44e92 100644
--- a/tutorials/multiphase/cavitatingFoam/ras/throttle/0/U
+++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/0/U
@@ -34,8 +34,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontBack
diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean
index 5a37749d809e3394da191397516ddabba99e1c32..57c93208bcd205e53f0528094047832e8ecc2926 100755
--- a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean
+++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean
@@ -9,4 +9,4 @@ rm -rf 0/polyMesh > /dev/null 2>&1
 rm system/topoSetDict > /dev/null 2>&1
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun
index 8cfe49094a85f7e0c2b22d49c706f01e36f24827..4f68fa57c2abd682d08214093ad71be8e2f14f25 100755
--- a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun
@@ -28,4 +28,4 @@ runApplication blockMesh
 refineMeshByCellSet 1 2 3
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allclean b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allclean
index f47e555ded3f1cedd2f064bd2d8504da6785dab6..b2105c21b3e42b6bdad325716d4f1ea0a949406a 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allclean
+++ b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allclean
@@ -5,4 +5,4 @@ foamCleanTutorials cases
 rm -rf 0/alpha.water 0/alpha.water.gz 0/T.air.gz 0/T.water.gz \
     probes wallPressure pRefProbe
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allrun b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allrun
index 9c160cce7d51fee2f45023c1650dd758df4f07b6..d527e2ed86fb56c72f30dfd65beafa4b3a53a6d2 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allrun
+++ b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/Allrun
@@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/T.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/T
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/T.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/T
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/U b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/U
similarity index 92%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/U
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/U
index d6b3cdfdc5b8f18fc25af318ebe99074fa209120..2b78df77e39f7e5e589bf1d5cee386ea599dadc1 100644
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/U
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/U
@@ -22,8 +22,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/alpha.water.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/alpha.water
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/alpha.water.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/alpha.water
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/p
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/p
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p_rgh.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/p_rgh
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p_rgh.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0.org/p_rgh
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
index 0240735b433e873e691b0b3de440d7bb20ab21f1..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean
@@ -1,6 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-foamCleanTutorials cases
-rm -rf processor*
-rm -rf 0/p_rgh.gz 0/p.gz 0/alpha.water.gz 0/T*.gz
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+
+\rm -rf 0
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun
index f6263628f27764be03e105ca6e112ec552aa2db9..5040c29590b4a24cc09981728ae2030dc774724f 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun
@@ -4,15 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=`getApplication`
-
 runApplication blockMesh
-cp 0/alpha.water.org 0/alpha.water
-cp 0/p_rgh.org 0/p_rgh
-cp 0/p.org 0/p
-cp 0/T.org 0/T
+cp -r 0.org 0
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/T.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/T
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/T.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/T
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/U b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/U
similarity index 92%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/U
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/U
index d6b3cdfdc5b8f18fc25af318ebe99074fa209120..2b78df77e39f7e5e589bf1d5cee386ea599dadc1 100644
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/U
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/U
@@ -22,8 +22,7 @@ boundaryField
 {
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     frontAndBack
     {
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/alpha.water.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/alpha.water
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/alpha.water.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/alpha.water
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/p
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/p
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p_rgh.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/p_rgh
similarity index 100%
rename from tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p_rgh.org
rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0.org/p_rgh
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
index 76a62e8cd56e1b8956bcbe206e71f14384370f7d..b5350d676abc99fe060183c351b89b10dd92ef95 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean
@@ -1,8 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-foamCleanTutorials cases
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+
+\rm -rf 0
 rm -rf processor*
-rm -rf 0/p_rgh 0/p 0/alpha.water 0/T 0/T.air 0/T.water
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun
index 49bc5fe5a12013dd84369f37ebbc12d25f76739f..4e091494f626320faf86d48b07c6e4af2b19229b 100755
--- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun
@@ -4,17 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=`getApplication`
-
 runApplication blockMesh
-cp 0/alpha.water.org 0/alpha.water
-cp 0/p_rgh.org 0/p_rgh
-cp 0/p.org 0/p
-cp 0/T.org 0/T
+cp -r 0.org 0
 runApplication setFields
 runApplication decomposePar
-runParallel $application 4
+runParallel $(getApplication)
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/U b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/U
index 5b146420656b9de88de6fa2f0ce7b1e30ff14228..c01fc99992ee34d60c3ce2714386101f93dc37b1 100644
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/U
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
index 7ac80418725b3a97150e71b3eecb1a9205c14955..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allclean
@@ -8,4 +8,4 @@ cleanCase
 
 \rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
index 81cae15eabdcc1d05433cbffd5f56aee5aa1af17..b275240a50dde518b78c9e66ba0b8f558c962907 100755
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
@@ -14,4 +14,4 @@ runApplication blockMesh
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/U b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/U
index b8a451ac86472582a30fd1217e6a48b06be2b079..38d5ad5e34c12a0bb606b39b5bb9a2c1a8227845 100644
--- a/tutorials/multiphase/driftFluxFoam/ras/dahl/0/U
+++ b/tutorials/multiphase/driftFluxFoam/ras/dahl/0/U
@@ -34,14 +34,12 @@ boundaryField
 
     bottomWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     endWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     top
diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/U b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/U
index 226251d929baac461b227ce7fd09e946dd6f2729..2b8e9315bf5235ed281a96cf922ff2463b94db4e 100644
--- a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/U
+++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/0/U
@@ -23,13 +23,11 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/Allrun b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/Allrun
index 349ea685ea56c4967077cdb6bb6963a6b61c7c63..66c1631fd3b21065460d33c1ce838457c787defb 100755
--- a/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/driftFluxFoam/ras/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/U b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/U
index 7402c7e5ddd83efcd0b4ec3b4deef2d2a23bbe36..81d1a3a4038ec73dfb25567fab10162ec37bcff1 100644
--- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/U
+++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/0/U
@@ -64,74 +64,62 @@ boundaryField
 
     WALL8
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL61
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL62
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL63
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL64
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL65
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL66
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL67
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL68
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL69
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL7
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     WALL70
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     OUTL15
diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allclean b/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allclean
index b77d47d991c605a56c57139d08c269240bd08409..c89fe3143ec469261888941ae84708ce1b245469 100755
--- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allclean
+++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allclean
@@ -6,4 +6,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 rm -rf *[1-9]*
 rm -f log.* 2>/dev/null
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allrun b/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allrun
index 81444e70c8e4be61af8729ad49abf5379b212fdd..271817324757b30b55bebcb63da5e059b8bc2203 100755
--- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allrun
+++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/Allrun
@@ -8,4 +8,4 @@ application=`getApplication`
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary b/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary
index c3360d1b09902fdf250a6d3f26ff01f719887e60..5f0572806c6f5b1f81d25a8a3fe12c58f6fb4d2c 100644
--- a/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary
+++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allclean b/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allclean
index 53120b9c37e88e4169354c6e929323a04870b730..ae1cd804808562fe5a92bab4aa56c4f3be4aebf3 100755
--- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allclean
@@ -14,4 +14,4 @@ cleanCase
 \rm -rf 0 > /dev/null 2>&1
 \rm system/topoSetDict > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allrun b/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allrun
index a50938a33aa7ffcda0dc8774ef901d3cfd2a0752..49e618ecd4306a7f4a56bd195335249ab87a3f1e 100755
--- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/Allrun
@@ -4,12 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-runRefineMesh ()
-{
-    echo "Running refineMesh on $PWD"
-    refineMesh -dict system/refineMeshDict -overwrite > log.refineMesh 2>&1
-}
-
 # copy DTC hull surface from resources folder
 cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
 
@@ -17,17 +11,13 @@ runApplication surfaceFeatureExtract
 
 runApplication blockMesh
 
-i=1
-if [ -f log.topoSet.6 ] ; then
-   i=7
-fi
-while [ "$i" -lt 7 ] ; do
-    cp system/topoSetDict.${i} system/topoSetDict
-    runApplication topoSet
-    runRefineMesh
-    mv log.topoSet log.topoSet.$i
-    mv log.refineMesh log.refineMesh.$i
-    i=$(expr $i + 1)
+for i in 1 2 3 4 5 6
+do
+    runApplication -s $i \
+        topoSet -dict system/topoSetDict.${i}
+
+    runApplication -s $i \
+        refineMesh -dict system/refineMeshDict -overwrite
 done
 
 runApplication snappyHexMesh -overwrite
@@ -39,10 +29,10 @@ runApplication setFields
 
 runApplication decomposePar
 
-runParallel renumberMesh 8 -overwrite
+runParallel renumberMesh -overwrite
 
-runParallel $(getApplication) 8
+runParallel $(getApplication)
 
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict
index 68269e610f7c17cd42ca7ac0bb518aec196b8040..49d3d4fa017bb38cbd37711a09490a4da60bcf17 100644
--- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict
@@ -16,56 +16,65 @@ FoamFile
 
 dynamicFvMesh       dynamicMotionSolverFvMesh;
 
-motionSolverLibs    ("libsixDoFRigidBodyMotion.so");
+motionSolverLibs   ("librigidBodyMeshMotion.so");
 
-solver              sixDoFRigidBodyMotion;
+solver             rigidBodyMotion;
 
-sixDoFRigidBodyMotionCoeffs
+rigidBodyMotionCoeffs
 {
-    patches         (hull);
-    innerDistance   0.3;
-    outerDistance   1;
-
-    centreOfMass    (2.929541 0 0.2);
-    mass            412.73;
-    momentOfInertia (40 921 921);
-    rhoInf          1;
     report          on;
 
-    value           uniform (0 0 0);
-
-    accelerationRelaxation 0.4;
-
     solver
     {
         type Newmark;
     }
 
-    constraints
-    {
-        zAxis
-        {
-            sixDoFRigidBodyMotionConstraint line;
-            direction     (0 0 1);
-        }
-        yPlane
-        {
-            sixDoFRigidBodyMotionConstraint axis;
-            axis          (0 1 0);
-        }
-    }
+    accelerationRelaxation 0.4;
 
-    restraints
+    bodies
     {
-        translationDamper
+        hull
         {
-            sixDoFRigidBodyMotionRestraint linearDamper;
-            coeff         8596;
-        }
-        rotationDamper
-        {
-            sixDoFRigidBodyMotionRestraint sphericalAngularDamper;
-            coeff         11586;
+            type            rigidBody;
+            parent          root;
+
+            centreOfMass    (0 0 0);
+            mass            412.73;
+            inertia         (40 0 0 921 0 921);
+            transform       (1 0 0 0 1 0 0 0 1) (2.929541 0 0.2);
+
+            joint
+            {
+                type    composite;
+                joints
+                (
+                    {
+                        type Pz;
+                    }
+                    {
+                        type Ry;
+                    }
+                );
+            }
+
+            restraints
+            {
+                translationDamper
+                {
+                    type    linearDamper;
+                    coeff   8596;
+                }
+
+                rotationDamper
+                {
+                    type    sphericalAngularDamper;
+                    coeff   11586;
+                }
+            }
+
+            patches         (hull);
+            innerDistance   0.3;
+            outerDistance   1;
         }
     }
 }
diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict.sixDoF b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict.sixDoF
new file mode 100644
index 0000000000000000000000000000000000000000..68269e610f7c17cd42ca7ac0bb518aec196b8040
--- /dev/null
+++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict.sixDoF
@@ -0,0 +1,74 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      dynamicMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dynamicFvMesh       dynamicMotionSolverFvMesh;
+
+motionSolverLibs    ("libsixDoFRigidBodyMotion.so");
+
+solver              sixDoFRigidBodyMotion;
+
+sixDoFRigidBodyMotionCoeffs
+{
+    patches         (hull);
+    innerDistance   0.3;
+    outerDistance   1;
+
+    centreOfMass    (2.929541 0 0.2);
+    mass            412.73;
+    momentOfInertia (40 921 921);
+    rhoInf          1;
+    report          on;
+
+    value           uniform (0 0 0);
+
+    accelerationRelaxation 0.4;
+
+    solver
+    {
+        type Newmark;
+    }
+
+    constraints
+    {
+        zAxis
+        {
+            sixDoFRigidBodyMotionConstraint line;
+            direction     (0 0 1);
+        }
+        yPlane
+        {
+            sixDoFRigidBodyMotionConstraint axis;
+            axis          (0 1 0);
+        }
+    }
+
+    restraints
+    {
+        translationDamper
+        {
+            sixDoFRigidBodyMotionRestraint linearDamper;
+            coeff         8596;
+        }
+        rotationDamper
+        {
+            sixDoFRigidBodyMotionRestraint sphericalAngularDamper;
+            coeff         11586;
+        }
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allclean b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allclean
index e87f782c61ec38a9539126fc2d5aedd2b4c80709..d1295e344e28bdc2c1cd172ed7721348a2eeda0e 100755
--- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allclean
@@ -9,4 +9,4 @@ rm -rf 0 > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun
index 26d91e25b7853d0d860c04f8712bae32fc5c2b0e..0424df0e63df09cb7456ad5b0e4333c7fe7292b8 100755
--- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun
@@ -12,4 +12,4 @@ runApplication subsetMesh -overwrite c0 -patch walls
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict
index 2fea72760bdec72ad693eac345b73996848278da..4ae5f256aae1242b36de019aab18529d75635176 100644
--- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict
@@ -21,19 +21,26 @@ dynamicRefineFvMeshCoeffs
 {
     // How often to refine
     refineInterval  1;
+
     // Field to be refinement on
     field           alpha.water;
+
     // Refine field inbetween lower..upper
     lowerRefineLevel 0.001;
     upperRefineLevel 0.999;
+
     // If value < unrefineLevel unrefine
     unrefineLevel   10;
+
     // Have slower than 2:1 refinement
     nBufferLayers   1;
+
     // Refine cells only up to maxRefinement levels
     maxRefinement   2;
+
     // Stop refinement if maxCells reached
     maxCells        200000;
+
     // Flux field and corresponding velocity field. Fluxes on changed
     // faces get recalculated by interpolating the velocity. Use 'none'
     // on surfaceScalarFields that do not need to be reinterpolated.
@@ -42,8 +49,10 @@ dynamicRefineFvMeshCoeffs
         (phi none)
         (nHatf none)
         (rhoPhi none)
+        (alphaPhi none)
         (ghf none)
     );
+
     // Write the refinement level as a volScalarField
     dumpLevel       true;
 }
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U
index 13fc01450f7135455b6078ab2436729b3f6427dd..49b7a210532b761c2a6ec3900148c5de0b993e1a 100644
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U
@@ -23,8 +23,7 @@ boundaryField
 {
     stationaryWalls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean
index edd5fd5440afc3b32c9f9c0458c567b18f930a5f..5734444f4e74e87d3d685ad82df35bcb7e3b300e 100755
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean
@@ -8,4 +8,4 @@ rm -rf 0 > /dev/null 2>&1
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun
index a5514c147a41fbfbdb8818a39aa93b7fbfcb912f..62915ff2cf574a9e8c8f52942d41a3b189d05ecf 100755
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun
@@ -14,4 +14,4 @@ cp -r 0.org 0 > /dev/null 2>&1
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
index e79da19b8e7d4b2f970b52b0a67eaa2541925b05..5d63bea8cae02183f09cac6c1c1c539ad3803b2c 100644
--- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
@@ -16,75 +16,59 @@ FoamFile
 
 dynamicFvMesh       dynamicMotionSolverFvMesh;
 
-motionSolverLibs    ("libsixDoFRigidBodyMotion.so");
+motionSolverLibs   ("librigidBodyMeshMotion.so");
 
-solver              sixDoFRigidBodyMotion;
+solver             rigidBodyMotion;
 
-sixDoFRigidBodyMotionCoeffs
+rigidBodyMotionCoeffs
 {
-    patches         (floatingObject);
-    innerDistance   0.05;
-    outerDistance   0.35;
-
-    centreOfMass    (0.5 0.45 0.35);
-
-    // Cuboid dimensions
-    Lx              0.3;
-    Ly              0.2;
-    Lz              0.5;
-
-    // Density of the solid
-    rho             500;
-
-    // Cuboid mass
-    mass            #calc "$rho*$Lx*$Ly*$Lz";
-
-    // Cuboid moment of inertia about the centre of mass
-    momentOfInertia #codeStream
-    {
-        codeInclude
-        #{
-            #include "diagTensor.H"
-        #};
-
-        code
-        #{
-            scalar sqrLx = sqr($Lx);
-            scalar sqrLy = sqr($Ly);
-            scalar sqrLz = sqr($Lz);
-            os  <<
-                $mass
-               *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
-        #};
-    };
-
     report          on;
-    accelerationRelaxation 0.7;
 
     solver
     {
         type Newmark;
     }
 
-    constraints
-    {
-        // fixedPoint
-        // {
-        //     sixDoFRigidBodyMotionConstraint point;
-        //     centreOfRotation (0.5 0.45 0.1);
-        // }
-
-        fixedLine
-        {
-            sixDoFRigidBodyMotionConstraint line;
-            centreOfRotation (0.5 0.45 0.1);
-            direction (0 1 0);
-        }
+    accelerationRelaxation 0.7;
 
-        fixedAxis
+    bodies
+    {
+        floatingObject
         {
-            sixDoFRigidBodyMotionConstraint axis;
-            axis (0 1 0);
+            type            cuboid;
+            parent          root;
+
+            // Cuboid dimensions
+            Lx              0.3;
+            Ly              0.2;
+            Lz              0.5;
+
+            // Density of the cuboid
+            rho             500;
+
+            // Cuboid mass
+            mass            #calc "$rho*$Lx*$Ly*$Lz";
+            L               ($Lx $Ly $Lz);
+            centreOfMass    (0 0 0.25);
+            transform       (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);
+
+            joint
+            {
+                type            composite;
+                joints
+                (
+                    {
+                        type Py;
+                    }
+                    {
+                        type Ry;
+                    }
+                );
+            }
+
+            patches         (floatingObject);
+            innerDistance   0.05;
+            outerDistance   0.35;
         }
     }
 }
diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict.sixDoF b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict.sixDoF
new file mode 100644
index 0000000000000000000000000000000000000000..00441a6fcfb696089233b370946ca158dfd831ea
--- /dev/null
+++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict.sixDoF
@@ -0,0 +1,94 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      motionProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dynamicFvMesh       dynamicMotionSolverFvMesh;
+
+motionSolverLibs    ("libsixDoFRigidBodyMotion.so");
+
+solver              sixDoFRigidBodyMotion;
+
+sixDoFRigidBodyMotionCoeffs
+{
+    patches         (floatingObject);
+    innerDistance   0.05;
+    outerDistance   0.35;
+
+    centreOfMass    (0.5 0.45 0.35);
+
+    // Cuboid dimensions
+    Lx              0.3;
+    Ly              0.2;
+    Lz              0.5;
+
+    // Density of the solid
+    rho             500;
+
+    // Cuboid mass
+    mass            #calc "$rho*$Lx*$Ly*$Lz";
+
+    // Cuboid moment of inertia about the centre of mass
+    momentOfInertia #codeStream
+    {
+        codeInclude
+        #{
+            #include "diagTensor.H"
+        #};
+
+        code
+        #{
+            scalar sqrLx = sqr($Lx);
+            scalar sqrLy = sqr($Ly);
+            scalar sqrLz = sqr($Lz);
+            os  <<
+                $mass
+               *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
+        #};
+    };
+
+    report          on;
+    accelerationRelaxation 0.7;
+    //accelerationDamping 0;
+
+    solver
+    {
+        type Newmark;
+    }
+
+    constraints
+    {
+        // fixedPoint
+        // {
+        //     sixDoFRigidBodyMotionConstraint point;
+        //     centreOfRotation (0.5 0.45 0.1);
+        // }
+
+        fixedLine
+        {
+            sixDoFRigidBodyMotionConstraint line;
+            centreOfRotation (0.5 0.45 0.1);
+            direction (0 1 0);
+        }
+
+        fixedAxis
+        {
+            sixDoFRigidBodyMotionConstraint axis;
+            axis (0 1 0);
+        }
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allclean b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allclean
index b5494c69fbd80418a22868c1d6efe00f529b72cb..bd23e0cde8246174b6f127ac8d9030528b2e7de6 100755
--- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allclean
@@ -10,4 +10,4 @@ cleanCase
 \rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
 \rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun
index 6d80a88bc7de9cd016d3e05431b235d118e1bca0..da8fc430fec7e50606d41df489162943eeb8ba9f 100755
--- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun
@@ -13,9 +13,9 @@ application=`getApplication`
 runApplication decomposePar -force
 
 # Run
-runParallel $application 6
+runParallel $application
 
 # Reconstruct
 runApplication reconstructPar -noFunctionObjects
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun.pre b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun.pre
index c27ee3a94d271774a2d054a5cc82c8b35139e6f4..94f56616732ea5392342186b2d76a3d472e20225 100755
--- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun.pre
+++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/Allrun.pre
@@ -25,4 +25,4 @@ runApplication createPatch -overwrite
 # Initialize alpha
 runApplication setFields
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/U b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/U
index 77100e9c9b7bdab16df42d845481e08aa100e84f..9e18534aa153f001294a79705e40eaf05a8de0c6 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/U
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/U
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/alpha.water b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/alpha.water
index f48a5159cfe2ad0514ecb05b598955df19130a50..d0ecf37761654cc94df7f11264438db388fbcb8d 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/alpha.water
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/alpha.water
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/k b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/k
index 294808dfc977152bf57d6f3519e9c24e57117b90..7739e407e8a01b518821e8406f8dae6ccca21205 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/k
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/k
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/nut b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/nut
index 3e5c469f71d25c0b17251273d7b9947e17cd343f..5973a4c7deb20dc4c84705b4643e1992e18555eb 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/nut
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/nut
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/omega b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/omega
index 93c9a4a195a4f41100d0fa95cefa7a69118fd0ee..f4d2cc053871c8edb7aeea9f7060589aba3e49cb 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/omega
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/omega
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/p_rgh b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/p_rgh
index 153f206474e67282a532c544cb8225f3fce3dfb8..5b6eba19284e660a95e761fc55e51941301638b5 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/p_rgh
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/0.org/p_rgh
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun b/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun
index e476b947cc7499c4a61885015e7379fc2f144a3a..776643da4d51a8c8abf1bd675f64e018fc865fb7 100755
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun
@@ -6,16 +6,15 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 ./Allrun.pre
 
-#runApplication `getApplication`
-runParallel `getApplication` 5
+runParallel $(getApplication)
 
 unset FOAM_SIGFPE
-runParallel -log log.reconstruct redistributePar 5 -reconstruct
+runParallel -s reconstruct redistributePar -reconstruct
 
 # A bit more testing of decomposing
 \cp system/controlDict_nextWrite system/controlDict
-runParallel -log log.decompose redistributePar 5 -decompose -latestTime
-runParallel -log log.interDyMFoam_restart `getApplication` 5
+runParallel -s decompose redistributePar -decompose -latestTime
+runParallel -s restart $(getApplication)
 
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun.pre b/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun.pre
index 01e18e2e5a4d07575b2a1ba41771dda6732958ae..2a010de9b4a2bc29be44414963548cbf4e9b3d25 100755
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun.pre
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/Allrun.pre
@@ -18,10 +18,10 @@ runApplication blockMesh
 #runApplication setFields
 
 runApplication decomposePar -force
-runParallel snappyHexMesh 5 -overwrite
+runParallel snappyHexMesh -overwrite
 ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
 
 # - set the initial fields
 ls -d processor* | xargs -I {} rm -rf ./{}/0
 ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
-runParallel setFields 5
+runParallel setFields
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/dynamicMeshDict
index 2f4b79e3f328ff2e911a4cef606ed9617733ad87..444d6103916323d34cf9a3d27d143847a3bc2b37 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/dynamicMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/dynamicMeshDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/g b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/g
index 897615a50df92736e7b9c64bb2e64fba539496fc..195dbea3f3cac083e26f182b8ae44f0074c8486c 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/g
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/g
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/transportProperties b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/transportProperties
index 81106f5ea4c8d3fc9ef41f563aca1199b62e00f1..f2fa0fcec9c28301b67813cd8bdb874b904b6e3d 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/transportProperties
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/transportProperties
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/turbulenceProperties b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/turbulenceProperties
index 9203c7ba665759fddf1b156df648f5071a5e4f7c..eee1f1c8d5064a2b4c02916368234776a72b2d6c 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/turbulenceProperties
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/constant/turbulenceProperties
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/blockMeshDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/blockMeshDict
index 38149564a19cf8f0e8975a18237c73c2680a12a9..7f4d16f68ce1e5154943abec94ba8fca7823108d 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/blockMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/blockMeshDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict
index f8c3c69f1a8163a22f7279edc46b29c13d87bbac..fa46cc601da3182340a4a8a2e56c9fd7535f3491 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
@@ -22,11 +22,11 @@ FoamFile
 
 application     interDyMFoam;
 
-startFrom       startTime;
+startFrom       latestTime;
 
 startTime       0;
 
-stopAt          endTime;
+stopAt          nextWrite;
 
 endTime         2;
 
@@ -56,11 +56,5 @@ maxCo           0.5;
 maxAlphaCo      0.5;
 maxDeltaT       1;
 
-functions
-{
-    // Print stats
-    #include "minMax"
-}
-
 
 // ************************************************************************* //
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_nextWrite b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_nextWrite
index 52aa42427cb012a9a6e8b7b9d85e4f82e9e64a24..fa46cc601da3182340a4a8a2e56c9fd7535f3491 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_nextWrite
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_nextWrite
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_run b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_run
index f8c3c69f1a8163a22f7279edc46b29c13d87bbac..caab84a9c0e4186935a20f1d8c0d3d1ae22d2b3e 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_run
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/controlDict_run
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/decomposeParDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/decomposeParDict
index 481b48ea081a61731ab097516b71e3c19a334290..5c5ab00ebfc94484731517b280f97de5a97d5a57 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/decomposeParDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/decomposeParDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSchemes
index 8aef2d312f33ed2ee9e109cb1393f0689813586d..9d794bb101464c8cf36d180b29347be037429ed6 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSchemes
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSchemes
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSolution
index ec6d8e265960c10b9f925182ae728df3c6b0be9c..abeb38026b870b700676ab8313535c200273817a 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSolution
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/fvSolution
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/meshQualityDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/meshQualityDict
index 104050253c5b52e487d446ea7f9efdb0cdef72a8..320ee800c8254f8a23d442166758b0effb8aa11a 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/meshQualityDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/meshQualityDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/minMax b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/minMax
index 63556db939afef5d87a0280e67bccbb9ca18e9cf..90222dc91c18c73b9fc2a3d29c362630611ad415 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/minMax
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/minMax
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/setFieldsDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/setFieldsDict
index 07a8dc3c4a88511a9f25ff3a18f01c58aa676059..79644831bbe691e205509752cc7b6d0fe32ea73b 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/setFieldsDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/setFieldsDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/snappyHexMeshDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/snappyHexMeshDict
index 7eb1d5ce1a54823e64ded4fe9521b918c7d22786..3dac7f631f3f67f995691add79bceb4d8bd5dcfd 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/snappyHexMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/snappyHexMeshDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/surfaceFeatureExtractDict b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/surfaceFeatureExtractDict
index fa00f8600162f4a18b2348ba7da29d7443d96de0..54e009ccfa83fea14941c9239b0743dd36bbdfa3 100644
--- a/tutorials/multiphase/interDyMFoam/ras/motorBike/system/surfaceFeatureExtractDict
+++ b/tutorials/multiphase/interDyMFoam/ras/motorBike/system/surfaceFeatureExtractDict
@@ -1,8 +1,8 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  dev                                   |
-|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
 FoamFile
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allclean b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allclean
index c1400c13fdc76aaaf40d8ba2088a5f82d893a98c..dc74ee4df5c566f4315aaf259253ed0bf0fb8e56 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allclean
@@ -4,4 +4,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 foamCleanTutorials cases
 rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun
index 9c160cce7d51fee2f45023c1650dd758df4f07b6..d527e2ed86fb56c72f30dfd65beafa4b3a53a6d2 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun
@@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allclean b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allclean
index c1400c13fdc76aaaf40d8ba2088a5f82d893a98c..dc74ee4df5c566f4315aaf259253ed0bf0fb8e56 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allclean
@@ -4,4 +4,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 foamCleanTutorials cases
 rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun
index 9c160cce7d51fee2f45023c1650dd758df4f07b6..d527e2ed86fb56c72f30dfd65beafa4b3a53a6d2 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun
@@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allclean b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allclean
index c1400c13fdc76aaaf40d8ba2088a5f82d893a98c..dc74ee4df5c566f4315aaf259253ed0bf0fb8e56 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allclean
@@ -4,4 +4,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 foamCleanTutorials cases
 rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun
index 9c160cce7d51fee2f45023c1650dd758df4f07b6..d527e2ed86fb56c72f30dfd65beafa4b3a53a6d2 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun
@@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allclean b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allclean
index c1400c13fdc76aaaf40d8ba2088a5f82d893a98c..dc74ee4df5c566f4315aaf259253ed0bf0fb8e56 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allclean
@@ -4,4 +4,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 foamCleanTutorials cases
 rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun
index 9c160cce7d51fee2f45023c1650dd758df4f07b6..d527e2ed86fb56c72f30dfd65beafa4b3a53a6d2 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun
@@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allclean b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allclean
index c1400c13fdc76aaaf40d8ba2088a5f82d893a98c..dc74ee4df5c566f4315aaf259253ed0bf0fb8e56 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allclean
@@ -4,4 +4,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 foamCleanTutorials cases
 rm -rf 0/alpha.water 0/alpha.water.gz probes wallPressure pRefProbe
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun
index 9c160cce7d51fee2f45023c1650dd758df4f07b6..d527e2ed86fb56c72f30dfd65beafa4b3a53a6d2 100755
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun
@@ -10,4 +10,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/gen6DoF/gen6DoF.C b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/gen6DoF/gen6DoF.C
index e463562db3cb884d9352cccaeaa7d388660d08f3..fc7a3fbabc3edfcfe884fb8a1743aec6c0161e06 100644
--- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/gen6DoF/gen6DoF.C
+++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/gen6DoF/gen6DoF.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
     // Frequency of the rotation [rad/s]
     const vector rotOmega(0.4, 0.7, 0.5);
 
-    List<Tuple2<scalar,  Vector2D<vector> > > timeValues(nTimes);
+    List<Tuple2<scalar,  Vector2D<vector>>> timeValues(nTimes);
 
     forAll(timeValues, i)
     {
diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allclean b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allclean
index aff960b19223b8db25dbf88f5d5406d1dfcd46b7..8c9c9abaac65b9d9450c0295f887e2506b4d4184 100755
--- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allclean
+++ b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm -rf 0/alpha.water
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun
index dfdfff0c762e38452f0beb3fa8e7cd00e8ef7594..f49fa8dbc487057f01108bfe25b2504f8a0e3f32 100755
--- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun
+++ b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun
@@ -9,4 +9,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/Allrun b/tutorials/multiphase/interFoam/laminar/Allrun
deleted file mode 100755
index 45adee60c76550d2c74d46c69025965b240b9187..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interFoam/laminar/Allrun
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial run functions
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
-
-setDamBreakFine ()
-{
-    blockMeshDict="system/blockMeshDict"
-    controlDict="system/controlDict"
-    sed \
-    -e s/"23 8"/"46 10"/g \
-    -e s/"19 8"/"40 10"/g \
-    -e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
-    -e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
-    -e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
-    $blockMeshDict > temp.$$
-    mv temp.$$ $blockMeshDict
-    sed \
-    -e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
-    -e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
-    $controlDict > temp.$$
-    mv temp.$$ $controlDict
-}
-
-# Do damBreak
-(
-    cd damBreak || exit
-
-    runApplication blockMesh
-    cp 0/alpha.water.org 0/alpha.water
-    runApplication setFields
-    runApplication `getApplication`
-)
-
-# Clone case
-cloneCase damBreak damBreakFine
-
-(
-    cd damBreakFine || exit
-
-    # Modify case
-    setDamBreakFine
-
-    # And execute
-    runApplication blockMesh
-    cp ../damBreak/0/alpha.water.org 0/alpha.water
-    runApplication setFields
-    runApplication decomposePar
-    runParallel `getApplication` 4
-    runApplication reconstructPar
-)
-
-# Do capillaryRise
-(cd capillaryRise && foamRunTutorials)
-
-# Do mixerVessel2D
-(cd mixerVessel2D && foamRunTutorials)
-
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/0/U b/tutorials/multiphase/interFoam/laminar/capillaryRise/0/U
index 27ed8263eca4434102ca8011b8b753b69e247bdb..0bd9f001f0eb3e8c630ae7d363cd26b7bbf255f5 100644
--- a/tutorials/multiphase/interFoam/laminar/capillaryRise/0/U
+++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/0/U
@@ -35,8 +35,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     defaultFaces
diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/0/alpha.water b/tutorials/multiphase/interFoam/laminar/capillaryRise/0/alpha.water
new file mode 100644
index 0000000000000000000000000000000000000000..f1e753a5f6202370b5d56246410a7cf4d2199bb4
--- /dev/null
+++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/0/alpha.water
@@ -0,0 +1,8856 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    location    "0";
+    object      alpha.water;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 0 0 0 0 0 0];
+
+internalField   nonuniform List<scalar>
+8000
+(
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+)
+;
+
+boundaryField
+{
+    inlet
+    {
+        type            inletOutlet;
+        inletValue      uniform 1;
+        value           uniform 1;
+    }
+    atmosphere
+    {
+        type            zeroGradient;
+    }
+    walls
+    {
+        type            constantAlphaContactAngle;
+        theta0          45;
+        limit           gradient;
+        value           nonuniform List<scalar>
+800
+(
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+)
+;
+    }
+    frontAndBack
+    {
+        type            empty;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun b/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
index 114fb01b6674c3a77f2e5e6a6e4bfbe1c25a3394..9a17d2d52519c474cb7af67d727fc6efdf054ed6 100755
--- a/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
@@ -11,4 +11,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/Allclean b/tutorials/multiphase/interFoam/laminar/damBreak/Allclean
similarity index 56%
rename from tutorials/multiphase/interFoam/laminar/Allclean
rename to tutorials/multiphase/interFoam/laminar/damBreak/Allclean
index d18e5ef57449a52440db4921873a5ab0b78cb541..efbd66e1c262b22118772c1a716dd26c52db68a6 100755
--- a/tutorials/multiphase/interFoam/laminar/Allclean
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/Allclean
@@ -4,12 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-keepCases="damBreak capillaryRise mixerVessel2D"
+keepCases="damBreak"
 loseCases="damBreakFine"
 
 for case in $keepCases
 do
-    (cd $case && foamCleanTutorials && rm -rf 0/alpha.water)
+    (cd $case && foamCleanTutorials)
 done
 
 for case in $loseCases
@@ -17,4 +17,4 @@ do
     removeCase $case
 done
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
similarity index 77%
rename from tutorials/multiphase/interFoam/ras/Allrun
rename to tutorials/multiphase/interFoam/laminar/damBreak/Allrun
index 2d70aedba055bb2bacffc76249b127e1e7f826b1..125f1aa53b0124fd912c1d8bfd388e8d5587fdd3 100755
--- a/tutorials/multiphase/interFoam/ras/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun
@@ -39,17 +39,8 @@ cloneCase damBreak damBreakFine
     runApplication blockMesh
     runApplication setFields
     runApplication decomposePar
-    runParallel `getApplication` 4
+    runParallel `getApplication`
     runApplication reconstructPar
 )
 
-# Do damBreakPorousBaffle
-(cd damBreakPorousBaffle && foamRunTutorials)
-
-# Do weirOverflow
-(cd weirOverflow && foamRunTutorials)
-
-# Do waterChannel
-(cd waterChannel && foamRunTutorials)
-
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/U b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/U
similarity index 83%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/U
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/U
index 5b146420656b9de88de6fa2f0ce7b1e30ff14228..c01fc99992ee34d60c3ce2714386101f93dc37b1 100644
--- a/tutorials/multiphase/interFoam/ras/damBreak/0/U
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/alpha.water b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/alpha.water
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/alpha.water
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/alpha.water
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/0/alpha.water.org b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/alpha.water.org
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/0/alpha.water.org
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/alpha.water.org
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/0/p_rgh b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/p_rgh
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/0/p_rgh
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/0/p_rgh
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..901c358b375a0720811db9110c71c506e1c4136d
--- /dev/null
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+cp 0/alpha.water.org 0/alpha.water
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..0df95afd2e081913dc5c6a301fa9f299262850a1
--- /dev/null
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+# Get application name
+application=`getApplication`
+
+runApplication blockMesh
+runApplication setFields
+runApplication $application
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/constant/dynamicMeshDict b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/dynamicMeshDict
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/constant/dynamicMeshDict
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/dynamicMeshDict
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/constant/g b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/g
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/constant/g
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/g
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/constant/transportProperties b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/transportProperties
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/constant/transportProperties
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/transportProperties
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/constant/turbulenceProperties b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/turbulenceProperties
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/constant/turbulenceProperties
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/constant/turbulenceProperties
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/blockMeshDict b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/blockMeshDict
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/system/blockMeshDict
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/blockMeshDict
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/controlDict b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/controlDict
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/system/controlDict
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/controlDict
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/decomposeParDict b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/decomposeParDict
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/system/decomposeParDict
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/decomposeParDict
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/fvSchemes
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/fvSchemes
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/fvSolution
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/fvSolution
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/setFieldsDict b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/setFieldsDict
similarity index 100%
rename from tutorials/multiphase/interFoam/laminar/damBreak/system/setFieldsDict
rename to tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/setFieldsDict
diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/U b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/U
index 226251d929baac461b227ce7fd09e946dd6f2729..2b8e9315bf5235ed281a96cf922ff2463b94db4e 100644
--- a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/U
+++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/U
@@ -23,13 +23,11 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/alpha.water b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/alpha.water
new file mode 100644
index 0000000000000000000000000000000000000000..a8704851bf1e095c18011c93cc3c3e52b21aaf4e
--- /dev/null
+++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/alpha.water
@@ -0,0 +1,3119 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    location    "0";
+    object      alpha.water;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 0 0 0 0 0 0];
+
+internalField   nonuniform List<scalar>
+3072
+(
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+)
+;
+
+boundaryField
+{
+    rotor
+    {
+        type            zeroGradient;
+    }
+    stator
+    {
+        type            zeroGradient;
+    }
+    front
+    {
+        type            empty;
+    }
+    back
+    {
+        type            empty;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
index 4063d3c471264c1eb5cbb57d557cfebdcc5d1ce4..c0a3a7154e782f3688f3ea8b21143319e16bb73b 100755
--- a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
@@ -11,4 +11,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/U b/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/U
index 5c08924b3b3bf32df11b439e3afdcea1c1ec366b..7a9e9c53a8a196f56afdca5840d1015cd747b16d 100644
--- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/U
+++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/0/U
@@ -33,8 +33,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     atmosphere
diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allclean b/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allclean
index c8b7ab35d725e06e94ee1de055ac3028fd48a8f2..473383859a0b61c8d197188eebd6978e3610b73e 100755
--- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allclean
+++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm system/topoSetDict > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun b/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun
index b775b2a48182af3fb982a28929e01d2b0d34be0c..5b0b162e78c7541ef1c624fcb0869b448271f8e5 100755
--- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun
+++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun
@@ -7,30 +7,17 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Get application name
 application=`getApplication`
 
-runRefineMesh ()
-{
-    echo "Running refineMesh on $PWD"
-    refineMesh -dict system/refineMeshDict > log.refineMesh 2>&1
-}
-
 runApplication blockMesh
 
-i=1
-if [ -f log.topoSet ] ; then
-   i=3
-fi
-while [ "$i" -lt 3 ] ; do
-    if [ -f log.topoSet ] ; then
-        mv log.topoSet log.topoSet.1
-    fi
-    cp system/topoSetDict.${i} system/topoSetDict
-    runApplication topoSet
-    runRefineMesh
-    cp -r 1e-08/polyMesh/* constant/polyMesh
-    rm -rf 1e-08
-    i=`expr $i + 1`
+for i in 1 2
+do
+    runApplication -s $i \
+        topoSet -dict system/topoSetDict.${i}
+
+    runApplication -s $i \
+        refineMesh -dict system/refineMeshDict -overwrite
 done
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/Allclean b/tutorials/multiphase/interFoam/ras/Allclean
deleted file mode 100755
index 8b652373baa466330cb2c6337233873c9cfa2912..0000000000000000000000000000000000000000
--- a/tutorials/multiphase/interFoam/ras/Allclean
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
-
-# Source tutorial clean functions
-. $WM_PROJECT_DIR/bin/tools/CleanFunctions
-
-keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel angledDuct"
-loseCases="damBreakFine"
-
-for case in $keepCases
-do
-    (cd $case && foamCleanTutorials)
-
-    if [ "$case" = "damBreak" ]
-    then
-        cp $case/0/alpha.water.org $case/0/alpha.water
-    fi
-
-    if [ "$case" = "damBreakPorousBaffle" ]
-    then
-        cp $case/0/alpha.water.org $case/0/alpha.water
-    fi
-
-done
-
-for case in $loseCases
-do
-    removeCase $case
-done
-
-# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interFoam/ras/DTCHull/Allclean b/tutorials/multiphase/interFoam/ras/DTCHull/Allclean
index 53120b9c37e88e4169354c6e929323a04870b730..ae1cd804808562fe5a92bab4aa56c4f3be4aebf3 100755
--- a/tutorials/multiphase/interFoam/ras/DTCHull/Allclean
+++ b/tutorials/multiphase/interFoam/ras/DTCHull/Allclean
@@ -14,4 +14,4 @@ cleanCase
 \rm -rf 0 > /dev/null 2>&1
 \rm system/topoSetDict > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/DTCHull/Allrun b/tutorials/multiphase/interFoam/ras/DTCHull/Allrun
index a50938a33aa7ffcda0dc8774ef901d3cfd2a0752..49e618ecd4306a7f4a56bd195335249ab87a3f1e 100755
--- a/tutorials/multiphase/interFoam/ras/DTCHull/Allrun
+++ b/tutorials/multiphase/interFoam/ras/DTCHull/Allrun
@@ -4,12 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-runRefineMesh ()
-{
-    echo "Running refineMesh on $PWD"
-    refineMesh -dict system/refineMeshDict -overwrite > log.refineMesh 2>&1
-}
-
 # copy DTC hull surface from resources folder
 cp $FOAM_TUTORIALS/resources/geometry/DTC-scaled.stl.gz constant/triSurface/
 
@@ -17,17 +11,13 @@ runApplication surfaceFeatureExtract
 
 runApplication blockMesh
 
-i=1
-if [ -f log.topoSet.6 ] ; then
-   i=7
-fi
-while [ "$i" -lt 7 ] ; do
-    cp system/topoSetDict.${i} system/topoSetDict
-    runApplication topoSet
-    runRefineMesh
-    mv log.topoSet log.topoSet.$i
-    mv log.refineMesh log.refineMesh.$i
-    i=$(expr $i + 1)
+for i in 1 2 3 4 5 6
+do
+    runApplication -s $i \
+        topoSet -dict system/topoSetDict.${i}
+
+    runApplication -s $i \
+        refineMesh -dict system/refineMeshDict -overwrite
 done
 
 runApplication snappyHexMesh -overwrite
@@ -39,10 +29,10 @@ runApplication setFields
 
 runApplication decomposePar
 
-runParallel renumberMesh 8 -overwrite
+runParallel renumberMesh -overwrite
 
-runParallel $(getApplication) 8
+runParallel $(getApplication)
 
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/angledDuct/0/U b/tutorials/multiphase/interFoam/ras/angledDuct/0/U
index 351ce5f2557d494cf957536d05b0f674a9f52369..ea18340e2402c40a90fd29f8d1fb72071373eafc 100644
--- a/tutorials/multiphase/interFoam/ras/angledDuct/0/U
+++ b/tutorials/multiphase/interFoam/ras/angledDuct/0/U
@@ -22,18 +22,15 @@ boundaryField
 {
     front
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     back
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     porosityWall
     {
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/Allclean b/tutorials/multiphase/interFoam/ras/damBreak/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..efbd66e1c262b22118772c1a716dd26c52db68a6
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/damBreak/Allclean
@@ -0,0 +1,20 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+keepCases="damBreak"
+loseCases="damBreakFine"
+
+for case in $keepCases
+do
+    (cd $case && foamCleanTutorials)
+done
+
+for case in $loseCases
+do
+    removeCase $case
+done
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/Allrun b/tutorials/multiphase/interFoam/ras/damBreak/Allrun
index 5871e056f3260104b19b93ad34d5da34ff9be99f..125f1aa53b0124fd912c1d8bfd388e8d5587fdd3 100755
--- a/tutorials/multiphase/interFoam/ras/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/ras/damBreak/Allrun
@@ -4,11 +4,43 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=`getApplication`
+setDamBreakFine ()
+{
+    blockMeshDict="system/blockMeshDict"
+    controlDict="system/controlDict"
+    sed \
+    -e s/"23 8"/"46 10"/g \
+    -e s/"19 8"/"40 10"/g \
+    -e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
+    -e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
+    -e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
+    $blockMeshDict > temp.$$
+    mv temp.$$ $blockMeshDict
+    sed \
+    -e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
+    -e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
+    $controlDict > temp.$$
+    mv temp.$$ $controlDict
+}
 
-runApplication blockMesh
-runApplication setFields
-runApplication $application
+# Do damBreak
+(cd damBreak && foamRunTutorials)
 
-# ----------------------------------------------------------------- end-of-file
+# Clone case
+cloneCase damBreak damBreakFine
+
+(
+    cd damBreakFine || exit
+
+    # Modify case
+    setDamBreakFine
+    cp ../damBreak/0/alpha.water.org 0/alpha.water
+    # And execute
+    runApplication blockMesh
+    runApplication setFields
+    runApplication decomposePar
+    runParallel `getApplication`
+    runApplication reconstructPar
+)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/0/U b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/U
similarity index 83%
rename from tutorials/multiphase/interFoam/laminar/damBreak/0/U
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/U
index 5b146420656b9de88de6fa2f0ce7b1e30ff14228..c01fc99992ee34d60c3ce2714386101f93dc37b1 100644
--- a/tutorials/multiphase/interFoam/laminar/damBreak/0/U
+++ b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/alpha.water.org b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/alpha.water
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/alpha.water.org
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/alpha.water
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/alpha.water.org b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/alpha.water.org
new file mode 100644
index 0000000000000000000000000000000000000000..c0a881b0282d6910fa722a9e0002913bac5e76aa
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/alpha.water.org
@@ -0,0 +1,51 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      alpha.water;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 0 0 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    leftWall
+    {
+        type            zeroGradient;
+    }
+
+    rightWall
+    {
+        type            zeroGradient;
+    }
+
+    lowerWall
+    {
+        type            zeroGradient;
+    }
+
+    atmosphere
+    {
+        type            inletOutlet;
+        inletValue      uniform 0;
+        value           uniform 0;
+    }
+
+    defaultFaces
+    {
+        type            empty;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/epsilon b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/epsilon
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/epsilon
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/epsilon
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/k b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/k
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/k
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/k
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/nuTilda b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/nuTilda
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/nuTilda
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/nuTilda
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/nut b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/nut
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/nut
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/nut
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/p_rgh b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/p_rgh
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/0/p_rgh
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/0/p_rgh
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allclean b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..901c358b375a0720811db9110c71c506e1c4136d
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allclean
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+cp 0/alpha.water.org 0/alpha.water
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allrun b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allrun
new file mode 100755
index 0000000000000000000000000000000000000000..0df95afd2e081913dc5c6a301fa9f299262850a1
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allrun
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+# Get application name
+application=`getApplication`
+
+runApplication blockMesh
+runApplication setFields
+runApplication $application
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/g b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/constant/g
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/constant/g
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/constant/g
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/transportProperties b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/constant/transportProperties
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/constant/transportProperties
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/constant/transportProperties
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/constant/turbulenceProperties
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/constant/turbulenceProperties
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/constant/turbulenceProperties
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/blockMeshDict b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/blockMeshDict
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/system/blockMeshDict
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/blockMeshDict
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/controlDict b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/controlDict
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/system/controlDict
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/controlDict
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/decomposeParDict b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/decomposeParDict
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/system/decomposeParDict
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/decomposeParDict
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/fvSchemes
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/system/fvSchemes
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/fvSchemes
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/fvSolution
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/fvSolution
diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/setFieldsDict b/tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/setFieldsDict
similarity index 100%
rename from tutorials/multiphase/interFoam/ras/damBreak/system/setFieldsDict
rename to tutorials/multiphase/interFoam/ras/damBreak/damBreak/system/setFieldsDict
diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U
index 2966acf42d44224aca013f55ce5e2948bc1a90b1..a72126661e758c6aa96d75fc68e46e008658a190 100644
--- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U
+++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allclean b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allclean
new file mode 100755
index 0000000000000000000000000000000000000000..901c358b375a0720811db9110c71c506e1c4136d
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allclean
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+cp 0/alpha.water.org 0/alpha.water
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun
index dd9480383266e080b7ca45b748acf3a28c6e8380..a3c43a6c317434f7b915a225e4f310ce40811262 100755
--- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun
+++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun
@@ -14,4 +14,4 @@ runApplication createBaffles -overwrite
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution
index b6ce97884e53abeb1f7e33513b9afd2d06a63759..ea365e59e722a911cc12e41bb3fd5b9c1d18badf 100644
--- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution
+++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/fvSolution
@@ -67,8 +67,8 @@ solvers
 PIMPLE
 {
     momentumPredictor   no;
-    nOuterCorrectors    1;
-    nCorrectors         3;
+    nOuterCorrectors    3;
+    nCorrectors         1;
     nNonOrthogonalCorrectors 0;
 }
 
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/U b/tutorials/multiphase/interFoam/ras/waterChannel/0/U
index 19c4442d6d2429e888afd94d7919b0d8d393575e..41f5501d6f2eb47cce003e7b995f00a9b2773b6a 100644
--- a/tutorials/multiphase/interFoam/ras/waterChannel/0/U
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/U
@@ -28,8 +28,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     atmosphere
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/Allmesh b/tutorials/multiphase/interFoam/ras/waterChannel/Allmesh
index 9cb847c02d4046a2ebe279113d611d41c510c6bf..2fcc7a8f5f99962fb35ac408a8bbf18a37061edb 100755
--- a/tutorials/multiphase/interFoam/ras/waterChannel/Allmesh
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/Allmesh
@@ -17,4 +17,4 @@ while [ "$i" -lt 3 ] ; do
     i=`expr $i + 1`
 done
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/Allrun b/tutorials/multiphase/interFoam/ras/waterChannel/Allrun
index 3bf622c771440593b665faf03e0c4f5efcc8a757..eccd6c92520f9bc05f6f95d5bfc46ecdebdefde8 100755
--- a/tutorials/multiphase/interFoam/ras/waterChannel/Allrun
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/Allrun
@@ -13,4 +13,4 @@ runApplication setFields
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/0.org/U b/tutorials/multiphase/interFoam/ras/weirOverflow/0.org/U
index 70f2973862994099b9f50673f72e0b9868842117..195d428e730717773236ab3b84ae08328d10f1de 100644
--- a/tutorials/multiphase/interFoam/ras/weirOverflow/0.org/U
+++ b/tutorials/multiphase/interFoam/ras/weirOverflow/0.org/U
@@ -37,8 +37,7 @@ boundaryField
 
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     atmosphere
diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/0/U b/tutorials/multiphase/interMixingFoam/laminar/damBreak/0/U
index 5b146420656b9de88de6fa2f0ce7b1e30ff14228..c01fc99992ee34d60c3ce2714386101f93dc37b1 100644
--- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/0/U
+++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/0/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean
index d77f37fb6db0b2ad1acdb25f089a3d31c4d13556..af7604fd467a62b16c57a786d8d02b03c1ded0b4 100755
--- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean
+++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allclean
@@ -5,4 +5,4 @@ foamCleanTutorials cases
 rm -rf alpha.air alpha.other alpha.water \
     alpha.air.gz alpha.other.gz  alpha.water.gz
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun
index 7db96939707f6dbc7516ffd8467f0bd1397e607f..9ce30331322e7d65c613d31aaf8404b90e0cbf52 100755
--- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun
+++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun
@@ -11,4 +11,4 @@ cp 0/alpha.water.org 0/alpha.water
 runApplication setFields
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.org/U b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.org/U
index 23a3fdd9b6ab339f2ef3f20fa3e6e9359a14c99e..2e33679f061b7f0307f99da66f7192cff9813d9e 100644
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.org/U
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.org/U
@@ -45,8 +45,7 @@ boundaryField
 
     outerCylinder
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     "propeller.*"
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
index 755e96529929c8328294ed04ad744382d59b8d55..1d24256eb001c223c17e9fda2ebb9b33acd77dbc 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun
@@ -8,6 +8,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication decomposePar
 
-runParallel `getApplication` 4
+runParallel `getApplication`
 
 runApplication reconstructPar
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
index 2b47281b6c472b23a185b95292ba9308c39c96c5..40f5f5f1d4d88fc0f5b8a8a11173db2fa3cdae9c 100755
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre
@@ -25,9 +25,7 @@ runApplication renumberMesh -overwrite
 # - generate face/cell sets and zones
 
 #runApplication setSet -batch createInletOutletSets.setSet
-#mv log.setSet log.createInletOutletSets.setSet
 runApplication topoSet -dict system/createInletOutletSets.topoSetDict
-#mv log.topoSet log.createInletOutletSets.topoSet
 
 
 # - create the inlet/outlet and AMI patches
@@ -35,7 +33,7 @@ runApplication topoSet -dict system/createInletOutletSets.topoSetDict
 runApplication createPatch -overwrite
 
 
-# - test by running moveDynamicMes
+# - test by running moveDynamicMesh
 #runApplication moveDynamicMesh -checkAMI
 
 
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/U b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/U
index 3fa2f73478f3db95640944f6502331a29246f09e..c4a31ab12be562c15f11ffda1c534b2a41bc02a9 100644
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/U
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0.org/U
@@ -41,8 +41,7 @@ boundaryField
 
     bullet
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
index 2bc59d1fe3babd395ea5944b9074c92146dd2b16..b6885c65f14a6774c0db1e62d46ae9bb2dc57e52 100755
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allclean
@@ -12,4 +12,4 @@ rm -rf 0
 
 cleanCase
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun
index 56a77537ecba9e356dd730f7c4c391c1fe339773..dc6051766587ccb1378268930cc04cdc14e38ef9 100755
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun
@@ -21,4 +21,4 @@ runApplication potentialFoam -pName p_rgh
 # Run the solver
 runApplication `getApplication`
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U
index 33553736ac493a90d199a11ecfad5dec406ac7b7..731bbd1245e3ea32245698aed9f92ef062044271 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.air b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.air
index 45d59775253086ad0329f067480c5db3ed3c6b11..77ea77b281ed747e803f2dc7139a74d735ed3d36 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.air
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.air
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.mercury b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.mercury
index 75b17ed20791effde540c0d80d3818e7befddf33..d49c0f9da284bcda2cde1fd379a0112679e60551 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.mercury
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.mercury
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.oil b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.oil
index e450bab03cd2291b241d64d40d6c2e4b3f4eab33..dd14f297f90f85b06f19fb3e6671e2845f39f057 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.oil
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.oil
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.water b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.water
index 6ec22101ba81a158f74c747e46fc12efb933955e..65a43bf1389b8638ad8601993af6c498ee456718 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.water
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U.water
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
index 7ac80418725b3a97150e71b3eecb1a9205c14955..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean
@@ -8,4 +8,4 @@ cleanCase
 
 \rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
index 81cae15eabdcc1d05433cbffd5f56aee5aa1af17..b275240a50dde518b78c9e66ba0b8f558c962907 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
@@ -14,4 +14,4 @@ runApplication blockMesh
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U
index 33553736ac493a90d199a11ecfad5dec406ac7b7..731bbd1245e3ea32245698aed9f92ef062044271 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.air b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.air
index 45d59775253086ad0329f067480c5db3ed3c6b11..77ea77b281ed747e803f2dc7139a74d735ed3d36 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.air
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.air
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.mercury b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.mercury
index 75b17ed20791effde540c0d80d3818e7befddf33..d49c0f9da284bcda2cde1fd379a0112679e60551 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.mercury
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.mercury
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.oil b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.oil
index e450bab03cd2291b241d64d40d6c2e4b3f4eab33..dd14f297f90f85b06f19fb3e6671e2845f39f057 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.oil
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.oil
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.water b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.water
index 6ec22101ba81a158f74c747e46fc12efb933955e..65a43bf1389b8638ad8601993af6c498ee456718 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.water
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/0.org/U.water
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
index 7ac80418725b3a97150e71b3eecb1a9205c14955..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allclean
@@ -8,4 +8,4 @@ cleanCase
 
 \rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
index 33fca4c7bd4d1f685547d51cdbacf9efdd1e1d6a..6103dad6287cebe2c7122d06af8103e8e117ae83 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
@@ -13,7 +13,7 @@ cp -r 0.org 0
 runApplication blockMesh
 runApplication setFields
 runApplication decomposePar
-runParallel $application 4
+runParallel $application
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.air b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.air
index 7f853fd6bec5b2668a7dee835759d6e85af2ec9e..853e922f2c7952db31c4295d59572154f0a03b21 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.air
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.air
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.mercury b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.mercury
index fdf163ea3172341fae3638579470909d6af06f84..73d037a9fe50d3f47561280b466fdfdc885ea51c 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.mercury
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.mercury
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.oil b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.oil
index e1d58153673ae9eef9a978759ed7fcd21a10d927..aa3517196131e9bd9c9e00536c7e33ec8f3a9c55 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.oil
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.oil
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.water b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.water
index 84e8da3adbedd420596b733fb76619a7d148967d..4dc6e79ade939f477f8f6e6bcb4632235c921c94 100644
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.water
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/0/U.water
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
index 349ea685ea56c4967077cdb6bb6963a6b61c7c63..66c1631fd3b21065460d33c1ce838457c787defb 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/0.org/U b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/0.org/U
index 1e717fd036dc91b28d2826a56c208d7c817c8cbc..63c3aa1d37b80b580a8d2cea6124e8c59d17a120 100644
--- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/0.org/U
+++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/0.org/U
@@ -29,8 +29,7 @@ boundaryField
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
index 08ba9c1a9550f4ac4628021c8556d6a95d0fe949..d7ecd3dbdcec19d32458b234b7a967823bc895ad 100755
--- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
+++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
@@ -14,7 +14,7 @@ runApplication setFields
 
 #runApplication $application
 #runApplication decomposePar
-#runParallel $application 4
+#runParallel $application
 #runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh
index adf298d6f36a18a4153579fdba7113c8e5aa94ca..bcb12c0e9ac17c9aefbf669bd022c29c97052727 100755
--- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh
+++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/makeMesh
@@ -10,4 +10,4 @@ runApplication blockMesh
 
 runApplication topoSet
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0.org/U b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0.org/U
index 5b146420656b9de88de6fa2f0ce7b1e30ff14228..c01fc99992ee34d60c3ce2714386101f93dc37b1 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0.org/U
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/0.org/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
index 7ac80418725b3a97150e71b3eecb1a9205c14955..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allclean
@@ -8,4 +8,4 @@ cleanCase
 
 \rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
index 81cae15eabdcc1d05433cbffd5f56aee5aa1af17..b275240a50dde518b78c9e66ba0b8f558c962907 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
@@ -14,4 +14,4 @@ runApplication blockMesh
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0.org/U b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0.org/U
index 5b146420656b9de88de6fa2f0ce7b1e30ff14228..c01fc99992ee34d60c3ce2714386101f93dc37b1 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0.org/U
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/0.org/U
@@ -23,18 +23,15 @@ boundaryField
 {
     leftWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     rightWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     lowerWall
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     atmosphere
     {
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
index 7ac80418725b3a97150e71b3eecb1a9205c14955..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allclean
@@ -8,4 +8,4 @@ cleanCase
 
 \rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
index 9086d49ad658b85e319ae07e4300cf701e72f072..b92d6cc19a89c59b5a27fe480f3134e4f3be27ca 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
@@ -12,7 +12,7 @@ cp -r 0.org 0
 runApplication blockMesh
 runApplication setFields
 runApplication decomposePar
-runParallel $application 4
+runParallel $application
 runApplication reconstructPar
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0.org/U b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0.org/U
index 226251d929baac461b227ce7fd09e946dd6f2729..2b8e9315bf5235ed281a96cf922ff2463b94db4e 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0.org/U
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0.org/U
@@ -23,13 +23,11 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0/U b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0/U
index 226251d929baac461b227ce7fd09e946dd6f2729..2b8e9315bf5235ed281a96cf922ff2463b94db4e 100644
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0/U
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/0/U
@@ -23,13 +23,11 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     front
     {
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean
index 5d6fa341ebb76004908d833fb9b72853701ac2c1..e62451c67f94ac85bbe86b61e86b12192a0f6982 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allclean
@@ -7,4 +7,4 @@ cd ${0%/*} || exit 1    # Run from this directory
 cleanCase
 rm 0/alphas > /dev/null 2>&1
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
index 349ea685ea56c4967077cdb6bb6963a6b61c7c63..66c1631fd3b21065460d33c1ce838457c787defb 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.org/U b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.org/U
index dd0158f87fe994227b090d46d4bd153bc4769045..97c0584981c674b3efd417f86481b51afd84f12c 100644
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.org/U
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.org/U
@@ -29,8 +29,7 @@ boundaryField
 
     ".*Wall"
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     "floatingObject.*"
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
index 4c515c198337dd52f7f961fae9b4dc489dffaab9..4358c300592a56d0349c1c70cbe6e687820cc130 100755
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
@@ -8,14 +8,18 @@ cd ${0%/*} || exit 1    # Run from this directory
 application=`getApplication`
 
 runApplication blockMesh
-runApplication topoSet
-mv log.topoSet log.topoSet.1
+
+runApplication -s 1  topoSet
+
 runApplication subsetMesh -overwrite c0 -patch floatingObject
-runApplication topoSet -dict system/topoSetDict-selectBottom
+
+runApplication -s selectBottom \
+    topoSet -dict system/topoSetDict-selectBottom
+
 runApplication createPatch -overwrite
 
 cp -r 0.org 0 > /dev/null 2>&1
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U
index 6894546404e6b80a94fc9d153dde65c429d6d43c..646551a80c9c2c7a9f385e5bba4aa6111cea13d1 100644
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U
@@ -26,11 +26,12 @@ boundaryField
         type            pressureInletOutletParSlipVelocity;
         value           uniform (0 0 0);
     }
+
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
+
     floatingObject
     {
         type            fixedNormalInletOutletVelocity;
@@ -39,21 +40,25 @@ boundaryField
 
         normalVelocity
         {
-            type            oscillatingFixedValue;
-            refValue        uniform (0 1 0);
-            offset          (0 -1 0);
-            amplitude       table
-            (
-                (   0     0)
-                (  10 0.025)
-                (1000 0.025)
-            );
-            frequency       constant 1;
-            value           uniform (0 0 0);
+            type            uniformFixedValue;
+            uniformValue    sine;
+            uniformValueCoeffs
+            {
+                frequency 1;
+                amplitude table
+                (
+                    (   0     0)
+                    (  10 0.025)
+                    (1000 0.025)
+                );
+                scale     (0 1 0);
+                level     (0 0 0);
+            }
         }
 
         value           uniform (0 0 0);
     }
+
     frontAndBack
     {
         type            empty;
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
index afc73e32a7b4fc8672337ddc8aea4281757675df..6514e8598bb611041d2692fa18a1e8691ac851bc 100755
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
@@ -14,4 +14,4 @@ cp -r 0.org 0 > /dev/null 2>&1
 
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air
index 263e3a4ee84347a482c20051006151e807d7b80c..3d385329f620f6fdfaee88c0aad84eea5007725e 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Tair;
+    object      T.air;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water
index 23d5991368e4b1fa9f9f0879218447cd91952520..bd384ad8e08fed809d26dad60874c57373fbb9cb 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Twater;
+    object      T.water;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh
index ddc35790e5a33ebbeea6708fb4b0b7d994a40b4f..1078c64d33fae592cc238a629137eaa8fe70cd00 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh
@@ -31,7 +31,7 @@ boundaryField
         p0              $internalField;
         U               U.air;
         phi             phi.air;
-        rho             rho.air;
+        rho             thermo:rho.air;
         value           $internalField;
     }
     walls
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air
index 7f853fd6bec5b2668a7dee835759d6e85af2ec9e..853e922f2c7952db31c4295d59572154f0a03b21 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury
index fdf163ea3172341fae3638579470909d6af06f84..73d037a9fe50d3f47561280b466fdfdc885ea51c 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil
index e1d58153673ae9eef9a978759ed7fcd21a10d927..aa3517196131e9bd9c9e00536c7e33ec8f3a9c55 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water
index 84e8da3adbedd420596b733fb76619a7d148967d..4dc6e79ade939f477f8f6e6bcb4632235c921c94 100644
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
index 349ea685ea56c4967077cdb6bb6963a6b61c7c63..66c1631fd3b21065460d33c1ce838457c787defb 100755
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.gas
index d0518c1f0a48fbd0f844e4c8e57b7f9e5217f264..af59e821c4d3dd51b38ccd82b40cdbab2796b0ea 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.gas
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.gas
@@ -34,8 +34,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.liquid
index f9468a77b253be3451da544b0a34001033959a73..2a940b18ff3c58ff1a5d2b9eb227104d9e65eefc 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.liquid
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/0/U.liquid
@@ -34,8 +34,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/0/U.air b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/0/U.air
index de0e7be530266ed81ed781381bad00a159bcb192..8791ce72786a5f715c3372d362fb3229a6297cc0 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/0/U.air
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/0/U.air
@@ -37,8 +37,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBackPlanes
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.gas
index 32e187a7f972e374f3c2aa21e95e6b3b54b673a2..dac5ddc56700f09c72ee9c954ff0ae5252286004 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.gas
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.gas
@@ -1971,13 +1971,11 @@ boundaryField
     }
     wall1
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     wall2
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     defaultFaces
     {
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.liquid
index 6bdcf2740b46fd9bb7383d4b5f6ad363e10febd5..394e15bcf0dfadc22861aed3a62038eb7797b64b 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.liquid
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/0/U.liquid
@@ -1971,13 +1971,11 @@ boundaryField
     }
     wall1
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     wall2
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
     defaultFaces
     {
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.air b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.air
index 263e3a4ee84347a482c20051006151e807d7b80c..3d385329f620f6fdfaee88c0aad84eea5007725e 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.air
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.air
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Tair;
+    object      T.air;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.water b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.water
index 23d5991368e4b1fa9f9f0879218447cd91952520..bd384ad8e08fed809d26dad60874c57373fbb9cb 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.water
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/0/T.water
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Twater;
+    object      T.water;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.gas
index d0518c1f0a48fbd0f844e4c8e57b7f9e5217f264..af59e821c4d3dd51b38ccd82b40cdbab2796b0ea 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.gas
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.gas
@@ -34,8 +34,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.liquid
index f9468a77b253be3451da544b0a34001033959a73..2a940b18ff3c58ff1a5d2b9eb227104d9e65eefc 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.liquid
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/0/U.liquid
@@ -34,8 +34,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.air b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.air
index 263e3a4ee84347a482c20051006151e807d7b80c..3d385329f620f6fdfaee88c0aad84eea5007725e 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.air
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.air
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Tair;
+    object      T.air;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.water b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.water
index 9ca2684744fc9249ebae842a64d404ee475d566b..252c8a7fb53d8cd69cb40ff7292aaff62c6dc7d7 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.water
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/0/T.water
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Twater;
+    object      T.water;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/0/U.air b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/0/U.air
index de0e7be530266ed81ed781381bad00a159bcb192..8791ce72786a5f715c3372d362fb3229a6297cc0 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/0/U.air
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/0/U.air
@@ -37,8 +37,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBackPlanes
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air
index d43319675cd478a66fd94c7af0184d94680d77ec..ec6c7b2ca843d6c74fea63e17803117bbfa37e39 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water
index 3bd61f6111f756b19bb4ac6935748239ebcfce96..e156addb8395dba6f754cbc7b4c8e042d592722b 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
index 349ea685ea56c4967077cdb6bb6963a6b61c7c63..66c1631fd3b21065460d33c1ce838457c787defb 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.steam b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.steam
index ce5f5005631a0f1276863ab06bec8c316141e771..53a5fd8a7d0d6a745e3423bd502972f605196b5d 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.steam
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.steam
@@ -34,8 +34,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.water b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.water
index e484abf7a1751d5e69800c0419939dba5b635e5c..7cae41e9913befef8119e09c8397bb8bf7248c99 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.water
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/0/U.water
@@ -34,8 +34,7 @@ boundaryField
     }
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 }
 
diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
index 7ac80418725b3a97150e71b3eecb1a9205c14955..caaf799f71a5f5df4b2616de8979ae834a1b5030 100755
--- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
+++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean
@@ -8,4 +8,4 @@ cleanCase
 
 \rm -rf 0
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
index 81cae15eabdcc1d05433cbffd5f56aee5aa1af17..b275240a50dde518b78c9e66ba0b8f558c962907 100755
--- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
+++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
@@ -14,4 +14,4 @@ runApplication blockMesh
 runApplication setFields
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/0/U.air b/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/0/U.air
index de0e7be530266ed81ed781381bad00a159bcb192..8791ce72786a5f715c3372d362fb3229a6297cc0 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/0/U.air
+++ b/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/0/U.air
@@ -37,8 +37,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBackPlanes
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.air b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.air
index 263e3a4ee84347a482c20051006151e807d7b80c..3d385329f620f6fdfaee88c0aad84eea5007725e 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.air
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.air
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Tair;
+    object      T.air;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.water b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.water
index 23d5991368e4b1fa9f9f0879218447cd91952520..bd384ad8e08fed809d26dad60874c57373fbb9cb 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.water
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/0/T.water
@@ -10,7 +10,7 @@ FoamFile
     version     2.0;
     format      ascii;
     class       volScalarField;
-    object      Twater;
+    object      T.water;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.air b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.air
index de0e7be530266ed81ed781381bad00a159bcb192..8791ce72786a5f715c3372d362fb3229a6297cc0 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.air
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.air
@@ -37,8 +37,7 @@ boundaryField
 
     walls
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     frontAndBackPlanes
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air
index d43319675cd478a66fd94c7af0184d94680d77ec..ec6c7b2ca843d6c74fea63e17803117bbfa37e39 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.air
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water
index 3bd61f6111f756b19bb4ac6935748239ebcfce96..e156addb8395dba6f754cbc7b4c8e042d592722b 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/0/U.water
@@ -22,14 +22,12 @@ boundaryField
 {
     rotor
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     stator
     {
-        type            fixedValue;
-        value           uniform (0 0 0);
+        type            noSlip;
     }
 
     front
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
index 349ea685ea56c4967077cdb6bb6963a6b61c7c63..66c1631fd3b21065460d33c1ce838457c787defb 100755
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -9,4 +9,4 @@ application=`getApplication`
 runApplication ./makeMesh
 runApplication $application
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/constant/transportProperties b/tutorials/preProcessing/createZeroDirectory/cavity/constant/transportProperties
index 0b711144471c56f7de1218e1d720de69a3b6bfae..de00c3587cd9e0a677d63a6a6db42f7a47fa59a9 100644
--- a/tutorials/preProcessing/createZeroDirectory/cavity/constant/transportProperties
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/constant/transportProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/system/blockMeshDict b/tutorials/preProcessing/createZeroDirectory/cavity/system/blockMeshDict
index dc0e26dfddb70cc45db66625e25b3326efbcb3a0..5f58428dd6957756f1e7d66e8d9a31e95ad07e8c 100644
--- a/tutorials/preProcessing/createZeroDirectory/cavity/system/blockMeshDict
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/system/blockMeshDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/system/caseProperties b/tutorials/preProcessing/createZeroDirectory/cavity/system/caseProperties
index a216dc34a8159e0f530cfb3361106b0b2e301420..39d6b6396504454f51a4a01574ca098188671852 100644
--- a/tutorials/preProcessing/createZeroDirectory/cavity/system/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/system/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/system/controlDict b/tutorials/preProcessing/createZeroDirectory/cavity/system/controlDict
index f095103f7c43362aaf67f14fce3f956edffc885a..541d07f1741f0f05a81d8811c606b6e19d2d5da5 100644
--- a/tutorials/preProcessing/createZeroDirectory/cavity/system/controlDict
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/system/controlDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSchemes b/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSchemes
index 03029d2451e31e6ecbb9dd78b0d4c1d641e484ae..4dc97fefdbb494a8541ac505d33dc45a5fcb3b1e 100644
--- a/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSolution b/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSolution
index bea5167a6f98ba6b752cc53eddcfa6939f6adcaf..fb6e8e4622bd61357b957200d65625fc51c67b5f 100644
--- a/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSolution
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/system/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -22,13 +22,19 @@ solvers
         solver          PCG;
         preconditioner  DIC;
         tolerance       1e-06;
+        relTol          0.05;
+    }
+
+    pFinal
+    {
+        $p;
         relTol          0;
     }
 
     U
     {
-        solver          PBiCG;
-        preconditioner  DILU;
+        solver          smoothSolver;
+        smoother        symGaussSeidel;
         tolerance       1e-05;
         relTol          0;
     }
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
index 26b898a3e2c6313756cdd761a1288da08221ec7f..4ca1ac1c2970e1754e8a3816a0fdece054782150 100755
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
@@ -11,13 +11,13 @@ runApplication surfaceFeatureExtract
 runApplication blockMesh
 
 runApplication decomposePar
-runParallel snappyHexMesh 6 -overwrite
+runParallel snappyHexMesh -overwrite
 
-runParallel createZeroDirectory 6
+runParallel createZeroDirectory
 
-runParallel patchSummary 6
-runParallel potentialFoam 6 -noFunctionObjects
-runParallel $(getApplication) 6
+runParallel patchSummary
+runParallel potentialFoam -noFunctionObjects
+runParallel $(getApplication)
 
 runApplication reconstructParMesh -constant
 runApplication reconstructPar -latestTime
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/system/caseProperties b/tutorials/preProcessing/createZeroDirectory/motorBike/system/caseProperties
index 93ba59e2dc0bd3be35dbb480afa23fc544c81cf8..c105a4f4ad7d6b79348969d539250b485c8da1e6 100644
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/system/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/system/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
index 2682bf4df7b39f719e04e69e99d66df0e2041d4b..56e9b1ea90165eedfb9ad600c27f607890c7c7cb 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
@@ -22,10 +22,10 @@ done
 
 runApplication decomposePar -allRegions
 
-runParallel createZeroDirectory 4
+runParallel createZeroDirectory
 
 #-- Run in parallel
-runParallel $(getApplication) 4
+runParallel $(getApplication)
 
 # Reconstruct
 runApplication reconstructPar -allRegions
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/g b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/g
index 389a4c9faa880d1a8f22d6501ac5e0857643fe97..0cbbdeb5c3b8b6cb79bf89aba9a3cfcbc9dd7b0e 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/g
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/g
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/radiationProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/radiationProperties
index d6b0e89e15568f9b1902e5ca3982b7889c83424c..bcd3190ac259e3876d30325843f22168fcb3d19a 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/radiationProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/radiationProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties
index b68737c6cad523180a8863fe98b31b24cedc7b00..a43f53866d1be5ab4767c4642aac85c643e5fff3 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/turbulenceProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/turbulenceProperties
index c4416fdce2aea7ad1b7d6d3728a129f79726786f..e011578c36f3d257f1f59ac0726fd79ce34075e8 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/turbulenceProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/bottomAir/turbulenceProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/radiationProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/radiationProperties
index 60a537f62975883e0ba2b2fcf1d8b598295bb4c1..95b5a4ec903e7b3399e50ec03c35716923ecfe96 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/radiationProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/radiationProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/thermophysicalProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/thermophysicalProperties
index d455c7696a69a1aebda9671cc384c89267964e58..bf1bb55a72a9953a618bfe33e45bddb38b92a31d 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/thermophysicalProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/heater/thermophysicalProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/leftSolid/radiationProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/leftSolid/radiationProperties
index 60a537f62975883e0ba2b2fcf1d8b598295bb4c1..95b5a4ec903e7b3399e50ec03c35716923ecfe96 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/leftSolid/radiationProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/leftSolid/radiationProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/regionProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/regionProperties
index e63897261f8a1e81497321af9165302092155148..d4f6927c14a4248320c29cc00b14e60123365744 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/regionProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/regionProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/rightSolid/radiationProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/rightSolid/radiationProperties
index 60a537f62975883e0ba2b2fcf1d8b598295bb4c1..95b5a4ec903e7b3399e50ec03c35716923ecfe96 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/rightSolid/radiationProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/rightSolid/radiationProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/g b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/g
index 389a4c9faa880d1a8f22d6501ac5e0857643fe97..0cbbdeb5c3b8b6cb79bf89aba9a3cfcbc9dd7b0e 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/g
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/g
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/radiationProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/radiationProperties
index d6b0e89e15568f9b1902e5ca3982b7889c83424c..bcd3190ac259e3876d30325843f22168fcb3d19a 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/radiationProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/radiationProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties
index 00ce1d437f708d270cda83c3cd847d284df060cc..c3bc97b0ae4e5376be1421676c32092336f670c3 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/turbulenceProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/turbulenceProperties
index c4416fdce2aea7ad1b7d6d3728a129f79726786f..e011578c36f3d257f1f59ac0726fd79ce34075e8 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/turbulenceProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/constant/topAir/turbulenceProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/blockMeshDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/blockMeshDict
index ef1992cc0fe34607a7a04bec8531b0c78ce37e48..a0349cb81d2eca0501774b84c259945ad233b6c6 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/blockMeshDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/blockMeshDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/caseProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/caseProperties
index b98e0ce42602ad2d077b4fe0d2f4780e2f06eb6d..befa09e0ff461cd371f72e19ffd3f627def3c764 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict
index cb3202ef1193f4dd5e2a807f12a3e04ba2e65d3a..31743f9f522a60330f2621deb4f7a899b270d279 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/decomposeParDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/decomposeParDict
index 4f3d3fb667f20d1d85bcfa94503648afa6f79675..1a49f7a69bed1efebdb77131e1ec3ecd9c743fb0 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/decomposeParDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSchemes b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSchemes
index 439194c8ca9989d10d718a9918a1a32af85d6b02..79d552de1fde0973f0743d68a2cd8901650b9c9d 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSolution b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSolution
index 44a0147233d9c08d0734fd0fabcd63fb536af4f5..319f67166a49afa816fccff9aca3d07c7ec04d72 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSolution
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/bottomAir/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/controlDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/controlDict
index cac4409581612c4584eff3ef3c0897ce385695e1..e5ef873ca8f27613a894105b1eda409c2d6048f8 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/controlDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/controlDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/decomposeParDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/decomposeParDict
index 1594b7133bd87cc2a4ed2474b51a699af1c5f71e..742a2495dfc905d4656c9dcbfdae184dd421e8de 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/decomposeParDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSchemes b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSchemes
index 402b38b2cdb0508a38efebf8fc3bee1e64c63255..9288e0ae16b2f8a504719494e3b36aa7225a66bf 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSolution b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSolution
index 3e44345cba539395f3a08ca9119fb274bb3142d4..929708be88c90c17468dfe9e8b538d2fec98b724 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSolution
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/caseProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/caseProperties
index 30d7dd6a6340700aceeb4da9aa1772220e8ce3df..1ccfa4ccc462009e600b7ef3d151ddee068b94ab 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/changeDictionaryDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/changeDictionaryDict
index d2f0f853f77a1f5558b67bbec5495ef1626d7349..9e5df429dfc54b525e3acbfc6cb6c9d24da4118e 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/changeDictionaryDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/changeDictionaryDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/decomposeParDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/decomposeParDict
index 4f3d3fb667f20d1d85bcfa94503648afa6f79675..1a49f7a69bed1efebdb77131e1ec3ecd9c743fb0 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/decomposeParDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSchemes b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSchemes
index 07e39bf4e14f05a56bc38a30962491418ea3ae92..80776526d0b42c7bc1f372a2db76377b8ea238f6 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSolution b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSolution
index 9e6034aab5939e49b4bb5a940e489791aeef5d85..e44236657a985751f2bb420389e016cfc0e66470 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSolution
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/heater/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/caseProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/caseProperties
index a7c5de1834ff5f19da8f56022f8708bbfdbf62b9..6705ee89cd8c32473572b3448c6c8b422026eac3 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict
index 94340ad1b3528f10c2b1777fab0d60d2a4f57f52..5f51cce2e62fcd9d02119bcf53a3042b6a01149e 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/changeDictionaryDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/decomposeParDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/decomposeParDict
index 4f3d3fb667f20d1d85bcfa94503648afa6f79675..1a49f7a69bed1efebdb77131e1ec3ecd9c743fb0 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/decomposeParDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/fvSchemes b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/fvSchemes
index 07e39bf4e14f05a56bc38a30962491418ea3ae92..80776526d0b42c7bc1f372a2db76377b8ea238f6 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/leftSolid/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/caseProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/caseProperties
index 7b71b22f1a8582a96ba7cb24f0c2c89badfcabdf..990037266c3061df114e4d63303913797e53246e 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict
index 94340ad1b3528f10c2b1777fab0d60d2a4f57f52..5f51cce2e62fcd9d02119bcf53a3042b6a01149e 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/changeDictionaryDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/decomposeParDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/decomposeParDict
index 4f3d3fb667f20d1d85bcfa94503648afa6f79675..1a49f7a69bed1efebdb77131e1ec3ecd9c743fb0 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/decomposeParDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/fvSchemes b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/fvSchemes
index 07e39bf4e14f05a56bc38a30962491418ea3ae92..80776526d0b42c7bc1f372a2db76377b8ea238f6 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/rightSolid/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/snappyHexMeshDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/snappyHexMeshDict
index cbc02614faa908dd39e0534d907c2f7ed277c972..fdf967b5d76e079b3234b77141d5a854709d2efe 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/snappyHexMeshDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/snappyHexMeshDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/surfaceFeatureExtractDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/surfaceFeatureExtractDict
index befe329465dce63e088554ab513a0e3b5ab3e13b..ffeafc363fb361c27158b0ab36e3d20e07fbbad3 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/surfaceFeatureExtractDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/surfaceFeatureExtractDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/caseProperties b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/caseProperties
index c1aeadba39463d35baa9a5b425c7aa25180663ca..d2822b41151325d6002f4ebdb89548fc0f4f7c07 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/caseProperties
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/caseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.0                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/changeDictionaryDict
index a8a40b7bcf425740c25dad417dfed97c7eac9a0f..cf568ed0a9c8155be56bd72849440c22339e89aa 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/changeDictionaryDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/changeDictionaryDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/decomposeParDict b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/decomposeParDict
index 4f3d3fb667f20d1d85bcfa94503648afa6f79675..1a49f7a69bed1efebdb77131e1ec3ecd9c743fb0 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/decomposeParDict
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/decomposeParDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSchemes b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSchemes
index 439194c8ca9989d10d718a9918a1a32af85d6b02..79d552de1fde0973f0743d68a2cd8901650b9c9d 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSchemes
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSchemes
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSolution b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSolution
index 3fc4f95ec64c7adb0bdc00836a970b482758d49c..9ff9227ca5c05b712cd0529b7a9b859a4c9b4974 100644
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSolution
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/system/topAir/fvSolution
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  2.2.2                                 |
+|  \\    /   O peration     | Version:  plus                                  |
 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
diff --git a/wmake/MakefileApps b/wmake/makefiles/apps
similarity index 94%
rename from wmake/MakefileApps
rename to wmake/makefiles/apps
index 20955e788ea36f0ef25264cbe012fa284371d588..b8abcd2e95461f9bd7e06904967c21cfddc0dc6c 100644
--- a/wmake/MakefileApps
+++ b/wmake/makefiles/apps
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,7 +22,7 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     MakefileApps
+#     wmake/makefiles/apps
 #
 # Description
 #     Makefile used by
diff --git a/wmake/MakefileFiles b/wmake/makefiles/files
similarity index 85%
rename from wmake/MakefileFiles
rename to wmake/makefiles/files
index 8c5535354af8f5e60c9e942361f063d877236c9b..521d9341ad30718b9deca408ab1361b8c42afb92 100644
--- a/wmake/MakefileFiles
+++ b/wmake/makefiles/files
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,31 +22,30 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     MakefileFiles
+#     wmake/makefiles/files
 #
 # Description
 #     A Makefile for the 'options' and 'files' files, used by wmake
 #
 #------------------------------------------------------------------------------
 
-GENERAL_RULES = $(WM_DIR)/rules/General
-RULES         = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
-OBJECTS_DIR   = $(MAKE_DIR)/$(WM_OPTIONS)
-
+GENERAL_RULES   = $(WM_DIR)/rules/General
 include $(GENERAL_RULES)/general
-include $(RULES)/general
+
 
 #------------------------------------------------------------------------------
-# declare names of make system control files derived from file 'files'
+# Declare names of make system control files derived from file 'files'
 #------------------------------------------------------------------------------
 
-OPTIONS = $(OBJECTS_DIR)/options
-FILES   = $(OBJECTS_DIR)/files
-VARS    = $(OBJECTS_DIR)/variables
-SFILES  = $(OBJECTS_DIR)/sourceFiles
+OBJECTS_DIR     = $(MAKE_DIR)/$(WM_OPTIONS)
+OPTIONS         = $(OBJECTS_DIR)/options
+FILES           = $(OBJECTS_DIR)/files
+VARS            = $(OBJECTS_DIR)/variables
+SFILES          = $(OBJECTS_DIR)/sourceFiles
 
 -include $(OPTIONS)
 
+
 #------------------------------------------------------------------------------
 # Declare dependecy of all make system files on FILES
 # Causes all derived files to be remade if any are changed or missing
@@ -74,4 +73,5 @@ $(SFILES): $(MAKE_DIR)/files
 
 $(VARS): $(SFILES)
 
+
 #------------------------------------------------------------------------------
diff --git a/wmake/Makefile b/wmake/makefiles/general
similarity index 88%
rename from wmake/Makefile
rename to wmake/makefiles/general
index 38f3f1a71453a2d938438101bffe0d3c5f729b2d..580e96c7b2e4a3f417de87dc7ce402c36c06b47f 100644
--- a/wmake/Makefile
+++ b/wmake/makefiles/general
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -22,10 +22,10 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # File
-#     Makefile
+#     wmake/makefiles/general
 #
 # Description
-#     A generic Makefile, used by wmake
+#     Makefile used by wmake to make dependency files and libs and applications
 #
 #------------------------------------------------------------------------------
 
@@ -33,7 +33,7 @@
 # The Makefile uses a POSIX shell
 #------------------------------------------------------------------------------
 
-SHELL      = /bin/sh
+SHELL           = /bin/sh
 
 
 #------------------------------------------------------------------------------
@@ -47,29 +47,29 @@ SHELL      = /bin/sh
 # Set the directory containing the wmake scripts
 #------------------------------------------------------------------------------
 
-WM_SCRIPTS   = $(WM_DIR)/scripts
+WM_SCRIPTS      = $(WM_DIR)/scripts
 
 
 #------------------------------------------------------------------------------
 # Declare default paths
 #------------------------------------------------------------------------------
 
-LIB_SRC            = $(WM_PROJECT_DIR)/src
-LIB_PLATFORMS      = $(WM_PROJECT_DIR)/platforms/$(WM_OPTIONS)/lib
-OBJECTS_DIR        = $(MAKE_DIR)/$(WM_OPTIONS)
+LIB_SRC         = $(WM_PROJECT_DIR)/src
+LIB_PLATFORMS   = $(WM_PROJECT_DIR)/platforms/$(WM_OPTIONS)/lib
+OBJECTS_DIR     = $(MAKE_DIR)/$(WM_OPTIONS)
 
-SYS_INC            =
-SYS_LIBS           =
+SYS_INC         =
+SYS_LIBS        =
 
-PROJECT_INC        = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude \
+PROJECT_INC     = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude \
 		     -I$(LIB_SRC)/OSspecific/$(WM_OSTYPE)/lnInclude
 
-PROJECT_LIBS       = -l$(WM_PROJECT)
+PROJECT_LIBS    = -l$(WM_PROJECT)
 
-EXE_INC            =
-EXE_LIBS           =
+EXE_INC         =
+EXE_LIBS        =
 
-LIB_LIBS           =
+LIB_LIBS        =
 
 
 #------------------------------------------------------------------------------
@@ -94,13 +94,7 @@ SEXE            = a.out
 #------------------------------------------------------------------------------
 
 GENERAL_RULES = $(WM_DIR)/rules/General
-RULES         = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
-WMAKE_BIN     = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)
-
 include $(GENERAL_RULES)/general
-include $(RULES)/general
-include $(RULES)/$(WM_LINK_LANGUAGE)
-include $(GENERAL_RULES)/transform
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/rules/General/general b/wmake/rules/General/general
index 062c704f13b214b345484a2dbf056c7d6e3d543a..b3f20b48e8668d06765df01ba29c3c9213906f29 100644
--- a/wmake/rules/General/general
+++ b/wmake/rules/General/general
@@ -12,4 +12,17 @@ GINC       =
 GLIBS      = -lm
 GLIB_LIBS  =
 
+
+COMPILER_TYPE   = $(shell echo $(WM_COMPILER) | tr -d [:digit:])
+DEFAULT_RULES   = $(WM_DIR)/rules/$(WM_ARCH)$(COMPILER_TYPE)
+RULES           = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
+WMAKE_BIN       = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)
+
+include $(DEFAULT_RULES)/general
+include $(DEFAULT_RULES)/$(WM_LINK_LANGUAGE)
+-include $(RULES)/general
+-include $(RULES)/$(WM_LINK_LANGUAGE)
+include $(GENERAL_RULES)/transform
+
+
 #------------------------------------------------------------------------------
diff --git a/wmake/rules/linux64Clang/c b/wmake/rules/linux64Clang/c
index e882186177c90bd066b27e5a94d5a8fbab89da95..b743e3f68cb8b11a294c84d4b9c4334d093d3e39 100644
--- a/wmake/rules/linux64Clang/c
+++ b/wmake/rules/linux64Clang/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = clang -m64
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++
index f7d8a111ebc2e54348434dd22fe851de7f2a0911..84ed0f41078c249be7d6e1d2a53b45b0651c68b0 100644
--- a/wmake/rules/linux64Clang/c++
+++ b/wmake/rules/linux64Clang/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-tautological-undefined-compare -Wno-shift-negative-value
 
-CC          = clang++ -m64
+CC          = clang++ -std=c++0x -m64
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linux64Clang/c++Opt b/wmake/rules/linux64Clang/c++Opt
index 3363be80905262684d0f126daa1cd6388231184d..2aedabd6280a3476bc58db13139a0a3aa579502b 100644
--- a/wmake/rules/linux64Clang/c++Opt
+++ b/wmake/rules/linux64Clang/c++Opt
@@ -1,3 +1,2 @@
-#c++DBUG     = -O0 -DFULLDEBUG -g
 c++DBUG     =
 c++OPT      = -O3
diff --git a/wmake/rules/linux64Clang/general b/wmake/rules/linux64Clang/general
index 243cb7d8c7657e61f69a0628d869643a1a6186f4..1002cb169b5ba7215e263d07cced90cd3e8e0308 100644
--- a/wmake/rules/linux64Clang/general
+++ b/wmake/rules/linux64Clang/general
@@ -4,5 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linux64Gcc/c b/wmake/rules/linux64Gcc/c
index 66435ccf057a04d5051164eb65f110c6eb476c6b..1097b3a594ca9284537cc5af2b8248bb8bac4486 100644
--- a/wmake/rules/linux64Gcc/c
+++ b/wmake/rules/linux64Gcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc -m64
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++
index a3246efdd42c7095dc9e76f1aa00242850906e43..a47d0d499aef828102e7ff41ff72fa53fd9fd969 100644
--- a/wmake/rules/linux64Gcc/c++
+++ b/wmake/rules/linux64Gcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m64
+CC          = g++ -std=c++0x -m64
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linux64Gcc/general b/wmake/rules/linux64Gcc/general
index 243cb7d8c7657e61f69a0628d869643a1a6186f4..1002cb169b5ba7215e263d07cced90cd3e8e0308 100644
--- a/wmake/rules/linux64Gcc/general
+++ b/wmake/rules/linux64Gcc/general
@@ -4,5 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linux64Gcc45 b/wmake/rules/linux64Gcc45
deleted file mode 120000
index 7a0c1a85050d3015f39e16aa6bd52d77d3ab9fe1..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc45
+++ /dev/null
@@ -1 +0,0 @@
-linux64Gcc
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc46 b/wmake/rules/linux64Gcc46
deleted file mode 120000
index 7a0c1a85050d3015f39e16aa6bd52d77d3ab9fe1..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc46
+++ /dev/null
@@ -1 +0,0 @@
-linux64Gcc
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc47 b/wmake/rules/linux64Gcc47
deleted file mode 120000
index 7a0c1a85050d3015f39e16aa6bd52d77d3ab9fe1..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc47
+++ /dev/null
@@ -1 +0,0 @@
-linux64Gcc
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc48 b/wmake/rules/linux64Gcc48
deleted file mode 120000
index 7a0c1a85050d3015f39e16aa6bd52d77d3ab9fe1..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc48
+++ /dev/null
@@ -1 +0,0 @@
-linux64Gcc
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc49 b/wmake/rules/linux64Gcc49
deleted file mode 120000
index 7a0c1a85050d3015f39e16aa6bd52d77d3ab9fe1..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc49
+++ /dev/null
@@ -1 +0,0 @@
-linux64Gcc
\ No newline at end of file
diff --git a/wmake/rules/linux64Gcc51 b/wmake/rules/linux64Gcc51
deleted file mode 120000
index 7a0c1a85050d3015f39e16aa6bd52d77d3ab9fe1..0000000000000000000000000000000000000000
--- a/wmake/rules/linux64Gcc51
+++ /dev/null
@@ -1 +0,0 @@
-linux64Gcc
\ No newline at end of file
diff --git a/wmake/rules/linux64Icc/c b/wmake/rules/linux64Icc/c
index 97da5c28f0a76d6cd12db86353f8fe938ec81edd..14a3a231d549dd4902dc5360f4566e0b8d14aa87 100644
--- a/wmake/rules/linux64Icc/c
+++ b/wmake/rules/linux64Icc/c
@@ -4,7 +4,7 @@ cWARN        =
 
 cc          = icc
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++
index 85b976ae4f464d109609aa01971f0877474d0101..1cf106e2b3d2e775c61370fca5ddbe1c04f584f6 100644
--- a/wmake/rules/linux64Icc/c++
+++ b/wmake/rules/linux64Icc/c++
@@ -1,14 +1,14 @@
 SUFFIXES += .C
 
 c++WARN     = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-              -diag-disable 2304
+              -diag-disable 654,1125,2304
 
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -diag-disable 1224,2026,2305
 
 CC          = icpc -std=c++0x -fp-trap=common -fp-model precise
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository
 
diff --git a/wmake/rules/linux64Icc/c++Opt b/wmake/rules/linux64Icc/c++Opt
index fa6f76e452475c7c504caf9f0616d2e7bc7ea6d4..de5b5fa10bde6c6b58d977c668852e2afda1cd73 100644
--- a/wmake/rules/linux64Icc/c++Opt
+++ b/wmake/rules/linux64Icc/c++Opt
@@ -1,2 +1,2 @@
 c++DBUG     =
-c++OPT      = -xHost -O2
+c++OPT      = -xHost -O3
diff --git a/wmake/rules/linux64Icc/general b/wmake/rules/linux64Icc/general
index 45c285f1eee9fd805e853f30827f2258ca7bf5c5..52b0e177d7afe6ab60761862ae8b9f966fa18f2f 100644
--- a/wmake/rules/linux64Icc/general
+++ b/wmake/rules/linux64Icc/general
@@ -4,5 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxARM7Gcc/c b/wmake/rules/linuxARM7Gcc/c
index d7bda5d1df864e2a703994bbe92d51586f9da7be..dfae4adda0547faeae8333ed5e2660a3bacd7be7 100644
--- a/wmake/rules/linuxARM7Gcc/c
+++ b/wmake/rules/linuxARM7Gcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++
index 076934eae829466781779f1924ebfdba6d7d677a..80fccf2710a17f523233ccc4a51a5e7ac7056b3c 100644
--- a/wmake/rules/linuxARM7Gcc/c++
+++ b/wmake/rules/linuxARM7Gcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++
+CC          = g++ -std=c++0x
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linuxARM7Gcc/general b/wmake/rules/linuxARM7Gcc/general
index 376c6148463e5a83766e9f1882812d1c9b3e27f6..1e51dcc403ca74c4a15dc7538c09d3bce642bbe5 100644
--- a/wmake/rules/linuxARM7Gcc/general
+++ b/wmake/rules/linuxARM7Gcc/general
@@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxClang/c b/wmake/rules/linuxClang/c
index 7d67b4c02239e72376fc2036d3cee8926cc017a9..2c8e8a7f9c2dfae3ebf21b0e71bdd30e5b8458dc 100644
--- a/wmake/rules/linuxClang/c
+++ b/wmake/rules/linuxClang/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = clang -m32
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++
index 9d1ecb748238f719d4b00c40e1b18cc8ab95904e..b029fbcfd79459815f2dee5522408ddeef5f715a 100644
--- a/wmake/rules/linuxClang/c++
+++ b/wmake/rules/linuxClang/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedef -Wno-tautological-undefined-compare -Wno-shift-negative-value
 
-CC          = clang++ -m32
+CC          = clang++ -std=c++0x -m32
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linuxClang/general b/wmake/rules/linuxClang/general
index fa1eb5b925f5d6e3a87ea2bba97f2163aaa42558..e3427c3181a329ec6bf2f64bdefc4f81bf9afde7 100644
--- a/wmake/rules/linuxClang/general
+++ b/wmake/rules/linuxClang/general
@@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxGcc/c b/wmake/rules/linuxGcc/c
index 81c64cf710b3122b58e483154db6e852977d0c9b..8eddde0490ddf8ce5858efefc26278625b87d217 100644
--- a/wmake/rules/linuxGcc/c
+++ b/wmake/rules/linuxGcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc -m32
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++
index 9e2be6d7391a2f2a3c0e8ba0c08ed715767727c3..c1c34a8419be3332bb0d3fe525560bf19e05f3bf 100644
--- a/wmake/rules/linuxGcc/c++
+++ b/wmake/rules/linuxGcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m32
+CC          = g++ -std=c++0x -m32
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linuxGcc/general b/wmake/rules/linuxGcc/general
index fa1eb5b925f5d6e3a87ea2bba97f2163aaa42558..e3427c3181a329ec6bf2f64bdefc4f81bf9afde7 100644
--- a/wmake/rules/linuxGcc/general
+++ b/wmake/rules/linuxGcc/general
@@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxGcc45 b/wmake/rules/linuxGcc45
deleted file mode 120000
index e30dec7be4a48f08ac0cf339e8efc8b5751c4511..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc45
+++ /dev/null
@@ -1 +0,0 @@
-linuxGcc
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc46 b/wmake/rules/linuxGcc46
deleted file mode 120000
index e30dec7be4a48f08ac0cf339e8efc8b5751c4511..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc46
+++ /dev/null
@@ -1 +0,0 @@
-linuxGcc
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc47 b/wmake/rules/linuxGcc47
deleted file mode 120000
index e30dec7be4a48f08ac0cf339e8efc8b5751c4511..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc47
+++ /dev/null
@@ -1 +0,0 @@
-linuxGcc
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc48 b/wmake/rules/linuxGcc48
deleted file mode 120000
index e30dec7be4a48f08ac0cf339e8efc8b5751c4511..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc48
+++ /dev/null
@@ -1 +0,0 @@
-linuxGcc
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc49 b/wmake/rules/linuxGcc49
deleted file mode 120000
index e30dec7be4a48f08ac0cf339e8efc8b5751c4511..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc49
+++ /dev/null
@@ -1 +0,0 @@
-linuxGcc
\ No newline at end of file
diff --git a/wmake/rules/linuxGcc51 b/wmake/rules/linuxGcc51
deleted file mode 120000
index e30dec7be4a48f08ac0cf339e8efc8b5751c4511..0000000000000000000000000000000000000000
--- a/wmake/rules/linuxGcc51
+++ /dev/null
@@ -1 +0,0 @@
-linuxGcc
\ No newline at end of file
diff --git a/wmake/rules/linuxIA64Gcc/c b/wmake/rules/linuxIA64Gcc/c
index d7bda5d1df864e2a703994bbe92d51586f9da7be..dfae4adda0547faeae8333ed5e2660a3bacd7be7 100644
--- a/wmake/rules/linuxIA64Gcc/c
+++ b/wmake/rules/linuxIA64Gcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxIA64Gcc/c++ b/wmake/rules/linuxIA64Gcc/c++
index ada728b3fb3ead26feaebdc6f43f1d790d900750..6d152ecd1a23f06c6b52af52b84b7737e601f1b6 100644
--- a/wmake/rules/linuxIA64Gcc/c++
+++ b/wmake/rules/linuxIA64Gcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++
+CC          = g++ -std=c++0x
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linuxIA64Gcc/general b/wmake/rules/linuxIA64Gcc/general
index 480ea1b9c41d5a6b0a9bdfbe310d51c8a4c3e6d3..182ee7f9019e4fcffa64e7bf30fef331a656450d 100644
--- a/wmake/rules/linuxIA64Gcc/general
+++ b/wmake/rules/linuxIA64Gcc/general
@@ -4,6 +4,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/X
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxIA64Icc/c b/wmake/rules/linuxIA64Icc/c
index 3952de58fbdbd9c4549f58bd27e2eef987203705..2b19596b1a05d2f80010512e60b8941915752fe1 100644
--- a/wmake/rules/linuxIA64Icc/c
+++ b/wmake/rules/linuxIA64Icc/c
@@ -4,7 +4,7 @@ cWARN        =
 
 cc          = icc
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++
index 831d3cc1edc350657e6ea5db52a2a57e8e811daf..a8a9341e1aec7d7660fb8cfca729b7c4f0fb4ca5 100644
--- a/wmake/rules/linuxIA64Icc/c++
+++ b/wmake/rules/linuxIA64Icc/c++
@@ -6,9 +6,9 @@ c++WARN     = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invali
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -diag-disable 1224,2026,2305
 
-CC          = icpc
+CC          = icpc -std=c++0x
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository
 
diff --git a/wmake/rules/linuxIA64Icc/general b/wmake/rules/linuxIA64Icc/general
index 9dc446d4b28bc9f04467e5d38c601cc3b033943b..09a389665615459359790ebd71c618b28b1eb5bd 100644
--- a/wmake/rules/linuxIA64Icc/general
+++ b/wmake/rules/linuxIA64Icc/general
@@ -4,6 +4,6 @@ GLIBS      =
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/X
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxIcc/c b/wmake/rules/linuxIcc/c
index a6441bcbd065f2eb2157f93cf86747f69942b507..c9f75c90217057b1d520a7e7b66681b18862421f 100644
--- a/wmake/rules/linuxIcc/c
+++ b/wmake/rules/linuxIcc/c
@@ -4,7 +4,7 @@ cWARN        =
 
 cc          = icc -gcc-version=400
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -KPIC
 
diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++
index 48fdb9f6b1b8ed58a6b96a9fe03d47b187782b54..88976144c152d063af07db75eae692e248407404 100644
--- a/wmake/rules/linuxIcc/c++
+++ b/wmake/rules/linuxIcc/c++
@@ -8,7 +8,7 @@ c++LESSWARN = -diag-disable 1224,2026,2305
 
 CC          = icpc -std=c++0x -fp-trap=common -fp-model precise
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository
 
diff --git a/wmake/rules/linuxIcc/general b/wmake/rules/linuxIcc/general
index 8a38ddf6d47adc7f1bfc7d869c440378c9525f44..5c94cad44af0463b5bf104df334ff04867a1065d 100644
--- a/wmake/rules/linuxIcc/general
+++ b/wmake/rules/linuxIcc/general
@@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxPPC64Gcc/c b/wmake/rules/linuxPPC64Gcc/c
index 1fa057876c161f859ab006e6b7decbc67bfe6bbc..f973417062ea07758ca2d147fdd4f43c708866ab 100644
--- a/wmake/rules/linuxPPC64Gcc/c
+++ b/wmake/rules/linuxPPC64Gcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc -m64 -mcpu=power5+
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++
index e8e862bd26c35ef3651872e5fad750f3c4cf2e2f..7c330793840c49c0b9cf8e71cfe4e176e0170868 100644
--- a/wmake/rules/linuxPPC64Gcc/c++
+++ b/wmake/rules/linuxPPC64Gcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m64 -mcpu=power5+
+CC          = g++ -std=c++0x -m64 -mcpu=power5+
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linuxPPC64Gcc/general b/wmake/rules/linuxPPC64Gcc/general
index fa717f9645bac6b941e2b97588a859b3b08bf274..a590cc29c8d143674c2070610efb1fff1027b7ca 100644
--- a/wmake/rules/linuxPPC64Gcc/general
+++ b/wmake/rules/linuxPPC64Gcc/general
@@ -5,6 +5,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/X
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxPPC64leGcc/c b/wmake/rules/linuxPPC64leGcc/c
index d9aa80f726f10e7f13694594fc0bdd2ce5a326b2..c5e3c73ebab1b532aa85bc50aac9bb1b56c68a4e 100644
--- a/wmake/rules/linuxPPC64leGcc/c
+++ b/wmake/rules/linuxPPC64leGcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc -m64 -mcpu=power8
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++
index 284007b730e09d87e094cdf1e52aa3db31af6084..805f821822f1cce9c4093c9a22031e630628ecf3 100644
--- a/wmake/rules/linuxPPC64leGcc/c++
+++ b/wmake/rules/linuxPPC64leGcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m64 -mcpu=power8
+CC          = g++ -std=c++0x -m64 -mcpu=power8
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/linuxPPC64leGcc/general b/wmake/rules/linuxPPC64leGcc/general
index f800e09afcb301239fc13a2cece85a96dc64ba4a..7867cbde8f46661b843fc674bd041809705e8f5b 100644
--- a/wmake/rules/linuxPPC64leGcc/general
+++ b/wmake/rules/linuxPPC64leGcc/general
@@ -5,6 +5,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/X
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/solaris64Gcc/c b/wmake/rules/solaris64Gcc/c
index 66435ccf057a04d5051164eb65f110c6eb476c6b..1097b3a594ca9284537cc5af2b8248bb8bac4486 100644
--- a/wmake/rules/solaris64Gcc/c
+++ b/wmake/rules/solaris64Gcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc -m64
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/solaris64Gcc/c++ b/wmake/rules/solaris64Gcc/c++
index 33c22305fe97ee6dadc7813f1b38ba21433b463c..324522f10b1b30f75361d17f4f107c7c071db1ce 100644
--- a/wmake/rules/solaris64Gcc/c++
+++ b/wmake/rules/solaris64Gcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN =
 
-CC          = g++ -m64
+CC          = g++ -std=c++0x -m64
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/solaris64Gcc/general b/wmake/rules/solaris64Gcc/general
index 83b7ebf4e0b71fc1ff0139692cded64f6b2527b1..bbf1b69bc2b228e3d820d1636111cb74f698e006 100644
--- a/wmake/rules/solaris64Gcc/general
+++ b/wmake/rules/solaris64Gcc/general
@@ -5,6 +5,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -lnsl -lsocket -L$(FOAM_LIBBIN)/dummy -lPstream
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/X
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/solarisGcc/c b/wmake/rules/solarisGcc/c
index d7bda5d1df864e2a703994bbe92d51586f9da7be..dfae4adda0547faeae8333ed5e2660a3bacd7be7 100644
--- a/wmake/rules/solarisGcc/c
+++ b/wmake/rules/solarisGcc/c
@@ -4,7 +4,7 @@ cWARN        = -Wall
 
 cc          = gcc
 
-include $(RULES)/c$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
 
 cFLAGS      = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
 
diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++
index ec5a6ef39e6bfb8e91f4e09add2e3ebfdf079606..d8e968fb9ffb132dfadafb25a491d6db587f171f 100644
--- a/wmake/rules/solarisGcc/c++
+++ b/wmake/rules/solarisGcc/c++
@@ -5,9 +5,9 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN =
 
-CC          = g++
+CC          = g++ -std=c++0x
 
-include $(RULES)/c++$(WM_COMPILE_OPTION)
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
 
 ptFLAGS     = -DNoRepository -ftemplate-depth-100
 
diff --git a/wmake/rules/solarisGcc/general b/wmake/rules/solarisGcc/general
index cda7ba86730f829e090c6c7f51d4bea697839604..2e6e7b1f40b057a7afed90dec5546f376e0811a0 100644
--- a/wmake/rules/solarisGcc/general
+++ b/wmake/rules/solarisGcc/general
@@ -4,6 +4,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -lnsl -lsocket -L$(FOAM_LIBBIN)/dummy -lPstream
 
 include $(GENERAL_RULES)/standard
 
-include $(RULES)/X
-include $(RULES)/c
-include $(RULES)/c++
+include $(DEFAULT_RULES)/X
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff --git a/wmake/scripts/AllwmakeParseArguments b/wmake/scripts/AllwmakeParseArguments
index cbd5aa01e9bf3b69d1b7bc7bc6cf9fd7c88aeb39..433efafd52d144dd0b95354254563d013b266b92 100644
--- a/wmake/scripts/AllwmakeParseArguments
+++ b/wmake/scripts/AllwmakeParseArguments
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2014-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2014-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -55,6 +55,7 @@ options:
   -j                Compile using all local cores/hyperthreads
   -jN or -j N       Compile using N cores/hyperthreads
   -no-scheduler     Compile without wmakeScheduler
+  -update           Update lnInclude directories and dep files
 USAGE
 
     # Print options for building code documentation
@@ -122,6 +123,11 @@ do
         -no-scheduler)
             unset WM_SCHEDULER
             ;;
+        # Update lnInclude directories and dep files following a pull
+        -update)
+            wrmdep -update
+            wmakeLnIncludeAll
+            ;;
         # Generate documentation
         doc)
             test -n "$genDoc" || usage "invalid option '$1'"
@@ -161,4 +167,4 @@ fi
 unset Script usage setWM_NCOMPPROCS
 
 
-# ----------------------------------------------------------------- end-of-file
+#------------------------------------------------------------------------------
diff --git a/wmake/scripts/makeFiles b/wmake/scripts/makeFiles
index c5b99db9cf233674c115d1e82ae015c324897c19..62f21baf937f7e6395d72aff94d7417421339996 100755
--- a/wmake/scripts/makeFiles
+++ b/wmake/scripts/makeFiles
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -47,7 +47,7 @@ for dir in `find . -type d -print`
 do
     case "$dir" in
     . | ./Make | ./lnInclude )
-        # skip special directories
+        # Skip special directories
         ;;
     *)
         baseDir=`echo $dir | sed 's%^\./%%'`
diff --git a/wmake/src/Makefile b/wmake/src/Makefile
index 92a2b087e652283b610752144bffd4644da0d1a4..f14baad937e099495610bff48240f15ba6bc2f04 100644
--- a/wmake/src/Makefile
+++ b/wmake/src/Makefile
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -43,19 +43,18 @@ SHELL      = /bin/sh
 
 
 #------------------------------------------------------------------------------
-# set compilation and dependency building rules
+# Set compilation and dependency building rules
 #------------------------------------------------------------------------------
 
-GENERAL_RULES = $(WM_DIR)/rules/General
-RULES         = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
-WMAKE_BIN     = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)
+# Locally set optimized compilation
+WM_COMPILE_OPTION = Opt
 
-include $(RULES)/general
-include $(RULES)/$(WM_LINK_LANGUAGE)
+GENERAL_RULES   = $(WM_DIR)/rules/General
+include $(GENERAL_RULES)/general
 
 
 #------------------------------------------------------------------------------
-# targets
+# Targets
 #------------------------------------------------------------------------------
 
 all:  $(WMAKE_BIN)/dirToString $(WMAKE_BIN)/wmkdep
diff --git a/wmake/src/wmkdep.l b/wmake/src/wmkdep.l
index cf0be5e02cb0749bd5d89221c479d323fb68cd50..a98a5972787d41b59a8f26a564d981e642e1afd1 100644
--- a/wmake/src/wmkdep.l
+++ b/wmake/src/wmkdep.l
@@ -3,7 +3,7 @@
  =========                   |
  \\      /   F ield          | OpenFOAM: The Open Source CFD Toolbox
   \\    /    O peration      |
-   \\  /     A nd            | Copyright (C) 2011-2014 OpenFOAM Foundation
+   \\  /     A nd            | Copyright (C) 2011-2016 OpenFOAM Foundation
     \\/      M anipulation   |
 ------------------------------------------------------------------------------
 License
@@ -52,7 +52,7 @@ void nextFile(const char* fileName);
 void importFile(const char* fileName);
 void importDir(const char* dirName);
 
-#   undef yywrap        /* sometimes a macro by default */
+#undef yywrap        /* sometimes a macro by default */
 
 %}
 
diff --git a/wmake/wclean b/wmake/wclean
index 28e2621bccbc2f8f8a79d4faca103374f49fd298..c4f3808ba566fd406480f7752973d6719a828504 100755
--- a/wmake/wclean
+++ b/wmake/wclean
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,6 +25,10 @@
 # Script
 #     wclean
 #
+# Usage
+#     wclean [OPTION] [dir]
+#     wclean [OPTION] target [dir [MakeDir]]
+#
 # Description
 #     Clean up the wmake control directory Make/\$WM_OPTIONS and remove the
 #     lnInclude directories generated for libraries.
@@ -40,17 +44,18 @@ Usage: $Script [OPTION] [dir]
        $Script [OPTION] target [dir [MakeDir]]
 
 options:
-  -s | -silent      ignored - for compatibility with wmake
-  -help             print the usage
+  -s | -silent      Ignored - for compatibility with wmake
+  -help             Print the usage
 
 Clean up the wmake control directory Make/\$WM_OPTIONS and remove the
 lnInclude directories generated for libraries.
 
 The targets correspond to a subset of the 'wmake' special targets:
-  all               all subdirectories, uses any Allwclean or Allclean
+  all               All subdirectories, uses any Allwclean or Allclean
                     files if they exist
   exe | lib | libo | libso
-                    clean Make, any *.dep files and lnInclude directories
+                    Clean Make, any *.dep files and lnInclude directories
+  empty             Remove empty sub-directories for the requested dir
 
 USAGE
     exit 1
@@ -67,7 +72,7 @@ do
     -h | -help)
         usage
         ;;
-    -s | -silent)    # ignored - for compatibility with wmake
+    -s | -silent)    # Ignored - for compatibility with wmake
         shift
         ;;
     -*)
@@ -81,7 +86,7 @@ done
 
 
 #------------------------------------------------------------------------------
-# check arguments and change to the directory in which to run wclean
+# Check arguments and change to the directory in which to run wclean
 #------------------------------------------------------------------------------
 
 unset dir targetType
@@ -97,10 +102,10 @@ then
         targetType=$1
     fi
 
-    # specified directory name:
+    # Specified directory name:
     [ $# -ge 2 ] && dir=$2
 
-    # specified alternative name for the Make sub-directory:
+    # Specified alternative name for the Make sub-directory:
     [ $# -ge 3 ] && MakeDir=$3
 
     if [ "$dir" ]
@@ -111,22 +116,40 @@ then
         }
     fi
 
-    # provide some feedback
+    # Provide some feedback
     echo "$Script ${dir:-./}"
 fi
 
 
+#------------------------------------------------------------------------------
+# Remove empty sub-directories and exit
+#------------------------------------------------------------------------------
+
+if [ "$targetType" = empty ]
+then
+    # Get sub-directories avoiding particular directories
+    for dir in $(find . -mindepth 1 -maxdepth 1 \
+                           -type d \( -name .git -prune -o -print \) )
+    do
+        echo "check dir: $dir"
+        find $dir -depth -type d -empty -exec rmdir {} \; -print
+    done
+
+    exit 0
+fi
+
+
 #------------------------------------------------------------------------------
 # Recurse the directories tree
 #------------------------------------------------------------------------------
 
 if [ "$targetType" = all ]
 then
-    if [ -e Allwclean ]       # consistent with Allwmake
+    if [ -e Allwclean ]       # Consistent with Allwmake
     then
         ./Allwclean
         exit $?
-    elif [ -e Allclean ]      # often used for tutorial cases
+    elif [ -e Allclean ]      # Often used for tutorial cases
     then
         ./Allclean
         exit $?
@@ -135,7 +158,7 @@ then
         for dir in `find . \( -type d -a -name Make \)`
         do
             echo $dir
-            $0 ${dir%/Make}   # parent directory - trim /Make from the end
+            $0 ${dir%/Make}   # Parent directory - trim /Make from the end
         done
     fi
 fi
diff --git a/wmake/wcleanAll b/wmake/wcleanAll
deleted file mode 100755
index f4dfaf5f3a5443c3fc65037cebf7d100f59ddf05..0000000000000000000000000000000000000000
--- a/wmake/wcleanAll
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     wcleanAll
-#
-# Description
-#     search all the directories below the current for the object file
-#     directories of all machines and delete them.
-#
-#------------------------------------------------------------------------------
-Script=${0##*/}
-
-usage() {
-    exec 1>&2
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-Usage: $Script
-
-    Remove all object and related files
-
-USAGE
-    exit 1
-}
-
-
-#------------------------------------------------------------------------------
-# Parse arguments and options
-#------------------------------------------------------------------------------
-
-while [ "$#" -gt 0 ]
-do
-    case "$1" in
-    -h | -help)
-        usage
-        ;;
-    *)
-        usage "unknown option/argument: '$*'"
-        ;;
-    esac
-done
-
-[ -d bin -a -d src ] || usage "not in the project top level directory"
-
-
-echo "Removing platforms/sub-directories"
-rm -rf platforms/*
-
-echo "Cleaning Make sub-directories"
-find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \
-    xargs -I {} find '{}' -mindepth 1 -maxdepth 1 -type d -print | \
-    xargs rm -rf
-
-echo "Removing lnInclude directories"
-find . -depth -type d \( -name lnInclude \) -exec rm -rf {} \;
-
-echo "Removing misc files"
-find . \( -name exe -o -name log \) -exec rm {} \;
-
-tutorials/Allclean
-
-
-#------------------------------------------------------------------------------
-# Cleanup local variables and functions
-#------------------------------------------------------------------------------
-
-unset Script usage
-
-
-#------------------------------------------------------------------------------
diff --git a/wmake/wcleanLnIncludeAll b/wmake/wcleanLnIncludeAll
index 09eb1f6861e29fcc1dddaad5861f9eb17371b0b1..a1673d53bac31d2a86b0e7ccd6f2003a0029dae6 100755
--- a/wmake/wcleanLnIncludeAll
+++ b/wmake/wcleanLnIncludeAll
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,10 +25,13 @@
 # Script
 #     wcleanLnIncludeAll
 #
+# Usage
+#     wcleanLnIncludeAll [dir1] .. [dirN]
+#
 # Description
 #     Delete all the lnInclude directories in the tree.
 #
-#------------------------------------------------------------------------------
+##------------------------------------------------------------------------------
 Script=${0##*/}
 
 # Default to the CWD
diff --git a/wmake/wcleanMachine b/wmake/wcleanMachine
deleted file mode 100755
index 04bf7dd0ed037f1500c457e31cb1b33805097b0c..0000000000000000000000000000000000000000
--- a/wmake/wcleanMachine
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     wcleanMachine
-#
-# Description
-#     Searches the directory tree starting at the current directory for the
-#     object file directories of the specified machine type(s) and deletes them.
-#     If a machine type is not provided the current machine type is assumed.
-#
-#     Usage: wcleanMachine [ -current ]
-#            wcleanMachine <machineType> [ .. <machineTypeN> ]
-#
-#------------------------------------------------------------------------------
-Script=${0##*/}
-
-usage() {
-    exec 1>&2
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-Usage: $Script machineType [... machineTypeN] [ -current ]
-
-  Searches the directory tree starting at the current directory for the
-  object file directories of the specified machine type(s) and deletes them.
-  If either -current or no machine type is specified then the current type
-  is assumed (from $WM_OPTIONS).
-
-USAGE
-    exit 1
-}
-
-# Print help message
-if [ "$1" = "-h" -o "$1" = "-help" ]
-then
-    usage
-fi
-
-# Get the machines from the arguments
-machines="$@"
-
-# If no arguments are provided default to current machine type
-if [ "$#" -lt 1 ]
-then
-    machines="-current"
-fi
-
-# Loop over all the machine types specified and delete the object directories
-for machType in $machines
-do
-    if [ "$machType" = "-current" ]
-    then
-        machType="$WM_OPTIONS"
-        echo "Current machine type: $machType"
-        [ -n "$machType" ] || continue
-    fi
-
-    echo "Cleaning machine type: $machType"
-
-    find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \
-        xargs -I {} find '{}' -mindepth 1 -maxdepth 1 \
-              \( -type d -name "*$machType" -o -name "*$machType$WM_MPLIB" \) \
-              -print | xargs rm -rf
-
-    rm -rf platforms/${machType}*
-
-done
-
-
-#------------------------------------------------------------------------------
-# Cleanup local variables and functions
-#------------------------------------------------------------------------------
-
-unset Script machines
-
-
-#------------------------------------------------------------------------------
diff --git a/wmake/wcleanPlatform b/wmake/wcleanPlatform
new file mode 100755
index 0000000000000000000000000000000000000000..a9d20ceea9638455538dc979a3fda8f404f9865d
--- /dev/null
+++ b/wmake/wcleanPlatform
@@ -0,0 +1,127 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software: you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by
+#     the Free Software Foundation, either version 3 of the License, or
+#     (at your option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Script
+#     wcleanPlatform
+#
+# Usage
+#    wcleanPlatform [ -current | -all ]
+#    wcleanPlatform <platform> [ ... <platformN> ]
+#
+# Description
+#     Deletes the specified platforms object files directories from the
+#     the project top-level platforms directory $WM_PROJECT_DIR.
+#
+#     You need to be in the project top-level directory to run this script.
+#
+#     Options
+#         -current: clean the current platform
+#         -all: clean all platforms
+#
+#     If either -current or no platform is specified then the current platform
+#     $WM_OPTIONS is deleted.
+#
+#     If the -all option is specified all platforms and lnInclude directories
+#     are deleted
+#
+#------------------------------------------------------------------------------
+Script=${0##*/}
+
+usage() {
+    exec 1>&2
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+    cat<<USAGE
+Usage: $Script [ -current | -all ]
+       $Script <platform> [ ... <platformN> ]
+
+  Deletes the specified platforms object files directories from the
+  the project top-level platforms directory $WM_PROJECT_DIR.
+
+  You need to be in the project top-level directory to run this script.
+
+  If either -current or no platform is specified then the current platform
+  $WM_OPTIONS is deleted.
+
+  If the -all option is specified all platforms and lnInclude directories
+  are deleted.
+
+USAGE
+    exit 1
+}
+
+# Print help message
+if [ "$1" = "-h" -o "$1" = "-help" ]; then
+    usage
+fi
+
+# Check the script is executed from the project top-level directory
+[ "$PWD" = "$WM_PROJECT_DIR" ] || \
+    usage "Not in the project top-level directory " $WM_PROJECT_DIR
+
+# Get the platforms from the arguments
+platforms="$@"
+
+# If no arguments are provided select the current platform
+if [ "$#" -lt 1 ]; then
+    platforms="-current"
+fi
+
+if [ "$platforms" = "-all" ]; then
+    echo "Removing all platforms/sub-directories"
+    rm -rf platforms/*
+
+    echo "Removing lnInclude directories"
+    find . -depth -type d \( -name lnInclude \) | xargs rm -rf
+
+    tutorials/Allclean
+else
+    # Loop over the platforms specified and delete the object directories
+    for platform in $platforms
+    do
+        if [ "$platform" = "-current" ]
+        then
+            platform="$WM_OPTIONS"
+            echo "Current platform $platform"
+            [ -n "$platform" ] || continue
+        fi
+
+        if [ -d platforms/${platform} ]
+        then
+            echo "Cleaning platform $platform"
+            rm -rf platforms/${platform}*
+        else
+            echo "Platform $platform not built"
+        fi
+    done
+fi
+
+
+#------------------------------------------------------------------------------
+# Cleanup local variables and functions
+#------------------------------------------------------------------------------
+
+unset Script platforms
+
+
+#------------------------------------------------------------------------------
diff --git a/wmake/wdep b/wmake/wdep
index a89f81138f10e09796d51be0a8b8d2561be80ed8..916ef72cb28a69a5d68e828183a6cb014b35c44d 100755
--- a/wmake/wdep
+++ b/wmake/wdep
@@ -23,6 +23,9 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Script
+#     wdep
+#
+# Usage
 #     wdep <file>
 #     cat `wdep <file>`
 #
diff --git a/wmake/wmake b/wmake/wmake
index 9dfad12d9f0cb204264d788fa816bf1abecbf890..c09088b99ff8090c0de868b50e9b03c007e9270d 100755
--- a/wmake/wmake
+++ b/wmake/wmake
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -49,8 +49,8 @@
 #         wdep -h
 #
 # See also
-#     wmakeLnInclude, wmakeLnIncludeAll, wdep, wrmdep, wrmo and wrmdepold,
-#     wclean, wcleanMachine, wcleanAll, wcleanLnIncludeAll
+#     wmakeLnInclude, wmakeLnIncludeAll, wdep, wrmdep, wrmo,
+#     wclean, wcleanPlatform, wcleanLnIncludeAll
 #
 #------------------------------------------------------------------------------
 Script=${0##*/}
@@ -219,6 +219,9 @@ then
         ./Allwmake
         exit $?
     else
+        # Have to keep track of the main exit code for the call to "make"
+        makeExitCode=0
+
         # Find all the sub-directories containing a 'Make' directory
         FOAM_APPS=$(\
                        for d in *; \
@@ -230,15 +233,19 @@ then
         then
             # Compile all applications in sub-directories
             $make ${WM_CONTINUE_ON_ERROR:+-k} \
-                  -f $WM_DIR/MakefileApps \
+                  -f $WM_DIR/makefiles/apps \
                   TARGET="$targetType" FOAM_APPS="$FOAM_APPS"
+            makeExitCode=$?
         fi
         # If the current directory contains a 'Make' directory continue
-        # otherwise exit
-        if [ ! -d $MakeDir ]
+        # otherwise exit, or always exit in case of error
+        if [ ! -d $MakeDir -o $makeExitCode -ne 0 ]
         then
-            exit $?
+            exit $makeExitCode
         fi
+
+        # Clean up tracking variable
+        unset makeExitCode
     fi
 fi
 
@@ -335,10 +342,11 @@ fi
 
     # Pre-build the $WM_OPTIONS/options file
     # which is included when building the $WM_OPTIONS/files file
-    $make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir\
-          $objectsDir/options
+    $make -s -f $WM_DIR/makefiles/files MAKE_DIR=$MakeDir \
+          OBJECTS_DIR=$objectsDir $objectsDir/options
 
-    $make -s -f $WM_DIR/MakefileFiles MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir
+    $make -s -f $WM_DIR/makefiles/files MAKE_DIR=$MakeDir \
+          OBJECTS_DIR=$objectsDir
 )
 
 
@@ -363,7 +371,7 @@ case "$targetType" in
         # ... but only if 'LIB' is declared in 'Make/files'
         if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
         then
-            $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir \
+            $make -s -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
                   OBJECTS_DIR=$objectsDir lnInclude
         fi
         ;;
@@ -374,8 +382,8 @@ esac
 # Make the dependency files or object files and link
 #------------------------------------------------------------------------------
 
-exec $make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir OBJECTS_DIR=$objectsDir \
-     $targetType
+exec $make -f $WM_DIR/makefiles/general MAKE_DIR=$MakeDir \
+     OBJECTS_DIR=$objectsDir $targetType
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeCheckPwd b/wmake/wmakeCheckPwd
index 75aedba30d61ef7a78dde894f2726a517eae8de0..f10b6d2339cf08501c7e97ba9ca1c02b188a4b22 100755
--- a/wmake/wmakeCheckPwd
+++ b/wmake/wmakeCheckPwd
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -23,6 +23,9 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Script
+#     wmakeCheckPwd
+#
+# Usage
 #     wmakeCheckPwd <dir>
 #
 # Description
diff --git a/wmake/wmakeFilesAndOptions b/wmake/wmakeFilesAndOptions
index 022d3ed2456b71913ae2925d5af63ca8e7eb3c41..488c211ab4e5ba93725b6adb3388d4dc36e15ee0 100755
--- a/wmake/wmakeFilesAndOptions
+++ b/wmake/wmakeFilesAndOptions
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,12 +25,13 @@
 # Script
 #     wmakeFilesAndOptions
 #
+# Usage
+#     wmakeFilesAndOptions
+#
 # Description
 #     Scan current directory for directories and source files
 #     and construct Make/files and Make/options
 #
-#     Usage : wmakeFilesAndOptions
-#
 #------------------------------------------------------------------------------
 Script=${0##*/}
 
@@ -55,7 +56,7 @@ USAGE
 while [ "$#" -gt 0 ]
 do
     case "$1" in
-    -h | -help)   # provide immediate help
+    -h | -help)   # Provide immediate help
         usage
         ;;
     -*)
diff --git a/wmake/wmakeLnInclude b/wmake/wmakeLnInclude
index b68c31a6e07449677cf06efcd154eb86e11520a4..28f4276b9dd52e28c537c32ff02c0331a45e0b3d 100755
--- a/wmake/wmakeLnInclude
+++ b/wmake/wmakeLnInclude
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,17 +25,17 @@
 # Script
 #     wmakeLnInclude
 #
+# Usage
+#     wmakeLnInclude [-u | -update] [-s | -silent] <dir>
+#
 # Description
 #     Link all the source files in the <dir> directory into <dir>/lnInclude
 #
-#     Usage: wmakeLnInclude [-f] <dir>
-#
 #     The desired source files:
 #         *.C *.H *.h *.cpp *.cxx *.hpp *.hxx
 #
 #     Avoid
 #         *.c (C source)
-#         .#* (cvs recovered files)
 #
 #------------------------------------------------------------------------------
 Script=${0##*/}
@@ -48,14 +48,14 @@ usage() {
 Usage: $Script [OPTION] dir
 
 options:
-  -f | -force       force update
+  -u | -update      update
   -s | -silent      use 'silent' mode (do not echo command)
   -help             print the usage
 
     Link all the source files in the <dir> into <dir>/lnInclude
 
 Note
-    The '-f' option forces an update when the lnInclude directory already exists
+    The '-u' option forces an update when the lnInclude directory already exists
     and changes the default linking from 'ln -s' to 'ln -sf'.
 
 USAGE
@@ -73,16 +73,16 @@ unset findOpt
 # Default 'ln' option
 lnOpt="-s"
 
-unset forceUpdate silentOpt
+unset update silentOpt
 
 while [ "$#" -gt 0 ]
 do
     case "$1" in
-    -h | -help)   # provide immediate help
+    -h | -help)   # Provide immediate help
         usage
         ;;
-    -f | -force)
-        forceUpdate=true
+    -u | -update)
+        update=true
         lnOpt="-sf"
         shift
         ;;
@@ -126,7 +126,7 @@ incDir=$baseDir/lnInclude
 
 if [ -d $incDir ]
 then
-    [ "$forceUpdate" = true ] || {
+    [ "$update" = true ] || {
         # echo "$Script error: include directory $incDir already exists" 1>&2
         exit 0
     }
@@ -150,7 +150,7 @@ fi
 #------------------------------------------------------------------------------
 # Remove any broken links first (this helps when file locations have moved)
 #------------------------------------------------------------------------------
-find -L . -type l -exec rm {} \;
+find -L . -type l | xargs rm -f
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeLnIncludeAll b/wmake/wmakeLnIncludeAll
index 0ecaf9ec5d92a60a928405d338992607ef54260e..7c4c3fa8ac8d120d029401ed214b9e598fed41ea 100755
--- a/wmake/wmakeLnIncludeAll
+++ b/wmake/wmakeLnIncludeAll
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,9 +25,12 @@
 # Script
 #     wmakeLnIncludeAll
 #
+# Usage
+#     wmakeLnIncludeAll [dir1 .. dirN]
+#
 # Description
 #     Find directories with a 'Make/files' that contains a 'LIB =' directive
-#     and execute 'wmakeLnInclude -f' for each one
+#     and execute 'wmakeLnInclude -update' for each one
 #
 #------------------------------------------------------------------------------
 Script=${0##*/}
@@ -39,7 +42,7 @@ usage() {
 Usage: $Script [dir1 .. dirN]
 
     Find directories with a 'Make/files' that contains a 'LIB =' directive
-    and execute 'wmakeLnInclude -f' for each one
+    and execute 'wmakeLnInclude -update' for each one
 
 USAGE
     exit 1
@@ -55,7 +58,7 @@ findName=lnInclude
 while [ "$#" -gt 0 ]
 do
     case "$1" in
-    -h | -help)   # provide immediate help
+    -h | -help)   # Provide immediate help
         usage
         ;;
     -*)
@@ -75,10 +78,10 @@ for checkDir
 do
     if [ -d $checkDir ]
     then
-        echo "searching: $checkDir for 'Make' directories"
+        echo "Searching: $checkDir for 'Make' directories"
         echo "---------"
     else
-        echo "skipping non-dir: $checkDir"
+        echo "Skipping non-dir: $checkDir"
         echo "----------------"
         continue
     fi
@@ -90,7 +93,7 @@ do
         then
             if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1
             then
-                wmakeLnInclude -f $topDir
+                wmakeLnInclude -update $topDir
             elif [ -d "$topDir/lnInclude" ]
             then
                 echo "removing spurious $topDir/lnInclude"
diff --git a/wmake/wmakePrintBuild b/wmake/wmakePrintBuild
index cc554513dcc30ebf9e57a52e9a247a31c6db19ef..c23e63d33e4b578f6650ef33b24539bf803076a1 100755
--- a/wmake/wmakePrintBuild
+++ b/wmake/wmakePrintBuild
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,6 +25,9 @@
 # Script
 #     wmakePrintBuild
 #
+# Usage
+#     wmakePrintBuild [OPTION]
+#
 # Description
 #     Print the version used when building the project
 #
diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler
index 7b3d51e91baebb5fda6f7b655c6193e1fe05b41b..a927af7a3780d8e02bfa3e436f638202e3c9467d 100755
--- a/wmake/wmakeScheduler
+++ b/wmake/wmakeScheduler
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,13 +25,21 @@
 # Script
 #     wmakeScheduler
 #
+# Usage
+#     wmakeScheduler COMMAND
+#         run 'COMMAND' on one of the slots listed in WM_HOSTS
+#
+#     wmakeScheduler -count
+#         count the total number of slots available in WM_HOSTS
+#         eg,  export WM_NCOMPPROCS=$(wmakeScheduler -count)
+#
 # Description
 #     Scheduler for network distributed compilations using wmake.
 #     - WM_HOSTS contains a list of hosts and number of concurrent processes
 #     eg,
-#        export WM_HOSTS="hostA:1 hostB:2 hostC:1"
+#         export WM_HOSTS="hostA:1 hostB:2 hostC:1"
 #     - WM_COLOURS contains a list of colours to cycle through
-#        export WM_COLOURS="black blue green cyan red magenta yellow"
+#         export WM_COLOURS="black blue green cyan red magenta yellow"
 #
 #     Sources the relevant cshrc/bashrc if not set.
 #
@@ -39,14 +47,6 @@
 #     before calling this routine.
 #     FOAM_INST_DIR may possibly have been set (to find installation)
 #
-# Usage
-#     wmakeScheduler COMMAND
-#         run 'COMMAND' on one of the slots listed in WM_HOSTS
-#
-#     wmakeScheduler -count
-#         count the total number of slots available in WM_HOSTS
-#         eg,  export WM_NCOMPPROCS=$(wmakeScheduler -count)
-#
 #-------------------------------------------------------------------------------
 Script=${0##*/}
 
@@ -108,8 +108,8 @@ fi
 
 # Construct test string for remote execution.
 # Source WM_PROJECT settings if WM_PROJECT environment not set.
-# attempt to preserve the installation directory 'FOAM_INST_DIR'
-# use FOAM_SETTINGS to pass command-line settings
+# Attempt to preserve the installation directory 'FOAM_INST_DIR'
+# Use FOAM_SETTINGS to pass command-line settings
 case $sourceFoam in
 */bashrc)
     if [ "$FOAM_INST_DIR" ]
diff --git a/wmake/wmakeSchedulerUptime b/wmake/wmakeSchedulerUptime
index eb52f4061504a7db22d9dece04db07d640c4fa67..6239f9e65c42c9978da63803354a3708057eddf1 100755
--- a/wmake/wmakeSchedulerUptime
+++ b/wmake/wmakeSchedulerUptime
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -25,6 +25,14 @@
 # Script
 #     wmakeSchedulerUptime
 #
+# Usage
+#     wmakeSchedulerUptime COMMAND
+#         run 'COMMAND' on one of the slots listed in WM_HOSTS
+#
+#     wmakeScheduler -count
+#         count the total number of slots available in WM_HOSTS
+#         eg,  export WM_NCOMPPROCS=$(wmakeScheduler -count)
+#
 # Description
 #     Scheduler for network distributed compilations using wmake.
 #     - WM_HOSTS contains a list of hosts and number of concurrent processes
@@ -39,14 +47,6 @@
 #     before calling this routine.
 #     FOAM_INST_DIR may possibly have been set (to find installation)
 #
-# Usage
-#     wmakeSchedulerUptime COMMAND
-#         run 'COMMAND' on one of the slots listed in WM_HOSTS
-#
-#     wmakeScheduler -count
-#         count the total number of slots available in WM_HOSTS
-#         eg,  export WM_NCOMPPROCS=$(wmakeScheduler -count)
-#
 #-------------------------------------------------------------------------------
 Script=${0##*/}
 
@@ -64,7 +64,7 @@ then
         for slotGroup in $WM_HOSTS
         do
             n=${slotGroup##*:}
-            [ "$n" = "${slotGroup%%:*}" ] && n=1  # missing ':'
+            [ "$n" = "${slotGroup%%:*}" ] && n=1  # Missing ':'
             echo "+ ${n:-1}"
         done
     )
@@ -76,7 +76,7 @@ fi
 # !! Assumes remote computer running same shell and startup files
 # in same location
 
-sourceFoam=false    # fallback command
+sourceFoam=false    # Fallback command
 case $SHELL in
 */csh | */tcsh )    # [t]csh vs bash|ksh|sh
     shellRc=cshrc
@@ -107,8 +107,8 @@ fi
 
 # Construct test string for remote execution.
 # Source WM_PROJECT settings if WM_PROJECT environment not set.
-# attempt to preserve the installation directory 'FOAM_INST_DIR'
-# use FOAM_SETTINGS to pass command-line settings
+# Attempt to preserve the installation directory 'FOAM_INST_DIR'
+# Use FOAM_SETTINGS to pass command-line settings
 case $sourceFoam in
 */bashrc)
     if [ "$FOAM_INST_DIR" ]
@@ -125,9 +125,9 @@ case $sourceFoam in
     ;;
 esac
 
-# quote double-quotes for remote command line
+# Quote double-quotes for remote command line
 rcmd=$(echo $* | sed -e s/\"/\'\"\'/g)
-## the same, without forking (not ksh, maybe not /bin/sh either)
+# The same, without forking (not ksh, maybe not /bin/sh either)
 # rcmd=$(while [ "$#" -gt 0 ]; do echo "${1//\"/'\"'}"; shift; done)
 
 
@@ -147,7 +147,7 @@ set -o pipefail
 
 
 #
-# colour output by argument 1
+# Colour output by argument 1
 #
 colourPipe()
 {
@@ -168,7 +168,7 @@ colourPipe()
 
 
 
-# parse options
+# Parse options
 nprocs=1
 while [ "$#" -gt 0 ]
 do
@@ -194,10 +194,10 @@ while :
 do
     for slotGroup in $WM_HOSTS
     do
-        # split 'host:N', but catch 'host:' and 'host' too
+        # Split 'host:N', but catch 'host:' and 'host' too
         host=${slotGroup%%:*}
         n=${slotGroup##*:}
-        [ "$n" = "$host" ] && n=1  # missing ':'
+        [ "$n" = "$host" ] && n=1  # Missing ':'
         : ${n:=1}
 
 
@@ -249,7 +249,6 @@ do
     done
 
     # Did not find any free machines. Rest a bit.
-    #echo "$Script: Too much load. Waiting"
     sleep 1
 done
 
diff --git a/wmake/wrmdep b/wmake/wrmdep
index 32c14546c0e1b08de5970ef21fbb4766657da735..d5bf4f26587f9a571548ff59c4fe95b70a2a3c61 100755
--- a/wmake/wrmdep
+++ b/wmake/wrmdep
@@ -3,7 +3,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2015 OpenFOAM Foundation
+#   \\  /    A nd           | Copyright (C) 2015-2016 OpenFOAM Foundation
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -22,15 +22,34 @@
 #     You should have received a copy of the GNU General Public License
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
-# Script
+# Script wrmdep
+#
+# Usage
 #     wrmdep [-a | -all | all] [file]
+#     wrmdep [-o | -old] [dir1 .. dirN]
+#     wrmdep -update
 #
 # Description
+#     This is a catch-all script for pruning .dep files, depending on the
+#     provided arguments.
+#
+#     [-a | -all | all] [file]:
 #     Remove all .dep files from the object directory tree corresponding to the
 #     current source derectory or remove only the .dep files referring to the
 #     optionally specified [file].  With the -a/-all/all option the .dep files
 #     are removed for all platforms rather than just the current platform.
 #
+#     [-o | -old] [dir1 .. dirN]:
+#     Remove *.dep files that are without a corresponding .C or .L source file.
+#     This occurs when a directory has been moved.
+#         - prints the questionable directory and *.dep file
+#
+#     -update:
+#     Search all the "src" and "application" directories of the project for
+#     broken symbolic links for source code files and then remove all .dep
+#     files that relate to files that no longer exist.
+#     Must be executed in the project top-level directory: $WM_PROJECT_DIR.
+#
 #------------------------------------------------------------------------------
 Script=${0##*/}
 
@@ -41,11 +60,28 @@ usage() {
     exec 1>&2
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
-Usage: $Script [-a | -all | all] [file]
+Usage:
+
+    $Script [-a | -all | all] [file]
+
+        Remove all .dep files or remove .dep files referring to <file>
+        With the -a/-all/all option the .dep files are removed for all
+        platform rather than just the current platform.
+
+    $Script [-o | -old] [dir1 .. dirN]
+
+        Remove *.dep files that are without a corresponding .C or .L file.
+        This occurs when a directory has been moved.
+          - prints the questionable directory and *.dep file
+
+        Note: to remove empty directories, run: wclean empty
 
-Remove all .dep files or remove .dep files referring to <file>
-With the -a/-all/all option the .dep files are removed for all platform
-rather than just the current platform.
+    $Script -update
+
+        Search all the "src" and "application" directories of the project for
+        broken symbolic links for source code files and then remove all .dep
+        files that relate to files that no longer exist.
+        Must be executed in the project top-level directory: $WM_PROJECT_DIR
 
 USAGE
     exit 1
@@ -56,6 +92,9 @@ USAGE
 # Parse arguments and options
 #------------------------------------------------------------------------------
 
+# Default is for removing all .dep files in the current directory
+rmdepMode="files"
+
 # Default to processing only the current platform
 all=
 
@@ -71,6 +110,14 @@ do
         all="all"
         shift
         ;;
+    -o | -old)
+        rmdepMode="oldFolders"
+        shift
+        ;;
+    -update)
+        rmdepMode="updateMode"
+        shift
+        ;;
     -*)
        usage "unknown option: '$*'"
        ;;
@@ -84,33 +131,100 @@ done
 checkEnv
 
 
-#------------------------------------------------------------------------------
-# Remove the selected .dep files from the object tree
-#------------------------------------------------------------------------------
+case "$rmdepMode" in
+files)
+
+    #-------------------------------------------------------------------------
+    # Remove the selected .dep files from the object tree
+    #-------------------------------------------------------------------------
+
+    findObjectDir .
+
+    # With the -a/-all option replace the current platform with a wildcard
+    if [ "$all" = "all" ]
+    then
+        objectsDir=$(echo $objectsDir | sed s%$WM_OPTIONS%*% )
+    fi
+
+    if [ "$#" -eq 0 ]
+    then
+        echo "removing all .dep files ..."
+        find $objectsDir -name '*.dep' -print | xargs -t rm 2>/dev/null
+    else
+        echo "removing .dep files referring to $1 ..."
+        find $objectsDir -name '*.dep' -exec grep "$1" '{}' \; \
+             -exec rm '{}' \;
+    fi
+
+    ;;
+
+oldFolders)
+
+    # Default is the current directory
+    [ "$#" -gt 0 ] || set -- .
+
+    for checkDir
+    do
+        findObjectDir $checkDir
+
+        if [ -d $objectsDir ]
+        then
+            echo "Searching: $objectsDir"
+        else
+            echo "Skipping non-dir: $objectsDir"
+            continue
+        fi
+
+        find $objectsDir -name '*.dep' -print | while read depFile
+        do
+            depToSource $depFile
+
+            # Check C++ or Flex source file exists
+            if [ ! -r "$sourceFile" ];
+            then
+                echo "rm $depFile"
+                rm -f $depFile 2>/dev/null
+            fi
+        done
+    done
+
+    ;;
+
+updateMode)
+
+    [ "$PWD" = "$WM_PROJECT_DIR" ] \
+        || usage "Not in the project top-level directory"
+
+    echo "Purging all dep files that relate to files that no longer exist..."
+    fileNameList=$(find -L src applications -name '*.[CHL]' -type l)
+
+    for filePathAndName in $fileNameList
+    do
+        fileName=$(basename $filePathAndName)
+        echo "Purging from 'src': $fileName"
+        cd src
+        $Script -a $fileName
+
+        echo "Purging from 'applications': $fileName"
+        cd ../applications
+        $Script -a $fileName
+
+        cd ..
 
-findObjectDir .
+        # Just in case, remove the symbolic link as the last step
+        unlink $filePathAndName
+    done
 
-# With the -a/-all option replace the current platform with a wildcard
-if [ "$all" = "all" ]
-then
-    objectsDir=$(echo $objectsDir | sed s%$WM_OPTIONS%*% )
-fi
+    ;;
 
-if [ "$#" -eq 0 ]
-then
-    echo "removing all .dep files ..."
-    find $objectsDir -name '*.dep' -print | xargs -t rm 2>/dev/null
-else
-    echo "removing .dep files referring to $1 ..."
-    find $objectsDir -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
-fi
+esac
 
 
 #------------------------------------------------------------------------------
 # Cleanup local variables and functions
 #------------------------------------------------------------------------------
 
-unset Script usage
+unset Script usage rmdepMode all
 
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wrmdepold b/wmake/wrmdepold
deleted file mode 100755
index 61cdc92bc085085a8d39e19f21c2278036910bfd..0000000000000000000000000000000000000000
--- a/wmake/wrmdepold
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-#    \\/     M anipulation  |
-#-------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software: you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by
-#     the Free Software Foundation, either version 3 of the License, or
-#     (at your option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Script
-#     wrmdepold
-#
-# Description
-#     Usage: wrmdepold [dir1 .. dirN]
-#
-#     Remove *.dep files that are without a corresponding .C or .L source file.
-#     This often occurs when a directory has been moved.
-#         - print questionable directory and the *.dep file
-#         - optionally remove empty directories
-#------------------------------------------------------------------------------
-Script=${0##*/}
-
-# Source the wmake functions
-. ${0%/*}/scripts/wmakeFunctions
-
-usage() {
-    exec 1>&2
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-Usage: $Script [OPTION] [dir1 .. dirN]
-options:
-  -rmdir      find and remove empty directories (recursively)
-
-Remove *.dep files that are without a corresponding .C or .L file.
-This often occurs when a directory has been moved.
-  - print questionable directory and file
-  - optionally remove empty directories
-
-USAGE
-    exit 1
-}
-
-
-#------------------------------------------------------------------------------
-# Parse arguments and options
-#------------------------------------------------------------------------------
-
-unset optRmdir
-
-# parse options
-while [ "$#" -gt 0 ]
-do
-    case "$1" in
-    -h | -help)
-        usage
-        ;;
-    -rmdir)
-        optRmdir=true
-        shift
-        ;;
-    -*)
-       usage "unknown option: '$*'"
-       ;;
-    *)
-       break
-       ;;
-    esac
-done
-
-# Check environment variables
-checkEnv
-
-
-#------------------------------------------------------------------------------
-#
-#------------------------------------------------------------------------------
-
-# Default is the current directory
-[ "$#" -gt 0 ] || set -- .
-
-for checkDir
-do
-    findObjectDir $checkDir
-
-    if [ -d $objectsDir ]
-    then
-        echo "Searching: $objectsDir"
-    else
-        echo "Skipping non-dir: $objectsDir"
-        continue
-    fi
-
-    find $objectsDir -name '*.dep' -print | while read depFile
-    do
-        depToSource $depFile
-
-        # Check C++ or Flex source file exists
-        if [ ! -r "$sourceFile" ];
-        then
-            echo "rm $depFile"
-            rm -f $depFile 2>/dev/null
-        fi
-    done
-
-    # Remove empty dirs
-    if [ "$optRmdir" ]
-    then
-        # get subdirs ourselves so we can avoid particular directories
-        for dir in $(find $objectsDir -mindepth 1 -maxdepth 1 -type d \( -name .git -prune -o -print \) )
-        do
-            echo "check dir: $dir"
-            find $dir -depth -type d -empty -exec rmdir {} \; -print
-        done
-    fi
-done
-
-
-# -----------------------------------------------------------------------------
diff --git a/wmake/wrmo b/wmake/wrmo
index 1fb5cc408816fc9ea427027c1e12d1db557eec83..b7cab9bf9846a733e738a246e6ee2564a635e397 100755
--- a/wmake/wrmo
+++ b/wmake/wrmo
@@ -23,6 +23,9 @@
 #     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Script
+#     wrmo
+#
+# Usage
 #     wrmo [-a | -all | all] [file]
 #
 # Description